From 01b516a3c3304c966d413b768d2e3078bf83b61c Mon Sep 17 00:00:00 2001 From: ZZJ <10913410+zzj2100@user.noreply.gitee.com> Date: 星期三, 22 六月 2022 13:38:20 +0800 Subject: [PATCH] 联动场景传参 --- 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