@dongkboy 7 месяцев назад
Родитель
Сommit
b74ad43e15
1 измененных файлов с 10 добавлено и 1 удалено
  1. 10 1
      src/components/ruleCondition/index.vue

+ 10 - 1
src/components/ruleCondition/index.vue

@@ -70,7 +70,6 @@ import { ref, reactive } from 'vue'
 import api from '@/api'
 import { ElMessage } from 'element-plus'
 
-import { defineProps, defineEmits } from "vue";
 const props = defineProps<{
   ruleConditionVisible: boolean,
   attrIdList?: any,
@@ -84,6 +83,16 @@ const close = () => {
 }
 watch(props, () => {
   if (props.attrIdList && props.attrIdList.length) {
+    Object.assign(checked, {  //清空历史数据
+      VehicleInformation: [],
+      VehicleOwnerInformation: [],
+      PolicyholderInformation: [],
+      InsuredInformation: [],
+      InsuranceInformation: [],
+      InsuranceCostFactor: [],
+    })
+    attrName.value = ''
+    ruleAttr()  //清空搜索框内容 获取完整数据
     attractivelist.value = props.attrIdList;//获取编辑数据
     const matchedid = matchDataByIds(attractivelist.value);//
     const matchedinfo = matchDataByInfos(attractivelist.value)