From 83c548d3dba59aaed9b52b5d413c6912a87d2efc Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期日, 16 六月 2024 15:50:14 +0800
Subject: [PATCH] #
---
zy-asrs-flow/src/pages/map/drawer/index.jsx | 52 ++++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 48 insertions(+), 4 deletions(-)
diff --git a/zy-asrs-flow/src/pages/map/drawer/index.jsx b/zy-asrs-flow/src/pages/map/drawer/index.jsx
index 1394379..0662017 100644
--- a/zy-asrs-flow/src/pages/map/drawer/index.jsx
+++ b/zy-asrs-flow/src/pages/map/drawer/index.jsx
@@ -1,9 +1,11 @@
import React, { useState, useRef, useEffect } from 'react';
-import { Drawer } from 'antd';
+import { Drawer, Space, 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 ShelfDrawer from './shelf';
+import AgvDrawer from './agv';
+import PointDrawer from './point'
const useStyles = createStyles(({ token, css }) => {
@@ -12,12 +14,54 @@
const MapDrawer = (props) => {
const intl = useIntl();
const { styles } = useStyles();
+ const { curSprite } = props;
+
+ const handleCancel = () => {
+ props.onCancel();
+ };
return (
<>
<Drawer
-
- />
+ open={props.open}
+ onClose={handleCancel}
+ getContainer={props.refCurr}
+ rootStyle={{ position: "absolute" }}
+ mask={false}
+ width={600}
+ style={{
+ opacity: .8
+ }}
+ extra={
+ <Space>
+ <Button onClick={handleCancel}>
+ <FormattedMessage id='common.cancel' defaultMessage='鍙栨秷' />
+ </Button>
+ </Space>
+ }
+ >
+ {props.curSprite?.data?.type === Utils.SENSOR_TYPE.SHELF && (
+ <>
+ <ShelfDrawer
+ curSprite={curSprite}
+ />
+ </>
+ )}
+ {props.curSprite?.data?.type === Utils.SENSOR_TYPE.POINT && (
+ <>
+ <PointDrawer
+ curSprite={curSprite}
+ />
+ </>
+ )}
+ {props.curSprite?.data?.type === Utils.SENSOR_TYPE.AGV && (
+ <>
+ <AgvDrawer
+ curSprite={curSprite}
+ />
+ </>
+ )}
+ </Drawer>
</>
)
}
--
Gitblit v1.9.1