From b94da8f63e4e614d62d88fedad79db4b3952db20 Mon Sep 17 00:00:00 2001
From: sd <shidong@jhsoft.cc>
Date: 星期四, 31 七月 2025 10:03:31 +0800
Subject: [PATCH] 检测内容、预警规则整合进系统设置里边; 预警规则增加图标; 摄像机配置样式调整、预警规则更名为任务描述并调整数据结构; 实时监控右侧样式调整,预警数据按所有任务进行筛选。

---
 src/pages/cameraAccess/components/SeparateRules.vue |  121 +++++++++++++++++++++------------------
 1 files changed, 65 insertions(+), 56 deletions(-)

diff --git a/src/pages/cameraAccess/components/SeparateRules.vue b/src/pages/cameraAccess/components/SeparateRules.vue
index 2aeadb4..53c89bd 100644
--- a/src/pages/cameraAccess/components/SeparateRules.vue
+++ b/src/pages/cameraAccess/components/SeparateRules.vue
@@ -13,11 +13,16 @@
 
           <div v-if="Camera.analytics && isShowPolling === 'show'" class="flex-box" v-show="cameraType === 'camera'">
             <span class="label">澶勭悊鏂瑰紡</span>
-            <toggle-button :value="Camera.dealWay" :width="60" :labels="{ checked: '瀹炴椂', unchecked: '杞' }" :color="{
+            <toggle-button  :width="60" :labels="{ checked: '瀹炴椂', unchecked: '瀹炴椂' }" :color="{
+              checked: '#3D68E1',
+              unchecked: '#3D68E1',
+              disabled: '#CCCCCC'
+            }" :sync="true"/>
+            <!-- <toggle-button :value="Camera.dealWay" :width="60" :labels="{ checked: '瀹炴椂', unchecked: '杞' }" :color="{
               checked: '#3D68E1',
               unchecked: '#FF7733',
               disabled: '#CCCCCC'
-            }" :sync="true" @change="changePoll" />
+            }" :sync="true" @change="changePoll" /> -->
           </div>
           <div v-if="Camera.analytics" class="flex-box" v-show="cameraType === 'camera'">
             <span class="label">澶勭悊鐘舵��: {{ camStatus }}</span>
@@ -35,7 +40,7 @@
             <span class="label">SmartAI鑺傜偣: {{ Camera.runServerName }}</span>
           </div>
 
-          <div v-if="Camera.analytics" class="flex-box">
+          <!-- <div v-if="Camera.analytics" class="flex-box">
             <span class="label">绠楁硶蹇�熼�氶亾</span>
             <div class="channel flex-box">
               <el-tooltip effect="dark" content="澶嶅埗姝ゆ憚鍍忔満绠楁硶瑙勫垯" placement="bottom" popper-class="atooltip">
@@ -50,7 +55,7 @@
                   " @click="ctrlV" class="iconfont iconniantie ml5"></span>
               </el-tooltip>
             </div>
-          </div>
+          </div> -->
         </div>
       </div>
     </div>
@@ -59,7 +64,7 @@
 
     <div class="top">
       <p class="task-css">
-        <b style="font-size: 14px; line-height: 18px">鐫f煡浠诲姟</b>
+        <b style="font-size: 14px; line-height: 18px">AI浠诲姟</b>
       </p>
       <div class="clearfix">
         <slide-scene :sceneData="Camera.rules"></slide-scene>
@@ -370,6 +375,7 @@
     },
     refresh(url) {
       this.Camera.baseImg = url
+      // console.info("url="+url)
     },
     // 鍒濆鍖栨憚鍍忔満淇℃伅锛岀埗缁勪欢璋冪敤
     async initCameraData(id, type) {
@@ -453,21 +459,24 @@
         this.Camera.dealWay = false
         val = -1
       }
