shuishen
2023-02-11 29fd19788f1c42bebd02b24d8e471c550c97a06b
现有设备弹框中搜索功能
1 files modified
94 ■■■■■ changed files
src/views/home/index.vue 94 ●●●●● patch | view | raw | blame | history
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-11 15:03:59
 * @LastEditTime: 2023-02-11 16:14:00
 * @FilePath: \srs-police-affairs\src\views\home\index.vue
 * @Description: 小区-栋-层-房屋
 *
@@ -235,15 +235,11 @@
            <div class="header">
                <div>
                    设备名称:
                    <input type="text" v-model="peoplePoliceName" placeholder="请输入…" />
                    <input type="text" v-model="equimentSearchVal" placeholder="请输入…" />
                </div>
                <el-button type="primary" icon="el-icon-search" @click="searchPeopleDetail">搜索</el-button>
                <el-button
                    type="primary"
                    icon="el-icon-delete"
                    @click="clearPeopleDetailSearchValue"
                >清空</el-button>
                <el-button type="primary" icon="el-icon-search" @click="searchEquiment">搜索</el-button>
                <el-button type="primary" icon="el-icon-delete" @click="clearSearchEquiment">清空</el-button>
            </div>
            <el-table
@@ -684,10 +680,12 @@
                label: 'label'
            },
            // 设备搜索条件
            equimentSearchVal: '',
            // 现有设备表格
            equimentTableData: [],
            equimentCurrentSelect: {},
            // 设备分页
            currentPage: 1,
            pagesize: 15,
            equimentPagingTotal: 0,
@@ -1218,11 +1216,6 @@
            }
        },
        equimentBeforeClose () {
            this.equimentVisible = false
            this.currentPage = 1
        },
        // initAreaCheckoptions (areaArr) {
        //     areaArr.forEach((item, index) => {
        //         if (item.areaCheckName != '全部') {
@@ -1581,11 +1574,53 @@
            this.$refs.RegionSelect.style.left = (bodyWidth - domWidth) / 2 + 'px'
        },
        /**
         * @description: 显示现有列表表格数据
         * @param {*} name
         * @param {*} typeVale
         * @param {*} type
         * @return {*}
         */
        async showequimentdetail (name, typeVale, type) {
            this.equimentTitle = name
            this.equimentCurrentSelect = {
                type: typeVale
            }
            await this.getEquipmentPaging(this.equimentCurrentSelect)
            this.equimentVisible = true
        },
        /**
         * @description: 设备查询
         * @return {*}
         */
        searchEquiment () {
            this.currentPage = 1
            this.getEquipmentPaging(this.equimentCurrentSelect)
        },
        /**
         * @description: 设备查询清空
         * @return {*}
         */
        clearSearchEquiment () {
            this.currentPage = 1
            this.equimentSearchVal = ''
            this.getEquipmentPaging(this.equimentCurrentSelect)
        },
        // 获取设备分页数据
        getEquipmentPaging (params) {
            getEquipmentPaging({ page: this.currentPage, count: this.pagesize, ...params }).then(res => {
            getEquipmentPaging({
                page: this.currentPage,
                count: this.pagesize,
                dwbh: this.policeStaionID != '' ? this.policeStaionID : this.userInfo.dept_id,
                query: this.equimentSearchVal,
                ...params
            }).then(res => {
                this.equimentTableData = []
                this.equimentPagingTotal = 0
@@ -1600,28 +1635,12 @@
                }
            })
        },
        // 设备分页查询
        handleCurrentChange: function (currentPage) {
            this.currentPage = currentPage
            this.getEquipmentPaging(this.equimentCurrentSelect)
        },
        // 显示现有列表表格数据
        async showequimentdetail (name, typeVale, type) {
            this.equimentTitle = name
            this.equimentCurrentSelect = {
                type: typeVale
            }
            let obj = {}
            obj[type] = typeVale
            await this.getEquipmentPaging(obj)
            this.equimentVisible = true
        },
        // 设备的视频播放
@@ -1925,6 +1944,17 @@
            } else if (this.keyPersonVisible == true) {
                this.keyPersonVisible = false
            }
        },
        /**
         * @description: 现有人员和重点人员列表弹窗关闭的事件
         * @return {*}
         */
        equimentBeforeClose () {
            this.currentPage = 1
            this.equimentSearchVal = ''
            this.equimentTableData = []
            this.equimentVisible = false
        }
    },