Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fns_backend
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Zhang Xiaojie
fns_backend
Commits
8a38db57
Commit
8a38db57
authored
Sep 25, 2021
by
xhx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
9/25
parent
a849a9e9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
63 additions
and
16 deletions
+63
-16
userTable.vue
src/components/UserManage/userTable.vue
+55
-12
index.vue
src/views/Root/User/index.vue
+8
-4
No files found.
src/components/UserManage/userTable.vue
View file @
8a38db57
...
...
@@ -39,18 +39,18 @@
<span
v-if=
"record.state!='已禁用'"
>
<a
@
click=
"deploy(record)"
>
调配
</a>
<a-divider
type=
"vertical"
/>
<a
@
click=
"() => enable(record.
key
)"
>
启用
</a>
<a
@
click=
"() => enable(record.
uuid
)"
>
启用
</a>
</span>
<span
v-else
>
<a
@
click=
"disable(record.
key
)"
>
禁用
</a>
<a
@
click=
"disable(record.
uuid
)"
>
禁用
</a>
</span>
<span
v-if=
"record.state==('启用中/在岗')"
>
<a-divider
type=
"vertical"
/>
<a
@
confirm=
"() => offJob(record.
key
)"
>
不在岗
</a>
<a
@
confirm=
"() => offJob(record.
uuid
)"
>
不在岗
</a>
</span>
<span
v-else-if=
"record.state==('启用中/不在岗')"
>
<a-divider
type=
"vertical"
/>
<a
@
click=
"inJob(record.
key
)"
>
在岗
</a>
<a
@
click=
"inJob(record.
uuid
)"
>
在岗
</a>
</span>
</p>
</a-table>
...
...
@@ -72,6 +72,7 @@
import
Vue
,
{
PropType
}
from
"vue"
import
{
firstLevelManager
}
from
'@/mock/index'
import
{
staff
}
from
'@/types/staff'
import
{
eUserStatusAction
}
from
'@/types/user'
import
{
eRole
}
from
"@/types/role"
import
{
eLevel
}
from
"@/types/level"
import
{
getColumns
}
from
'@/const/columns/userManagerCol'
...
...
@@ -79,10 +80,15 @@ import { userModal } from './const'
import
deplotModal
from
"@/components/UserManage/deployModal.vue"
import
Filter
from
'@/filter/index'
import
{
mapActions
,
mapMutations
,
mapState
}
from
'vuex'
import
Mixin
from
"@/views/Root/User/Mixin/index"
// import Mixin from "@/views/Root/User/Mixin/index"
import
StaffService
from
'@/service/StaffService'
import
{
message
}
from
"ant-design-vue"
const
staff
=
new
StaffService
()
export
default
Vue
.
extend
({
mixins
:
[
Mixin
],
//
mixins: [Mixin],
components
:{
deplotModal
},
filters
:
{
filterStatus
(
val
:
number
)
{
...
...
@@ -111,7 +117,8 @@ export default Vue.extend({
title
:
''
,
text
:
''
,
type
:
userModal
.
enable
,
id
:
''
,
params
:
{}
as
any
}
},
computed
:{
...
...
@@ -133,13 +140,30 @@ export default Vue.extend({
}
},
methods
:{
...
mapMutations
(
'platformUserManagement'
,
{
platformSave
:
'save'
,
}),
...
mapActions
(
'platformUserManagement'
,
{
platformQuery
:
'queryUser'
,
}),
getRouteQuery
()
{
const
keys
=
JSON
.
parse
(
this
.
$route
.
query
.
rankVal
as
string
)
console
.
log
(
keys
)
const
level
=
this
.
$route
.
query
.
level
this
.
params
=
{
firstBranch
:
+
keys
[
0
]?.
value
||
undefined
,
firstSubBranch
:
+
keys
[
2
]?.
value
||
undefined
,
secondBranch
:
+
keys
[
1
]?.
value
||
undefined
,
secondSubBranch
:
+
keys
[
3
]?.
value
||
undefined
,
level
}
},
getLists
()
{
this
.
platformSave
({
...
this
.
params
})
this
.
platformQuery
()
},
changeHandle
(
e
:
any
)
{
this
.
platformSave
({
page
:
e
.
current
,
...
...
@@ -151,37 +175,52 @@ export default Vue.extend({
},
enable
(
key
:
string
){
this
.
type
=
userModal
.
enable
this
.
id
=
key
this
.
title
=
'启用用户'
this
.
text
=
'确定启用该用户?'
this
.
show
=
true
},
disable
(
key
:
string
){
this
.
type
=
userModal
.
disable
this
.
id
=
key
this
.
title
=
'禁用用户'
this
.
text
=
'确定禁用该用户?'
this
.
show
=
true
},
inJob
(
key
:
string
){
this
.
type
=
userModal
.
enable
this
.
id
=
key
this
.
title
=
'设置在岗'
this
.
text
=
'确定将该用户设置为在岗?'
this
.
show
=
true
},
offJob
(
key
:
string
){
this
.
type
=
userModal
.
enable
this
.
id
=
key
this
.
title
=
'设置不在岗'
this
.
text
=
'确定将该用户设置为在岗?'
this
.
show
=
true
},
modifyStauts
(
status
:
number
)
{
staff
.
modifyStaffStatus
({
status
:
status
,
uuid
:
this
.
id
}).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
message
.
success
(
'操作成功'
)
this
.
getLists
()
}
})
},
handleOk
(
record
:
any
){
if
(
this
.
type
==
userModal
.
enable
){
this
.
modifyStauts
(
eUserStatusAction
.
enable
)
}
else
if
(
this
.
type
==
userModal
.
disable
){
this
.
modifyStauts
(
eUserStatusAction
.
disable
)
}
else
if
(
this
.
type
==
userModal
.
inJob
){
this
.
modifyStauts
(
eUserStatusAction
.
onPosition
)
}
else
if
(
this
.
type
==
userModal
.
offJob
){
this
.
modifyStauts
(
eUserStatusAction
.
notOnPosition
)
}
this
.
show
=
false
},
...
...
@@ -235,6 +274,10 @@ export default Vue.extend({
this
.
$router
.
push
({
name
:
'secondarySubClient'
,
query
:{
level
:
key
,
rankVal
:
this
.
$route
.
query
.
rankVal
}})
},
},
created
()
{
this
.
getRouteQuery
()
this
.
getLists
()
}
})
</
script
>
...
...
src/views/Root/User/index.vue
View file @
8a38db57
...
...
@@ -97,7 +97,11 @@ export default Vue.extend({
const
levelList
=
[]
for
(
let
item
of
this
.
fooList
)
{
if
(
item
.
value
)
{
levelList
.
push
(
item
.
value
+
''
)
let
name
=
''
for
(
let
i
of
item
.
options
)
{
name
=
item
.
value
===
i
.
ID
?
i
.
Name
:
''
}
levelList
.
push
({
value
:
item
.
value
,
name
})
}
else
{
break
}
...
...
@@ -105,13 +109,13 @@ export default Vue.extend({
if
(
levelList
.
length
==
0
&&
this
.
search
.
length
==
0
){
this
.
$message
.
info
(
'请通过选择或者输入详细地址搜索'
)
}
else
{
const
search
:
string
|
Array
<
string
>
=
levelList
.
length
==
0
?
this
.
search
:
levelList
const
search
:
string
|
Array
<
{
value
:
number
,
name
:
string
}
>
=
levelList
.
length
==
0
?
this
.
search
:
levelList
console
.
log
(
search
)
this
.
selectTables
(
search
as
Array
<
string
>
)
this
.
selectTables
(
search
)
}
// this.$router.push({name:'firstLevel'})
},
selectTables
(
arr
:
Array
<
string
>|
string
)
{
selectTables
(
arr
:
Array
<
{
value
:
number
,
name
:
string
}
>|
string
)
{
if
(
typeof
arr
===
'string'
)
{
this
.
$router
.
push
({
path
:
'/backend/user/secondarySub'
,
query
:
{
rankVal
:
arr
}})
}
else
{
...
...
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