hanbaoshan
2020-12-03 c99cad106ef5be9f818e45d385dfdcec29ce19e5
src/components/canvas/Dialog.vue
@@ -218,7 +218,8 @@
    cancel() {
      this.changeType('0')
      this.undisabled()
      this.delCursor = {}
      //this.delCursor = {}
      this.delCursor = { type: -1, index: -1, remarksName: "", id: "" };
      this.canvasHistory.length = 0;
      this.step = -1;
      this.canvasData = JSON.parse(JSON.stringify(this.canvasDataToChild));
@@ -409,7 +410,7 @@
          break;
        case "5":
          delEle = this.canvasData.polygon[this.delCursor.index];
          this.canvasData.polygon.splice(this.delCursor.index, 1);
          this.canvasData.polygon.splice(this.delCursor.index+1, 1);
          break;
      }
      this.clickSelect();
@@ -536,6 +537,7 @@
          _this.type = "0";
          _this.delCursor.type = "2";
          _this.delCursor.index = i;
          debugger
          _this.delCursor.remarksName = v.name;
          _this.delCursor.id = v.id;
          // console.log("当前选中元素:",_this.delCursor)
@@ -1269,7 +1271,10 @@
      this.lineIndex = this.canvasData.line.length;
      this.rectIndex = this.canvasData.rect.length;
      this.arrowIndex = this.canvasData.arrow.length;
      this.polygonIndex = this.canvasData.polygon.length;
      //排除this.canvasData.polygon全部区域(全部区域的id就是摄像机的id)
      let filterPolygonArr = this.canvasData.polygon.filter(item=>item.id != this.TreeDataPool.selectedNode.id)
      this.polygonIndex = filterPolygonArr.length;
    },
    // 生成uuid
    getUuid() {