From 49f09cc6f8ff8c30a75ed1a9d6f510b69b73962a Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 12 十二月 2023 21:05:37 +0800
Subject: [PATCH] 2023-12-12

---
 src/views/menudesign/index.jsx |   23 ++++++++++++++++++++++-
 1 files changed, 22 insertions(+), 1 deletions(-)

diff --git a/src/views/menudesign/index.jsx b/src/views/menudesign/index.jsx
index 81fa513..3a98723 100644
--- a/src/views/menudesign/index.jsx
+++ b/src/views/menudesign/index.jsx
@@ -1108,6 +1108,27 @@
     }, 400)
   }
 
+  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, comloading, MenuType, MenuId, config, settingshow, ParentId, menuloading, eyeopen, needUpdate } = this.state
 
@@ -1168,7 +1189,7 @@
                   <div className="mk-opeartion-list">
                     {config ? <Debug config={config}/> : null}
                     <Button className="mk-border-purple" onClick={() => this.setState({eyeopen: !eyeopen})}>{!eyeopen ? <EyeOutlined /> : <EyeInvisibleOutlined />} 缁勪欢鍚�</Button>
-                    <Versions MenuId={MenuId} open_edition={config ? config.open_edition : ''}/>
+                    {config ? <Versions MenuId={MenuId} Template="CustomPage" checklog={this.checklog} updateConfig={this.updateLogConfig}/> : null}
                     <TableNodes config={config} />
                     <ReplaceField type="custom" config={config} updateConfig={this.resetConfig}/>
                     <SysInterface config={config} updateConfig={this.updateConfig}/>

--
Gitblit v1.8.0