提交 08dc6eee authored 作者: matian's avatar matian

feat:员工按钮添加权限

上级 883d16cf
......@@ -58,18 +58,6 @@ export default {
employeeList: []
}
},
computed: {
btnPermissions() {
return this.$store.state.permissions.filter(item => item.type === 4)
},
btnCreate() {
return !!this.btnPermissions.find(item => item.tag === 'btn_customerGroup_addStaff')
},
btnDelete() {
return !!this.btnPermissions.find(item => item.tag === 'btn_customerGroup_removeStaff')
}
},
mounted() {
console.log(this.id)
},
......
......@@ -3,11 +3,13 @@
<app-list v-bind="tableOptions" ref="list">
<template>
<el-row style="margin-bottom: 20px">
<el-button type="primary" icon="el-icon-plus" size="mini" @click="isShowDialog = true">添加员工</el-button>
<el-button type="primary" icon="el-icon-plus" size="mini" @click="isShowDialog = true" v-if="btnCreate"
>添加员工</el-button
>
</el-row>
</template>
<template v-slot:table-x="{ row }">
<el-button type="text" @click="onRemove(row)">删除</el-button>
<el-button type="text" @click="onRemove(row)" v-if="btnDelete">删除</el-button>
</template>
</app-list>
<AddEmployees :visible.sync="isShowDialog" @success="success" :id="id" v-if="isShowDialog" />
......@@ -33,6 +35,15 @@ export default {
}
},
computed: {
btnPermissions() {
return this.$store.state.permissions.filter(item => item.type === 4)
},
btnCreate() {
return !!this.btnPermissions.find(item => item.tag === 'btn_customerGroup_addStaff')
},
btnDelete() {
return !!this.btnPermissions.find(item => item.tag === 'btn_customerGroup_removeStaff')
},
// 列表配置
tableOptions() {
return {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论