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/DataStackInfo.vue | 43 ++++++++++++++++++++++++++++++++++++------- 1 files changed, 36 insertions(+), 7 deletions(-) diff --git a/src/pages/cameraAccess/components/DataStackInfo.vue b/src/pages/cameraAccess/components/DataStackInfo.vue index c2b2f4e..aab0acd 100644 --- a/src/pages/cameraAccess/components/DataStackInfo.vue +++ b/src/pages/cameraAccess/components/DataStackInfo.vue @@ -472,6 +472,7 @@ moveFile, copyFile, } from "@/api/localVedio"; +import { getCameraSceneRule } from "@/api/scene"; import InfoCard from "./infoCard"; import eChartsBar from "@/components/subComponents/eChartsBar"; @@ -558,6 +559,7 @@ }, data() { return { + hasRule: false, videoUrl: "", imgUrl: "", previewDialog: false, @@ -598,6 +600,17 @@ this.taskUid = 0; }, methods: { + async getRule() { + const res = await getCameraSceneRule({ + cameraId: this.DataStackPool.selectedDir.id, + }); + if (res && res.success && res.data.rules && res.data.rules.length > 0) { + this.hasRule = true; + console.log(this.hasRule); + } else { + this.hasRule = false; + } + }, checkResolution(val) { this.form.resolution_width = Number(val.split("*")[0]); this.form.resolution_height = Number(val.split("*")[1]); @@ -626,6 +639,12 @@ sort: 0, status: 0, type: 1, + resolutions: [ + { + height: 0, + width: 0, + }, + ], }; }, // 娣诲姞璁惧 @@ -754,6 +773,10 @@ }); this.DataStackPool.fetchFiles(); this.DataStackPool.selectedDir = {}; + // 鍒犻櫎鍚庢仮澶嶆湭閫変腑鐘舵�� + this.addDir(); + this.isAdd = false; + this.isDisabled = true; } else { this.$notify({ type: "error", @@ -781,12 +804,11 @@ this.multipleSelection = []; }, handleUpload() { - console.log(this.DataStackPool.selectedDir.id); - console.log( - this.$refs[ - `uploader_${this.DataStackPool.selectedDir.id}` - ][0].$refs.button.$refs.btn.click() - ); + console.log(this.DataStackPool.selectedDir); + console.log(this.DataStackPool.dirs); + this.$refs[ + `uploader_${this.DataStackPool.selectedDir.id}` + ][0].$refs.button.$refs.btn.click(); }, handleRefrashFileList(val) { this.page = val; @@ -823,6 +845,13 @@ this.$notify({ type: "error", message: "鏈�変腑鏂囦欢", + }); + return; + } + if (!this.hasRule && status === 1) { + this.$notify({ + type: "error", + message: "鎮ㄨ繕鏈厤缃畻娉曞満鏅�,璇峰厛閰嶇疆", }); return; } @@ -1068,4 +1097,4 @@ height: 230px; } } -</style> \ No newline at end of file +</style> -- Gitblit v1.8.0