Browse Source

增加all_satisfy 风控条件满足范围

marxjaw 4 months ago
parent
commit
c3cf9467ab

+ 10 - 2
src/views/main/riskModule/components/configForm.vue

@@ -30,7 +30,13 @@
                             <div v-if="conditionTexts.length === 0" style="color: #999;">暂无内容</div>
                         </div>
                     </el-card>
-
+                </div>
+                <div style="display: flex; align-items: center;margin: 20px 0px;">
+                    条件范围:
+                    <el-radio-group style="margin-left: 15px" v-model="configFormList.allSatisfy">
+                       <el-radio label="1" >全部满足</el-radio>
+                       <el-radio label="2" >满足一条即可</el-radio>
+                    </el-radio-group>
                 </div>
 
                 <h3 style="margin-top: 20px;">配置列表</h3>
@@ -195,6 +201,7 @@
             createTime: null,
             createUserId: null,
             enabled: null,
+            allSatisfy: null,
             templateCode: '', //风控配置模板编号
             templateContent: '', //风控配置模板内容
             templateId: '',//风控配置模板ID
@@ -280,6 +287,7 @@
         createTime: null,
         createUserId: null,
         enabled: null,
+        allSatisfy: null,
         templateCode: '', //风控配置模板编号
         templateContent: '', //风控配置模板内容
         templateId: '',//风控配置模板ID
@@ -479,7 +487,7 @@
         if (res.code == 200) {
             res = res.data
             configFormList.value = res
-
+            configFormList.value.allSatisfy = String(res.allSatisfy)
             res.configList.forEach((item, index) => {
                 // configType:1-输入框 2-选择框 3-日期
                 // multy:1-多选 2-单选 3-大于> 4-小于<

+ 19 - 5
src/views/main/riskModule/riskControlConfig.vue

@@ -16,8 +16,16 @@
             </el-tag>
           </template>
         </el-table-column>
-        <el-table-column prop="appNames" label="关联应用" width="120" />
-        <el-table-column prop="appIds" label="关联应用ID" width="150" />
+        <el-table-column prop="appNames" label="关联应用" width="120">
+          <template #default="scope">
+            {{scope.row.canModify? scope.row.appNames : '系统配置全应用生效'}}
+          </template>
+        </el-table-column>
+        <el-table-column prop="appIds" label="关联应用ID" width="150">
+          <template #default="scope">
+            {{scope.row.canModify? scope.row.appIds : '系统配置全应用生效'}}
+          </template>
+        </el-table-column>
         <el-table-column prop="templateCode" label="配置编码" width="90" />
         <el-table-column prop="templateContent" label="配置内容">
           <template #default="scope">
@@ -34,6 +42,11 @@
           </el-popover>
           </template>
         </el-table-column>
+        <el-table-column prop="allSatisfy" label="条件范围" width="100">
+            <template #default="scope">
+              {{getDictionaryName('all_satisfy', scope.row.allSatisfy)}}
+            </template>
+        </el-table-column>
         <el-table-column prop="templateId" label="配置模版ID" width="160" />
         <el-table-column prop="templateName" label="配置名称" width="100" />
         <el-table-column prop="createTime" label="创建时间" width="160">
@@ -55,10 +68,10 @@
               <el-button class="button-item" type="primary" style="margin-bottom: 5px;" @click="edit(scope.row)">
                 编辑
               </el-button>
-              <el-button class="button-item" type="success" style="margin-bottom: 5px;" @click="relativeApp(scope.row)">
+              <el-button v-if="scope.row.canModify" class="button-item" type="success" style="margin-bottom: 5px;" @click="relativeApp(scope.row)">
                 关联应用
               </el-button>
-              <el-button :type="scope.row.enabled ? 'danger' : ''" class="button-item" style="margin-bottom: 5px;"
+              <el-button v-if="scope.row.canModify" :type="scope.row.enabled ? 'danger' : ''" class="button-item" style="margin-bottom: 5px;"
                 @click="enabledConfig(scope.row)">
                 {{scope.row.enabled ? '关闭' : '开启'}}
               </el-button>
@@ -314,7 +327,8 @@
           configList: data.configList,
           templateName: data.templateName,
           templateContent: data.templateContent,
-          templateCode: data.templateCode
+          templateCode: data.templateCode,
+          allSatisfy: data.allSatisfy
         })
       if (res.code === 200) {
         ElMessage.success('配置保存成功')