guanqb
2023-03-08 0ae9a5b9b5c79046010d63f8fcb919a85da8c922
Merge branch 'master' of http://192.168.0.105:10010/r/srs-police-affairs
2 files modified
1 files added
94 ■■■■■ changed files
src/api/home/equiment.js 43 ●●●●● patch | view | raw | blame | history
src/views/home/components/rightContainer.vue 18 ●●●● patch | view | raw | blame | history
src/views/home/index.vue 33 ●●●● patch | view | raw | blame | history
src/api/home/equiment.js
New file
@@ -0,0 +1,43 @@
/*
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2022-12-27 14:19:19
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2023-03-08 11:49:41
 * @FilePath: \srs-police-affairs\src\api\home\equiment.js
 * @Description:
 *
 * Copyright (c) 2023 by shuishen 1109946754@qq.com, All Rights Reserved.
 */
import request from "@/router/axios.js"
let equipmentNum = ''
if (process.env.NODE_ENV == 'development') {
    // 开发
    equipmentNum = window.BASE_URL_CONFIG.VUE_APP_OUTER_NET_EQUIPMENT
} else {
    // 部署
    equipmentNum = window.BASE_URL_CONFIG.VUE_APP_INTRANET_EQUIPMENT
}
// 获取手台分页数据
export const getTalkEquimentPage = (params) => {
    return request({
        url: `/talkBackEquipment/talkBackEquipment/page`,
        method: 'get',
        params: {
            ...params
        }
    })
}
// 获取执法记录仪分页数据
export const getPoliceCameraEquimentPage = (params) => {
    return request({
        url: `/deviceChannelPoliceCamera/deviceChannelPoliceCamera/page`,
        method: 'get',
        params: {
            ...params
        }
    })
}
src/views/home/components/rightContainer.vue
@@ -422,8 +422,15 @@
            const typeData = {
                carCount: '车辆',
                monitorCount: '摄像头',
                phoneCount: '执法记录仪',
                recorderCount: '手台',
                phoneCount: '手持记录仪'
            }
            const typeIndexData = {
                '车辆': 0,
                '摄像头': 1,
                '执法记录仪': 2,
                '手台': 3,
            }
            let data = []
@@ -437,7 +444,7 @@
                        this.regionTotal += item.count
                        return {
                            equimentType: item.type == '车辆' ? 0 : 1,
                            equimentType: typeIndexData[item.type],
                            name: item.type,
                            value: Number(item.count),
                            working: Number(item.online),
@@ -522,7 +529,7 @@
                    formatter: function (params) {
                        let tipHtml = ``
                        if ('carCount' in params.data || 'monitorCount' in params.data) {
                        if ('carCount' in params.data || 'monitorCount' in params.data || 'phoneCount' in params.data || 'recorderCount' in params.data) {
                            tipHtml = `
                            ${params.marker} 
                            <strong style="color: ${params.color}">${params.data.name} ${params.data.value}台</strong>
@@ -532,7 +539,12 @@
                            <span style="color:#5470c6">警车:${params.data.carCount}台</span>
                            <br />
                            <span style="margin-left:10px;color:#91cc75">摄像头:${params.data.monitorCount}台</span>
                            <br />
                            <span style="margin-left:10px;color:#91cc75">执法记录仪:${params.data.phoneCount}台</span>
                            <br />
                            <span style="margin-left:10px;color:#91cc75">手台:${params.data.recorderCount}台</span>
                            `
                        } else {
                            tipHtml = `${params.marker} 
                            <strong style="color: ${params.color}">${params.data.name} ${params.data.value}台</strong>
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-03-08 09:41:47
 * @LastEditTime: 2023-03-08 11:33:20
 * @FilePath: \srs-police-affairs\src\views\home\index.vue
 * @Description: 小区-栋-层-房屋
 *
@@ -499,6 +499,10 @@
import { getDevices } from '@/api/video/index.js'
import { getActAsPoliceList, getEquipmentPaging, getPoliceStationTree, getEquipmentAll, getLandDetail } from "@/api/home/index.js"
import { getTalkEquimentPage, getPoliceCameraEquimentPage } from '@/api/home/equiment.js'
export default {
    inject: ['userInfo'],
@@ -1575,11 +1579,20 @@
        async showequimentdetail (name, typeVale, type) {
            this.equimentTitle = name
            this.equimentCurrentSelect = {}
            switch (name) {
                case '执法记录仪':
                    console.log("red")
                    break
                case '手台':
                    console.log("yellow")
                    break
                default:
                    this.equimentCurrentSelect = {}
            this.equimentCurrentSelect[type] = typeVale
                    this.equimentCurrentSelect[type] = typeVale
            await this.getEquipmentPaging(this.equimentCurrentSelect)
                    await this.getEquipmentPaging(this.equimentCurrentSelect)
            }
            this.equimentVisible = true
        },
@@ -1643,6 +1656,18 @@
            })
        },
        getTalkEquimentPage (params) {
            getTalkEquimentPage(params).then(res => {
            })
        },
        getPoliceCameraEquimentPage (params) {
            getPoliceCameraEquimentPage(params).then(res => {
            })
        },
        // 设备分页查询
        handleCurrentChange: function (currentPage) {
            this.currentPage = currentPage