| | |
| | | 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) => { |
| | |
| | | }); |
| | | } |
| | | }) |
| | | .catch((err) => { |
| | | this.$notify({ |
| | | type: "error", |
| | | message: err.msg, |
| | | }); |
| | | }); |
| | | .catch((err) => {}); |
| | | } else { |
| | | this.form.areaid = this.addParentId; |
| | | |
| | |
| | | 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) { |
| | |
| | | type: "success", |
| | | message: "摄像机添加成功!", |
| | | }); |
| | | this.TreeDataPool.selectedNode = rsp.data; |
| | | this.TreeDataPool.selectedNode = rsp.data.camera; |
| | | this.TreeDataPool.fetchTreeData(); |
| | | // 后端返回结果为0,查询后为4 |
| | | this.TreeDataPool.selectedNode.type = "4"; |
| | |
| | | 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, |
| | |
| | | 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(); |
| | | }, |
| | | }, |