From 4a800a8fc83c6bd1f86a8e847b079a51a7532c09 Mon Sep 17 00:00:00 2001 From: zhangzengfei <zhangzengfei@smartai.com> Date: 星期三, 20 七月 2022 15:05:58 +0800 Subject: [PATCH] 修复国标配置的bug --- src/pages/cameraAccess/components/SeparateRules.vue | 28 ++++++++++++++++++++-------- 1 files changed, 20 insertions(+), 8 deletions(-) diff --git a/src/pages/cameraAccess/components/SeparateRules.vue b/src/pages/cameraAccess/components/SeparateRules.vue index 19fb894..a733795 100644 --- a/src/pages/cameraAccess/components/SeparateRules.vue +++ b/src/pages/cameraAccess/components/SeparateRules.vue @@ -2,7 +2,7 @@ <div class="s-separate-rules"> <div class="ai"> <div class="check-area"> - <div class="ai-select"> + <div class="ai-select" v-if="TreeDataPool.selectedNode.type !== 'MENU'"> <div v-show="cameraType === 'camera'"> <span> <span class="label">瑙嗛鍒嗘瀽澶勭悊</span> @@ -15,7 +15,7 @@ </span> </div> - <div v-if="Camera.analytics" class="flex-box" v-show="cameraType === 'camera'"> + <div v-if="Camera.analytics && isShowPolling === 'show'" class="flex-box" v-show="cameraType === 'camera'"> <span class="label">澶勭悊鏂瑰紡</span> <toggle-button :value="Camera.dealWay" @@ -223,6 +223,7 @@ import { pasteRules } from "@/api/task" import { getCameraInfo } from "@/api/camera" +import { getGB28181CameraInfo } from "@/api/camera" import { saveCameraScene } from "@/api/scene" import { changeRunType } from "@/api/pollConfig" @@ -257,6 +258,7 @@ }, data() { return { + isShowPolling: sessionStorage.getItem("isShowPolling"), mockSceneData: [], loading: false, Camera: new VideoRuleData(), @@ -309,7 +311,11 @@ }, methods: { getStatus() { - getCameraInfo(this.Camera.cameraId).then((res) => { + let refreshCameraInfo = getCameraInfo + if (this.Camera.gb28181) { + refreshCameraInfo = getGB28181CameraInfo + } + refreshCameraInfo(this.Camera.cameraId).then((res) => { if (res.success) { switch (res.data.status) { case 0: @@ -401,6 +407,13 @@ this.swiperIndex = this.$refs.swiper.swiper.activeIndex }, drawBaseImg() { + if (!this.Camera.cameraId) { + this.$notify({ + type: "warning", + message: "璇峰厛閫夋嫨鎽勫儚鏈�" + }) + return + } if (Array.isArray(this.$refs.canvas)) { if (this.$refs.canvas.length > 0) { this.$refs.canvas[0].showModal() @@ -486,7 +499,8 @@ if (this.Camera.cameraId && this.Camera.cameraId !== undefined) { changeRunType({ camera_ids: [this.Camera.cameraId], - run_type: val + run_type: val, + isGb: this.Camera.gb28181 }).then((rsp) => { this.getStatus() if (rsp && rsp.success) { @@ -508,7 +522,6 @@ //瀹炴椂銆佽疆璇㈠垏鎹� changePoll(row) { //鍒ゆ柇鏄柊澧炶繕鏄洿鏂� - debugger if (this.Camera.cameraId && this.Camera.cameraId !== undefined) { if (this.PollData.RealTimeSum < this.PollData.channelTotal) { if (row.value) { @@ -516,10 +529,10 @@ } else { this.Camera.dealWay = false } - debugger changeRunType({ camera_ids: [this.Camera.cameraId], - run_type: this.Camera.dealWay ? 1 : 0 + run_type: this.Camera.dealWay ? 1 : 0, + isGb: this.Camera.gb28181 }).then((rsp) => { if (rsp && rsp.success) { this.$notify({ @@ -536,7 +549,6 @@ } else { if (this.Camera.dealWay) { this.Camera.dealWay = false - debugger changeRunType({ camera_ids: [this.Camera.cameraId], run_type: this.Camera.dealWay ? 1 : 0 -- Gitblit v1.8.0