From a34292254a49fbe57d4637304c39ab98ab88a610 Mon Sep 17 00:00:00 2001
From: zxl <763096477@qq.com>
Date: 星期三, 29 十月 2025 17:08:10 +0800
Subject: [PATCH] 大屏修改,录像核查修改,查询视频设备修改
---
src/views/system/monitor/car/index.vue | 166 ++++++++++++++++++++++++++++++++++---------------------
1 files changed, 103 insertions(+), 63 deletions(-)
diff --git a/src/views/system/monitor/car/index.vue b/src/views/system/monitor/car/index.vue
index 09caedc..a10c2e7 100644
--- a/src/views/system/monitor/car/index.vue
+++ b/src/views/system/monitor/car/index.vue
@@ -1,16 +1,19 @@
<template>
<div class="app-container">
<div
- style="display: flex;flex-direction: row;min-width: 158px;max-width: 158px;margin-bottom: 5px;border-radius: 1px; user-select: none"
+ style="display: flex;flex-direction: row;min-width: 300px;max-width: 300px;margin-bottom: 5px;border-radius: 1px; user-select: none"
>
<div @click="clickTab(null)" class="tab"
- :class="{tabActive: null == queryParams.provinceTag, tabInactive: null != queryParams.provinceTag}">鍏ㄩ儴
+ :class="{tabActive: !queryParams.provinceTag && !queryParams.deptTag, tabInactive: queryParams.provinceTag || queryParams.deptTag}">鍏ㄩ儴
</div>
<div @click="clickTab(0)" class="tab"
- :class="{tabActive: 0 === queryParams.provinceTag, tabInactive: 0 !== queryParams.provinceTag}">鐪佸巺鑰冩牳
+ :class="{tabActive: queryParams.provinceTag, tabInactive: !queryParams.provinceTag}">鐪佸巺鑰冩牳
+ </div>
+ <div @click="clickTab(1)" class="tab"
+ :class="{tabActive: queryParams.deptTag, tabInactive: !queryParams.deptTag}">鍏畨閮ㄨ�冩牳
</div>
</div>
- <el-card class="box-card" >
+ <el-card class="box-card">
<el-row type="flex" align="middle" justify="space-between">
<el-col :span="4">
<div class="icon-container" style="background-color: #1890FF">
@@ -21,19 +24,23 @@
<div class="dashboard">
<div class="dashboard-item">
<h3 style="color: #5C9BF8">{{ count.totalPosts }}</h3>
- <p>璁惧鎬绘暟</p >
+ <p>璁惧鎬绘暟</p>
</div>
<div class="dashboard-item">
<h3 style="color: #3eba45">{{ count.totalMembers }}</h3>
- <p>姝e父鏁�</p >
+ <p>姝e父鏁�</p>
</div>
<div class="dashboard-item">
<h3 style="color: #fe640d">{{ count.postsPercentage }}</h3>
- <p>寮傚父鏁�</p >
+ <p>寮傚父鏁�</p>
+ </div>
+ <div class="dashboard-item">
+ <h3 style="color: #4f4f4f">{{ count.unknownNumbers }}</h3>
+ <p>鏈煡鏁�</p>
</div>
<div class="dashboard-item">
<h3>{{ count.viewsPercentage }}%</h3>
- <p>璁惧杩愯鐜�</p >
+ <p>璁惧杩愯鐜�</p>
</div>
</div>
</el-col>
@@ -44,9 +51,10 @@
<el-form-item label="鍏抽敭瀛�" prop="name">
<el-input
v-model="queryParams.name"
- placeholder="璇疯緭鍏ュ叧閿瓧"
+ placeholder="璁惧鍚�/璁惧缂栫爜/IP/鍗曚綅鍚�"
clearable
@keyup.enter.native="handleQuery"
+ @clear="handleQuery"
/>
</el-form-item>
<el-form-item label="鍖哄煙" prop="onState">
@@ -56,7 +64,7 @@
clearable
@change="handleQuery"
>
- <el-option
+ <el-option
v-for="dept in deptList"
:key="dept.deptId"
:label="dept.area"
@@ -69,14 +77,15 @@
v-model="queryParams.onState"
placeholder="璁惧鐘舵��"
clearable
+ @change="handleQuery"
style="width: 100px"
>
- <el-option
- v-for="dict in dict.type.camera_state"
- :key="dict.value"
- :label="dict.label"
- :value="dict.value"
- />
+ <el-option
+ v-for="dict in dict.type.camera_state"
+ :key="dict.value"
+ :label="dict.label"
+ :value="dict.value"
+ />
</el-select>
</el-form-item>
@@ -87,22 +96,32 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-form>
+ <div v-hasPermi="['system:monitor:export']">
+ <el-button slot="reference" type="primary" size="mini" @click="handleExport" plain >瀵煎嚭</el-button>
+ </div>
+
<el-table v-loading="loading" :data="monitorList" @selection-change="handleSelectionChange">
<el-table-column label="璁惧鍚嶇О" align="center" prop="name" width="280" fixed show-overflow-tooltip/>
<el-table-column label="璁惧缂栫爜" align="center" prop="serialNumber" width="180"/>
<el-table-column label="ip" align="center" prop="ip" width="180"/>
<el-table-column label="鏍囩" align="center" width="180" v-if="columns[0].visible">
<template slot-scope="scope">
- <div>{{ scope.row.provinceTag == 0 ? "鐪佸巺" : "甯傚眬" }}</div>
+ <div>
+ {{
+ (
+ (scope.row.provinceTagCar ? '鐪佸巺銆�' : '') +
+ (scope.row.deptTag ? '鍏畨閮ㄣ��' : '')).replace(/銆�$/, '')
+ }}
+ </div>
</template>
</el-table-column>
- <el-table-column label="鍖哄煙" align="center" prop="area" width="180" v-if="columns[1].visible" />
+ <el-table-column label="鍖哄煙" align="center" prop="area" width="180" v-if="columns[1].visible"/>
<el-table-column label="璁惧鐘舵��" align="center" prop="onState" v-if="columns[2].visible">
- <template slot-scope="scope">
- <dict-tag :options="dict.type.camera_state" :value="scope.row.onState"/>
- </template>
+ <template slot-scope="scope">
+ <dict-tag :options="dict.type.camera_state" :value="scope.row.onState"/>
+ </template>
</el-table-column>
- <el-table-column label="鏄惁鐢熸垚寮傚父宸ュ崟" align="center" prop="error" width="180" v-if="columns[3].visible" />
+ <el-table-column label="鏄惁鐢熸垚寮傚父宸ュ崟" align="center" prop="error" width="180" v-if="columns[3].visible"/>
<el-table-column label="绠$悊鍗曚綅" align="center" prop="unitName" width="180" v-if="columns[4].visible"/>
<el-table-column label="鏁版嵁鏃堕棿" align="center" prop="mongoCreateTime" width="180" v-if="columns[5].visible"/>
<el-table-column label="涓�鏈轰竴妗g姸鎬�" align="center" prop="monitorQualify" width="180" v-if="columns[6].visible">
@@ -125,19 +144,21 @@
<el-table-column label="褰撴棩鎶撴媿閲�" align="center" prop="snapCount" width="180" v-if="columns[9].visible"/>
<el-table-column label="鏃堕挓鍑嗙‘鐜�" align="center" prop="clockPercent" width="180" v-if="columns[10].visible"/>
<el-table-column label="涓婁紶鍙婃椂鐜�" align="center" prop="uploadPercent" width="180" v-if="columns[11].visible"/>
- <el-table-column label="涓昏灞炴�т竴鑷寸巼" align="center" prop="importantConPercent" width="180" v-if="columns[12].visible"/>
+ <el-table-column label="涓昏灞炴�т竴鑷寸巼" align="center" prop="importantConPercent" width="180"
+ v-if="columns[12].visible"/>
<el-table-column label="鍏ㄩ噺灞炴�т竴鑷寸巼" align="center" prop="majorConPercent" width="180" v-if="columns[13].visible"/>
<el-table-column label="澶у浘鍙敤鐜�" align="center" prop="bigUsefulPercent" width="180" v-if="columns[14].visible"/>
<el-table-column label="url鍙敤鐜�" align="center" prop="urlPercent" width="180" v-if="columns[15].visible"/>
- <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width" fixed="right">
- <template slot-scope="scope">
- <el-button
- size="mini"
- type="text"
- icon="el-icon-view"
- @click="handleView(scope.row,scope.index)"
- >璇︾粏</el-button>
- </template>
+ <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width" fixed="right">
+ <template slot-scope="scope">
+ <el-button
+ size="mini"
+ type="text"
+ icon="el-icon-view"
+ @click="handleView(scope.row,scope.index)"
+ >璇︾粏
+ </el-button>
+ </template>
</el-table-column>
</el-table>
@@ -156,10 +177,16 @@
<el-form-item label="璁惧鍚嶇О锛�">{{ form.name }}</el-form-item>
<el-col :span="12">
<el-form-item label="璁惧缂栫爜锛�">{{ form.serialNumber }}</el-form-item>
- <el-form-item label="鏍囩锛�">{{ form.provinceTag == 0 ? '鐪佸巺' : '甯傚眬' }}</el-form-item>
+ <el-form-item label="鏍囩锛�">
+ {{
+ ((form.provinceTagCar ? '鐪佸巺銆�' : '') +
+ (form.deptTag ? '鍏畨閮ㄣ��' : '')).replace(/銆�$/, '')
+ }}
+ </el-form-item>
<el-form-item label="璁惧鐘舵�侊細">
- <div v-if="form.onState === 0">绂荤嚎</div>
+ <div v-if="form.onState === 0">鏈煡</div>
<div v-else-if="form.onState === 1">鍦ㄧ嚎</div>
+ <div v-else-if="form.onState === -1">绂荤嚎</div>
</el-form-item>
<el-form-item label="绠$悊鍗曚綅锛�">{{ form.unitName }}</el-form-item>
</el-col>
@@ -216,37 +243,39 @@
</template>
<script>
-import { videoCount, listMonitor, getMonitor, delMonitor, addMonitor, updateMonitor } from "@/api/platform/monitor";
-import { listDept } from "@/api/system/dept";
+import {videoCount, listMonitor, getMonitor, delMonitor, addMonitor, updateMonitor} from "@/api/platform/monitor";
+import {listDept} from "@/api/system/dept";
+
export default {
name: "Monitor",
- dicts: ['sys_normal_disable','platform_yes_no','camera_state'],
+ dicts: ['sys_normal_disable', 'platform_yes_no', 'camera_state'],
data() {
return {
deptList: [],
// 鍒椾俊鎭�
columns: [
- { key: 0, label: `鏍囩`, visible: true },
- { key: 1, label: `鍖哄煙`, visible: true },
- { key: 2, label: `璁惧鐘舵�乣, visible: true },
- { key: 3, label: `鏄惁鐢熸垚寮傚父宸ュ崟`, visible: true },
- { key: 4, label: `绠$悊鍗曚綅`, visible: true },
- { key: 5, label: `鏁版嵁鏃堕棿`, visible: false },
- { key: 6, label: `涓�鏈轰竴妗g姸鎬乣, visible: false },
- { key: 7, label: `鏄惁涓烘湭娉ㄥ唽璁惧`, visible: false },
- { key: 8, label: `鎶撴媿鏁版嵁閲忕洃娴媊, visible: false },
- { key: 9, label: `褰撴棩鎶撴媿閲廯, visible: false },
- { key: 10, label: `鏃堕挓鍑嗙‘鐜嘸, visible: false },
- { key: 11, label: `涓婁紶鍙婃椂鐜嘸, visible: false },
- { key: 12, label: `涓昏灞炴�т竴鑷寸巼`, visible: false },
- { key: 13, label: `鍏ㄩ噺灞炴�т竴鑷寸巼`, visible: false },
- { key: 14, label: `鍥剧墖璁块棶寮傚父閲廯, visible: false },
- { key: 15, label: `澶у浘涓嶅彲鐢ㄩ噺`, visible: false }
+ {key: 0, label: `鏍囩`, visible: true},
+ {key: 1, label: `鍖哄煙`, visible: true},
+ {key: 2, label: `璁惧鐘舵�乣, visible: true},
+ {key: 3, label: `鏄惁鐢熸垚寮傚父宸ュ崟`, visible: true},
+ {key: 4, label: `绠$悊鍗曚綅`, visible: true},
+ {key: 5, label: `鏁版嵁鏃堕棿`, visible: false},
+ {key: 6, label: `涓�鏈轰竴妗g姸鎬乣, visible: false},
+ {key: 7, label: `鏄惁涓烘湭娉ㄥ唽璁惧`, visible: false},
+ {key: 8, label: `鎶撴媿鏁版嵁閲忕洃娴媊, visible: false},
+ {key: 9, label: `褰撴棩鎶撴媿閲廯, visible: false},
+ {key: 10, label: `鏃堕挓鍑嗙‘鐜嘸, visible: false},
+ {key: 11, label: `涓婁紶鍙婃椂鐜嘸, visible: false},
+ {key: 12, label: `涓昏灞炴�т竴鑷寸巼`, visible: false},
+ {key: 13, label: `鍏ㄩ噺灞炴�т竴鑷寸巼`, visible: false},
+ {key: 14, label: `鍥剧墖璁块棶寮傚父閲廯, visible: false},
+ {key: 15, label: `澶у浘涓嶅彲鐢ㄩ噺`, visible: false}
],
count: {
totalPosts: 0,
totalMembers: 0,
postsPercentage: 0,
+ unknownNumbers: 0,
totalViews: 0,
viewsPercentage: 0,
totalCar: 0,
@@ -287,16 +316,16 @@
// 琛ㄥ崟鏍¢獙
rules: {
serialNumber: [
- { required: true, message: "璁惧缂栫爜涓嶈兘涓虹┖", trigger: "blur" }
+ {required: true, message: "璁惧缂栫爜涓嶈兘涓虹┖", trigger: "blur"}
],
name: [
- { required: true, message: "璁惧鍚嶇О涓嶈兘涓虹┖", trigger: "blur" }
+ {required: true, message: "璁惧鍚嶇О涓嶈兘涓虹┖", trigger: "blur"}
],
onState: [
- { required: true, message: "璁惧鐘舵��", trigger: "blur" }
+ {required: true, message: "璁惧鐘舵��", trigger: "blur"}
],
address: [
- { required: true, message: "鍦板潃涓嶈兘涓虹┖", trigger: "blur" }
+ {required: true, message: "鍦板潃涓嶈兘涓虹┖", trigger: "blur"}
],
}
};
@@ -304,13 +333,22 @@
created() {
this.getVideoCount();
this.getList();
- listDept({ status: 0 }).then(response => {
+ listDept({status: 0}).then(response => {
this.deptList = response.data.filter(item => item.area);
});
},
methods: {
clickTab(active) {
- this.queryParams.provinceTag = active
+ if (active === 0) {
+ this.queryParams.provinceTag = true
+ this.queryParams.deptTag =null
+ } else if (active === 1) {
+ this.queryParams.provinceTag = null
+ this.queryParams.deptTag = true
+ }else {
+ this.queryParams.provinceTag = null
+ this.queryParams.deptTag = null
+ }
this.getList()
this.getVideoCount()
},
@@ -368,7 +406,7 @@
// 澶氶�夋閫変腑鏁版嵁
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
- this.single = selection.length!==1
+ this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 鏂板鎸夐挳鎿嶄綔 */
@@ -410,12 +448,13 @@
/** 鍒犻櫎鎸夐挳鎿嶄綔 */
handleDelete(row) {
const ids = row.id || this.ids;
- this.$modal.confirm('鏄惁纭鍒犻櫎璁惧璧勪骇缂栧彿涓�"' + ids + '"鐨勬暟鎹」锛�').then(function() {
+ this.$modal.confirm('鏄惁纭鍒犻櫎璁惧璧勪骇缂栧彿涓�"' + ids + '"鐨勬暟鎹」锛�').then(function () {
return delMonitor(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
- }).catch(() => {});
+ }).catch(() => {
+ });
},
/** 瀵煎嚭鎸夐挳鎿嶄綔 */
handleExport() {
@@ -454,13 +493,13 @@
}
-
.box-card {
background-color: #ffffff;
width: 100%;
margin-bottom: 20px;
height: 120px
}
+
.icon-container {
display: flex;
justify-content: center;
@@ -470,6 +509,7 @@
height: 80px;
margin-left: 5%;
}
+
.el-icon-truck {
font-size: 50px;
color: #FFFFFF;
--
Gitblit v1.8.0