diff --git a/yudao-ui-admin-vue3/src/api/bpm/activity/index.ts b/yudao-ui-admin-vue3/src/api/bpm/activity/index.ts new file mode 100644 index 000000000..870d0d6cd --- /dev/null +++ b/yudao-ui-admin-vue3/src/api/bpm/activity/index.ts @@ -0,0 +1,8 @@ +import request from '@/config/axios' + +export const getActivityList = async (params) => { + return await request.get({ + url: '/bpm/activity/list', + params + }) +} diff --git a/yudao-ui-admin-vue3/src/api/bpm/definition/index.ts b/yudao-ui-admin-vue3/src/api/bpm/definition/index.ts index 766ac90e2..477d67298 100644 --- a/yudao-ui-admin-vue3/src/api/bpm/definition/index.ts +++ b/yudao-ui-admin-vue3/src/api/bpm/definition/index.ts @@ -12,6 +12,7 @@ export const getProcessDefinitionPageApi = async (params) => { params }) } + export const getProcessDefinitionListApi = async (params) => { return await request.get({ url: '/bpm/process-definition/list', diff --git a/yudao-ui-admin-vue3/src/types/auto-imports.d.ts b/yudao-ui-admin-vue3/src/types/auto-imports.d.ts index 53862b631..68e0f7a40 100644 --- a/yudao-ui-admin-vue3/src/types/auto-imports.d.ts +++ b/yudao-ui-admin-vue3/src/types/auto-imports.d.ts @@ -3,7 +3,6 @@ export {} declare global { const DICT_TYPE: typeof import('@/utils/dict')['DICT_TYPE'] const EffectScope: typeof import('vue')['EffectScope'] - const ElMessage: typeof import('element-plus/es')['ElMessage'] const computed: typeof import('vue')['computed'] const createApp: typeof import('vue')['createApp'] const customRef: typeof import('vue')['customRef'] diff --git a/yudao-ui-admin-vue3/src/views/bpm/definition/index.vue b/yudao-ui-admin-vue3/src/views/bpm/definition/index.vue index b37c3f5a6..3021c0e2a 100644 --- a/yudao-ui-admin-vue3/src/views/bpm/definition/index.vue +++ b/yudao-ui-admin-vue3/src/views/bpm/definition/index.vue @@ -37,7 +37,7 @@ - - + @@ -55,8 +55,6 @@ const { t } = useI18n() // 国际化 const router = useRouter() // 路由 // 表单详情相关的变量和 import -import viewForm from '@form-create/element-ui' -const ViewForm = viewForm.$form() import { setConfAndFields2 } from '@/utils/formCreate' // 列表相关的变量 diff --git a/yudao-ui-admin-vue3/src/views/bpm/model/index.vue b/yudao-ui-admin-vue3/src/views/bpm/model/index.vue index 81335cba4..6a269e035 100644 --- a/yudao-ui-admin-vue3/src/views/bpm/model/index.vue +++ b/yudao-ui-admin-vue3/src/views/bpm/model/index.vue @@ -292,7 +292,7 @@ - + + @@ -129,6 +136,21 @@ + + + + + + { updateAssigneeFormRef.value?.resetFields() } +/** 处理审批退回的操作 */ +const handleDelegate = async (task) => { + message.error('暂不支持【委派】功能,可以使用【转派】替代!') + console.log(task) +} + +/** 处理审批退回的操作 */ +const handleBack = async (task) => { + message.error('暂不支持【退回】功能!') + // 可参考 http://blog.wya1.com/article/636697030/details/7296 + // const data = { + // id: task.id, + // assigneeUserId: 1 + // } + // backTask(data).then(response => { + // this.$modal.msgSuccess("回退成功!"); + // this.getDetail(); // 获得最新详情 + // }); + console.log(task) +} + +// ========== 高亮流程图 ========== +const bpmnXML = ref(null) +const bpmnControlForm = ref({ + prefix: 'flowable' +}) +const activityList = ref([]) + // ========== 初始化 ========== onMounted(() => { // 加载详情 @@ -355,9 +407,17 @@ const getDetail = () => { }) } - // TODO 加载流程图 + // 加载流程图 + DefinitionApi.getProcessDefinitionBpmnXMLApi(processDefinition.id).then((data) => { + bpmnXML.value = data + }) - // TODO 加载活动列表 + // 加载活动列表 + ActivityApi.getActivityList({ + processInstanceId: data.id + }).then((data) => { + activityList.value = data + }) }) .finally(() => { processInstanceLoading.value = false diff --git a/yudao-ui-admin-vue3/src/views/bpm/processInstance/detail2.vue b/yudao-ui-admin-vue3/src/views/bpm/processInstance/detail2.vue deleted file mode 100644 index 6b44acc76..000000000 --- a/yudao-ui-admin-vue3/src/views/bpm/processInstance/detail2.vue +++ /dev/null @@ -1,75 +0,0 @@ - - -