Procházet zdrojové kódy

调度规则单选框默认选中第一个

祁鹏飞 před 1 měsícem
rodič
revize
dc2387e54a

+ 1 - 1
src/views/insurancePolicy/order/orderDetail.vue

@@ -1740,7 +1740,7 @@ const handleCostView = async () => {
   })
   await api.agreementApi.AgreementFeeById('1942785549684011010').then((res: any) => { // detailData.value?.insFeeOrders?.costId
     if (res.code == '200') {
-      res.data.ruleConditions = processArray(res.data.ruleConditions);
+      res.data.ruleConditions = processArray(res.data?.ruleConditions ?? []);
       costInfo.value = res.data;
       costViewShow.value = true;
     }

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

@@ -456,6 +456,7 @@ const getConditionType = (conditionValue: string) => {
 
 // 条件切换时的处理
 const handleConditionChange = (domain: ConditionRow, val: string) => {
+  if(getConditionType(domain.attrCode) === 'radio') domain.min=getOptions(domain.attrCode)[0]?.id + ''
   const target = dispatchList.value.find((item: any) => item.attrCode == val)
   domain.max = null;
   domain.operator = "";
@@ -730,7 +731,6 @@ onMounted(async () => {
 
     // 转换rawGroups为conditionGroups
     baseFormData.conditionGroups = rawGroups.map((rawGroup: any[], groupIdx: number) => {
-      console.log("🚀 ~ editData:", editData)
       const group: ConditionGroup = {
         groupKey: editData?.dispatchId + groupIdx || `group_${groupIdx}_${Date.now()}`,
         actions: [],