From 015a52250f1c0cdf738d0c70f266dcd127ea14ce Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期日, 24 三月 2024 15:34:58 +0800
Subject: [PATCH] #
---
zy-asrs-flow/src/pages/map/batch/index.jsx | 145 +++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 131 insertions(+), 14 deletions(-)
diff --git a/zy-asrs-flow/src/pages/map/batch/index.jsx b/zy-asrs-flow/src/pages/map/batch/index.jsx
index b9fc998..31771f8 100644
--- a/zy-asrs-flow/src/pages/map/batch/index.jsx
+++ b/zy-asrs-flow/src/pages/map/batch/index.jsx
@@ -1,5 +1,5 @@
import React, { useState, useRef, useEffect } from 'react';
-import { Drawer, Space, Button, Card } from 'antd';
+import { Drawer, Space, Button, Card, Select, InputNumber, Input, Result, Form } from 'antd';
import {
ProCard,
ProForm,
@@ -33,11 +33,22 @@
const intl = useIntl();
const { styles } = useStyles();
const { batchSprites } = props;
- const formRef = useRef();
+ const [form] = Form.useForm();
+ const [currentStep, setCurrentStep] = useState(0);
+
+ const resetForm = () => {
+ form.resetFields();
+ setCurrentStep(0);
+ };
useEffect(() => {
console.log(batchSprites);
- }, []);
+ resetForm();
+ }, [props]);
+
+ useEffect(() => {
+ console.log(currentStep);
+ }, [currentStep]);
const handleCancel = () => {
props.onCancel();
@@ -73,7 +84,9 @@
}}
>
<StepsForm
- formRef={formRef}
+ form={form}
+ current={currentStep}
+ onCurrentChange={setCurrentStep}
onFinish={async () => {
await waitTime(1000);
message.success('鎻愪氦鎴愬姛');
@@ -81,6 +94,20 @@
formProps={{
validateMessages: {
required: '姝ら」涓哄繀濉」',
+ },
+ variant: 'filled',
+ layout: 'horizontal',
+ labelCol: {
+ span: 4,
+ },
+ wrapperCol: {
+ span: 20,
+ },
+ labelWrap: true
+ }}
+ submitter={{
+ render: (props, dom) => {
+ return props.step === 2 ? [] : dom;
},
}}
>
@@ -116,27 +143,117 @@
return true;
}}
>
- <ProForm.Group>
- <ProFormText name="dbname" label="涓氬姟 DB 鐢ㄦ埛鍚�" />
- <ProFormSelect
- label="Pod 璋冨害绛栫暐"
- name="remark2"
- initialValue="2"
+ <ProForm.Item
+ name='shelfType'
+ label={intl.formatMessage({ id: 'map.settings.shelf.type', defaultMessage: '绫诲瀷' })}
+ rules={[
+ {
+ required: true,
+ },
+ ]}
+ >
+ <Select
+ style={{ width: 120 }}
options={[
{
- value: '1',
- label: '绛栫暐涓�',
+ label: intl.formatMessage({ id: 'map.settings.shelf.store', defaultMessage: '搴撲綅' }),
+ value: 0
},
- { value: '2', label: '绛栫暐浜�' },
+ {
+ label: intl.formatMessage({ id: 'map.settings.shelf.track', defaultMessage: '杞ㄩ亾' }),
+ value: 3
+ },
+ {
+ label: intl.formatMessage({ id: 'map.settings.shelf.diable', defaultMessage: '绂佺敤' }),
+ value: 1
+ },
]}
+ defaultValue={0}
/>
- </ProForm.Group>
+ </ProForm.Item>
+ <ProForm.Item
+ label={intl.formatMessage({ id: 'map.settings.shelf.space', defaultMessage: '闂磋窛' })}
+ >
+ <Space.Compact>
+ <ProForm.Item
+ name='top'
+ noStyle
+ >
+ <InputNumber
+ addonBefore={<Space.Compact><FormattedMessage id='map.settings.shelf.top' defaultMessage='涓�' /></Space.Compact>}
+ style={{
+ width: '50%',
+ }}
+ />
+ </ProForm.Item>
+ <ProForm.Item
+ name='bottom'
+ noStyle
+ >
+ <InputNumber
+ addonBefore={<Space.Compact><FormattedMessage id='map.settings.shelf.bottom' defaultMessage='涓�' /></Space.Compact>}
+ style={{
+ width: '50%',
+ }}
+ />
+ </ProForm.Item>
+ </Space.Compact>
+ </ProForm.Item>
+ <ProForm.Item
+ label={' '}
+ >
+ <Space.Compact>
+ <ProForm.Item
+ name='left'
+ noStyle
+ >
+ <InputNumber
+ addonBefore={<Space.Compact><FormattedMessage id='map.settings.shelf.left' defaultMessage='宸�' /></Space.Compact>}
+ style={{
+ width: '50%',
+ }}
+ />
+ </ProForm.Item>
+ <ProForm.Item
+ name='right'
+ noStyle
+ >
+ <InputNumber
+ addonBefore={<Space.Compact><FormattedMessage id='map.settings.shelf.right' defaultMessage='鍙�' /></Space.Compact>}
+ style={{
+ width: '50%',
+ }}
+ />
+ </ProForm.Item>
+ </Space.Compact>
+ </ProForm.Item>
+ <ProForm.Item
+ name='value'
+ label={intl.formatMessage({ id: 'map.settings.shelf.value', defaultMessage: '鍦板浘鍊�' })}
+ >
+ <Input
+ style={{
+ width: '50%',
+ }}
+ />
+ </ProForm.Item>
</StepsForm.StepForm>
{/************************* third ****************************/}
<StepsForm.StepForm
name="time"
title="缁撴灉"
+ submitter={false}
>
+ <Result
+ status="success"
+ title="Successfully Purchased Cloud Server ECS!"
+ subTitle="Order number: 2017182818828182881 Cloud server configuration takes 1-5 minutes, please wait."
+ extra={[
+ <Button type="primary" key="console">
+ Go Console
+ </Button>,
+ ]}
+ />
</StepsForm.StepForm>
</StepsForm >
</Card >
--
Gitblit v1.9.1