fix: 增加已办页面的独立链接
fix: 组织管理的主列表改为懒加载
This commit is contained in:
111
src/views/workflow/task/components/processTasks/TaskDoneV2.vue
Normal file
111
src/views/workflow/task/components/processTasks/TaskDoneV2.vue
Normal file
@ -0,0 +1,111 @@
|
||||
<template>
|
||||
<BasicTable @register="registerTable" @selection-change="selectionChange">
|
||||
<template #toolbar>
|
||||
<div class="button-box">
|
||||
<RejectProcess
|
||||
:taskId="taskId"
|
||||
:processId="processId"
|
||||
@close="reload"
|
||||
@restart="restartProcess"
|
||||
class="mr-2"
|
||||
><a-button v-auth="'processtasks:withdraw'">{{ t('撤回') }}</a-button></RejectProcess
|
||||
>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template #currentProgress="{ record }">
|
||||
<a-progress v-if="record.currentProgress" :percent="record.currentProgress" size="small" />
|
||||
</template>
|
||||
</BasicTable>
|
||||
<LaunchProcess
|
||||
v-if="restartProcessVisible"
|
||||
:schemaId="schemaId"
|
||||
:taskId="taskId"
|
||||
@close="restartProcessClose"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import userTaskTable from './../../hooks/userTaskTable';
|
||||
|
||||
import { ref } from 'vue';
|
||||
|
||||
import LookProcess from './../LookProcess.vue';
|
||||
import LaunchProcess from './../LaunchProcess.vue';
|
||||
import RejectProcess from './../RejectProcess.vue';
|
||||
|
||||
import { BasicTable, useTable, BasicColumn } from '/@/components/Table';
|
||||
import { getSchemaTask } from '/@/api/workflow/process';
|
||||
import { TaskTypeUrl } from '/@/enums/workflowEnum';
|
||||
import { useI18n } from '/@/hooks/web/useI18n';
|
||||
const { t } = useI18n();
|
||||
const restartProcessVisible = ref(false);
|
||||
const configColumns: BasicColumn[] = [
|
||||
{
|
||||
title: t('流水号'),
|
||||
dataIndex: 'serialNumber',
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: t('流程名称'),
|
||||
dataIndex: 'processName',
|
||||
width: '32%',
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
title: t('任务名称'),
|
||||
dataIndex: 'currentTaskName',
|
||||
width: '17%',
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
title: t('当前进度'),
|
||||
dataIndex: 'currentProgress',
|
||||
width: '17%',
|
||||
slots: { customRender: 'currentProgress' },
|
||||
},
|
||||
{
|
||||
title: t('发起人'),
|
||||
dataIndex: 'originator',
|
||||
align: 'left',
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: t('发起时间'),
|
||||
dataIndex: 'createTime',
|
||||
align: 'left',
|
||||
width: 120,
|
||||
},
|
||||
];
|
||||
|
||||
const { formConfig, processId, taskId, schemaId, selectionChange } = userTaskTable();
|
||||
const [registerTable, { reload }] = useTable({
|
||||
title: t('已办任务列表'),
|
||||
api: getSchemaTask,
|
||||
rowKey: 'id',
|
||||
columns: configColumns,
|
||||
formConfig: formConfig(),
|
||||
beforeFetch: (params) => {
|
||||
return { data: params, taskUrl: TaskTypeUrl.FINISHED_TASKS };
|
||||
},
|
||||
useSearchForm: true,
|
||||
showTableSetting: true,
|
||||
striped: false,
|
||||
pagination: {
|
||||
pageSize: 18,
|
||||
},
|
||||
indexColumnProps: {
|
||||
width: 50,
|
||||
},
|
||||
});
|
||||
|
||||
function restartProcess() {
|
||||
restartProcessVisible.value = true;
|
||||
}
|
||||
function restartProcessClose() {
|
||||
restartProcessVisible.value = false;
|
||||
reload();
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
Reference in New Issue
Block a user