|
|
@@ -13,8 +13,8 @@
|
|
|
<div class="conten">
|
|
|
<div class="conten_left">
|
|
|
<div class="btn">
|
|
|
- <el-button type="primary" @click="addOne">新建库区</el-button>
|
|
|
- <el-button type="danger" @click="delOne">删除</el-button>
|
|
|
+ <el-button type="primary" @click="addOne" v-show="userLogo.add">新建库区</el-button>
|
|
|
+ <el-button type="danger" @click="delOne" v-show="userLogo.del">删除</el-button>
|
|
|
</div>
|
|
|
<div class="box" v-for="(item, index) in allList" :key="item.id">
|
|
|
<div class="title" :style="arrowsShow === index?'background-color: #f2f2f2;':''">
|
|
|
@@ -27,8 +27,8 @@
|
|
|
@click="arrowsShowClick(index)"
|
|
|
></i>
|
|
|
<span @click="arrowsShowClick(index)">{{ item.name }}</span>
|
|
|
- <i class="el-icon-plus tiny" @click="addTow(item.id)"></i>
|
|
|
- <i class="el-icon-edit tiny" @click="editOne(item)"></i>
|
|
|
+ <i class="el-icon-plus tiny" @click="addTow(item.id)" v-show="userLogo.add"></i>
|
|
|
+ <i class="el-icon-edit tiny" @click="editOne(item)" v-show="userLogo.edit"></i>
|
|
|
</div>
|
|
|
<ul class="area" v-show="arrowsShow === index">
|
|
|
<li
|
|
|
@@ -46,9 +46,9 @@
|
|
|
<div class="title">
|
|
|
<b>{{ towList.name }}</b>
|
|
|
<span>仓库编号:{{ towList.num }}</span>
|
|
|
- <i class="el-icon-plus" @click="addThree"></i>
|
|
|
- <i class="el-icon-edit" @click="editTow"></i>
|
|
|
- <i class="el-icon-delete" @click="delTow"></i>
|
|
|
+ <i class="el-icon-plus" @click="addThree" v-show="userLogo.add"></i>
|
|
|
+ <i class="el-icon-edit" @click="editTow" v-show="userLogo.edit"></i>
|
|
|
+ <i class="el-icon-delete" @click="delTow" v-show="userLogo.del"></i>
|
|
|
</div>
|
|
|
<!-- 表格 -->
|
|
|
<div class="table">
|
|
|
@@ -74,8 +74,8 @@
|
|
|
></el-table-column>
|
|
|
<el-table-column label="操作" width="150">
|
|
|
<template #default='{row}'>
|
|
|
- <i class="el-icon-edit" @click="editThree(row)"></i>
|
|
|
- <i class="el-icon-delete" @click="delThree(row.id)"></i>
|
|
|
+ <i class="el-icon-edit" @click="editThree(row)" v-show="userLogo.edit"></i>
|
|
|
+ <i class="el-icon-delete" @click="delThree(row.id)" v-show="userLogo.del"></i>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
@@ -134,6 +134,11 @@ export default {
|
|
|
data () {
|
|
|
// 这里存放数据
|
|
|
return {
|
|
|
+ userLogo: {
|
|
|
+ add: true, // 新增
|
|
|
+ edit: true, // 编辑
|
|
|
+ del: true// 删除
|
|
|
+ },
|
|
|
myId: null,
|
|
|
// 第一层:箭头的显示隐藏
|
|
|
arrowsShow: 0,
|
|
|
@@ -401,6 +406,27 @@ export default {
|
|
|
this.tableData = this.towList.children
|
|
|
}, 100)
|
|
|
})
|
|
|
+ // 获取用户角色权限标识
|
|
|
+ let temp = localStorage.getItem('daliCK')
|
|
|
+ temp = JSON.parse(temp)
|
|
|
+ if (temp) {
|
|
|
+ const temp2 = temp.role[0]
|
|
|
+ if (temp2 === 'sys_edit') {
|
|
|
+ this.userLogo.del = false
|
|
|
+ this.userLogo.add = false
|
|
|
+ this.userLogo.edit = false
|
|
|
+ } // 保管部成员
|
|
|
+ if (temp2 === 'sys_look') {
|
|
|
+ this.userLogo.del = false
|
|
|
+ this.userLogo.add = false
|
|
|
+ this.userLogo.edit = false
|
|
|
+ } // 其他部门人员
|
|
|
+ if (temp2 === 'sys_collect') {
|
|
|
+ this.userLogo.del = false
|
|
|
+ this.userLogo.add = false
|
|
|
+ this.userLogo.edit = false
|
|
|
+ } // 征集部主任
|
|
|
+ }
|
|
|
},
|
|
|
beforeCreate () {}, // 生命周期 - 创建之前
|
|
|
beforeMount () {}, // 生命周期 - 挂载之前
|