| | |
| | | <template> |
| | | <div class="UI-dynamic" :id="'UI-dynamic-'+areasName+componentVO.oid"> |
| | | <dynamic-button v-if="componentVO.buttons && componentVO.buttons.length>0" :butttonList="componentVO.buttons" :selectList="checkDatas" type="tree" style="margin-bottom: 10px;"></dynamic-button> |
| | | <el-input |
| | | placeholder="输入关键字进行过滤" |
| | | v-model="filterText"> |
| | |
| | | <el-tree |
| | | class="filter-tree" |
| | | :show-checkbox="isMuti" |
| | | :check-on-click-node="true" |
| | | :lazy="lazy" |
| | | :data="data" |
| | | :load="loadNode" |
| | |
| | | }, |
| | | sourceData:{ |
| | | handler(newval) { |
| | | console.log(this.areasName); |
| | | console.log(newval); |
| | | //源数据有变化时变更当前区域数据 |
| | | this.initData(); |
| | | } |
| | | } |
| | | }, |
| | |
| | | label: 'text' |
| | | }, |
| | | lazy:this.componentVO.treeDefineVO.loadType == 'node', |
| | | isMuti:true, |
| | | isMuti:false, |
| | | data:[], |
| | | checkDatas:[] |
| | | } |
| | |
| | | this.initData(); |
| | | }, |
| | | mounted() { |
| | | console.log(this.$el.clientHeight) |
| | | if(this.componentVO.buttons && this.componentVO.buttons.length>0){ |
| | | this.$children[2].$el.style.height = 'calc(100% - 50px - '+this.$children[0].$el.clientHeight+'px - 10px)'; |
| | | } |
| | | }, |
| | | methods: { |
| | | filterNode(value, data) { |
| | |
| | | //逐级加载 |
| | | const parentOid = (node.level === 0) ? 0 : node.data.oid; |
| | | setTimeout(() => { |
| | | const data = [{ |
| | | name: 'leaf', |
| | | leaf: true |
| | | }, { |
| | | name: 'zone' |
| | | }]; |
| | | const data = this.data; |
| | | |
| | | resolve(data); |
| | | }, 500); |