shuishen
2023-02-02 e5bfe6a37c11cfe6ae7b4b733d182ea16d34d5c7
首页select选择加筛选
2 files modified
36 ■■■■ changed files
src/views/activity/index.vue 2 ●●● patch | view | raw | blame | history
src/views/home/index.vue 34 ●●●● patch | view | raw | blame | history
src/views/activity/index.vue
@@ -2,7 +2,7 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2022-08-18 16:18:17
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2023-02-01 17:39:33
 * @LastEditTime: 2023-02-02 10:04:06
 * @FilePath: \srs-police-affairs\src\views\activity\index.vue
 * @Description: 安保活动
 *
src/views/home/index.vue
@@ -2,7 +2,7 @@
 * @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: 小区-栋-层-房屋
 *
@@ -45,8 +45,9 @@
        </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>
@@ -468,6 +469,8 @@
    data () {
        return {
            // 是否显示第一级select
            selectAllShow: false,
            houseLayerShow: true,
            carLayerShow: false,
            cameraLayerShow: false,
@@ -580,6 +583,12 @@
            that.policeSituationSiteClick(params)
        })
        if (this.userInfo.dept_id == '1123598813738675201') {
            this.selectAllShow = true
        } else {
            this.selectAllShow = false
        }
        this.getPoliceStationTree(1)
        // setTimeout(() => {
@@ -612,6 +621,7 @@
        getPoliceStationTree (type, id) {
            getPoliceStationTree(type, id ? id : '').then(res => {
                if (type == 1) {
                    this.policeStationOptions = res.data.data
                    this.policeStationOptions.unshift({
@@ -619,7 +629,23 @@
                        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