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.

383 lines
9.0 KiB

1 year ago
import { FormSchema } from '/@/components/Form';
import { BasicColumn } from '/@/components/Table';
1 year ago
import { getDictItemsByCode } from '/@/utils/dict/index';
import { UploadTypeEnum } from '/@/components/Form/src/jeecg/components/JUpload';
1 year ago
1 year ago
const projectTypeDicts:Array<Object> = getDictItemsByCode("projectType")
const approvalRsesults:Array<Object> = getDictItemsByCode("approvalResult")
function projectTypeDict(){
for(let i = 0;i<projectTypeDicts.length;i++){
projectTypeDicts[i].label=projectTypeDicts[i].text;
}
return projectTypeDicts
}
// function approvalRsesult(){
// for(let i = 0;i<approvalRsesults.length;i++){
// approvalRsesults[i].label=approvalRsesults[i].text;
// }
// return approvalRsesults
// }
1 year ago
export const columns: BasicColumn[] = [
{
title: '项目编号',
width: 150,
1 year ago
dataIndex: 'id',
1 year ago
},
{
title: '项目名称',
dataIndex: 'projectName',
width: 150,
},
{
title: '主要任务及标志性成果',
dataIndex: 'description',
width: 150,
},
{
title: '责任单位',
dataIndex: 'dutyWorkplace',
width: 100,
},
{
title: '发起单位',
dataIndex: 'workplace',
width: 100,
},
{
title: '发起单位类型',
dataIndex: 'workplaceTpye',
width: 200,
},
{
title: '联系电话',
width: 150,
dataIndex: 'phone',
},
];
export const searchFormSchema: FormSchema[] = [
{
label: '项目名称',
1 year ago
field: 'projectName',
1 year ago
component: 'Input',
//colProps: { span: 6 },
},
{
label: '项目编号',
1 year ago
field: 'projectId',
1 year ago
component: 'Input',
//colProps: { span: 6 },
}
];
1 year ago
export const uploadFileformSchemas: FormSchema[] = [
{
field: 'uploadFile',
component: 'JUpload',
helpMessage: '无限制上传',
label: '上传文件',
},
{
field: 'uploadImage',
component: 'JUpload',
label: '上传图片',
helpMessage: '无限制上传',
componentProps: {
fileType: UploadTypeEnum.image,
},
},
]
export const formSchemas: FormSchema[] = [
{
//标题名称
label: '项目名称',
//字段
field: 'projectName',
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
component: 'Input',
//标题宽度,支持数字和字符串
// labelWidth: 150,
// //标题长度,超过位数隐藏
// labelLength: 3,
//一列占比总共24,比如一行显示2列
colProps: { span: 12 },
},
{
label: '项目类型',
field: 'projectType',
component: 'Select',
colProps: { span: 12 },
//填写组件Select的属性
componentProps: {
options:projectTypeDict()
},
//默认值
defaultValue: 1,
},
{
label: '主要任务',
field: 'description',
//子标题名称(在主标题后面)
component: 'InputTextArea',
//一列占比总共24,比如一行显示2列
colProps: { span: 24 },
},
{
//标题名称
label: '责任单位',
//字段
field: 'dutyWorkplace',
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
component: 'Input',
//一列占比总共24,比如一行显示2列
colProps: { span: 12 },
},
{
//标题名称
label: '建设年限',
//字段
field: 'constructionPeriod',
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
component: 'Input',
//一列占比总共24,比如一行显示2列
colProps: { span: 12 },
},
{
//标题名称
label: '中央资金',
//字段
field: 'centralMoney',
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
component: 'Input',
//一列占比总共24,比如一行显示2列
colProps: { span: 12 },
},
{
//标题名称
label: '省级资金',
//字段
field: 'provincialMoney',
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
component: 'Input',
//一列占比总共24,比如一行显示2列
colProps: { span: 12 },
},
{
//标题名称
label: '市级资金',
//字段
field: 'cityMoney',
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
component: 'Input',
//一列占比总共24,比如一行显示2列
colProps: { span: 12 },
},
{
//标题名称
label: '区县级资金',
//字段
field: 'countyMoney',
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
component: 'Input',
//一列占比总共24,比如一行显示2列
colProps: { span: 12 },
},
{
//标题名称
label: '改革所属项目',
//字段
field: 'reformName',
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
component: 'Input',
//一列占比总共24,比如一行显示2列
colProps: { span: 12 },
},
{
//标题名称
label: '上级指导室',
//字段
field: 'superLeader',
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
component: 'Input',
//一列占比总共24,比如一行显示2列
colProps: { span: 12 },
},
{
//标题名称
label: '项目联系人',
//字段
field: 'projectContacts',
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
component: 'Input',
//一列占比总共24,比如一行显示2列
colProps: { span: 12 },
},
{
//标题名称
label: '联系电话',
//字段
field: 'phone',
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
component: 'Input',
//一列占比总共24,比如一行显示2列
colProps: { span: 12 },
},
{
//标题名称
label: '管理单位',
//字段
field: 'manageOrg',
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
component: 'Input',
//一列占比总共24,比如一行显示2列
colProps: { span: 12 },
},
{
//标题名称
label: '管理单位负责人',
//字段
field: 'manageContactor',
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
component: 'Input',
//一列占比总共24,比如一行显示2列
colProps: { span: 12 },
},
{
//标题名称
label: '监管单位',
//字段
field: 'controler',
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
component: 'Input',
//一列占比总共24,比如一行显示2列
colProps: { span: 12 },
},
{
//标题名称
label: '监管单位负责人',
//字段
field: 'controlerContactor',
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
component: 'Input',
//一列占比总共24,比如一行显示2列
colProps: { span: 12 },
},
{
//标题名称
label: '建设单位',
//字段
field: 'owner',
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
component: 'Input',
//一列占比总共24,比如一行显示2列
colProps: { span: 12 },
},
{
//标题名称
label: '建设单位负责人',
//字段
field: 'ownerContactor',
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
component: 'Input',
//一列占比总共24,比如一行显示2列
colProps: { span: 12 },
},
{
//标题名称
label: '承建单位',
//字段
field: 'contructor',
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
component: 'Input',
//一列占比总共24,比如一行显示2列
colProps: { span: 12 },
},
{
//标题名称
label: '承建单位负责人',
//字段
field: 'contructorContactor',
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
component: 'Input',
//一列占比总共24,比如一行显示2列
colProps: { span: 12 },
},
{
//标题名称
label: '项目状态',
//字段
field: 'status',
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
component: 'Input',
//一列占比总共24,比如一行显示2列
colProps: { span: 12 },
}
];
export const ProcessColumns: BasicColumn[] = [
{
title: '节点名称',
dataIndex: 'taskName',
},
{
title: '处理人',
dataIndex: 'operator',
width: 150,
},
{
title: '处理时间',
dataIndex: 'operateDate',
width: 150,
},
{
title: '审批状态',
dataIndex: 'approvalStatue',
width: 100,
customRender: ({ record }) => {
for(let i =0;i<approvalRsesults.length;i++){
if(record.approvalStatue==approvalRsesults[i].value){
return approvalRsesults[i].text
}
}
},
},
{
title: '审批意见',
dataIndex: 'comment',
width: 100,
}
];