yxk-20260601-bug修复

1、通用查询督办模块:部门字典显示异常
2、通用查询督办模块:新创建的督办在最下面,需要把最新的放在最上面
This commit is contained in:
ye1023
2026-06-01 14:24:38 +08:00
parent 1e1bb6de29
commit 8844ff27a5
4 changed files with 47 additions and 45 deletions
@@ -53,14 +53,26 @@
const approvalHistoryRef = ref();
const [registerBpmModal, { openModal: bpmPicModal }] = useModal();
const [registerTable, { setColumns, setTableData, setLoading, clearSelectedRowKeys }] = useTable({
const [registerTable, { setColumns, setTableData, reload, clearSelectedRowKeys }] = useTable({
rowKey: 'id',
columns: columns,
api: queryByBusinessId,
immediate: false,
useSearchForm: false,
canResize: false,
pagination: false,
pagination: {
current: 1,
pageSize: 10,
pageSizeOptions: ['10', '20', '30'],
},
showIndexColumn: true,
bordered: true,
beforeFetch: (params) => {
return {
...params,
businessId: currentBusinessId.value,
};
},
actionColumn: {
title: '操作',
dataIndex: 'action',
@@ -79,21 +91,8 @@
setTableData([]);
return;
}
setLoading(true);
try {
const res = await queryByBusinessId({ businessId: currentBusinessId.value });
const list = Array.isArray(res?.result) ? res.result : [];
setTableData(list);
if (!list.length) {
createMessage.warning(res?.message || '未查询到流程数据');
}
} catch (error) {
setTableData([]);
} finally {
setLoading(false);
clearSelectedRowKeys();
}
await reload({ page: 1 });
clearSelectedRowKeys();
}
async function open(params: OpenParams = {}) {
@@ -124,7 +123,7 @@
async function handlePreviewApprovalHistory(record) {
const processInstId = record?.processInstId;
if (!processInstId) {
createMessage.error('流程实例ID不能为空');
createMessage.error('流程未发起,请等待流程自动发起');
return;
}
@@ -145,7 +144,7 @@
async function handleDeleteProcess(record) {
const processInstId = record?.processInstId;
if (!processInstId) {
createMessage.error('流程实例ID不能为空');
createMessage.error('流程未发起,请等待流程自动发起');
return;
}
@@ -153,7 +152,7 @@
const res = await deleteSingleProcess({ processInstId });
if (res?.success) {
createMessage.success(res.message || '删除流程成功');
await loadData();
await reload();
} else {
createMessage.error(res?.message || '删除流程失败');
}
@@ -13,6 +13,12 @@ export const columns: BasicColumn[] = [
// align: "center",
// dataIndex: 'flowCode'
// },
{
title: '督办开始时间',
align: 'center',
dataIndex: 'startTime',
width: 160,
},
{
title: '督办标题',
align: 'center',
@@ -27,20 +33,7 @@ export const columns: BasicColumn[] = [
width: 220,
ellipsis: true,
},
{
title: '流程名称',
align: 'center',
dataIndex: 'flowName',
width: 160,
ellipsis: true,
},
{
title: '流程实例ID',
align: 'center',
dataIndex: 'processInstId',
width: 220,
ellipsis: true,
},
// {
// title: '流程类型',
// align: "center",
@@ -165,12 +158,7 @@ export const columns: BasicColumn[] = [
return text;
},
},
{
title: '督办开始时间',
align: 'center',
dataIndex: 'startTime',
width: 160,
},
// {
// title: '截止时间(精确到时分,与 require_finish_date 互补)',
// align: "center",
@@ -183,6 +171,21 @@ export const columns: BasicColumn[] = [
dataIndex: 'actualFinishTime',
width: 160,
},
{
title: '流程名称',
align: 'center',
dataIndex: 'flowName',
width: 160,
ellipsis: true,
},
{
title: '流程实例ID',
align: 'center',
dataIndex: 'processInstId',
width: 220,
ellipsis: true,
},
// {
// title: '是否已逾期',
// align: "center",