From a3f357e8a60443b74b64c7479113c68eb35ce1f5 Mon Sep 17 00:00:00 2001 From: ZZJ <10913410+zzj2100@user.noreply.gitee.com> Date: 星期五, 15 七月 2022 19:44:57 +0800 Subject: [PATCH] 控制轮询 --- src/pages/cameraAccess/components/DataStackInfo.vue | 61 +++++++++++++++++++++++++----- 1 files changed, 51 insertions(+), 10 deletions(-) diff --git a/src/pages/cameraAccess/components/DataStackInfo.vue b/src/pages/cameraAccess/components/DataStackInfo.vue index ed5c980..aab0acd 100644 --- a/src/pages/cameraAccess/components/DataStackInfo.vue +++ b/src/pages/cameraAccess/components/DataStackInfo.vue @@ -261,6 +261,7 @@ label="鏃堕暱" show-overflow-tooltip align="center" + v-if="form.type != 2" ></el-table-column> <el-table-column prop="uploadTime" @@ -278,9 +279,20 @@ show-overflow-tooltip align="center" > - <template slot-scope="scope">{{ - scope.row.status | statusFormat - }}</template> + <template slot-scope="scope"> + <div + class="lowHash" + v-if=" + !PollData.stackChannelCount && + (scope.row.status == '1' || scope.row.status == '2') + " + > + 鏁版嵁鏍堢畻鍔涗笉瓒� + </div> + <div class="normal" v-else> + {{ scope.row.status | statusFormat }} + </div> + </template> </el-table-column> <el-table-column label="鎿嶄綔" show-overflow-tooltip align="center"> <template slot-scope="scope"> @@ -460,6 +472,7 @@ moveFile, copyFile, } from "@/api/localVedio"; +import { getCameraSceneRule } from "@/api/scene"; import InfoCard from "./infoCard"; import eChartsBar from "@/components/subComponents/eChartsBar"; @@ -546,6 +559,7 @@ }, data() { return { + hasRule: false, videoUrl: "", imgUrl: "", previewDialog: false, @@ -586,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]); @@ -614,6 +639,12 @@ sort: 0, status: 0, type: 1, + resolutions: [ + { + height: 0, + width: 0, + }, + ], }; }, // 娣诲姞璁惧 @@ -742,6 +773,10 @@ }); this.DataStackPool.fetchFiles(); this.DataStackPool.selectedDir = {}; + // 鍒犻櫎鍚庢仮澶嶆湭閫変腑鐘舵�� + this.addDir(); + this.isAdd = false; + this.isDisabled = true; } else { this.$notify({ type: "error", @@ -769,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; @@ -811,6 +845,13 @@ this.$notify({ type: "error", message: "鏈�変腑鏂囦欢", + }); + return; + } + if (!this.hasRule && status === 1) { + this.$notify({ + type: "error", + message: "鎮ㄨ繕鏈厤缃畻娉曞満鏅�,璇峰厛閰嶇疆", }); return; } @@ -1056,4 +1097,4 @@ height: 230px; } } -</style> \ No newline at end of file +</style> -- Gitblit v1.8.0