From 019104f46007b1aa6463db3efa9d933788cffba6 Mon Sep 17 00:00:00 2001 From: jason <2667446@qq.com> Date: Tue, 8 Oct 2024 12:42:38 +0800 Subject: [PATCH 001/109] =?UTF-8?q?=E3=80=90=E4=BB=A3=E7=A0=81=E8=AF=84?= =?UTF-8?q?=E5=AE=A1=E4=BF=AE=E6=94=B9=E3=80=91-=20=E6=96=B0=E5=AE=A1?= =?UTF-8?q?=E6=89=B9=E7=95=8C=E9=9D=A2=E9=83=A8=E5=88=86=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/bpm/processInstance/index.ts | 2 +- .../detail/ProcessInstanceTimeline.vue | 17 ++-- .../bpm/processInstance/detail/index_new.vue | 89 ++++++++++++------- 3 files changed, 70 insertions(+), 38 deletions(-) diff --git a/src/api/bpm/processInstance/index.ts b/src/api/bpm/processInstance/index.ts index 3d6330a8..86928816 100644 --- a/src/api/bpm/processInstance/index.ts +++ b/src/api/bpm/processInstance/index.ts @@ -47,7 +47,7 @@ export type ApprovalNodeInfo = { status: number startTime?: Date endTime?: Date - candidateUserList?: User[] + candidateUsers?: User[] tasks: ApprovalTaskInfo[] } diff --git a/src/views/bpm/processInstance/detail/ProcessInstanceTimeline.vue b/src/views/bpm/processInstance/detail/ProcessInstanceTimeline.vue index afb778c4..d201db12 100644 --- a/src/views/bpm/processInstance/detail/ProcessInstanceTimeline.vue +++ b/src/views/bpm/processInstance/detail/ProcessInstanceTimeline.vue @@ -14,7 +14,7 @@
-
+
{{ task.assigneeUser.nickname }}
@@ -57,14 +57,20 @@ > {{ task.ownerUser.nickname }}
- - +
+
+ {{ task.reason }} +
+
@@ -91,7 +97,6 @@
{{ user.nickname }}
-
diff --git a/src/views/bpm/processInstance/detail/index_new.vue b/src/views/bpm/processInstance/detail/index_new.vue index b2035a19..54880487 100644 --- a/src/views/bpm/processInstance/detail/index_new.vue +++ b/src/views/bpm/processInstance/detail/index_new.vue @@ -12,25 +12,37 @@
{{ processInstance.name }}
- +
- + + + + {{ processInstance?.startUser?.nickname.substring(0, 1) }} + {{ processInstance?.startUser?.nickname }}
{{ formatDate(processInstance.startTime) }} 提交
- +
- +
- +
+ - +
+ + + +
+ - +
+ + + +
+ - 流转评论 + +
+ 流转评论 +
+
-
+
({}) // 流程实例 +let processDefinitionId = undefined // 流程定义 Id const operationButtonRef = ref() const timelineRef = ref() const bpmnXml = ref('') // BPMN XML @@ -151,10 +171,10 @@ const detailForm = ref({ }) // 流程实例的表单详情 /** 获得详情 */ -const getDetail = () => { +const getDetail = async () => { // 1. 获得流程实例相关 getProcessInstance() - // 2. 获得流程任务列表(审批记录) + // 2. 获得流程任务列表 getTaskList() } @@ -202,9 +222,9 @@ const getProcessInstance = async () => { // 注意:data.processDefinition.formCustomViewPath 是组件的全路径,例如说:/crm/contract/detail/index.vue BusinessFormComponent.value = registerComponent(data.processDefinition.formCustomViewPath) } - + processDefinitionId = processDefinition.id // 加载流程图 - bpmnXml.value = (await DefinitionApi.getProcessDefinition(processDefinition.id))?.bpmnXml + // bpmnXml.value = (await DefinitionApi.getProcessDefinition(processDefinition.id))?.bpmnXml } finally { processInstanceLoading.value = false } @@ -273,6 +293,13 @@ const refresh = () => { /** 当前的Tab */ const activeTab = ref('form') +/** Tab 切换 加载流程图,直接加载显示不出来,不知道啥原因,所以切换以后在加载 */ +const onTabChange = async (tabName: string) => { + if (tabName === 'diagram' && processDefinitionId && !bpmnXml.value) { + //加载流程图 + bpmnXml.value = (await DefinitionApi.getProcessDefinition(processDefinitionId))?.bpmnXml + } +} /** 初始化 */ const userOptions = ref([]) // 用户列表 onMounted(async () => { From 753a32aecc7562dacd33294d282479119f49d492 Mon Sep 17 00:00:00 2001 From: GoldenZqqq <1361001127@qq.com> Date: Tue, 8 Oct 2024 17:26:32 +0800 Subject: [PATCH 002/109] =?UTF-8?q?feat:=20=E6=B5=81=E7=A8=8B=E6=A8=A1?= =?UTF-8?q?=E5=9E=8B=E9=A1=B5=E9=9D=A2=E5=B8=83=E5=B1=80=E9=87=8D=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/bpm/model/index.vue | 403 ++++++++++++++--------------- src/views/bpm/model/index_old.vue | 404 ++++++++++++++++++++++++++++++ 2 files changed, 599 insertions(+), 208 deletions(-) create mode 100644 src/views/bpm/model/index_old.vue diff --git a/src/views/bpm/model/index.vue b/src/views/bpm/model/index.vue index 4534ec61..fda20c04 100644 --- a/src/views/bpm/model/index.vue +++ b/src/views/bpm/model/index.vue @@ -1,211 +1,189 @@