新增ddl字段并写入中间表,在待办里记录

This commit is contained in:
wsm
2026-05-18 15:48:00 +08:00
parent 38c93bf64a
commit b586fe8a53
4 changed files with 76 additions and 30 deletions
+18 -22
View File
@@ -1,6 +1,6 @@
<template>
<div>
<BasicTable @register="registerTable" :expandedRowKeys="expandedRowKeys" @expand="handleExpand" @fetch-success="onFetchSuccess">
<BasicTable @register="registerTable" :rowSelection="rowSelection" :expandedRowKeys="expandedRowKeys" @expand="handleExpand" @fetch-success="onFetchSuccess">
<!--插槽:table标题-->
<template #tableTitle>
<a-button type="primary" v-auth="'bg.xispeak:bg_xi_speak:add'" @click="handleAdd" preIcon="ant-design:plus-outlined">新增</a-button>
@@ -137,6 +137,7 @@
const flowScheduleModalRef = ref();
const feedbackRightNowModalRef = ref();
const businessProcessListModalRef = ref();
const currentBusinessId = ref('');
const pendingFeedbackRightNow = ref(0);
const processColumns = taskTaskColumns;
const selectedFeedbackId = ref<string | number | null>(null);
@@ -160,7 +161,6 @@
const showSdwLeaderSelect = computed(() => queryParam.value.needSdwApproval === '1');
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
designScope: 'bg-xispeak-template',
tableProps: {
title: '习总书记重要讲话指示批示情况',
api: list,
@@ -168,30 +168,14 @@
canResize: false,
useSearchForm: false,
isTreeTable: true,
clickToRowSelect: true,
actionColumn: {
width: 120,
width: 240,
fixed: 'right',
},
beforeFetch: async (params) => {
params.hasQuery = 'true';
return Object.assign(params, queryParam.value);
},
afterFetch: (result) => {
if (result && result.length > 0) {
result.forEach((item) => {
if (item.hasChild == '1' && (!item.children || item.children.length === 0)) {
item.children = [{ id: item.id + '_loadChild', name: 'loading...', isLoading: true }];
}
});
}
return result;
},
pagination: {
current: 1,
pageSize: 10,
pageSizeOptions: ['10', '20', '30'],
},
},
exportConfig: {
name: '习总书记重要讲话指示批示情况',
@@ -203,7 +187,7 @@
},
});
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { selectedRowKeys }] = tableContext;
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
const mainId = computed(() => (unref(selectedRowKeys).length > 0 ? unref(selectedRowKeys)[0] : ''));
provide('mainId', mainId);
@@ -565,13 +549,25 @@
}
function handleQueryProcess(record) {
currentBusinessId.value = record.id;
businessProcessListModalRef.value?.open({
title: '流程列表',
businessId: record.id,
columns: '',
onDeleteProcess: handleDeleteProcess,
});
}
async function handleDeleteProcess(processRecord, reload) {
const res = await withDrawXiSpeak({ id: currentBusinessId.value });
if (res.success) {
createMessage.success(res.message || '删除流程成功');
await reload();
} else {
createMessage.error(res.message || '删除流程失败');
}
}
async function handleFlowScheduleConfirm({ payload, options }) {
const record = payload?.record || {};
const flowCode = payload?.flowCode || FLOW_CODE;
@@ -627,7 +623,7 @@
deptId: deptId,
deptLeaderId: deptId,
requireFinishDate: formatDate(record.time, 'YYYY-MM-DD'),
deadline: formatDate(record.time, 'YYYY-MM-DD HH:mm:ss'),
deadline: record.deadline || formatDate(record.time, 'YYYY-MM-DD HH:mm:ss'),
},
};
@@ -664,7 +660,7 @@
deptId: options.deptId || record.leadDepartment,
deptLeaderId: record.responsiblePerson,
requireFinishDate: formatDate(record.time, 'YYYY-MM-DD'),
deadline: formatDate(record.time, 'YYYY-MM-DD HH:mm:ss'),
deadline: record.deadline || formatDate(record.time, 'YYYY-MM-DD HH:mm:ss'),
},
};