diff --git a/src/api/bpm/task/index.ts b/src/api/bpm/task/index.ts index d214d175..f6763720 100644 --- a/src/api/bpm/task/index.ts +++ b/src/api/bpm/task/index.ts @@ -1,5 +1,9 @@ import request from '@/config/axios' +export type TaskVO = { + id: number +} + export const getTodoTaskPage = async (params) => { return await request.get({ url: '/bpm/task/todo-page', params }) } @@ -32,3 +36,8 @@ export const getTaskListByProcessInstanceId = async (processInstanceId) => { url: '/bpm/task/list-by-process-instance-id?processInstanceId=' + processInstanceId }) } + +// 导出任务 +export const exportTask = async (params) => { + return await request.download({ url: '/bpm/task/export', params }) +} diff --git a/src/router/modules/remaining.ts b/src/router/modules/remaining.ts index 2dc9522d..92625cdc 100644 --- a/src/router/modules/remaining.ts +++ b/src/router/modules/remaining.ts @@ -317,6 +317,18 @@ const remainingRouter: AppRouteRecordRaw[] = [ title: '查看 OA 请假', activeMenu: 'bpm/oa/leave/detail' } + }, + { + path: '/bpm/task/done', + component: () => import('@/views/bpm/task/done/index.vue'), + name: 'TaskDone', + meta: { + noCache: true, + hidden: true, + canTo: true, + title: '已办任务', + activeMenu: 'bpm/task/done/index' + } } ] }, diff --git a/src/views/bpm/task/done/Taskdetail.vue b/src/views/bpm/task/done/Taskdetail.vue new file mode 100644 index 00000000..cef57cb7 --- /dev/null +++ b/src/views/bpm/task/done/Taskdetail.vue @@ -0,0 +1,47 @@ + + diff --git a/src/views/bpm/task/done/done.data.ts b/src/views/bpm/task/done/done.data.ts deleted file mode 100644 index 5944671f..00000000 --- a/src/views/bpm/task/done/done.data.ts +++ /dev/null @@ -1,52 +0,0 @@ -import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas' - -const { t } = useI18n() // 国际化 - -// crudSchemas -const crudSchemas = reactive({ - primaryKey: 'id', - primaryType: null, - action: true, - columns: [ - { - title: '任务编号', - field: 'id', - table: { - width: 320 - } - }, - { - title: '任务名称', - field: 'name', - isSearch: true - }, - { - title: '所属流程', - field: 'processInstance.name' - }, - { - title: '流程发起人', - field: 'processInstance.startUserNickname' - }, - { - title: t('common.status'), - field: 'result', - dictType: DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT, - dictClass: 'number', - isSearch: true - }, - { - title: '原因', - field: 'reason' - }, - { - title: t('common.createTime'), - field: 'createTime', - formatter: 'formatDate', - table: { - width: 180 - } - } - ] -}) -export const { allSchemas } = useVxeCrudSchemas(crudSchemas) diff --git a/src/views/bpm/task/done/index.vue b/src/views/bpm/task/done/index.vue index da05549a..735f4edc 100644 --- a/src/views/bpm/task/done/index.vue +++ b/src/views/bpm/task/done/index.vue @@ -1,30 +1,147 @@ -