fix:菜单隐藏字段

This commit is contained in:
zhangzhiqiang
2022-12-09 10:21:13 +08:00
parent fba45c44b8
commit 1e3db94687
3 changed files with 14 additions and 10 deletions

View File

@@ -207,7 +207,7 @@ export default {
if (form.pid != null) { if (form.pid != null) {
this.getSupDepts(form.pid) this.getSupDepts(form.pid)
} else { } else {
this.getDepts() this.getDepts({ pidIsNull: true })
} }
}, },
getSupDepts(id) { getSupDepts(id) {
@@ -227,8 +227,9 @@ export default {
} }
}) })
}, },
getDepts() { getDepts(data) {
crudDept.getDeptvo({ is_used: '1' }).then(res => { data['is_used'] = '1'
crudDept.getDeptvo(data).then(res => {
this.depts = res.content.map(function(obj) { this.depts = res.content.map(function(obj) {
if (obj.hasChildren) { if (obj.hasChildren) {
obj.children = null obj.children = null

View File

@@ -36,7 +36,8 @@
highlight-current-row highlight-current-row
style="width: 100%;" style="width: 100%;"
@selection-change="crud.selectionChangeHandler" @selection-change="crud.selectionChangeHandler"
@current-change="handleCurrentChange"> @current-change="handleCurrentChange"
>
<el-table-column type="selection" width="55" /> <el-table-column type="selection" width="55" />
<el-table-column show-overflow-tooltip prop="code" label="编码" /> <el-table-column show-overflow-tooltip prop="code" label="编码" />
<el-table-column show-overflow-tooltip prop="name" label="名称" /> <el-table-column show-overflow-tooltip prop="name" label="名称" />
@@ -127,6 +128,8 @@ export default {
// 选中字典后,设置字典详情数据 // 选中字典后,设置字典详情数据
handleCurrentChange(val) { handleCurrentChange(val) {
if (val) { if (val) {
this.$refs.table.clearSelection()
this.$refs.table.toggleRowSelection(val, true)
this.$refs.dictDetail.query.code = val.code this.$refs.dictDetail.query.code = val.code
this.$refs.dictDetail.form.dictCode = val.code this.$refs.dictDetail.form.dictCode = val.code
this.$refs.dictDetail.crud.toQuery() this.$refs.dictDetail.crud.toQuery()

View File

@@ -69,8 +69,8 @@
</el-form-item> </el-form-item>
<el-form-item v-show="form.type.toString() !== '2' && form.type.toString() !== '1' " label="菜单可见" prop="hidden"> <el-form-item v-show="form.type.toString() !== '2' && form.type.toString() !== '1' " label="菜单可见" prop="hidden">
<el-radio-group v-model="form.hidden" size="mini"> <el-radio-group v-model="form.hidden" size="mini">
<el-radio-button label="1">是</el-radio-button> <el-radio-button label="0">是</el-radio-button>
<el-radio-button label="0">否</el-radio-button> <el-radio-button label="1">否</el-radio-button>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item v-if="form.type.toString() !== '2'" label="菜单标题" prop="title"> <el-form-item v-if="form.type.toString() !== '2'" label="菜单标题" prop="title">