|
@@ -254,6 +254,7 @@ img.img-arrow {
|
|
|
import { mapGetters } from 'vuex'
|
|
|
import FloatMenu from './floatMenu'
|
|
|
import { logoutUrl } from '@/apiConfig/requestIP.js'
|
|
|
+import { settingUserGetBiz } from '@/api/projectIndex'
|
|
|
|
|
|
export default {
|
|
|
components: {
|
|
@@ -288,7 +289,17 @@ export default {
|
|
|
})()
|
|
|
}
|
|
|
},
|
|
|
+ created() {
|
|
|
+ this.settingUserGetBiz()
|
|
|
+ },
|
|
|
methods: {
|
|
|
+ async settingUserGetBiz() { // 获取人员默认业务线
|
|
|
+ const res = await settingUserGetBiz()
|
|
|
+ if (res.code === 200 && res.data) {
|
|
|
+ this.$store.dispatch('data/setBizId', res.data.bizId)
|
|
|
+ localStorage.setItem('bizId', res.data.bizId)
|
|
|
+ }
|
|
|
+ },
|
|
|
handleSelect(key, keyPath) {
|
|
|
switch (key) {
|
|
|
case '1':
|
|
@@ -301,8 +312,11 @@ export default {
|
|
|
this.$router.push({ name: 'jar包管理' })
|
|
|
break
|
|
|
case '4' :
|
|
|
- if (this.bizId === -1) this.$router.push({ name: '业务线选择' })
|
|
|
- this.$router.push({ name: '项目' })
|
|
|
+ if (!this.bizId || this.bizId === -1) {
|
|
|
+ this.$router.push({ name: '业务线选择' })
|
|
|
+ } else {
|
|
|
+ this.$router.push({ name: '项目' })
|
|
|
+ }
|
|
|
break
|
|
|
case '6':
|
|
|
this.$router.push({ name: '单车' })
|