Browse Source

维护流程相关字典及相关渲染

lph 1 year ago
parent
commit
8cac9a8b88

+ 40 - 9
ruoyi-ui/src/views/bpmprocess/index.vue

@@ -134,12 +134,20 @@
       <el-table-column label="主键" align="center" prop="processId" />
       <el-table-column label="流程名称" align="center" prop="processName" />
       <el-table-column label="流程别名" align="center" prop="processKey" />
-      <el-table-column
-        label="流程状态"
-        align="center"
-        prop="processOpneState"
-      />
-      <el-table-column label="流程类型" align="center" prop="processType" />
+      <el-table-column label="流程状态" align="center" prop="processOpneState">
+        <template slot-scope="scope">
+          <span>{{
+            getDictLabel(scope.row.processOpneState, dict.type.bpm_state)
+          }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="流程类型" align="center" prop="processType">
+        <template slot-scope="scope">
+          <span>{{
+            getDictLabel(scope.row.processType, dict.type.bpm_type)
+          }}</span>
+        </template>
+      </el-table-column>
       <el-table-column
         label="流程部署时间"
         align="center"
@@ -156,9 +164,25 @@
         label="启动事件类型"
         align="center"
         prop="startEventType"
-      />
+      >
+        <template slot-scope="scope">
+          <span>{{
+            getDictLabel(
+              scope.row.startEventType,
+              dict.type.bpm_start_event_type
+            )
+          }}</span>
+        </template>
+      </el-table-column>
+
       <el-table-column label="版本注释" align="center" prop="note" />
-      <el-table-column label="版本状态" align="center" prop="processVersion" />
+      <el-table-column label="版本状态" align="center" prop="processVersion">
+        <template slot-scope="scope">
+          <span>{{
+            getDictLabel(scope.row.processVersion, dict.type.bpm_version)
+          }}</span>
+        </template>
+      </el-table-column>
       <!-- <el-table-column label="节点json串" align="center" prop="processJson" /> -->
       <!-- <el-table-column
         label="xml文件存放地址"
@@ -302,6 +326,7 @@ import {
 
 export default {
   name: "Process",
+  dicts: ["bpm_state", "bpm_type", "bpm_start_event_type", "bpm_version"],
   data() {
     return {
       // 遮罩层
@@ -523,13 +548,19 @@ export default {
     /** 导出按钮操作 */
     handleExport() {
       this.download(
-        "system/process/export",
+        process.env.VUE_APP_BASE_API4 + "system/process/export",
         {
           ...this.queryParams,
         },
         `process_${new Date().getTime()}.xlsx`
       );
     },
+    // 获取字典对应label
+    getDictLabel(value, dictLsit = []) {
+      return dictLsit.find((item) => {
+        return item.value == value;
+      })?.label;
+    },
   },
 };
 </script>

+ 0 - 1
ruoyi-ui/src/views/system/bpmnPro/components/Toolbar/index.vue

@@ -23,7 +23,6 @@ import BpmnSave from "./tools/Save.vue";
 import BpmnAligns from "./tools/Aligns";
 import BpmnScales from "./tools/Scales";
 import BpmnCommands from "./tools/Commands";
-
 import BpmnExternals from "./tools/Externals";
 export default {
   name: "BpmnToolbar",