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

fix: 流程设计可以选择表单字段

tanzx 5 дней назад
Родитель
Сommit
0675077ab0

+ 8 - 1
src/BIZComponents/enventSubmitDialog/processSubmitDialog.vue

@@ -109,7 +109,7 @@
 
             <el-tag
               size="medium"
-              v-if="scope.row.type === 60 || scope.row.type === 70"
+              v-if="scope.row.type === 60 || scope.row.type === 70 || scope.row.type === 90"
             >
               {{ getAssignRuleOptionName(scope.row) }}
             </el-tag>
@@ -405,6 +405,13 @@
           } else {
             return topLevel1.find((item) => item.value == data.topLevel)?.label;
           }
+        } else if (row.type === 90) {
+          try {
+            const cfg = row.ruleConfig ? JSON.parse(row.ruleConfig) : {};
+            return (cfg.fieldLabel || cfg.field || '表单字段') + ' → ' + (cfg.strategy || '');
+          } catch (e) {
+            return '表单字段驱动审批人';
+          }
         }
         return '未知(' + option + ')';
       },

+ 21 - 1
src/BIZComponents/processSubmitDialog/processSubmitDialog.vue

@@ -342,7 +342,8 @@
                   v-if="
                     scope.row.type === 60 ||
                     scope.row.type === 70 ||
-                    scope.row.type === 80
+                    scope.row.type === 80 ||
+                    scope.row.type === 90
                   "
                 >
                   {{ getAssignRuleOptionName(scope.row) }}
@@ -879,6 +880,25 @@ this.postOptions.push(...response.data);
         } else if (row.type === 80) {
           let data = JSON.parse(row.variableName);
           return topLevel3.find((item) => item.value == data.topLevel)?.label;
+        } else if (row.type === 90) {
+          try {
+            const cfg = row.ruleConfig ? JSON.parse(row.ruleConfig) : {};
+            const names = {
+              USER: '按用户',
+              DEPT_MEMBER: '按部门成员',
+              DEPT_LEADER: '按部门负责人',
+              PARENT_DEPT_LEADER: '按上级部门负责人',
+              ROLE_MEMBER: '按角色成员',
+              USER_GROUP_MEMBER: '按用户组成员'
+            };
+            return (
+              (cfg.fieldLabel || cfg.field || '表单字段') +
+              ' → ' +
+              (names[cfg.strategy] || cfg.strategy || '')
+            );
+          } catch (e) {
+            return '表单字段驱动审批人';
+          }
         }
         return '未知(' + option + ')';
       },