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
eddb1a43
Commit
eddb1a43
authored
Nov 06, 2020
by
Sixiang_Zzb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
LIFE用户管理模块优化
parent
32a906a3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
6 deletions
+23
-6
UsersAdd.tsx
src/pages/UserManagement/LIFEUserManagement/UsersAdd.tsx
+21
-4
ServiceProviderManagement.tsx
...t/ServiceProviderManagement/ServiceProviderManagement.tsx
+2
-2
No files found.
src/pages/UserManagement/LIFEUserManagement/UsersAdd.tsx
View file @
eddb1a43
...
...
@@ -56,6 +56,7 @@ const UsersAdd = (props: any) => {
const
checkData
=
(
rule
:
any
,
value
:
any
,
callback
:
any
)
=>
{
if
(
value
)
{
console
.
log
(
123
);
if
(
/^
[
a-zA-Z0-9
]
+$/g
.
test
(
value
))
{
callback
();
}
else
{
...
...
@@ -64,6 +65,18 @@ const UsersAdd = (props: any) => {
}
callback
();
};
const
checkData1
=
(
rule
:
any
,
value
:
any
,
callback
:
any
)
=>
{
if
(
value
)
{
if
(
/^
[
0-9
]
+$/g
.
test
(
value
))
{
callback
();
}
else
{
callback
(
new
Error
(
'Only numbers!'
));
}
}
callback
();
};
return
(
<
div
className=
{
styles
.
base
}
>
{
/* 头部组件 */
}
...
...
@@ -94,19 +107,23 @@ const UsersAdd = (props: any) => {
<
Form
.
Item
>
<
Input
.
Group
>
<
div
className=
{
styles
.
box2item3
}
>
<
Form
.
Item
name=
"buildingNumber"
noStyle
rules=
{
[{
validator
:
checkData
}]
}
>
<
Input
placeholder=
"B
uilding
"
style=
{
{
width
:
94
}
}
/>
<
Form
.
Item
name=
"buildingNumber"
rules=
{
[{
validator
:
checkData1
}]
}
>
<
Input
placeholder=
"B
LK
"
style=
{
{
width
:
94
}
}
/>
</
Form
.
Item
>
</
div
>
<
div
className=
{
styles
.
box2item4
}
>
#
</
div
>
<
div
className=
{
styles
.
box2item5
}
>
<
Form
.
Item
name=
"floorNumber"
noStyle
rules=
{
[{
validator
:
checkData
}]
}
>
<
Form
.
Item
name=
"floorNumber"
rules=
{
[{
validator
:
checkData1
}]
}
>
<
Input
placeholder=
"Floor"
style=
{
{
width
:
80
}
}
/>
</
Form
.
Item
>
</
div
>
<
div
className=
{
styles
.
box2item6
}
>
——
</
div
>
<
div
className=
{
styles
.
box2item7
}
>
<
Form
.
Item
name=
"roomNumber"
noStyle
rules=
{
[{
validator
:
checkData
}]
}
>
<
Form
.
Item
name=
"roomNumber"
rules=
{
[{
validator
:
checkData
}]
}
style=
{
{
width
:
260
}
}
>
<
Input
placeholder=
"Room"
style=
{
{
width
:
112
}
}
/>
</
Form
.
Item
>
</
div
>
...
...
src/pages/UserManagement/ServiceProviderManagement/ServiceProviderManagement.tsx
View file @
eddb1a43
...
...
@@ -90,7 +90,7 @@ const ServiceProviderManagement = (props: any) => {
disabled=
{
record
.
enable
==
'Deregistered'
?
true
:
false
}
onClick=
{
goToEdit
.
bind
(
this
,
record
)
}
>
e
dit
E
dit
</
a
>
</
Space
>
),
...
...
@@ -192,7 +192,7 @@ const ServiceProviderManagement = (props: any) => {
for
(
let
items
in
tmp
)
{
switch
(
tmp
[
items
].
enable
)
{
case
0
:
tmp
[
items
].
enable
=
'
n
ormal'
;
tmp
[
items
].
enable
=
'
N
ormal'
;
break
;
case
1
:
tmp
[
items
].
enable
=
'Deregistered'
;
...
...
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