|
|
@@ -25,18 +25,20 @@
|
|
|
>
|
|
|
<el-carousel-item>
|
|
|
<ul class="info" @mouseleave='myInd=null'>
|
|
|
- <li v-for="(item,index) in info1" :key="item.inoc" @click="skip(item)" @mouseenter='myInd=index'>
|
|
|
+ <li v-for="(item,index) in info1" :key="item.inoc" @click="skip(item)" @mouseenter='myInd=index' :class="{active:!item.authority}">
|
|
|
+ <!-- <template v-if="item.authority"> -->
|
|
|
<div class="ico">
|
|
|
<img :src="require('@/assets/inco/'+item.inoc+'ac.png')" alt="" v-if="myInd===index">
|
|
|
<img :src="require('@/assets/inco/'+item.inoc+'.png')" alt="" v-else>
|
|
|
</div>
|
|
|
<p>{{ item.name }}</p>
|
|
|
+ <!-- </template> -->
|
|
|
</li>
|
|
|
</ul>
|
|
|
</el-carousel-item>
|
|
|
<el-carousel-item>
|
|
|
<ul class="info" @mouseleave='myInd=null'>
|
|
|
- <li v-for="(item,index) in info2" :key="item.inoc" @click="skip(item)" @mouseenter='myInd=index'>
|
|
|
+ <li v-for="(item,index) in info2" :key="item.inoc" @click="skip(item)" @mouseenter='myInd=index' :class="{active:!item.authority}">
|
|
|
<div class="ico">
|
|
|
<img :src="require('@/assets/inco/'+item.inoc+'ac.png')" alt="" v-if="myInd===index">
|
|
|
<img :src="require('@/assets/inco/'+item.inoc+'.png')" alt="" v-else>
|
|
|
@@ -65,9 +67,10 @@
|
|
|
<div class="title">
|
|
|
<h3>待办提醒</h3>
|
|
|
</div>
|
|
|
- <div class="dingdong" v-for="(item,index) in dingdong" :key="index" @click="skip(item)">
|
|
|
+ <div class="dingdong" v-for="(item,index) in dingdong" :key="index" @click="skip(item)" :class="{active:!item.authority}">
|
|
|
<p>{{item.name}}</p>
|
|
|
- <span>共有 <i> {{item.inoc}} </i> 代办事项</span>
|
|
|
+ <span v-if="!item.authority">暂无权限</span>
|
|
|
+ <span v-else>共有 <i> {{item.inoc}} </i> 代办事项</span>
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
@@ -103,25 +106,27 @@ export default {
|
|
|
// 用户信息
|
|
|
userData: {},
|
|
|
info1: [
|
|
|
- { name: '藏品登记', inoc: 'holding0', push: '/layout/holding0' },
|
|
|
- { name: '藏品总账', inoc: 'holding3', push: '/layout/holding3' },
|
|
|
- { name: '藏品注销', inoc: 'holding5', push: '/layout/holding5' }
|
|
|
+ { name: '藏品登记', inoc: 'holding0', push: '/layout/holding0', authority: false },
|
|
|
+ { name: '藏品总账', inoc: 'holding3', push: '/layout/holding3', authority: false },
|
|
|
+ { name: '藏品修改', inoc: 'holding4', push: '/layout/holding4', authority: false },
|
|
|
+ { name: '藏品注销', inoc: 'holding5', push: '/layout/holding5', authority: false }
|
|
|
],
|
|
|
info2: [
|
|
|
- { name: '入库管理', inoc: 'holding1', push: '/layout/holding1' },
|
|
|
- { name: '出库管理', inoc: 'holding2', push: '/layout/holding2' },
|
|
|
- { name: '藏品移库', inoc: 'statistics2', push: '/layout/statistics2' }
|
|
|
+ { name: '入库管理', inoc: 'holding1', push: '/layout/holding1', authority: false },
|
|
|
+ { name: '出库管理', inoc: 'holding2', push: '/layout/holding2', authority: false },
|
|
|
+ { name: '藏品移库', inoc: 'statistics2', push: '/layout/statistics2', authority: false },
|
|
|
+ { name: '库房设置', inoc: 'statistics0', push: '/layout/statistics0', authority: false }
|
|
|
// { name: '征集品总账', inoc: 'collect0', push: '/layout/collect0' },
|
|
|
// { name: '征集品提用', inoc: 'collect1', push: '/layout/collect1' },
|
|
|
// { name: '征集品注销', inoc: 'collect2', push: '/layout/collect2' }
|
|
|
],
|
|
|
dingdong: [
|
|
|
- { name: '藏品登记', inoc: 0, push: '/layout/holding0' },
|
|
|
- { name: '入库管理', inoc: 0, push: '/layout/holding1' },
|
|
|
- { name: '出库管理', inoc: 0, push: '/layout/holding2' },
|
|
|
- { name: '藏品修改', inoc: 0, push: '/layout/holding4' },
|
|
|
- { name: '藏品注销', inoc: 0, push: '/layout/holding5' },
|
|
|
- { name: '藏品移库', inoc: 0, push: '/layout/statistics2' }
|
|
|
+ { name: '藏品登记', inoc: 0, push: '/layout/holding0', authority: false },
|
|
|
+ { name: '入库管理', inoc: 0, push: '/layout/holding1', authority: false },
|
|
|
+ { name: '出库管理', inoc: 0, push: '/layout/holding2', authority: false },
|
|
|
+ { name: '藏品修改', inoc: 0, push: '/layout/holding4', authority: false },
|
|
|
+ { name: '藏品注销', inoc: 0, push: '/layout/holding5', authority: false },
|
|
|
+ { name: '藏品移库', inoc: 0, push: '/layout/statistics2', authority: false }
|
|
|
// { name: '征集品提用', inoc: 0, push: '/layout/collect1' },
|
|
|
// { name: '征集品修改', inoc: 0, push: '/layout/collect3' },
|
|
|
// { name: '征集品注销', inoc: 0, push: '/layout/collect2' }
|
|
|
@@ -149,7 +154,20 @@ export default {
|
|
|
},
|
|
|
// 生命周期 - 创建完成(可以访问当前this实例)
|
|
|
created () {
|
|
|
-
|
|
|
+ // 获取角色权限树
|
|
|
+ let temp2 = localStorage.getItem('daliCK_limits')
|
|
|
+ temp2 = JSON.parse(temp2)
|
|
|
+ console.log(999, temp2)
|
|
|
+ temp2.forEach(v => {
|
|
|
+ if (v.authority && v.id === 100) this.info1[0].authority = this.dingdong[0].authority = true // 藏品登记
|
|
|
+ if (v.authority && v.id === 300) this.info2[0].authority = this.dingdong[1].authority = true // 入库管理
|
|
|
+ if (v.authority && v.id === 400) this.info2[1].authority = this.dingdong[2].authority = true // 出库管理
|
|
|
+ if (v.authority && v.id === 500) this.info1[2].authority = this.dingdong[3].authority = true // 藏品修改
|
|
|
+ if (v.authority && v.id === 600) this.info1[3].authority = this.dingdong[4].authority = true // 藏品注销
|
|
|
+ if (v.authority && v.id === 800) this.info2[2].authority = this.dingdong[5].authority = true // 藏品移库
|
|
|
+ if (v.authority && v.id === 200) this.info1[1].authority = true // 藏品总账
|
|
|
+ if (v.authority && v.id === 700) this.info2[3].authority = true // 库房设置
|
|
|
+ })
|
|
|
},
|
|
|
// 生命周期 - 挂载完成(可以访问DOM元素)
|
|
|
async mounted () {
|
|
|
@@ -325,6 +343,10 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ .active {
|
|
|
+ pointer-events:none;
|
|
|
+ display: none;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -411,6 +433,9 @@ export default {
|
|
|
color: black;
|
|
|
}
|
|
|
}
|
|
|
+ .active {
|
|
|
+ pointer-events:none;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|