Commit 050d35a0c7ca06447f9d9a745cc719d141fe727b
1 parent
e0626fd0
v1.9 业务受理没有加入权限控制的bug
Showing
1 changed file
with
12 additions
and
10 deletions
src/views/layout/layout.vue
| ... | ... | @@ -3,11 +3,13 @@ |
| 3 | 3 | <!-- 顶部导航 --> |
| 4 | 4 | <el-header height="60px" class="app-header"> |
| 5 | 5 | <div class="header-left"> |
| 6 | - <div class="logo" @click="_toIndex">{{systemInfo.systemSimpleTitle}}</div> | |
| 6 | + <div class="logo" @click="_toIndex">{{ systemInfo.systemSimpleTitle }}</div> | |
| 7 | 7 | <el-menu mode="horizontal" :default-active="activeMenu" class="header-menu" background-color="#1e2132" |
| 8 | 8 | text-color="#fff" active-text-color="#409EFF"> |
| 9 | - <el-menu-item :index="item.caId" v-for="(item, index) in catalogs" :key="index" | |
| 10 | - @click="_changeMenuCatalog(item, true)">{{ item.name }}</el-menu-item> | |
| 9 | + <template v-for="(item, index) in catalogs"> | |
| 10 | + <el-menu-item :index="item.caId" v-if="!item.privId || hasPrivilege(item.privId)" :key="index" | |
| 11 | + @click="_changeMenuCatalog(item, true)">{{ item.name }}</el-menu-item> | |
| 12 | + </template> | |
| 11 | 13 | </el-menu> |
| 12 | 14 | </div> |
| 13 | 15 | <div class="header-right"> |
| ... | ... | @@ -19,7 +21,7 @@ |
| 19 | 21 | <el-dropdown-menu slot="dropdown"> |
| 20 | 22 | <el-dropdown-item :command="c" v-for="(c, index) in communitys" :key="index">{{ c.name }}</el-dropdown-item> |
| 21 | 23 | <el-dropdown-item command="moreCommunity" class="moreCommunity">{{ $t('layout.moreCommunity') |
| 22 | - }}</el-dropdown-item> | |
| 24 | + }}</el-dropdown-item> | |
| 23 | 25 | </el-dropdown-menu> |
| 24 | 26 | </el-dropdown> |
| 25 | 27 | <el-dropdown @command="handleCommand"> |
| ... | ... | @@ -31,7 +33,7 @@ |
| 31 | 33 | <el-dropdown-item command="logout">{{ $t('layout.logout') }}</el-dropdown-item> |
| 32 | 34 | </el-dropdown-menu> |
| 33 | 35 | </el-dropdown> |
| 34 | - <span class="margin-left">{{systemInfo.version}}</span> | |
| 36 | + <span class="margin-left">{{ systemInfo.version }}</span> | |
| 35 | 37 | |
| 36 | 38 | </div> |
| 37 | 39 | </el-header> |
| ... | ... | @@ -79,13 +81,13 @@ |
| 79 | 81 | <script> |
| 80 | 82 | import { _getMenuCatalog, getMenuTree, jumpToMall, jumpToIot } from '@/api/user/menuApi' |
| 81 | 83 | import { getStoreInfo } from "@/api/user/indexApi" |
| 82 | -import {listSystemInfo} from '@/api/system/systemInfoManageApi' | |
| 84 | +import { listSystemInfo } from '@/api/system/systemInfoManageApi' | |
| 83 | 85 | import { deepCopy, setCurrentCommunity } from "@/utils/vc" |
| 84 | 86 | import { getCommunityName, _loadCommunityInfo } from '@/api/community/communityApi' |
| 85 | 87 | import moreCommunity from '@/components/community/moreCommunity.vue' |
| 86 | 88 | import viewMenuUserList from '@/components/system/viewMenuUserList.vue' |
| 87 | 89 | import searchCommunityDataList from '@/components/system/searchCommunityDataList.vue' |
| 88 | -import {initSystem} from '@/api/util/vcApi' | |
| 90 | +import { initSystem } from '@/api/util/vcApi' | |
| 89 | 91 | import config from '@/conf/config' |
| 90 | 92 | |
| 91 | 93 | |
| ... | ... | @@ -221,7 +223,7 @@ export default { |
| 221 | 223 | } |
| 222 | 224 | setCurrentCommunity(community); |
| 223 | 225 | this.curCommunityName = getCommunityName() |
| 224 | - window.location.href="/" | |
| 226 | + window.location.href = "/" | |
| 225 | 227 | }, |
| 226 | 228 | handleMenuSelect(index) { |
| 227 | 229 | // 处理菜单选择 |
| ... | ... | @@ -313,10 +315,10 @@ export default { |
| 313 | 315 | } |
| 314 | 316 | return false; |
| 315 | 317 | }, |
| 316 | - _toIndex(){ | |
| 318 | + _toIndex() { | |
| 317 | 319 | location.href = '/' |
| 318 | 320 | }, |
| 319 | - _closeSubMenu(){ | |
| 321 | + _closeSubMenu() { | |
| 320 | 322 | this.subMenus = [] |
| 321 | 323 | this.curMenuName = '' |
| 322 | 324 | } | ... | ... |