This commit is contained in:
zhutianqi
2021-06-30 18:56:20 +08:00
parent d8022a0c61
commit e8167776ea
8 changed files with 138 additions and 101 deletions
@@ -80,9 +80,9 @@
<el-dropdown trigger="click" @command="handleCommand">
<i class="iconfont">&#xe61e;</i>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item v-if="scope.row.disableFlag === '1'" :command="[scope.row, '启用']">启用</el-dropdown-item>
<el-dropdown-item v-if="scope.row.disableFlag === '0'" :command="[scope.row, '禁用']">禁用</el-dropdown-item>
<el-dropdown-item :command="[scope.row, '配置岗位']">配置岗位</el-dropdown-item>
<el-dropdown-item v-btn-permission="'30db3b395deb5004266cd65d302c2776'" v-if="scope.row.disableFlag === '1'" :command="[scope.row, '启用']">启用</el-dropdown-item>
<el-dropdown-item v-btn-permission="'30db3b395deb5004266cd65d302c2776'" v-if="scope.row.disableFlag === '0'" :command="[scope.row, '禁用']">禁用</el-dropdown-item>
<el-dropdown-item v-btn-permission="'ce2d2b9bb8004e0d9efcabc42a9f354d'" :command="[scope.row, '配置岗位']">配置岗位</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
@@ -19,6 +19,10 @@
class="common-button-primary add-button"
@click="Add"
size="mini">新增</el-button>
<el-button type="primary"
class="common-button-primary add-button"
@click="deleteList"
size="mini">删除</el-button>
</el-col>
</el-row>
<el-row>
@@ -92,6 +96,16 @@ export default {
}
},
methods: {
deleteList () {
this.$http.delete('lawss/sarMenu', {
menuId: this.form.id
}, {}, res=> {
if (res.ok) {
this.getTree()
this.$message.success('删除成功')
}
})
},
confirmDialog () {
var form = {}
form.parentId = this.form.id
+10 -2
View File
@@ -5,10 +5,12 @@
<el-button type="primary"
class="common-button-primary add-button"
@click="addModal"
v-btn-permission="'980cb239683de9e29ee5335cec98e5b4'"
size="mini">新增</el-button>
<el-button type="primary"
class="common-button-primary add-button"
@click="addRole"
v-btn-permission="'779665b2e4bb20fc480cf9372a100f69'"
size="mini">配置角色</el-button>
</div>
<div class="content">
@@ -55,8 +57,8 @@
<el-dropdown trigger="click" @command="handleCommand">
<i class="iconfont">&#xe61e;</i>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="[scope.row, '删除']">删除</el-dropdown-item>
<el-dropdown-item :command="[scope.row, '编辑']">编辑</el-dropdown-item>
<el-dropdown-item v-btn-permission="'0fbb849e244e07433a90180fb314ad10'" :command="[scope.row, '删除']">删除</el-dropdown-item>
<el-dropdown-item v-btn-permission="'fa0846d977aeef07e9cb7faf648f8f7f'" :command="[scope.row, '编辑']">编辑</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
@@ -296,6 +298,12 @@
mounted () {
this.getData()
this.getRole()
const menuList = this.$store.getters.getMenuList
menuList.forEach(item => {
if (item.id === '980cb239683de9e29ee5335cec98e5b4') {
console.log('有')
}
})
}
}
</script>
+3 -3
View File
@@ -29,6 +29,7 @@
<el-button type="primary"
class="common-button-primary add-button"
@click="roleAdd"
v-btn-permission="'93e75b6ec0b2b6b0b40d2b11adeba88a'"
size="mini">配置角色资源</el-button>
</div>
<div class="content">
@@ -92,6 +93,7 @@
:default-checked-keys="nodeList"
default-expand-all
show-checkbox
check-strictly
ref="tree2">
</el-tree>
</div>
@@ -130,7 +132,6 @@ export default {
},
methods: {
closeDialog () {
this.nodeList = []
this.modalshowflag = false
},
confirmDialog () {
@@ -138,7 +139,6 @@ export default {
menuIds: this.$refs.tree2.getCheckedKeys().concat(this.$refs.tree2.getHalfCheckedKeys()),
roleId: this.id
}, {}, res=> {
console.log(res);
if (res.ok) {
this.$message.success('设置权限成功')
this.modalshowflag = false
@@ -157,8 +157,8 @@ export default {
roleId: this.id
}, {}, res=> {
if (res.ok) {
this.nodeList = res.data
this.modalshowflag = true
this.nodeList = res.data
}
})
},