From b49756530d7b9c7e240a38138ebacfee43762663 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期一, 11 三月 2024 10:09:25 +0800
Subject: [PATCH] #
---
zy-asrs-flow/src/pages/map/components/settings.jsx | 17 ++++++++
zy-asrs-flow/src/config/setting.ts | 2
zy-asrs-flow/src/pages/map/components/subSettings.jsx | 69 ++++++++++++++++++++++++++++++++++
3 files changed, 86 insertions(+), 2 deletions(-)
diff --git a/zy-asrs-flow/src/config/setting.ts b/zy-asrs-flow/src/config/setting.ts
index d1e75bd..32a86f4 100644
--- a/zy-asrs-flow/src/config/setting.ts
+++ b/zy-asrs-flow/src/config/setting.ts
@@ -1,5 +1,5 @@
// 鎺ュ彛鍦板潃
-export const API_BASE_URL: string = 'http://192.168.4.113:9090/wcs';
+export const API_BASE_URL: string = 'http://127.0.0.1:9090/wcs';
// 椤圭洰鍚嶇О
export const PROJECT_NAME: string = 'admin';
diff --git a/zy-asrs-flow/src/pages/map/components/settings.jsx b/zy-asrs-flow/src/pages/map/components/settings.jsx
index 9969425..4209529 100644
--- a/zy-asrs-flow/src/pages/map/components/settings.jsx
+++ b/zy-asrs-flow/src/pages/map/components/settings.jsx
@@ -7,6 +7,7 @@
import * as PIXI from 'pixi.js';
import moment from 'moment';
import Http from '@/utils/http';
+import SubSpriteSettings from './subSettings';
const useStyles = createStyles(({ token, css }) => {
@@ -17,6 +18,8 @@
const { styles } = useStyles();
const { curSprite } = props;
const [form] = Form.useForm();
+
+ const [childrenDrawer, setChildrenDrawer] = useState(false);
useEffect(() => {
@@ -320,9 +323,21 @@
/>
</Form.Item>
<Form.Item>
- <Button>
+ <Button
+ onClick={() => {
+ console.log(form.getFieldValue('x'));
+ setChildrenDrawer(true);
+ }}
+ >
<FormattedMessage id='common.execute' defaultMessage='鎵ц' />
</Button>
+ <SubSpriteSettings
+ open={childrenDrawer}
+ onClose={() => {
+ setChildrenDrawer(false)
+ }}
+ refCurr={props.refCurr}
+ />
</Form.Item>
</Space.Compact>
</Form.Item>
diff --git a/zy-asrs-flow/src/pages/map/components/subSettings.jsx b/zy-asrs-flow/src/pages/map/components/subSettings.jsx
new file mode 100644
index 0000000..a970b5f
--- /dev/null
+++ b/zy-asrs-flow/src/pages/map/components/subSettings.jsx
@@ -0,0 +1,69 @@
+import React, { useState, useRef, useEffect } from 'react';
+import { Col, Form, Input, Row, Checkbox, Slider, Select, Drawer, Space, Button, InputNumber, Switch } from 'antd';
+import { FormattedMessage, useIntl, useModel } from '@umijs/max';
+import { createStyles } from 'antd-style';
+import './index.css';
+import * as Utils from '../utils'
+import * as PIXI from 'pixi.js';
+import Http from '@/utils/http';
+
+const useStyles = createStyles(({ token, css }) => {
+
+})
+
+const SubSpriteSettings = (props) => {
+ const intl = useIntl();
+ const { styles } = useStyles();
+ const [form] = Form.useForm();
+
+ const handleCancel = () => {
+ props.onClose();
+ }
+
+ const handleFinish = () => {
+
+ }
+
+ const formValuesChange = () => {
+
+ }
+
+ return (
+ <>
+ <Drawer
+ title="Two-level Drawer"
+ width={320}
+ closable={false}
+ open={props.open}
+ getContainer={props.refCurr}
+ rootStyle={{ position: "absolute" }}
+ onClose={handleCancel}
+ >
+ <Form
+ form={form}
+ onFieldsChange={formValuesChange}
+ initialValues={{
+ }}
+ onFinish={handleFinish}
+ autoComplete="off"
+ style={{
+ maxWidth: 300,
+ }}
+ size='default' // small | default | large
+ variant='filled' // outlined | borderless | filled
+ labelWrap // label 鎹㈣
+ disabled={false}
+ layout='horizontal'
+ >
+ <Row gutter={[24, 16]}>
+ <Col span={24}>
+
+ </Col>
+ </Row>
+ </Form>
+ </Drawer>
+ </>
+ )
+}
+
+export default SubSpriteSettings;
\ No newline at end of file
--
Gitblit v1.9.1