From 79f0dbe2bc5588c617ddfd82ac027977c764f5fe Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期三, 15 一月 2025 16:29:21 +0800
Subject: [PATCH] 资产管理

---
 src/api/platform/data-center.js                  |   15 +++++
 src/views/system/data-manage/equipment/index.vue |  155 ++++++++++++++++++++++++++++-----------------------
 2 files changed, 100 insertions(+), 70 deletions(-)

diff --git a/src/api/platform/data-center.js b/src/api/platform/data-center.js
index 89dce92..43a95f8 100644
--- a/src/api/platform/data-center.js
+++ b/src/api/platform/data-center.js
@@ -9,3 +9,18 @@
   })
 }
 
+// 娓呯悊涓�鏈轰竴妗�
+export function clearMonitor() {
+  return request({
+    url: '/data/center/assetManagement/clear',
+    method: 'delete',
+  })
+}
+// 娓呯悊涓�鏈轰竴妗�
+export function assetManagementCount() {
+  return request({
+    url: '/data/center/assetManagement/count',
+    method: 'get',
+  })
+}
+
diff --git a/src/views/system/data-manage/equipment/index.vue b/src/views/system/data-manage/equipment/index.vue
index f2634d2..097f662 100644
--- a/src/views/system/data-manage/equipment/index.vue
+++ b/src/views/system/data-manage/equipment/index.vue
@@ -12,28 +12,29 @@
         <el-col :xl="14" :lg="14" :md="12" :sm="14" :xs="16">
           <div class="dashboard">
             <div class="dashboard-item">
-              <h3 style="color: #5C9BF8">{{ count.totalPosts }}</h3>
+              <h3 style="color: #5C9BF8">{{ count.total }}</h3>
               <p>璁惧鎬绘暟</p >
             </div>
+              <div class="dashboard-item">
+                <h3 style="color: #5C9BF8">{{ count.video }}</h3>
+                <p>瑙嗛璁惧鏁�</p >
+              </div>
             <div class="dashboard-item">
-              <h3 style="color: #5C9BF8">{{ count.totalPosts }}</h3>
-              <p>浜鸿劯璁惧鏁�</p >
-            </div>
-            <div class="dashboard-item">
-              <h3 style="color: #5C9BF8">{{ count.totalPosts }}</h3>
+              <h3 style="color: #5C9BF8">{{ count.car }}</h3>
               <p>杞﹁締璁惧鏁�</p >
             </div>
             <div class="dashboard-item">
-              <h3 style="color: #5C9BF8">{{ count.totalPosts }}</h3>
-              <p>瑙嗛璁惧鏁�</p >
+              <h3 style="color: #5C9BF8">{{ count.face }}</h3>
+              <p>浜鸿劯璁惧鏁�</p >
+            </div>
+
+            <div class="dashboard-item">
+              <h3 style="color: #3eba45">{{ count.examine }}</h3>
+              <p>鑰冩牳涓�</p >
             </div>
             <div class="dashboard-item">
-              <h3 style="color: #3eba45">{{ count.totalMembers }}</h3>
-              <p>姝e父鏁�</p >
-            </div>
-            <div class="dashboard-item">
-              <h3 style="color: #fe640d">{{ count.postsPercentage }}</h3>
-              <p>寮傚父鏁�</p >
+              <h3 style="color: #6f7583">{{ count.notExamine }}</h3>
+              <p>鏈�冩牳</p >
             </div>
           </div>
         </el-col>
@@ -49,37 +50,31 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="鍖哄煙" prop="onState">
+      <el-form-item label="鑰冩牳鐘舵��" prop="examineStatus">
         <el-select
-          v-model="queryParams.address"
-          placeholder="璇烽�夋嫨鍖哄煙"
+          v-model="queryParams.examineStatus"
+          placeholder="璇烽�夋嫨鐘舵��"
           clearable
         >
-          <el-option label="鑷础甯�" value="鑷础甯�"/>
-          <el-option label="娌挎哗鍖�" value="娌挎哗鍖�"/>
-          <el-option label="澶у畨鍖�" value="澶у畨鍖�"/>
-          <el-option label="璐′簳鍖�" value="璐′簳鍖�"/>
-          <el-option label="鑷祦浜曞尯" value="鑷祦浜曞尯"/>
-          <el-option label="楂樻柊鍖�" value="楂樻柊鍖�"/>
-          <el-option label="鑽e幙" value="鑽e幙"/>
-          <el-option label="瀵岄『鍘�" value="瀵岄『鍘�"/>
+          <el-option label="鑰冩牳涓�" :value="1"/>
+          <el-option label="鏈�冩牳" :value="0"/>
         </el-select>
       </el-form-item>
