| | |
| | | product: [], |
| | | list: [], |
| | | checkTreeNode: { |
| | | id:1, |
| | | id:'', |
| | | }, |
| | | tableData: [], |
| | | upIndex: 0, |
| | |
| | | this.$nextTick(() => { |
| | | this.$refs.tree.setCurrentKey(this.list[0].children[0].name) // 默认选中节点第一个 |
| | | }) |
| | | console.log("==========="); |
| | | console.log(this.list); |
| | | let one=this.list.filter(item=>{ |
| | | return item.children.length>0 |
| | | })[0] |
| | | console.log(one); |
| | | let id =one.children[0].id |
| | | console.log(id); |
| | | this.selectAllSelfStart(id) |
| | | this.selectDataList(); |
| | | console.log("==========="); |
| | | }) |
| | | }, |
| | | |
| | | //selectAllSelf checkTreeNode |
| | | //默认 |
| | | selectAllSelfStart(id) { |
| | | this.$axios.get(this.$api.url.selectAllSelf,{ |
| | | params:{id:id} |
| | | }).then(res => { |
| | | this.tableData = res.data; |
| | | console.log(this.tableData); |
| | | }) |
| | | }, |
| | | //右 |
| | | selectAllSelf() { |
| | | this.$axios.get(this.$api.url.selectAllSelf,{ |
| | | params:{id:this.checkTreeNode.id} |