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 && (
- + - -
- -
)}