From 326aa6b3effaccc71cfe0775d47b0f29eb3695a6 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期日, 25 八月 2024 00:36:40 +0800
Subject: [PATCH] 2024-08-25

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

diff --git a/src/menu/modalconfig/index.jsx b/src/menu/modalconfig/index.jsx
index 9124c01..e76889a 100644
--- a/src/menu/modalconfig/index.jsx
+++ b/src/menu/modalconfig/index.jsx
@@ -21,7 +21,7 @@
 const TableComponent = asyncComponent(() => import('./tablecomponent'))
 const ModalForm = asyncComponent(() => import('@/templates/zshare/modalform'))
 const PasteForms = asyncComponent(() => import('@/menu/components/share/pasteforms'))
-// const FormFork = asyncComponent(() => import('@/menu/modalconfig/formfork'))
+const FormFork = asyncComponent(() => import('@/menu/modalconfig/formfork'))
 const DragElement = asyncComponent(() => import('@/templates/modalconfig/dragelement'))
 const FieldsComponent = asyncComponent(() => import('@/templates/sharecomponent/fieldscomponent'))
 
@@ -165,15 +165,15 @@
    * @description 琛ㄥ崟鍒犻櫎骞跺埛鏂�
    */
   closeForm = (card) => {
-    let _this = this
+    let that = this
 
     confirm({
       content: `纭畾鍒犻櫎${card.label ? `<<${card.label}>>` : ''}鍚楋紵`,
       onOk() {
-        let _config = fromJS(_this.state.config).toJS()
+        let _config = fromJS(that.state.config).toJS()
         _config.fields = _config.fields.filter(item => !(item.uuid === card.uuid))
 
-        _this.setState({
+        that.setState({
           config: _config,
         })
       },
@@ -193,13 +193,13 @@
   }
 
   clearConfig = () => {
-    const _this = this
+    const that = this
     let _config = {...this.state.config, fields: []}
 
     confirm({
       content: '纭畾娓呯┖琛ㄥ崟鍚楋紵',
       onOk() {
-        _this.setState({ config: _config })
+        that.setState({ config: _config })
       },
       onCancel() {}
     })
@@ -213,11 +213,11 @@
     const { config, originConfig } = this.state
 
     if (!is(fromJS(config), fromJS(originConfig))) {
-      let _this = this
+      let that = this
       confirm({
         content: '閰嶇疆淇℃伅鏈繚瀛橈紝纭畾杩斿洖鍚楋紵',
         onOk() {
-          _this.props.handleBack()
+          that.props.handleBack()
         },
         onCancel() {}
       })
@@ -279,7 +279,7 @@
 
   changecols = (type) => {
     let config = fromJS(this.state.config).toJS()
-    let _this = this
+    let that = this
 
     config.fields = config.fields.map(item => {
       item.labelwidth = 33.3
@@ -305,7 +305,7 @@
     confirm({
       content: `纭畾鍒囨崲涓�${type}鍒楀悧锛焋,
       onOk() {
-        _this.setState({config})
+        that.setState({config})
       },
       onCancel() {}
     })
@@ -394,7 +394,7 @@
               <div>
                 <PasteForms type="toolbar" config={config} update={this.pasteFields}/>
                 <Button type="primary" id="save-modal-config" loading={saving} onClick={this.submitConfig}>淇濆瓨</Button>
-                <Button onClick={this.cancelConfig}>杩斿洖</Button>
+                <Button disabled={saving} onClick={this.cancelConfig}>杩斿洖</Button>
               </div>
             } style={{ width: '100%' }}>
               <SettingOutlined onClick={this.changeSetting} />
@@ -413,7 +413,7 @@
                     } trigger="hover">
                       <SwapOutlined />
                     </Popover>
-                    {/* <FormFork forms={config.fields}/> */}
+                    <FormFork forms={config.fields}/>
                     <CopyOutlined title="澶嶅埗" onClick={this.triggerCopy} />
                     <Switch checkedChildren="寮�" unCheckedChildren="鍏�" defaultChecked={this.state.showField} onChange={(val) => this.setState({showField: val})} />
                   </div>

--
Gitblit v1.8.0