From 2ec95b3d2fd484b44d5274054bcbd78307a76ef8 Mon Sep 17 00:00:00 2001
From: mark <mark18340872469@163.com>
Date: 星期五, 30 九月 2022 14:04:12 +0800
Subject: [PATCH] 报警推送日志

---
 src/views/hashrate/CameraManage/CameraRules/index.vue |   19 +++++++++++++------
 1 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/src/views/hashrate/CameraManage/CameraRules/index.vue b/src/views/hashrate/CameraManage/CameraRules/index.vue
index eb97710..27ac04c 100644
--- a/src/views/hashrate/CameraManage/CameraRules/index.vue
+++ b/src/views/hashrate/CameraManage/CameraRules/index.vue
@@ -64,7 +64,7 @@
             :loading="Camera.loading"
             :canvasWidth="canvasWidth"
             :canvasHeight="canvasHeight"
-            :showProportion="1042 / canvasWidth"
+            :showProportion="960 / canvasWidth"
             @fromCanvas="getCanvasData"
             @changeLoading="changeLoading"
             @refresh="refresh"
@@ -241,6 +241,8 @@
 </template>
 
 <script>
+import { getAllTimeRule } from "@/api/timeRule"
+
 import { jsPlumb } from "jsplumb"
 
 import { savePolygon } from "@/api/polygon"
@@ -363,8 +365,8 @@
       cameraId: "",
       showSysInfo: true,
       showCanvas: true,
-      canvasWidth: 568,
-      canvasHeight: 320,
+      canvasWidth: 576,
+      canvasHeight: 324,
       stackId: "",
       swiperIndex: 0,
       stackFilesPage: 1,
@@ -489,10 +491,10 @@
       polyon.camera_id = this.Camera.cameraId
       savePolygon(polyon).then((rsp) => {
         if (rsp && rsp.success) {
-          if (rsp.data.indexOf("澶辫触") >= 0) {
+          if (rsp.data.msg.indexOf("澶辫触") >= 0) {
             this.$message({ type: "error", duration: 5000, message: rsp.data + " 鍖哄煙宸插叧鑱斿満鏅�, 鏃犳硶鍒犻櫎" })
           } else {
-            this.$message.success(rsp.data)
+            this.$message.success(rsp.data.msg)
           }
         }
         this.Camera.getPolygon()
@@ -529,7 +531,12 @@
     },
 
     // 鍒濆鍖栨憚鍍忔満淇℃伅锛岀埗缁勪欢璋冪敤
-    async initCameraData(id) {
+    async initCameraData(id, devId) {
+      this.$store.commit("setDevId", devId)
+      devId ? false : (devId = "")
+      getAllTimeRule(devId).then((rsp) => {
+        this.VideoManageData.TimeRules = rsp.data.timeRules
+      })
       if (!id) {
         return
       }

--
Gitblit v1.8.0