From d76f2b857d2ec75027981566616828f34251848e Mon Sep 17 00:00:00 2001
From: gssong <1742057357@qq.com>
Date: 星期二, 02 四月 2024 20:53:29 +0800
Subject: [PATCH] add 添加流程版本

---
 src/views/workflow/processInstance/index.vue |   31 +++++++++++++++++++------------
 1 files changed, 19 insertions(+), 12 deletions(-)

diff --git a/src/views/workflow/processInstance/index.vue b/src/views/workflow/processInstance/index.vue
index 8a4ba4a..4fed6ba 100644
--- a/src/views/workflow/processInstance/index.vue
+++ b/src/views/workflow/processInstance/index.vue
@@ -59,7 +59,11 @@
           <el-table v-loading="loading" border :data="processInstanceList" @selection-change="handleSelectionChange">
             <el-table-column type="selection" width="55" align="center" />
             <el-table-column align="center" type="index" label="搴忓彿" width="60"></el-table-column>
-            <el-table-column align="center" prop="processDefinitionName" label="娴佺▼瀹氫箟鍚嶇О"></el-table-column>
+            <el-table-column :show-overflow-tooltip="true" align="center" label="娴佺▼瀹氫箟鍚嶇О">
+              <template #default="scope">
+                  <span>{{ scope.row.processDefinitionName }}v{{ scope.row.processDefinitionVersion }}.0</span>
+              </template>
+            </el-table-column>
             <el-table-column align="center" prop="processDefinitionKey" label="娴佺▼瀹氫箟KEY"></el-table-column>
             <el-table-column align="center" prop="processDefinitionVersion" label="鐗堟湰鍙�" width="90">
               <template #default="scope"> v{{ scope.row.processDefinitionVersion }}.0</template>
@@ -70,10 +74,10 @@
                 <el-tag v-else type="danger">鎸傝捣</el-tag>
               </template>
             </el-table-column>
-            <el-table-column align="center" prop="businessStatusName" label="娴佺▼鐘舵��" min-width="70">
+            <el-table-column align="center" label="娴佺▼鐘舵��" min-width="70">
               <template #default="scope">
-                <el-tag type="success">{{ scope.row.businessStatusName }}</el-tag>
-              </template>
+                <dict-tag :options="wf_business_status" :value="scope.row.businessStatus"></dict-tag>
+            </template>
             </el-table-column>
             <el-table-column align="center" prop="startTime" label="鍚姩鏃堕棿" width="160"></el-table-column>
             <el-table-column v-if="tab === 'finish'" align="center" prop="endTime" label="缁撴潫鏃堕棿" width="160"></el-table-column>
@@ -161,8 +165,11 @@
 import { listCategory } from '@/api/workflow/category';
 import { CategoryVO } from '@/api/workflow/category/types';
 import { ProcessInstanceQuery, ProcessInstanceVO } from '@/api/workflow/processInstance/types';
+import workflowCommon from '@/api/workflow/workflowCommon';
+import { RouterJumpVo } from '@/api/workflow/workflowCommon/types';
 //瀹℃壒璁板綍缁勪欢
 const { proxy } = getCurrentInstance() as ComponentInternalInstance;
+const { wf_business_status } = toRefs<any>(proxy?.useDict('wf_business_status'));
 const queryFormRef = ref<ElFormInstance>();
 const categoryTreeRef = ref<ElTreeInstance>();
 
@@ -347,14 +354,14 @@
 };
 /** 鏌ョ湅鎸夐挳鎿嶄綔 */
 const handleView = (row) => {
-  if(row.wfFormDefinitionVo){
-    proxy.$tab.closePage(proxy.$route);
-    proxy.$router.push({
-      path: `${row.wfFormDefinitionVo.path}/${row.businessKey}/view`
-    })
-  }else{
-    proxy?.$modal.msgError('璇峰埌娴佺▼瀹氫箟鑿滃崟閰嶇疆璺敱锛�');
-  }
+  const routerJumpVo = reactive<RouterJumpVo>({
+    wfDefinitionConfigVo: row.wfDefinitionConfigVo,
+    wfNodeConfigVo: row.wfNodeConfigVo,
+    businessKey: row.businessKey,
+    taskId: row.id,
+    type: 'view'
+  });
+  workflowCommon.routerJump(routerJumpVo,proxy)
 };
 
 onMounted(() => {

--
Gitblit v1.9.3