diff --git a/src/views/workflow/task/TaskForm.vue b/src/views/workflow/task/TaskForm.vue
index 8e2dd12..b767111 100644
--- a/src/views/workflow/task/TaskForm.vue
+++ b/src/views/workflow/task/TaskForm.vue
@@ -2,9 +2,10 @@
{{ state.formTitle }}
-
@@ -12,9 +13,9 @@
表单信息
-
+
@@ -25,14 +26,31 @@
:businessId="state.businessId"
/>
+
+
+
+ 流程信息
+
+
+
+
流程图
+
+
+
+
+
+ 流转记录
+
+
+
-
+
{
handleInit();
nextTick(async () => {
- // 获取流程图数据
- if (state.processInsId) {
- const data = await getFlowChart(state.processInsId);
- //this.$refs.flowableChart.setHighlightImportDiagram(response)
- } else {
- const data = getProcessDefFlowChart(state.processDefId);
- //this.$refs.flowableChart.setHighlightImportDiagram({ bpmnXml: data })
- }
-
// 初始化外置表单
if (state.formType === '2') {
if (state.formKey === '/404') {
@@ -246,9 +259,9 @@
// 初始化动态表单
} else {
if (state.formKey === '/404') {
- form.value.init('');
+ formPreview.value.init('');
} else {
- form.value.init(state.formKey);
+ formPreview.value.init(state.formKey);
}
// 获取启动事件表单数据
if (state.status === 'start' || state.status === 'reStart') {
@@ -258,7 +271,6 @@
state.taskFormData = await getTaskFormData(state.taskId);
}
}
-
// 设置启动按钮配置
if (state.status === 'start' || state.status === 'reStart') {
state.buttons = [{ code: '_workflow_activity_start', name: '启动', isHide: '0' }];
@@ -323,7 +335,7 @@
function start(vars: Recordable) {
// 外置表单
if (state.formType === '2') {
- form.value.startProcessDefinition(async (businessTable: string, businessId: string) => {
+ formPreview.value.startProcessDefinition(async (businessTable: string, businessId: string) => {
const processInsId = await startProcessDefinition({
processDefKey: this.processDefKey,
businessTable: businessTable,
@@ -336,7 +348,7 @@
});
// 动态表单
} else {
- form.value.startFormProcessDefinition({ processDefId: this.processDefId, ...vars }, (processInsId: string) => {
+ formPreview.value.startFormProcessDefinition({ processDefId: this.processDefId, ...vars }, (processInsId: string) => {
close();
push({ path: '/workflow/task/index' });
cc({ processInsId });
@@ -421,7 +433,7 @@
function commit(vars?: Recordable) {
// 外置表单审批
if (state.formType === '2') {
- form.value.auditTask(async () => {
+ formPreview.value.auditTask(async () => {
await auditTask({
taskId: this.taskId,
taskDefKey: this.taskDefKey,
@@ -437,7 +449,7 @@
});
// 动态表单审批
} else {
- form.value.auditFormTask({
+ formPreview.value.auditFormTask({
taskId: this.taskId,
processInsId: this.processInsId,
activityCommentInfo: this.auditForm,
@@ -547,6 +559,16 @@
};
});
+ function handleTabsClick(activeKey: string, event: MouseEvent) {
+ // fixme: tabs组件首次加载不能初始化未激活的tab中的组件
+ if (activeKey === 'processChart' && !workflowChart.value) {
+ setTimeout(() => {
+ // 获取流程图数据
+ workflowChart.value.init(state.processInsId, state.processDefId);
+ }, 100);
+ }
+ }
+
diff --git a/src/views/workflow/task/workflowStep/index.vue b/src/views/workflow/task/workflowStep/index.vue
new file mode 100644
index 0000000..6f32fe5
--- /dev/null
+++ b/src/views/workflow/task/workflowStep/index.vue
@@ -0,0 +1,75 @@
+
+
+
+
+ 开始
+
+ admin,2023-10-07 14:40:17
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/workflow/task/workflowStep/workflowStep.data.ts b/src/views/workflow/task/workflowStep/workflowStep.data.ts
new file mode 100644
index 0000000..b2ae30e
--- /dev/null
+++ b/src/views/workflow/task/workflowStep/workflowStep.data.ts
@@ -0,0 +1,45 @@
+import { BasicColumn } from '/@/components/Table';
+import { h } from 'vue';
+import { Tag } from 'ant-design-vue';
+
+export const columns: BasicColumn[] = [
+ {
+ title: '执行环节',
+ dataIndex: ['historicActivityInstance', 'activityName'],
+ width: 200,
+ },
+ {
+ title: '执行人',
+ dataIndex: 'assigneeName',
+ width: 200,
+ },
+ {
+ title: '开始时间',
+ dataIndex: ['historicActivityInstance', 'startTime'],
+ width: 150
+ },
+ {
+ title: '结束时间',
+ dataIndex: ['historicActivityInstance', 'endTime'],
+ width: 150,
+ },
+ {
+ title: '办理状态',
+ dataIndex: ['activityCommentInfo', 'mesName'],
+ width: 200,
+ },
+ {
+ title: '审批意见',
+ dataIndex: ['activityCommentInfo', 'message'],
+ width: 200,
+ },
+ {
+ title: '任务历时',
+ dataIndex: 'durationTime',
+ width: 200,
+ customRender: ({ record }) => {
+ const durationTime = record.durationTime;
+ return h(Tag, { color: 'processing' }, () => durationTime || '0秒');
+ }
+ }
+];