!86 feat(inspectTask): 台账列表新增业务状态列
* Merge branch 'master' of gitee.com:sz_30/supervision-vue into feature/… * feat(inspectTask): 台账列表新增业务状态列 * feat(feedback): 反馈信息弹窗标题增加已完成条数统计
This commit is contained in:
@@ -51,7 +51,7 @@
|
||||
</a-form>
|
||||
</div>
|
||||
<!--引用表格-->
|
||||
<BasicTable @register="registerTable" :rowSelection="rowSelection">
|
||||
<BasicTable @register="registerTable" :rowSelection="rowSelection" @fetch-success="onFetchSuccess">
|
||||
<!--插槽:table标题-->
|
||||
<template #tableTitle>
|
||||
<a-button type="primary" v-auth="'dqinspecttask:dq_inspect_task:add'" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
|
||||
@@ -153,7 +153,7 @@
|
||||
import Icon from '/@/components/Icon/index';
|
||||
import SzSelectDept from '/@/components/Form/src/jeecg/components/SzSelectDept.vue';
|
||||
import SzDeptUserModal from '/@/components/semri/deptUserComponent/SzDeptUserModal.vue';
|
||||
import { startProcessSchedules } from '/@/api/common/api';
|
||||
import { startProcessSchedules, getBusinessStatus } from '/@/api/common/api';
|
||||
import { dateUtil } from '/@/utils/dateUtil';
|
||||
import FlowScheduleStartModal from './components/DqInspectTaskFlowScheduleStartModal.vue';
|
||||
import BusinessProcessListModal from '/src/components/semri/process/BusinessProcessListModal.vue';
|
||||
@@ -206,7 +206,7 @@
|
||||
},
|
||||
});
|
||||
|
||||
const [registerTable, { reload }, { rowSelection, selectedRowKeys }] = tableContext;
|
||||
const [registerTable, { reload, setTableData, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
|
||||
|
||||
// 高级查询配置
|
||||
const superQueryConfig = reactive(superQuerySchema);
|
||||
@@ -583,6 +583,38 @@
|
||||
reload();
|
||||
}
|
||||
|
||||
async function refreshBusinessStatus(records) {
|
||||
if (!records || records.length === 0) return;
|
||||
try {
|
||||
const results = await Promise.all(
|
||||
records.map((item) =>
|
||||
getBusinessStatus({ businessId: item.id }).catch(() => null)
|
||||
)
|
||||
);
|
||||
const statusMap: Record<string, string> = {};
|
||||
for (const item of results) {
|
||||
if (item?.businessId) {
|
||||
statusMap[item.businessId] = item.status_dictText || '';
|
||||
}
|
||||
}
|
||||
for (const item of records) {
|
||||
const status = statusMap[item.id];
|
||||
if (status !== undefined) {
|
||||
item.status_dictText = status;
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
// 静默处理查询异常
|
||||
}
|
||||
}
|
||||
|
||||
async function onFetchSuccess(result) {
|
||||
if (result?.items?.length > 0) {
|
||||
await refreshBusinessStatus(result.items);
|
||||
setTableData([...getDataSource()]);
|
||||
}
|
||||
}
|
||||
|
||||
function handleFormJoinChange(key, value) {
|
||||
if (typeof value != 'string') {
|
||||
queryParam[key] = value.join(',');
|
||||
|
||||
Reference in New Issue
Block a user