Skip to content

Commit 33f3bc0

Browse files
committed
【功能优化】工作流:BPMN 流程图高亮的计算,切换到后端为主
1 parent 619491b commit 33f3bc0

File tree

12 files changed

+613
-800
lines changed

12 files changed

+613
-800
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
"@vitejs/plugin-vue": "^5.0.4",
9696
"@vitejs/plugin-vue-jsx": "^3.1.0",
9797
"autoprefixer": "^10.4.17",
98-
"bpmn-js": "8.9.0",
98+
"bpmn-js": "8.10.0",
9999
"bpmn-js-properties-panel": "0.46.0",
100100
"consola": "^3.2.3",
101101
"eslint": "^8.57.0",

pnpm-lock.yaml

Lines changed: 120 additions & 120 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/api/bpm/activity/index.ts

Lines changed: 0 additions & 8 deletions
This file was deleted.

src/api/bpm/processInstance/index.ts

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,23 @@ export type ProcessInstanceVO = {
2424

2525
// 用户信息
2626
export type User = {
27-
id: number,
28-
nickname: string,
27+
id: number
28+
nickname: string
2929
avatar: string
3030
}
3131

3232
// 审批任务信息
3333
export type ApprovalTaskInfo = {
34-
id: number,
35-
ownerUser: User,
36-
assigneeUser: User,
37-
status: number,
34+
id: number
35+
ownerUser: User
36+
assigneeUser: User
37+
status: number
3838
reason: string
39-
4039
}
4140

4241
// 审批节点信息
4342
export type ApprovalNodeInfo = {
44-
id : number
43+
id: number
4544
name: string
4645
nodeType: NodeType
4746
status: number
@@ -88,12 +87,22 @@ export const getProcessInstanceCopyPage = async (params: any) => {
8887
}
8988

9089
// 获取审批详情
91-
export const getApprovalDetail = async (processInstanceId?:string, processDefinitionId?:string) => {
92-
const param = processInstanceId ? '?processInstanceId='+ processInstanceId : '?processDefinitionId='+ processDefinitionId
93-
return await request.get({ url: 'bpm/process-instance/get-approval-detail'+ param })
90+
export const getApprovalDetail = async (
91+
processInstanceId?: string,
92+
processDefinitionId?: string
93+
) => {
94+
const param = processInstanceId
95+
? '?processInstanceId=' + processInstanceId
96+
: '?processDefinitionId=' + processDefinitionId
97+
return await request.get({ url: 'bpm/process-instance/get-approval-detail' + param })
9498
}
9599

96100
// 获取表单字段权限
97101
export const getFormFieldsPermission = async (params: any) => {
98102
return await request.get({ url: '/bpm/process-instance/get-form-fields-permission', params })
99103
}
104+
105+
// 获取流程实例的 BPMN 模型视图
106+
export const getProcessInstanceBpmnModelView = async (id: string) => {
107+
return await request.get({ url: '/bpm/process-instance/get-bpmn-model-view?id=' + id })
108+
}

src/components/SimpleProcessDesignerV2/src/SimpleProcessDesigner.vue

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<div class="simple-flow-canvas" v-loading="loading">
3-
<div class="simple-flow-container" >
3+
<div class="simple-flow-container">
44
<div class="top-area-container">
55
<div class="top-actions">
66
<div class="canvas-control">
@@ -15,10 +15,7 @@
1515
</div>
1616
</div>
1717
<div class="scale-container" :style="`transform: scale(${scaleValue / 100});`">
18-
<ProcessNodeTree
19-
v-if="processNodeTree"
20-
v-model:flow-node="processNodeTree"
21-
/>
18+
<ProcessNodeTree v-if="processNodeTree" v-model:flow-node="processNodeTree" />
2219
</div>
2320
</div>
2421
<Dialog v-model="errorDialogVisible" title="保存失败" width="400" :fullscreen="false">
@@ -49,7 +46,7 @@ import * as DeptApi from '@/api/system/dept'
4946
import * as PostApi from '@/api/system/post'
5047
import * as UserApi from '@/api/system/user'
5148
import * as UserGroupApi from '@/api/bpm/userGroup'
52-
import { fa } from 'element-plus/es/locale'
49+
5350
defineOptions({
5451
name: 'SimpleProcessDesigner'
5552
})

0 commit comments

Comments
 (0)