diff --git a/yudao-ui-admin-vue3/src/views/bpm/task/done/done.data.ts b/yudao-ui-admin-vue3/src/views/bpm/task/done/done.data.ts index d28391cf1..295165e7f 100644 --- a/yudao-ui-admin-vue3/src/views/bpm/task/done/done.data.ts +++ b/yudao-ui-admin-vue3/src/views/bpm/task/done/done.data.ts @@ -1,92 +1,52 @@ -import { CrudSchema, useCrudSchemas } from '@/hooks/web/useCrudSchemas' +import { VxeCrudSchema, useVxeCrudSchemas } from '@/hooks/web/useVxeCrudSchemas' + const { t } = useI18n() // 国际化 -// CrudSchema -const crudSchemas = reactive([ - { - label: t('common.index'), - field: 'id', - type: 'index' - }, - { - label: '任务名称', - field: 'name', - search: { - show: true - } - }, - { - label: '所属流程', - field: 'processInstance.name' - }, - { - label: '流程发起人', - field: 'processInstance.startUserNickname' - }, - { - label: '结果', - field: 'result', - dictType: DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT, - dictClass: 'number' - }, - { - label: '审批意见', - field: 'reason' - }, - { - label: t('common.createTime'), - field: 'createTime', - search: { - show: true, - component: 'DatePicker', - componentProps: { - type: 'datetimerange', - valueFormat: 'YYYY-MM-DD HH:mm:ss', - defaultTime: [new Date(2000, 1, 1, 0, 0, 0), new Date(2000, 2, 1, 23, 59, 59)], - shortcuts: [ - { - text: '近一周', - value: () => { - const end = new Date() - const start = new Date() - start.setTime(start.getTime() - 3600 * 1000 * 24 * 7) - return [start, end] - } - }, - { - text: '近一个月', - value: () => { - const end = new Date() - const start = new Date() - start.setTime(start.getTime() - 3600 * 1000 * 24 * 30) - return [start, end] - } - }, - { - text: '近三个月', - value: () => { - const end = new Date() - const start = new Date() - start.setTime(start.getTime() - 3600 * 1000 * 24 * 90) - return [start, end] - } - } - ] +// 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 } } - }, - { - label: '审批时间', - field: 'endTime' - }, - { - label: '耗时', - field: 'durationInMillis' - }, - { - label: t('table.action'), - field: 'action', - width: '100px' - } -]) -export const { allSchemas } = useCrudSchemas(crudSchemas) + ] +}) +export const { allSchemas } = useVxeCrudSchemas(crudSchemas) diff --git a/yudao-ui-admin-vue3/src/views/bpm/task/done/index.vue b/yudao-ui-admin-vue3/src/views/bpm/task/done/index.vue index db4b36832..f6314cb6f 100644 --- a/yudao-ui-admin-vue3/src/views/bpm/task/done/index.vue +++ b/yudao-ui-admin-vue3/src/views/bpm/task/done/index.vue @@ -1,65 +1,37 @@ - -