diff --git a/src/main.js b/src/main.js index f9b2e9f..5e9c056 100644 --- a/src/main.js +++ b/src/main.js @@ -54,6 +54,18 @@ Vue.config.productionTip = false Vue.use(Element, { size: Cookies.get('size') || 'small' // set element-ui default size }) + +// 树数据结构去除空子级 +Vue.prototype.removeEmptyChildren = function(data) { + for (let i = 0; i < data.length; i++) { + if (data[i].nodes && data[i].nodes.length > 0) { + this.removeEmptyChildren(data[i].nodes) + } else { + delete data[i].nodes + } + } + return data +} /* eslint-disable no-new */ new Vue({ el: '#app', diff --git a/src/views/train/synInfo/components/sendUtil.vue b/src/views/train/synInfo/components/sendUtil.vue index c1aeff2..6e06834 100644 --- a/src/views/train/synInfo/components/sendUtil.vue +++ b/src/views/train/synInfo/components/sendUtil.vue @@ -5,18 +5,47 @@ :append-to-body="appendToBody" :before-close="beforeClose" title="推送" - width="500px" + width="1000px" destroy-on-close> - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + +