Browse Source

新增优化需求

changchun
zhouhaibin 2 months ago
parent
commit
573d08a368
  1. 195
      src/views/ProcessApprovalSubPage/component/fieldChangeDetail.vue
  2. 90
      src/views/projectBoard/liangShaiKanBan/index.vue
  3. 24
      src/views/projectBoard/liangShaiKanBan/liangShaiKanBan.api.ts
  4. 242
      src/views/projectBoard/liangShaiKanBan/liangShaiKanBan.data.ts
  5. 16
      src/views/projectBoard/urt/urt/urt.data.ts
  6. 1
      src/views/projectLib/projectInfo/projectInfo.data.ts
  7. 549
      src/views/projectLib/projectInfoHistory/projectInfoHistory.data.ts

195
src/views/ProcessApprovalSubPage/component/fieldChangeDetail.vue

@ -16,102 +16,115 @@
</div>
</template>
<script lang="ts" name="fieldChangeDetail" setup>
import { onMounted, ref, reactive } from 'vue'
import { useForm, BasicForm } from '@/components/Form';
import { BasicTable, ActionItem, TableAction, useTable } from '@/components/Table';
import { formSchemas, resourcetableColumns } from '../../projectLib/projectInfo/projectInfo.data';
import { getFieldchangeByGroupid, getFieldchangeFileinfoList } from '../../projectLib/projectInfo/projectInfo.api'
import { downloadFile } from "@/api/common/api"
import { FormSchema } from '@/components/Form';
import { onMounted, ref, reactive } from 'vue';
import { useForm, BasicForm } from '@/components/Form';
import { BasicTable, ActionItem, TableAction, useTable } from '@/components/Table';
import { resourcetableColumns } from '../../projectLib/projectInfo/projectInfo.data';
import {
getFieldchangeByGroupid,
getFieldchangeFileinfoList,
} from '../../projectLib/projectInfo/projectInfo.api';
import { historyformSchemas } from '@/views/projectLib/projectInfoHistory/projectInfoHistory.data';
import { downloadFile } from '@/api/common/api';
import { FormSchema } from '@/components/Form';
let dataTo = defineProps(["fieldChangeGroupid", "isEdit"])
console.log("dataTodataTodataTo", dataTo)
let datares = ref()
let showFormSchema: FormSchema[] = []
let objnew = ref({})
let objold = ref({})
onMounted(async () => {
let res = await getFieldchangeByGroupid({ fieldChangeGroupid: dataTo.fieldChangeGroupid })
datares.value = await getFieldchangeFileinfoList({ fieldChangeGroupid: dataTo.fieldChangeGroupid })
// if (datares.value) {
// setTableData(datares.value)
// }
res.forEach(itemRes => {
formSchemas.forEach(itemformSchemas => {
if (itemformSchemas.field == itemRes.fieldValue) {
showFormSchema.push(itemformSchemas)
objnew[itemRes.fieldValue] = itemRes.newvalue
objold[itemRes.fieldValue] = itemRes.oldvalue
}
})
})
resetoldSchema(showFormSchema)
resetnewSchema(showFormSchema)
setnewFieldsValue(objnew)
setoldFieldsValue(objold)
setProps({ disabled: dataTo.isEdit == true ? false : true })
let dataTo = defineProps(['fieldChangeGroupid', 'isEdit']);
console.log('dataTodataTodataTo', dataTo);
let datares = ref();
let showFormSchema: FormSchema[] = [];
let objnew = ref({});
let objold = ref({});
onMounted(async () => {
let res = await getFieldchangeByGroupid({ fieldChangeGroupid: dataTo.fieldChangeGroupid });
datares.value = await getFieldchangeFileinfoList({
fieldChangeGroupid: dataTo.fieldChangeGroupid,
});
// if (datares.value) {
// setTableData(datares.value)
// }
res.forEach((itemRes) => {
historyformSchemas.forEach((itemformSchemas) => {
if (itemformSchemas.field == itemRes.fieldValue) {
showFormSchema.push(itemformSchemas);
objnew[itemRes.fieldValue] = itemRes.newvalue;
objold[itemRes.fieldValue] = itemRes.oldvalue;
}
});
});
resetoldSchema(showFormSchema);
resetnewSchema(showFormSchema);
setnewFieldsValue(objnew);
setoldFieldsValue(objold);
setProps({ disabled: dataTo.isEdit == true ? false : true });
});
})
const [registeroldFieldForm, { setFieldsValue: setoldFieldsValue, resetSchema: resetoldSchema }] = useForm({
showActionButtonGroup: false,
labelCol: { style: { width: '120px' } },
wrapperCol: { style: { width: 'auto' } },
disabled: true
})
const [registernewFieldForm, { setProps, getFieldsValue: getnewFieldsValue, setFieldsValue: setnewFieldsValue, resetSchema: resetnewSchema, validate }] = useForm({
showActionButtonGroup: false,
labelCol: { style: { width: '120px' } },
wrapperCol: { style: { width: 'auto' } },
disabled: true
})
//table
const [registerResourceTable, { setTableData }] = useTable({
size: 'small',//
title: '资料详情',
api: getFieldchangeFileinfoList,
columns: resourcetableColumns,
useSearchForm: false,
actionColumn: {
width: 140,
title: '操作',
dataIndex: 'action',
slots: { customRender: 'action' },
},
beforeFetch(param) {
param.fieldChangeGroupid = dataTo.fieldChangeGroupid
}
});
function getTableAction(record): ActionItem[] {
return [
const [registeroldFieldForm, { setFieldsValue: setoldFieldsValue, resetSchema: resetoldSchema }] =
useForm({
showActionButtonGroup: false,
labelCol: { style: { width: '120px' } },
wrapperCol: { style: { width: 'auto' } },
disabled: true,
});
const [
registernewFieldForm,
{
label: '下载',
ifShow: true,
onClick: handleDetailpage.bind(null, record),
}
];
}
function handleDetailpage(record) {
console.log("我这一行的数据是", record)
let param = {
path: record.documentPath,
fileName: record.documentName
}
//
console.log("我这一行的数据是", param)
setProps,
getFieldsValue: getnewFieldsValue,
setFieldsValue: setnewFieldsValue,
resetSchema: resetnewSchema,
validate,
},
] = useForm({
showActionButtonGroup: false,
labelCol: { style: { width: '120px' } },
wrapperCol: { style: { width: 'auto' } },
disabled: true,
});
downloadFile("/huzhouUploadfileinfo/downloadfile", record.documentName, param)
}
//table
const [registerResourceTable, { setTableData }] = useTable({
size: 'small', //
title: '资料详情',
api: getFieldchangeFileinfoList,
columns: resourcetableColumns,
useSearchForm: false,
actionColumn: {
width: 140,
title: '操作',
dataIndex: 'action',
slots: { customRender: 'action' },
},
beforeFetch(param) {
param.fieldChangeGroupid = dataTo.fieldChangeGroupid;
},
});
function getTableAction(record): ActionItem[] {
return [
{
label: '下载',
ifShow: true,
onClick: handleDetailpage.bind(null, record),
},
];
}
function handleDetailpage(record) {
console.log('我这一行的数据是', record);
let param = {
path: record.documentPath,
fileName: record.documentName,
};
//
console.log('我这一行的数据是', param);
defineExpose({ getnewFieldsValue, validate })
downloadFile('/huzhouUploadfileinfo/downloadfile', record.documentName, param);
}
defineExpose({ getnewFieldsValue, validate });
</script>
<style scoped>
.first {
padding-top: 20px;
margin-top: 20px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12), 0 0 6px rgba(0, 0, 0, 0.04);
}
</style>
.first {
padding-top: 20px;
margin-top: 20px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12), 0 0 6px rgba(0, 0, 0, 0.04);
}
</style>

90
src/views/projectBoard/liangShaiKanBan/index.vue

@ -0,0 +1,90 @@
<template>
<div>
<a-tabs v-model:activeKey="activeKey" type="card" @change="handleTabChange">
<a-tab-pane key="1" tab="汇总">
<BasicTable @register="registerTable">
<template #action="{ record }">
<!-- <TableAction :actions="getTableAction(record)" /> -->
</template>
</BasicTable>
</a-tab-pane>
<a-tab-pane key="2" tab="晾晒看板">
<BasicTable @register="registerURTTable">
<template #action="{ record }">
<!-- <TableAction :actions="getTableAction(record)" /> -->
</template>
</BasicTable>
</a-tab-pane>
</a-tabs>
</div>
</template>
<script lang="ts" name="system-user" setup>
//ts
import { ref } from 'vue';
import { ActionItem, BasicTable, TableAction, useTable } from '@/components/Table';
import { useModal, BasicModal } from '@/components/Modal';
import { huizongcolumns, liangshaicolumns,searchFormSchema } from './liangShaiKanBan.data';
import { countStageByRefrom, getStagePage } from './liangShaiKanBan.api';
const activeKey = ref('1');
const [registerTable, { reload }] = useTable({
title: '详情',
api: countStageByRefrom,
columns: huizongcolumns,
useSearchForm: false,
//
// formConfig: {
// schemas: urtFormSchema,
// }
});
const [registerURTTable, { reload: urtreload }] = useTable({
title: '详情',
api: getStagePage,
columns: liangshaicolumns,
useSearchForm: true,
//
formConfig: {
schemas: searchFormSchema,
}
});
function handleTabChange(key) {
// activeKey.value = key;
if (key === '1') {
reload();
} else {
urtreload();
}
}
// function getDropDownAction(record): ActionItem[] {
// return [
// {
// label: '',
// ifShow: () => {
// return isShowByRoles('manageOrg')
// },
// onClick: handleModify.bind(null, record)
// },
// {
// label: '',
// ifShow: () => {
// return isShowByRoles('manageOrg')
// },
// popConfirm: {
// title: '?',
// confirm: handleDelete.bind(null, record),
// },
// }
// ];
// }
function handleSubmit(record) {}
function closeModel() {
reload();
}
</script>
<style scoped></style>

