zhangzengfei
2020-09-01 59ad7ba6452b2028fd7faca000c626a148256620
fix: do not allow empty data to be saved. for area manager
1个文件已修改
31 ■■■■ 已修改文件
src/pages/areaManage/index/App.vue 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/areaManage/index/App.vue
@@ -131,7 +131,6 @@
      this.isEdit = true;
      this.dialogFormVisible = true;
      this.areaForm = row;
      debugger
      //回显穿梭框
      let _this = this;
      _this.checkedData = [];
@@ -185,26 +184,15 @@
    },
    save () {
      // this.checkedData.forEach(item=>{
      //   let node = JSON.parse(item);
      //   this.camPolygon.cameraId = node.cameraId;
      //   this.camPolygon.cameraName = node.cameraName;
      //   this.pgn.polygonId = node.polygonId;
      //   this.pgn.polygonName = node.polygonName;
      //   this.camPolygon.pgns.push(this.pgn);
      //   this.areaForm.camPolygons.push(this.camPolygon);
      //   let _this = this;
      //   saveAreaInfo(this.areaForm).then(res=>{
      //     if(res.code==200){
      //       _this.$notify({
      //         type:'success',
      //         message:'保存成功!'
      //       });
      //       _this.dialogFormVisible = false;
      //       _this.getAllAreas();
      //     }
      //   })
      // });
      if (this.areaForm.id === "") {
        this.$notify({
          type: 'error',
          message: '区域ID不能为空'
        });
        return;
      }
      let tempArr = [];
      let tempIdArr = [];
      this.areaForm.camPolygons = [];
@@ -238,7 +226,6 @@
      })
      let _this = this;
      console.log(this.areaForm);
      debugger
      saveAreaInfo(this.areaForm).then(res => {
        if (res.code == 200) {
          _this.$notify({