From c7ec9e17f6e48335912bad1c07df56ba8eb8f662 Mon Sep 17 00:00:00 2001
From: heyujie <516346543@qq.com>
Date: 星期四, 05 五月 2022 13:35:21 +0800
Subject: [PATCH] page subuser

---
 src/views/hashrate/CameraManage/CameraRules/components/CameraBox.vue |   19 ++++++++++++-------
 1 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/src/views/hashrate/CameraManage/CameraRules/components/CameraBox.vue b/src/views/hashrate/CameraManage/CameraRules/components/CameraBox.vue
index 6420fe4..1247b70 100644
--- a/src/views/hashrate/CameraManage/CameraRules/components/CameraBox.vue
+++ b/src/views/hashrate/CameraManage/CameraRules/components/CameraBox.vue
@@ -15,18 +15,18 @@
       </div>
 
       <div class="body">
-        <div class="row">
+        <div class="row" v-if="camera.analytics">
           <div class="label">澶勭悊鏂瑰紡:</div>
           <div
             class="button pollingBtn"
-            :class="{ active: camera.analytics && !camera.dealWay }"
+            :class="{ active: !camera.dealWay }"
             @click="changePoll(false)"
           >
             杞
           </div>
           <div
             class="button realtimeBtn"
-            :class="{ active: camera.analytics && camera.dealWay }"
+            :class="{ active: camera.dealWay }"
             @click="changePoll(true)"
           >
             瀹炴椂
@@ -36,10 +36,12 @@
           <div class="label">鍒嗚鲸鐜�:</div>
           <div class="data">
             {{
-              camera.camearInfo.resolution_width == 0 ||
-              camera.camearInfo.resolution_height == 0
+              camera.camearInfo.resolutionWidth == 0 ||
+              camera.camearInfo.resolutionHeight == 0 ||
+              !camera.camearInfo.resolutionHeight ||
+              !camera.camearInfo.resolutionWidth
                 ? "鏈満鍒嗚鲸鐜�"
-                : `${camera.camearInfo.resolution_width} * ${camera.camearInfo.resolution_height}`
+                : `${camera.camearInfo.resolutionWidth} * ${camera.camearInfo.resolutionHeight}`
             }}
           </div>
         </div>
@@ -108,6 +110,10 @@
 
     //瀹炴椂銆佽疆璇㈠垏鎹�
     changePoll(row) {
+      if (!this.camera.analytics) {
+        return;
+      }
+
       //鍒ゆ柇鏄柊澧炶繕鏄洿鏂�
       if (this.camera.cameraId && this.camera.cameraId !== undefined) {
         if (this.PollData.RealTimeSum < this.PollData.channelTotal) {
@@ -116,7 +122,6 @@
           } else {
             this.camera.dealWay = false;
           }
-          debugger;
           changeRunType({
             camera_ids: [this.camera.cameraId],
             run_type: this.camera.dealWay ? 1 : 0,

--
Gitblit v1.8.0