Merge branch 'master' of http://192.168.0.105:10010/r/srs-police-affairs
| | |
| | | let arr3 = housingDate |
| | | |
| | | let areaArr = [] |
| | | let housingArr = [] |
| | | let jurisdictionData = [{ |
| | | label: '全部', |
| | | children: [] |
| | | }] |
| | | arr1.forEach((item1, index1) => { |
| | | console.log(item1.policeStationName) |
| | | if (item1.policeStationName != '全部') { |
| | | let policeArr = [{ |
| | | label: '全部', |
| | | children: areaArr |
| | | }] |
| | | let item1Obj = { label: item1.policeStationName, id: item1.policeStationId, children: policeArr } |
| | | arr2.forEach((item2, index2) => { |
| | | if (item2.policeStationName == item1.policeStationName) { |
| | | item2.areaCheckOptions.forEach((item3, index3) => { |
| | | if (item3.areaCheckName != '全部') { |
| | | let policeArr = [{ |
| | | label: '全部', |
| | | children: areaArr |
| | | }] |
| | | let item3Obj = { label: item3.areaCheckName, id: item3.areaCheckId, childern: housingArr } |
| | | // arr1.forEach((item1, index1) => { |
| | | // console.log(item1.policeStationName) |
| | | // if (item1.policeStationName != '全部') { |
| | | |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | // let item1Obj = { label: item1.policeStationName, id: item1.policeStationId, children: policeArr } |
| | | // arr2.forEach((item2, index2) => { |
| | | // if (item2.policeStationName == item1.policeStationName) { |
| | | // item2.areaCheckOptions.forEach((item3, index3) => { |
| | | // if (item3.areaCheckName != '全部') { |
| | | // let policeArr = [{ |
| | | // label: '全部', |
| | | // children: housingArr |
| | | // }] |
| | | // let item3Obj = { label: item3.areaCheckName, id: item3.areaCheckId, childern: housingArr } |
| | | |
| | | // } |
| | | // }) |
| | | // } |
| | | // }) |
| | | // } |
| | | |
| | | |
| | | }) |
| | | // }) |
| | | |
| | | } |
| | | } |
| | |
| | | import rightContainer from './components/rightContainer' |
| | | import bottomContainer from './components/bottomContainer' |
| | | |
| | | let treeData = [ |
| | | { |
| | | label: '全部', |
| | | id: '1', |
| | | children: [{ |
| | | label: '车站派出所', |
| | | id: '2', |
| | | children: [{ |
| | | label: '责任区1', |
| | | id: '4', |
| | | }, { |
| | | label: '责任区2', |
| | | id: '5', |
| | | }] |
| | | }, { |
| | | label: '沙溪派出所', |
| | | id: '3', |
| | | children: [{ |
| | | label: '责任区1', |
| | | id: '6', |
| | | }, { |
| | | label: '责任区2', |
| | | id: '7', |
| | | }] |
| | | }] |
| | | } |
| | | ] |
| | | |
| | | export default { |
| | | data () { |
| | | return { |
| | |
| | | document.querySelector('.dc-container .dc-zoom-controller').classList.add('homebottom') |
| | | document.querySelector('.dc-container .dc-location-bar').classList.add('homebottom') |
| | | document.querySelector('.screen-full-btn').classList.add('homebottom') |
| | | |
| | | this.setDomStyle() |
| | | }) |
| | | |
| | | // axios.get('/user/getUserList').then((res) => { |
| | | // console.log(res, 999) |
| | | // }) |
| | | // }} |
| | | |
| | | window.addEventListener('resize', this.setDomStyle) |
| | | }, |
| | |
| | | }, |
| | | |
| | | methods: { |
| | | searchName (name, arr) { |
| | | let obj = {} |
| | | let flag = false |
| | | arr.forEach(item => { |
| | | if (item.label == name) { |
| | | flag = true |
| | | obj = item |
| | | } |
| | | // console.log(item.label, name, flag) |
| | | }) |
| | | |
| | | if (flag) { |
| | | return obj |
| | | } else { |
| | | arr.forEach(item => { |
| | | if (item.children) { |
| | | obj = this.searchName(name, item.children) |
| | | } |
| | | }) |
| | | return obj |
| | | } |
| | | }, |
| | | |
| | | policeStationSelect (item) { |
| | | this.policeStationCheckValue = item.policeStationName |
| | | if (item.policeStationName == "全部") { |
| | |
| | | cylinderLayer.clear() |
| | | } |
| | | this.$refs.leftContainer.selectPoliceChangeData(item.policeStationName) |
| | | |
| | | |
| | | }, |
| | | |
| | | areaSelect (item) { |
| | |
| | | this.phoneArrShow = booleans[2] |
| | | this.saveArr = arr |
| | | this.showArr = arr |
| | | // 动态改变树形控件数据 |
| | | this.jurisdictionData = [this.searchName(this.policeStationCheckValue, treeData)] |
| | | let arr1 = [] |
| | | this.saveArr.some((item1) => { |
| | | if (item1.policeStation == this.policeStationCheckValue) { |
| | | arr1.push(item1) |
| | | } |
| | | }) |
| | | this.showArr = arr1 |
| | | }, |
| | | |
| | | showkeypersondetail (name, arr) { |