按钮级别的新版本,多级别的组织架构
loulijun2021
2023-08-31 dba6651c44548a3a617398a6afd14b455f5ea92f
src/layout/components/Sidebar/index.vue
@@ -42,7 +42,7 @@
    <div v-if="!$store.state.settings.menuIsHorizontal" style="position: absolute;bottom: 20px;left: 30px;">
      <div>
        <el-button v-if="$store.state.app.sidebar.opened" type="text" style="font-size: 14px;cursor: pointer">
          新凯迪制造V1.6.53
          新凯迪制造V2.0.0
        </el-button>
        <!--        <el-button type="text"><a href="http://www.ykxkd.com/" target="_blank">新凯迪制造V1.0.01</a></el-button>-->
      </div>
@@ -56,8 +56,8 @@
import Logo from './Logo'
import SidebarItem from './SidebarItem'
import variables from '@/styles/variables.scss'
import { LoginMenu } from '@/api/user'
import { removeCookie, setCookie } from '@/utils/auth'
import Vue from 'vue'
export default {
  components: { SidebarItem, Logo },
@@ -77,9 +77,16 @@
    activeMenu() {
      const route = this.$route
      const { meta, path } = route
      // console.log(meta, path, 7)
      // if set path, the sidebar will highlight the path you set
      removeCookie('ruleCode')
      setCookie('ruleCode', meta.code)// 将编码规则code存到cookie里面
      setCookie('ruleCode', meta.code) // 将编码规则code存到cookie里面
      removeCookie('datacode')
      setCookie('datacode', meta.datacode) // 数据权限
      Vue.prototype.$buttoncode = meta.buttoncode // 按钮权限
      if (meta.activeMenu) {
        return meta.activeMenu
      }