#
luxiaotao1123
2024-03-08 da4fa58b1a0abc70b79f8d0370432c8e9ab1a7a9
#
1个文件已修改
153 ■■■■ 已修改文件
zy-asrs-flow/src/pages/map/components/settings.jsx 153 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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> */}