Commit 96c1735d by 胡悦

Merge branch 'master' of https://github.com/glsx-web/authority

2 parents ec86d91f c8cf8829
......@@ -21,7 +21,7 @@
</gl-select>
</gl-form-item>
<gl-form-item label="菜单选项:" prop="rights">
<tree ref='tree' v-model="createRuleForm.rights" :show-checkbox="show_checkbox" :defaultExpandAll="defaultExpandAll" :defaultCheckedKeys="createRuleForm.rights" @input="getMenuOption" style="height:160px" :key="key"></tree>
<tree ref='tree' v-model="createRuleForm.rights" :show-checkbox="show_checkbox" :defaultExpandAll="defaultExpandAll" :defaultCheckedKeys="createRuleForm.rights" @input="getMenuOption" style="height:160px" :keyFresh="keyFresh"></tree>
</gl-form-item>
</gl-form>
<div slot="footer" class="dialog-footer">
......@@ -32,7 +32,6 @@
</template>
<script>
// import { roleCreateStructure } from '@/common/commonConst'
export default {
name: 'RoleCreate',
props: {
......@@ -43,7 +42,7 @@ export default {
watch: {
createVisible(val) {
!val && this.$refs['createRuleForm'].resetFields()
val && (this.key = Date.now())
this.keyFresh = val
},
flagCOrE(val) {
this.title = val ? '新建角色' : '角色列表'
......@@ -60,7 +59,7 @@ export default {
departName: [],
numberErr: false,
title: '',
key1: Date.now(),
keyFresh: Boolean,
createRules: {
roleName: [
{ required: true, message: '请输入角色名称!', trigger: 'blur' }
......
<template>
<div class="tree" :style="treeStyle" :key="key">
<div class="tree" :style="treeStyle" >
<gl-tree
ref='tree'
highlight-current
......@@ -28,7 +28,7 @@ export default {
}
},
props: {
key: Number,
keyFresh: Boolean,
showCheckbox: Boolean,
value: null,
defaultExpandAll: Boolean,
......@@ -41,6 +41,11 @@ export default {
propsData: null
},
watch: {
keyFresh(val) {
// console.log(`keyFresh----------------------${this.keyFresh}`)
// console.log(this.defaultCheckedKeys)
val && this.loadingTree()
},
propsData(val) {
this.loadingTree()
}
......
......@@ -352,14 +352,14 @@ export default {
this.consoleParam = []
this.flagRoleOrUser = false
this.apiParam = this.$deep_clone(rows[index])
console.log(rows[index])
// console.log(rows[index])
this.apiParam.roles = this.findRolesName(this.apiParam.roles)
console.log(this.apiParam)
// console.log(this.apiParam)
this.userDetailVisible = !this.userDetailVisible
},
handleUserDetailClose() {
this.userDetailVisible = !this.userDetailVisible
this.apiParam = Number
this.apiParam = Object
}
// 修改启用禁用
// updateState() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!