yxk-20260529-巡视整改提升台账,任务清单

1、将整改任务列表调整为“问题清单 + 任务清单”的扁平台账。
2、每一行仍代表一条整改任务,补齐展示其所属的问题分类、面上问题、具体问题。
3、相同的问题分类、面上问题、具体问题在表格中使用 rowSpan 合并单元格,形成直观台账。
4、发起流程仍以“整改任务”为粒度,即每条整改措施单独发起流程。
This commit is contained in:
ye1023
2026-05-29 15:31:47 +08:00
parent 8f1007ff70
commit c22da8a67a
3 changed files with 159 additions and 8 deletions
+41 -8
View File
@@ -83,8 +83,8 @@
import { useListPage } from '/@/hooks/system/useListPage'
import {useModal} from '/@/components/Modal';
import DqInspectTaskModal from './components/DqInspectTaskModal.vue'
import {columns, superQuerySchema} from './DqInspectTask.data';
import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './DqInspectTask.api';
import {ledgerColumns, superQuerySchema} from './DqInspectTask.data';
import {ledgerList, deleteOne, batchDelete, getImportUrl,getExportUrl} from './DqInspectTask.api';
import {downloadFile} from '/@/utils/common/renderUtils';
import { useMessage } from '/@/hooks/web/useMessage';
import JSelectDept from '/@/components/Form/src/jeecg/components/JSelectDept.vue';
@@ -105,8 +105,8 @@
const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({
tableProps:{
title: 'dq_inspect_task',
api: list,
columns,
api: ledgerList,
columns: ledgerColumns,
canResize:false,
useSearchForm: false,
actionColumn: {
@@ -116,6 +116,9 @@
beforeFetch: async (params) => {
return Object.assign(params, queryParam);
},
afterFetch: async (items) => {
return calcLedgerRowSpan(items);
},
},
exportConfig: {
name:"dq_inspect_task",
@@ -190,9 +193,39 @@
function handleSuccess() {
(selectedRowKeys.value = []) && reload();
}
/**
* 操作栏
*/
/**
* 只在当前页内计算台账合并行,避免跨页合并导致表格分页行为不可控。
*/
function calcLedgerRowSpan(items) {
if (!items || items.length === 0) {
return items;
}
calcGroupRowSpan(items, (item) => item.categoryId || item.categoryName, '_categoryRowSpan');
calcGroupRowSpan(items, (item) => `${item.categoryId || item.categoryName}_${item.surfaceId || item.surfaceName}`, '_surfaceRowSpan');
calcGroupRowSpan(items, (item) => `${item.categoryId || item.categoryName}_${item.surfaceId || item.surfaceName}_${item.specificId || item.specificName}`, '_specificRowSpan');
return items;
}
function calcGroupRowSpan(items, getKey, field) {
let start = 0;
while (start < items.length) {
const key = getKey(items[start]);
let end = start + 1;
while (end < items.length && getKey(items[end]) === key) {
end++;
}
const span = end - start;
items[start][field] = span;
for (let i = start + 1; i < end; i++) {
items[i][field] = 0;
}
start = end;
}
}
/**
* 操作栏
*/
function getTableAction(record){
return [
{
@@ -320,4 +353,4 @@
width: 100%;
}
}
</style>
</style>