+      console.info("isOpen:"+this.Camera.analytics?1:0)
       if (this.Camera.cameraId && this.Camera.cameraId !== undefined) {
         changeRunTypeTwo({
           videoId: this.Camera.cameraId,
-          isOpen: val===1?1:0
+          // isOpen: val
+          isOpen: this.Camera.analytics?1:0
         }).then((rsp) => {
           this.getStatus()
-          if (rsp && rsp.success) {
+          if (rsp && rsp.status === 200) {
             this.$notify({
               type: "success",
               message: "閰嶇疆鎴愬姛"
             })
           } else {
+            this.Camera.analytics = !this.Camera.analytics
             this.$notify({
               type: "error",
-              message: "閰嶇疆澶辫触"
+              message: rsp.msg
             })
           }
           this.TreeDataPool.fetchTreeData()
@@ -497,54 +506,54 @@
     //瀹炴椂銆佽疆璇㈠垏鎹�
     changePoll(row) {
       //鍒ゆ柇鏄柊澧炶繕鏄洿鏂�
-      if (this.Camera.cameraId && this.Camera.cameraId !== undefined) {
-        if (this.PollData.RealTimeSum < this.PollData.channelTotal) {
-          if (row.value) {
-            this.Camera.dealWay = true
-          } else {
-            this.Camera.dealWay = false
-          }
-          changeRunType({
-            camera_ids: [this.Camera.cameraId],
-            run_type: this.Camera.dealWay ? 1 : 0,
-            isGb: this.Camera.gb28181
-          }).then((rsp) => {
-            if (rsp && rsp.success) {
-              this.$notify({
-                type: "success",
-                message: "閰嶇疆鎴愬姛"
-              })
-            } else {
-              this.$notify({
-                type: "error",
-                message: "閰嶇疆澶辫触"
-              })
-            }
-          })
-        } else {
-          if (this.Camera.dealWay) {
-            this.Camera.dealWay = false
-            changeRunType({
-              camera_ids: [this.Camera.cameraId],
-              run_type: this.Camera.dealWay ? 1 : 0
-            }).then((rsp) => {
-              if (rsp && rsp.success) {
-                this.$notify({
-                  type: "success",
-                  message: "閰嶇疆鎴愬姛"
-                })
-              } else {
-                this.$notify({
-                  type: "error",
-                  message: "閰嶇疆澶辫触"
-                })
-              }
-            })
-          }
-        }
-        this.TreeDataPool.fetchTreeData()
-        this.PollData.statisticTaskInfo()
-      }
+      // if (this.Camera.cameraId && this.Camera.cameraId !== undefined) {
+      //   if (this.PollData.RealTimeSum < this.PollData.channelTotal) {
+      //     if (row.value) {
+      //       this.Camera.dealWay = true
+      //     } else {
+      //       this.Camera.dealWay = false
+      //     }
+      //     changeRunType({
+      //       camera_ids: [this.Camera.cameraId],
+      //       run_type: this.Camera.dealWay ? 1 : 0,
+      //       isGb: this.Camera.gb28181
+      //     }).then((rsp) => {
+      //       if (rsp && rsp.success) {
+      //         this.$notify({
+      //           type: "success",
+      //           message: "閰嶇疆鎴愬姛"
+      //         })
+      //       } else {
+      //         this.$notify({
+      //           type: "error",
+      //           message: "閰嶇疆澶辫触"
+      //         })
+      //       }
+      //     })
+      //   } else {
+      //     if (this.Camera.dealWay) {
+      //       this.Camera.dealWay = false
+      //       changeRunType({
+      //         camera_ids: [this.Camera.cameraId],
+      //         run_type: this.Camera.dealWay ? 1 : 0
+      //       }).then((rsp) => {
+      //         if (rsp && rsp.success) {
+      //           this.$notify({
+      //             type: "success",
+      //             message: "閰嶇疆鎴愬姛"
+      //           })
+      //         } else {
+      //           this.$notify({
+      //             type: "error",
+      //             message: "閰嶇疆澶辫触"
+      //           })
+      //         }
+      //       })
+      //     }
+      //   }
+      //   this.TreeDataPool.fetchTreeData()
+      //   this.PollData.statisticTaskInfo()
+      // }
     },
     //澶嶅埗
     ctrlC() {

--
Gitblit v1.8.0