فهرست منبع

业务线+布局

princeLee 4 سال پیش
والد
کامیت
eab4c85b9b

+ 325 - 0
src/components/newLayout/Aside.vue

@@ -0,0 +1,325 @@
+<template>
+  <div>
+    <section
+      v-show="showNavTag"
+      :class="{
+        'left-aside': !collapsed && navTagType === 1,
+        'hidden-left-aside': collapsed && navTagType === 1,
+        'top-aside': navTagType === 2
+      }"
+    >
+      <div class="business">
+        <div
+          class="business-select"
+          :class="{ 'show-business-all': showBizIdSelect }"
+          @click="handleClickRouter({ name: '业务线选择' })"
+          @mouseenter="showBizIdSelect = true"
+          @mouseleave="showBizIdSelect = false"
+        >
+          <i class="el-icon-house" /><span v-show="showBizIdSelect">项目管理首页</span>
+        </div>
+        {{ bizName }}
+      </div>
+      <ul class="all-pages-list">
+        <li v-for="item in routesList" :key="item.path" @click="handleClickRouter(item)">
+          <template v-if="!item.hidden">
+            <div v-if="item.cutOff" class="cut-off" />
+            <div class="page-item" :class="{ 'active-page': activePage === item.name }">{{ item.name }}</div>
+          </template>
+        </li>
+      </ul>
+      <div v-show="!collapsed && navTagType === 1" class="bottom-collapsed">
+        <a-button class="collapsed" @click="toggleCollapsed()">
+          <i v-if="collapsed" class="el-icon-s-fold" />
+        </a-button>
+      </div>
+    </section>
+    <section v-show="collapsed && navTagType === 1 && showNavTag" class="left-aside-collapsed">
+      <div class="button-collapsed" @click="toggleCollapsed()"><i class="el-icon-arrow-right" /></div>
+    </section>
+  </div>
+</template>
+<script>
+import { mapGetters } from 'vuex'
+import routes from '@/router/router'
+export default {
+  data() {
+    return {
+      routesList: [], // 路由数组
+      activePage: '', // 当前page页面
+      showBizIdSelect: false // 显示业务线选择按钮
+    }
+  },
+  computed: {
+    ...mapGetters(['bizId', 'bizName', 'activeNavTag', 'navTagType', 'showNavTag', 'collapsed'])
+  },
+  watch: {
+    // 当前2级导航栏对应的1级导航
+    activeNavTag() {
+      this.init()
+    },
+    // 当前2级导航的类型
+    navTagType(newV) {
+      newV === 1
+        ? this.$store.dispatch('global/setCollapsed', false) // 二级侧边栏不收起
+        : this.$store.dispatch('global/setCollapsed', true) // 二级侧边栏收起
+    },
+    $route: {
+      handler(to) {
+        this.activePage = to.name
+      },
+      immediate: true
+    }
+  },
+  created() {
+    this.init()
+  },
+  methods: {
+    init() {
+      const config = routes.find(item => item.name === this.activeNavTag)
+      this.routesList = config.children
+      // 子路由数量小于1,隐藏二级侧边栏控制
+      if (this.routesList.length <= 1) {
+        this.$store.dispatch('global/setShowNavTag', false) // 不展示二级侧边栏
+        this.$store.dispatch('global/setCollapsed', true) // 二级侧边栏收起
+      } else {
+        this.$store.dispatch('global/setShowNavTag', true) // 展示二级侧边栏
+        this.navTagType === 1
+          ? this.$store.dispatch('global/setCollapsed', false) // 二级侧边栏不收起
+          : this.$store.dispatch('global/setCollapsed', true) // 二级侧边栏收起
+      }
+    },
+    // 路由跳转
+    handleClickRouter(router) {
+      this.$router.push({ name: router.name })
+    },
+    // 展开/收起侧边栏
+    toggleCollapsed() {
+      this.$store.dispatch('global/setCollapsed', !this.collapsed) // 二级侧边栏不收起
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+section {
+  position: relative;
+}
+@keyframes expande {
+  0% {
+    width: 0;
+  }
+  100% {
+    width: 135px;
+  }
+}
+@keyframes close {
+  0% {
+    width: 135px;
+  }
+  100% {
+    width: 0;
+  }
+}
+@keyframes topExpande {
+  0% {
+    height: 0;
+  }
+  100% {
+    height: 60px;
+  }
+}
+.left-aside {
+  width: 135px;
+  animation: 0.5s expande linear;
+}
+.hidden-left-aside {
+  width: 0;
+  animation: 0.5s close linear;
+}
+//左边导航栏样式
+.left-aside,
+.hidden-left-aside {
+  position: relative;
+  overflow: hidden;
+  background-color: #ffffff;
+  .business {
+    position: relative;
+    width: 100%;
+    height: 60px;
+    padding-top: 5px;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    color: #333333;
+    font-size: 18px;
+    border: 1px solid #eeeeee;
+    white-space: nowrap;
+    .business-select {
+      cursor: pointer;
+      position: absolute;
+      top: 0;
+      left: 0;
+      width: 32px;
+      height: 20px;
+      line-height: 20px;
+      padding-left: 5px;
+      background-color: #f2f8ff;
+      border-radius: 0px 0px 10px 0px;
+      span {
+        margin-right: 5px;
+        font-size: 12px;
+        color: #565656;
+      }
+    }
+    .show-business-all {
+      width: 100px;
+    }
+  }
+  .all-pages-list {
+    margin-top: 33px;
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    font-size: 14px;
+    color: #444444;
+    li {
+      width: 100%;
+    }
+    .page-item {
+      width: 100%;
+      text-align: center;
+      white-space: nowrap;
+      padding: 5px 0;
+      margin-bottom: 10px;
+      cursor: pointer;
+    }
+    .active-page {
+      color: #409eff;
+    }
+    .cut-off {
+      border-top: 1px solid #eeeeee;
+      margin: 10px 25px 20px 25px;
+    }
+    .page-item:hover {
+      background-color: rgba(64, 158, 255, 0.1);
+    }
+  }
+  .bottom-collapsed {
+    height: 60px;
+    padding: 2% 0px 10%;
+    min-height: 5%;
+    border-top: 1px solid #dcdfe6;
+    position: absolute;
+    bottom: 0;
+    left: 0;
+    width: 100%;
+    display: flex;
+    justify-content: flex-end;
+  }
+}
+//顶部导航栏样式
+.top-aside {
+  width: calc(100% - 80px);
+  position: fixed;
+  top: 0;
+  left: 81px;
+  height: 60px;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  overflow: hidden;
+  background-color: #ffffff;
+  animation: 0.5s topExpande linear;
+  .business {
+    position: absolute;
+    top: 0;
+    left: 0;
+    width: 135px;
+    height: 60px;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    flex-shrink: 0;
+    color: #333333;
+    font-size: 18px;
+    border-right: 1px solid #eeeeee;
+    white-space: nowrap;
+    .business-select {
+      cursor: pointer;
+      position: absolute;
+      top: 0;
+      left: 0;
+      width: 32px;
+      height: 20px;
+      line-height: 20px;
+      padding-left: 5px;
+      background-color: #f2f8ff;
+      border-radius: 0px 0px 10px 0px;
+      span {
+        margin-right: 5px;
+        font-size: 12px;
+        color: #565656;
+      }
+    }
+    .show-business-all {
+      width: 100px;
+    }
+  }
+  .all-pages-list {
+    display: flex;
+    align-items: center;
+    font-size: 14px;
+    color: #444444;
+    height: 100%;
+    li {
+      height: 100%;
+      display: flex;
+      align-items: center;
+    }
+    .page-item {
+      height: 100%;
+      display: flex;
+      align-items: center;
+      white-space: nowrap;
+      padding: 0 5px;
+      margin-right: 10px;
+      cursor: pointer;
+    }
+    .active-page {
+      color: #409eff;
+    }
+    .cut-off {
+      height: 60%;
+      margin: auto;
+      border-left: 1px solid #eeeeee;
+      margin-left: 10px;
+      margin-right: 20px;
+    }
+    .page-item:hover {
+      background-color: rgba(64, 158, 255, 0.1);
+    }
+  }
+}
+.left-aside-collapsed {
+  background-color: #f7f8fc;
+  color: #409eff;
+  position: relative;
+  .button-collapsed {
+    padding-left: 2px;
+    cursor: pointer;
+    position: absolute;
+    bottom: 20px;
+    width: 15px;
+    height: 30px;
+    background-color: #ffffff;
+    font-size: 10px;
+    display: flex;
+    align-items: center;
+    border-bottom: 1px solid #409eff;
+    border-top: 1px solid#409eff;
+    border-right: 1px solid #409eff;
+    border-top-right-radius: 4px;
+    border-bottom-right-radius: 4px;
+  }
+}
+</style>

+ 175 - 0
src/components/newLayout/Head.vue

@@ -0,0 +1,175 @@
+<template>
+  <div class="head-wrapper">
+    <div class="head-logo">
+      <svg-icon class="zhihui-logo" />
+    </div>
+    <div v-for="item in headList" :key="item.path" class="nav-tag" @click="changeNavTag(item)">
+      <div v-if="item.icon" class="icon">
+        <svg-icon :class="item.icon" />
+      </div>
+      <div class="name">{{ item.name }}</div>
+    </div>
+    <div v-show="navTagType === 2" class="nav-tag-type" @click="setNavTagType(1)">
+      <i class="el-icon-date" />
+    </div>
+    <div v-show="navTagType === 1" class="nav-tag-type" @click="setNavTagType(2)">
+      <i class="el-icon-notebook-2" />
+    </div>
+    <div v-if="userInfo" class="user-info">
+      <a-popover placement="rightBottom" overlay-class-name="head-popover">
+        <template #content>
+          <div class="user-control">
+            <div class="user-name">{{ userInfo.name }}</div>
+            <div class="line" />
+            <div class="user-logout">
+              <a-button type="primary" ghost size="small" @click="layout()">退出登录</a-button>
+            </div>
+          </div>
+        </template>
+        <img :src="userInfo.phoneUrl">
+      </a-popover>
+    </div>
+  </div>
+</template>
+<script>
+import { mapGetters } from 'vuex'
+import routes from '@/router/router'
+import { memberGetLoginInMemberInfoByLdap } from '@/api/projectIndex'
+import { logoutUrl } from '@/apiConfig/requestIP.js'
+export default {
+  data() {
+    return {
+      headList: routes.filter(item => item.name !== '业务线'),
+      userInfo: null
+    }
+  },
+  computed: {
+    ...mapGetters(['activeNavTag', 'navTagType'])
+  },
+  watch: {
+    $route: {
+      handler(to) {
+        this.findRoute(to.name)
+      },
+      immediate: true
+    }
+  },
+  created() {
+    this.getLoginUser()
+  },
+  methods: {
+    findRoute(routeName) {
+      for (const element of routes) {
+        if (element.name === routeName) {
+          // 先对父元素进行查找
+          this.$store.dispatch('global/setActiveNavTag', element.name)
+        } else if (element.children) {
+          const child = element.children.find(item => item.name === routeName) // 对子元素进行查找
+          child ? this.$store.dispatch('global/setActiveNavTag', element.name) : '' // 父元素的名字设为路径
+        }
+      }
+    },
+    // 切换二级导航
+    changeNavTag(nav) {
+      this.$store.dispatch('global/setActiveNavTag', nav.name) // 设置二级导航的类别
+      this.$router.push({ name: nav.name }) // 跳转
+    },
+    // 设置二级导航类型
+    setNavTagType(type) {
+      this.$store.dispatch('global/setNavTagType', type)
+    },
+    // 获取登录人员信息
+    async getLoginUser() {
+      const res = await memberGetLoginInMemberInfoByLdap()
+      if (res && res.data) this.userInfo = res.data || null
+    },
+    // 退出登录
+    layout() {
+      window.location.href = logoutUrl
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+.head-wrapper {
+  display: flex;
+  flex-direction: column;
+  flex-shrink: 0;
+  z-index: 99;
+  width: 80px;
+  align-items: center;
+  background: #409eff;
+  font-size: 20px;
+  color: #333;
+  padding-top: 17px;
+}
+.head-logo {
+  height: 40px;
+  width: 40px;
+  margin-bottom: 42px;
+}
+.nav-tag {
+  width: 100%;
+  font-size: 14px;
+  color: #ffffff;
+  text-align: center;
+  margin-bottom: 28px;
+  cursor: pointer;
+  .icon {
+    position: relative;
+    color: #ffffff;
+    height: 20px;
+    width: 20px;
+    margin: 7px auto;
+    font-size: 32px;
+  }
+  .svg-icon {
+    position: absolute;
+    top: 0;
+    left: 0;
+  }
+}
+.nav-tag-type {
+  margin-top: auto;
+  color: #ffffff;
+  cursor: pointer;
+}
+.user-info {
+  height: 30px;
+  width: 30px;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  background-color: #fff;
+  border-radius: 50%;
+  overflow: hidden;
+  margin-top: auto;
+  margin-bottom: 30px;
+  img {
+    height: 30px;
+  }
+}
+.user-control {
+  height: 95px;
+  width: 95px;
+  display: flex;
+  flex-direction: column;
+  display: grid;
+  grid-template-rows: 47px 1px 47px;
+  justify-items: center;
+  align-items: center;
+  .line {
+    width: 100%;
+    height: 1px;
+    background-color: rgba(112, 112, 112, 0.2);
+  }
+}
+</style>
+<style lang="scss">
+.head-popover {
+  box-shadow: 10px 0px 11px #dedede;
+  /deep/ .ant-popover-inner-content {
+    padding: 0;
+  }
+}
+</style>

+ 135 - 0
src/components/newLayout/Main.vue

@@ -0,0 +1,135 @@
+<template>
+  <div
+    class="zhihui-main"
+    :class="{
+      'open-sidebar': showNavTag && navTagType === 1 && !collapsed,
+      'hide-sidebar': showNavTag && navTagType === 1 && collapsed,
+      'top-sidebar': showNavTag && navTagType === 2 && collapsed,
+      'no-sidebar': !showNavTag
+    }"
+  >
+    <div class="main-wrapper">
+      <router-view />
+    </div>
+  </div>
+</template>
+<script>
+import { mapGetters } from 'vuex'
+import { needIdList } from '@/router/needIdList'
+import { EncryptId, desDecryptId, analysisBizId_id } from '@/utils/crypto-js.js'
+import { settingGetBizList, settingUserGetBiz } from '@/api/projectIndex'
+export default {
+  data() {
+    return {
+      bizIdList: [] // 业务线列表
+    }
+  },
+  computed: {
+    ...mapGetters(['bizId', 'navTagType', 'showNavTag', 'collapsed'])
+  },
+  watch: {
+    $route: {
+      handler(to, from) {
+        this.handlerRouter(to, from)
+      },
+      immediate: true
+    }
+  },
+  methods: {
+    // 获取业务线列表
+    async settingGetBizList() {
+      const res = await settingGetBizList({})
+      this.bizIdList = res.data || []
+    },
+    // 路由处理
+    async handlerRouter(to, from) {
+      // 如果业务线列表不存在,请求获取路由业务线列表
+      if (this.bizIdList.length < 1) await this.settingGetBizList()
+      // 如果没有业务线,但是页面又是工作台
+      if (this.bizId === -1 && (to.name === '个人工作台' || to.name === '团队工作台')) this.getDefaultBizId(true)
+      // 如果是业务线选择页面,不作处理
+      if (to.name === '业务线选择' || to.name === '个人工作台' || to.name === '团队工作台') return
+      // 如果与原路由相同,不作处理
+      if (from && to.path === from.path) return
+      // 如果已存在业务线ID(第一优先级)
+      if (this.bizId !== -1) this.redirectPage()
+      // 业务线不存在,但是url上面带bizId或者bizId_id的(第二优先级)
+      if (this.$route.query.bizId || this.$route.query.bizId_id) this.handlerPage()
+      // 如果前往路由中参数中bizId和bizId_id都不存在,去获取默认bizId(第三优先级)
+      if (!to.query.bizId && !to.query.bizId_id) this.getDefaultBizId()
+    },
+    // 页面路由替换(增加bizId参数,只替换非详情页)
+    redirectPage() {
+      // 是否是需要bizId_id的详情页
+      const existBizId_id = needIdList.find(item => item === this.$route.name)
+      // 非详情页处理,路由替换,增加加密后的bizId参数
+      if (!existBizId_id) {
+        this.$router.replace({
+          path: this.$route.path,
+          query: { ...this.$route.query, bizId: EncryptId(this.bizId) }
+        })
+      }
+    },
+    // 页面处理
+    handlerPage() {
+      // 是否是需要bizId_id的详情页
+      const existBizId_id = needIdList.find(item => item === this.$route.name)
+      let bizId = -1
+      existBizId_id
+        ? (bizId = analysisBizId_id(this.$route.query.bizId_id)[0]) // 详情页下
+        : (bizId = Number(desDecryptId(this.$route.query.bizId))) // 非详情页下
+      // 判断业务线id是否存在
+      const isExistBizId = this.bizIdList.find(item => bizId === item.code)
+      // 业务线存在,设置业务线,不存在,去获取默认业务线
+      if (isExistBizId) {
+        this.$store.dispatch('global/setBizId', bizId)
+        this.$store.dispatch('global/setBizName', isExistBizId.name)
+      } else {
+        this.getDefaultBizId()
+      }
+    },
+    // 获取用户默认业务线
+    async getDefaultBizId(noQuery = false) {
+      const res = await settingUserGetBiz()
+      if (!res.data) this.$router.push({ name: '业务线选择' })
+      const nowBiz = this.bizIdList.find(item => res.data.bizId === item.code)
+      // 如果当前用户默认业务线存在,设置业务线,并页面路由重定向,否则进入业务线选择页面
+      if (nowBiz) {
+        this.$store.dispatch('global/setBizId', nowBiz.code)
+        this.$store.dispatch('global/setBizName', nowBiz.name)
+        localStorage.setItem('bizId', nowBiz.code)
+        if (noQuery) return // 如果是不需要url参数的,直接返回
+        this.redirectPage()
+      } else {
+        this.$router.push({ name: '业务线选择' })
+      }
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+.zhihui-main {
+  height: 100vh;
+}
+.hide-sidebar {
+  width: calc(100% - 95px);
+}
+.open-sidebar {
+  width: calc(100% - 230px);
+}
+.top-sidebar {
+  width: calc(100% - 80px);
+  padding-top: 60px;
+}
+.no-sidebar {
+  width: calc(100% - 80px);
+}
+.main-wrapper {
+  box-sizing: border-box;
+  height: 100%;
+  width: 100%;
+  padding-left: 10px;
+  overflow-y: scroll;
+  background-color: #f7f8fc;
+}
+</style>

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

@@ -114,7 +114,7 @@ export default {
       const bizId = Number(desDecryptId(this.$route.query.bizId))
       const isExistBizId = this.sumTypeArray.find(item => bizId === item.code)// 业务线id是否存在
       if (isExistBizId) {
-        this.$store.dispatch('data/setBizId', bizId)
+        this.$store.dispatch('global/setBizId', bizId)
       } else {
         this.settingUserGetBiz()
       }
@@ -124,7 +124,7 @@ export default {
       const arr = analysisBizId_id(this.$route.query.bizId_id)
       const isExistBizId = this.sumTypeArray.find(item => Number(arr[0]) === item.code)// 业务线id是否存在
       if (isExistBizId) {
-        this.$store.dispatch('data/setBizId', Number(arr[0]))
+        this.$store.dispatch('global/setBizId', Number(arr[0]))
       } else {
         this.settingUserGetBiz()
       }
@@ -138,7 +138,7 @@ export default {
       const res = await settingUserGetBiz()
       const nowBiz = this.sumTypeArray.find(item => res.data.bizId === item.code)
       if (nowBiz) {
-        this.$store.dispatch('data/setBizId', nowBiz.code)
+        this.$store.dispatch('global/setBizId', nowBiz.code)
         localStorage.setItem('bizId', nowBiz.code)
         if (noQuery) return // 如果是不需要url参数的,直接返回
         const existBizId_id = needIdList.find(item => item === this.$route.name)

+ 7 - 2
src/store/getters.js

@@ -10,8 +10,13 @@ const getters = {
   project: state => state.project.project,
   status: state => state.data.status,
   RichText: state => state.data.RichText,
-  bizId: state => state.data.bizId,
   routes: state => state.data.routes,
-  notice: state => state.data.notice
+  notice: state => state.data.notice,
+  activeNavTag: state => state.global.activeNavTag,
+  showNavTag: state => state.global.showNavTag,
+  navTagType: state => state.global.navTagType,
+  collapsed: state => state.global.collapsed,
+  bizId: state => state.global.bizId,
+  bizName: state => state.global.bizName
 }
 export default getters

+ 2 - 0
src/store/index.js

@@ -4,6 +4,7 @@ import getters from './getters'
 import app from './modules/app'
 import settings from './modules/settings'
 import data from './modules/data'
+import global from './modules/global'
 import project from './modules/project'
 
 Vue.use(Vuex)
@@ -13,6 +14,7 @@ const store = new Vuex.Store({
     app,
     settings,
     data,
+    global,
     project
   },
   getters

+ 0 - 7
src/store/modules/data.js

@@ -4,7 +4,6 @@ const state = {
   subMenu: '',
   RichText: '',
   status: false,
-  bizId: -1,
   notice: false
 }
 
@@ -21,9 +20,6 @@ const mutations = {
   SETROUTES(state, value) {
     state.routes = value
   },
-  SETBIZID: (state, value) => {
-    state.bizId = value
-  },
   RICHTEXT: (state, value) => {
     state.RichText = value
   },
@@ -45,9 +41,6 @@ const actions = {
   setRoutes({ commit }, value) {
     commit('SETROUTES', value)
   },
-  setBizId({ commit }, value) {
-    commit('SETBIZID', value)
-  },
   setNotice({ commit }, value) {
     commit('SETNOTICE', value)
   }

+ 55 - 0
src/store/modules/global.js

@@ -0,0 +1,55 @@
+// 通用
+const state = {
+  activeNavTag: '个人工作台', // 当前导航对象
+  showNavTag: true, // 是否显示2级导航栏
+  navTagType: 1, // 2级导航类型
+  collapsed: false, // 侧边2级导航是否收起状态
+  bizId: -1, // 业务线id
+  bizName: '业务线' // 业务线名称
+}
+const mutations = {
+  setActiveNavTag(state, payload) {
+    state.activeNavTag = payload
+  },
+  setShowNavTag(state, payload) {
+    state.showNavTag = payload
+  },
+  setNavTagType(state, payload) {
+    state.navTagType = payload
+  },
+  setCollapsed(state, payload) {
+    state.collapsed = payload
+  },
+  setBizId(state, payload) {
+    state.bizId = payload
+  },
+  setBizName(state, payload) {
+    state.bizName = payload
+  }
+}
+const actions = {
+  setActiveNavTag(context, payload) {
+    context.commit('setActiveNavTag', payload)
+  },
+  setShowNavTag(context, payload) {
+    context.commit('setShowNavTag', payload)
+  },
+  setNavTagType(context, payload) {
+    context.commit('setNavTagType', payload)
+  },
+  setCollapsed(context, payload) {
+    context.commit('setCollapsed', payload)
+  },
+  setBizId(context, payload) {
+    context.commit('setBizId', payload)
+  },
+  setBizName(context, payload) {
+    context.commit('setBizName', payload)
+  }
+}
+export default {
+  namespaced: true,
+  state,
+  mutations,
+  actions
+}

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

@@ -73,7 +73,7 @@ export default {
       this.bizSelectList = this.originBizList.slice((this.curIndex - 1) * 14, this.curIndex * 14)
     },
     enter(biz) {
-      this.$store.dispatch('data/setBizId', biz.code)
+      this.$store.dispatch('global/setBizId', biz.code)
       localStorage.setItem('bizId', biz.code)
       this.settingUserSetBiz(biz.code)
       if (!fromRoute || !fromRoute.name) {

+ 1 - 1
src/views/home/index.vue

@@ -296,7 +296,7 @@ export default {
     async settingUserGetBiz() { // 获取人员默认业务线
       const res = await settingUserGetBiz()
       if (res.code === 200 && res.data) {
-        this.$store.dispatch('data/setBizId', res.data.bizId)
+        this.$store.dispatch('global/setBizId', res.data.bizId)
         localStorage.setItem('bizId', res.data.bizId)
       }
     },

+ 27 - 0
src/views/newLayout/layout.vue

@@ -0,0 +1,27 @@
+<template>
+  <div class="zhihui-contain">
+    <Head />
+    <Aside />
+    <Main />
+  </div>
+</template>
+<script>
+import Head from '@/components/newLayout/Head'
+import Aside from '@/components/newLayout/Aside'
+import Main from '@/components/newLayout/Main'
+
+export default {
+  components: {
+    Aside,
+    Main,
+    Head
+  }
+}
+</script>
+<style lang="scss" scoped>
+.zhihui-contain {
+  display: flex;
+  overflow: hidden;
+  height: 100%;
+}
+</style>

+ 1 - 1
src/views/workbench/person/index.vue

@@ -446,7 +446,7 @@ export default {
     handleBizId(e) { // 业务线变动
       const res = this.searchEnum.find(item => item.code === e)
       this.bizName = res.name
-      this.$store.dispatch('data/setBizId', res.code)
+      this.$store.dispatch('global/setBizId', res.code)
       if (this.activeSchedule === '1') this.queryWorkListByTime(this.calendarView)
     },
     addCalender(arg) { // 新建日程弹框

+ 1 - 1
src/views/workbench/team/index.vue

@@ -394,7 +394,7 @@ export default {
       this.searchForm.bizId = e
       const res = this.searchEnum.businesslines.find(item => item.code === e)
       this.bizName = res.name
-      this.$store.dispatch('data/setBizId', res.code)
+      this.$store.dispatch('global/setBizId', res.code)
       if (this.$refs['search-section']) {
         this.$refs['search-section'].queryTeamMember()
       }