zhaowei
2025-02-18 a422596c0f38efb21705edb749180b9f04ff349e
src/views/dnc/base/modules/ProductStructure/ProductStructureTree.vue
@@ -24,7 +24,7 @@
        <!--产品结构树-->
        <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}">
@@ -151,34 +151,40 @@
      // 树节点右键单击菜单中删除按钮时触发
      handleDelete() {
        this.$confirm({
        const that = this
        const { rightClickSelected: { id, type }, $confirm, url, $notification } = that
        $confirm({
          title: '提示',
          content: '确认删除此条记录吗?',
          okText: '确认',
          okType: 'danger',
          cancelText: '取消',
          onOk: () => {
            console.log('this.rightClickSelected.id', this.rightClickSelected.id)
            if (!this.url.delete) {
            if (!url.delete) {
              this.$message.error('请设置url.delete属性!')
              return
            }
            const that = this
            deleteAction(that.url.delete, { id: this.rightClickSelected.id })
            deleteAction(url.delete + `/${id}/${type}`)
              .then((res) => {
                if (res.success) {
                  that.getTreeDataByApi()
                  that.$notification.success({
                  $notification.success({
                    message: '消息',
                    description: res.message
                  })
                } else {
                  that.$notification.warning({
                  $notification.warning({
                    message: '消息',
                    description: res.message
                  })
                }
              })
              .finally(() => {
                that.$destroyAll()
              })
          },
          onCancel: () => {
            that.$destroyAll()
          }
        })
      },
@@ -298,10 +304,6 @@
  /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 {