mirror of
https://github.com/chillzhuang/Saber.git
synced 2024-11-22 02:19:32 +08:00
⚡ 增加按钮权限
This commit is contained in:
parent
6d5bbcaf9c
commit
792ff748c7
@ -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 => {
|
||||
|
@ -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 => {
|
||||
|
@ -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 => {
|
||||
|
Loading…
Reference in New Issue
Block a user