Files
supervision-test-frontend-repo/src/views/bg/xispeak/BgXiSpeak.data.ts
T
wsmandClaude Opus 4.7 dbec90bbdc fix(xispeak): 督办状态列改为按关联流程实时推导
无督办事项显示未开始,全部已完成显示已完成,有一个未完成显示督办中。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-12 09:51:48 +08:00

284 lines
7.9 KiB
TypeScript

import { BasicColumn } from '/@/components/Table';
import { FormSchema } from '/@/components/Table';
import { rules } from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
{
title: '习近平总书记重要讲话指示批示情况',
align: 'center',
dataIndex: 'speakStatus',
width: 300,
},
{
title: '企业负责同志批示情况',
align: 'center',
dataIndex: 'elmComment',
width: 260,
},
{
title: '学习传达研究部署情况',
align: 'center',
dataIndex: 'status',
width: 260,
},
{
title: '时间',
align: 'center',
dataIndex: 'time',
width: 110,
customRender: ({ text }) => {
text = !text ? '' : text.length > 10 ? text.substr(0, 10) : text;
return text;
},
},
{
title: '截止日期',
align: 'center',
dataIndex: 'deadline',
width: 110,
customRender: ({ text }) => {
if (!text) return '';
if (text instanceof Date) {
const y = text.getFullYear();
const m = String(text.getMonth() + 1).padStart(2, '0');
const d = String(text.getDate()).padStart(2, '0');
return `${y}-${m}-${d}`;
}
text = String(text);
return text.length > 10 ? text.substr(0, 10) : text;
},
},
{
title: '密级',
align: 'center',
dataIndex: 'secretLevel_dictText',
width: 70,
},
{
title: '所党委责任领导',
align: 'center',
dataIndex: 'responsiblePerson_dictText',
width: 120,
},
// {
// title: '落实方案',
// align: 'center',
// dataIndex: 'implPlan',
// },
{
title: '牵头部门',
align: 'center',
dataIndex: 'implDept_dictText',
width: 150,
},
{
title: '贯彻落实措施',
align: 'center',
dataIndex: 'implMeasures',
width: 200,
},
{
title: '会议决策数',
align: 'center',
dataIndex: 'numberOfResolutions',
width: 100,
},
// {
// title: '落实情况',
// align: 'left',
// dataIndex: 'implStatus',
// },
{
title: '落实措施条数',
align: 'center',
dataIndex: 'implCount',
width: 110,
},
{
title: '措施已闭环数',
align: 'center',
dataIndex: 'closedCount',
width: 110,
},
// {
// title: '报告反馈情况',
// align: 'center',
// dataIndex: 'reportFeedbackStatus',
// },
// {
// title: '是否存在完成风险(0不存在,1存在)',
// align: 'center',
// dataIndex: 'isCompletionRisk',
// },
// {
// title: '拖期风险应对措施',
// align: 'center',
// dataIndex: 'delayRiskMitigation',
// },
// {
// title: '完成状态',
// align: 'center',
// dataIndex: 'completionStatus_dictText',
// },
{
title: '督办状态',
align: 'center',
dataIndex: 'bpmStatus',
width: 90,
customRender: ({ record }) => {
// 督办状态以关联流程实时推导结果为准(superviseStatus),未取到时才回退到存储值
const status = record?.superviseStatus ?? record?.bpmStatus;
return { '1': '未开始', '2': '督办中', '3': '已完成' }[status] ?? '';
},
},
// {
// title: '层深(最顶层节点层深为0)',
// align: 'center',
// dataIndex: 'treeDepth',
// },
// {
// title: '同级数据排序号',
// align: 'center',
// dataIndex: 'sortOrder',
// // },
// {
// title: '流程引擎状态字段',
// align: 'center',
// dataIndex: 'bpmStatus',
// },
];
//子表列表数据
export const bgXiSpeakFeedbackColumns: BasicColumn[] = [
{
title: '序号',
align: 'center',
dataIndex: 'num',
},
{
title: '反馈部门名称',
align: 'center',
dataIndex: 'responDeptname',
},
{
title: '反馈人姓名',
align: 'center',
dataIndex: 'responPersonname',
},
{
title: '反馈时间',
align: 'center',
dataIndex: 'responTime',
customRender: ({ text }) => {
if (!text) return '';
if (text instanceof Date) {
const y = text.getFullYear();
const m = String(text.getMonth() + 1).padStart(2, '0');
const d = String(text.getDate()).padStart(2, '0');
return `${y}-${m}-${d}`;
}
text = String(text);
return text.length > 10 ? text.substr(0, 10) : text;
},
},
{
title: '措施内容',
align: 'left',
dataIndex: 'method',
},
{
title: '完成期限',
align: 'center',
dataIndex: 'deadline',
customRender: ({ text }) => {
if (!text) return '';
if (text instanceof Date) {
const y = text.getFullYear();
const m = String(text.getMonth() + 1).padStart(2, '0');
const d = String(text.getDate()).padStart(2, '0');
return `${y}-${m}-${d}`;
}
text = String(text);
return text.length > 10 ? text.substr(0, 10) : text;
},
},
{
title: '成果形式',
align: 'center',
dataIndex: 'outcomeForm',
},
{
title: '进展情况',
align: 'left',
dataIndex: 'progress',
},
{
title: '落实情况',
align: 'left',
dataIndex: 'implStatus',
},
{
title: '完成状态',
align: 'center',
dataIndex: 'completionStatus_dictText',
},
{
title: '是否有报送上级报告',
align: 'center',
dataIndex: 'isReportedToHigher_dictText',
},
{
title: '落实计划',
align: 'left',
dataIndex: 'completionPlan',
},
{
title: '总措施号',
align: 'center',
dataIndex: 'sumMethodNum',
},
{
title: '检查情况',
align: 'center',
dataIndex: 'checkStatus',
},
{
title: '监督意见',
align: 'left',
dataIndex: 'inspectionAdvice',
},
{
title: '措施数量',
align: 'center',
dataIndex: 'measureNum',
},
];
// 高级查询数据
export const superQuerySchema = {
speakStatus: { title: '习近平总书记重要讲话指示批示情况', order: 1, view: 'text', type: 'string' },
time: { title: '时间', order: 2, view: 'date', type: 'string' },
elmComment: { title: '企业负责同志批示情况', order: 3, view: 'text', type: 'string' },
status: { title: '学习传达研究部署情况', order: 4, view: 'text', type: 'string' },
responsiblePerson: { title: '责任人', order: 5, view: 'sel_user', type: 'string' },
implPlan: { title: '落实方案', order: 6, view: 'text', type: 'string' },
implDept: { title: '牵头部门', order: 7, view: 'sel_depart', type: 'string' },
implMeasures: { title: '贯彻落实措施', order: 8, view: 'text', type: 'string' },
numberOfResolutions: { title: '会议决策数', order: 9, view: 'number', type: 'number' },
implStatus: { title: '落实情况', order: 10, view: 'text', type: 'string' },
implCount: { title: '落实条数', order: 11, view: 'number', type: 'number' },
closedCount: { title: '已闭环数量', order: 12, view: 'number', type: 'number' },
reportFeedbackStatus: { title: '报告反馈情况', order: 13, view: 'text', type: 'string' },
isCompletionRisk: { title: '是否存在完成风险(0不存在,1存在)', order: 14, view: 'number', type: 'number' },
delayRiskMitigation: { title: '拖期风险应对措施', order: 15, view: 'text', type: 'string' },
completionStatus: { title: '完成状态(督办中,1已完成)', order: 16, view: 'number', type: 'number' },
deadline: { title: '截止日期', order: 17, view: 'date', type: 'string' },
treeDepth: { title: '层深(最顶层节点层深为0)', order: 18, view: 'number', type: 'number' },
sortOrder: { title: '同级数据排序号', order: 19, view: 'number', type: 'number' },
bpmStatus: { title: '督办状态', order: 21, view: 'list', type: 'string', dictCode: 'super_status' },
supervisionCount: { title: '督办次数', order: 22, view: 'number', type: 'number' },
approveInfo: { title: '审批信息', order: 23, view: 'text', type: 'string' },
};