!86 feat(inspectTask): 台账列表新增业务状态列

* Merge branch 'master' of gitee.com:sz_30/supervision-vue into feature/…
* feat(inspectTask): 台账列表新增业务状态列
* feat(feedback): 反馈信息弹窗标题增加已完成条数统计
This commit is contained in:
wsm
2026-07-07 02:52:56 +00:00
parent 9092d126e9
commit 01db46e67c
4 changed files with 56 additions and 7 deletions
@@ -110,9 +110,15 @@
}, },
]; ];
const completedCount = computed(() =>
feedbackTableData.value.filter((item) => item.completionStatus_dictText === '已完成').length
);
const title = computed(() => { const title = computed(() => {
const count = loading.value ? '加载中' : `${feedbackTableData.value.length}`; if (loading.value) return '反馈信息(加载中';
return `办理情况(${count}`; const total = feedbackTableData.value.length;
const done = completedCount.value;
return `反馈信息(共 ${total} 条,已完成 ${done} 条)`;
}); });
async function open(record: Recordable) { async function open(record: Recordable) {
@@ -49,9 +49,15 @@
const loading = ref(false); const loading = ref(false);
const feedbackTableData = ref<Recordable[]>([]); const feedbackTableData = ref<Recordable[]>([]);
const completedCount = computed(() =>
feedbackTableData.value.filter((item) => item.bpmStatus_dictText === '已完成').length
);
const title = computed(() => { const title = computed(() => {
const count = loading.value ? '加载中' : `${feedbackTableData.value.length}`; if (loading.value) return '反馈信息(加载中';
return `办理情况(${count}`; const total = feedbackTableData.value.length;
const done = completedCount.value;
return `反馈信息(共 ${total} 条,已完成 ${done} 条)`;
}); });
const columns: BasicColumn[] = [ const columns: BasicColumn[] = [
@@ -295,4 +295,9 @@ export const ledgerColumns: BasicColumn[] = [
align:"center", align:"center",
dataIndex: 'taskStatus' dataIndex: 'taskStatus'
}, },
{
title: '业务状态',
align:"center",
dataIndex: 'status_dictText'
},
]; ];
+35 -3
View File
@@ -51,7 +51,7 @@
</a-form> </a-form>
</div> </div>
<!--引用表格--> <!--引用表格-->
<BasicTable @register="registerTable" :rowSelection="rowSelection"> <BasicTable @register="registerTable" :rowSelection="rowSelection" @fetch-success="onFetchSuccess">
<!--插槽:table标题--> <!--插槽:table标题-->
<template #tableTitle> <template #tableTitle>
<a-button type="primary" v-auth="'dqinspecttask:dq_inspect_task:add'" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button> <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 Icon from '/@/components/Icon/index';
import SzSelectDept from '/@/components/Form/src/jeecg/components/SzSelectDept.vue'; import SzSelectDept from '/@/components/Form/src/jeecg/components/SzSelectDept.vue';
import SzDeptUserModal from '/@/components/semri/deptUserComponent/SzDeptUserModal.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 { dateUtil } from '/@/utils/dateUtil';
import FlowScheduleStartModal from './components/DqInspectTaskFlowScheduleStartModal.vue'; import FlowScheduleStartModal from './components/DqInspectTaskFlowScheduleStartModal.vue';
import BusinessProcessListModal from '/src/components/semri/process/BusinessProcessListModal.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); const superQueryConfig = reactive(superQuerySchema);
@@ -583,6 +583,38 @@
reload(); 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) { function handleFormJoinChange(key, value) {
if (typeof value != 'string') { if (typeof value != 'string') {
queryParam[key] = value.join(','); queryParam[key] = value.join(',');