24
src/views/projectBoard/liangShaiKanBan/liangShaiKanBan.api.ts

@ -0,0 +1,24 @@
import { defHttp } from '@/utils/http/axios';
export enum Api {
getSuperLeaderApproveInfo = '/workflow/getSuperLeaderApproveInfo',
getURTUnApprovedDaysPage = "/workflow/getURTUnApprovedDaysPage",
showCountBoardByAdminDivision = "/huzhouProject/showCountBoardByAdminDivision",
countStageByRefrom= "/huzhouProject/countStageByRefrom",
getStagePage = "/huzhouProject/getStagePage",
}
/**
*
*/
export const countStageByRefrom = (params?) => defHttp.get({ url: Api.countStageByRefrom,params})
export const getStagePage = (params?) => defHttp.get({ url: Api.getStagePage,params})
// export const getDimensionPageSorted = (params) => defHttp.get({ url: Api.getDgetStagePageimensionPageSorted,params })
// export const getPageSorted = (params) => defHttp.get({ url: Api.getPageSorted,params })
// export const submitplaninfoUploadFile = (params?) =>defHttp.post({ url: Api.submitplaninfoUploadFile,headers:{ "Content-Type": "multipart/form-data" }, params })

242
src/views/projectBoard/liangShaiKanBan/liangShaiKanBan.data.ts

