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 82c3190c
authored
Sep 29, 2018
by
liwk
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改菜单、部门管理高度
1 parent
9dcc9c83
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
27 additions
and
20 deletions
src/components/LeftManager/src/main.vue
src/components/RightForm/src/main.vue
src/components/Tree/src/main.vue
src/styles/index.scss
src/views/customer/department/index.vue
src/views/customer/menu/index.vue
src/components/LeftManager/src/main.vue
View file @
82c3190
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
</
template
>
</
template
>
<
script
type=
'text/ecmascript-6'
>
<
script
type=
'text/ecmascript-6'
>
//
const timeTip = '系统自动生成(格式yyyy-MM-dd HH:mm:ss)'
const
timeTip
=
'系统自动生成(格式yyyy-MM-dd HH:mm:ss)'
export
default
{
export
default
{
name
:
'leftManager'
,
name
:
'leftManager'
,
data
()
{
data
()
{
...
@@ -68,10 +68,10 @@ export default {
...
@@ -68,10 +68,10 @@ export default {
for
(
const
key
in
this
.
value
.
form
)
{
for
(
const
key
in
this
.
value
.
form
)
{
this
.
value
.
form
[
key
]
=
null
this
.
value
.
form
[
key
]
=
null
}
}
//
if (this.value.form.createTime !== undefined) {
if
(
this
.
value
.
form
.
createTime
!==
undefined
)
{
//
this.value.form.createTime = timeTip
this
.
value
.
form
.
createTime
=
timeTip
//
this.value.form.updateTime = timeTip
this
.
value
.
form
.
updateTime
=
timeTip
//
}
}
}
}
}
}
}
}
...
...
src/components/RightForm/src/main.vue
View file @
82c3190
...
@@ -102,6 +102,8 @@ export default {
...
@@ -102,6 +102,8 @@ export default {
obj
[
key
]
=
this
.
value
.
form
[
key
]
obj
[
key
]
=
this
.
value
.
form
[
key
]
}
}
if
(
!
this
.
isDepart
)
delete
obj
.
name
if
(
!
this
.
isDepart
)
delete
obj
.
name
delete
obj
.
createTime
delete
obj
.
updateTime
return
obj
return
obj
},
},
// 接口调用-start
// 接口调用-start
...
...
src/components/Tree/src/main.vue
View file @
82c3190
...
@@ -44,6 +44,7 @@ export default {
...
@@ -44,6 +44,7 @@ export default {
},
},
watch
:
{
watch
:
{
keyFresh
(
val
)
{
keyFresh
(
val
)
{
// console.log(val)
// console.log(`keyFresh----------------------${this.keyFresh}`)
// console.log(`keyFresh----------------------${this.keyFresh}`)
// console.log(this.defaultCheckedKeys)
// console.log(this.defaultCheckedKeys)
val
&&
(
this
.
checkStrictly
=
val
)
&&
this
.
loadingTree
()
val
&&
(
this
.
checkStrictly
=
val
)
&&
this
.
loadingTree
()
...
@@ -58,12 +59,12 @@ export default {
...
@@ -58,12 +59,12 @@ export default {
},
},
check
(
data
,
treeData
)
{
check
(
data
,
treeData
)
{
this
.
$emit
(
'input'
,
{
data
,
treeData
})
this
.
$emit
(
'input'
,
{
data
,
treeData
})
this
.
checkStrictly
=
false
},
},
loadingTree
()
{
loadingTree
()
{
// console.log(this.checkStrictly)
// console.log(this.checkStrictly)
!
this
.
propsData
&&
this
.
getData
()
!
this
.
propsData
&&
this
.
getData
()
this
.
propsData
&&
(
this
.
data
=
fn
(
this
.
propsData
,
'#'
))
this
.
propsData
&&
(
this
.
data
=
fn
(
this
.
propsData
,
'#'
))
this
.
checkStrictly
=
false
// console.log(this.checkStrictly)
// console.log(this.checkStrictly)
// console.log(this.propsData)
// console.log(this.propsData)
// console.log(this.data)
// console.log(this.data)
...
...
src/styles/index.scss
View file @
82c3190
...
@@ -89,4 +89,7 @@ a:hover {
...
@@ -89,4 +89,7 @@ a:hover {
background-color
:
#fff
;
background-color
:
#fff
;
border
:
1px
solid
#ddd
;
border
:
1px
solid
#ddd
;
border-radius
:
4px
;
border-radius
:
4px
;
}
.mentBox
{
overflow-y
:
scroll
;
}
}
\ No newline at end of file
\ No newline at end of file
src/views/customer/department/index.vue
View file @
82c3190
<!-- departmentManagement -->
<!-- departmentManagement -->
<
template
>
<
template
>
<gl-row
:gutter=
"50
"
>
<gl-row
:gutter=
"50"
:style=
"
{ height: height }" class="mentBox
">
<gl-col
:span=
'8'
>
<gl-col
:span=
'8'
>
<left-manager
:title=
'"部门列表"'
isDepart
v-model=
"department"
:nodeClick=
'nodeClick'
></left-manager>
<left-manager
:title=
'"部门列表"'
isDepart
v-model=
"department"
:nodeClick=
'nodeClick'
></left-manager>
</gl-col>
</gl-col>
...
@@ -17,6 +17,7 @@ export default {
...
@@ -17,6 +17,7 @@ export default {
name
:
'department'
,
name
:
'department'
,
data
()
{
data
()
{
return
{
return
{
height
:
0
,
department
:
{
department
:
{
sublings
:
false
,
sublings
:
false
,
children
:
false
,
children
:
false
,
...
@@ -45,6 +46,9 @@ export default {
...
@@ -45,6 +46,9 @@ export default {
LeftManager
,
LeftManager
,
RightForm
RightForm
},
},
mounted
()
{
this
.
height
=
window
.
innerHeight
+
'px'
},
methods
:
{
methods
:
{
nodeClick
(
data
,
node
,
that
,
props
)
{
nodeClick
(
data
,
node
,
that
,
props
)
{
this
.
department
.
showDetails
=
true
this
.
department
.
showDetails
=
true
...
...
src/views/customer/menu/index.vue
View file @
82c3190
<
template
>
<
template
>
<gl-row
:gutter=
"100"
>
<gl-row
:gutter=
"100"
:style=
"
{ height: height }" class="mentBox"
>
<gl-col
:span=
'8'
>
<gl-col
:span=
'8'
>
<left-manager
:title=
'"菜单列表"'
v-model=
"menuMG"
:node-click=
'nodeClick'
></left-manager>
<left-manager
:title=
'"菜单列表"'
v-model=
"menuMG"
:node-click=
'nodeClick'
></left-manager>
</gl-col>
</gl-col>
...
@@ -8,7 +8,6 @@
...
@@ -8,7 +8,6 @@
</gl-col>
</gl-col>
</gl-row>
</gl-row>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
LeftManager
,
RightForm
}
from
'@/components/index'
import
{
LeftManager
,
RightForm
}
from
'@/components/index'
import
{
findMenuById
}
from
'@/api/api'
import
{
findMenuById
}
from
'@/api/api'
...
@@ -16,6 +15,7 @@ export default {
...
@@ -16,6 +15,7 @@ export default {
name
:
'menuMG'
,
name
:
'menuMG'
,
data
()
{
data
()
{
return
{
return
{
height
:
0
,
menuMG
:
{
menuMG
:
{
sublings
:
false
,
sublings
:
false
,
children
:
false
,
children
:
false
,
...
@@ -29,9 +29,9 @@ export default {
...
@@ -29,9 +29,9 @@ export default {
data
:
[],
data
:
[],
form
:
{
form
:
{
id
:
0
,
id
:
0
,
urlName
:
'
ttt
'
,
urlName
:
''
,
hostName
:
''
,
hostName
:
''
,
openStyle
:
'
新系统
'
,
openStyle
:
''
,
menuType
:
''
,
menuType
:
''
,
name
:
''
,
name
:
''
,
path
:
''
,
path
:
''
,
...
@@ -39,8 +39,8 @@ export default {
...
@@ -39,8 +39,8 @@ export default {
baseUrl
:
''
,
baseUrl
:
''
,
iorder
:
null
,
iorder
:
null
,
isHidden
:
0
,
isHidden
:
0
,
//
createTime: null,
createTime
:
null
,
//
updateTime: null,
updateTime
:
null
,
grade
:
0
,
grade
:
0
,
iconUrl
:
''
,
iconUrl
:
''
,
lastOperatorId
:
0
,
lastOperatorId
:
0
,
...
@@ -102,6 +102,9 @@ export default {
...
@@ -102,6 +102,9 @@ export default {
LeftManager
,
LeftManager
,
RightForm
RightForm
},
},
mounted
()
{
this
.
height
=
window
.
innerHeight
+
'px'
},
methods
:
{
methods
:
{
nodeClick
(
data
,
node
,
that
,
props
)
{
nodeClick
(
data
,
node
,
that
,
props
)
{
this
.
menuMG
.
showDetails
=
true
this
.
menuMG
.
showDetails
=
true
...
@@ -115,18 +118,12 @@ export default {
...
@@ -115,18 +118,12 @@ export default {
this
.
menuMG
.
del
=
true
this
.
menuMG
.
del
=
true
this
.
menuMG
.
push
=
false
this
.
menuMG
.
push
=
false
findMenuById
.
req
({
id
:
data
.
id
}).
then
(
res
=>
{
findMenuById
.
req
({
id
:
data
.
id
}).
then
(
res
=>
{
// for (const key in res) {
// console.log(res[key], typeof res[key], key)
// }
// console.log(this.menuMG.allNode, this.menuMG.node)
console
.
log
(
res
)
console
.
log
(
res
)
for
(
const
key
in
this
.
menuMG
.
form
)
{
for
(
const
key
in
this
.
menuMG
.
form
)
{
if
(
key
===
'isHidden'
)
{
if
(
key
===
'isHidden'
)
{
this
.
menuMG
.
form
[
key
]
=
res
[
key
]
===
0
this
.
menuMG
.
form
[
key
]
=
res
[
key
]
===
0
}
else
if
(
key
===
'createTime'
||
key
===
'updateTime'
)
{
}
else
if
(
key
===
'createTime'
||
key
===
'updateTime'
)
{
console
.
log
(
res
[
key
])
this
.
menuMG
.
form
[
key
]
=
new
Date
(
res
[
key
]).
format
(
'yyyy-MM-dd HH:mm:ss'
)
this
.
menuMG
.
form
[
key
]
=
res
[
key
]
// this.menuMG.form[key] = new Date(res[key]).format('yyyy-MM-dd HH:mm:ss')
}
else
if
(
key
===
'name'
)
{
}
else
if
(
key
===
'name'
)
{
this
.
menuMG
.
form
[
key
]
=
node
.
level
===
1
?
'顶级菜单'
:
node
.
parent
.
data
[
props
.
label
]
this
.
menuMG
.
form
[
key
]
=
node
.
level
===
1
?
'顶级菜单'
:
node
.
parent
.
data
[
props
.
label
]
}
else
{
}
else
{
...
...
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