| | |
| | | <template> |
| | | <basic-container> |
| | | <avue-crud :option="option" |
| | | :page.sync="page" |
| | | :table-loading="loading" |
| | | :data="data" |
| | | ref="crud" |
| | |
| | | option: { |
| | | lazy: true, |
| | | tip: false, |
| | | simplePage: true, |
| | | height:'auto', |
| | | maxHeight:600, |
| | | // simplePage: true, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | tree: true, |
| | |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | this.loading = true; |
| | | getLazyList(this.parentId, Object.assign(params, this.query)).then(res => { |
| | | this.data = res.data.data; |
| | | getLazyList(this.parentId,Object.assign(params, this.query),this.page.currentPage, this.page.pageSize).then(res => { |
| | | this.data = res.data.data.records; |
| | | this.page.total=res.data.data.total |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }); |
| | |
| | | treeLoad(tree, treeNode, resolve) { |
| | | const parentId = tree.id; |
| | | getLazyList(parentId).then(res => { |
| | | resolve(res.data.data); |
| | | resolve(res.data.data.records); |
| | | }); |
| | | } |
| | | } |