king
2023-03-11 34e7681fd12b1c4e4994d3bea1a553870e10bc50
src/menu/tablenodes/index.jsx
@@ -1,7 +1,7 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Modal, Button, notification, Spin, Input } from 'antd'
import { Modal, Button, notification, Spin, Input, message } from 'antd'
import { ForkOutlined } from '@ant-design/icons'
import Api from '@/api'
@@ -158,6 +158,7 @@
              id: 'par' + i,
              direction: 'left',
              color: '#5AD8A6',
              node: 'table',
              children: []
            }
@@ -232,7 +233,12 @@
    if (menu.direction !== 'right') return
    if (menu.depth === 1) {
      sessionStorage.setItem('mk-table-node', menu.label)
      window.open('#/hs')
      setTimeout(() => {
        sessionStorage.removeItem('mk-table-node')
      }, 50)
    } else if (menu.param) {
      if (menu.param.type === 'admin') {
        if (menu.param.MenuType === 'custom') {
@@ -354,6 +360,23 @@
          }
        })
        if (model.direction === 'left') {
          if (model.node === 'table') {
            model.fontcolor = '#1890ff'
            this.graph.updateItem(item, model, false)
            let oInput = document.createElement('input')
            oInput.value = model.label
            document.body.appendChild(oInput)
            oInput.select()
            document.execCommand('Copy')
            document.body.removeChild(oInput)
            message.success('表名复制成功。')
          }
          return
        }
        model.fontcolor = '#1890ff'
        this.graph.updateItem(item, model, false)