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