Переглянути джерело

设置用户的登陆业务线

wangziqian 4 роки тому
батько
коміт
530ec74f86

+ 0 - 3
src/layout/components/Navbar.vue

@@ -155,9 +155,6 @@ export default {
     changeBizId(type) { // 更改业务线
       this.$router.push({ name: '业务线选择' })
     },
-    async settingUserSetBiz(bizId) { // 设置成员登录业务线
-      await settingUserSetBiz({ bizId: bizId })
-    },
     async getLoginMember() { // 获取登录人员信息
       const res = await memberGetLoginInMemberInfoByLdap()
       this.options = res.data

+ 5 - 1
src/views/business/bizIdSelect.vue

@@ -26,7 +26,7 @@
 import { mapGetters } from 'vuex'
 import { needIdList } from '@/router/needIdList'
 import { EncryptId } from '@/utils/crypto-js.js'
-import { settingGetBizList } from '@/api/projectIndex'
+import { settingGetBizList, settingUserSetBiz } from '@/api/projectIndex'
 let fromRoute = null
 export default {
   data() {
@@ -61,11 +61,15 @@ export default {
         this.bizSelectList = this.originBizList.slice((this.curIndex - 1) * 5, this.curIndex * 5)
       }
     },
+    async settingUserSetBiz(bizId) { // 设置成员登录业务线
+      await settingUserSetBiz({ bizId: bizId })
+    },
     handleCurrentChange() {
       this.bizSelectList = this.originBizList.slice((this.curIndex - 1) * 5, this.curIndex * 5)
     },
     enter(biz) {
       this.$store.dispatch('data/setBizId', biz.code)
+      this.settingUserSetBiz(biz.code)
       if (!fromRoute || !fromRoute.name) {
         this.$router.push({ name: '项目', query: { bizId: EncryptId(biz.code) }})
         return