|
|
@ -1,6 +1,8 @@ |
|
|
|
import { FormSchema } from '@/components/Form'; |
|
|
|
import { BasicColumn } from '@/components/Table'; |
|
|
|
import { useDictStore } from '@/store/modules/dict'; |
|
|
|
import { useUserStore } from '@/store/modules/user'; |
|
|
|
const userStore = useUserStore(); |
|
|
|
import { ref } from 'vue' |
|
|
|
const dictStore = useDictStore(); |
|
|
|
|
|
|
@ -23,42 +25,42 @@ export const columns: BasicColumn[] = [ |
|
|
|
dataIndex: 'projectName', |
|
|
|
width: 300, |
|
|
|
resizable: true, |
|
|
|
align:'left', |
|
|
|
align: 'left', |
|
|
|
slots: { customRender: 'projectName' }, |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '行政区划', |
|
|
|
dataIndex: 'adminDivision', |
|
|
|
resizable: true |
|
|
|
resizable: true |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '责任单位', |
|
|
|
dataIndex: 'dutyWorkplace', |
|
|
|
resizable: true |
|
|
|
resizable: true |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '单位属性', |
|
|
|
dataIndex: 'workplaceProperties', |
|
|
|
resizable: true |
|
|
|
resizable: true |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '改革所属项目', |
|
|
|
dataIndex: 'reformName', |
|
|
|
format: 'dict|reformTasks', |
|
|
|
resizable: true |
|
|
|
resizable: true |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '上级指导处室', |
|
|
|
dataIndex: 'superLeader', |
|
|
|
format: 'dict|superLeader', |
|
|
|
resizable: true |
|
|
|
resizable: true |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '项目状态', |
|
|
|
dataIndex: 'stage', |
|
|
|
format: 'dict|projectStage', |
|
|
|
filters: 'dict|projectStage', |
|
|
|
resizable: true |
|
|
|
resizable: true |
|
|
|
}, |
|
|
|
]; |
|
|
|
|
|
|
@ -427,7 +429,7 @@ export const formSchemas: FormSchema[] = [ |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'superLeader', |
|
|
|
label: '上级指导室', |
|
|
|
label: '任务牵头处室', |
|
|
|
required: true, |
|
|
|
component: 'DictSelect', |
|
|
|
componentProps: { |
|
|
@ -458,7 +460,8 @@ export const formSchemas: FormSchema[] = [ |
|
|
|
}, |
|
|
|
}; |
|
|
|
}, |
|
|
|
|
|
|
|
defaultValue: userStore.getUserInfo.id, |
|
|
|
dynamicDisabled: true, |
|
|
|
//一列占比总共24,比如一行显示2列
|
|
|
|
colProps: { span: 12 }, |
|
|
|
required: true, |
|
|
@ -470,23 +473,28 @@ export const formSchemas: FormSchema[] = [ |
|
|
|
field: 'phone', |
|
|
|
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
|
|
|
|
component: 'Input', |
|
|
|
|
|
|
|
defaultValue: userStore.getUserInfo.phoneNumber, |
|
|
|
//一列占比总共24,比如一行显示2列
|
|
|
|
colProps: { span: 12 }, |
|
|
|
dynamicDisabled: true, |
|
|
|
}, |
|
|
|
{ |
|
|
|
//标题名称
|
|
|
|
label: '管理单位', |
|
|
|
label: '信息化工作专班', |
|
|
|
//字段
|
|
|
|
field: 'manageOrg', |
|
|
|
// component: 'Select',
|
|
|
|
// componentProps: {
|
|
|
|
// options: [
|
|
|
|
// { label: '信息化工作专班', value: '信息化工作专班' }]
|
|
|
|
// },
|
|
|
|
//一列占比总共24,比如一行显示2列
|
|
|
|
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
|
|
|
|
component: 'ApiSelect', |
|
|
|
componentProps: ({ formModel, formActionType }) => { |
|
|
|
return { |
|
|
|
//
|
|
|
|
api: () => getWorkPlaceTypeDict({ roleCode: "manageOrg" }), |
|
|
|
params: {}, |
|
|
|
onChange: async (value) => { |
|
|
|
// console.log(e)
|
|
|
|
let manageContactorDict = await getContactorDict({ workPlace: value, roleCode: "manageOrg" }) |
|
|
@ -514,6 +522,10 @@ export const formSchemas: FormSchema[] = [ |
|
|
|
}, |
|
|
|
}; |
|
|
|
}, |
|
|
|
|
|
|
|
defaultValue: '信息化工作专班', |
|
|
|
required: true, |
|
|
|
// dynamicDisabled:true,
|
|
|
|
//一列占比总共24,比如一行显示2列
|
|
|
|
colProps: { span: 12 }, |
|
|
|
}, |
|
|
@ -525,72 +537,88 @@ export const formSchemas: FormSchema[] = [ |
|
|
|
field: 'manageContactor', |
|
|
|
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
|
|
|
|
component: 'Select', |
|
|
|
// componentProps: {
|
|
|
|
// options: [
|
|
|
|
// {
|
|
|
|
// value: '1782674355449606145',
|
|
|
|
// label: '俞慧慧',
|
|
|
|
// }
|
|
|
|
|
|
|
|
// ],
|
|
|
|
// },
|
|
|
|
componentProps: (({ formModel }) => { |
|
|
|
return { |
|
|
|
options: [], |
|
|
|
options: [ |
|
|
|
{ |
|
|
|
value: '1782674355449606145', |
|
|
|
label: '俞慧慧', |
|
|
|
} |
|
|
|
|
|
|
|
], |
|
|
|
} |
|
|
|
|
|
|
|
}), |
|
|
|
|
|
|
|
defaultValue: '1782674355449606145', |
|
|
|
required: true, |
|
|
|
//一列占比总共24,比如一行显示2列
|
|
|
|
colProps: { span: 12 }, |
|
|
|
}, |
|
|
|
{ |
|
|
|
//标题名称
|
|
|
|
label: '监管单位', |
|
|
|
//字段
|
|
|
|
field: 'supervisor', |
|
|
|
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
|
|
|
|
component: 'ApiSelect', |
|
|
|
componentProps: ({ formModel, formActionType }) => { |
|
|
|
return { |
|
|
|
//
|
|
|
|
api: () => getWorkPlaceTypeDict({ roleCode: "supervisor" }), |
|
|
|
showSearch: true, |
|
|
|
filterOption: (input: string, option: any) => { return option.value.toLowerCase().indexOf(input.toLowerCase()) >= 0 }, |
|
|
|
onChange: async (value) => { |
|
|
|
let supervisorContactorDict = await getContactorDict({ workPlace: value, roleCode: "supervisor" }) |
|
|
|
// formModel.manageContactor = undefined; // reset city value
|
|
|
|
const { updateSchema, setFieldsValue } = formActionType; |
|
|
|
updateSchema({ |
|
|
|
field: 'supervisorContactor', |
|
|
|
componentProps: { |
|
|
|
options: supervisorContactorDict, |
|
|
|
}, |
|
|
|
}); |
|
|
|
let ischange = true; |
|
|
|
if (supervisorContactorDict?.length > 0) { |
|
|
|
supervisorContactorDict.forEach(element => { |
|
|
|
if (formModel.supervisorContactor == null || element.value == formModel.supervisorContactor) { |
|
|
|
ischange = false |
|
|
|
// {
|
|
|
|
// //标题名称
|
|
|
|
// label: '监管单位',
|
|
|
|
// //字段
|
|
|
|
// field: 'supervisor',
|
|
|
|
// //组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
|
|
|
|
// component: 'ApiSelect',
|
|
|
|
// componentProps: ({ formModel, formActionType }) => {
|
|
|
|
// return {
|
|
|
|
// //
|
|
|
|
// api: () => getWorkPlaceTypeDict({ roleCode: "supervisor" }),
|
|
|
|
// showSearch: true,
|
|
|
|
// filterOption: (input: string, option: any) => { return option.value.toLowerCase().indexOf(input.toLowerCase()) >= 0 },
|
|
|
|
// onChange: async (value) => {
|
|
|
|
// let supervisorContactorDict = await getContactorDict({ workPlace: value, roleCode: "supervisor" })
|
|
|
|
// // formModel.manageContactor = undefined; // reset city value
|
|
|
|
// const { updateSchema, setFieldsValue } = formActionType;
|
|
|
|
// updateSchema({
|
|
|
|
// field: 'supervisorContactor',
|
|
|
|
// componentProps: {
|
|
|
|
// options: supervisorContactorDict,
|
|
|
|
// },
|
|
|
|
// });
|
|
|
|
// let ischange = true;
|
|
|
|
// if (supervisorContactorDict?.length > 0) {
|
|
|
|
// supervisorContactorDict.forEach(element => {
|
|
|
|
// if (formModel.supervisorContactor == null || element.value == formModel.supervisorContactor) {
|
|
|
|
// ischange = false
|
|
|
|
|
|
|
|
return; |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
if (ischange) { |
|
|
|
setFieldsValue({ supervisorContactor: "" }) |
|
|
|
} |
|
|
|
}, |
|
|
|
}; |
|
|
|
}, |
|
|
|
//一列占比总共24,比如一行显示2列
|
|
|
|
colProps: { span: 12 }, |
|
|
|
}, |
|
|
|
{ |
|
|
|
//标题名称
|
|
|
|
label: '监管单位负责人', |
|
|
|
//字段
|
|
|
|
field: 'supervisorContactor', |
|
|
|
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
|
|
|
|
component: 'Select', |
|
|
|
componentProps: { |
|
|
|
options: [], |
|
|
|
// return;
|
|
|
|
// }
|
|
|
|
// });
|
|
|
|
// }
|
|
|
|
// if (ischange) {
|
|
|
|
// 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 }, |
|
|
|
}, |
|
|
|
// },
|
|
|
|
// //一列占比总共24,比如一行显示2列
|
|
|
|
// colProps: { span: 12 },
|
|
|
|
// },
|
|
|
|
|
|
|
|
{ |
|
|
|
//标题名称
|
|
|
|