From af6486b3629d23e426ce85b87dbc20dfa15b1afe Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 07 十一月 2022 18:50:27 +0800
Subject: [PATCH] 2022-11-07

---
 src/views/tabledesign/index.jsx |   17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)

diff --git a/src/views/tabledesign/index.jsx b/src/views/tabledesign/index.jsx
index 3980928..b68db34 100644
--- a/src/views/tabledesign/index.jsx
+++ b/src/views/tabledesign/index.jsx
@@ -35,6 +35,7 @@
 const StyleController = asyncComponent(() => import('@/menu/stylecontroller'))
 const ReplaceField = asyncComponent(() => import('@/menu/replaceField'))
 const Versions = asyncComponent(() => import('@/menu/versions'))
+const Transfer = asyncComponent(() => import('@/menu/transfer'))
 const Unattended = asyncComponent(() => import('@/templates/zshare/unattended'))
 const UrlFieldComponent = asyncComponent(() => import('@/menu/urlfieldcomponent'))
 const ModalController = asyncComponent(() => import('@/menu/modalconfig/controller'))
@@ -56,7 +57,7 @@
     oriConfig: null,
     config: null,
     comloading: false,
-    settingshow: true,
+    settingshow: sessionStorage.getItem('settingshow') !== 'false',
     view: null,
     popConfig: null
   }
@@ -688,6 +689,18 @@
       }
     })
 
+    if (!error && config.autoMatic && config.autoMatic.enable === 'true') {
+      let pass = false
+      config.components[0].action.forEach(item => {
+        if (item.uuid === config.autoMatic.action && (['pop', 'prompt', 'exec'].includes(item.OpenType) || (item.OpenType === 'funcbutton' && item.funcType === 'print'))) {
+          pass = true
+        }
+      })
+      if (!pass) {
+        error = '鏃犱汉鍊煎畧璁剧疆鏃犳晥锛�'
+      }
+    }
+
     if (show && error) {
       notification.warning({
         top: 92,
@@ -742,6 +755,7 @@
 
   changeSetting = () => {
     this.setState({settingshow: !this.state.settingshow})
+    sessionStorage.setItem('settingshow', '' + !this.state.settingshow)
   }
 
   render () {
@@ -799,6 +813,7 @@
                   <div style={{paddingLeft: '15px'}}> {config && config.MenuName} </div>
                 } bordered={false} extra={
                   <div>
+                    {config ? <Transfer config={config}/> : null}
                     {config ? <Unattended config={config} updateConfig={this.updateConfig}/> : null}
                     <Versions MenuId={MenuId} open_edition={config ? config.open_edition : ''}/>
                     <TableNodes config={config} />

--
Gitblit v1.8.0