From 83d10b3c56e12353d877380f7d5f8130ae723124 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期五, 12 四月 2024 17:20:16 +0800
Subject: [PATCH] #
---
zy-asrs-flow/src/pages/map/drawer/index.jsx | 1
zy-asrs-flow/src/pages/map/drawer/shuttle/index.jsx | 1
zy-asrs-flow/src/locales/en-US/map.ts | 1
zy-asrs-flow/src/pages/map/drawer/shuttle/handle.jsx | 53 ++++++++++++++++++++++++++
zy-asrs-flow/src/pages/map/drawer/shuttle/view.jsx | 22 +++++++++-
5 files changed, 75 insertions(+), 3 deletions(-)
diff --git a/zy-asrs-flow/src/locales/en-US/map.ts b/zy-asrs-flow/src/locales/en-US/map.ts
index 9e723d3..0fd387d 100644
--- a/zy-asrs-flow/src/locales/en-US/map.ts
+++ b/zy-asrs-flow/src/locales/en-US/map.ts
@@ -29,6 +29,7 @@
'map.enable': 'Enable',
'map.diable': 'Disable',
'map.handle': 'Handle',
+ 'map.command': 'Command',
'map.loc.sts': 'Location Status',
'map.loc.operation': 'Location Operation',
'map.loc.lock': 'Lock',
diff --git a/zy-asrs-flow/src/pages/map/drawer/index.jsx b/zy-asrs-flow/src/pages/map/drawer/index.jsx
index 654054f..ba06a3b 100644
--- a/zy-asrs-flow/src/pages/map/drawer/index.jsx
+++ b/zy-asrs-flow/src/pages/map/drawer/index.jsx
@@ -89,6 +89,7 @@
curFloor={curFloor}
setDrawerTitle={setDrawerTitle}
setDrawerWidth={setDrawerWidth}
+ refCurr={props.refCurr}
/>
</>
)}
diff --git a/zy-asrs-flow/src/pages/map/drawer/shuttle/handle.jsx b/zy-asrs-flow/src/pages/map/drawer/shuttle/handle.jsx
new file mode 100644
index 0000000..2e94e36
--- /dev/null
+++ b/zy-asrs-flow/src/pages/map/drawer/shuttle/handle.jsx
@@ -0,0 +1,53 @@
+import React, { useState, useRef, useEffect } from 'react';
+import { Col, Form, Input, Row, Switch, Slider, message, Drawer, Space, Button, InputNumber, Segmented } from 'antd';
+import { FormattedMessage, useIntl, useModel } from '@umijs/max';
+import { createStyles } from 'antd-style';
+import Http from '@/utils/http';
+
+const useStyles = createStyles(({ token, css }) => {
+
+})
+
+const ShuttleHandle = (props) => {
+ const intl = useIntl();
+ const { styles } = useStyles();
+
+ useEffect(() => {
+
+ }, []);
+
+ const handleCancel = () => {
+ props.onClose();
+ }
+
+
+ return (
+ <>
+ <Drawer
+ title={intl.formatMessage({ id: 'map.command', defaultMessage: '鍛戒护' })}
+ width={350}
+ closable={false}
+ open={props.open}
+ getContainer={props.refCurr}
+ rootStyle={{ position: "absolute" }}
+ onClose={handleCancel}
+ extra={
+ <Space>
+ <Button onClick={handleCancel}>
+ <FormattedMessage id='common.cancel' defaultMessage='鍙栨秷' />
+ </Button>
+ {/* <Button onClick={handleOk} type="primary">
+ <FormattedMessage id='common.submit' defaultMessage='纭畾' />
+ </Button> */}
+ </Space>
+ }
+ >
+ <h1>asds</h1>
+
+ </Drawer>
+ </>
+ )
+
+}
+
+export default ShuttleHandle;
\ No newline at end of file
diff --git a/zy-asrs-flow/src/pages/map/drawer/shuttle/index.jsx b/zy-asrs-flow/src/pages/map/drawer/shuttle/index.jsx
index 189ce7d..f7344e2 100644
--- a/zy-asrs-flow/src/pages/map/drawer/shuttle/index.jsx
+++ b/zy-asrs-flow/src/pages/map/drawer/shuttle/index.jsx
@@ -31,6 +31,7 @@
curNo={curNo}
data={curSprite.data}
curFloor={curFloor}
+ refCurr={props.refCurr}
/>
),
json: (
diff --git a/zy-asrs-flow/src/pages/map/drawer/shuttle/view.jsx b/zy-asrs-flow/src/pages/map/drawer/shuttle/view.jsx
index 8aea51c..97dc72e 100644
--- a/zy-asrs-flow/src/pages/map/drawer/shuttle/view.jsx
+++ b/zy-asrs-flow/src/pages/map/drawer/shuttle/view.jsx
@@ -5,6 +5,7 @@
import * as Utils from '../../utils'
import Http from '@/utils/http';
import BoolValueIcon from '@/components/BoolValueIcon';
+import ShuttleHandle from './handle';
const useStyles = createStyles(({ token, css }) => {
return {
@@ -29,7 +30,7 @@
})
const updateEnable = async (deviceNo, enable) => {
- const resp = await Http.doPost('api/dict/update', {val});
+ const resp = await Http.doPost('api/dict/update', { val });
if (resp.code === 200) {
message.success(intl.formatMessage({ id: 'page.update.success', defaultMessage: '鏇存柊鎴愬姛' }));
return true;
@@ -45,6 +46,7 @@
const { data } = props;
const [loading, setLoading] = React.useState(false);
+ const [childrenDrawer, setChildrenDrawer] = useState(false);
const [info, setInfo] = React.useState(null);
useEffect(() => {
@@ -110,7 +112,7 @@
label: intl.formatMessage({ id: 'map.dest.loc', defaultMessage: '鐩爣搴撲綅' }),
children: info?.destLocNo,
},
-
+
{
label: intl.formatMessage({ id: 'map.shuttle.batter.power', defaultMessage: '鐢垫睜鐢甸噺' }),
children: info?.batteryPower,
@@ -158,7 +160,13 @@
<Button className={styles.tableButton} size='default' disabled>
<FormattedMessage id='map.enable' defaultMessage='鍚敤' />
</Button>
- <Button className={styles.tableButton} size='default'>
+ <Button
+ className={styles.tableButton}
+ size='default'
+ onClick={() => {
+ setChildrenDrawer(true);
+ }}
+ >
<FormattedMessage id='map.handle' defaultMessage='鎵嬪姩鎿嶄綔' />
</Button>
</>
@@ -167,6 +175,14 @@
]
}
/>
+ <ShuttleHandle
+ open={childrenDrawer}
+ refCurr={props.refCurr}
+ shuttleNo={data.no}
+ onClose={() => {
+ setChildrenDrawer(false)
+ }}
+ />
</div>
)}
</div>
--
Gitblit v1.9.1