From 1421b830cf462e7eeb47bbae4e5d467bd43465fd Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期二, 09 四月 2024 16:56:32 +0800
Subject: [PATCH] #
---
zy-asrs-flow/src/pages/map/drawer/index.jsx | 14 ++++++-
zy-asrs-flow/src/pages/map/drawer/lift/index.jsx | 60 ++++++++++++++++++++++++++++++
2 files changed, 72 insertions(+), 2 deletions(-)
diff --git a/zy-asrs-flow/src/pages/map/drawer/index.jsx b/zy-asrs-flow/src/pages/map/drawer/index.jsx
index 2bc812b..0c70c5b 100644
--- a/zy-asrs-flow/src/pages/map/drawer/index.jsx
+++ b/zy-asrs-flow/src/pages/map/drawer/index.jsx
@@ -8,6 +8,7 @@
import AgvDrawer from './agv';
import PointDrawer from './point'
import ShuttleDrawer from './shuttle'
+import LiftDrawer from './lift'
const useStyles = createStyles(({ token, css }) => {
@@ -21,7 +22,7 @@
const [drawerTitle, setDrawerTitle] = useState('');
useEffect(() => {
-
+ console.log(props.curSprite?.data);
}, [props.curSprite]);
const handleCancel = () => {
@@ -49,7 +50,7 @@
</Space>
}
>
- {props.curSprite?.data?.type === Utils.SENSOR_TYPE.SHELF && (
+ {(props.curSprite?.data?.type === Utils.SENSOR_TYPE.SHELF && props.curSprite?.data?.shelfType !== Utils.SHELF_TYPE.LIFT) && (
<>
<ShelfDrawer
curSprite={curSprite}
@@ -58,6 +59,15 @@
/>
</>
)}
+ {(props.curSprite?.data?.type === Utils.SENSOR_TYPE.SHELF && props.curSprite?.data?.shelfType === Utils.SHELF_TYPE.LIFT) && (
+ <>
+ <LiftDrawer
+ curSprite={curSprite}
+ curFloor={curFloor}
+ setDrawerTitle={setDrawerTitle}
+ />
+ </>
+ )}
{props.curSprite?.data?.type === Utils.SENSOR_TYPE.CONVEYOR && (
<>
<ConveyorDrawer
diff --git a/zy-asrs-flow/src/pages/map/drawer/lift/index.jsx b/zy-asrs-flow/src/pages/map/drawer/lift/index.jsx
new file mode 100644
index 0000000..53d39b0
--- /dev/null
+++ b/zy-asrs-flow/src/pages/map/drawer/lift/index.jsx
@@ -0,0 +1,60 @@
+import React, { useState, useRef, useEffect } from 'react';
+import { Card, Form, Button } from 'antd';
+import { FormattedMessage, useIntl, useModel } from '@umijs/max';
+import { createStyles } from 'antd-style';
+import * as Utils from '../../utils'
+import Http from '@/utils/http';
+import ShowJson from '../showJson';
+
+const useStyles = createStyles(({ token, css }) => {
+
+})
+
+const LiftDrawer = (props) => {
+ const intl = useIntl();
+ const { styles } = useStyles();
+ const [activeTabKey, setActiveTabKey] = useState('json');
+
+ const contentList = {
+ json: (
+ <ShowJson
+ data={props.curSprite.data}
+ />
+ ),
+ };
+
+ return (
+ <>
+ <Card
+ className='drawer-card'
+ hoverable
+ bordered={false}
+ type='inner'
+ tabList={[
+ {
+ key: 'json',
+ tab: intl.formatMessage({ id: 'map.drawer.json', defaultMessage: 'JSON' }),
+ },
+ ]}
+ activeTabKey={activeTabKey}
+ onTabChange={(key) => {
+ setActiveTabKey(key)
+ }}
+ tabProps={{
+ centered: true,
+ size: 'large',
+ type: "card",
+ style: {
+ }
+ }}
+ style={{
+ height: '100%'
+ }}
+ >
+ {contentList[activeTabKey]}
+ </Card>
+ </>
+ )
+}
+
+export default LiftDrawer;
\ No newline at end of file
--
Gitblit v1.9.1