Przeglądaj źródła

规则回显bug修改

祁鹏飞 4 miesięcy temu
rodzic
commit
eacea47bc0
1 zmienionych plików z 9 dodań i 4 usunięć
  1. 9 4
      src/components/ruleCondition/index.vue

+ 9 - 4
src/components/ruleCondition/index.vue

@@ -93,6 +93,12 @@ watch(()=>props.attrIdList, () => {
     })
     })
     attrName.value = ''
     attrName.value = ''
     ruleAttr()  //清空搜索框内容 获取完整数据
     ruleAttr()  //清空搜索框内容 获取完整数据
+  }
+
+})
+
+// 设置已选数据
+const setCheckedData=()=>{
     attractivelist.value = props.attrIdList;//获取编辑数据
     attractivelist.value = props.attrIdList;//获取编辑数据
     const matchedid = matchDataByIds(attractivelist.value);//
     const matchedid = matchDataByIds(attractivelist.value);//
     const matchedinfo = matchDataByInfos(attractivelist.value)
     const matchedinfo = matchDataByInfos(attractivelist.value)
@@ -106,10 +112,7 @@ watch(()=>props.attrIdList, () => {
     checked['SearchDataStore'] = attractivelist.value?.map(item => {
     checked['SearchDataStore'] = attractivelist.value?.map(item => {
         return item.attrName
         return item.attrName
     })
     })
-  }
-
-})
-
+}
 const save = () => {
 const save = () => {
   const mergedData = [
   const mergedData = [
     ...checkeddata.VehicleInformation,
     ...checkeddata.VehicleInformation,
@@ -283,6 +286,8 @@ const ruleAttr = (id='') => {
       dataStore.InsuranceInformation = res.data.InsuranceInformation ? processArray(res.data.InsuranceInformation) : [];
       dataStore.InsuranceInformation = res.data.InsuranceInformation ? processArray(res.data.InsuranceInformation) : [];
       dataStore.InsuranceCostFactor = res.data.InsuranceCostFactor ? processArray(res.data.InsuranceCostFactor) : [];
       dataStore.InsuranceCostFactor = res.data.InsuranceCostFactor ? processArray(res.data.InsuranceCostFactor) : [];
       dataStore.SearchDataStore = [...dataStore.VehicleInformation, ...dataStore.VehicleOwnerInformation, ...dataStore.PolicyholderInformation, ...dataStore.InsuredInformation, ...dataStore.InsuranceInformation, ...dataStore.InsuranceCostFactor ]
       dataStore.SearchDataStore = [...dataStore.VehicleInformation, ...dataStore.VehicleOwnerInformation, ...dataStore.PolicyholderInformation, ...dataStore.InsuredInformation, ...dataStore.InsuranceInformation, ...dataStore.InsuranceCostFactor ]
+      setCheckedData()
+
     }
     }
   });
   });
 }
 }