From c352df43ea5eea9a84e89867eb3b03ba3b2dbb83 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期一, 18 三月 2024 16:39:41 +0800
Subject: [PATCH] #
---
zy-asrs-flow/src/pages/map/drawer/agv/index.jsx | 44 +++++++++++++++++++++++++++++++++++++-------
zy-asrs-flow/src/pages/map/drawer/shelf/index.jsx | 2 --
2 files changed, 37 insertions(+), 9 deletions(-)
diff --git a/zy-asrs-flow/src/pages/map/drawer/agv/index.jsx b/zy-asrs-flow/src/pages/map/drawer/agv/index.jsx
index cb3a98d..6899ae9 100644
--- a/zy-asrs-flow/src/pages/map/drawer/agv/index.jsx
+++ b/zy-asrs-flow/src/pages/map/drawer/agv/index.jsx
@@ -1,9 +1,10 @@
import React, { useState, useRef, useEffect } from 'react';
-import { Drawer, Space, Button } from 'antd';
+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 }) => {
@@ -12,17 +13,46 @@
const AgvDrawer = (props) => {
const intl = useIntl();
const { styles } = useStyles();
+ const [activeTabKey, setActiveTabKey] = useState('json');
- const handleCancel = () => {
- props.onCancel();
+ const contentList = {
+ json: (
+ <ShowJson
+ curSprite={props.curSprite}
+ />
+ ),
};
-
- const handleOk = () => {
- }
return (
<>
- <h1>Agv</h1>
+ <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>
</>
)
}
diff --git a/zy-asrs-flow/src/pages/map/drawer/shelf/index.jsx b/zy-asrs-flow/src/pages/map/drawer/shelf/index.jsx
index 8ebabc7..faef89f 100644
--- a/zy-asrs-flow/src/pages/map/drawer/shelf/index.jsx
+++ b/zy-asrs-flow/src/pages/map/drawer/shelf/index.jsx
@@ -15,8 +15,6 @@
const { styles } = useStyles();
const [activeTabKey, setActiveTabKey] = useState('json');
- const { curSprite } = props;
-
const contentList = {
json: (
<ShowJson
--
Gitblit v1.9.1