From d8c730b184f9d982744e35cb720f20b9e44890f6 Mon Sep 17 00:00:00 2001
From: zhangzengfei <zhangzengfei@smartai.com>
Date: 星期三, 12 十月 2022 17:14:54 +0800
Subject: [PATCH] 完善区域修改后的提示信息.关联场景的区域不可以删除
---
src/pages/cameraAccess/components/DataStackInfo.vue | 44 +++++++++++++++++++++++++++++++++++++-------
1 files changed, 37 insertions(+), 7 deletions(-)
diff --git a/src/pages/cameraAccess/components/DataStackInfo.vue b/src/pages/cameraAccess/components/DataStackInfo.vue
index e2f42bc..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"
@@ -471,6 +472,7 @@
moveFile,
copyFile,
} from "@/api/localVedio";
+import { getCameraSceneRule } from "@/api/scene";
import InfoCard from "./infoCard";
import eChartsBar from "@/components/subComponents/eChartsBar";
@@ -557,6 +559,7 @@
},
data() {
return {
+ hasRule: false,
videoUrl: "",
imgUrl: "",
previewDialog: false,
@@ -597,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]);
@@ -625,6 +639,12 @@
sort: 0,
status: 0,
type: 1,
+ resolutions: [
+ {
+ height: 0,
+ width: 0,
+ },
+ ],
};
},
// 娣诲姞璁惧
@@ -753,6 +773,10 @@
});
this.DataStackPool.fetchFiles();
this.DataStackPool.selectedDir = {};
+ // 鍒犻櫎鍚庢仮澶嶆湭閫変腑鐘舵��
+ this.addDir();
+ this.isAdd = false;
+ this.isDisabled = true;
} else {
this.$notify({
type: "error",
@@ -780,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;
@@ -822,6 +845,13 @@
this.$notify({
type: "error",
message: "鏈�変腑鏂囦欢",
+ });
+ return;
+ }
+ if (!this.hasRule && status === 1) {
+ this.$notify({
+ type: "error",
+ message: "鎮ㄨ繕鏈厤缃畻娉曞満鏅�,璇峰厛閰嶇疆",
});
return;
}
@@ -1067,4 +1097,4 @@
height: 230px;
}
}
-</style>
\ No newline at end of file
+</style>
--
Gitblit v1.8.0