fix(api): 修复接口路径和字段映射问题
- 修正了 qualificationsDetails 接口路径,去掉了末尾斜杠 - 更新了 qualificationsTypeList 接口路径为 getReviewedQualificationsTypeName - 将 parentProjectCorpName 字段映射更改为 groupCompanyName - 在多个组件中引入 getLabelName 工具函数 - 重构了资质类型选择的标签获取逻辑 - 修复了项目详情获取的数据传递方式 - 添加了路由监听以支持页面参数变化重新获取数据 - 调整了项目负责人表单项的布局结构 - 优化了安全管理协议上传组件的格式化代码 - 更新了列表页面的列配置,调整审核部门显示字段master
parent
986f21f752
commit
16d266eef3
|
|
@ -49,7 +49,7 @@ export const userListByDeptId = declareRequest(
|
||||||
);
|
);
|
||||||
export const qualificationsDetails = declareRequest(
|
export const qualificationsDetails = declareRequest(
|
||||||
"qualificationStatisticsLoading",
|
"qualificationStatisticsLoading",
|
||||||
`Post > @/xgfManager/qualifications/qualificationsDetails/`,
|
`Post > @/xgfManager/qualifications/qualificationsDetails`,
|
||||||
);
|
);
|
||||||
export const projectAudit = declareRequest(
|
export const projectAudit = declareRequest(
|
||||||
"qualificationStatisticsLoading",
|
"qualificationStatisticsLoading",
|
||||||
|
|
@ -85,5 +85,5 @@ export const projectUserChangeRecordList = declareRequest(
|
||||||
);
|
);
|
||||||
export const qualificationsTypeList = declareRequest(
|
export const qualificationsTypeList = declareRequest(
|
||||||
"qualificationStatisticsLoading",
|
"qualificationStatisticsLoading",
|
||||||
`Post > @/xgfManager/qualifications/projectUserChangeRecord/list`,
|
`Post > @/xgfManager/qualifications/getReviewedQualificationsTypeName`,
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ function List(props) {
|
||||||
/>
|
/>
|
||||||
<Table
|
<Table
|
||||||
columns={[
|
columns={[
|
||||||
{ title: "集团单位名称", dataIndex: "parentProjectCorpName" },
|
{ title: "集团单位名称", dataIndex: "groupCompanyName" },
|
||||||
{ title: "一级项目名称", dataIndex: "parentProjectName" },
|
{ title: "一级项目名称", dataIndex: "parentProjectName" },
|
||||||
{ title: "相关方名称", dataIndex: "corpinfoName" },
|
{ title: "相关方名称", dataIndex: "corpinfoName" },
|
||||||
{ title: "项目名称", dataIndex: "projectName" },
|
{ title: "项目名称", dataIndex: "projectName" },
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ function List(props) {
|
||||||
/>
|
/>
|
||||||
<Table
|
<Table
|
||||||
columns={[
|
columns={[
|
||||||
{ title: "集团单位名称", dataIndex: "parentProjectCorpName" },
|
{ title: "集团单位名称", dataIndex: "groupCompanyName" },
|
||||||
{ title: "一级项目名称", dataIndex: "parentProjectName" },
|
{ title: "一级项目名称", dataIndex: "parentProjectName" },
|
||||||
{ title: "相关方名称", dataIndex: "corpinfoName" },
|
{ title: "相关方名称", dataIndex: "corpinfoName" },
|
||||||
{ title: "二级项目名称", dataIndex: "projectName" },
|
{ title: "二级项目名称", dataIndex: "projectName" },
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ import useGetFile from "zy-react-library/hooks/useGetFile";
|
||||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||||
import useTable from "zy-react-library/hooks/useTable";
|
import useTable from "zy-react-library/hooks/useTable";
|
||||||
import useUploadFile from "zy-react-library/hooks/useUploadFile";
|
import useUploadFile from "zy-react-library/hooks/useUploadFile";
|
||||||
import { validatorEndTime } from "zy-react-library/utils";
|
import { getLabelName, validatorEndTime } from "zy-react-library/utils";
|
||||||
import ViewProjectReviewUserModal from "~/components/ViewProjectReviewUserModal";
|
import ViewProjectReviewUserModal from "~/components/ViewProjectReviewUserModal";
|
||||||
import { NS_QUALIFICATION_STATISTICS } from "~/enumerate/namespace";
|
import { NS_QUALIFICATION_STATISTICS } from "~/enumerate/namespace";
|
||||||
|
|
||||||
|
|
@ -289,11 +289,14 @@ const StepOneComponent = (props) => {
|
||||||
items: qualificationsTypeList,
|
items: qualificationsTypeList,
|
||||||
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||||
itemsField: { valueKey: "qualificationsTypeId", labelKey: "qualificationsTypeName" },
|
itemsField: { valueKey: "qualificationsTypeId", labelKey: "qualificationsTypeName" },
|
||||||
onGetLabel: (label) => {
|
|
||||||
form.setFieldValue("qualificationsTypeName", label);
|
|
||||||
},
|
|
||||||
componentProps: {
|
componentProps: {
|
||||||
onChange: (event) => {
|
onChange: (event) => {
|
||||||
|
form.setFieldValue("qualificationsTypeName",getLabelName({
|
||||||
|
list: qualificationsTypeList,
|
||||||
|
status: event,
|
||||||
|
idKey: "qualificationsTypeId",
|
||||||
|
nameKey: "qualificationsTypeName",
|
||||||
|
}))
|
||||||
if (form.getFieldValue("isLocalCompany") === 0) {
|
if (form.getFieldValue("isLocalCompany") === 0) {
|
||||||
getDeptList(event);
|
getDeptList(event);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -36,8 +36,9 @@ function Review(props) {
|
||||||
{ bianma: "4", name: "货主单位" },
|
{ bianma: "4", name: "货主单位" },
|
||||||
{ bianma: "5", name: "驻港单位" },
|
{ bianma: "5", name: "驻港单位" },
|
||||||
];
|
];
|
||||||
const getData = async () => {
|
|
||||||
const projectDetailResult = await props["projectDetail"]({ id: query.id });
|
const getData = async (id = query.id) => {
|
||||||
|
const projectDetailResult = await props["projectDetail"]({ id });
|
||||||
if (!projectDetailResult || !projectDetailResult.data) {
|
if (!projectDetailResult || !projectDetailResult.data) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -74,6 +75,17 @@ function Review(props) {
|
||||||
|
|
||||||
setInfo(projectData);
|
setInfo(projectData);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
const unlisten = props.history.listen((location) => {
|
||||||
|
const searchParams = new URLSearchParams(location.search);
|
||||||
|
const newId = searchParams.get("id");
|
||||||
|
console.log(newId);
|
||||||
|
|
||||||
|
getData(newId);
|
||||||
|
});
|
||||||
|
return unlisten;
|
||||||
|
}, []);
|
||||||
const getProjectListAll = async () => {
|
const getProjectListAll = async () => {
|
||||||
const { data } = await props["projectListAll"]({});
|
const { data } = await props["projectListAll"]({});
|
||||||
setProjectListAll(data);
|
setProjectListAll(data);
|
||||||
|
|
@ -247,7 +259,7 @@ function Review(props) {
|
||||||
style={{ marginLeft: "20px" }}
|
style={{ marginLeft: "20px" }}
|
||||||
type="primary"
|
type="primary"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
props.history.push(`../ProjectFilingApplication/reView?id=${info.relatedProjectId}`);
|
props.history.push(`./ReView?id=${info.relatedProjectId}`);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
查看一级项目资料
|
查看一级项目资料
|
||||||
|
|
@ -357,8 +369,7 @@ function Review(props) {
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setViewProjectReviewUserModalOpen(true);
|
setViewProjectReviewUserModalOpen(true);
|
||||||
setViewProjectReviewUserModalData({
|
setViewProjectReviewUserModalData({
|
||||||
...record,
|
...record
|
||||||
eqQualificationinfoType: 1,
|
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ import useGetUserInfo from "zy-react-library/hooks/useGetUserInfo";
|
||||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||||
import useTable from "zy-react-library/hooks/useTable";
|
import useTable from "zy-react-library/hooks/useTable";
|
||||||
import useUploadFile from "zy-react-library/hooks/useUploadFile";
|
import useUploadFile from "zy-react-library/hooks/useUploadFile";
|
||||||
import { validatorEndTime } from "zy-react-library/utils";
|
import { getLabelName,validatorEndTime } from "zy-react-library/utils";
|
||||||
import ViewProjectReviewUserModal from "~/components/ViewProjectReviewUserModal";
|
import ViewProjectReviewUserModal from "~/components/ViewProjectReviewUserModal";
|
||||||
import { NS_QUALIFICATION_STATISTICS } from "~/enumerate/namespace";
|
import { NS_QUALIFICATION_STATISTICS } from "~/enumerate/namespace";
|
||||||
|
|
||||||
|
|
@ -128,7 +128,7 @@ const StepOneComponent = (props) => {
|
||||||
const [qualificationsTypeList, setQualificationsTypeList] = useState([]);
|
const [qualificationsTypeList, setQualificationsTypeList] = useState([]);
|
||||||
// 获取项目属地单位数据
|
// 获取项目属地单位数据
|
||||||
const getCorpInfoList = async () => {
|
const getCorpInfoList = async () => {
|
||||||
const { data } = await props["corpInfoList"]({ pageIndex: 1, pageSize: 1000, inType: [0] });
|
const { data } = await props["corpInfoList"]({ pageIndex: 1, pageSize: 1000, inType: [1] });
|
||||||
setCorpInfoList(data);
|
setCorpInfoList(data);
|
||||||
};
|
};
|
||||||
// 获取资质类型数据
|
// 获取资质类型数据
|
||||||
|
|
@ -213,7 +213,8 @@ const StepOneComponent = (props) => {
|
||||||
options={[
|
options={[
|
||||||
{ label: "项目基础信息", render: FORM_ITEM_RENDER_ENUM.DIVIDER },
|
{ label: "项目基础信息", render: FORM_ITEM_RENDER_ENUM.DIVIDER },
|
||||||
{ name: "projectName", label: "项目名称" },
|
{ name: "projectName", label: "项目名称" },
|
||||||
{ name: "userId", label: "项目负责人", render: (
|
{
|
||||||
|
name: "userId", label: "项目负责人", render: (
|
||||||
<PersonnelSelect
|
<PersonnelSelect
|
||||||
isNeedCorpInfoId={true}
|
isNeedCorpInfoId={true}
|
||||||
params={{ corpinfoId: props.userInfo?.corpinfoId || "" }}
|
params={{ corpinfoId: props.userInfo?.corpinfoId || "" }}
|
||||||
|
|
@ -254,7 +255,8 @@ const StepOneComponent = (props) => {
|
||||||
props.setUsercontentAddCmdList(newUserList);
|
props.setUsercontentAddCmdList(newUserList);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
} },
|
}
|
||||||
|
},
|
||||||
{ name: "userName", label: "项目负责人", onlyForLabel: true },
|
{ name: "userName", label: "项目负责人", onlyForLabel: true },
|
||||||
{ name: "initiationTime", label: "立项时间", render: FORM_ITEM_RENDER_ENUM.DATE },
|
{ name: "initiationTime", label: "立项时间", render: FORM_ITEM_RENDER_ENUM.DATE },
|
||||||
{ name: "startProjectTime", label: "计划开始时间", render: FORM_ITEM_RENDER_ENUM.DATE },
|
{ name: "startProjectTime", label: "计划开始时间", render: FORM_ITEM_RENDER_ENUM.DATE },
|
||||||
|
|
@ -262,7 +264,7 @@ const StepOneComponent = (props) => {
|
||||||
{ name: "chooseForm", label: "项目选取形式", render: <DictionarySelect dictValue="project_choose_form" onGetLabel={label => form.setFieldValue("chooseFormName", label)} /> },
|
{ name: "chooseForm", label: "项目选取形式", render: <DictionarySelect dictValue="project_choose_form" onGetLabel={label => form.setFieldValue("chooseFormName", label)} /> },
|
||||||
{ name: "chooseFormName", label: "项目选取形式名称", onlyForLabel: true },
|
{ name: "chooseFormName", label: "项目选取形式名称", onlyForLabel: true },
|
||||||
{ name: "fourNewFlag", label: "是否涉及四新工作内容", labelCol: { span: 8 }, render: FORM_ITEM_RENDER_ENUM.RADIO, items: [{ bianma: 1, name: "是" }, { bianma: 0, name: "否" }] },
|
{ name: "fourNewFlag", label: "是否涉及四新工作内容", labelCol: { span: 8 }, render: FORM_ITEM_RENDER_ENUM.RADIO, items: [{ bianma: 1, name: "是" }, { bianma: 0, name: "否" }] },
|
||||||
{ name: "threePeopleFlag", label: "是否涉及三人及以上工作内容", labelCol: { span: 8 }, render: FORM_ITEM_RENDER_ENUM.RADIO, items: [{ bianma: 1, name: "是" }, { bianma: 0, name: "否" }] },
|
{ name: "threePeopleFlag", label: "是否涉及三人及以上工作内容", labelCol: { span: 9 }, render: FORM_ITEM_RENDER_ENUM.RADIO, items: [{ bianma: 1, name: "是" }, { bianma: 0, name: "否" }] },
|
||||||
{ name: "nightWorkFlag", label: "是否涉及夜间作业", labelCol: { span: 8 }, render: FORM_ITEM_RENDER_ENUM.RADIO, items: [{ bianma: 1, name: "是" }, { bianma: 0, name: "否" }] },
|
{ name: "nightWorkFlag", label: "是否涉及夜间作业", labelCol: { span: 8 }, render: FORM_ITEM_RENDER_ENUM.RADIO, items: [{ bianma: 1, name: "是" }, { bianma: 0, name: "否" }] },
|
||||||
{ name: "specialFlag", label: "是否包含特殊作业", labelCol: { span: 8 }, render: FORM_ITEM_RENDER_ENUM.RADIO, items: [{ bianma: 1, name: "是" }, { bianma: 0, name: "否" }] },
|
{ name: "specialFlag", label: "是否包含特殊作业", labelCol: { span: 8 }, render: FORM_ITEM_RENDER_ENUM.RADIO, items: [{ bianma: 1, name: "是" }, { bianma: 0, name: "否" }] },
|
||||||
{ label: "项目审核信息", render: FORM_ITEM_RENDER_ENUM.DIVIDER },
|
{ label: "项目审核信息", render: FORM_ITEM_RENDER_ENUM.DIVIDER },
|
||||||
|
|
@ -271,32 +273,21 @@ const StepOneComponent = (props) => {
|
||||||
items: qualificationsTypeList,
|
items: qualificationsTypeList,
|
||||||
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||||
itemsField: { valueKey: "qualificationsTypeId", labelKey: "qualificationsTypeName" },
|
itemsField: { valueKey: "qualificationsTypeId", labelKey: "qualificationsTypeName" },
|
||||||
onGetLabel: (label) => {
|
|
||||||
form.setFieldValue("qualificationsTypeName", label);
|
|
||||||
},
|
|
||||||
componentProps: {
|
componentProps: {
|
||||||
onChange: (event) => {
|
onChange: (event) => {
|
||||||
if (form.getFieldValue("isLocalCompany") === 0) {
|
|
||||||
getDeptList(event);
|
|
||||||
}
|
|
||||||
props.setQualificationsTypeId(event);
|
props.setQualificationsTypeId(event);
|
||||||
form.setFieldsValue({
|
form.setFieldValue("qualificationsTypeName", getLabelName({
|
||||||
recommendCorpId: "",
|
list: qualificationsTypeList,
|
||||||
recommendCorpName: "",
|
status: event,
|
||||||
recommendDeptId: "",
|
idKey: "qualificationsTypeId",
|
||||||
recommendDeptName: "",
|
nameKey: "qualificationsTypeName",
|
||||||
recommendUserIds: [],
|
}))
|
||||||
recommendUserNames: "",
|
|
||||||
manageDeptId: "",
|
|
||||||
manageDeptName: "",
|
|
||||||
manageUserIds: [],
|
|
||||||
manageUserNames: "",
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{ name: "qualificationsTypeName", label: "项目类别名称", onlyForLabel: true },
|
{ name: "qualificationsTypeName", label: "项目类别名称", onlyForLabel: true },
|
||||||
{ name: "approvalCorpId",
|
{
|
||||||
|
name: "approvalCorpId",
|
||||||
label: "集团公司审核",
|
label: "集团公司审核",
|
||||||
labelCol: { span: 5 },
|
labelCol: { span: 5 },
|
||||||
items: corpInfoList,
|
items: corpInfoList,
|
||||||
|
|
@ -318,7 +309,7 @@ const StepOneComponent = (props) => {
|
||||||
{ name: "approvalCorpName", label: "集团公司审核名称", onlyForLabel: true },
|
{ name: "approvalCorpName", label: "集团公司审核名称", onlyForLabel: true },
|
||||||
{
|
{
|
||||||
name: "approvalDeptId",
|
name: "approvalDeptId",
|
||||||
labelCol: { span: 5 },
|
labelCol: { span: 6 },
|
||||||
label: "集团公司部门审核",
|
label: "集团公司部门审核",
|
||||||
render: (
|
render: (
|
||||||
<DepartmentSelectTree
|
<DepartmentSelectTree
|
||||||
|
|
@ -338,7 +329,7 @@ const StepOneComponent = (props) => {
|
||||||
{
|
{
|
||||||
name: "approvalUserIds",
|
name: "approvalUserIds",
|
||||||
label: "集团公司人员审核",
|
label: "集团公司人员审核",
|
||||||
labelCol: { span: 5 },
|
labelCol: { span: 6 },
|
||||||
render: (
|
render: (
|
||||||
<PersonnelSelect
|
<PersonnelSelect
|
||||||
params={{ departmentId: approvalDeptId }}
|
params={{ departmentId: approvalDeptId }}
|
||||||
|
|
@ -348,7 +339,8 @@ const StepOneComponent = (props) => {
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
{ name: "approvalUserNames", label: "集团公司人员审核名称", onlyForLabel: true },
|
{ name: "approvalUserNames", label: "集团公司人员审核名称", onlyForLabel: true },
|
||||||
{ name: "projectFiles", label: "安全管理协议", span: 24, render: (
|
{
|
||||||
|
name: "projectFiles", label: "安全管理协议", span: 24, render: (
|
||||||
<Upload
|
<Upload
|
||||||
fileType="image"
|
fileType="image"
|
||||||
maxCount={5}
|
maxCount={5}
|
||||||
|
|
@ -358,7 +350,8 @@ const StepOneComponent = (props) => {
|
||||||
form.setFieldValue("deleteProjectFileAddCmdList", [...(form.getFieldValue("deleteProjectFileAddCmdList") || []), file]);
|
form.setFieldValue("deleteProjectFileAddCmdList", [...(form.getFieldValue("deleteProjectFileAddCmdList") || []), file]);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
) },
|
)
|
||||||
|
},
|
||||||
{ name: "deleteProjectFileAddCmdList", label: "删除的安全管理协议", onlyForLabel: true },
|
{ name: "deleteProjectFileAddCmdList", label: "删除的安全管理协议", onlyForLabel: true },
|
||||||
{ name: "agreementFileUuid", label: "安全协议uuid", onlyForLabel: true },
|
{ name: "agreementFileUuid", label: "安全协议uuid", onlyForLabel: true },
|
||||||
{ name: "stakeholderLevel", onlyForLabel: true },
|
{ name: "stakeholderLevel", onlyForLabel: true },
|
||||||
|
|
|
||||||
|
|
@ -69,10 +69,10 @@ function List(props) {
|
||||||
)}
|
)}
|
||||||
columns={[
|
columns={[
|
||||||
{ title: "集团单位名称", dataIndex: "corpinfoName" },
|
{ title: "集团单位名称", dataIndex: "corpinfoName" },
|
||||||
|
{ title: "集团单位审核部门", dataIndex: "groupCompanyDeptName" },
|
||||||
{ title: "一级项目名称", dataIndex: "parentProjectName" },
|
{ title: "一级项目名称", dataIndex: "parentProjectName" },
|
||||||
{ title: "二级项目名称", dataIndex: "projectName" },
|
{ title: "二级项目名称", dataIndex: "projectName" },
|
||||||
{ title: "项目属地单位", dataIndex: "companyName" },
|
{ title: "项目属地单位", dataIndex: "companyName" },
|
||||||
{ title: "上级审核主管部门", dataIndex: "manageDeptName" },
|
|
||||||
{ title: "项目类别", dataIndex: "qualificationsTypeName" },
|
{ title: "项目类别", dataIndex: "qualificationsTypeName" },
|
||||||
{
|
{
|
||||||
title: "项目备案审核状态",
|
title: "项目备案审核状态",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue