|
@@ -36,21 +36,35 @@ export default {
|
|
|
immediate: true
|
|
|
}
|
|
|
},
|
|
|
- created() {
|
|
|
- this.settingUserGetBiz()
|
|
|
- },
|
|
|
+ // 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)
|
|
|
- }
|
|
|
- } else {
|
|
|
- this.showpage = true
|
|
|
- }
|
|
|
- },
|
|
|
+ // async settingUserGetBiz() { // 刷新页面
|
|
|
+ // // const bizId_id = analysisBizId_id(this.$route.query.bizId_id)
|
|
|
+ // let decodeBizId = ''
|
|
|
+ // const { bizId = null, bizId_id = null } = this.$route.query
|
|
|
+ // if(this.$route.query.bizId) {
|
|
|
+ // decodeBizId = desDecryptId(bizId)
|
|
|
+ // } else if(this.$route.query.bizId_id){
|
|
|
+ // decodeBizId = analysisBizId_id(bizId_id)[0]
|
|
|
+ // } else {
|
|
|
+ // const res = await settingUserGetBiz()
|
|
|
+ // if (res.code === 200) {
|
|
|
+ // // this.showpage = true
|
|
|
+ // // this.$store.dispatch('global/setBizId', res.data.bizId)
|
|
|
+ // decodeBizId = res.data.bizId
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // console.log(decodeBizId)
|
|
|
+ // this.showpage = true
|
|
|
+ // this.$store.dispatch('global/setBizId', decodeBizId)
|
|
|
+ // // console.log(this.$route.query, bizId_id)
|
|
|
+ // // if (this.$store.state.global.bizId === -1) {
|
|
|
+ // // } else {
|
|
|
+ // // this.showpage = true
|
|
|
+ // // }
|
|
|
+ // },
|
|
|
// 获取业务线列表
|
|
|
async settingGetBizList() {
|
|
|
const res = await settingGetBizList({})
|
|
@@ -69,9 +83,10 @@ export default {
|
|
|
// 如果已存在业务线ID(第一优先级)
|
|
|
if (this.bizId !== -1) this.redirectPage()
|
|
|
// 业务线不存在,但是url上面带bizId或者bizId_id的(第二优先级)
|
|
|
- if (this.$route.query.bizId || this.$route.query.bizId_id) this.handlerPage()
|
|
|
+ if (this.$route.query.bizId || this.$route.query.bizId_id) await this.handlerPage()
|
|
|
// 如果前往路由中参数中bizId和bizId_id都不存在,去获取默认bizId(第三优先级)
|
|
|
- if (!to.query.bizId && !to.query.bizId_id) this.getDefaultBizId()
|
|
|
+ if (!to.query.bizId && !to.query.bizId_id) await this.getDefaultBizId()
|
|
|
+ this.showpage = true
|
|
|
},
|
|
|
// 页面路由替换(增加bizId参数,只替换非详情页)
|
|
|
redirectPage() {
|