From da4fa58b1a0abc70b79f8d0370432c8e9ab1a7a9 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期五, 08 三月 2024 15:22:26 +0800
Subject: [PATCH] #
---
zy-asrs-flow/src/pages/map/components/settings.jsx | 153 ++++++++++++++++++++++++++++++++++++++-------------
1 files changed, 114 insertions(+), 39 deletions(-)
diff --git a/zy-asrs-flow/src/pages/map/components/settings.jsx b/zy-asrs-flow/src/pages/map/components/settings.jsx
index c5a943e..83c60d1 100644
--- a/zy-asrs-flow/src/pages/map/components/settings.jsx
+++ b/zy-asrs-flow/src/pages/map/components/settings.jsx
@@ -7,6 +7,9 @@
import './index.css';
import Http from '@/utils/http';
+const logSliderToNumber = value => Math.pow(10, value - 2).toFixed(2);
+const numberToLogSlider = value => Math.log10(value) + 2;
+
const useStyles = createStyles(({ token, css }) => {
})
@@ -47,14 +50,24 @@
const { name: nameList, value } = change;
nameList.forEach(name => {
switch (name) {
- case 'slider':
+ case 'scaleSlider':
form.setFieldsValue({
- no: value
+ scale: value
})
break;
- case 'no':
+ case 'scale':
form.setFieldsValue({
- slider: value
+ scaleSlider: value
+ })
+ break;
+ case 'rotationSlider':
+ form.setFieldsValue({
+ rotation: value
+ })
+ break;
+ case 'rotation':
+ form.setFieldsValue({
+ rotationSlider: value
})
break;
default:
@@ -116,22 +129,74 @@
variant='filled' // outlined | borderless | filled
labelWrap // label 鎹㈣
disabled={false}
+ layout='horizontal'
>
- <Row gutter={24}>
+ <Row gutter={[24, 16]}>
+
+ {/* */}
+ <Col span={24}>
+ <Form.Item label="type" labelCol={{ span: 2 }}>
+ <span className="ant-form-text">China</span>
+ </Form.Item>
+ </Col>
+
+ {/* position */}
+ <Col span={24}>
+ <Form.Item label="position">
+ <Space.Compact>
+ <Form.Item
+ name='x'
+ noStyle
+ rules={[
+ {
+ required: false,
+ },
+ ]}
+ >
+ <InputNumber
+ addonBefore={<Space.Compact>x</Space.Compact>}
+ style={{
+ width: '50%',
+ }}
+ />
+ </Form.Item>
+ <Form.Item
+ name='y'
+ noStyle
+ rules={[
+ {
+ required: false,
+ },
+ ]}
+ >
+ <InputNumber
+ addonBefore={<Space.Compact>y</Space.Compact>}
+ style={{
+ width: '50%',
+ }}
+ />
+ </Form.Item>
+ </Space.Compact>
+ </Form.Item>
+ </Col>
+
+ {/* scale */}
<Col span={24}>
<Row gutter={24}>
<Col span={18}>
<Form.Item
label="scale"
name="scaleSlider"
+ labelCol={{ span: 4 }}
>
<Slider
+ min={0.1}
+ max={10}
+ step={0.1}
marks={{
- 0.01: '0.01',
0.1: '0.1',
1: '1',
10: '10',
- 100: '100',
}}
/>
</Form.Item>
@@ -139,21 +204,56 @@
<Col span={6}>
<Form.Item
name="scale"
+ labelCol={{ span: 4 }}
>
<InputNumber
changeOnWheel
- min={0.01} max={100} defaultValue={1}
+ min={0.1} max={10} defaultValue={1}
/>
</Form.Item>
</Col>
</Row>
</Col>
- <Col span={6}>
- <Form.Item label="Plain Text">
- <span className="ant-form-text">China</span>
- </Form.Item>
+
+ {/* rotation */}
+ <Col span={24}>
+ <Row gutter={24}>
+ <Col span={18}>
+ <Form.Item
+ label="rotation"
+ name="rotationSlider"
+ labelCol={{ span: 4 }}
+ >
+ <Slider
+ min={0}
+ max={360}
+ step={1}
+ marks={{
+ 0: '0掳',
+ 90: '90掳',
+ 180: '180掳',
+ 270: '270掳',
+ 360: '360掳',
+ }}
+ />
+ </Form.Item>
+ </Col>
+ <Col span={6}>
+ <Form.Item
+ name="rotation"
+ labelCol={{ span: 4 }}
+ >
+ <InputNumber
+ changeOnWheel
+ min={0} max={360} defaultValue={0}
+ />
+ </Form.Item>
+ </Col>
+ </Row>
</Col>
- <Col span={12}>
+
+
+ {/* <Col span={12}>
<Form.Item
label="Username"
name="username"
@@ -171,35 +271,10 @@
</Col>
<Col span={24}>
<Form.Item
- label="InputNumber"
- name="no"
- >
- <InputNumber
- changeOnWheel
- min={1} max={10} defaultValue={3}
- />
- </Form.Item>
- </Col>
- <Col span={24}>
- <Form.Item
label="Switch"
valuePropName="checked"
>
<Switch />
- </Form.Item>
- </Col>
- <Col span={24}>
- <Form.Item name="slider" label="Slider">
- <Slider
- marks={{
- 0: 'A',
- 20: 'B',
- 40: 'C',
- 60: 'D',
- 80: 'E',
- 100: 'F',
- }}
- />
</Form.Item>
</Col>
<Col span={24}>
@@ -263,7 +338,7 @@
}}
/>
</Form.Item>
- </Col>
+ </Col> */}
--
Gitblit v1.9.1