guanqb
2022-12-06 2a0695c0c19e871b78dcc84065d3481bbfea918b
视频监控搜索
4 files modified
38 ■■■■■ changed files
src/api/video/index.js 3 ●●●● patch | view | raw | blame | history
src/views/police/index.vue 4 ●●●● patch | view | raw | blame | history
src/views/video/list.vue 4 ●●● patch | view | raw | blame | history
src/views/video/region.vue 27 ●●●● patch | view | raw | blame | history
src/api/video/index.js
@@ -109,7 +109,7 @@
 * @param {*} current 当前页
 * @param {*} size 每页数据数量
 */
export const getRegionSaveList = (current, size, requestBaseUrl = 'outside') => {
export const getRegionSaveList = (current, size, name, requestBaseUrl = 'outside') => {
    return request({
        url: '/range/range/page',
        method: 'get',
@@ -117,6 +117,7 @@
        params: {
            current,
            size,
            name
        }
    })
}
src/views/police/index.vue
@@ -606,11 +606,7 @@
        searchClick () {
            this.searchValBoxShow = false
            if (this.navType == 1) {
                // this.carList = accurateSearch(this.carListSaveDate, this.searchValue, 'name')
                // console.log(111, this.carList, this.searchValue)
                this.getCarList(this.searchValue)
            } else if (this.navType == 2) {
                this.phoneList = accurateSearch(phoneList, this.searchValue, 'name')
            } else if (this.navType == 3) {
src/views/video/list.vue
@@ -246,7 +246,6 @@
            if (this.searchValue == '') {
                this.searchValBoxShow = false
                this.searchArray = []
                // this.monitoringList = this.monitoringSaveList
                this.getVideoList(1, 10, this.searchValue)
                this.$message({
                    message: '请输入搜索内容',
@@ -262,7 +261,6 @@
        searchClick () {
            if (this.searchValue != '') {
                this.searchValBoxShow = false
                this.monitoringList = accurateSearch(this.monitoringSaveList, this.searchValue, 'name')
                this.getVideoList(1, 10, this.searchValue)
            } else {
                this.$message({
@@ -270,7 +268,6 @@
                    type: 'warning'
                })
            }
        },
        searchVlaClick (item) {
@@ -278,6 +275,7 @@
            this.searchArray = []
            this.monitoringList = [item]
            this.searchValue = item.name
            this.getVideoList(1, 10, this.searchValue)
        },
        draw (type) {
src/views/video/region.vue
@@ -429,8 +429,8 @@
        },
        getRegionSaveList () {
            getRegionSaveList(1, 10).then(res => {
        getRegionSaveList (name) {
            getRegionSaveList(1, 10, name).then(res => {
                this.saveRangeList = res.data.data.records
                this.initRangeListLayer()
            })
@@ -438,7 +438,7 @@
        deleteRegionSaveList (id) {
            deleteRegionSaveList(id).then(res => {
                console.log('删除', res)
                console.log('删除成功', res)
                this.getRegionSaveList()
            })
        },
@@ -565,22 +565,37 @@
            if (this.searchValue == '') {
                this.searchValBoxShow = false
                this.searchArray = []
                this.getRegionSaveList(this.searchValue)
                this.$message({
                    message: '请输入搜索内容',
                    type: 'warning'
                })
                // this.monitoringList = monitoringList
            } else {
                // this.searchArray = listQuery(monitoringList, this.searchValue, 'name')
                this.searchArray = listQuery(this.saveRangeList, this.searchValue, 'name')
                this.searchValBoxShow = true
                this.getRegionSaveList(this.searchValue)
            }
        },
        searchClick () {
            this.searchValBoxShow = false
            // this.monitoringList = accurateSearch(monitoringList, this.searchValue, 'name')
            if (this.searchValue != '') {
                this.searchValBoxShow = false
                this.getRegionSaveList(this.searchValue)
            } else {
                this.$message({
                    message: '请输入搜索内容',
                    type: 'warning'
                })
            }
        },
        searchVlaClick (item) {
            this.searchValBoxShow = false
            this.searchArray = []
            this.monitoringList = [item]
            this.searchValue = item.name
            this.getRegionSaveList(this.searchValue)
        },
        // 大小重置