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.
786 lines
21 KiB
786 lines
21 KiB
import { FormSchema } from '/@/components/Form';
|
|
import { BasicColumn } from '/@/components/Table';
|
|
import { getDictItemsByCode } from '/@/utils/dict/index';
|
|
import { UploadTypeEnum } from '/@/components/Form/src/jeecg/components/JUpload';
|
|
import { size } from 'lodash-es';
|
|
import { el } from 'element-plus/es/locale';
|
|
|
|
const projectTypeDicts: Array<Object> = getDictItemsByCode("projectType")
|
|
const approvalRsesults: Array<Object> = getDictItemsByCode("approvalResult")
|
|
import { getWorkPlaceTypeDict, getContactorDict, getUserInfoByid } from '../initiatesProjects/initiatesProjects.api'
|
|
|
|
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" })
|
|
function projectTypeDict() {
|
|
for (let i = 0; i < projectTypeDicts.length; i++) {
|
|
projectTypeDicts[i].label = projectTypeDicts[i].text;
|
|
}
|
|
return projectTypeDicts
|
|
}
|
|
|
|
const projectStageDicts: Array<Object> = getDictItemsByCode("projectStage")
|
|
function projectStageDict() {
|
|
for (let i = 0; i < projectStageDicts.length; i++) {
|
|
projectStageDicts[i].label = projectStageDicts[i].text;
|
|
}
|
|
return projectStageDicts
|
|
}
|
|
// function approvalRsesult(){
|
|
// for(let i = 0;i<approvalRsesults.length;i++){
|
|
// approvalRsesults[i].label=approvalRsesults[i].text;
|
|
// }
|
|
// return approvalRsesults
|
|
// }
|
|
export const columns: BasicColumn[] = [
|
|
|
|
{
|
|
title: '项目编号',
|
|
width: 150,
|
|
dataIndex: 'id',
|
|
},
|
|
{
|
|
title: '项目名称',
|
|
dataIndex: 'projectName',
|
|
width: 150,
|
|
},
|
|
{
|
|
title: '主要任务及标志性成果',
|
|
dataIndex: 'description',
|
|
width: 150,
|
|
},
|
|
{
|
|
title: '责任单位',
|
|
dataIndex: 'dutyWorkplace',
|
|
width: 100,
|
|
},
|
|
{
|
|
title: '联系电话',
|
|
width: 150,
|
|
dataIndex: 'phone',
|
|
},
|
|
{
|
|
title: '项目状态',
|
|
width: 150,
|
|
dataIndex: 'stage',
|
|
customRender: ({ record }) => {
|
|
for (let i = 0; i < projectStageDicts.length; i++) {
|
|
if (record.stage == projectStageDicts[i].value) {
|
|
return projectStageDicts[i].text
|
|
}
|
|
}
|
|
},
|
|
},
|
|
];
|
|
const reformTasksDicts: Array<Object> = getDictItemsByCode("reformTasks")
|
|
function reformTasksDict() {
|
|
for (let i = 0; i < reformTasksDicts.length; i++) {
|
|
reformTasksDicts[i].label = reformTasksDicts[i].text;
|
|
}
|
|
return reformTasksDicts
|
|
}
|
|
const roomDicts: Array<Object> = getDictItemsByCode("room")
|
|
function roomDict() {
|
|
for (let i = 0; i < roomDicts.length; i++) {
|
|
roomDicts[i].label = roomDicts[i].text;
|
|
}
|
|
return roomDicts
|
|
}
|
|
export const searchFormSchema: FormSchema[] = [
|
|
{
|
|
label: '项目名称',
|
|
field: 'projectName',
|
|
component: 'Input',
|
|
//colProps: { span: 6 },
|
|
},
|
|
{
|
|
label: '项目编号',
|
|
field: 'id',
|
|
component: 'Input',
|
|
//colProps: { span: 6 },
|
|
}
|
|
|
|
];
|
|
export const uploadFileformSchemas: FormSchema[] = [
|
|
{
|
|
field: 'uploadFile',
|
|
component: 'JUpload',
|
|
helpMessage: '最多上传3个文件',
|
|
label: '上传文件',
|
|
componentProps: { maxCount: 3 },
|
|
},
|
|
{
|
|
field: 'uploadImage',
|
|
component: 'JUpload',
|
|
label: '上传图片',
|
|
helpMessage: '无限制上传',
|
|
componentProps: {
|
|
fileType: UploadTypeEnum.image,
|
|
},
|
|
},
|
|
|
|
]
|
|
|
|
export const formSchemas: FormSchema[] = [
|
|
{
|
|
//标题名称
|
|
label: '项目id',
|
|
//字段
|
|
field: 'id',
|
|
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
|
|
component: 'Input',
|
|
//标题宽度,支持数字和字符串
|
|
// labelWidth: 150,
|
|
// //标题长度,超过位数隐藏
|
|
// labelLength: 3,
|
|
//一列占比总共24,比如一行显示2列
|
|
colProps: { span: 12 },
|
|
ifShow: false
|
|
},
|
|
{
|
|
//标题名称
|
|
label: '项目名称',
|
|
//字段
|
|
field: 'projectName',
|
|
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
|
|
component: 'Input',
|
|
//标题宽度,支持数字和字符串
|
|
// labelWidth: 150,
|
|
// //标题长度,超过位数隐藏
|
|
// labelLength: 3,
|
|
//一列占比总共24,比如一行显示2列
|
|
colProps: { span: 12 },
|
|
required: true,
|
|
},
|
|
{
|
|
label: '行政区划',
|
|
field: 'adminDivision',
|
|
//子标题名称(在主标题后面)
|
|
component: 'Input',
|
|
//一列占比总共24,比如一行显示2列
|
|
colProps: { span: 12 },
|
|
required: true,
|
|
},
|
|
// {
|
|
// label: '项目类型',
|
|
// field: 'projectType',
|
|
// component: 'Select',
|
|
// colProps: { span: 12 },
|
|
|
|
// //填写组件Select的属性
|
|
// componentProps: {
|
|
// options:projectTypeDict()
|
|
// },
|
|
// //默认值
|
|
// defaultValue: 1,
|
|
// required: true,
|
|
|
|
// },
|
|
{
|
|
label: '主要任务',
|
|
field: 'description',
|
|
//子标题名称(在主标题后面)
|
|
component: 'InputTextArea',
|
|
//一列占比总共24,比如一行显示2列
|
|
colProps: { span: 24 },
|
|
required: true,
|
|
},
|
|
|
|
{
|
|
//标题名称
|
|
label: '责任单位',
|
|
//字段
|
|
field: 'dutyWorkplace',
|
|
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
|
|
component: 'Input',
|
|
|
|
//一列占比总共24,比如一行显示2列
|
|
colProps: { span: 12 },
|
|
required: true,
|
|
},
|
|
{
|
|
//标题名称
|
|
label: '单位属性',
|
|
//字段
|
|
field: 'workplaceProperties',
|
|
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
|
|
component: 'Input',
|
|
|
|
//一列占比总共24,比如一行显示2列
|
|
colProps: { span: 12 },
|
|
required: true,
|
|
},
|
|
{
|
|
//标题名称
|
|
label: '建设周期(月)',
|
|
//字段
|
|
field: 'constructionPeriod',
|
|
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
|
|
component: 'InputNumber',
|
|
componentProps: {
|
|
//数值精度
|
|
precision: 0,
|
|
//步数
|
|
step: 0.1
|
|
},
|
|
//一列占比总共24,比如一行显示2列
|
|
colProps: { span: 12 },
|
|
required: true,
|
|
},
|
|
{
|
|
//标题名称
|
|
label: '总投资(元)',
|
|
//字段
|
|
field: 'totalMoney',
|
|
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
|
|
component: 'InputNumber',
|
|
componentProps: {
|
|
//带标签的 input,设置后置标签
|
|
addonBefore: '保留两位小数',
|
|
//数值精度
|
|
precision: 2,
|
|
//步数
|
|
step: 1
|
|
},
|
|
//一列占比总共24,比如一行显示2列
|
|
colProps: { span: 12 },
|
|
required: true,
|
|
},
|
|
{
|
|
//标题名称
|
|
label: '中央资金(元)',
|
|
//字段
|
|
field: 'centralMoney',
|
|
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
|
|
component: 'InputNumber',
|
|
componentProps: {
|
|
//带标签的 input,设置后置标签
|
|
addonBefore: '保留两位小数',
|
|
//数值精度
|
|
precision: 2,
|
|
//步数
|
|
step: 1
|
|
},
|
|
//一列占比总共24,比如一行显示2列
|
|
colProps: { span: 12 },
|
|
required: true,
|
|
},
|
|
{
|
|
//标题名称
|
|
label: '省级资金(元)',
|
|
//字段
|
|
field: 'provincialMoney',
|
|
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
|
|
component: 'InputNumber',
|
|
componentProps: {
|
|
//带标签的 input,设置后置标签
|
|
addonBefore: '保留两位小数',
|
|
//数值精度
|
|
precision: 2,
|
|
//步数
|
|
step: 1
|
|
},
|
|
//一列占比总共24,比如一行显示2列
|
|
colProps: { span: 12 },
|
|
required: true,
|
|
},
|
|
{
|
|
//标题名称
|
|
label: '市级资金(元)',
|
|
//字段
|
|
field: 'cityMoney',
|
|
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
|
|
component: 'InputNumber',
|
|
componentProps: {
|
|
//带标签的 input,设置后置标签
|
|
addonBefore: '保留两位小数',
|
|
|
|
//数值精度
|
|
precision: 2,
|
|
//步数
|
|
step: 1
|
|
},
|
|
//一列占比总共24,比如一行显示2列
|
|
colProps: { span: 12 },
|
|
required: true,
|
|
},
|
|
{
|
|
//标题名称
|
|
label: '区县级资金(元)',
|
|
//字段
|
|
field: 'countyMoney',
|
|
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
|
|
component: 'InputNumber',
|
|
componentProps: {
|
|
//带标签的 input,设置后置标签
|
|
addonBefore: '保留两位小数',
|
|
|
|
//数值精度
|
|
precision: 2,
|
|
//步数
|
|
step: 1
|
|
},
|
|
//一列占比总共24,比如一行显示2列
|
|
colProps: { span: 12 },
|
|
required: true,
|
|
},
|
|
{
|
|
//标题名称
|
|
label: '自筹资金(元)',
|
|
//字段
|
|
field: 'selfMoney',
|
|
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
|
|
component: 'InputNumber',
|
|
componentProps: {
|
|
//带标签的 input,设置后置标签
|
|
addonBefore: '保留两位小数',
|
|
|
|
//数值精度
|
|
precision: 2,
|
|
//步数
|
|
step: 1
|
|
},
|
|
//一列占比总共24,比如一行显示2列
|
|
colProps: { span: 12 },
|
|
required: true,
|
|
},
|
|
{
|
|
//标题名称
|
|
label: '2023年支付(元)',
|
|
//字段
|
|
field: 'payamount2023Money',
|
|
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
|
|
component: 'InputNumber',
|
|
componentProps: {
|
|
//带标签的 input,设置后置标签
|
|
addonBefore: '保留两位小数',
|
|
|
|
//数值精度
|
|
precision: 2,
|
|
//步数
|
|
step: 1
|
|
},
|
|
//一列占比总共24,比如一行显示2列
|
|
colProps: { span: 12 },
|
|
required: true,
|
|
},
|
|
{
|
|
//标题名称
|
|
label: '2024年支付(元)',
|
|
//字段
|
|
field: 'payamount2024Money',
|
|
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
|
|
component: 'InputNumber',
|
|
componentProps: {
|
|
//带标签的 input,设置后置标签
|
|
addonBefore: '保留两位小数',
|
|
|
|
//数值精度
|
|
precision: 2,
|
|
//步数
|
|
step: 1
|
|
},
|
|
//一列占比总共24,比如一行显示2列
|
|
colProps: { span: 12 },
|
|
required: true,
|
|
}, {
|
|
//标题名称
|
|
label: '2025年支付(元)',
|
|
//字段
|
|
field: 'payamount2025Money',
|
|
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
|
|
component: 'InputNumber',
|
|
componentProps: {
|
|
//带标签的 input,设置后置标签
|
|
addonBefore: '保留两位小数',
|
|
|
|
//数值精度
|
|
precision: 2,
|
|
//步数
|
|
step: 1
|
|
},
|
|
//一列占比总共24,比如一行显示2列
|
|
colProps: { span: 12 },
|
|
required: true,
|
|
},
|
|
|
|
{
|
|
//标题名称
|
|
label: '改革所属项目',
|
|
//字段
|
|
field: 'reformName',
|
|
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
|
|
component: 'Select',
|
|
|
|
//一列占比总共24,比如一行显示2列
|
|
colProps: { span: 12 },
|
|
required: true,
|
|
componentProps:{
|
|
options:reformTasksDict()
|
|
}
|
|
},
|
|
{
|
|
//标题名称
|
|
label: '上级指导室',
|
|
//字段
|
|
field: 'superLeader',
|
|
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
|
|
component: 'Select',
|
|
|
|
//一列占比总共24,比如一行显示2列
|
|
colProps: { span: 12 },
|
|
required: true,
|
|
componentProps:{
|
|
options:roomDict()
|
|
}
|
|
},
|
|
{
|
|
//标题名称
|
|
label: '项目联系人',
|
|
//字段
|
|
field: 'projectContacts',
|
|
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
|
|
component: 'Input',
|
|
|
|
//一列占比总共24,比如一行显示2列
|
|
colProps: { span: 12 },
|
|
required: true,
|
|
},
|
|
{
|
|
//标题名称
|
|
label: '联系电话',
|
|
//字段
|
|
field: 'phone',
|
|
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
|
|
component: 'Input',
|
|
|
|
//一列占比总共24,比如一行显示2列
|
|
colProps: { span: 12 },
|
|
required: true,
|
|
},
|
|
{
|
|
//标题名称
|
|
label: '管理单位',
|
|
//字段
|
|
field: 'manageOrg',
|
|
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
|
|
component: 'Select',
|
|
componentProps: ({ formModel, formActionType }) => {
|
|
console.log("formModel", formModel, "formActionType", formActionType)
|
|
return {
|
|
//
|
|
options: manageOrgDict,
|
|
onChange: async (value) => {
|
|
// console.log(e)
|
|
let manageContactorDict = await getContactorDict({ workPlace: value, workPlaceType: "1" })
|
|
// formModel.manageContactor = undefined; // reset city value
|
|
const { updateSchema, setFieldsValue } = formActionType;
|
|
updateSchema({
|
|
field: 'manageContactor',
|
|
componentProps: {
|
|
options: manageContactorDict,
|
|
},
|
|
});
|
|
setFieldsValue({ manageContactor: "" })
|
|
},
|
|
};
|
|
},
|
|
//一列占比总共24,比如一行显示2列
|
|
colProps: { span: 12 },
|
|
},
|
|
|
|
{
|
|
//标题名称
|
|
label: '管理单位负责人',
|
|
//字段
|
|
field: 'manageContactor',
|
|
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
|
|
component: 'Select',
|
|
componentProps: (({ formModel }) => {
|
|
console.log("formModel.manageContactor", formModel, formModel.manageContactor)
|
|
return {
|
|
options: []
|
|
}
|
|
|
|
}),
|
|
|
|
//一列占比总共24,比如一行显示2列
|
|
colProps: { span: 12 },
|
|
},
|
|
{
|
|
//标题名称
|
|
label: '监管单位',
|
|
//字段
|
|
field: 'supervisor',
|
|
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
|
|
component: 'Select',
|
|
componentProps: ({ formModel, formActionType }) => {
|
|
console.log("formModel", formModel, "formActionType", formActionType)
|
|
return {
|
|
//
|
|
options: supervisorDict,
|
|
onChange: async (value) => {
|
|
// console.log(e)
|
|
let supervisorContactorDict = await getContactorDict({ workPlace: value, workPlaceType: "2" })
|
|
// formModel.manageContactor = undefined; // reset city value
|
|
const { updateSchema, setFieldsValue } = formActionType;
|
|
updateSchema({
|
|
field: 'supervisorContactor',
|
|
componentProps: {
|
|
options: supervisorContactorDict,
|
|
},
|
|
});
|
|
setFieldsValue({ supervisorContactor: "" })
|
|
},
|
|
};
|
|
},
|
|
//一列占比总共24,比如一行显示2列
|
|
colProps: { span: 12 },
|
|
},
|
|
{
|
|
//标题名称
|
|
label: '监管单位负责人',
|
|
//字段
|
|
field: 'supervisorContactor',
|
|
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
|
|
component: 'Select',
|
|
componentProps: {
|
|
options: [],
|
|
|
|
},
|
|
//一列占比总共24,比如一行显示2列
|
|
colProps: { span: 12 },
|
|
},
|
|
|
|
{
|
|
//标题名称
|
|
label: '承建单位',
|
|
//字段
|
|
field: 'contructor',
|
|
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
|
|
component: 'Select',
|
|
componentProps: ({ formModel, formActionType }) => {
|
|
console.log("formModel", formModel, "formActionType", formActionType)
|
|
return {
|
|
//
|
|
options: contructorDict,
|
|
onChange: async (value) => {
|
|
// console.log(e)
|
|
let contructorContactorDict = await getContactorDict({ workPlace: value, workPlaceType: "4" })
|
|
// formModel.manageContactor = undefined; // reset city value
|
|
const { updateSchema, setFieldsValue } = formActionType;
|
|
updateSchema({
|
|
field: 'contructorContactor',
|
|
componentProps: {
|
|
options: contructorContactorDict,
|
|
},
|
|
});
|
|
setFieldsValue({ contructorContactor: "" })
|
|
},
|
|
};
|
|
},
|
|
//一列占比总共24,比如一行显示2列
|
|
colProps: { span: 12 },
|
|
},
|
|
{
|
|
//标题名称
|
|
label: '承建单位负责人',
|
|
//字段
|
|
field: 'contructorContactor',
|
|
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
|
|
component: 'Select',
|
|
componentProps: {
|
|
options: [],
|
|
|
|
},
|
|
//一列占比总共24,比如一行显示2列
|
|
colProps: { span: 12 },
|
|
},
|
|
{
|
|
//标题名称
|
|
label: '建设单位',
|
|
//字段
|
|
field: 'owner',
|
|
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
|
|
component: 'Select',
|
|
componentProps: ({ formModel, formActionType }) => {
|
|
console.log("formModel", formModel, "formActionType", formActionType)
|
|
return {
|
|
//
|
|
options: ownerDict,
|
|
onChange: async (value) => {
|
|
// console.log(e)
|
|
let ownerContactorDict = await getContactorDict({ workPlace: value, workPlaceType: "3" })
|
|
// formModel.manageContactor = undefined; // reset city value
|
|
const { updateSchema, setFieldsValue } = formActionType;
|
|
updateSchema({
|
|
field: 'ownerContactor',
|
|
componentProps: {
|
|
options: ownerContactorDict,
|
|
}
|
|
});
|
|
setFieldsValue({ ownerContactor: "" })
|
|
},
|
|
};
|
|
},
|
|
//一列占比总共24,比如一行显示2列
|
|
colProps: { span: 12 },
|
|
required: true,
|
|
},
|
|
{
|
|
//标题名称
|
|
label: '建设单位负责人',
|
|
//字段
|
|
field: 'ownerContactor',
|
|
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
|
|
component: 'Select',
|
|
componentProps: {
|
|
options: [],
|
|
|
|
},
|
|
//一列占比总共24,比如一行显示2列
|
|
colProps: { span: 12 },
|
|
// required: true,
|
|
},
|
|
{
|
|
//标题名称
|
|
label: '监理单位',
|
|
//字段
|
|
field: 'controler',
|
|
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
|
|
component: 'Select',
|
|
componentProps: ({ formModel, formActionType }) => {
|
|
console.log("formModel", formModel, "formActionType", formActionType)
|
|
return {
|
|
//
|
|
options: controlerDict,
|
|
onChange: async (value) => {
|
|
// console.log(e)
|
|
let controlerContactorDict = await getContactorDict({ workPlace: value, workPlaceType: "6" })
|
|
// formModel.manageContactor = undefined; // reset city value
|
|
const { updateSchema, setFieldsValue } = formActionType;
|
|
updateSchema({
|
|
field: 'controlerContactor',
|
|
componentProps: {
|
|
options: controlerContactorDict,
|
|
}
|
|
});
|
|
setFieldsValue({ controlerContactor: "" })
|
|
},
|
|
};
|
|
},
|
|
//一列占比总共24,比如一行显示2列
|
|
colProps: { span: 12 },
|
|
},
|
|
{
|
|
//标题名称
|
|
label: '监理单位负责人',
|
|
//字段
|
|
field: 'controlerContactor',
|
|
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
|
|
component: 'Select',
|
|
componentProps: {
|
|
options: [],
|
|
|
|
},
|
|
//一列占比总共24,比如一行显示2列
|
|
colProps: { span: 12 },
|
|
},
|
|
{
|
|
//标题名称
|
|
label: '咨询单位',
|
|
//字段
|
|
field: 'consult',
|
|
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
|
|
component: 'Select',
|
|
componentProps: ({ formModel, formActionType }) => {
|
|
console.log("formModel", formModel, "formActionType", formActionType)
|
|
return {
|
|
//
|
|
options: consultDict,
|
|
onChange: async (value) => {
|
|
// console.log(e)
|
|
let consultContactoDict = await getContactorDict({ workPlace: value, workPlaceType: "5" })
|
|
// formModel.manageContactor = undefined; // reset city value
|
|
const { updateSchema, setFieldsValue } = formActionType;
|
|
updateSchema({
|
|
field: 'consultContactor',
|
|
componentProps: {
|
|
options: consultContactoDict,
|
|
}
|
|
});
|
|
setFieldsValue({ consultContactor: "" })
|
|
},
|
|
};
|
|
},
|
|
//一列占比总共24,比如一行显示2列
|
|
colProps: { span: 12 },
|
|
},
|
|
{
|
|
//标题名称
|
|
label: '咨询单位负责人',
|
|
//字段
|
|
field: 'consultContactor',
|
|
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
|
|
component: 'Select',
|
|
componentProps: {
|
|
options: [],
|
|
|
|
},
|
|
//一列占比总共24,比如一行显示2列
|
|
colProps: { span: 12 },
|
|
},
|
|
{
|
|
//标题名称
|
|
label: '项目状态',
|
|
//字段
|
|
field: 'stage',
|
|
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
|
|
component: 'Input',
|
|
|
|
//一列占比总共24,比如一行显示2列
|
|
colProps: { span: 12 },
|
|
ifShow: false
|
|
}
|
|
];
|
|
|
|
|
|
export const resourcetableColumns: BasicColumn[] = [
|
|
{
|
|
title: '文件名称',
|
|
dataIndex: 'documentName',
|
|
},
|
|
{
|
|
title: '文件大小',
|
|
dataIndex: 'size',
|
|
width: 100,
|
|
customRender: ({ record }) => {
|
|
let kbNum: number = record.size / 1024
|
|
if (kbNum < 1024) {
|
|
return kbNum.toFixed(2).toString() + "KB"
|
|
} else {
|
|
let mbNum: number = kbNum / 1024
|
|
return mbNum.toFixed(2).toString() + "MB"
|
|
}
|
|
|
|
},
|
|
},
|
|
{
|
|
title: '上传时间',
|
|
dataIndex: 'createtime',
|
|
},
|
|
{
|
|
title: '文件状态',
|
|
dataIndex: 'status',
|
|
customRender: ({ record }) => {
|
|
if (record.status == 1) {
|
|
return "有效"
|
|
} else {
|
|
return "历史文件"
|
|
}
|
|
},
|
|
}
|
|
]
|
|
|