fix(inspection): 修复检查模块中的数据传递和状态显示问题

- 修复隐患指派页面中获取确认用户列表的数据源错误
- 在多个页面路由跳转时添加被检查现场负责人ID参数传递
- 修正防御申辩流程中提交后的页面跳转逻辑位置
- 更新检查记录列表中的状态字段映射和显示文本
- 完善检查添加页面中被检查人员的公司信息清空和设置功能
- 优化检查记录列表页面的代码格式化和导出功能参数传递
master
fangjiakai 2026-01-28 09:03:53 +08:00
parent 29e237a477
commit a73fa6598e
6 changed files with 76 additions and 53 deletions

View File

@ -30,8 +30,8 @@ function Assign(props) {
<HiddenInfo
hiddenId={query.hiddenUUId}
id={query.hiddenId}
onGetData={(data) => {
getConfirmUserList(data.creatorId);
onGetData={() => {
getConfirmUserList(query.inspectedSiteManagerId);
}}
/>
<Divider orientation="left">隐患确认</Divider>

View File

@ -36,7 +36,7 @@ function HiddenList(props) {
<Button
type="link"
onClick={() => {
props.history.push(`./assign?inspectionId=${query.inspectionId}&id=${query.id}&hiddenUUId=${record.hiddenId}&hiddenId=${record.id}`);
props.history.push(`./assign?inspectionId=${query.inspectionId}&id=${query.id}&hiddenUUId=${record.hiddenId}&hiddenId=${record.id}&inspectedSiteManagerId=${query.inspectedSiteManagerId}`);
}}
>
指派

View File

@ -73,7 +73,7 @@ function List(props) {
<Button
type="link"
onClick={() => {
props.history.push(`./hiddenList?id=${record.id}&inspectionId=${record.inspectionId}`);
props.history.push(`./hiddenList?id=${record.id}&inspectionId=${record.inspectionId}&inspectedSiteManagerId=${record.inspectedSiteManagerId}`);
}}
>
指派

View File

@ -154,10 +154,6 @@ function DefenseHandlingModalComponent(props) {
}, []);
const onSubmit = async (values) => {
if (values.status === "1") {
props.history.push(`./edit?id=${props.id}&inspectionId=${props.inspectionId}`);
return;
}
let signature = "";
if (values.signature) {
const { filePath } = await uploadFile({
@ -168,6 +164,10 @@ function DefenseHandlingModalComponent(props) {
}
const { success } = await props["defenseSubmit"]({ ...values, signature, inspectionId: props.inspectionId });
if (success) {
if (values.status === "1") {
props.history.push(`./edit?id=${props.id}&inspectionId=${props.inspectionId}`);
return;
}
message.success("操作成功");
props.onCancel();
props.getData();
@ -303,9 +303,9 @@ function DefenseRecordModalComponent(props) {
dataIndex: "isPass",
render: (_, record) => (
<>
<div>{record.isPass === 0 && "未审批"}</div>
<div>{record.isPass === 1 && "通过"}</div>
<div>{record.isPass === 2 && "未通过"}</div>
<div>{record.status === 0 && "待审核"}</div>
<div>{record.status === 1 && "申辩成功"}</div>
<div>{record.status === 2 && "申辩驳回"}</div>
</>
),
},

View File

@ -375,6 +375,8 @@ function Add(props) {
onChange={() => {
form.setFieldValue(["personUnderInspection", "userId"], "");
form.setFieldValue(["personUnderInspection", "userName"], "");
form.setFieldValue(["personUnderInspection", "corpId"], "");
form.setFieldValue(["personUnderInspection", "corpName"], "");
}}
/>
),
@ -387,6 +389,10 @@ function Add(props) {
<PersonnelSelect
params={{departmentId: personUnderInspectionDepartmentId}}
onGetLabel={label => form.setFieldValue(["personUnderInspection", "userName"], label)}
onGetOption={(option) => {
form.setFieldValue(["personUnderInspection", "corpId"], option.corpId);
form.setFieldValue(["personUnderInspection", "corpName"], option.corpName);
}}
/>
),
formItemProps: {labelCol: {span: 6}},

View File

@ -99,7 +99,11 @@ function List(props) {
{name: "inspectionDeptId", label: "检查部门", render: <DepartmentSelectTree/>},
{name: "inspectionUserName", label: "检查人"},
{name: "type", label: "检查类型", render: <DictionarySelectTree dictValue="inspectionType" onlyLastLevel/>},
{ name: "inspectedDepartmentId", label: "被检查单位", render: <DepartmentSelectTree searchType={props.searchType} /> },
{
name: "inspectedDepartmentId",
label: "被检查单位",
render: <DepartmentSelectTree searchType={props.searchType}/>
},
{name: "inspectedUserName", label: "被检查单位现场负责人"},
{name: "status", label: "检查状态", render: FORM_ITEM_RENDER_ENUM.SELECT, items: INSPECTION_STATE_ENUM},
{name: "checkYear", label: "检查年度", render: FORM_ITEM_RENDER_ENUM.DATE_YEAR},
@ -153,7 +157,12 @@ function List(props) {
onClick={async () => {
const exportParams = getUrlCriteriaQuery("searchFormKeys", "searchFormValues");
await downloadBlob("/inspection/safetyEnvironmentalInspection/exportList", { params: { ...exportParams} });
await downloadBlob("/inspection/safetyEnvironmentalInspection/exportList", {
params: {
...exportParams,
menuPath: window.location.pathname
}
});
}}
>
导出
@ -169,13 +178,21 @@ function List(props) {
{title: "被检查单位", dataIndex: "inspectionSiteDepartmentName"},
{title: "被检查单位现场负责人", dataIndex: "inspectedSiteManagerName", width: 200},
{title: "检查类型", dataIndex: "typeName"},
{ title: "检查时间", width: 200, render: (_, record) => (record.timeStart ? `${formatDate(record.timeStart)}${formatDate(record.timeEnd)}` : "") },
{
title: "检查时间",
width: 200,
render: (_, record) => (record.timeStart ? `${formatDate(record.timeStart)}${formatDate(record.timeEnd)}` : "")
},
{
title: "检查状态",
dataIndex: "status",
render: (_, record) => (getLabelName({list: INSPECTION_STATE_ENUM, status: record.status})),
},
{ title: "计划属性", dataIndex: "planType", render: (_, record) => getLabelName({ list: PLAN_ENUM, status: record.planType }) },
{
title: "计划属性",
dataIndex: "planType",
render: (_, record) => getLabelName({list: PLAN_ENUM, status: record.planType})
},
{title: "发现隐患数", dataIndex: "hiddenNumber"},
{
title: "操作",