Commit 28911ba9 by 杨明

fixed

1 parent 667de11f
const staticRoutes = Object.freeze([{ const staticRoutes = Object.freeze([
{
name: 'Home', name: 'Home',
path: '/', path: '/',
meta: {}, meta: {},
...@@ -23,6 +24,12 @@ const staticRoutes = Object.freeze([{ ...@@ -23,6 +24,12 @@ const staticRoutes = Object.freeze([{
meta: {} meta: {}
}, },
{ {
name: 'grouping',
path: '/clientDataOverview/grouping/:id',
component: resolve => require([`@/views/clientDataOverview/grouping.vue`], resolve),
meta: {}
},
{
name: 'clientManage', name: 'clientManage',
path: '/clientManage/index', path: '/clientManage/index',
component: resolve => require([`@/views/clientManage/index.vue`], resolve), component: resolve => require([`@/views/clientManage/index.vue`], resolve),
......
...@@ -170,16 +170,24 @@ export default { ...@@ -170,16 +170,24 @@ export default {
this.loading = false this.loading = false
}) })
}, },
setTreeHeight() { setTreeHeight(domNode) {
const nodeHeight = document.querySelectorAll('.el-tree>.el-tree-node').length * 30 const nodeHeight = document.querySelectorAll('.el-tree>.el-tree-node').length * 30
if (domNode) {
domNode.style.maxHeight = this.$parent.heightBox - 80 - nodeHeight + 'px'
domNode.style.overflow = 'auto'
} else {
document.querySelector('.el-tree>.el-tree-node.is-expanded .el-tree-node__children').style.maxHeight = this.$parent.heightBox - 80 - nodeHeight + 'px' document.querySelector('.el-tree>.el-tree-node.is-expanded .el-tree-node__children').style.maxHeight = this.$parent.heightBox - 80 - nodeHeight + 'px'
document.querySelector('.el-tree>.el-tree-node.is-expanded .el-tree-node__children').style.overflow = 'auto' document.querySelector('.el-tree>.el-tree-node.is-expanded .el-tree-node__children').style.overflow = 'auto'
}
}, },
nodeExpand() { nodeExpand(data, node, target) {
if (data.sort) {
this.$nextTick(() => { this.$nextTick(() => {
this.setTreeHeight() const domNode = target.$refs.node.lastElementChild
this.setTreeHeight(domNode)
}) })
} }
}
}, },
mounted() { mounted() {
this.getTableList() this.getTableList()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!