| | |
| | | return { |
| | | title: process.env.VUE_APP_TITLE, |
| | | headerNavData: {}, |
| | | currentIndex: 0, |
| | | visible: { |
| | | // 修改密码 |
| | | changePwd: false |
| | |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapState(['menuData', 'userInfo', 'topMenuList']) |
| | | ...mapState(['menuData', 'userInfo', 'topMenuList', 'currentIndex']) |
| | | // title () { |
| | | // return this.$route.meta.title |
| | | // } |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | ...mapMutations(['setUserInfo', 'switchCollapseMenu', 'clearUserInfo', 'setTopMenuCurrent']), |
| | | ...mapMutations(['setUserInfo', 'switchCollapseMenu', 'clearUserInfo', 'setTopMenuCurrent', 'setCurrentIndex']), |
| | | // 修改密码 |
| | | changePwd () { |
| | | this.visible.changePwd = true |
| | |
| | | } |
| | | }, |
| | | getHeaderNav (item,index) { |
| | | this.currentIndex = index |
| | | this.setCurrentIndex(index) |
| | | if(item.linkType === 0){ |
| | | console.log('setTopMenuCurrent') |
| | | this.setTopMenuCurrent(item) |
| | | }else{ |
| | | if (item.url && item.url === 'goHKAF' && item.params != null) { |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | ...mapMutations(['switchCollapseMenu', 'setHomePage', 'setTopMenuCurrent', 'setTopMenuCurrent','cleartagsview']), |
| | | ...mapMutations(['switchCollapseMenu', 'setCurrentIndex', 'setHomePage', 'setTopMenuCurrent', 'setTopMenuCurrent','cleartagsview']), |
| | | // 初始化本地配置 |
| | | initLocalConfig () { |
| | | // 菜单状态配置 |
| | |
| | | tlist.push(...item.children) |
| | | } |
| | | }) |
| | | this.setTopMenuCurrent(topCurrent) |
| | | if (this.$route.query && this.$route.query.menuparams) { |
| | | let menu = topList.filter(item => item.params === this.$route.query.menuparams) |
| | | this.setTopMenuCurrent(menu[0]) |
| | | this.setCurrentIndex(topList.findIndex(obj => obj.params === this.$route.query.menuparams)) |
| | | } else { |
| | | this.setTopMenuCurrent(topCurrent) |
| | | this.setCurrentIndex(0) |
| | | } |
| | | // console.log(topList) |
| | | // var menus = [] |
| | | // topList.forEach(item => { |
| | |
| | | redirect: this.homePage.url |
| | | }) |
| | | // 路由加载完成后,如果访问的是/,跳转至动态识别的首页 |
| | | if (this.$route.path === '/') { |
| | | if (this.$route.query && this.$route.query.menuparams) { |
| | | this.$router.push(topList.filter(item => item.params === this.$route.query.menuparams)[0].homeUrl) |
| | | } else if (this.$route.path === '/') { |
| | | this.$router.push(this.homePage.url) |
| | | } |
| | | }) |
| | |
| | | // tags数组 |
| | | tags: [], |
| | | // tagsview标签显示隐藏 |
| | | isCollapse: false |
| | | isCollapse: false, |
| | | // 顶部菜单索引 |
| | | currentIndex: 0 |
| | | } |
| | | |
| | | const mutations = { |
| | | // 设置顶部菜单索引 |
| | | setCurrentIndex(state, index) { |
| | | console.log('设置顶部菜单索引', index) |
| | | state.currentIndex = index |
| | | }, |
| | | // 切换菜单状态 |
| | | switchCollapseMenu (state, value) { |
| | | if (value != null) { |
| | |
| | | <!-- 表格和分页 --> |
| | | <template v-slot:table-wrap> |
| | | <ul class="toolbar" v-permissions="['business:company:create', 'business:company:sync']"> |
| | | <li><el-button type="primary" v-permissions="['business:company:create']" |
| | | @click="$refs.OperaInternalCompanyWindow.open('新建组织', null, null)">新建</el-button></li> |
| | | <!-- <li><el-button type="primary" v-permissions="['business:company:create']"--> |
| | | <!-- @click="$refs.OperaInternalCompanyWindow.open('新建组织', null, null)">新建</el-button></li>--> |
| | | <li><el-button @click="sort('top')" :loading="sorting" icon="el-icon-sort-up" |
| | | v-permissions="['business:company:sort']">上移</el-button></li> |
| | | <li><el-button @click="sort('bottom')" :loading="sorting" icon="el-icon-sort-down" |