| | |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2022-08-18 16:18:17 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2023-02-01 17:27:19 |
| | | * @LastEditTime: 2023-02-02 11:30:23 |
| | | * @FilePath: \srs-police-affairs\src\views\home\index.vue |
| | | * @Description: 小区-栋-层-房屋 |
| | | * |
| | |
| | | </div> |
| | | |
| | | <div ref="RegionSelect" style="left: 0;" class="region-select"> |
| | | <map-select class="map-select" @selectCheck="policeStationSelect" :checkValue="policeStationCheckValue" |
| | | :options="policeStationOptions" :optionsName="'name'"></map-select> |
| | | <map-select v-show="selectAllShow" class="map-select" @selectCheck="policeStationSelect" |
| | | :checkValue="policeStationCheckValue" :options="policeStationOptions" |
| | | :optionsName="'name'"></map-select> |
| | | |
| | | <map-select class="map-select" @selectCheck="areaSelect" :checkValue="areaCheckValue" :options="areaOptions" |
| | | :optionsName="'name'"></map-select> |
| | |
| | | |
| | | data () { |
| | | return { |
| | | // 是否显示第一级select |
| | | selectAllShow: false, |
| | | houseLayerShow: true, |
| | | carLayerShow: false, |
| | | cameraLayerShow: false, |
| | |
| | | that.policeSituationSiteClick(params) |
| | | }) |
| | | |
| | | if (this.userInfo.dept_id == '1123598813738675201') { |
| | | this.selectAllShow = true |
| | | } else { |
| | | this.selectAllShow = false |
| | | } |
| | | |
| | | this.getPoliceStationTree(1) |
| | | |
| | | // setTimeout(() => { |
| | |
| | | getPoliceStationTree (type, id) { |
| | | getPoliceStationTree(type, id ? id : '').then(res => { |
| | | if (type == 1) { |
| | | |
| | | this.policeStationOptions = res.data.data |
| | | |
| | | this.policeStationOptions.unshift({ |
| | |
| | | id: 1 |
| | | }) |
| | | |
| | | this.initPoliceStationLayer() |
| | | |
| | | if (this.userInfo.dept_id != '1123598813738675201') { |
| | | |
| | | let currentItem |
| | | |
| | | res.data.data.some(item => { |
| | | if (item.id == this.userInfo.dept_id) currentItem = item |
| | | }) |
| | | |
| | | this.initAreaOptionLayer(currentItem) |
| | | this.getPoliceStationTree(2, this.userInfo.dept_id) |
| | | this.policeStaionChecked = currentItem |
| | | |
| | | } else { |
| | | this.initPoliceStationLayer() |
| | | } |
| | | |
| | | } else if (type == 2) { |
| | | this.areaOptions = res.data.data |
| | | |