@ -0,0 +1,242 @@
import { FormSchema } from '@/components/Form';
import { BasicColumn } from '@/components/Table';
import { getDutyWorkplaceList } from '@/views/informationSub/countStatistics/countStatistics.api';
async function getDutyWorkplaceOptions() {
let dutyWorkplaceOption = await getDutyWorkplaceList();
let uniqueList = [...new Set(dutyWorkplaceOption)];
let res = uniqueList.map((item) => {
return {
label: item,
value: item,
};
});
console.log('wwres', res);
return res;
}
export const huizongcolumns: BasicColumn[] = [
{
title: '改革所属项目',
dataIndex: 'reformName',
format: 'dict|reformTasks',
resizable: true
},
{
title: '任务牵头处室',
dataIndex: 'superLeader',
format: 'dict|superLeader',
resizable: true
},
{
title: '项目总数',
dataIndex: 'projectNum',
},
{
title: '项目立项阶段(联审)',
dataIndex: 'reviewNum',
},
{
title: '项目立项阶段(核验)',
dataIndex: 'verifyNum',
},
{
title: '项目立项阶段(立项)',
dataIndex: 'approvalNum',
},
{
title: '项目立项阶段数量',
dataIndex: 'proposalNum',
},
{
title: '项目采购阶段数量',
dataIndex: 'purchaseNum',
},
{
title: '项目建设阶段数量',
dataIndex: 'buildNum',
},
{
title: '项目验收阶段数量',
dataIndex: 'acceptanceNum',
},
];
export const liangshaicolumns: BasicColumn[] = [
{
title: '改革所属项目',
dataIndex: 'reformName',
format: 'dict|reformTasks',
resizable: true
},
{
title: '任务牵头处室',
dataIndex: 'superLeader',
format: 'dict|superLeader',
resizable: true
},
{
title: '项目名称',
dataIndex: 'projectName',
},
{
title: '责任单位',
dataIndex: 'dutyWorkplace',
},
{
title: '申报阶段',
dataIndex: 'declareStage',
format: 'dict|CompletionStatus',
},
{
title: '立项阶段(联审)',
dataIndex: 'reviewStage',
format: 'dict|CompletionStatus',
},
{
title: '立项阶段(核验)',
dataIndex: 'verifyStage',
format: 'dict|CompletionStatus',
},
{
title: '立项阶段(立项)',
dataIndex: 'approvalStage',
format: 'dict|CompletionStatus',
},
{
title: '采购阶段',
dataIndex: 'purchaseStage',
format: 'dict|CompletionStatus',
},
{
title: '建设阶段',
dataIndex: 'buildStage',
format: 'dict|CompletionStatus',
},
{
title: '验收阶段',
dataIndex: 'acceptanceStage',
format: 'dict|CompletionStatus',
},
];
export const searchFormSchema: FormSchema[] = [
{
label: '项目名称',
field: 'projectName',
component: 'Input',
labelWidth: 'auto'
//colProps: { span: 6 },
},
{
label: '行政区划',
field: 'adminDivision',
component: 'Select',
labelWidth: 'auto',
componentProps: {
options: [
{
label: "市本级",
value: "市本级"
},
{
label: "吴兴区",
value: "吴兴区"
},
{
label: "南浔区",
value: "南浔区"
},
{
label: "德清县",
value: "德清县"
},
{
label: "长兴县",
value: "长兴县"
},
{
label: "安吉县",
value: "安吉县"
},
]
}
//colProps: { span: 6 },
},
{
//标题名称
label: '责任单位',
//字段
field: 'dutyWorkplace',
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
component: 'ApiSelect',
componentProps: () => {
return {
api: () =>getDutyWorkplaceOptions()
}
},
labelWidth: 'auto'
},
{
//标题名称
label: '单位属性',
//字段
field: 'workplaceProperties',
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
component: 'Select',
componentProps: {
options: [
{
label: "医疗机构",
value: "医疗机构"
},
{
label: "卫生行政部门",
value: "卫生行政部门"
}
]
},
labelWidth: 'auto'
},
{
field: 'reformName',
label: '改革所属项目',
component: 'DictSelect',
componentProps: {
dictType: 'reformTasks',
},
itemProps: { validateTrigger: 'blur' },
labelWidth: 'auto'
},
{
field: 'superLeader',
label: '上级指导处室',
component: 'DictSelect',
componentProps: {
dictType: 'superLeader',
},
labelWidth: 'auto'
},
// {
// field: 'stage',
// label: '项目状态',
// component: 'DictSelect',
// componentProps: {
// dictType: 'projectStage',
// },
// labelWidth: 'auto'
// },
];

16
src/views/projectBoard/urt/urt/urt.data.ts

