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

---
 src/templates/sharecomponent/columncomponent/index.jsx |   26 +++++++++++++-------------
 1 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/src/templates/sharecomponent/columncomponent/index.jsx b/src/templates/sharecomponent/columncomponent/index.jsx
index 71179be..e488a3d 100644
--- a/src/templates/sharecomponent/columncomponent/index.jsx
+++ b/src/templates/sharecomponent/columncomponent/index.jsx
@@ -4,7 +4,7 @@
 import { Modal, notification, Switch, message } from 'antd'
 import { CopyOutlined } from '@ant-design/icons'
 
-import { getColumnForm } from '@/templates/zshare/formconfig'
+import { getColumnForm } from './formconfig'
 
 import ColumnForm from './columnform'
 import ColspanForm from './colspanform'
@@ -280,12 +280,12 @@
    */
   deleteElement = (card) => {
     const { config } = this.props
-    let _this = this
+    let that = this
 
     confirm({
       content: `纭畾鍒犻櫎 - ${card.label} 锛焋,
       onOk() {
-        let _columnlist = fromJS(_this.state.columnlist).toJS()
+        let _columnlist = fromJS(that.state.columnlist).toJS()
 
         _columnlist = _columnlist.filter(item => item.uuid !== card.uuid)
 
@@ -351,10 +351,10 @@
           }
         }
 
-        _this.setState({
+        that.setState({
           columnlist: _columnlist
         }, ()=> {
-          _this.props.updatecolumn({...config, columns: _columnlist})
+          that.props.updatecolumn({...config, columns: _columnlist})
         })
       },
       onCancel() {}
@@ -373,7 +373,7 @@
       columns: columnlist
     }
 
-    let srcid = localStorage.getItem(window.location.href.split('#')[0] + 'srcId')
+    let srcid = localStorage.getItem(window.GLOB.sysSign + 'srcId')
     if (srcid) {
       val.$srcId = srcid
     }
@@ -470,18 +470,18 @@
     })
   }
 
-  revert = () => {
-    this.setState({
-      columnlist: fromJS(this.props.config.columns).toJS()
-    })
-  }
+  // revert = () => {
+  //   this.setState({
+  //     columnlist: fromJS(this.props.config.columns).toJS()
+  //   })
+  // }
 
   shouldComponentUpdate (nextProps, nextState) {
     return !is(fromJS(this.props), fromJS(nextProps)) || !is(fromJS(this.state), fromJS(nextState))
   }
 
   componentDidMount () {
-    MKEmitter.addListener('revert', this.revert)
+    // MKEmitter.addListener('revert', this.revert)
     MKEmitter.addListener('plusColumns', this.plusColumns)
   }
 
@@ -492,7 +492,7 @@
     this.setState = () => {
       return
     }
-    MKEmitter.removeListener('revert', this.revert)
+    // MKEmitter.removeListener('revert', this.revert)
     MKEmitter.removeListener('plusColumns', this.plusColumns)
   }
 

--
Gitblit v1.8.0