yxk-20260529-巡视整改提升台账,任务清单
1、将整改任务列表调整为“问题清单 + 任务清单”的扁平台账。 2、每一行仍代表一条整改任务,补齐展示其所属的问题分类、面上问题、具体问题。 3、相同的问题分类、面上问题、具体问题在表格中使用 rowSpan 合并单元格,形成直观台账。 4、发起流程仍以“整改任务”为粒度,即每条整改措施单独发起流程。
This commit is contained in:
@@ -5,6 +5,7 @@ const { createConfirm } = useMessage();
|
||||
|
||||
enum Api {
|
||||
list = '/dqinspecttask/dqInspectTask/list',
|
||||
ledgerList = '/dqinspecttask/dqInspectTask/ledgerList',
|
||||
save='/dqinspecttask/dqInspectTask/add',
|
||||
edit='/dqinspecttask/dqInspectTask/edit',
|
||||
deleteOne = '/dqinspecttask/dqInspectTask/delete',
|
||||
@@ -44,6 +45,13 @@ export const specificProblemOptions = () => defHttp.get({url: Api.specificProble
|
||||
export const list = (params) =>
|
||||
defHttp.get({url: Api.list, params});
|
||||
|
||||
/**
|
||||
* 整改任务台账列表接口
|
||||
* @param params
|
||||
*/
|
||||
export const ledgerList = (params) =>
|
||||
defHttp.get({url: Api.ledgerList, params});
|
||||
|
||||
/**
|
||||
* 删除单个
|
||||
*/
|
||||
|
||||
@@ -206,3 +206,113 @@ export const superQuerySchema = {
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
const mergeCell = (field: string) => {
|
||||
return (record) => ({ rowSpan: record[field] ?? 1 });
|
||||
};
|
||||
|
||||
// 整改任务台账列:前三列按问题层级合并,后续列仍按整改任务逐行展示。
|
||||
export const ledgerColumns: BasicColumn[] = [
|
||||
{
|
||||
title: '问题分类',
|
||||
align:"center",
|
||||
dataIndex: 'categoryName',
|
||||
customCell: mergeCell('_categoryRowSpan'),
|
||||
},
|
||||
{
|
||||
title: '面上问题',
|
||||
align:"center",
|
||||
dataIndex: 'surfaceName',
|
||||
customCell: mergeCell('_surfaceRowSpan'),
|
||||
},
|
||||
{
|
||||
title: '具体问题',
|
||||
align:"center",
|
||||
dataIndex: 'specificName',
|
||||
customCell: mergeCell('_specificRowSpan'),
|
||||
},
|
||||
{
|
||||
title: '巡视建议',
|
||||
align:"center",
|
||||
dataIndex: 'inspectAdvice'
|
||||
},
|
||||
{
|
||||
title: '密级',
|
||||
align:"center",
|
||||
dataIndex: 'secretLevel_dictText'
|
||||
},
|
||||
{
|
||||
title: '整改措施',
|
||||
align:"center",
|
||||
dataIndex: 'improveMeasure'
|
||||
},
|
||||
{
|
||||
title: '完成时限',
|
||||
align:"center",
|
||||
dataIndex: 'deadline',
|
||||
customRender:({text}) =>{
|
||||
text = !text ? "" : (text.length > 10 ? text.substr(0,10) : text);
|
||||
return text;
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '目标节点',
|
||||
align:"center",
|
||||
dataIndex: 'targetNode'
|
||||
},
|
||||
{
|
||||
title: '措施责任领导',
|
||||
align:"center",
|
||||
dataIndex: 'measureResLeader_dictText'
|
||||
},
|
||||
{
|
||||
title: '措施责任部门',
|
||||
align:"center",
|
||||
dataIndex: 'measureResDept_dictText'
|
||||
},
|
||||
{
|
||||
title: '整改交付成果',
|
||||
align:"center",
|
||||
dataIndex: 'rectificationEvidence'
|
||||
},
|
||||
{
|
||||
title: '成效评价标准',
|
||||
align:"center",
|
||||
dataIndex: 'evaluationCriterion'
|
||||
},
|
||||
{
|
||||
title: '检查情况',
|
||||
align:"center",
|
||||
dataIndex: 'inspectionStatus'
|
||||
},
|
||||
{
|
||||
title: '监督意见',
|
||||
align:"center",
|
||||
dataIndex: 'supervisoryOpinion'
|
||||
},
|
||||
{
|
||||
title: '措施数量',
|
||||
align:"center",
|
||||
dataIndex: 'measureCount'
|
||||
},
|
||||
{
|
||||
title: '流程状态',
|
||||
align:"center",
|
||||
dataIndex: 'bpmStatus_dictText'
|
||||
},
|
||||
{
|
||||
title: '整改状态',
|
||||
align:"center",
|
||||
dataIndex: 'taskStatus'
|
||||
},
|
||||
{
|
||||
title: '督办次数',
|
||||
align:"center",
|
||||
dataIndex: 'superviseCount'
|
||||
},
|
||||
{
|
||||
title: '排序',
|
||||
align:"center",
|
||||
dataIndex: 'sortNo'
|
||||
},
|
||||
];
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user