From a689af1348938afd3b4506aad9b6d5057193e25d Mon Sep 17 00:00:00 2001 From: ZZJ <10913410+zzj2100@user.noreply.gitee.com> Date: 星期五, 27 五月 2022 09:59:00 +0800 Subject: [PATCH] bug修复 --- src/views/hashrate/CameraManage/CameraInfo/index.vue | 38 +++++++++++++++++++++++++++----------- 1 files changed, 27 insertions(+), 11 deletions(-) diff --git a/src/views/hashrate/CameraManage/CameraInfo/index.vue b/src/views/hashrate/CameraManage/CameraInfo/index.vue index 62665ae..a49ad6e 100644 --- a/src/views/hashrate/CameraManage/CameraInfo/index.vue +++ b/src/views/hashrate/CameraManage/CameraInfo/index.vue @@ -448,8 +448,8 @@ sensors: this.form.sensors, areaid: this.form.areaid, }; - tem.camera.clusterId = this.TreeDataPool.clusterId; - tem.camera.devId = this.TreeDataPool.devId; + tem.camera.clusterId = sessionStorage.getItem("clusterId"); + tem.camera.devId = sessionStorage.getItem("devId"); updateCameraInfo(tem) .then((rsp) => { @@ -476,12 +476,7 @@ }); } }) - .catch((err) => { - this.$notify({ - type: "error", - message: err.msg, - }); - }); + .catch((err) => {}); } else { this.form.areaid = this.addParentId; @@ -490,8 +485,8 @@ sensors: this.form.sensors, areaid: this.form.areaid, }; - tem.camera.clusterId = this.TreeDataPool.clusterId; - tem.camera.devId = this.TreeDataPool.devId; + tem.camera.clusterId = sessionStorage.getItem("clusterId"); + tem.camera.devId = sessionStorage.getItem("devId"); createCamera(tem) .then((rsp) => { if (rsp.success) { @@ -499,7 +494,7 @@ type: "success", message: "鎽勫儚鏈烘坊鍔犳垚鍔燂紒", }); - this.TreeDataPool.selectedNode = rsp.data; + this.TreeDataPool.selectedNode = rsp.data.camera; this.TreeDataPool.fetchTreeData(); // 鍚庣杩斿洖缁撴灉涓�0锛屾煡璇㈠悗涓�4 this.TreeDataPool.selectedNode.type = "4"; @@ -560,6 +555,13 @@ cancelButtonClass: "comfirm-class-cancle", confirmButtonClass: "comfirm-class-sure", }).then(() => { + if (!this.form.id) { + this.$notify({ + type: "warning", + message: "灏氭湭娣诲姞鎽勫儚鏈�", + }); + return; + } delCamera({ id: this.form.id, clusterId: this.TreeDataPool.clusterId, @@ -609,6 +611,20 @@ addDevice(node) { this.isAdd = true; this.addParentId = node; + this.resolutionList = [ + { + label: "鏈満鍒嗚鲸鐜�", + value: "0*0", + }, + { + label: "1920*1080", + value: "1920*1080", + }, + { + label: "2688*1520", + value: "2688*1520", + }, + ]; this.initFormData(); }, }, -- Gitblit v1.8.0