From 7f356bf22e4fe731e2b79ca3877e7c702eaf0704 Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期三, 03 四月 2024 14:25:17 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 src/views/system/recovery/index.vue |   78 ++++++++++++++++++++++++++------------
 1 files changed, 53 insertions(+), 25 deletions(-)

diff --git a/src/views/system/recovery/index.vue b/src/views/system/recovery/index.vue
index 9ec015a..29912d5 100644
--- a/src/views/system/recovery/index.vue
+++ b/src/views/system/recovery/index.vue
@@ -10,23 +10,23 @@
         <el-col :xl="14" :lg="14" :md="12" :sm="14" :xs="16">
           <div class="dashboard">
             <div class="dashboard-item">
-              <h3 style="color: #5C9BF8">{{ totalPosts }}</h3>
+              <h3 style="color: #5C9BF8">{{ count.totalPosts }}</h3>
               <p>璁惧鎬绘暟</p >
             </div>
             <div class="dashboard-item">
-              <h3 style="color: #3eba45">{{ totalMembers }}</h3>
+              <h3 style="color: #3eba45">{{ count.totalMembers }}</h3>
               <p>姝e父鏁�</p >
             </div>
             <div class="dashboard-item">
-              <h3 style="color: #fe640d">{{ postsPercentage }}</h3>
+              <h3 style="color: #fe640d">{{ count.postsPercentage }}</h3>
               <p>寮傚父鏁�</p >
             </div>
             <div class="dashboard-item">
-              <h3>{{ totalViews }}</h3>
+              <h3>{{ count.totalViews }}</h3>
               <p>鐢熸垚寮傚父宸ュ崟鏁�</p >
             </div>
             <div class="dashboard-item">
-              <h3>{{ viewsPercentage }}%</h3>
+              <h3>{{ count.viewsPercentage }}%</h3>
               <p>璁惧杩愯鐜�</p >
             </div>
           </div>
@@ -34,7 +34,7 @@
       </el-row>
     </el-card>
 
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
       <el-form-item label="鍏抽敭瀛�" prop="name">
         <el-input
           v-model="queryParams.name"
@@ -59,6 +59,17 @@
           <el-option label="瀵岄『鍘�" value="瀵岄『鍘�"/>
         </el-select>
       </el-form-item>
+      <el-form-item label="鐩戞帶绫诲瀷" prop="onState">
+        <el-select
+          v-model="queryParams.cameraFunType"
+          placeholder="璇烽�夋嫨鐩戞帶绫诲瀷"
+          clearable
+        >
+          <el-option label="瑙嗛鐩戞帶" value="1"/>
+          <el-option label="杞﹁締璇嗗埆" value="2"/>
+          <el-option label="浜哄憳璇嗗埆" value="3"/>
+        </el-select>
+      </el-form-item>
 
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鎼滅储</el-button>
@@ -76,33 +87,29 @@
           @click="handleExport"
         >瀵煎嚭</el-button>
       </el-col>
-      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
     </el-row>
 
     <el-table v-loading="loading" :data="monitorList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="璁惧鍚嶇О" align="center" prop="name" />
       <el-table-column label="璁惧缂栫爜" align="center" prop="serialNumber" width="180px" />
-      <el-table-column label="鏍囩" align="center" prop="tag" >
-        {{"鐪佸巺鑰冩牳"}}
-      </el-table-column>
-      <el-table-column label="鍖哄煙" align="center" prop="region" >
-        {{"澶у畨鍖�"}}
-      </el-table-column>
-      <el-table-column label="璁惧鐘舵��" align="center" prop="onState">
+      <el-table-column label="鏍囩" align="center" prop="publicSecurity" v-if="columns[0].visible" />
+      <el-table-column label="鍖哄煙" align="center" prop="address" 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>
       </el-table-column>
-      <el-table-column label="鏄惁鐢熸垚寮傚父宸ュ崟" align="center" prop="defaultOrder">
+      <el-table-column label="鏄惁鐢熸垚寮傚父宸ュ崟" align="center" prop="defaultOrder" v-if="columns[3].visible">
       <template slot-scope="scope">
         <dict-tag :options="dict.type.platform_yes_no" :value="scope.row.defaultOrder"/>
       </template>
       </el-table-column>
-      <el-table-column label="寮傚父鍘熷洜" align="center" prop="reason" />
-      <el-table-column label="寮傚父鎭㈠鏃堕棿" align="center" prop="recoveryTime" width="180">
+      <el-table-column label="寮傚父鍘熷洜" align="center" prop="reason" v-if="columns[4].visible" />
+      <el-table-column label="寮傚父鎭㈠鏃堕棿" align="center" prop="recoveryTime" width="180" v-if="columns[5].visible">
       </el-table-column>
-      <el-table-column label="绠$悊鍗曚綅" align="center" prop="managementUnit" />
+      <el-table-column label="绠$悊鍗曚綅" align="center" prop="managementUnit" v-if="columns[6].visible" />
       <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button
@@ -162,19 +169,31 @@
 </template>
 
 <script>
-import { listMonitor, getMonitor, delMonitor, addMonitor, updateMonitor } from "@/api/platform/monitor";
+import { recoveryException, listMonitor, getMonitor, delMonitor, addMonitor, updateMonitor } from "@/api/platform/monitor";
 
 export default {
   name: "Monitor",
   dicts: ['sys_normal_disable','platform_yes_no','camera_state'],
   data() {
     return {
-      totalPosts: 8896,
-      totalMembers: 8029,
-      postsPercentage: 382,
-      totalViews: 141,
-      viewsPercentage: 90.25,
-      totalErrors: 0,
+      // 鍒椾俊鎭�
+      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: true },
+        { key: 6, label: `绠$悊鍗曚綅`, visible: true },
+      ],
+      count: {
+        totalPosts: 0,
+        totalMembers: 0,
+        postsPercentage: 0,
+        totalViews: 0,
+        viewsPercentage: 0,
+        totalErrors: 0,
+      },
       // 閬僵灞�
       loading: true,
       // 閫変腑鏁扮粍
@@ -205,6 +224,7 @@
         managementUnit: null,
         defaultOrder: null,
         recovery: 1,
+        cameraFunType: null
       },
       // 琛ㄥ崟鍙傛暟
       form: {},
@@ -227,6 +247,7 @@
   },
   created() {
     this.getList();
+    this.getVideoCount();
   },
   methods: {
     /** 鏌ヨ璁惧璧勪骇鍒楄〃 */
@@ -236,6 +257,12 @@
         this.monitorList = response.rows;
         this.total = response.total;
         this.loading = false;
+      });
+    },
+    /** 鏌ヨ寮傚父鎭㈠璁惧缁熻鏁� */
+    getVideoCount() {
+      recoveryException().then(response => {
+        this.count = response.data;
       });
     },
     // 鍙栨秷鎸夐挳
@@ -266,6 +293,7 @@
       this.queryParams.pageNum = 1;
       this.queryParams.recovery = 1
       this.getList();
+      this.getVideoCount();
     },
     /** 閲嶇疆鎸夐挳鎿嶄綔 */
     resetQuery() {

--
Gitblit v1.8.0