Files
supervision-test-frontend-repo/src/views/dj/inspectimprove/DjInspectImprove.data.ts
T
2026-05-18 15:44:50 +08:00

253 lines
6.2 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';
import { filterDictTextByCache } from '/@/utils/dict/JDictSelectUtil';
//列表数据
export const columns: BasicColumn[] = [
{
title: '树形表单父id',
align: 'center',
dataIndex: 'pid'
},
{
title: '问题分类',
align: 'center',
dataIndex: 'questionCategory',
customRender: ({text}) => filterDictTextByCache('inspect_improve_type', text),
},
{
title: '面上问题',
align: 'center',
dataIndex: 'mianshangQuestion'
},
{
title: '具体问题',
align: 'left',
dataIndex: 'specicalQuestion'
},
{
title: '巡视建议',
align: 'center',
dataIndex: 'inspectAdvice'
},
{
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: 'questionResLeader'
},
{
title: '问题责任部门',
align: 'center',
dataIndex: 'questionResDept'
},
{
title: '措施责任领导',
align: 'center',
dataIndex: 'measureResLeader'
},
{
title: '措施责任部门',
align: 'center',
dataIndex: 'measureResDept'
},
{
title: '整改交付成果',
align: 'center',
dataIndex: 'rectificationEvidence'
},
{
title: '成效评价标准',
align: 'center',
dataIndex: 'evaluationCriterion'
},
{
title: '工作进展',
align: 'center',
dataIndex: 'workProgress'
},
{
title: '检查情况',
align: 'center',
dataIndex: 'inspectionStatus'
},
{
title: '监督意见',
align: 'center',
dataIndex: 'supervisoryOpinion'
},
{
title: '措施数量',
align: 'center',
dataIndex: 'measureCount'
},
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
{
label: '树形表单父id',
field: 'pid',
component: 'JTreeSelect',
componentProps: {
dict: "dj_inspect_improve,specical_question,id",
pidField: "pid",
pidValue: "0",
hasChildField: "has_child",
},
},
{
label: '问题分类',
field: 'questionCategory',
component: 'JDictSelectTag',
componentProps: {
dictCode: 'inspect_improve_type',
stringToNumber: true,
},
},
{
label: '面上问题',
field: 'mianshangQuestion',
component: 'Input',
},
{
label: '具体问题',
field: 'specicalQuestion',
component: 'Input',
},
{
label: '巡视建议',
field: 'inspectAdvice',
component: 'Input',
},
{
label: '整改措施',
field: 'improveMeasure',
component: 'Input',
},
{
label: '完成时限',
field: 'deadline',
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD'
},
},
{
label: '目标节点',
field: 'targetNode',
component: 'Input',
},
{
label: '问题责任领导',
field: 'questionResLeader',
component: 'Input',
},
{
label: '问题责任部门',
field: 'questionResDept',
component: 'Input',
},
{
label: '措施责任领导',
field: 'measureResLeader',
component: 'Input',
},
{
label: '措施责任部门',
field: 'measureResDept',
component: 'Input',
},
{
label: '整改交付成果',
field: 'rectificationEvidence',
component: 'Input',
},
{
label: '成效评价标准',
field: 'evaluationCriterion',
component: 'Input',
},
{
label: '工作进展',
field: 'workProgress',
component: 'Input',
},
{
label: '检查情况',
field: 'inspectionStatus',
component: 'Input',
},
{
label: '监督意见',
field: 'supervisoryOpinion',
component: 'Input',
},
{
label: '措施数量',
field: 'measureCount',
component: 'InputNumber',
},
// TODO 主键隐藏字段,目前写死为ID
{
label: '',
field: 'id',
component: 'Input',
show: false
},
];
// 高级查询数据
export const superQuerySchema = {
pid: {title: '树形表单父id',order: 0,view: 'text', type: 'string',},
questionCategory: {title: '问题分类',order: 1,view: 'number', type: 'number',},
mianshangQuestion: {title: '面上问题',order: 2,view: 'text', type: 'string',},
specicalQuestion: {title: '具体问题',order: 3,view: 'text', type: 'string',},
inspectAdvice: {title: '巡视建议',order: 4,view: 'text', type: 'string',},
improveMeasure: {title: '整改措施',order: 5,view: 'text', type: 'string',},
deadline: {title: '完成时限',order: 6,view: 'date', type: 'string',},
targetNode: {title: '目标节点',order: 7,view: 'text', type: 'string',},
questionResLeader: {title: '问题责任领导',order: 8,view: 'text', type: 'string',},
questionResDept: {title: '问题责任部门',order: 9,view: 'text', type: 'string',},
measureResLeader: {title: '措施责任领导',order: 10,view: 'text', type: 'string',},
measureResDept: {title: '措施责任部门',order: 11,view: 'text', type: 'string',},
rectificationEvidence: {title: '整改交付成果',order: 12,view: 'text', type: 'string',},
evaluationCriterion: {title: '成效评价标准',order: 13,view: 'text', type: 'string',},
workProgress: {title: '工作进展',order: 14,view: 'text', type: 'string',},
inspectionStatus: {title: '检查情况',order: 15,view: 'text', type: 'string',},
supervisoryOpinion: {title: '监督意见',order: 16,view: 'text', type: 'string',},
measureCount: {title: '措施数量',order: 17,view: 'number', type: 'number',},
};
/**
* 流程表单调用这个方法获取formSchema
* @param param
*/
export function getBpmFormSchema(_formData): FormSchema[]{
// 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema
return formSchema;
}