Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
TOSTUMI
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Maple
TOSTUMI
Commits
4db99419
Commit
4db99419
authored
Oct 27, 2020
by
1271610056@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
用户管理模块 新增样式更改
parent
60981b65
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
37 deletions
+55
-37
UsersAdd.less
src/pages/UserManagement/LIFEUserManagement/UsersAdd.less
+31
-5
UsersAdd.tsx
src/pages/UserManagement/LIFEUserManagement/UsersAdd.tsx
+24
-32
No files found.
src/pages/UserManagement/LIFEUserManagement/UsersAdd.less
View file @
4db99419
...
@@ -88,31 +88,57 @@
...
@@ -88,31 +88,57 @@
}
}
.box2item3 {
.box2item3 {
position: absolute;
position: absolute;
left: 362
px;
top: -15
px;
}
}
.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;
}
src/pages/UserManagement/LIFEUserManagement/UsersAdd.tsx
View file @
4db99419
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,23 +91,29 @@ const UsersAdd = (props: any) => {
...
@@ -97,23 +91,29 @@ 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
.
box5
}
>
<
Form
.
Item
>
<
Input
.
Group
>
<
div
className=
{
styles
.
box2item3
}
>
<
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
}
}
/>
<
Input
placeholder=
"Building"
style=
{
{
width
:
94
}
}
/>
</
Form
.
Item
>
</
Form
.
Item
>
</
div
>
</
div
>
<
div
className=
{
styles
.
box2item4
}
>
#
</
div
>
<
div
className=
{
styles
.
box2item4
}
>
#
</
div
>
<
div
className=
{
styles
.
box2item5
}
>
<
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
}
}
/>
<
Input
placeholder=
"Floor"
style=
{
{
width
:
80
}
}
/>
</
Form
.
Item
>
</
Form
.
Item
>
</
div
>
</
div
>
<
div
className=
{
styles
.
box2item6
}
>
——
</
div
>
<
div
className=
{
styles
.
box2item6
}
>
——
</
div
>
<
div
className=
{
styles
.
box2item7
}
>
<
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
}
}
/>
<
Input
placeholder=
"Room"
style=
{
{
width
:
112
}
}
/>
</
Form
.
Item
>
</
Form
.
Item
>
</
div
>
</
div
>
</
Input
.
Group
>
</
Form
.
Item
>
</
div
>
</
div
>
</
div
>
<
div
className=
{
styles
.
box3
}
>
<
div
className=
{
styles
.
box3
}
>
...
@@ -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"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment