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

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

parent 60981b65
...@@ -88,31 +88,57 @@ ...@@ -88,31 +88,57 @@
} }
.box2item3 { .box2item3 {
position: absolute; position: absolute;
left: 362px; top: -15px;
} }
.box2item4 { .box2item4 {
position: absolute; position: absolute;
left: 461px; left: 100px;
top: -10px;
} }
.box2item5 { .box2item5 {
position: absolute; position: absolute;
left: 475px; left: 115px;
top: -15px;
} }
.box2item6 { .box2item6 {
position: absolute; position: absolute;
left: 561px; left: 200px;
top: -10px;
} }
.box2item7 { .box2item7 {
position: absolute; position: absolute;
left: 583px; left: 230px;
top: -15px;
} }
.box3 { .box3 {
width: 100%; width: 100%;
height: 34px; height: 34px;
position: relative; position: relative;
z-index: 40;
} }
.box3item1 { .box3item1 {
padding-left: 146px; 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 React, { useState, useEffect, useRef } from 'react';
import styles from './UsersAdd.less'; 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 Line from '../../../components/Line/Line';
import TitleBack from '../../../components/TitleBack/TitleBack'; import TitleBack from '../../../components/TitleBack/TitleBack';
...@@ -10,9 +10,8 @@ import SearchOptionsCommnity from '../../../components/SearchOptions/SearchOptio ...@@ -10,9 +10,8 @@ import SearchOptionsCommnity from '../../../components/SearchOptions/SearchOptio
import { checkParam, RA } from '../../../utils/method'; import { checkParam, RA } from '../../../utils/method';
import { validateMessages } from '@/utils/params'; import { validateMessages } from '@/utils/params';
// import "./UsersAddInput.less"
const module = 'User'; const module = 'User';
let verifyNum = 0;
const UsersAdd = (props: any) => { const UsersAdd = (props: any) => {
const { dispatch, communityInfo } = props; const { dispatch, communityInfo } = props;
...@@ -22,13 +21,11 @@ const UsersAdd = (props: any) => { ...@@ -22,13 +21,11 @@ const UsersAdd = (props: any) => {
const [loading, setLoading] = useState(false); const [loading, setLoading] = useState(false);
const onFinish = (values: any) => { const onFinish = (values: any) => {
console.log(values);
if (postman.extend != null) { if (postman.extend != null) {
values.communityName = postman.extend; values.communityName = postman.extend;
} else { } else {
values.communityName = null; values.communityName = null;
} }
// var tmp = Object.keys(values);
if (checkParam(values)) { if (checkParam(values)) {
values.owerPhone = null; values.owerPhone = null;
values.owerEmail = null; values.owerEmail = null;
...@@ -46,9 +43,7 @@ const UsersAdd = (props: any) => { ...@@ -46,9 +43,7 @@ const UsersAdd = (props: any) => {
setPostman(tmp); setPostman(tmp);
}; };
useEffect(() => { useEffect(() => {
console.log(communityInfo);
if (communityInfo != null) { if (communityInfo != null) {
console.log(communityInfo);
if (postman.extend != null) { if (postman.extend != null) {
formRef.current.setFieldsValue({ formRef.current.setFieldsValue({
addressAndpostalCode: addressAndpostalCode:
...@@ -61,7 +56,6 @@ const UsersAdd = (props: any) => { ...@@ -61,7 +56,6 @@ const UsersAdd = (props: any) => {
}, [communityInfo]); }, [communityInfo]);
const checkData = (rule: any, value: any, callback: any) => { const checkData = (rule: any, value: any, callback: any) => {
console.log(rule, value);
if (value) { if (value) {
if (/^[a-zA-Z0-9]+$/g.test(value)) { if (/^[a-zA-Z0-9]+$/g.test(value)) {
callback(); callback();
...@@ -97,21 +91,27 @@ const UsersAdd = (props: any) => { ...@@ -97,21 +91,27 @@ const UsersAdd = (props: any) => {
<div className={styles.box2item2}> <div className={styles.box2item2}>
<SearchOptionsCommnity alone={true} opname={extendName} /> <SearchOptionsCommnity alone={true} opname={extendName} />
</div> </div>
<div className={styles.box2item3}> <div className={styles.box5}>
<Form.Item name="buildingNumber" rules={[{ validator: checkData }]}> <Form.Item>
<Input placeholder="Building" style={{ width: 94 }} /> <Input.Group>
</Form.Item> <div className={styles.box2item3}>
</div> <Form.Item name="buildingNumber" noStyle rules={[{ validator: checkData }]}>
<div className={styles.box2item4}>#</div> <Input placeholder="Building" style={{ width: 94 }} />
<div className={styles.box2item5}> </Form.Item>
<Form.Item name="floorNumber" rules={[{ validator: checkData }]}> </div>
<Input placeholder="Floor" style={{ width: 80 }} /> <div className={styles.box2item4}>#</div>
</Form.Item> <div className={styles.box2item5}>
</div> <Form.Item name="floorNumber" noStyle rules={[{ validator: checkData }]}>
<div className={styles.box2item6}>——</div> <Input placeholder="Floor" style={{ width: 80 }} />
<div className={styles.box2item7}> </Form.Item>
<Form.Item name="roomNumber" rules={[{ validator: checkData }]}> </div>
<Input placeholder="Room" style={{ width: 112 }} /> <div className={styles.box2item6}>——</div>
<div className={styles.box2item7}>
<Form.Item name="roomNumber" noStyle rules={[{ validator: checkData }]}>
<Input placeholder="Room" style={{ width: 112 }} />
</Form.Item>
</div>
</Input.Group>
</Form.Item> </Form.Item>
</div> </div>
</div> </div>
...@@ -148,11 +148,3 @@ function mapStateToProps(state: any) { ...@@ -148,11 +148,3 @@ function mapStateToProps(state: any) {
}; };
} }
export default connect(mapStateToProps)(UsersAdd); 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