@ -49,7 +49,21 @@ export const urtgcolumns: BasicColumn[] = [
dataIndex: 'sgaj',
ellipsis: false,
}
},
{
title: '是否完成',
dataIndex: 'isfinish',
customRender: ({ record }) => {
if (record.isfinish == 1) {
return "审批中"
} else if (record.isfinish == 2) {
return "已完成"
} else {
return "未完成"
}
},
},
];
export const urtFormSchema: FormSchema[] = [
{

1
src/views/projectLib/projectInfo/projectInfo.data.ts

@ -310,6 +310,7 @@ export const formSchemas: FormSchema[] = [
//步数
step: 1,
min: 0,
},
//一列占比总共24,比如一行显示2列
colProps: { span: 12 },

549
src/views/projectLib/projectInfoHistory/projectInfoHistory.data.ts

@ -5,7 +5,25 @@ const dictStore = useDictStore();
const reformTasksDicts: Array<Object> = dictStore.selectDictArray("reformTasks")
const roomDicts: Array<Object> = dictStore.selectDictArray("superLeader")
import { getWorkPlaceTypeDict, getContactorDict, getUserInfoByid } from '../initiatesProjects/initiatesProjects.api'
import { getWorkPlaceTypeDict, getContactorDict, getUserInfoByid ,getUserDictByRoles} from '../initiatesProjects/initiatesProjects.api'
import { useUserStore } from '@/store/modules/user';
const userStore = useUserStore();
import { getDutyWorkplaceList } from '@/views/informationSub/countStatistics/countStatistics.api';
async function getDutyWorkplaceOptions() {
let dutyWorkplaceOption = await getDutyWorkplaceList();
let uniqueList = [...new Set(dutyWorkplaceOption)];
let res = uniqueList.map((item) => {
return {
label: item,
value: item,
};
});
console.log('wwres', res);
return res;
}
// let manageOrgDict = await getWorkPlaceTypeDict({ workPlaceType: "1" })
// let supervisorDict = await getWorkPlaceTypeDict({ workPlaceType: "2" })
@ -96,3 +114,532 @@ export const searchFormSchema: FormSchema[] = [
];
export const historyformSchemas: 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: 'Input',
colProps: { span: 12 },
required: true,
},
{
//标题名称
label: '总投资(元)',
//字段
field: 'totalMoney',
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
component: 'Input',
//一列占比总共24,比如一行显示2列
colProps: { span: 12 },
required: true,
},
{
//标题名称
label: '中央资金(元)',
//字段
field: 'centralMoney',
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
component: 'Input',
//一列占比总共24,比如一行显示2列
colProps: { span: 12 },
required: true,
},
{
//标题名称
label: '省级资金(元)',
//字段
field: 'provincialMoney',
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
component: 'Input',
//一列占比总共24,比如一行显示2列
colProps: { span: 12 },
required: true,
},
{
//标题名称
label: '市级资金(元)',
//字段
field: 'cityMoney',
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
component: 'Input',
//一列占比总共24,比如一行显示2列
colProps: { span: 12 },
required: true,
},
{
//标题名称
label: '区县级资金(元)',
//字段
field: 'countyMoney',
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
component: 'Input',
//一列占比总共24,比如一行显示2列
colProps: { span: 12 },
required: true,
},
{
//标题名称
label: '自筹资金(元)',
//字段
field: 'selfMoney',
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
component: 'Input',
//一列占比总共24,比如一行显示2列
colProps: { span: 12 },
required: true,
},
{
//标题名称
label: '2023年支付(元)',
//字段
field: 'payamount2023Money',
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
component: 'Input',
//一列占比总共24,比如一行显示2列
colProps: { span: 12 },
required: true,
},
{
//标题名称
label: '2024年支付(元)',
//字段
field: 'payamount2024Money',
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
component: 'Input',
//一列占比总共24,比如一行显示2列
colProps: { span: 12 },
required: true,
}, {
//标题名称
label: '2025年支付(元)',
//字段
field: 'payamount2025Money',
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
component: 'Input',
//一列占比总共24,比如一行显示2列
colProps: { span: 12 },
required: true,
},
{
field: 'reformName',
label: '改革所属项目',
component: 'DictSelect',
componentProps: {
dictType: 'reformTasks',
},
itemProps: { validateTrigger: 'blur' },
colProps: { span: 12 },
required: true,
},
{
field: 'superLeader',
label: '任务牵头处室',
required: true,
component: 'DictSelect',
componentProps: {
dictType: 'superLeader',
},
itemProps: { validateTrigger: 'blur' },
colProps: { span: 12 },
},
{
//标题名称
label: '项目联系人',
//字段
field: 'projectContacts',
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
component: 'ApiSelect',
componentProps: ({ formModel, formActionType }) => {
return {
//
api: () => getUserDictByRoles({ roles: "projectContact" }),
showSearch: true,
filterOption: (input: string, option: any) => { return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 },
onChange: async (value, option) => {
// formModel.manageContactor = undefined; // reset city value
const { updateSchema, setFieldsValue } = formActionType;
if (option?.phone) {
setFieldsValue({ phone: option.phone })
}
},
};
},
defaultValue: userStore.getUserInfo.id,
dynamicDisabled: true,
//一列占比总共24,比如一行显示2列
colProps: { span: 12 },
required: true,
},
{
//标题名称
label: '联系电话',
//字段
field: 'phone',
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
component: 'Input',
defaultValue: userStore.getUserInfo.phoneNumber,
//一列占比总共24,比如一行显示2列
colProps: { span: 12 },
dynamicDisabled: true,
},
{
//标题名称
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" }),
onChange: async (value) => {
// console.log(e)
let manageContactorDict = await getContactorDict({ workPlace: value, roleCode: "manageOrg" })
// formModel.manageContactor = undefined; // reset city value
const { updateSchema, setFieldsValue } = formActionType;
updateSchema({
field: 'manageContactor',
componentProps: {
options: manageContactorDict,
},
});
let ischange = true;
if (manageContactorDict?.length > 0) {
manageContactorDict.forEach(element => {
if (formModel.manageContactor == null || element.value == formModel.manageContactor) {
ischange = false
return;
}
});
}
if (ischange) {
setFieldsValue({ manageContactor: "" })
}
},
};
},
required: true,
// dynamicDisabled:true,
//一列占比总共24,比如一行显示2列
colProps: { span: 12 },
},
{
//标题名称
label: '管理单位负责人',
//字段
field: 'manageContactor',
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
component: 'Select',
// componentProps: {
// options: [
// {
// value: '1782674355449606145',
// label: '俞慧慧',
// }
// ],
// },
componentProps: (({ formModel }) => {
return {
options: [
],
}
}),
required: true,
//一列占比总共24,比如一行显示2列
colProps: { span: 12 },
},
{
//标题名称
label: '承建单位',
//字段
field: 'contructor',
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
component: 'ApiSelect',
componentProps: ({ formModel, formActionType }) => {
return {
//
api: () => getWorkPlaceTypeDict({ roleCode: "contructor" }),
onChange: async (value) => {
// console.log(e)
let contructorContactorDict = await getContactorDict({ workPlace: value, roleCode: "contructor" })
// formModel.manageContactor = undefined; // reset city value
const { updateSchema, setFieldsValue } = formActionType;
updateSchema({
field: 'contructorContactor',
componentProps: {
options: contructorContactorDict,
},
});
let ischange = true;
if (contructorContactorDict?.length > 0) {
contructorContactorDict.forEach(element => {
if (formModel.contructorContactor == null || element.value == formModel.contructorContactor) {
ischange = false
return;
}
});
}
if (ischange) {
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: 'controler',
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
component: 'ApiSelect',
componentProps: ({ formModel, formActionType }) => {
return {
//
api: () => getWorkPlaceTypeDict({ roleCode: "controler" }),
onChange: async (value) => {
// console.log(e)
let controlerContactorDict = await getContactorDict({ workPlace: value, roleCode: "controler" })
// formModel.manageContactor = undefined; // reset city value
const { updateSchema, setFieldsValue } = formActionType;
updateSchema({
field: 'controlerContactor',
componentProps: {
options: controlerContactorDict,
}
});
let ischange = true;
if (controlerContactorDict?.length > 0) {
controlerContactorDict.forEach(element => {
if (formModel.controlerContactor == null || element.value == formModel.controlerContactor) {
ischange = false
return;
}
});
}
if (ischange) {
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: 'ApiSelect',
componentProps: ({ formModel, formActionType }) => {
return {
//
api: () => getWorkPlaceTypeDict({ roleCode: "consult" }),
onChange: async (value) => {
// console.log(e)
let consultContactoDict = await getContactorDict({ workPlace: value, roleCode: "consult" })
// formModel.manageContactor = undefined; // reset city value
const { updateSchema, setFieldsValue } = formActionType;
updateSchema({
field: 'consultContactor',
componentProps: {
options: consultContactoDict,
}
});
let ischange = true;
if (consultContactoDict?.length > 0) {
consultContactoDict.forEach(element => {
if (formModel.consultContactor == null || element.value == formModel.consultContactor) {
ischange = false
return;
}
});
}
if (ischange) {
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
}
];
Loading…
Cancel
Save