Browse Source

modify point

haojianlong 5 năm trước cách đây
mục cha
commit
87e779d676
1 tập tin đã thay đổi với 7 bổ sung11 xóa
  1. 7 11
      src/components/point/dynamicdata/delRelationDialog.vue

+ 7 - 11
src/components/point/dynamicdata/delRelationDialog.vue

@@ -84,8 +84,6 @@ export default {
     },
     //确认清除对应关系
     handleDelete() {
-      console.log(2222222222222)
-      console.log(this.deleParam)
       dynamicDeleteRelation(this.deleParam, res => {
         this.$emit("refresh");
         this.dialogVisible = false;
@@ -103,8 +101,12 @@ export default {
       } else if (this.ltableData.length < this.rtableData.length) {
         tempObj.Objs = selection
         tempObj.Points = [selection[0]]
+      } else {
+        tempObj.Objs = selection
+        tempObj.Points = selection
       }
       this.deleParam.push(tempObj)
+      console.log(this.deleParam)
     },
     //查询两边数据,同时拼删除param
     getDynamicQueryPrompt(row) {
@@ -131,22 +133,16 @@ export default {
       })
       Promise.all([promise1, promise2]).then(res => {
         this.deleParam = [];
-        this.deleDisabled = false;
         this.ltableData = res[1].Content;
         this.rtableData = res[0].Content;
         if (this.ltableData.length > 1 || this.rtableData.length > 1) {
           this.dialogWidth = "60%";
-          this.$nextTick(() => {
-            this.toggleSelection(row);
-          })
         } else {
           this.dialogWidth = "20%";
-          let tempObj = {
-            Objs: this.ltableData,
-            Points: this.rtableData
-          }
-          this.deleParam.push(tempObj)
         }
+        this.$nextTick(() => {
+          this.toggleSelection(row);
+        })
         this.loading = false;
       })
     },