From 34e7681fd12b1c4e4994d3bea1a553870e10bc50 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期六, 11 三月 2023 17:58:54 +0800
Subject: [PATCH] 2023-03-11

---
 src/menu/tablenodes/index.jsx |   25 ++++++++++++++++++++++++-
 1 files changed, 24 insertions(+), 1 deletions(-)

diff --git a/src/menu/tablenodes/index.jsx b/src/menu/tablenodes/index.jsx
index 36281b2..e903da7 100644
--- a/src/menu/tablenodes/index.jsx
+++ b/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)
         

--
Gitblit v1.8.0