增加按钮权限

This commit is contained in:
smallchill 2019-02-15 16:24:50 +08:00
parent 6d5bbcaf9c
commit 792ff748c7
3 changed files with 36 additions and 0 deletions

View File

@ -4,6 +4,7 @@
:data="data"
ref="crud"
v-model="form"
:permission="permissionList"
:before-open="beforeOpen"
:page="page"
@row-del="rowDel"
@ -17,6 +18,7 @@
<el-button type="danger"
size="small"
icon="el-icon-delete"
v-if="permission.dept_delete"
plain
@click="handleDelete"> </el-button>
</template>
@ -41,6 +43,7 @@ import {
getDept,
getDeptTree
} from "@/api/system/dept";
import { mapGetters } from "vuex";
export default {
data() {
return {
@ -89,6 +92,15 @@ export default {
};
},
computed: {
...mapGetters(["permission"]),
permissionList() {
return {
addBtn: this.permission.dept_add,
viewBtn: this.permission.dept_view,
delBtn: this.permission.dept_delete,
editBtn: this.permission.dept_edit
};
},
ids() {
let ids = [];
this.selectionList.forEach(ele => {

View File

@ -4,6 +4,7 @@
:data="data"
ref="crud"
v-model="form"
:permission="permissionList"
:before-open="beforeOpen"
:page="page"
@row-del="rowDel"
@ -17,6 +18,7 @@
<el-button type="danger"
size="small"
icon="el-icon-delete"
v-if="permission.dict_delete"
plain
@click="handleDelete"> </el-button>
</template>
@ -41,6 +43,7 @@ import {
getDict,
getDictTree
} from "@/api/system/dict";
import { mapGetters } from "vuex";
export default {
data() {
return {
@ -92,6 +95,15 @@ export default {
};
},
computed: {
...mapGetters(["permission"]),
permissionList() {
return {
addBtn: this.permission.dict_add,
viewBtn: this.permission.dict_view,
delBtn: this.permission.dict_delete,
editBtn: this.permission.dict_edit
};
},
ids() {
let ids = [];
this.selectionList.forEach(ele => {

View File

@ -4,6 +4,7 @@
:data="data"
ref="crud"
v-model="form"
:permission="permissionList"
:before-open="beforeOpen"
:page="page"
@row-del="rowDel"
@ -17,6 +18,7 @@
<el-button type="danger"
size="small"
icon="el-icon-delete"
v-if="permission.menu_delete"
plain
@click="handleDelete"> </el-button>
</template>
@ -34,6 +36,7 @@
<script>
import { getList, remove, update, add, getMenu } from "@/api/system/menu";
import { mapGetters } from "vuex";
export default {
data() {
return {
@ -137,6 +140,15 @@ export default {
},
computed: {
...mapGetters(["permission"]),
permissionList() {
return {
addBtn: this.permission.menu_add,
viewBtn: this.permission.menu_view,
delBtn: this.permission.menu_delete,
editBtn: this.permission.menu_edit
};
},
ids() {
let ids = [];
this.selectionList.forEach(ele => {