| | |
| | | |
| | | <!--产品结构树--> |
| | | <div style="flex: 1;overflow:auto;margin-top: 10px"> |
| | | <a-tree ref="tree" show-icon :expandedKeys.sync="expandedKeys" |
| | | <a-tree blockNode show-icon :expandedKeys.sync="expandedKeys" |
| | | :selectedKeys="selectedKeys" :treeData="treeDataSource" :autoExpandParent="autoExpandParent" |
| | | @select="handleTreeSelect" @expand="handleTreeExpand" @rightClick="handleTreeRightClick"> |
| | | <template slot="title" slot-scope="{ label, parentId, entity, key:treeKey,type}"> |
| | |
| | | |
| | | // 树节点右键单击菜单中删除按钮时触发 |
| | | handleDelete() { |
| | | this.$confirm({ |
| | | const that = this |
| | | that.$confirm({ |
| | | title: '提示', |
| | | content: '确认删除此条记录吗?', |
| | | okText: '确认', |
| | | okType: 'danger', |
| | | cancelText: '取消', |
| | | onOk: () => { |
| | | console.log('this.rightClickSelected.id', this.rightClickSelected.id) |
| | | if (!this.url.delete) { |
| | | this.$message.error('请设置url.delete属性!') |
| | | return |
| | | } |
| | | const that = this |
| | | deleteAction(that.url.delete, { id: this.rightClickSelected.id }) |
| | | .then((res) => { |
| | | if (res.success) { |
| | |
| | | }) |
| | | } |
| | | }) |
| | | .finally(() => { |
| | | that.$destroyAll() |
| | | }) |
| | | }, |
| | | onCancel: () => { |
| | | that.$destroyAll() |
| | | } |
| | | }) |
| | | }, |
| | |
| | | |
| | | /deep/ .ant-card-body, /deep/ .ant-spin-nested-loading, /deep/ .ant-spin-container { |
| | | height: 100%; |
| | | } |
| | | |
| | | /deep/ .ant-tree-node-content-wrapper { |
| | | width: calc(100% - 24px); |
| | | } |
| | | |
| | | /deep/ .ant-tree-title, .ant-tree-title .ant-dropdown-trigger { |