Просмотр исходного кода

协议调度 多个或者条件并列是传参调整完善

祁鹏飞 1 месяц назад
Родитель
Сommit
c9760b91cd
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      src/views/quoteConfig/dispatch/components/rule.vue

+ 3 - 3
src/views/quoteConfig/dispatch/components/rule.vue

@@ -442,8 +442,8 @@ const getOptions = (conditionValue: string) => {
   const target = dispatchList.value.find(
     (item) => item.attrCode === conditionValue
   );
-  let arr=target?.dictLabal || []
-  if(conditionValue==='InsruanceProduct') arr=arr.map(v=>({...v,idStr:v.code}))
+  let arr = target?.dictLabal || []
+  if (conditionValue === 'InsruanceProduct') arr = arr.map(v => ({ ...v, idStr: v.code }))
   return target?.dictLabal || [];
 };
 
@@ -627,7 +627,7 @@ const submit = async () => {
     return
   }
   // 处理多选框额外传值
-  const allActions = formData.value.conditionGroups.flatMap((group) => group.actions);
+  const allActions = formData.value.conditionGroups.flatMap((group, i) => group.actions.map(v => ({ ...v, section: i + 1 })));
   allActions.map((item) => {
     if (["checkbox", "inputTag", "select"].includes(item.attrType)) {
       item.min = item.minArray.join(',');