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
31a9b788
Commit
31a9b788
authored
Sep 25, 2021
by
xhx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
用户管理跳转
parent
6b94b3ff
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
144 additions
and
93 deletions
+144
-93
userTable.vue
src/components/UserManage/userTable.vue
+76
-32
userManagerCol.ts
src/const/columns/userManagerCol.ts
+6
-4
index.ts
src/filter/index.ts
+15
-0
index.ts
src/service/StaffService/index.ts
+1
-0
index.ts
src/store/platformUserManagement/index.ts
+3
-1
index.ts
src/views/Root/User/Mixin/index.ts
+24
-27
firstLevel.vue
src/views/Root/User/firstLevel.vue
+1
-15
index.vue
src/views/Root/User/index.vue
+18
-14
No files found.
src/components/UserManage/userTable.vue
View file @
31a9b788
<
template
>
<
template
>
<div
:columns=
"columns"
:role=
"role"
:dataSource=
"dataSource"
>
<div
:columns=
"columns"
:role=
"role"
>
<!-- 调配弹窗 -->
<!-- 调配弹窗 -->
<deplot-modal
ref=
"deployModal"
:level=
"level"
/>
<deplot-modal
ref=
"deployModal"
:level=
"level"
/>
<!-- 信息列表 -->
<!-- 信息列表 -->
...
@@ -11,23 +11,29 @@
...
@@ -11,23 +11,29 @@
:pagination=
"pagination"
:pagination=
"pagination"
@
change=
"changeHandle"
@
change=
"changeHandle"
>
>
<span
slot=
"created_at"
slot-scope=
"text,record"
>
{{
record
.
created_at
|
formatTime
}}
</span>
<span
slot=
"level"
slot-scope=
"text,record"
>
{{
record
.
level
|
filterLevel
}}
</span>
<span
slot=
"status"
slot-scope=
"text,record"
>
<span
slot=
"status"
slot-scope=
"text,record"
>
{{
record
.
status
|
filterStatus
}}
{{
record
.
status
|
filterStatus
}}
</span>
</span>
<!-- 二级分行管理员 -->
<!-- 二级分行管理员 -->
<span
slot=
"secondaryManager"
slot-scope=
"text,record"
>
<a
@
click=
"getSecondaryManageList(record.
key
)"
>
查看
</a>
</span>
<span
slot=
"secondaryManager"
slot-scope=
"text,record"
>
<a
@
click=
"getSecondaryManageList(record.
level
)"
>
查看
</a>
</span>
<!-- 一级支行管理员 -->
<!-- 一级支行管理员 -->
<span
slot=
"firstSubManager"
slot-scope=
"text,record"
>
<a
@
click=
"getfirstSubManageList(record.
key
)"
>
查看
</a>
</span>
<span
slot=
"firstSubManager"
slot-scope=
"text,record"
>
<a
@
click=
"getfirstSubManageList(record.
level
)"
>
查看
</a>
</span>
<!-- 一级支行客户经理 -->
<!-- 一级支行客户经理 -->
<span
slot=
"firstSubClientManager"
slot-scope=
"text,record"
>
<a
@
click=
"getFirstSubClientManagerList(record.
key
)"
>
查看
</a>
</span>
<span
slot=
"firstSubClientManager"
slot-scope=
"text,record"
>
<a
@
click=
"getFirstSubClientManagerList(record.
level
)"
>
查看
</a>
</span>
<!-- 一级支行客户 -->
<!-- 一级支行客户 -->
<span
slot=
"firstSubClient"
slot-scope=
"text,record"
>
<a
@
click=
"getFirstSubClientList(record.
key
)"
>
查看
</a>
</span>
<span
slot=
"firstSubClient"
slot-scope=
"text,record"
>
<a
@
click=
"getFirstSubClientList(record.
level
)"
>
查看
</a>
</span>
<!-- 二级支行管理员 -->
<!-- 二级支行管理员 -->
<span
slot=
"secondarySubManager"
slot-scope=
"text,record"
>
<a
@
click=
"getSecondarySubManagerList(record.
key
)"
>
查看
</a>
</span>
<span
slot=
"secondarySubManager"
slot-scope=
"text,record"
>
<a
@
click=
"getSecondarySubManagerList(record.
level
)"
>
查看
</a>
</span>
<!-- 二级支行客户经理 -->
<!-- 二级支行客户经理 -->
<span
slot=
"secondarySubClientManager"
slot-scope=
"text,record"
>
<a
@
click=
"getSecondarySubClientManageList(record.
key
)"
>
查看
</a>
</span>
<span
slot=
"secondarySubClientManager"
slot-scope=
"text,record"
>
<a
@
click=
"getSecondarySubClientManageList(record.
level
)"
>
查看
</a>
</span>
<!-- 二级支行客户 -->
<!-- 二级支行客户 -->
<span
slot=
"secondarySubClient"
slot-scope=
"text,record"
>
<a
@
click=
"getSecondarySubClientList(record.
key
)"
>
查看
</a>
</span>
<span
slot=
"secondarySubClient"
slot-scope=
"text,record"
>
<a
@
click=
"getSecondarySubClientList(record.
level
)"
>
查看
</a>
</span>
<!-- 操作 -->
<!-- 操作 -->
<p
slot=
"action"
slot-scope=
"text,record"
>
<p
slot=
"action"
slot-scope=
"text,record"
>
<span
v-if=
"record.state!='已禁用'"
>
<span
v-if=
"record.state!='已禁用'"
>
...
@@ -71,13 +77,22 @@ import { eLevel } from "@/types/level"
...
@@ -71,13 +77,22 @@ import { eLevel } from "@/types/level"
import
{
getColumns
}
from
'@/const/columns/userManagerCol'
import
{
getColumns
}
from
'@/const/columns/userManagerCol'
import
{
userModal
}
from
'./const'
import
{
userModal
}
from
'./const'
import
deplotModal
from
"@/components/UserManage/deployModal.vue"
import
deplotModal
from
"@/components/UserManage/deployModal.vue"
import
Filter
from
'@/filter/index'
import
Filter
from
'@/filter/index'
import
{
mapActions
,
mapMutations
,
mapState
}
from
'vuex'
import
Mixin
from
"@/views/Root/User/Mixin/index"
export
default
Vue
.
extend
({
export
default
Vue
.
extend
({
mixins
:
[
Mixin
],
components
:{
deplotModal
},
components
:{
deplotModal
},
filters
:
{
filters
:
{
filterStatus
(
val
:
number
)
{
filterStatus
(
val
:
number
)
{
return
Filter
.
filterUserStatus
(
val
)
return
Filter
.
filterUserStatus
(
val
)
},
formatTime
(
val
:
number
)
{
return
Filter
.
formatDate
(
val
)
},
filterLevel
(
val
:
number
)
{
return
Filter
.
filterLevel
(
val
)
}
}
},
},
props
:{
props
:{
...
@@ -89,24 +104,14 @@ export default Vue.extend({
...
@@ -89,24 +104,14 @@ export default Vue.extend({
type
:
Number
as
PropType
<
eRole
>
,
type
:
Number
as
PropType
<
eRole
>
,
default
:
0
default
:
0
},
},
dataSource
:{
type
:
Array
as
PropType
<
staff
[]
>
,
},
pagination
:
{
type
:
Object
,
default
:
{
current
:
1
,
defaultPageSize
:
10
,
total
:
0
}
}
},
},
data
(){
data
(){
return
{
return
{
show
:
false
,
show
:
false
,
title
:
''
,
title
:
''
,
text
:
''
,
text
:
''
,
type
:
userModal
.
enable
type
:
userModal
.
enable
,
}
}
},
},
computed
:{
computed
:{
...
@@ -115,12 +120,31 @@ export default Vue.extend({
...
@@ -115,12 +120,31 @@ export default Vue.extend({
},
},
columns
(){
columns
(){
return
getColumns
(
this
.
role
)
return
getColumns
(
this
.
role
)
},
pagination
()
{
return
{
current
:
this
.
$store
.
state
.
platformUserManagement
.
page
,
defaultPageSize
:
this
.
$store
.
state
.
platformUserManagement
.
page_size
,
total
:
this
.
$store
.
state
.
platformUserManagement
.
total
}
},
dataSource
()
{
return
this
.
$store
.
state
.
platformUserManagement
.
list
}
}
},
},
methods
:{
methods
:{
...
mapMutations
(
'platformUserManagement'
,
{
platformSave
:
'save'
,
}),
...
mapActions
(
'platformUserManagement'
,
{
platformQuery
:
'queryUser'
,
}),
changeHandle
(
e
:
any
)
{
changeHandle
(
e
:
any
)
{
// console.log(e)
this
.
platformSave
({
this
.
$emit
(
'pageChange'
,
e
.
current
)
page
:
e
.
current
,
})
this
.
platformQuery
()
},
},
deploy
(
record
:
staff
){
deploy
(
record
:
staff
){
(
this
.
$refs
.
deployModal
as
any
).
showModal
()
(
this
.
$refs
.
deployModal
as
any
).
showModal
()
...
@@ -163,34 +187,54 @@ export default Vue.extend({
...
@@ -163,34 +187,54 @@ export default Vue.extend({
},
},
// 二级分行管理员
// 二级分行管理员
getSecondaryManageList
(
key
:
string
){
getSecondaryManageList
(
key
:
string
){
this
.
$router
.
push
({
name
:
'secondary'
,
query
:{
key
}})
this
.
platformSave
({
page
:
1
})
this
.
$router
.
push
({
name
:
'secondary'
,
query
:{
level
:
key
,
rankVal
:
this
.
$route
.
query
.
rankVal
}})
},
},
// 一级支行管理员
// 一级支行管理员
getfirstSubManageList
(
key
:
string
){
getfirstSubManageList
(
key
:
string
){
this
.
$router
.
push
({
name
:
'firstSub'
,
query
:{
key
}})
this
.
platformSave
({
console
.
log
(
key
)
page
:
1
})
this
.
$router
.
push
({
name
:
'firstSub'
,
query
:{
level
:
key
,
rankVal
:
this
.
$route
.
query
.
rankVal
}})
},
},
// 一级支行客户经理
// 一级支行客户经理
getFirstSubClientManagerList
(
key
:
string
){
getFirstSubClientManagerList
(
key
:
string
){
this
.
$router
.
push
({
name
:
'firstSubClientManager'
,
query
:{
key
}})
this
.
platformSave
({
page
:
1
})
this
.
$router
.
push
({
name
:
'firstSubClientManager'
,
query
:{
level
:
key
,
rankVal
:
this
.
$route
.
query
.
rankVal
}})
},
},
// 一级支行客户
// 一级支行客户
getFirstSubClientList
(
key
:
string
){
getFirstSubClientList
(
key
:
string
){
this
.
$router
.
push
({
name
:
'firstSubClient'
,
query
:{
key
}})
this
.
platformSave
({
page
:
1
})
this
.
$router
.
push
({
name
:
'firstSubClient'
,
query
:{
level
:
key
,
rankVal
:
this
.
$route
.
query
.
rankVal
}})
},
},
// 二级支行管理员
// 二级支行管理员
getSecondarySubManagerList
(
key
:
string
){
getSecondarySubManagerList
(
key
:
string
){
this
.
$router
.
push
({
name
:
'secondarySub'
,
query
:{
key
}})
this
.
platformSave
({
page
:
1
})
this
.
$router
.
push
({
name
:
'secondarySub'
,
query
:{
level
:
key
,
rankVal
:
this
.
$route
.
query
.
rankVal
}})
},
},
// 二级支行客户经理
// 二级支行客户经理
getSecondarySubClientManageList
(
key
:
string
){
getSecondarySubClientManageList
(
key
:
string
){
this
.
$router
.
push
({
name
:
'secondarySubClientManager'
,
query
:{
key
}})
this
.
platformSave
({
page
:
1
})
this
.
$router
.
push
({
name
:
'secondarySubClientManager'
,
query
:{
level
:
key
,
rankVal
:
this
.
$route
.
query
.
rankVal
}})
},
},
// 二级支行客户
// 二级支行客户
getSecondarySubClientList
(
key
:
string
){
getSecondarySubClientList
(
key
:
string
){
this
.
$router
.
push
({
name
:
'secondarySubClient'
,
query
:{
key
}})
this
.
platformSave
({
page
:
1
})
this
.
$router
.
push
({
name
:
'secondarySubClient'
,
query
:{
level
:
key
,
rankVal
:
this
.
$route
.
query
.
rankVal
}})
},
},
}
}
,
})
})
</
script
>
</
script
>
...
...
src/const/columns/userManagerCol.ts
View file @
31a9b788
...
@@ -6,6 +6,7 @@ const columns:Array<column> =
...
@@ -6,6 +6,7 @@ const columns:Array<column> =
title
:
'创建日期'
,
title
:
'创建日期'
,
align
:
'center'
,
align
:
'center'
,
dataIndex
:
'created_at'
,
dataIndex
:
'created_at'
,
scopedSlots
:
{
customRender
:
'created_at'
},
role
:[
role
:[
eRole
.
superManager
,
eRole
.
superManager
,
eRole
.
firstLevel_branch
,
eRole
.
firstLevel_branch
,
...
@@ -76,6 +77,7 @@ const columns:Array<column> =
...
@@ -76,6 +77,7 @@ const columns:Array<column> =
title
:
'所在机构层级'
,
title
:
'所在机构层级'
,
align
:
'center'
,
align
:
'center'
,
dataIndex
:
'level'
,
dataIndex
:
'level'
,
scopedSlots
:
{
customRender
:
'level'
},
role
:[
role
:[
eRole
.
superManager
,
eRole
.
superManager
,
eRole
.
firstLevel_branch
,
eRole
.
firstLevel_branch
,
...
@@ -89,7 +91,7 @@ const columns:Array<column> =
...
@@ -89,7 +91,7 @@ const columns:Array<column> =
{
{
title
:
'所属二级支行'
,
title
:
'所属二级支行'
,
align
:
'center'
,
align
:
'center'
,
dataIndex
:
'second
ary
_sub_branch'
,
dataIndex
:
'second_sub_branch'
,
role
:[
role
:[
eRole
.
secondary_sub_branch
,
eRole
.
secondary_sub_branch
,
eRole
.
secondary_sub_clientManager
,
eRole
.
secondary_sub_clientManager
,
...
@@ -98,7 +100,7 @@ const columns:Array<column> =
...
@@ -98,7 +100,7 @@ const columns:Array<column> =
{
{
title
:
'所属一级支行'
,
title
:
'所属一级支行'
,
align
:
'center'
,
align
:
'center'
,
dataIndex
:
'first
Level
_sub_branch'
,
dataIndex
:
'first_sub_branch'
,
role
:[
role
:[
eRole
.
firstLevel_sub_branch
,
eRole
.
firstLevel_sub_branch
,
eRole
.
secondary_sub_branch
,
eRole
.
secondary_sub_branch
,
...
@@ -109,7 +111,7 @@ const columns:Array<column> =
...
@@ -109,7 +111,7 @@ const columns:Array<column> =
{
{
title
:
'所属二级分行'
,
title
:
'所属二级分行'
,
align
:
'center'
,
align
:
'center'
,
dataIndex
:
'second
ary
_branch'
,
dataIndex
:
'second_branch'
,
role
:[
role
:[
eRole
.
secondary_branch
,
eRole
.
secondary_branch
,
eRole
.
firstLevel_sub_branch
,
eRole
.
firstLevel_sub_branch
,
...
@@ -121,7 +123,7 @@ const columns:Array<column> =
...
@@ -121,7 +123,7 @@ const columns:Array<column> =
{
{
title
:
'所属一级分行'
,
title
:
'所属一级分行'
,
align
:
'center'
,
align
:
'center'
,
dataIndex
:
'first
Level
_branch'
,
dataIndex
:
'first_branch'
,
role
:[
role
:[
eRole
.
firstLevel_branch
,
eRole
.
firstLevel_branch
,
eRole
.
secondary_branch
,
eRole
.
secondary_branch
,
...
...
src/filter/index.ts
View file @
31a9b788
...
@@ -3,6 +3,7 @@ import { eUserStatus } from '@/types/user'
...
@@ -3,6 +3,7 @@ import { eUserStatus } from '@/types/user'
import
{
editableProductStatus
,
eGuaranteeType
,
eProductType
}
from
'@/types/loanProduct'
import
{
editableProductStatus
,
eGuaranteeType
,
eProductType
}
from
'@/types/loanProduct'
import
{
activityStatus
}
from
"@/service/ActivityService/type"
import
{
activityStatus
}
from
"@/service/ActivityService/type"
import
moment
from
'moment'
import
moment
from
'moment'
import
{
eLevel
}
from
'@/types/level'
export
default
{
export
default
{
formatDate
(
timeStamp
:
number
)
{
formatDate
(
timeStamp
:
number
)
{
...
@@ -95,6 +96,20 @@ export default {
...
@@ -95,6 +96,20 @@ export default {
return
'已发布'
return
'已发布'
}
}
},
},
filterLevel
(
level
:
eLevel
)
{
switch
(
level
)
{
case
eLevel
.
firstLevel_branch
:
return
'一级分行'
case
eLevel
.
firstLevel_sub_branch
:
return
'一级支行'
case
eLevel
.
secondary_branch
:
return
'二级分行'
case
eLevel
.
secondary_sub_branch
:
return
'二级支行'
default
:
return
false
}
},
filterWorkDay
(
weekend_status
:
number
){
filterWorkDay
(
weekend_status
:
number
){
const
silly
=
'周一至周五'
const
silly
=
'周一至周五'
if
(
weekend_status
===
0
){
if
(
weekend_status
===
0
){
...
...
src/service/StaffService/index.ts
View file @
31a9b788
...
@@ -128,6 +128,7 @@ export default class StaffService {
...
@@ -128,6 +128,7 @@ export default class StaffService {
return
baseAxios
({
return
baseAxios
({
url
:
'/staff/query'
,
url
:
'/staff/query'
,
method
:
'get'
,
method
:
'get'
,
params
:
data
})
})
}
}
...
...
src/store/platformUserManagement/index.ts
View file @
31a9b788
...
@@ -49,6 +49,7 @@ export default <Module<iPlatformModuleState, {}>>{
...
@@ -49,6 +49,7 @@ export default <Module<iPlatformModuleState, {}>>{
},
},
async
queryUser
({
state
,
commit
},
payload
)
{
async
queryUser
({
state
,
commit
},
payload
)
{
state
.
loading
=
true
state
.
loading
=
true
console
.
log
(
state
)
StaffService
.
getInstance
().
queryStaff
({
StaffService
.
getInstance
().
queryStaff
({
end
:
state
.
end
,
end
:
state
.
end
,
first_branch
:
state
.
firstBranch
,
first_branch
:
state
.
firstBranch
,
...
@@ -60,7 +61,8 @@ export default <Module<iPlatformModuleState, {}>>{
...
@@ -60,7 +61,8 @@ export default <Module<iPlatformModuleState, {}>>{
second_branch
:
state
.
secondBranch
,
second_branch
:
state
.
secondBranch
,
second_sub_branch
:
state
.
secondSubBranch
,
second_sub_branch
:
state
.
secondSubBranch
,
start
:
state
.
start
,
start
:
state
.
start
,
user_name
:
state
.
userName
user_name
:
state
.
userName
,
level
:
state
.
level
}).
then
(
res
=>
{
}).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
if
(
res
.
code
===
200
)
{
commit
(
'save'
,
{
commit
(
'save'
,
{
...
...
src/views/Root/User/Mixin/index.ts
View file @
31a9b788
import
Vue
,
{
PropType
}
from
"vue"
import
Vue
,
{
PropType
}
from
"vue"
import
{
staff
}
from
'@/types/staff'
import
StaffService
from
'@/service/StaffService/index'
import
StaffService
from
'@/service/StaffService/index'
import
{
eLevel
}
from
"@/types/level"
import
{
eLevel
}
from
"@/types/level"
import
{
mapActions
,
mapMutations
,
mapState
}
from
'vuex'
import
{
mapActions
,
mapMutations
,
mapState
}
from
'vuex'
...
@@ -9,12 +8,6 @@ const staff = new StaffService()
...
@@ -9,12 +8,6 @@ const staff = new StaffService()
export
default
Vue
.
extend
({
export
default
Vue
.
extend
({
data
()
{
data
()
{
return
{
return
{
// dataSource: [] as PropType<staff[]>,
// pagination: {
// current: 1,
// defaultPageSize: 10,
// total: 0
// }
}
}
},
},
methods
:
{
methods
:
{
...
@@ -24,34 +17,38 @@ export default Vue.extend({
...
@@ -24,34 +17,38 @@ export default Vue.extend({
...
mapActions
(
'platformUserManagement'
,
{
...
mapActions
(
'platformUserManagement'
,
{
platformQuery
:
'queryUser'
,
platformQuery
:
'queryUser'
,
}),
}),
getLevel
(
s
:
string
)
{
//
getLevel(s: string) {
switch
(
s
)
{
//
switch(s) {
case
'1'
:
//
case '1':
return
eLevel
.
firstLevel_branch
//
return eLevel.firstLevel_branch
case
'2'
:
//
case '2':
return
eLevel
.
secondary_branch
//
return eLevel.secondary_branch
case
'3'
:
//
case '3':
return
eLevel
.
firstLevel_sub_branch
//
return eLevel.firstLevel_sub_branch
default
:
//
default:
return
eLevel
.
secondary_sub_branch
//
return eLevel.secondary_sub_branch
}
//
}
},
//
},
getLists
(
params
:
any
)
{
getLists
(
params
:
any
)
{
const
level
=
this
.
$route
.
query
.
level
as
string
// const keys = JSON.parse(this.$route.query.rankVal as string)
const
_level
=
this
.
getLevel
(
level
)
// const level = keys.length + ''
// const _level = this.getLevel(level)
this
.
platformSave
({
this
.
platformSave
({
page
:
1
,
...
params
})
})
this
.
platformQuery
()
this
.
platformQuery
()
}
}
},
},
created
()
{
created
()
{
const
keys
=
JSON
.
parse
(
this
.
$route
.
query
.
level
as
string
)
const
keys
=
JSON
.
parse
(
this
.
$route
.
query
.
rankVal
as
string
)
const
level
=
this
.
$route
.
query
.
level
const
params
=
{
const
params
=
{
first_branch
:
+
keys
[
0
]
||
undefined
,
firstBranch
:
+
keys
[
0
]
||
undefined
,
first_sub_branch
:
+
keys
[
1
]
||
undefined
,
firstSubBranch
:
+
keys
[
1
]
||
undefined
,
second_branch
:
+
keys
[
2
]
||
undefined
,
secondBranch
:
+
keys
[
2
]
||
undefined
,
second_sub_branch
:
+
keys
[
3
]
||
undefined
,
secondSubBranch
:
+
keys
[
3
]
||
undefined
,
level
}
}
this
.
getLists
(
params
)
this
.
getLists
(
params
)
}
}
...
...
src/views/Root/User/firstLevel.vue
View file @
31a9b788
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<div>
<div>
<p
class=
" text-2xl font-bold mb-5"
>
浙江省分行信息
</p>
<p
class=
" text-2xl font-bold mb-5"
>
浙江省分行信息
</p>
<top-bar
:level=
"level"
/>
<top-bar
:level=
"level"
/>
<user-table
:level=
"level"
:role=
"role"
:dataSource=
"dataSource"
:pagination=
"pagination"
@
pageChange=
"pageChange"
/>
<user-table
:level=
"level"
:role=
"role"
/>
</div>
</div>
</
template
>
</
template
>
<
script
lang=
"ts"
>
<
script
lang=
"ts"
>
...
@@ -13,11 +13,9 @@ import userTable from "@/components/UserManage/userTable.vue"
...
@@ -13,11 +13,9 @@ import userTable from "@/components/UserManage/userTable.vue"
import
{
staff
}
from
'@/types/staff'
import
{
staff
}
from
'@/types/staff'
import
{
eRole
}
from
"@/types/role"
import
{
eRole
}
from
"@/types/role"
import
{
firstLevelManager
}
from
"@/mock/index"
import
{
firstLevelManager
}
from
"@/mock/index"
import
mixin
from
'./Mixin/index'
export
default
Vue
.
extend
({
export
default
Vue
.
extend
({
components
:{
TopBar
,
userTable
},
components
:{
TopBar
,
userTable
},
mixins
:
[
mixin
],
data
()
{
data
()
{
return
{
return
{
// dataSource: [] as PropType
<
staff
[]
>
// dataSource: [] as PropType
<
staff
[]
>
...
@@ -32,17 +30,6 @@ export default Vue.extend({
...
@@ -32,17 +30,6 @@ export default Vue.extend({
type
:
Number
as
PropType
<
eRole
>
,
type
:
Number
as
PropType
<
eRole
>
,
default
:
eRole
.
firstLevel_branch
default
:
eRole
.
firstLevel_branch
},
},
// dataSource:{
// type: Array as PropType
<
staff
[]
>
,
// default(){
// return firstLevelManager
// }
// }
},
},
methods
:
{
pageChange
(
v
:
number
)
{
this
.
pagination
.
current
=
v
}
}
});
});
</
script
>
</
script
>
\ No newline at end of file
src/views/Root/User/index.vue
View file @
31a9b788
...
@@ -111,20 +111,24 @@ export default Vue.extend({
...
@@ -111,20 +111,24 @@ export default Vue.extend({
}
}
// this.$router.push({name:'firstLevel'})
// this.$router.push({name:'firstLevel'})
},
},
selectTables
(
arr
:
Array
<
string
>
)
{
selectTables
(
arr
:
Array
<
string
>|
string
)
{
const
count
=
arr
.
length
if
(
typeof
arr
===
'string'
)
{
switch
(
count
)
{
this
.
$router
.
push
({
path
:
'/backend/user/secondarySub'
,
query
:
{
rankVal
:
arr
}})
case
1
:
}
else
{
this
.
$router
.
push
({
path
:
'/backend/user/firstLevel'
,
query
:
{
level
:
JSON
.
stringify
(
arr
)
}})
const
count
=
arr
.
length
break
switch
(
count
)
{
case
2
:
case
1
:
this
.
$router
.
push
({
path
:
'/backend/user/secondary'
,
query
:
{
level
:
JSON
.
stringify
(
arr
)
}})
this
.
$router
.
push
({
path
:
'/backend/user/firstLevel'
,
query
:
{
rankVal
:
JSON
.
stringify
(
arr
)
}})
break
break
case
3
:
case
2
:
this
.
$router
.
push
({
path
:
'/backend/user/firstSub'
,
query
:
{
level
:
JSON
.
stringify
(
arr
)
}})
this
.
$router
.
push
({
path
:
'/backend/user/secondary'
,
query
:
{
rankVal
:
JSON
.
stringify
(
arr
)
}})
break
break
case
4
:
case
3
:
this
.
$router
.
push
({
path
:
'/backend/user/secondarySub'
,
query
:
{
level
:
JSON
.
stringify
(
arr
)
}})
this
.
$router
.
push
({
path
:
'/backend/user/firstSub'
,
query
:
{
rankVal
:
JSON
.
stringify
(
arr
)
}})
break
case
4
:
this
.
$router
.
push
({
path
:
'/backend/user/secondarySub'
,
query
:
{
rankVal
:
JSON
.
stringify
(
arr
)
}})
}
}
}
},
},
reset
(){
reset
(){
...
...
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