湖州项目前端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

261 lines
5.3 KiB

11 months ago
import { FormSchema } from '@/components/Form';
import { BasicColumn } from '@/components/Table';
import { useDictStore } from '@/store/modules/dict';
// let manageOrgDict = await getWorkPlaceTypeDict({ workPlaceType: "1" })
// let supervisorDict = await getWorkPlaceTypeDict({ workPlaceType: "2" })
// let contructorDict = await getWorkPlaceTypeDict({ workPlaceType: "4" })
// let ownerDict = await getWorkPlaceTypeDict({ workPlaceType: "3" })
// let controlerDict = await getWorkPlaceTypeDict({ workPlaceType: "6" })
// let consultDict = await getWorkPlaceTypeDict({ workPlaceType: "5" })
// let manageOrgDict = []
// let supervisorDict = []
// let contructorDict = []
// let ownerDict = []
// let controlerDict = []
// let consultDict = []
export const templateContentColumns: BasicColumn[] = [
{
title: '评价维度',
width: 120,
dataIndex: 'evaluationDimension',
customRender: ({ text, record, index }) => {
const obj = {
children: text,
props: {} as any,
};
if (record.evaluationLength != null && record.evaluationLength != 0) {
obj.props.rowSpan = record.evaluationLength
} else {
obj.props.rowSpan = 0
}
return obj
},
},
{
title: '一级指标',
dataIndex: 'primaryIndicator',
width: 120,
customRender: ({ text, record, index }) => {
const obj = {
children: text,
props: {} as any,
};
if (record.primaryLength != null && record.primaryLength != 0) {
obj.props.rowSpan = record.primaryLength
}
else {
obj.props.rowSpan = 0
}
return obj
},
},
{
title: '二级指标',
width: 120,
dataIndex: 'secondaryIndicator',
customRender: ({ text, record, index }) => {
const obj = {
children: text,
props: {} as any,
};
if (record.secondaryLength != null) {
obj.props.rowSpan = record.secondaryLength
}
else {
obj.props.rowSpan = 0
}
return obj
},
},
{
title: '三级指标',
width: 120,
dataIndex: 'tertiaryIndicator',
customRender: ({ text, record, index }) => {
const obj = {
children: text,
props: {} as any,
};
if (record.tertiaryLength != null) {
obj.props.rowSpan = record.tertiaryLength
}
else {
obj.props.rowSpan = 0
}
return obj
},
},
{
title: '描述',
resizable:true,
ellipsis:false,
dataIndex: 'description',
},
{
title: '分数',
width:80,
dataIndex: 'scores',
},
{
title: '系统评分',
width:120,
dataIndex: 'sysscores',
},
{
title: '自我评分',
width: 120,
dataIndex: 'selfScores',
slots: { customRender: 'selfScores' },
},
{
title: '管理评分',
width:120,
dataIndex: 'pscores',
slots: { customRender: 'pscores' },
}
];
export const performancescoreColumns: BasicColumn[] = [
{
title: '评价维度',
width: 150,
dataIndex: 'evaluationDimension',
customRender: ({ text, record, index }) => {
const obj = {
children: text,
props: {} as any,
};
if (record.evaluationLength != null && record.evaluationLength != 0) {
obj.props.rowSpan = record.evaluationLength
} else {
obj.props.rowSpan = 0
}
return obj
},
},
{
title: '一级指标',
dataIndex: 'primaryIndicator',
width: 150,
customRender: ({ text, record, index }) => {
const obj = {
children: text,
props: {} as any,
};
if (record.primaryLength != null && record.primaryLength != 0) {
obj.props.rowSpan = record.primaryLength
}
else {
obj.props.rowSpan = 0
}
return obj
},
},
{
title: '二级指标',
width: 150,
dataIndex: 'secondaryIndicator',
customRender: ({ text, record, index }) => {
const obj = {
children: text,
props: {} as any,
};
if (record.secondaryLength != null) {
obj.props.rowSpan = record.secondaryLength
}
else {
obj.props.rowSpan = 0
}
return obj
},
},
{
title: '三级指标',
width: 150,
dataIndex: 'tertiaryIndicator',
customRender: ({ text, record, index }) => {
const obj = {
children: text,
props: {} as any,
};
if (record.tertiaryLength != null) {
obj.props.rowSpan = record.tertiaryLength
}
else {
obj.props.rowSpan = 0
}
return obj
},
},
{
title: '描述',
resizable:true,
ellipsis:false,
dataIndex: 'description',
},
{
title: '分数',
width:80,
dataIndex: 'scores',
},
];
export const PerformanColumns: BasicColumn[] = [
{
title: 'id',
width: 80,
dataIndex: 'id',
},
{
title: '考核名称',
width: 150,
dataIndex: 'name',
},
{
title: '上级指导室',
dataIndex: 'superLeader',
},
{
title: '责任单位',
dataIndex: 'dutyWorkplace',
},
{
title: '总分',
dataIndex: 'total',
},
]
export const searchFormSchema: FormSchema[] = [
{
label: '项目名称',
field: 'projectName',
component: 'Input',
//colProps: { span: 6 },
},
{
label: '项目编号',
field: 'projectId',
component: 'Input',
//colProps: { span: 6 },
}
];