Commit 82c3190c by liwk

修改菜单、部门管理高度

1 parent 9dcc9c83
......@@ -15,7 +15,7 @@
</template>
<script type='text/ecmascript-6'>
// const timeTip = '系统自动生成(格式yyyy-MM-dd HH:mm:ss)'
const timeTip = '系统自动生成(格式yyyy-MM-dd HH:mm:ss)'
export default {
name: 'leftManager',
data() {
......@@ -68,10 +68,10 @@ export default {
for (const key in this.value.form) {
this.value.form[key] = null
}
// if (this.value.form.createTime !== undefined) {
// this.value.form.createTime = timeTip
// this.value.form.updateTime = timeTip
// }
if (this.value.form.createTime !== undefined) {
this.value.form.createTime = timeTip
this.value.form.updateTime = timeTip
}
}
}
}
......
......@@ -102,6 +102,8 @@ export default {
obj[key] = this.value.form[key]
}
if (!this.isDepart) delete obj.name
delete obj.createTime
delete obj.updateTime
return obj
},
// 接口调用-start
......
......@@ -44,6 +44,7 @@ export default {
},
watch: {
keyFresh(val) {
// console.log(val)
// console.log(`keyFresh----------------------${this.keyFresh}`)
// console.log(this.defaultCheckedKeys)
val && (this.checkStrictly = val) && this.loadingTree()
......@@ -58,12 +59,12 @@ export default {
},
check(data, treeData) {
this.$emit('input', { data, treeData })
this.checkStrictly = false
},
loadingTree() {
// console.log(this.checkStrictly)
!this.propsData && this.getData()
this.propsData && (this.data = fn(this.propsData, '#'))
this.checkStrictly = false
// console.log(this.checkStrictly)
// console.log(this.propsData)
// console.log(this.data)
......
......@@ -89,4 +89,7 @@ a:hover {
background-color: #fff;
border: 1px solid #ddd;
border-radius: 4px;
}
.mentBox{
overflow-y: scroll;
}
\ No newline at end of file
<!-- departmentManagement -->
<template>
<gl-row :gutter="50">
<gl-row :gutter="50" :style="{ height: height }" class="mentBox">
<gl-col :span='8'>
<left-manager :title='"部门列表"' isDepart v-model="department" :nodeClick='nodeClick'></left-manager>
</gl-col>
......@@ -17,6 +17,7 @@ export default {
name: 'department',
data() {
return {
height: 0,
department: {
sublings: false,
children: false,
......@@ -45,6 +46,9 @@ export default {
LeftManager,
RightForm
},
mounted() {
this.height = window.innerHeight + 'px'
},
methods: {
nodeClick(data, node, that, props) {
this.department.showDetails = true
......
<template>
<gl-row :gutter="100">
<gl-row :gutter="100" :style="{ height: height }" class="mentBox">
<gl-col :span='8'>
<left-manager :title='"菜单列表"' v-model="menuMG" :node-click='nodeClick'></left-manager>
</gl-col>
......@@ -8,7 +8,6 @@
</gl-col>
</gl-row>
</template>
<script>
import { LeftManager, RightForm } from '@/components/index'
import { findMenuById } from '@/api/api'
......@@ -16,6 +15,7 @@ export default {
name: 'menuMG',
data() {
return {
height: 0,
menuMG: {
sublings: false,
children: false,
......@@ -29,9 +29,9 @@ export default {
data: [],
form: {
id: 0,
urlName: 'ttt',
urlName: '',
hostName: '',
openStyle: '新系统',
openStyle: '',
menuType: '',
name: '',
path: '',
......@@ -39,8 +39,8 @@ export default {
baseUrl: '',
iorder: null,
isHidden: 0,
// createTime: null,
// updateTime: null,
createTime: null,
updateTime: null,
grade: 0,
iconUrl: '',
lastOperatorId: 0,
......@@ -102,6 +102,9 @@ export default {
LeftManager,
RightForm
},
mounted() {
this.height = window.innerHeight + 'px'
},
methods: {
nodeClick(data, node, that, props) {
this.menuMG.showDetails = true
......@@ -115,18 +118,12 @@ export default {
this.menuMG.del = true
this.menuMG.push = false
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)
for (const key in this.menuMG.form) {
if (key === 'isHidden') {
this.menuMG.form[key] = res[key] === 0
} else if (key === 'createTime' || key === 'updateTime') {
console.log(res[key])
this.menuMG.form[key] = res[key]
// this.menuMG.form[key] = new Date(res[key]).format('yyyy-MM-dd HH:mm:ss')
this.menuMG.form[key] = new Date(res[key]).format('yyyy-MM-dd HH:mm:ss')
} else if (key === 'name') {
this.menuMG.form[key] = node.level === 1 ? '顶级菜单' : node.parent.data[props.label]
} else {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!