| | |
| | | :loading="loading" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,type:'radio'}" |
| | | class="j-table-force-nowrap" |
| | | :customRow="customRow" |
| | | @change="handleTableChange"> |
| | | |
| | | <template slot="htmlSlot" slot-scope="text"> |
| | |
| | | this.$bus.$emit('queryTreeData') //刷新左侧树 |
| | | }, |
| | | |
| | | customRow(record) { |
| | | return { |
| | | on: { |
| | | click: () => { |
| | | this.onSelectChange(record.id.split(","), [record]); |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | |
| | | onSelectChange(selectedRowKeys) { |
| | | this.selectedRowKeys = selectedRowKeys; |
| | | //通过id查询管理参数和参数数据 |
| | |
| | | if (res.success) { |
| | | this.dataSource = res.result.records; // 更新表格数据 |
| | | this.ipagination.total = res.result.total |
| | | //默认选中第一条数据 |
| | | this.selectedRowKeys[0] = res.result.records[0].id |
| | | this.onSelectChange(this.selectedRowKeys) |
| | | } else { |
| | | this.$message.warning("请选择叶子节点进行查询"); |
| | | this.ipagination.total = 0 |