!151 style(bg,dq): 查询区域高级查询按钮调整到重置前,统一列表代码格式

* style(bg,dq): 查询区域高级查询按钮调整到重置前,统一列表代码格式
* fix(inspectProblem): 年份筛选与表单字段改用年份选择器
* fix(bgpartymatter): 分管所领导下拉按角色跨部门查询
* style(xispeak,inspectTask): 表单整行字段 label 缩窄实现输入框左对齐
* fix(xispeak): 督办状态改读 bpmStatus,修复发起收集流程误置已完成
* fix(xispeak): 导出切 EasyExcel 端点
This commit is contained in:
wsm
2026-08-13 03:16:15 +00:00
parent 5f2eee8d2a
commit 9742faf892
13 changed files with 316 additions and 286 deletions
+14 -69
View File
@@ -4,7 +4,7 @@
<div class="jeecg-basic-table-form-container">
<a-form ref="formRef" @keyup.enter="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-row :gutter="24">
<a-col :xl="6" :lg="6" :md="8" :sm="12">
<a-col :xl="5" :lg="6" :md="8" :sm="12">
<a-form-item name="speakStatus">
<template #label>
<a-tooltip title="支持模糊查询,输入重要讲话指示批示情况关键词">习总书记重要讲话指示批示</a-tooltip>
@@ -12,8 +12,8 @@
<a-tooltip title="支持模糊查询,输入重要讲话指示批示情况关键词"><JInput v-model:value="queryParam.speakStatus" type="like" placeholder="请输入重要讲话指示批示情况" allow-clear trim @change="debouncedSearchQuery" /></a-tooltip>
</a-form-item>
</a-col>
<a-col :xl="5" :lg="6" :md="8" :sm="12">
<a-form-item name="implDept">
<a-col :xl="6" :lg="6" :md="8" :sm="12">
<a-form-item name="implDept" :label-col="{ xs: 24, sm: 8, xl: 6 }" :wrapper-col="{ xs: 24, sm: 16, xl: 18 }">
<template #label>
<a-tooltip title="按牵头部门筛选">牵头部门</a-tooltip>
</template>
@@ -48,9 +48,9 @@
<a-col :xl="5" :lg="6" :md="8" :sm="12">
<div class="table-page-search-submitButtons">
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
<a-button preIcon="ant-design:reload-outlined" @click="searchReset">重置</a-button>
<!-- 高级查询 -->
<super-query :config="superQueryConfig" @search="handleSuperQuery" />
<a-button preIcon="ant-design:reload-outlined" @click="searchReset">重置</a-button>
</div>
</a-col>
</a-row>
@@ -63,7 +63,7 @@
:expandedRowKeys="expandedRowKeys"
@expand="handleExpand"
@fetch-success="onFetchSuccess"
:rowClassName="(r) => (r.superviseStatus || r.bpmStatus) ? 'status-row-' + (r.superviseStatus || r.bpmStatus) : ''"
:rowClassName="(r) => r.bpmStatus ? 'status-row-' + r.bpmStatus : ''"
>
<!--插槽:table标题-->
<template #tableTitle>
@@ -162,7 +162,7 @@ import { PARTY_COMMITTEE_DEPT_ID, SDW_LEADER_ROLE_ID } from '/@/constant/supervi
list,
deleteBgXiSpeak,
batchDeleteBgXiSpeak,
getExportUrl,
getExportXlsByEasyExcelUrl,
getImportUrl,
getExportXlsHeadersUrl,
getImportExcelByEasyExcelUrl,
@@ -174,7 +174,6 @@ import { PARTY_COMMITTEE_DEPT_ID, SDW_LEADER_ROLE_ID } from '/@/constant/supervi
withDrawXiSpeak,
queryFeedbackCounts,
statusStats,
getBusinessStatus,
} from './BgXiSpeak.api';
const FLOW_CODE = 'dev_bg_xi_speak_001';
@@ -220,7 +219,7 @@ import { PARTY_COMMITTEE_DEPT_ID, SDW_LEADER_ROLE_ID } from '/@/constant/supervi
},
exportConfig: {
name: '习总书记重要讲话指示批示情况',
url: getExportUrl,
url: getExportXlsByEasyExcelUrl,
},
importConfig: {
url: getImportUrl,
@@ -390,7 +389,7 @@ import { PARTY_COMMITTEE_DEPT_ID, SDW_LEADER_ROLE_ID } from '/@/constant/supervi
result = result.records ? result.records : result;
if (result && result.length > 0) {
record.children = getDataByResult(result);
await Promise.all([refreshFeedbackCounts(record.children), refreshSuperviseStatus(record.children)]);
await refreshFeedbackCounts(record.children);
// 触发表格重新渲染
updateTableDataRecord(record.id, { ...record });
} else {
@@ -444,18 +443,9 @@ import { PARTY_COMMITTEE_DEPT_ID, SDW_LEADER_ROLE_ID } from '/@/constant/supervi
const ids = collectAllIds(records);
if (ids.length === 0) return;
try {
const res = await queryFeedbackCounts({ ids: ids.join(',') });
const data = Array.isArray(res) ? res : res?.records || res?.result || [];
const countsMap: Record<string, { total: number; closed: number }> = {};
for (const item of data) {
const id = item.mainId || item.id || item.main_id;
if (id) {
countsMap[id] = {
total: item.total ?? item.implCount ?? 0,
closed: item.closed ?? item.closedCount ?? 0,
};
}
}
// 后端返回 Map<mainId, {total, closed}>,直接作为 countsMap 使用
const countsMap: Record<string, { total: number; closed: number }> =
(await queryFeedbackCounts({ ids: ids.join(',') })) || {};
const updateFn = (list) => {
if (!list) return;
for (const item of list) {
@@ -473,56 +463,14 @@ import { PARTY_COMMITTEE_DEPT_ID, SDW_LEADER_ROLE_ID } from '/@/constant/supervi
}
}
/**
* 批量刷新督办状态:流程状态与督办事项(反馈)闭环情况合并推导
* 规则:运行中的流程始终督办中;有督办事项时全部闭环=已完成、有未闭环=督办中;无督办事项以流程状态为准
*/
async function refreshSuperviseStatus(records) {
const ids = collectAllIds(records).filter((id) => !String(id).includes('loadChild'));
if (ids.length === 0) return;
try {
const [statusResults, countsRes] = await Promise.all([
Promise.allSettled(ids.map((id) => getBusinessStatus({ businessId: id }))),
queryFeedbackCounts({ ids: ids.join(',') }),
]);
const countsMap = countsRes || {};
const statusMap: Record<string, string> = {};
statusResults.forEach((res, index) => {
const id = ids[index];
let status = res.status === 'fulfilled' && res.value && res.value.status ? res.value.status : undefined;
const counts = countsMap[id];
if (counts && Number(counts.total) > 0) {
if (status !== '2') {
status = Number(counts.closed) >= Number(counts.total) ? '3' : '2';
}
}
if (status) {
statusMap[id] = status;
}
});
const updateFn = (list) => {
if (!list) return;
for (const item of list) {
if (statusMap[item.id]) {
item.superviseStatus = statusMap[item.id];
}
if (item.children) updateFn(item.children);
}
};
updateFn(records);
} catch (e) {
// 静默处理查询异常
}
}
/**
* 接口请求成功后回调
*/
async function onFetchSuccess(result) {
getDataByResult(result.items) && loadDataByExpandedRows();
if (result.items && result.items.length > 0) {
await Promise.all([refreshFeedbackCounts(result.items), refreshSuperviseStatus(result.items)]);
// 触发表格重新渲染以显示更新后的 implCount / closedCount / 督办状态
await refreshFeedbackCounts(result.items);
// 触发表格重新渲染以显示更新后的 implCount / closedCount
setTableData([...getDataSource()]);
}
}
@@ -559,9 +507,6 @@ import { PARTY_COMMITTEE_DEPT_ID, SDW_LEADER_ROLE_ID } from '/@/constant/supervi
}
};
fn(getDataSource());
await refreshSuperviseStatus(records);
// 触发表格重新渲染以显示子节点督办状态
setTableData([...getDataSource()]);
}
}
}
@@ -872,7 +817,7 @@ import { PARTY_COMMITTEE_DEPT_ID, SDW_LEADER_ROLE_ID } from '/@/constant/supervi
};
await startProcessSchedules(params);
await saveOrUpdateDict({ id: record.id, bpmStatus: '3', supervisionCount: nextSuperviseCount, completionStatus: 0 }, true);
await saveOrUpdateDict({ id: record.id, bpmStatus: '2', supervisionCount: nextSuperviseCount, completionStatus: 0 }, true);
createMessage.success('发起成功');
reload();
fetchStatusStats();