Explorar el Código

风险多选子表类型逻辑修改

cyy hace 1 semana
padre
commit
d67ff666f4
Se han modificado 1 ficheros con 18 adiciones y 13 borrados
  1. 18 13
      src/views/platform/risk/riskDetail.vue

+ 18 - 13
src/views/platform/risk/riskDetail.vue

@@ -328,7 +328,7 @@
                 <el-radio-group
                   v-model="row.feng_xian_lei_xin"
                   size="mini"
-                  :disabled="readonly"
+                  disabled
                   @change="handleRowTypeChange(row)"
                 >
                   <el-radio
@@ -730,7 +730,9 @@ export default {
                     ni_cai_qu_cuo_shi: '',
                     zhi_ding_ren_: '',
                     qian_zai_yuan_yin: '',
-                    feng_xian_lei_xin: this.isMultiType ? '' : this.singleType
+                    feng_xian_lei_xin: this.isMultiType
+                      ? item.feng_xian_lei_xin
+                      : this.singleType
                   })
                 }
               }
@@ -991,7 +993,9 @@ export default {
       this.configByType = configByType
       if (this.isMultiType) {
         const joinBlock = (key) =>
-          configs.map((item) => `【${item.type}】\n${item[key] || ''}`).join('\n')
+          configs
+            .map((item) => `【${item.type}】\n${item[key] || ''}`)
+            .join('\n')
         this.content[0].value = joinBlock('degreeWord')
         this.content[1].value = joinBlock('gailvWord')
         this.content[2].value = joinBlock('jianCeWord')
@@ -1023,10 +1027,7 @@ export default {
         return row && row.feng_xian_lei_xin ? row.feng_xian_lei_xin : ''
       }
       return (
-        (row && row.feng_xian_lei_xin) ||
-        this.singleType ||
-        this.leixing ||
-        ''
+        (row && row.feng_xian_lei_xin) || this.singleType || this.leixing || ''
       )
     },
     getRowDegreeList(row) {
@@ -1061,7 +1062,10 @@ export default {
       const gailvList = this.getRowGailvList(row)
       const jianceList = this.getRowJianceList(row)
       let invalid = false
-      if (row.yan_zhong_cheng_d && !degreeList.includes(row.yan_zhong_cheng_d)) {
+      if (
+        row.yan_zhong_cheng_d &&
+        !degreeList.includes(row.yan_zhong_cheng_d)
+      ) {
         this.$set(row, 'yan_zhong_cheng_d', '')
         invalid = true
       }
@@ -1142,9 +1146,7 @@ export default {
         }
         const typeConfig = this.getRowTypeConfig(row)
         const fengXianJiSuan =
-          (typeConfig && typeConfig.fengXianJiSuan) ||
-          this.fengXianJiSuan ||
-          []
+          (typeConfig && typeConfig.fengXianJiSuan) || this.fengXianJiSuan || []
         if (this.muban === '1') {
           if (row.yan_zhong_cheng_d && row.fa_sheng_pin_du_) {
             let degree = ''
@@ -1318,11 +1320,14 @@ export default {
           }
           if (!this.isTypeConfigReady(item.feng_xian_lei_xin)) {
             throw new Error(
-              `第${i + 1}行风险类型「${item.feng_xian_lei_xin}」的配置数据不完整!`
+              `第${i + 1}行风险类型「${
+                item.feng_xian_lei_xin
+              }」的配置数据不完整!`
             )
           }
         } else {
-          item.feng_xian_lei_xin = this.singleType || item.feng_xian_lei_xin || ''
+          item.feng_xian_lei_xin =
+            this.singleType || item.feng_xian_lei_xin || ''
         }
         if (!item.feng_xian_zhi_shu) {
           throw new Error(`第${i + 1}行未计算风险指数,请填写相关数据!`)