|
@ -18,6 +18,24 @@ |
|
|
</a-form-item> |
|
|
</a-form-item> |
|
|
</a-col> |
|
|
</a-col> |
|
|
</a-row> |
|
|
</a-row> |
|
|
|
|
|
<a-row :gutter="[16, 16]"> |
|
|
|
|
|
<a-col :span="24"> |
|
|
|
|
|
<a-form-item label="所属合同" name="contractName"> |
|
|
|
|
|
<a-select |
|
|
|
|
|
v-model:value="form.contractName" |
|
|
|
|
|
:options="contractNameOptions" |
|
|
|
|
|
placeholder="请选择" |
|
|
|
|
|
:disabled="!form.projectName" |
|
|
|
|
|
:fieldNames="{ |
|
|
|
|
|
label: 'contractName', |
|
|
|
|
|
value: 'contractName', |
|
|
|
|
|
options: 'options', |
|
|
|
|
|
}" |
|
|
|
|
|
@change="contractNameChange" |
|
|
|
|
|
/> |
|
|
|
|
|
</a-form-item> |
|
|
|
|
|
</a-col> |
|
|
|
|
|
</a-row> |
|
|
<a-row :gutter="[16, 16]"> |
|
|
<a-row :gutter="[16, 16]"> |
|
|
<a-col :span="24"> |
|
|
<a-col :span="24"> |
|
|
<a-form-item label="所属机构" name="organizationName"> |
|
|
<a-form-item label="所属机构" name="organizationName"> |
|
@ -89,6 +107,8 @@ |
|
|
getProjectInfo, |
|
|
getProjectInfo, |
|
|
getOrganizationType, |
|
|
getOrganizationType, |
|
|
getContractPartyBNameByProjectName, |
|
|
getContractPartyBNameByProjectName, |
|
|
|
|
|
getIoCompanyByName, |
|
|
|
|
|
getContractNamesByProjectName, |
|
|
} from './api'; |
|
|
} from './api'; |
|
|
export default { |
|
|
export default { |
|
|
setup(props, { emit }) { |
|
|
setup(props, { emit }) { |
|
@ -117,6 +137,7 @@ |
|
|
const res = await getOrganizationType(); |
|
|
const res = await getOrganizationType(); |
|
|
organizationNameOptions.value = res.rows; |
|
|
organizationNameOptions.value = res.rows; |
|
|
}; |
|
|
}; |
|
|
|
|
|
const contractNameOptions = ref([]); |
|
|
const showModal = async (type, id, projectId, selectInfo) => { |
|
|
const showModal = async (type, id, projectId, selectInfo) => { |
|
|
console.log(selectInfo); |
|
|
console.log(selectInfo); |
|
|
visible.value = true; |
|
|
visible.value = true; |
|
@ -125,10 +146,12 @@ |
|
|
title.value = '新增'; |
|
|
title.value = '新增'; |
|
|
form.projectName = selectInfo.node.ownerName; |
|
|
form.projectName = selectInfo.node.ownerName; |
|
|
form.organizationName = selectInfo.node.projectName; |
|
|
form.organizationName = selectInfo.node.projectName; |
|
|
const res = await getContractPartyBNameByProjectName({ |
|
|
const res = await getContractNamesByProjectName({ projectName: form.projectName }); |
|
|
projectName: selectInfo.node.ownerName, |
|
|
contractNameOptions.value = res; |
|
|
}); |
|
|
// const res = await getContractPartyBNameByProjectName({ |
|
|
form.maintenanceUnit = res; |
|
|
// projectName: selectInfo.node.ownerName, |
|
|
|
|
|
// }); |
|
|
|
|
|
// form.maintenanceUnit = res; |
|
|
initMap(); |
|
|
initMap(); |
|
|
} else if (type == 2) { |
|
|
} else if (type == 2) { |
|
|
title.value = '编辑'; |
|
|
title.value = '编辑'; |
|
@ -136,13 +159,18 @@ |
|
|
for (let i in form) { |
|
|
for (let i in form) { |
|
|
form[i] = data[i]; |
|
|
form[i] = data[i]; |
|
|
} |
|
|
} |
|
|
|
|
|
const res = await getContractNamesByProjectName({ projectName: form.projectName }); |
|
|
|
|
|
contractNameOptions.value = res; |
|
|
initMap(); |
|
|
initMap(); |
|
|
} |
|
|
} |
|
|
form.projectId = projectId; |
|
|
form.projectId = projectId; |
|
|
getProjectNameOptions(); |
|
|
getProjectNameOptions(); |
|
|
getOrganizationNameOptions(); |
|
|
getOrganizationNameOptions(); |
|
|
}; |
|
|
}; |
|
|
|
|
|
const contractNameChange = async (val) => { |
|
|
|
|
|
const res = await getIoCompanyByName(val); |
|
|
|
|
|
form.maintenanceUnit = res; |
|
|
|
|
|
}; |
|
|
const handleOk = () => { |
|
|
const handleOk = () => { |
|
|
formRef.value.validate().then((valid) => { |
|
|
formRef.value.validate().then((valid) => { |
|
|
if (valid) { |
|
|
if (valid) { |
|
@ -246,6 +274,8 @@ |
|
|
closeModal, |
|
|
closeModal, |
|
|
formRef, |
|
|
formRef, |
|
|
rules, |
|
|
rules, |
|
|
|
|
|
contractNameChange, |
|
|
|
|
|
contractNameOptions, |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
}; |
|
|
}; |
|
|