Commit 050d35a0c7ca06447f9d9a745cc719d141fe727b

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