Commit 4db99419 authored by 1271610056@qq.com's avatar 1271610056@qq.com

用户管理模块 新增样式更改

parent 60981b65
......@@ -88,31 +88,57 @@
}
.box2item3 {
position: absolute;
left: 362px;
top: -15px;
}
.box2item4 {
position: absolute;
left: 461px;
left: 100px;
top: -10px;
}
.box2item5 {
position: absolute;
left: 475px;
left: 115px;
top: -15px;
}
.box2item6 {
position: absolute;
left: 561px;
left: 200px;
top: -10px;
}
.box2item7 {
position: absolute;
left: 583px;
left: 230px;
top: -15px;
}
.box3 {
width: 100%;
height: 34px;
position: relative;
z-index: 40;
}
.box3item1 {
padding-left: 146px;
}
.box5 {
position: absolute;
left: 370px;
width: 340px;
height: 60px;
&::after {
content: '';
width: 100%;
height: 100%;
position: absolute;
top: 55px;
left: 0;
z-index: 20;
background-color: #fff;
}
}
.ant-form-item-explain {
margin-top: 5px;
}
import React, { useState, useEffect, useRef } from 'react';
import styles from './UsersAdd.less';
import { Input, Menu, Table, Space, Pagination, Spin, Button, Form, Row, Col, message } from 'antd';
import { Input, Spin, Button, Form, message } from 'antd';
import { Link, useIntl, connect, Dispatch } from 'umi';
import { connect } from 'umi';
import Line from '../../../components/Line/Line';
import TitleBack from '../../../components/TitleBack/TitleBack';
......@@ -10,9 +10,8 @@ import SearchOptionsCommnity from '../../../components/SearchOptions/SearchOptio
import { checkParam, RA } from '../../../utils/method';
import { validateMessages } from '@/utils/params';
// import "./UsersAddInput.less"
const module = 'User';
let verifyNum = 0;
const UsersAdd = (props: any) => {
const { dispatch, communityInfo } = props;
......@@ -22,13 +21,11 @@ const UsersAdd = (props: any) => {
const [loading, setLoading] = useState(false);
const onFinish = (values: any) => {
console.log(values);
if (postman.extend != null) {
values.communityName = postman.extend;
} else {
values.communityName = null;
}
// var tmp = Object.keys(values);
if (checkParam(values)) {
values.owerPhone = null;
values.owerEmail = null;
......@@ -46,9 +43,7 @@ const UsersAdd = (props: any) => {
setPostman(tmp);
};
useEffect(() => {
console.log(communityInfo);
if (communityInfo != null) {
console.log(communityInfo);
if (postman.extend != null) {
formRef.current.setFieldsValue({
addressAndpostalCode:
......@@ -61,7 +56,6 @@ const UsersAdd = (props: any) => {
}, [communityInfo]);
const checkData = (rule: any, value: any, callback: any) => {
console.log(rule, value);
if (value) {
if (/^[a-zA-Z0-9]+$/g.test(value)) {
callback();
......@@ -97,23 +91,29 @@ const UsersAdd = (props: any) => {
<div className={styles.box2item2}>
<SearchOptionsCommnity alone={true} opname={extendName} />
</div>
<div className={styles.box5}>
<Form.Item>
<Input.Group>
<div className={styles.box2item3}>
<Form.Item name="buildingNumber" rules={[{ validator: checkData }]}>
<Form.Item name="buildingNumber" noStyle rules={[{ validator: checkData }]}>
<Input placeholder="Building" style={{ width: 94 }} />
</Form.Item>
</div>
<div className={styles.box2item4}>#</div>
<div className={styles.box2item5}>
<Form.Item name="floorNumber" rules={[{ validator: checkData }]}>
<Form.Item name="floorNumber" noStyle rules={[{ validator: checkData }]}>
<Input placeholder="Floor" style={{ width: 80 }} />
</Form.Item>
</div>
<div className={styles.box2item6}>——</div>
<div className={styles.box2item7}>
<Form.Item name="roomNumber" rules={[{ validator: checkData }]}>
<Form.Item name="roomNumber" noStyle rules={[{ validator: checkData }]}>
<Input placeholder="Room" style={{ width: 112 }} />
</Form.Item>
</div>
</Input.Group>
</Form.Item>
</div>
</div>
<div className={styles.box3}>
......@@ -148,11 +148,3 @@ function mapStateToProps(state: any) {
};
}
export default connect(mapStateToProps)(UsersAdd);
// "owerName":"孟浩",
// "owerPhone":"18813787878",
// "owerEmail":"sale@huahuico.com",
// "communityName":"A7",
// "buildingNumber":"A1",
// "floorNumber":"11",
// "roomNumber":"388",
// "addressAndpostalCode":"工业大道3689561"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment