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
bec1f713
Commit
bec1f713
authored
Feb 03, 2021
by
Sixiang_Zzb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
用户管理模块搜索bug修复
parent
beed4fd8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
38 deletions
+39
-38
Users.tsx
src/pages/UserManagement/LIFEUserManagement/Users.tsx
+26
-26
ServiceProviderManagement.tsx
...t/ServiceProviderManagement/ServiceProviderManagement.tsx
+13
-12
No files found.
src/pages/UserManagement/LIFEUserManagement/Users.tsx
View file @
bec1f713
...
@@ -136,20 +136,37 @@ const Users = (props: any) => {
...
@@ -136,20 +136,37 @@ const Users = (props: any) => {
showUploadList
:
false
,
showUploadList
:
false
,
};
};
// 请求拿取数据
const
getList
=
(
CommunityList1
:
[])
=>
{
if
(
readyData
.
communityArray
.
length
===
0
)
{
readyData
.
communityArray
=
CommunityList1
;
}
setLoading
(
true
);
// 获取数据
RA
(
12
,
{
...
readyData
,
},
module
,
dispatch
,
);
};
// 监听路由变化更新数据
// 监听路由变化更新数据
useEffect
(()
=>
{
useEffect
(()
=>
{
// 重置数据
if
(
JSON
.
stringify
(
location
.
query
)
!==
'{}'
)
{
readyData
=
{
pageNum
:
1
,
owerName
:
''
,
communityArray
:
[],
};
if
(
location
.
query
)
{
readyData
=
{
readyData
=
{
...
readyData
,
...
readyData
,
...
location
.
query
,
...
location
.
query
,
};
};
}
else
{
// 重置数据
readyData
=
{
pageNum
:
1
,
owerName
:
''
,
communityArray
:
[],
};
}
}
if
(
CommunityList
&&
flag
===
false
)
{
if
(
CommunityList
&&
flag
===
false
)
{
...
@@ -167,23 +184,6 @@ const Users = (props: any) => {
...
@@ -167,23 +184,6 @@ const Users = (props: any) => {
}
}
},
[
CommunityList
]);
},
[
CommunityList
]);
// 请求拿取数据
const
getList
=
(
CommunityList
:
[])
=>
{
if
(
readyData
.
communityArray
.
length
===
0
)
{
readyData
.
communityArray
=
CommunityList
;
}
setLoading
(
true
);
// 获取数据
RA
(
12
,
{
...
readyData
,
},
module
,
dispatch
,
);
};
// 判断数据是否回来
// 判断数据是否回来
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
Data
!=
null
)
{
if
(
Data
!=
null
)
{
...
@@ -258,7 +258,7 @@ const Users = (props: any) => {
...
@@ -258,7 +258,7 @@ const Users = (props: any) => {
{
/* 内容组件 */
}
{
/* 内容组件 */
}
<
div
className=
{
styles
.
box2
}
>
<
div
className=
{
styles
.
box2
}
>
<
button
className=
{
styles
.
buttonAdd2
}
onClick=
{
goToAdd
}
>
<
button
type=
"button"
className=
{
styles
.
buttonAdd2
}
onClick=
{
goToAdd
}
>
Create New Owner
Create New Owner
</
button
>
</
button
>
<
div
className=
{
styles
.
buttonAdd
}
>
<
div
className=
{
styles
.
buttonAdd
}
>
...
...
src/pages/UserManagement/ServiceProviderManagement/ServiceProviderManagement.tsx
View file @
bec1f713
...
@@ -160,20 +160,21 @@ const ServiceProviderManagement = (props: propsType) => {
...
@@ -160,20 +160,21 @@ const ServiceProviderManagement = (props: propsType) => {
// 监听路由url
// 监听路由url
useEffect
(()
=>
{
useEffect
(()
=>
{
// 重置数据
if
(
JSON
.
stringify
(
location
.
query
)
!==
'{}'
)
{
readyData
=
{
pageNum
:
1
,
serviceCommunityList
:
[],
serviceScope
:
''
,
providerName
:
''
,
};
if
(
location
.
query
)
{
readyData
=
{
readyData
=
{
...
readyData
,
...
readyData
,
...
location
.
query
,
...
location
.
query
,
};
};
}
else
{
// 重置数据
readyData
=
{
pageNum
:
1
,
serviceCommunityList
:
[],
serviceScope
:
''
,
providerName
:
''
,
};
}
}
if
(
CommunityList
&&
flag
===
false
)
{
if
(
CommunityList
&&
flag
===
false
)
{
flag
=
true
;
flag
=
true
;
setLoading
(
true
);
setLoading
(
true
);
...
@@ -268,17 +269,17 @@ const ServiceProviderManagement = (props: propsType) => {
...
@@ -268,17 +269,17 @@ const ServiceProviderManagement = (props: propsType) => {
{
/* 内容组件 */
}
{
/* 内容组件 */
}
<
div
className=
{
styles
.
box2
}
>
<
div
className=
{
styles
.
box2
}
>
<
button
className=
{
styles
.
buttonAdd2
}
onClick=
{
goToServices
}
>
<
button
type=
"button"
className=
{
styles
.
buttonAdd2
}
onClick=
{
goToServices
}
>
Services Available
Services Available
</
button
>
</
button
>
<
button
className=
{
styles
.
buttonAdd
}
onClick=
{
goToCreate
}
>
<
button
type=
"button"
className=
{
styles
.
buttonAdd
}
onClick=
{
goToCreate
}
>
Create New
Create New
</
button
>
</
button
>
</
div
>
</
div
>
{
/* 列表组件 */
}
{
/* 列表组件 */
}
<
Table
<
Table
rowKey=
{
'id'
}
rowKey=
"id"
style=
{
{
marginTop
:
16
}
}
style=
{
{
marginTop
:
16
}
}
loading=
{
loading
}
loading=
{
loading
}
columns=
{
columns
}
columns=
{
columns
}
...
...
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