Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
smart_gov_platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
smart_gov_platform
Commits
7c0b7b85
Commit
7c0b7b85
authored
Dec 04, 2023
by
“yiyousong”
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perf: 优化用户管理搜索
parent
421d923a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
20 deletions
+36
-20
portal-manager-ui/admin/src/views/thePlatformIsSet/components/permissionsModel/userManagement.vue
...tformIsSet/components/permissionsModel/userManagement.vue
+36
-20
No files found.
portal-manager-ui/admin/src/views/thePlatformIsSet/components/permissionsModel/userManagement.vue
View file @
7c0b7b85
...
...
@@ -8,10 +8,19 @@
</div>
<div
class=
"search_btn"
>
<a-space>
<a-select
v-model=
"userform.type"
placeholder=
"请选择类型"
style=
"width: 150px"
>
<a-select-option
:value=
"1"
>
按用户名
</a-select-option>
<a-select-option
:value=
"2"
>
按用户姓名
</a-select-option>
<a-select-option
:value=
"3"
>
按电话
</a-select-option>
</a-select>
<a-input
v-model=
"userform.searchVal"
style=
"width: 250px"
placeholder=
"请输入
用户姓名/手机号
搜索"
placeholder=
"请输入
关键字
搜索"
>
<a-icon
slot=
"prefix"
type=
"search"
/>
</a-input>
...
...
@@ -172,6 +181,7 @@ export default {
sourceInfoForm
:
{},
userDict
:
{},
// 角色数据
userform
:
{
type
:
1
,
roleId
:
undefined
,
searchVal
:
undefined
,
},
...
...
@@ -197,11 +207,14 @@ export default {
this
.
tableLoading
=
true
;
let
realName
=
""
;
let
mobile
=
""
;
let
loginName
=
""
;
if
(
this
.
userform
.
searchVal
)
{
if
(
/^
[\d]
+$/
.
test
(
this
.
userform
.
searchVal
)
)
{
mobil
e
=
"
%
"
+
this
.
userform
.
searchVal
+
"
%
"
;
}
else
{
if
(
this
.
userform
.
type
==
1
)
{
loginNam
e
=
"
%
"
+
this
.
userform
.
searchVal
+
"
%
"
;
}
else
if
(
this
.
userform
.
type
==
2
)
{
realName
=
"
%
"
+
this
.
userform
.
searchVal
+
"
%
"
;
}
else
if
(
this
.
userform
.
type
==
3
)
{
mobile
=
"
%
"
+
this
.
userform
.
searchVal
+
"
%
"
;
}
}
let
res
=
await
userList
({
...
...
@@ -210,24 +223,27 @@ export default {
roleId
:
this
.
userform
.
roleId
,
realName
,
mobile
,
loginName
,
});
let
{
dict
,
data
,
total
}
=
res
.
data
;
let
{
roleId
}
=
dict
;
if
(
!
data
.
length
&&
this
.
tablePagination
.
current
>
1
)
{
this
.
tablePagination
.
current
-=
1
;
this
.
getUserList
();
}
this
.
userDict
=
roleId
;
let
{
loginName
}
=
this
.
userData
;
if
(
this
.
loginNames
.
includes
(
loginName
))
{
this
.
tableSourceData
=
data
;
this
.
tablePagination
.
total
=
total
;
}
else
{
this
.
tableSourceData
=
data
.
filter
((
v
)
=>
{
return
!
this
.
loginNames
.
includes
(
v
.
loginName
);
});
if
(
res
.
code
==
1
)
{
let
{
dict
,
data
,
total
}
=
res
.
data
;
let
{
roleId
}
=
dict
;
if
(
!
data
.
length
&&
this
.
tablePagination
.
current
>
1
)
{
this
.
tablePagination
.
current
-=
1
;
this
.
getUserList
();
}
this
.
userDict
=
roleId
;
let
{
loginName
}
=
this
.
userData
;
if
(
this
.
loginNames
.
includes
(
loginName
))
{
this
.
tableSourceData
=
data
;
this
.
tablePagination
.
total
=
total
;
}
else
{
this
.
tableSourceData
=
data
.
filter
((
v
)
=>
{
return
!
this
.
loginNames
.
includes
(
v
.
loginName
);
});
this
.
tablePagination
.
total
=
total
-
3
;
this
.
tablePagination
.
total
=
total
-
this
.
loginNames
.
length
;
}
}
this
.
tableLoading
=
false
;
},
...
...
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