| | |
| | | </template> |
| | | |
| | | <script> |
| | | import {getList, remove, update, add, getclient} from "@/api/client/client"; |
| | | import {getList, remove, update, add, getclient,getDeptLazyTree} from "@/api/client/client"; |
| | | import {mapGetters} from "vuex"; |
| | | |
| | | export default { |
| | |
| | | lazy: true, |
| | | treeLoad: function (node, resolve) { |
| | | const parentId = (node.level === 0) ? 0 : node.data.id; |
| | | getzcxlTree(parentId).then(res => { |
| | | getDeptLazyTree(parentId).then(res => { |
| | | resolve(res.data.data.map(item => { |
| | | return { |
| | | ...item, |
| | |
| | | option: { |
| | | height: 'auto', |
| | | indexLabel:'序号', |
| | | calcHeight: 30, |
| | | calcHeight: 80, |
| | | labelWidth:'100', |
| | | dialogWidth: 950, |
| | | tip: false, |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | nodeClick(data) { |
| | | this.treeDeptId = data.id; |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page); |
| | | }, |
| | | rowSave(row, done, loading) { |
| | | add(row).then(() => { |
| | | this.onLoad(this.page); |