Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-web
/
authority
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit c8cf8829
authored
Sep 29, 2018
by
cwq0219
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
树组件-强制渲染
1 parent
3e574839
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
9 deletions
src/components/RoleCreate/src/main.vue
src/components/Tree/src/main.vue
src/views/customer/user/index.vue
src/components/RoleCreate/src/main.vue
View file @
c8cf882
...
...
@@ -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"
:key
Fresh=
"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
:
''
,
key
1
:
Date
.
now
()
,
key
Fresh
:
Boolean
,
createRules
:
{
roleName
:
[
{
required
:
true
,
message
:
'请输入角色名称!'
,
trigger
:
'blur'
}
...
...
src/components/Tree/src/main.vue
View file @
c8cf882
<
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
,
key
Fresh
:
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
()
}
...
...
src/views/customer/user/index.vue
View file @
c8cf882
...
...
@@ -341,14 +341,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() {
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment