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/pcdesign/index.jsx |   30 +++++++++++++++++++++++++-----
 1 files changed, 25 insertions(+), 5 deletions(-)

diff --git a/src/views/pcdesign/index.jsx b/src/views/pcdesign/index.jsx
index 51d198e..bc099f8 100644
--- a/src/views/pcdesign/index.jsx
+++ b/src/views/pcdesign/index.jsx
@@ -531,6 +531,7 @@
 
         config.uuid = MenuId
         config.MenuID = MenuId
+        config.Template = 'webPage'
         config.open_edition = result.open_edition || ''
         window.GLOB.urlFields = config.urlFields || []
 
@@ -737,6 +738,7 @@
       
       config.uuid = MenuId
       config.MenuID = MenuId
+      config.Template = 'webPage'
       config.open_edition = ''
       config.MenuName = urlParam.MenuName || ''
       config.MenuNo = ''
@@ -1405,10 +1407,10 @@
             duration: 2
           })
         } else {
-          notification.warning({
-            top: 92,
-            message: res.message,
-            duration: 5
+          Modal.warning({
+            width: 400,
+            title: res.message,
+            okText: '鐭ラ亾浜�'
           })
         }
         MKEmitter.emit('completeSave')
@@ -1676,6 +1678,24 @@
     })
   }
 
+  checklog = () => {
+    const { oriConfig, config } = this.state
+
+    return is(fromJS(oriConfig), fromJS(config))
+  }
+
+  updateLogConfig = (config) => {
+    this.setState({
+      config: null
+    }, () => {
+      this.setState({
+        config: config
+      })
+    })
+    
+    window.GLOB.customMenu = config
+  }
+
   render () {
     const { view, loading, comloading, activeKey, settingshow, controlshow, MenuId, config, menuloading, eyeopen, needUpdate } = this.state
 
@@ -1742,7 +1762,7 @@
                 <Button className="mk-border-purple" onClick={this.setLoginView}><LoginOutlined/> 璁句负鐧诲綍椤�</Button>
                 <ReplaceField type="custom" config={config} updateConfig={this.resetConfig}/>
                 <Transfer MenuID={MenuId} />
-                <Versions MenuId={MenuId} open_edition={config ? config.open_edition : ''}/>
+                {config ? <Versions MenuId={MenuId} Template="webPage" checklog={this.checklog} updateConfig={this.updateLogConfig}/> : null}
                 <Button type="default" onClick={this.closeView}>鍏抽棴</Button>
               </div>
             </div>

--
Gitblit v1.8.0