|
|
@ -1,5 +1,5 @@ |
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<view class="page"> |
|
|
|
<view :class="['page', {oh: !per}]"> |
|
|
|
<image class="bg" src="@/static/image/index/index2.png" mode="widthFix"></image> |
|
|
|
<image class="bg" src="@/static/image/index/index2.png" mode="widthFix"></image> |
|
|
|
<view class="team"> |
|
|
|
<view class="team"> |
|
|
|
<uni-data-picker class="picker-input" placeholder="切换团队" popup-title="切换团队" preload :clear-icon="false" :localdata="list" :map="{text: 'partnerClassificationName', value: 'teamId'}" v-model="teamId" @change="teamChange"></uni-data-picker> |
|
|
|
<uni-data-picker class="picker-input" placeholder="切换团队" popup-title="切换团队" preload :clear-icon="false" :localdata="list" :map="{text: 'partnerClassificationName', value: 'teamId'}" v-model="teamId" @change="teamChange"></uni-data-picker> |
|
|
@ -103,6 +103,7 @@ |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
<script> |
|
|
|
|
|
|
|
import { getUserRolesPermissionMenu } from '@/apis/modules/user.js' |
|
|
|
import { getTeamsByAccountId, getTheBusinessManagerIdsUnderTheTeam } from '@/apis/modules/client.js' |
|
|
|
import { getTeamsByAccountId, getTheBusinessManagerIdsUnderTheTeam } from '@/apis/modules/client.js' |
|
|
|
import { treeList } from '@/apis/modules/parner.js' |
|
|
|
import { treeList } from '@/apis/modules/parner.js' |
|
|
|
export default { |
|
|
|
export default { |
|
|
@ -116,7 +117,7 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
onShow() { |
|
|
|
onShow() { |
|
|
|
this.initRole() |
|
|
|
this.getAuth() |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
// 初始化权限 |
|
|
|
// 初始化权限 |
|
|
@ -127,6 +128,25 @@ |
|
|
|
this.getInfo() |
|
|
|
this.getInfo() |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
// 查询当前角色权限 |
|
|
|
|
|
|
|
getAuth() { |
|
|
|
|
|
|
|
uni.getStorageSync('token') && getUserRolesPermissionMenu({ |
|
|
|
|
|
|
|
platformId: 4 |
|
|
|
|
|
|
|
}).then(({ permissionMenu }) => { |
|
|
|
|
|
|
|
const auth = [] |
|
|
|
|
|
|
|
const generateAuth = (list, parent) => { |
|
|
|
|
|
|
|
list.map(e => { |
|
|
|
|
|
|
|
const name = `${parent ? parent + ':' : ''}${e.name}` |
|
|
|
|
|
|
|
auth.push(name) |
|
|
|
|
|
|
|
generateAuth(e.children, name) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
generateAuth(permissionMenu[0].children, '') |
|
|
|
|
|
|
|
console.log(333, auth) |
|
|
|
|
|
|
|
uni.setStorageSync('auth', auth) |
|
|
|
|
|
|
|
this.initRole() |
|
|
|
|
|
|
|
}).catch(e => {}) |
|
|
|
|
|
|
|
}, |
|
|
|
// 获取团队 |
|
|
|
// 获取团队 |
|
|
|
getInfo() { |
|
|
|
getInfo() { |
|
|
|
getTeamsByAccountId().then(({ data }) => { |
|
|
|
getTeamsByAccountId().then(({ data }) => { |
|
|
@ -295,4 +315,7 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.oh { |
|
|
|
|
|
|
|
overflow: hidden; |
|
|
|
|
|
|
|
} |
|
|
|
</style> |
|
|
|
</style> |
|
|
|