From 0eb129a9beddbb86ae74d7106a8e60823206b8d5 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 14 十二月 2023 11:29:15 +0800
Subject: [PATCH] 2023-12-14

---
 src/views/tabledesign/index.jsx |   31 ++++++++++++++++++++++++++-----
 1 files changed, 26 insertions(+), 5 deletions(-)

diff --git a/src/views/tabledesign/index.jsx b/src/views/tabledesign/index.jsx
index a3a5952..68fc3b7 100644
--- a/src/views/tabledesign/index.jsx
+++ b/src/views/tabledesign/index.jsx
@@ -651,10 +651,10 @@
             duration: 2
           })
         } else {
-          notification.warning({
-            top: 92,
-            message: res.message,
-            duration: 5
+          Modal.warning({
+            width: 400,
+            title: res.message,
+            okText: '鐭ラ亾浜�'
           })
         }
         MKEmitter.emit('completeSave')
@@ -818,6 +818,27 @@
     sessionStorage.setItem('settingshow', '' + !this.state.settingshow)
   }
 
+  checklog = () => {
+    const { oriConfig, config } = this.state
+
+    return is(fromJS(oriConfig), fromJS(config))
+  }
+
+  updateLogConfig = (config) => {
+    config.fstMenuId = this.state.config.fstMenuId || config.fstMenuId || ''
+    config.parentId = this.state.config.parentId || config.parentId || ''
+
+    this.setState({
+      config: null
+    }, () => {
+      this.setState({
+        config: config
+      })
+    })
+    
+    window.GLOB.customMenu = config
+  }
+
   render () {
     const { view, activeKey, comloading, MenuId, config, settingshow, ParentId, menuloading } = this.state
 
@@ -875,7 +896,7 @@
                     {config ? <Debug config={config}/> : null}
                     {config ? <Transfer config={config}/> : null}
                     {config ? <Unattended config={config} updateConfig={this.updateConfig}/> : null}
-                    <Versions MenuId={MenuId} open_edition={config ? config.open_edition : ''}/>
+                    {config ? <Versions MenuId={MenuId} Template="BaseTable" checklog={this.checklog} updateConfig={this.updateLogConfig}/> : null}
                     <TableNodes config={config} />
                     <ReplaceField type="custom" config={config} updateConfig={this.resetConfig}/>
                     <PasteBaseTable type="page" insert={this.insert}/>

--
Gitblit v1.8.0