diff --git a/src/api/common/api.ts b/src/api/common/api.ts
index dca4646..2f6c189 100644
--- a/src/api/common/api.ts
+++ b/src/api/common/api.ts
@@ -174,7 +174,7 @@ export const startProcess = (params) => {
* 根据业务ID查询流程列表
* @param params
*/
-export const queryByBusinessId = (params) => defHttp.get({ url: Api.queryByBusinessId, params }, { isTransformResponse: false });
+export const queryByBusinessId = (params) => defHttp.get({ url: Api.queryByBusinessId, params });
/**
* 删除单个流程实例
diff --git a/src/components/semri/process/BusinessProcessListModal.vue b/src/components/semri/process/BusinessProcessListModal.vue
index 759a6e1..eb3744e 100644
--- a/src/components/semri/process/BusinessProcessListModal.vue
+++ b/src/components/semri/process/BusinessProcessListModal.vue
@@ -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 || '删除流程失败');
}
diff --git a/src/components/semri/process/QueryProcessList.data.ts b/src/components/semri/process/QueryProcessList.data.ts
index dd84d92..b61e9f9 100644
--- a/src/components/semri/process/QueryProcessList.data.ts
+++ b/src/components/semri/process/QueryProcessList.data.ts
@@ -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",
diff --git a/src/views/bg/bgpartymatter/components/BgPartymatterForm.vue b/src/views/bg/bgpartymatter/components/BgPartymatterForm.vue
index 6fceb58..9ff0f28 100644
--- a/src/views/bg/bgpartymatter/components/BgPartymatterForm.vue
+++ b/src/views/bg/bgpartymatter/components/BgPartymatterForm.vue
@@ -15,13 +15,13 @@
-
-
+
+
-
-
+
+