Commit 7fafea92 authored by xhx's avatar xhx

接口参数调整

parent 7f979919
......@@ -21,17 +21,17 @@
{{ record.status | filterStatus }}
</span>
<!-- 二级分行管理员 -->
<span slot="secondaryManager" slot-scope="text,record"> <a @click="getSecondaryManageList(record.level, 1)">查看</a> </span>
<span slot="secondaryManager" slot-scope="text,record"> <a @click="getSecondaryManageList(record.level, record.uuid, 1)">查看</a> </span>
<!-- 一级支行管理员 -->
<span slot="firstSubManager" slot-scope="text,record"> <a @click="getfirstSubManageList(record.level, 1)">查看</a> </span>
<span slot="firstSubManager" slot-scope="text,record"> <a @click="getfirstSubManageList(record.level, record.uuid, 1)">查看</a> </span>
<!-- 一级支行客户经理(无) -->
<span slot="firstSubClientManager" slot-scope="text,record"> <a @click="getFirstSubClientManagerList(record.level)">查看</a> </span>
<span slot="firstSubClientManager" slot-scope="text,record"> <a @click="getFirstSubClientManagerList(record.level, record.uuid)">查看</a> </span>
<!-- 一级支行客户 -->
<span slot="firstSubClient" slot-scope="text,record"> <a @click="getFirstSubClientList(record.uuid)">查看</a> </span>
<!-- 二级支行管理员 -->
<span slot="secondarySubManager" slot-scope="text,record"> <a @click="getSecondarySubManagerList(record.level, 1)">查看</a> </span>
<span slot="secondarySubManager" slot-scope="text,record"> <a @click="getSecondarySubManagerList(record.level, record.uuid, 1)">查看</a> </span>
<!-- 二级支行客户经理 -->
<span slot="secondarySubClientManager" slot-scope="text,record"> <a @click="getSecondarySubClientManageList(record.level)">查看</a> </span>
<span slot="secondarySubClientManager" slot-scope="text,record"> <a @click="getSecondarySubClientManageList(record.level, record.uuid)">查看</a> </span>
<!-- 二级支行客户 -->
<span slot="secondarySubClient" slot-scope="text,record"> <a @click="getSecondarySubClientList(record.uuid)">查看</a> </span>
<!-- 操作 -->
......@@ -74,7 +74,7 @@ import Vue, { PropType } from "vue"
import { firstLevelManager } from '@/mock/index'
import { staff } from '@/types/staff'
import { eUserStatusAction, eUserStatus } from '@/types/user'
import { eRole } from "@/types/role"
import { eRole, eNewRoleRelatedToBackEnd } from "@/types/role"
import { eLevel } from "@/types/level"
import { getColumns } from '@/const/columns/userManagerCol'
import { userModal } from './const'
......@@ -149,17 +149,22 @@ export default Vue.extend({
}),
...mapActions('platformUserManagement', {
platformQuery: 'queryUser',
platform: 'queryNext'
}),
getRouteQuery() {
if (this.$route.query.rankVal) {
const keys = JSON.parse(this.$route.query.rankVal as string)
const level = this.$route.query.level
const uuid = this.$route.query.uuid
const role = this.$route.query.role
this.params = {
firstBranch: +keys[0]?.value || undefined,
firstSubBranch: +keys[2]?.value || undefined,
secondBranch: +keys[1]?.value || undefined,
secondSubBranch: +keys[3]?.value || undefined,
level
level,
uuid,
role
}
} else {
this.params = {
......@@ -171,7 +176,12 @@ export default Vue.extend({
this.platformSave({
...this.params
})
const uuid = this.$route.query.uuid
if (uuid) {
this.platform()
} else {
this.platformQuery()
}
},
changeHandle(e: any) {
this.platformSave({
......@@ -234,25 +244,28 @@ export default Vue.extend({
this.show = false
},
// 二级分行管理员
getSecondaryManageList(key:string){
getSecondaryManageList(key:string, uuid: string, count: number){
const role = count === 1 ? eNewRoleRelatedToBackEnd.Management : eNewRoleRelatedToBackEnd.ACM
this.platformSave({
page: 1
})
this.$router.push({name:'secondary',query:{level: key, rankVal: this.$route.query.rankVal}})
this.$router.push({name:'secondary',query:{level: key, rankVal: this.$route.query.rankVal, uuid, role}})
},
// 一级支行管理员
getfirstSubManageList(key:string){
getfirstSubManageList(key:string, uuid: string, count: number){
const role = count === 1 ? eNewRoleRelatedToBackEnd.Management : eNewRoleRelatedToBackEnd.ACM
this.platformSave({
page: 1
})
this.$router.push({name:'firstSub',query:{level: key, rankVal: this.$route.query.rankVal}})
this.$router.push({name:'firstSub',query:{level: key, rankVal: this.$route.query.rankVal, uuid, role}})
},
// 一级支行客户经理(无)
getFirstSubClientManagerList(key:string){
// 一级支行客户经理
getFirstSubClientManagerList(key:string,uuid: string, count: number){
const role = count === 1 ? eNewRoleRelatedToBackEnd.Management : eNewRoleRelatedToBackEnd.ACM
this.platformSave({
page: 1
})
this.$router.push({name:'firstSubClientManager',query:{level: key, rankVal: this.$route.query.rankVal}})
this.$router.push({name:'firstSubClientManager',query:{level: key, rankVal: this.$route.query.rankVal, uuid, role}})
},
// 一级支行客户
getFirstSubClientList(uuid:string){
......@@ -262,18 +275,20 @@ export default Vue.extend({
this.$router.push({name:'firstSubClient',query:{uuid}})
},
// 二级支行管理员
getSecondarySubManagerList(key:string){
getSecondarySubManagerList(key:string, uuid: string, count: number){
const role = count === 1 ? eNewRoleRelatedToBackEnd.Management : eNewRoleRelatedToBackEnd.ACM
this.platformSave({
page: 1
})
this.$router.push({name:'secondarySub',query:{level: key, rankVal: this.$route.query.rankVal}})
this.$router.push({name:'secondarySub',query:{level: key, rankVal: this.$route.query.rankVal, uuid, role}})
},
// 二级支行客户经理
getSecondarySubClientManageList(key:string){
getSecondarySubClientManageList(key:string, uuid:string, count: number){
const role = count === 1 ? eNewRoleRelatedToBackEnd.Management : eNewRoleRelatedToBackEnd.ACM
this.platformSave({
page: 1
})
this.$router.push({name:'secondarySubClientManager',query:{level: key, rankVal: this.$route.query.rankVal}})
this.$router.push({name:'secondarySubClientManager',query:{level: key, rankVal: this.$route.query.rankVal, uuid, role}})
},
// 二级支行客户
getSecondarySubClientList(uuid:string){
......
......@@ -154,13 +154,24 @@ export default class StaffService {
})
}
getNextLevel(data: {
uuid: string,
role: string
}) {
return baseAxios({
url: '/staff/next_level',
method: 'get',
params: data
})
}
getStaffList(data: {
page: number,
page_size: number,
uuid: string
}) {
return baseAxios({
url: '/staff/users',
url: '/staff/query/users',
method: 'get',
params: data
})
......
......@@ -22,6 +22,8 @@ export default <Module<iPlatformModuleState, {}>>{
userName: '',
total: 0,
loading: false,
uuid: '',
role: ''
},
mutations: {
save(state, payload) {
......@@ -72,6 +74,21 @@ export default <Module<iPlatformModuleState, {}>>{
}
state.loading = false
})
},
async queryNext({ state, commit }, payload) {
state.loading = true
StaffService.getInstance().getNextLevel({
uuid: state.uuid,
role: state.role
}).then(res => {
if (res.code === 200) {
commit('save', {
list: res.data.item,
total: res.data.total
})
}
state.loading = false
})
}
},
}
......@@ -31,5 +31,7 @@ export interface iPlatformModuleState {
start: number | undefined
userName: string,
total: number
loading: boolean
loading: boolean,
uuid: string,
role: string
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment