yxk-20260714

拆分我的待阅已阅并新增抄送轻量列表接口

- 新增抄送阅读状态支持,ext_act_task_cc 增加 isRead/readTime 映射
- 新增抄送已阅接口,校验当前用户必须为抄送接收人
- 新增我的抄送轻量列表接口 /act/process/extActTaskCc/myList
- 轻量列表以 ext_act_task_cc 为主表查询,返回业务标题、流程名称、抄送节点、发起人、抄送人、抄送时间、已阅时间等字段
- 前端拆分为我的待阅、我的已阅页面,旧我的抄送页面兼容待阅
- 前端列表切换到轻量接口,移除办理人、开始时间、结束时间、耗时等历史任务字段
- 加宽业务标题列,门户待阅预览同步调整
- 新增 Flyway 菜单迁移和抄送查询索引
This commit is contained in:
ye1023
2026-07-14 14:14:19 +08:00
parent 167308f14d
commit 4164cb5b26
7 changed files with 145 additions and 38 deletions
@@ -115,7 +115,7 @@
showIndexColumn: true,
showTableSetting: false,
canResize: false,
scroll: { x: 900 },
scroll: { x: 1050 },
actionColumn: { dataIndex: 'action', fixed: 'right', width: 120 },
useSearchForm: false,
},
@@ -4,25 +4,32 @@ export const ccColumns: BasicColumn[] = [
{
title: '业务标题',
align: 'center',
width: 320,
dataIndex: 'bpmBizTitle',
ellipsis: true,
},
{
title: '任务名称',
title: '抄送节点',
align: 'center',
width: 260,
width: 160,
dataIndex: 'taskName',
},
{
title: '发起人',
align: 'center',
width: 160,
width: 120,
dataIndex: 'processApplyUserName',
},
{
title: '办理人',
title: '抄送人',
align: 'center',
width: 160,
dataIndex: 'taskAssigneeName',
width: 120,
dataIndex: 'ccFromUserName',
},
{
title: '抄送时间',
align: 'center',
width: 170,
dataIndex: 'ccCreateTime',
},
];
@@ -0,0 +1,100 @@
<template>
<BasicTable @register="registerTable">
<template #action="{ record }">
<TableAction :actions="getTableAction(record)" />
</template>
</BasicTable>
<task-handle-modal @register="registerHistoryModal"></task-handle-modal>
</template>
<script lang="ts" setup>
import { BasicTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { useModal } from '/@/components/Modal';
import { useMessage } from '/@/hooks/web/useMessage';
import { columns, readColumns, searchFormSchema } from './task.cc.data';
import { list, markRead } from './task.cc.api';
import { getTaskInfoForHistory } from '../myHandleTask/useTaskList';
import TaskHandleModal from '../myHandleTask/modal/TaskHandleModal.vue';
defineOptions({ name: 'CcTaskListContent' });
const props = withDefaults(
defineProps<{
isRead: 0 | 1;
designScope: string;
showReadAction?: boolean;
showReadTime?: boolean;
}>(),
{
showReadAction: false,
showReadTime: false,
}
);
const { createMessage } = useMessage();
const tableColumns = props.showReadTime ? readColumns : columns;
const { tableContext } = useListPage({
designScope: props.designScope,
pagination: true,
tableProps: {
api: (params) => list({ ...params, isRead: props.isRead }),
columns: tableColumns,
pagination: { pageSize: 12, defaultPageSize: 12 },
showIndexColumn: true,
showTableSetting: true,
canResize: false,
scroll: { x: props.showReadTime ? 1300 : 1150 },
actionColumn: { dataIndex: 'action', fixed: 'right', width: props.showReadAction ? 150 : 100 },
formConfig: {
schemas: searchFormSchema,
autoAdvancedCol: 4,
baseColProps: { xs: 24, sm: 12, md: 6, lg: 6, xl: 6, xxl: 6 },
actionColOptions: { xs: 24, sm: 12, md: 6, lg: 6, xl: 6, xxl: 6 },
},
},
});
const [registerTable, { reload }] = tableContext;
const [registerHistoryModal, { openModal: openHistoryModal }] = useModal();
function getTableAction(record) {
const actions: any[] = [
{
label: '查看详情',
onClick: showHistory.bind(null, record),
},
];
if (props.showReadAction) {
actions.push({
label: '已阅',
popConfirm: {
title: '确定标记为已阅吗?',
placement: 'left',
confirm: handleRead.bind(null, record),
},
});
}
return actions;
}
async function handleRead(record) {
if (!record?.ccId) {
createMessage.warning('缺少抄送记录ID,无法标记已阅');
return;
}
await markRead(record.ccId);
createMessage.success('已阅成功');
await reload();
}
async function showHistory(record) {
let { formData, formUrl } = await getTaskInfoForHistory(record);
formData['PROCESS_TAB_TYPE'] = 'history';
openHistoryModal(true, {
formData,
formUrl,
title: '流程历史',
});
}
</script>
@@ -0,0 +1,9 @@
<template>
<CcTaskListContent :is-read="1" design-scope="my-read-cc-task-list" show-read-time />
</template>
<script lang="ts" setup>
import CcTaskListContent from './CcTaskListContent.vue';
defineOptions({ name: 'MyReadCcTaskList' });
</script>
@@ -0,0 +1,9 @@
<template>
<CcTaskListContent :is-read="0" design-scope="my-unread-cc-task-list" show-read-action />
</template>
<script lang="ts" setup>
import CcTaskListContent from './CcTaskListContent.vue';
defineOptions({ name: 'MyUnreadCcTaskList' });
</script>
@@ -1,7 +1,7 @@
import { defHttp } from '/@/utils/http/axios';
enum Api {
list = '/act/task/taskAllCcHistoryList',
list = '/act/process/extActTaskCc/myList',
read = '/act/process/extActTaskCc/read',
}
@@ -7,53 +7,39 @@ export const columns: BasicColumn[] = [
{
title: '业务标题',
align: 'center',
width: 360,
dataIndex: 'bpmBizTitle',
ellipsis: true,
},
// {
// title: '流程编号',
// align: 'center',
// dataIndex: 'processDefinitionId',
// },
{
title: '流程名称',
align: 'center',
width: 180,
dataIndex: 'processDefinitionName',
},
// {
// title: '流程实例',
// align: 'center',
// dataIndex: 'processInstanceId',
// },
{
title: '任务名称',
title: '抄送节点',
align: 'center',
width: 160,
dataIndex: 'taskName',
},
{
title: '发起人',
align: 'center',
width: 120,
dataIndex: 'processApplyUserName',
},
{
title: '办理人',
title: '抄送人',
align: 'center',
dataIndex: 'taskAssigneeName',
width: 120,
dataIndex: 'ccFromUserName',
},
{
title: '开始时间',
title: '抄送时间',
align: 'center',
dataIndex: 'taskBeginTime',
},
{
title: '结束时间',
align: 'center',
dataIndex: 'taskEndTime',
},
{
title: '耗时',
align: 'center',
dataIndex: 'durationStr',
width: 170,
dataIndex: 'ccCreateTime',
},
];
@@ -65,6 +51,7 @@ export const readColumns: BasicColumn[] = [
{
title: '已阅时间',
align: 'center',
width: 170,
dataIndex: 'readTime',
},
];
@@ -88,9 +75,4 @@ export const searchFormSchema: FormSchema[] = [
// field: 'processDefinitionId',
// component: 'Input',
// },
// {
// label: '应用ID',
// field: 'lowAppId',
// component: 'Input',
// },
];