From 2823fc5ecc48e666d9bc9cc0ecef09dcd600647d Mon Sep 17 00:00:00 2001 From: shenzhidan Date: Wed, 4 Mar 2026 09:35:23 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E4=BF=AE=E6=94=B9=E5=9B=9B=E4=B8=AA?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=BC=96=E8=BE=91=E9=A1=B5=E9=9D=A2=E7=9A=84?= =?UTF-8?q?=E5=BA=95=E9=83=A8=E8=BF=94=E5=9B=9E=E3=80=81=E5=8F=96=E6=B6=88?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E4=B8=BA=E5=9B=BA=E5=AE=9A=E5=88=B0=E5=88=B0?= =?UTF-8?q?=E5=BA=95=E9=83=A8=202=E3=80=81=E4=BF=AE=E6=94=B9=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E6=8F=90=E7=A4=BA=E8=AF=AD=203=E3=80=81=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E6=B6=88=E9=98=B2=E6=95=91=E6=8F=B4=E9=98=9F=E5=90=8D?= =?UTF-8?q?=E7=A7=B0=E5=88=A4=E9=87=8D=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BranchCompany/ControlRoom/Add/index.js | 26 +++++++------- .../BranchCompany/ControlRoom/List/index.js | 3 +- .../BranchCompany/ControlRoom/View/index.js | 11 +++--- .../BranchCompany/PumpRoom/Add/index.js | 24 ++++++------- .../BranchCompany/PumpRoom/List/index.js | 3 +- .../BranchCompany/PumpRoom/View/index.js | 34 +++++++------------ .../BranchCompany/RescueTeam/Add/index.js | 34 +++++++++++++------ .../BranchCompany/RescueTeam/List/index.js | 3 +- .../BranchCompany/RescueTeam/View/index.js | 19 +++++------ .../BranchCompany/WaterSource/Add/index.js | 22 ++++++------ .../BranchCompany/WaterSource/List/index.js | 3 +- .../BranchCompany/WaterSource/View/index.js | 17 +++++----- 12 files changed, 97 insertions(+), 102 deletions(-) diff --git a/src/pages/Container/BranchCompany/ControlRoom/Add/index.js b/src/pages/Container/BranchCompany/ControlRoom/Add/index.js index 88e1562..63f6339 100644 --- a/src/pages/Container/BranchCompany/ControlRoom/Add/index.js +++ b/src/pages/Container/BranchCompany/ControlRoom/Add/index.js @@ -280,10 +280,20 @@ function Add(props) { return ( + + + + )} >
- {devices.length > 1 && ( + {index !== 0 && ( @@ -583,7 +593,7 @@ function Add(props) {
- {persons.length > 1 && ( + {index !== 0 && ( @@ -595,16 +605,6 @@ function Add(props) { ))} - - - - - - { Modal.confirm({ - title: "确认删除", - content: "删除后不可恢复,确认继续?", + title: "确认要删除吗?", okText: "确认", cancelText: "取消", okButtonProps: { danger: true, loading: deleting }, diff --git a/src/pages/Container/BranchCompany/ControlRoom/View/index.js b/src/pages/Container/BranchCompany/ControlRoom/View/index.js index 042423a..fe31adb 100644 --- a/src/pages/Container/BranchCompany/ControlRoom/View/index.js +++ b/src/pages/Container/BranchCompany/ControlRoom/View/index.js @@ -163,8 +163,12 @@ function View(props) { return ( props.history.goBack()}> + 返回 + + )} > {detail && (
@@ -238,11 +242,6 @@ function View(props) { /> -
- -
)}
diff --git a/src/pages/Container/BranchCompany/PumpRoom/Add/index.js b/src/pages/Container/BranchCompany/PumpRoom/Add/index.js index a074d3f..cf901b0 100644 --- a/src/pages/Container/BranchCompany/PumpRoom/Add/index.js +++ b/src/pages/Container/BranchCompany/PumpRoom/Add/index.js @@ -214,10 +214,20 @@ function Add(props) { return ( + + + + )} >
- {devices.length > 1 && ( + {index !== 0 && ( - - - { Modal.confirm({ - title: "确认删除", - content: "删除后不可恢复,确认继续?", + title: "确认要删除吗?", okText: "确认", cancelText: "取消", okButtonProps: { danger: true, loading: deleting }, diff --git a/src/pages/Container/BranchCompany/PumpRoom/View/index.js b/src/pages/Container/BranchCompany/PumpRoom/View/index.js index c60e2a5..8f18ddf 100644 --- a/src/pages/Container/BranchCompany/PumpRoom/View/index.js +++ b/src/pages/Container/BranchCompany/PumpRoom/View/index.js @@ -2,6 +2,7 @@ import { Permission } from "@cqsjjb/jjb-common-decorator/permission"; import { Connect } from "@cqsjjb/jjb-dva-runtime"; import { Button, Card, Descriptions, message, Table } from "antd"; import { useEffect, useState } from "react"; +import PreviewImg from "zy-react-library/components/PreviewImg"; import Page from "zy-react-library/components/Page"; import { UPLOAD_FILE_TYPE_ENUM } from "zy-react-library/enum/uploadFile/gwj"; import useDictionary from "zy-react-library/hooks/useDictionary"; @@ -9,7 +10,6 @@ import useGetFile from "zy-react-library/hooks/useGetFile"; import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery"; import { getFileUrl } from "zy-react-library/utils"; import { NS_PUMP_ROOM } from "~/enumerate/namespace"; -import PreviewImg from "zy-react-library/components/PreviewImg"; function View(props) { const query = useGetUrlQuery(); @@ -54,12 +54,13 @@ function View(props) { fetchDict(); }, []); - // 获取状态显示文本 const getStatusLabel = () => { - if (!detail) + if (!detail) { return "-"; - if (detail.roomStatusName) + } + if (detail.roomStatusName) { return detail.roomStatusName; + } const match = statusDict.find(item => item.dictValue === detail.pumpRoomStatus); return match?.dictLabel || detail.pumpRoomStatus || "-"; }; @@ -68,8 +69,6 @@ function View(props) { setLoading(true); try { const { data } = await props["pumpRoomDetail"]({ id: query.id }); - - // 获取图片文件 const roomKey = data.roomId || data.pumpRoomId || data.id; if (roomKey) { const files = await getFile({ @@ -78,7 +77,6 @@ function View(props) { }); data.roomImages = normalizeFiles(files); } - setDetail(data); } catch (error) { @@ -93,7 +91,6 @@ function View(props) { query.id && getData(); }, [query.id]); - // 设备表格列定义 const deviceColumns = [ { title: "序号", @@ -148,12 +145,16 @@ function View(props) { return ( props.history.goBack()}> + 返回 + + )} > {detail && (
- + 0 - ? ( - - - ) + ? : "-", span: 2, }, @@ -202,7 +200,7 @@ function View(props) { /> - + - -
- -
)} diff --git a/src/pages/Container/BranchCompany/RescueTeam/Add/index.js b/src/pages/Container/BranchCompany/RescueTeam/Add/index.js index 5eb1bde..c95917a 100644 --- a/src/pages/Container/BranchCompany/RescueTeam/Add/index.js +++ b/src/pages/Container/BranchCompany/RescueTeam/Add/index.js @@ -56,6 +56,17 @@ function Add(props) { } }; + const handleTeamNameChange = () => { + if (form.getFieldError("teamName").length > 0) { + form.setFields([ + { + name: "teamName", + errors: [], + }, + ]); + } + }; + // 消防队员列表 const createEmptyMember = () => ({ key: `${Date.now()}-${Math.random()}`, @@ -199,10 +210,20 @@ function Add(props) { return ( + + + + )} >
{ form.setFieldValue("teamName", e.target.value?.trim()); }} @@ -436,16 +458,6 @@ function Add(props) { ))} - - - - - -
); diff --git a/src/pages/Container/BranchCompany/RescueTeam/List/index.js b/src/pages/Container/BranchCompany/RescueTeam/List/index.js index ec7060c..841adfa 100644 --- a/src/pages/Container/BranchCompany/RescueTeam/List/index.js +++ b/src/pages/Container/BranchCompany/RescueTeam/List/index.js @@ -95,8 +95,7 @@ function List(props) { const onDelete = (id) => { Modal.confirm({ - title: "确认删除", - content: "删除后不可恢复,确认继续?", + title: "确认要删除吗?", okText: "确认", cancelText: "取消", okButtonProps: { danger: true, loading: deleting }, diff --git a/src/pages/Container/BranchCompany/RescueTeam/View/index.js b/src/pages/Container/BranchCompany/RescueTeam/View/index.js index f035d3c..d1913c6 100644 --- a/src/pages/Container/BranchCompany/RescueTeam/View/index.js +++ b/src/pages/Container/BranchCompany/RescueTeam/View/index.js @@ -30,11 +30,10 @@ function View(props) { query.id && getData(); }, []); - // 队员表格列定义 const memberColumns = [ { title: "序号", - width: 10, + width: 80, align: "center", render: (_, __, index) => index + 1, }, @@ -57,12 +56,16 @@ function View(props) { return ( props.history.goBack()}> + 返回 + + )} > {detail && (
- + - +
- -
- -
)} diff --git a/src/pages/Container/BranchCompany/WaterSource/Add/index.js b/src/pages/Container/BranchCompany/WaterSource/Add/index.js index 7badd48..5488e18 100644 --- a/src/pages/Container/BranchCompany/WaterSource/Add/index.js +++ b/src/pages/Container/BranchCompany/WaterSource/Add/index.js @@ -69,10 +69,20 @@ function Add(props) { return ( + + + + )} >
- - - - - - { Modal.confirm({ - title: "确认删除", - content: "删除后不可恢复,确认继续?", + title: "确认要删除吗?", okText: "确认", cancelText: "取消", okButtonProps: { danger: true, loading: deleting }, diff --git a/src/pages/Container/BranchCompany/WaterSource/View/index.js b/src/pages/Container/BranchCompany/WaterSource/View/index.js index 161bbfd..4c75c6b 100644 --- a/src/pages/Container/BranchCompany/WaterSource/View/index.js +++ b/src/pages/Container/BranchCompany/WaterSource/View/index.js @@ -48,8 +48,9 @@ function View(props) { }, []); const getStatusLabel = (status) => { - if (!status) + if (!status) { return "-"; + } const match = statusDict.find(item => item.dictValue === status); return match?.dictLabel || status; }; @@ -57,12 +58,16 @@ function View(props) { return ( props.history.goBack()}> + 返回 + + )} > {detail && (
- + - -
- -
)}