菜单管理修改

This commit is contained in:
hbzgyjh 2021-12-20 19:43:42 +08:00
parent 567c0d4df5
commit 5589c7fa4f
2 changed files with 3 additions and 2 deletions

View File

@ -175,6 +175,7 @@ export default {
this.visibleDef = true this.visibleDef = true
} }
this.form.getFieldDecorator('visible', { valuePropName: 'checked', initialValue: this.visibleDef }) this.form.getFieldDecorator('visible', { valuePropName: 'checked', initialValue: this.visibleDef })
this.treeSelDefaultValue = record.id;
setTimeout(() => { setTimeout(() => {
this.setMenuItem(record) this.setMenuItem(record)

View File

@ -44,9 +44,9 @@
<span slot="action" slot-scope="text, record" > <span slot="action" slot-scope="text, record" >
<template> <template>
<a v-if="hasPerm('sys:menu:add') && record.type !== 2" @click="$refs.menuForm.add(record.id)">新增下级</a> <a v-if="hasPerm('sys:menu:add') && record.type !== 2" @click="$refs.menuForm.add(record.id)">新增下级</a>
<a-divider type="vertical" v-if="hasPerm('sys:menu:add')" /> <a-divider type="vertical" v-if="hasPerm('sys:menu:add') && record.type !== 2 && hasPerm('sys:menu:edit')" />
<a v-if="hasPerm('sys:menu:edit')" @click="$refs.menuForm.edit(record)">编辑</a> <a v-if="hasPerm('sys:menu:edit')" @click="$refs.menuForm.edit(record)">编辑</a>
<a-divider type="vertical" v-if="hasPerm('sys:menu:edit')" /> <a-divider type="vertical" v-if="hasPerm('sys:menu:edit') && hasPerm('sys:menu:delete') " />
<a-popconfirm v-if="hasPerm('sys:menu:delete')" placement="topRight" title="删除本菜单与下级?" @confirm="() => handleDel(record)"> <a-popconfirm v-if="hasPerm('sys:menu:delete')" placement="topRight" title="删除本菜单与下级?" @confirm="() => handleDel(record)">
<a>删除</a> <a>删除</a>
</a-popconfirm> </a-popconfirm>