parent
3293769b9d
commit
2823fc5ecc
|
|
@ -280,10 +280,20 @@ function Add(props) {
|
||||||
return (
|
return (
|
||||||
<Page
|
<Page
|
||||||
loading={loading || uploadFileLoading || deleteFileLoading || getFileLoading}
|
loading={loading || uploadFileLoading || deleteFileLoading || getFileLoading}
|
||||||
isShowFooter={false}
|
|
||||||
headerTitle={pageTitle}
|
headerTitle={pageTitle}
|
||||||
|
customActionButtons={(
|
||||||
|
<Space size={16}>
|
||||||
|
<Button onClick={() => props.history.goBack()}>
|
||||||
|
取消
|
||||||
|
</Button>
|
||||||
|
<Button type="primary" htmlType="submit" form="control-room-form" loading={submitting}>
|
||||||
|
提交
|
||||||
|
</Button>
|
||||||
|
</Space>
|
||||||
|
)}
|
||||||
>
|
>
|
||||||
<Form
|
<Form
|
||||||
|
id="control-room-form"
|
||||||
form={form}
|
form={form}
|
||||||
labelCol={{ span: 6 }}
|
labelCol={{ span: 6 }}
|
||||||
wrapperCol={{ span: 18 }}
|
wrapperCol={{ span: 18 }}
|
||||||
|
|
@ -503,7 +513,7 @@ function Add(props) {
|
||||||
/>
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</div>
|
</div>
|
||||||
{devices.length > 1 && (
|
{index !== 0 && (
|
||||||
<Button type="primary" danger onClick={() => removeDevice(device.key)}>
|
<Button type="primary" danger onClick={() => removeDevice(device.key)}>
|
||||||
删除
|
删除
|
||||||
</Button>
|
</Button>
|
||||||
|
|
@ -583,7 +593,7 @@ function Add(props) {
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<div style={{ textAlign: 'right', paddingTop: 30 }}>
|
<div style={{ textAlign: 'right', paddingTop: 30 }}>
|
||||||
{persons.length > 1 && (
|
{index !== 0 && (
|
||||||
<Button type="primary" danger onClick={() => removePerson(person.key)}>
|
<Button type="primary" danger onClick={() => removePerson(person.key)}>
|
||||||
删除
|
删除
|
||||||
</Button>
|
</Button>
|
||||||
|
|
@ -595,16 +605,6 @@ function Add(props) {
|
||||||
))}
|
))}
|
||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
<Form.Item wrapperCol={{ span: 24 }} style={{ textAlign: "center", marginTop: 24 }}>
|
|
||||||
<Space size={16}>
|
|
||||||
<Button onClick={() => props.history.goBack()}>
|
|
||||||
取消
|
|
||||||
</Button>
|
|
||||||
<Button type="primary" htmlType="submit" loading={submitting}>
|
|
||||||
提交
|
|
||||||
</Button>
|
|
||||||
</Space>
|
|
||||||
</Form.Item>
|
|
||||||
</Form>
|
</Form>
|
||||||
|
|
||||||
<MapSelector
|
<MapSelector
|
||||||
|
|
|
||||||
|
|
@ -121,8 +121,7 @@ function List(props) {
|
||||||
|
|
||||||
const onDelete = (id) => {
|
const onDelete = (id) => {
|
||||||
Modal.confirm({
|
Modal.confirm({
|
||||||
title: "确认删除",
|
title: "确认要删除吗?",
|
||||||
content: "删除后不可恢复,确认继续?",
|
|
||||||
okText: "确认",
|
okText: "确认",
|
||||||
cancelText: "取消",
|
cancelText: "取消",
|
||||||
okButtonProps: { danger: true, loading: deleting },
|
okButtonProps: { danger: true, loading: deleting },
|
||||||
|
|
|
||||||
|
|
@ -163,8 +163,12 @@ function View(props) {
|
||||||
return (
|
return (
|
||||||
<Page
|
<Page
|
||||||
loading={loading || dictLoading || getFileLoading}
|
loading={loading || dictLoading || getFileLoading}
|
||||||
isShowFooter={false}
|
|
||||||
headerTitle={pageTitle}
|
headerTitle={pageTitle}
|
||||||
|
customActionButtons={(
|
||||||
|
<Button onClick={() => props.history.goBack()}>
|
||||||
|
返回
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
>
|
>
|
||||||
{detail && (
|
{detail && (
|
||||||
<div>
|
<div>
|
||||||
|
|
@ -238,11 +242,6 @@ function View(props) {
|
||||||
/>
|
/>
|
||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
<div style={{ textAlign: "center", marginTop: 24 }}>
|
|
||||||
<Button onClick={() => props.history.goBack()}>
|
|
||||||
返回
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</Page>
|
</Page>
|
||||||
|
|
|
||||||
|
|
@ -214,10 +214,20 @@ function Add(props) {
|
||||||
return (
|
return (
|
||||||
<Page
|
<Page
|
||||||
loading={loading || uploadFileLoading || deleteFileLoading || getFileLoading}
|
loading={loading || uploadFileLoading || deleteFileLoading || getFileLoading}
|
||||||
isShowFooter={false}
|
|
||||||
headerTitle={pageTitle}
|
headerTitle={pageTitle}
|
||||||
|
customActionButtons={(
|
||||||
|
<Space size={16}>
|
||||||
|
<Button onClick={() => props.history.goBack()}>
|
||||||
|
取消
|
||||||
|
</Button>
|
||||||
|
<Button type="primary" htmlType="submit" form="pump-room-form" loading={submitting}>
|
||||||
|
提交
|
||||||
|
</Button>
|
||||||
|
</Space>
|
||||||
|
)}
|
||||||
>
|
>
|
||||||
<Form
|
<Form
|
||||||
|
id="pump-room-form"
|
||||||
form={form}
|
form={form}
|
||||||
labelCol={{ span: 6 }}
|
labelCol={{ span: 6 }}
|
||||||
wrapperCol={{ span: 18 }}
|
wrapperCol={{ span: 18 }}
|
||||||
|
|
@ -468,7 +478,7 @@ function Add(props) {
|
||||||
/>
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</div>
|
</div>
|
||||||
{devices.length > 1 && (
|
{index !== 0 && (
|
||||||
<Button
|
<Button
|
||||||
type="primary"
|
type="primary"
|
||||||
danger
|
danger
|
||||||
|
|
@ -485,16 +495,6 @@ function Add(props) {
|
||||||
))}
|
))}
|
||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
<Form.Item wrapperCol={{ span: 24 }} style={{ textAlign: "center", marginTop: 24 }}>
|
|
||||||
<Space size={16}>
|
|
||||||
<Button onClick={() => props.history.goBack()}>
|
|
||||||
取消
|
|
||||||
</Button>
|
|
||||||
<Button type="primary" htmlType="submit" loading={submitting}>
|
|
||||||
提交
|
|
||||||
</Button>
|
|
||||||
</Space>
|
|
||||||
</Form.Item>
|
|
||||||
</Form>
|
</Form>
|
||||||
|
|
||||||
<MapSelector
|
<MapSelector
|
||||||
|
|
|
||||||
|
|
@ -114,8 +114,7 @@ function List(props) {
|
||||||
|
|
||||||
const onDelete = (id) => {
|
const onDelete = (id) => {
|
||||||
Modal.confirm({
|
Modal.confirm({
|
||||||
title: "确认删除",
|
title: "确认要删除吗?",
|
||||||
content: "删除后不可恢复,确认继续?",
|
|
||||||
okText: "确认",
|
okText: "确认",
|
||||||
cancelText: "取消",
|
cancelText: "取消",
|
||||||
okButtonProps: { danger: true, loading: deleting },
|
okButtonProps: { danger: true, loading: deleting },
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ import { Permission } from "@cqsjjb/jjb-common-decorator/permission";
|
||||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||||
import { Button, Card, Descriptions, message, Table } from "antd";
|
import { Button, Card, Descriptions, message, Table } from "antd";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
|
import PreviewImg from "zy-react-library/components/PreviewImg";
|
||||||
import Page from "zy-react-library/components/Page";
|
import Page from "zy-react-library/components/Page";
|
||||||
import { UPLOAD_FILE_TYPE_ENUM } from "zy-react-library/enum/uploadFile/gwj";
|
import { UPLOAD_FILE_TYPE_ENUM } from "zy-react-library/enum/uploadFile/gwj";
|
||||||
import useDictionary from "zy-react-library/hooks/useDictionary";
|
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 useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||||
import { getFileUrl } from "zy-react-library/utils";
|
import { getFileUrl } from "zy-react-library/utils";
|
||||||
import { NS_PUMP_ROOM } from "~/enumerate/namespace";
|
import { NS_PUMP_ROOM } from "~/enumerate/namespace";
|
||||||
import PreviewImg from "zy-react-library/components/PreviewImg";
|
|
||||||
|
|
||||||
function View(props) {
|
function View(props) {
|
||||||
const query = useGetUrlQuery();
|
const query = useGetUrlQuery();
|
||||||
|
|
@ -54,12 +54,13 @@ function View(props) {
|
||||||
fetchDict();
|
fetchDict();
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
// 获取状态显示文本
|
|
||||||
const getStatusLabel = () => {
|
const getStatusLabel = () => {
|
||||||
if (!detail)
|
if (!detail) {
|
||||||
return "-";
|
return "-";
|
||||||
if (detail.roomStatusName)
|
}
|
||||||
|
if (detail.roomStatusName) {
|
||||||
return detail.roomStatusName;
|
return detail.roomStatusName;
|
||||||
|
}
|
||||||
const match = statusDict.find(item => item.dictValue === detail.pumpRoomStatus);
|
const match = statusDict.find(item => item.dictValue === detail.pumpRoomStatus);
|
||||||
return match?.dictLabel || detail.pumpRoomStatus || "-";
|
return match?.dictLabel || detail.pumpRoomStatus || "-";
|
||||||
};
|
};
|
||||||
|
|
@ -68,8 +69,6 @@ function View(props) {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
try {
|
try {
|
||||||
const { data } = await props["pumpRoomDetail"]({ id: query.id });
|
const { data } = await props["pumpRoomDetail"]({ id: query.id });
|
||||||
|
|
||||||
// 获取图片文件
|
|
||||||
const roomKey = data.roomId || data.pumpRoomId || data.id;
|
const roomKey = data.roomId || data.pumpRoomId || data.id;
|
||||||
if (roomKey) {
|
if (roomKey) {
|
||||||
const files = await getFile({
|
const files = await getFile({
|
||||||
|
|
@ -78,7 +77,6 @@ function View(props) {
|
||||||
});
|
});
|
||||||
data.roomImages = normalizeFiles(files);
|
data.roomImages = normalizeFiles(files);
|
||||||
}
|
}
|
||||||
|
|
||||||
setDetail(data);
|
setDetail(data);
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
|
|
@ -93,7 +91,6 @@ function View(props) {
|
||||||
query.id && getData();
|
query.id && getData();
|
||||||
}, [query.id]);
|
}, [query.id]);
|
||||||
|
|
||||||
// 设备表格列定义
|
|
||||||
const deviceColumns = [
|
const deviceColumns = [
|
||||||
{
|
{
|
||||||
title: "序号",
|
title: "序号",
|
||||||
|
|
@ -148,12 +145,16 @@ function View(props) {
|
||||||
return (
|
return (
|
||||||
<Page
|
<Page
|
||||||
loading={loading || getFileLoading}
|
loading={loading || getFileLoading}
|
||||||
isShowFooter={false}
|
|
||||||
headerTitle={pageTitle}
|
headerTitle={pageTitle}
|
||||||
|
customActionButtons={(
|
||||||
|
<Button onClick={() => props.history.goBack()}>
|
||||||
|
返回
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
>
|
>
|
||||||
{detail && (
|
{detail && (
|
||||||
<div>
|
<div>
|
||||||
<Card title="基本信息" bordered={false} style={{ boxShadow: 'none' }}>
|
<Card title="基本信息" bordered={false} style={{ boxShadow: "none" }}>
|
||||||
<Descriptions
|
<Descriptions
|
||||||
bordered
|
bordered
|
||||||
column={2}
|
column={2}
|
||||||
|
|
@ -191,10 +192,7 @@ function View(props) {
|
||||||
{
|
{
|
||||||
label: "消防泵房图片",
|
label: "消防泵房图片",
|
||||||
children: detail.roomImages && detail.roomImages.length > 0
|
children: detail.roomImages && detail.roomImages.length > 0
|
||||||
? (
|
? <PreviewImg files={detail.roomImages} />
|
||||||
|
|
||||||
<PreviewImg files={detail.roomImages} />
|
|
||||||
)
|
|
||||||
: "-",
|
: "-",
|
||||||
span: 2,
|
span: 2,
|
||||||
},
|
},
|
||||||
|
|
@ -202,7 +200,7 @@ function View(props) {
|
||||||
/>
|
/>
|
||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
<Card title="设备信息" style={{ marginTop: 24, boxShadow: 'none' }} bordered={false}>
|
<Card title="设备信息" style={{ marginTop: 24, boxShadow: "none" }} bordered={false}>
|
||||||
<Table
|
<Table
|
||||||
bordered
|
bordered
|
||||||
columns={deviceColumns}
|
columns={deviceColumns}
|
||||||
|
|
@ -212,12 +210,6 @@ function View(props) {
|
||||||
locale={{ emptyText: "暂无设备信息" }}
|
locale={{ emptyText: "暂无设备信息" }}
|
||||||
/>
|
/>
|
||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
<div style={{ textAlign: "center", marginTop: 24 }}>
|
|
||||||
<Button onClick={() => props.history.goBack()}>
|
|
||||||
返回
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</Page>
|
</Page>
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,17 @@ function Add(props) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleTeamNameChange = () => {
|
||||||
|
if (form.getFieldError("teamName").length > 0) {
|
||||||
|
form.setFields([
|
||||||
|
{
|
||||||
|
name: "teamName",
|
||||||
|
errors: [],
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
// 消防队员列表
|
// 消防队员列表
|
||||||
const createEmptyMember = () => ({
|
const createEmptyMember = () => ({
|
||||||
key: `${Date.now()}-${Math.random()}`,
|
key: `${Date.now()}-${Math.random()}`,
|
||||||
|
|
@ -199,10 +210,20 @@ function Add(props) {
|
||||||
return (
|
return (
|
||||||
<Page
|
<Page
|
||||||
loading={loading}
|
loading={loading}
|
||||||
isShowFooter={false}
|
|
||||||
headerTitle={pageTitle}
|
headerTitle={pageTitle}
|
||||||
|
customActionButtons={(
|
||||||
|
<Space size={16}>
|
||||||
|
<Button onClick={() => props.history.goBack()}>
|
||||||
|
取消
|
||||||
|
</Button>
|
||||||
|
<Button type="primary" htmlType="submit" form="rescue-team-form" loading={submitting}>
|
||||||
|
提交
|
||||||
|
</Button>
|
||||||
|
</Space>
|
||||||
|
)}
|
||||||
>
|
>
|
||||||
<Form
|
<Form
|
||||||
|
id="rescue-team-form"
|
||||||
form={form}
|
form={form}
|
||||||
labelCol={{ span: 6 }}
|
labelCol={{ span: 6 }}
|
||||||
wrapperCol={{ span: 18 }}
|
wrapperCol={{ span: 18 }}
|
||||||
|
|
@ -230,6 +251,7 @@ function Add(props) {
|
||||||
>
|
>
|
||||||
<Input
|
<Input
|
||||||
placeholder="请输入救援队名称"
|
placeholder="请输入救援队名称"
|
||||||
|
onChange={handleTeamNameChange}
|
||||||
onBlur={e => {
|
onBlur={e => {
|
||||||
form.setFieldValue("teamName", e.target.value?.trim());
|
form.setFieldValue("teamName", e.target.value?.trim());
|
||||||
}}
|
}}
|
||||||
|
|
@ -436,16 +458,6 @@ function Add(props) {
|
||||||
))}
|
))}
|
||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
<Form.Item wrapperCol={{ span: 24 }} style={{ textAlign: "center", marginTop: 24 }}>
|
|
||||||
<Space size={16}>
|
|
||||||
<Button onClick={() => props.history.goBack()}>
|
|
||||||
取消
|
|
||||||
</Button>
|
|
||||||
<Button type="primary" htmlType="submit" loading={submitting}>
|
|
||||||
提交
|
|
||||||
</Button>
|
|
||||||
</Space>
|
|
||||||
</Form.Item>
|
|
||||||
</Form>
|
</Form>
|
||||||
</Page>
|
</Page>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -95,8 +95,7 @@ function List(props) {
|
||||||
|
|
||||||
const onDelete = (id) => {
|
const onDelete = (id) => {
|
||||||
Modal.confirm({
|
Modal.confirm({
|
||||||
title: "确认删除",
|
title: "确认要删除吗?",
|
||||||
content: "删除后不可恢复,确认继续?",
|
|
||||||
okText: "确认",
|
okText: "确认",
|
||||||
cancelText: "取消",
|
cancelText: "取消",
|
||||||
okButtonProps: { danger: true, loading: deleting },
|
okButtonProps: { danger: true, loading: deleting },
|
||||||
|
|
|
||||||
|
|
@ -30,11 +30,10 @@ function View(props) {
|
||||||
query.id && getData();
|
query.id && getData();
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
// 队员表格列定义
|
|
||||||
const memberColumns = [
|
const memberColumns = [
|
||||||
{
|
{
|
||||||
title: "序号",
|
title: "序号",
|
||||||
width: 10,
|
width: 80,
|
||||||
align: "center",
|
align: "center",
|
||||||
render: (_, __, index) => index + 1,
|
render: (_, __, index) => index + 1,
|
||||||
},
|
},
|
||||||
|
|
@ -57,12 +56,16 @@ function View(props) {
|
||||||
return (
|
return (
|
||||||
<Page
|
<Page
|
||||||
loading={loading}
|
loading={loading}
|
||||||
isShowFooter={false}
|
|
||||||
headerTitle={pageTitle}
|
headerTitle={pageTitle}
|
||||||
|
customActionButtons={(
|
||||||
|
<Button onClick={() => props.history.goBack()}>
|
||||||
|
返回
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
>
|
>
|
||||||
{detail && (
|
{detail && (
|
||||||
<div>
|
<div>
|
||||||
<Card title="基本信息" bordered={false}>
|
<Card title="基本信息" bordered={false} style={{ boxShadow: "none" }}>
|
||||||
<Descriptions
|
<Descriptions
|
||||||
bordered
|
bordered
|
||||||
column={2}
|
column={2}
|
||||||
|
|
@ -114,7 +117,7 @@ function View(props) {
|
||||||
/>
|
/>
|
||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
<Card title="队员信息" style={{ marginTop: 24 }} bordered={false}>
|
<Card title="队员信息" style={{ marginTop: 24, boxShadow: "none" }} bordered={false}>
|
||||||
<Table
|
<Table
|
||||||
bordered
|
bordered
|
||||||
columns={memberColumns}
|
columns={memberColumns}
|
||||||
|
|
@ -124,12 +127,6 @@ function View(props) {
|
||||||
locale={{ emptyText: "暂无队员信息" }}
|
locale={{ emptyText: "暂无队员信息" }}
|
||||||
/>
|
/>
|
||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
<div style={{ textAlign: "center", marginTop: 24 }}>
|
|
||||||
<Button onClick={() => props.history.goBack()}>
|
|
||||||
返回
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</Page>
|
</Page>
|
||||||
|
|
|
||||||
|
|
@ -69,10 +69,20 @@ function Add(props) {
|
||||||
return (
|
return (
|
||||||
<Page
|
<Page
|
||||||
loading={loading}
|
loading={loading}
|
||||||
isShowFooter={false}
|
|
||||||
headerTitle={pageTitle}
|
headerTitle={pageTitle}
|
||||||
|
customActionButtons={(
|
||||||
|
<Space size={16}>
|
||||||
|
<Button onClick={() => props.history.goBack()}>
|
||||||
|
取消
|
||||||
|
</Button>
|
||||||
|
<Button type="primary" htmlType="submit" form="water-source-form" loading={submitting}>
|
||||||
|
提交
|
||||||
|
</Button>
|
||||||
|
</Space>
|
||||||
|
)}
|
||||||
>
|
>
|
||||||
<Form
|
<Form
|
||||||
|
id="water-source-form"
|
||||||
form={form}
|
form={form}
|
||||||
labelCol={{ span: 6 }}
|
labelCol={{ span: 6 }}
|
||||||
wrapperCol={{ span: 18 }}
|
wrapperCol={{ span: 18 }}
|
||||||
|
|
@ -272,16 +282,6 @@ function Add(props) {
|
||||||
</Row>
|
</Row>
|
||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
<Form.Item wrapperCol={{ span: 24 }} style={{ textAlign: "center", marginTop: 24 }}>
|
|
||||||
<Space size={16}>
|
|
||||||
<Button onClick={() => props.history.goBack()}>
|
|
||||||
取消
|
|
||||||
</Button>
|
|
||||||
<Button type="primary" htmlType="submit" loading={submitting}>
|
|
||||||
提交
|
|
||||||
</Button>
|
|
||||||
</Space>
|
|
||||||
</Form.Item>
|
|
||||||
</Form>
|
</Form>
|
||||||
|
|
||||||
<MapSelector
|
<MapSelector
|
||||||
|
|
|
||||||
|
|
@ -129,8 +129,7 @@ function List(props) {
|
||||||
|
|
||||||
const onDelete = (id) => {
|
const onDelete = (id) => {
|
||||||
Modal.confirm({
|
Modal.confirm({
|
||||||
title: "确认删除",
|
title: "确认要删除吗?",
|
||||||
content: "删除后不可恢复,确认继续?",
|
|
||||||
okText: "确认",
|
okText: "确认",
|
||||||
cancelText: "取消",
|
cancelText: "取消",
|
||||||
okButtonProps: { danger: true, loading: deleting },
|
okButtonProps: { danger: true, loading: deleting },
|
||||||
|
|
|
||||||
|
|
@ -48,8 +48,9 @@ function View(props) {
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const getStatusLabel = (status) => {
|
const getStatusLabel = (status) => {
|
||||||
if (!status)
|
if (!status) {
|
||||||
return "-";
|
return "-";
|
||||||
|
}
|
||||||
const match = statusDict.find(item => item.dictValue === status);
|
const match = statusDict.find(item => item.dictValue === status);
|
||||||
return match?.dictLabel || status;
|
return match?.dictLabel || status;
|
||||||
};
|
};
|
||||||
|
|
@ -57,12 +58,16 @@ function View(props) {
|
||||||
return (
|
return (
|
||||||
<Page
|
<Page
|
||||||
loading={loading}
|
loading={loading}
|
||||||
isShowFooter={false}
|
|
||||||
headerTitle={pageTitle}
|
headerTitle={pageTitle}
|
||||||
|
customActionButtons={(
|
||||||
|
<Button onClick={() => props.history.goBack()}>
|
||||||
|
返回
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
>
|
>
|
||||||
{detail && (
|
{detail && (
|
||||||
<div>
|
<div>
|
||||||
<Card title="基本信息" bordered={false} style={{ boxShadow: 'none' }}>
|
<Card title="基本信息" bordered={false} style={{ boxShadow: "none" }}>
|
||||||
<Descriptions
|
<Descriptions
|
||||||
bordered
|
bordered
|
||||||
column={2}
|
column={2}
|
||||||
|
|
@ -128,12 +133,6 @@ function View(props) {
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
<div style={{ textAlign: "center", marginTop: 24 }}>
|
|
||||||
<Button onClick={() => props.history.goBack()}>
|
|
||||||
返回
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</Page>
|
</Page>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue