| | |
| | | created() { |
| | | this.getList() |
| | | this.getTreeselect() |
| | | console.log(this.treeOptions) |
| | | if (this.openPage) { |
| | | this.autoSelectCarrierTree() |
| | | } |
| | | }, |
| | | methods: { |
| | | autoSelectCarrierTree() { |
| | | setTimeout(() => { |
| | | if (this.$refs.tree && this.treeOptions) { |
| | | // 👇 这里换成你真实的【承运商分类ID】 |
| | | const carrierId = "1" |
| | | |
| | | // 自动选中节点 |
| | | this.$refs.tree.setCurrentKey(carrierId) |
| | | |
| | | // 自动触发节点点击,执行筛选 |
| | | let node = this.$refs.tree.getNode(carrierId) |
| | | if (node) { |
| | | this.handleNodeClick(node.data) |
| | | } |
| | | } |
| | | }, 300) |
| | | }, |
| | | getSummaries(param) { |
| | | const { columns, data } = param; |
| | | const sums = []; |