浏览代码

fix style;插值不关联表格日期后清除原关联关系

Karsa 1 年之前
父节点
当前提交
34416b2fc4
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8 0
      src/views/datasheet_manage/components/MixedTable.vue

+ 8 - 0
src/views/datasheet_manage/components/MixedTable.vue

@@ -814,6 +814,10 @@ export default {
         }
   
         this.setRelation(relation,5);
+      }else { //重新插值后之后原来有关联的清除关系
+        let haveIndex = this.insertRelationArr.findIndex(_ => _.key===this.insertTargetCell.Uid);
+        haveIndex!==-1 && this.insertRelationArr.splice(haveIndex,1)
+        resetRelationStyle();
       }
 
     },
@@ -1033,6 +1037,10 @@ export default {
         }
   
         this.setRelation(relation,7);
+      }else { //重新插值后之后原来有关联的清除关系
+        let haveIndex = this.insertRelationArr.findIndex(_ => _.key===this.insertTargetCell.Uid);
+        haveIndex!==-1 && this.insertRelationArr.splice(haveIndex,1)
+        resetRelationStyle();
       }
     },