|
@@ -8,7 +8,7 @@
|
|
|
'no-sidebar': !showNavTag
|
|
|
}"
|
|
|
>
|
|
|
- <div class="main-wrapper" @click="listenClick">
|
|
|
+ <div v-if="showpage" class="main-wrapper" @click="listenClick">
|
|
|
<router-view />
|
|
|
</div>
|
|
|
</div>
|
|
@@ -21,7 +21,8 @@ import { settingGetBizList, settingUserGetBiz } from '@/api/projectIndex'
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
- bizIdList: [] // 业务线列表
|
|
|
+ bizIdList: [], // 业务线列表
|
|
|
+ showpage: false
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -35,7 +36,19 @@ export default {
|
|
|
immediate: true
|
|
|
}
|
|
|
},
|
|
|
+ created() {
|
|
|
+ this.settingUserGetBiz()
|
|
|
+ },
|
|
|
methods: {
|
|
|
+ async settingUserGetBiz() { // 刷新页面
|
|
|
+ if (this.$store.state.global.bizId === -1) {
|
|
|
+ const res = await settingUserGetBiz()
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.showpage = true
|
|
|
+ this.$store.dispatch('global/setBizId', res.data.bizId)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
// 获取业务线列表
|
|
|
async settingGetBizList() {
|
|
|
const res = await settingGetBizList({})
|