-      <el-form-item label="璁惧鐘舵��" prop="onState">
-        <el-select
-          v-model="queryParams.onState"
-          placeholder="璁惧鐘舵��"
-          clearable
-          style="width: 100px"
-        >
-        <el-option
-          v-for="dict in dict.type.camera_state"
-          :key="dict.value"
-          :label="dict.label"
-          :value="dict.value"
-        />
-        </el-select>
-      </el-form-item>
+<!--      <el-form-item label="璁惧鐘舵��" prop="onState">-->
+<!--        <el-select-->
+<!--          v-model="queryParams.onState"-->
+<!--          placeholder="璁惧鐘舵��"-->
+<!--          clearable-->
+<!--          style="width: 100px"-->
+<!--        >-->
+<!--        <el-option-->
+<!--          v-for="dict in dict.type.camera_state"-->
+<!--          :key="dict.value"-->
+<!--          :label="dict.label"-->
+<!--          :value="dict.value"-->
+<!--        />-->
+<!--        </el-select>-->
+<!--      </el-form-item>-->
 
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">鎼滅储</el-button>
@@ -88,14 +83,23 @@
     </el-form>
 
     <el-row :gutter="10" class="mb8">
+<!--      <el-col :span="1.5">-->
+<!--        <el-button-->
+<!--          type="warning"-->
+<!--          plain-->
+<!--          icon="el-icon-download"-->
+<!--          size="mini"-->
+<!--          @click="handleExport"-->
+<!--        >瀵煎嚭</el-button>-->
+<!--      </el-col>-->
       <el-col :span="1.5">
         <el-button
-          type="warning"
+          type="danger"
           plain
-          icon="el-icon-download"
+          icon="el-icon-delete"
           size="mini"
-          @click="handleExport"
-        >瀵煎嚭</el-button>
+          @click="clearMonitor"
+        >娓呯悊涓�鏈轰竴妗�</el-button>
       </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
     </el-row>
@@ -104,20 +108,22 @@
       <el-table-column type="selection" align="center" />
       <el-table-column label="璁惧鍚嶇О" align="center" prop="name" width="280" fixed/>
       <el-table-column label="璁惧缂栫爜" align="center" prop="serialNumber" width="180"/>
-      <el-table-column label="鏍囩" align="center" prop="publicSecurity" width="180" v-if="columns[0].visible"/>
+<!--      <el-table-column label="鏍囩" align="center" prop="publicSecurity" width="180" v-if="columns[0].visible"/>-->
       <el-table-column label="鍖哄煙" align="center" prop="cameraCaptureArea" width="180" v-if="columns[1].visible"/>
-      <el-table-column label="璁惧鐘舵��" align="center" prop="onState" v-if="columns[2].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"/>
+<!--          <dict-tag :options="dict.type.camera_state" :value="scope.row.onState"/>-->
+          <div v-if="scope.row.onState ==1">鑰冩牳涓�</div>
+          <div v-else-if="scope.row.onState ==0" >鏈�冩牳</div>
         </template>
       </el-table-column>
       <el-table-column label="鏁版嵁鏃堕棿" align="center" prop="installedTime" width="180" v-if="columns[3].visible"/>
       <el-table-column label="绠$悊鍗曚綅" align="center" prop="managementUnit" width="180" v-if="columns[4].visible"/>
-      <el-table-column v-for="(column, index) in dynamicColumnList" :key="index" :label="column.labelValue" :prop="column.propName" align="center">
-        <template slot-scope="scope">
-          {{ getDynamicValue(scope.row, column.propName) }}
-        </template>
-      </el-table-column>
+<!--      <el-table-column v-for="(column, index) in dynamicColumnList" :key="index" :label="column.labelValue" :prop="column.propName" align="center">-->
+<!--        <template slot-scope="scope">-->
+<!--          {{ getDynamicValue(scope.row, column.propName) }}-->
+<!--        </template>-->
+<!--      </el-table-column>-->
       <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width"  fixed="right">
           <template slot-scope="scope">
             <el-button
@@ -145,22 +151,22 @@
           <el-col :span="12">
             <el-form-item label="璁惧缂栫爜锛�">{{ form.serialNumber }}</el-form-item>
             <el-form-item label="璁惧鍚嶇О锛�">{{ form.name }} </el-form-item>
-            <el-form-item label="鍦板尯锛�">{{ form.address }} </el-form-item>
-            <el-form-item label="涓婃姤閮ㄩ棬锛�">{{ form.deptName }} </el-form-item>
-            <el-form-item label="璁惧鐘舵�侊細">
-              <div v-if="form.onState === 1">鍙敤</div>
-              <div v-else-if="form.onState === 2">涓嶅彲鐢�</div>
+            <el-form-item label="鍦板尯锛�">{{ form.cameraCaptureArea }} </el-form-item>
+            <el-form-item label="绠$悊鍗曚綅锛�">{{ form.managementUnit }} </el-form-item>
+            <el-form-item label="鑰冩牳鐘舵�侊細">
+              <div v-if="form.onState == 1">鑰冩牳涓�</div>
+              <div v-else-if="form.onState == 0">鏈�冩牳</div>
             </el-form-item>
           </el-col>
+<!--          <el-col :span="24">-->
+<!--            <el-form-item label="鍦板潃锛�">{{ form.address }}</el-form-item>-->
+<!--          </el-col>-->
           <el-col :span="24">
-            <el-form-item label="鍦板潃锛�">{{ form.address }}</el-form-item>
+            <el-form-item label="鏁版嵁鏃堕棿锛�">{{ form.installedTime }}</el-form-item>
           </el-col>
-          <el-col :span="24">
-            <el-form-item label="瀹夎鏃堕棿锛�">{{ form.installedTime }}</el-form-item>
-          </el-col>
-          <el-col :span="24">
-            <el-form-item label="绠$悊鍗曚綅锛�">{{ form.managementUnit }}</el-form-item>
-          </el-col>
+<!--          <el-col :span="24">-->
+<!--            <el-form-item label="绠$悊鍗曚綅锛�">{{ form.managementUnit }}</el-form-item>-->
+<!--          </el-col>-->
         </el-row>
       </el-form>
       <div slot="footer" class="dialog-footer">
@@ -173,7 +179,7 @@
 <script>
 import { videoCount, listMonitor, getMonitor, delMonitor, addMonitor, updateMonitor } from "@/api/platform/monitor";
 import { getDynamicColumnList } from '@/api/platform/dynamicColumn'
-import { dataCenter } from "@/api/platform/data-center";
+import { dataCenter,clearMonitor,assetManagementCount } from "@/api/platform/data-center";
 export default {
   name: "Monitor",
   dicts: ['sys_normal_disable', 'platform_yes_no','camera_state'],
@@ -248,10 +254,20 @@
     };
   },
   created() {
-    this.getVideoCount();
+    this.getCount();
     this.getList();
   },
   methods: {
+    //娓呯悊涓�鏈轰竴妗�
+    clearMonitor() {
+      this.$modal.confirm('鏄惁纭娓呯悊涓�鏈轰竴妗�?').then(function() {
+        return clearMonitor();
+      }).then(() => {
+        this.getList()
+        this.getCount();
+        this.$modal.msgSuccess("娓呯悊鎴愬姛");
+      }).catch(() => {});
+    },
     getDyColumn() {
       // 鏌ヨ鍔ㄦ�佸垪
       let params = {
@@ -276,8 +292,8 @@
       });
     },
      /** 鏌ヨ璁惧璧勪骇缁熻鏁� */
-     getVideoCount() {
-      videoCount('1').then(response => {
+     getCount() {
+       assetManagementCount().then(response => {
         this.count = response.data;
       });
     },
@@ -303,9 +319,8 @@
     /** 鎼滅储鎸夐挳鎿嶄綔 */
     handleQuery() {
       this.queryParams.pageNum = 1;
-      this.queryParams.cameraFunType = 1;
       this.getList();
-      this.getVideoCount();
+      this.getCount();
     },
     /** 閲嶇疆鎸夐挳鎿嶄綔 */
     resetQuery() {

--
Gitblit v1.8.0