From 6e7e09300fdbe74e7cb453a80d2de42caf54b39c Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 15 三月 2024 09:50:21 +0800
Subject: [PATCH] 2024-03-15

---
 src/templates/sharecomponent/actioncomponent/verifymegvii/index.scss  |    5 --
 src/views/tabledesign/index.jsx                                       |    7 +++
 src/views/login/loginform.jsx                                         |    9 +++-
 src/menu/components/table/edit-table/columns/tableIn/index.scss       |    4 --
 src/templates/sharecomponent/actioncomponent/verifyexcelin/index.scss |    4 --
 src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx |   67 ++++++++-------------------------
 src/views/login/index.jsx                                             |    8 ----
 7 files changed, 30 insertions(+), 74 deletions(-)

diff --git a/src/menu/components/table/edit-table/columns/tableIn/index.scss b/src/menu/components/table/edit-table/columns/tableIn/index.scss
index 16b42cb..2f0266d 100644
--- a/src/menu/components/table/edit-table/columns/tableIn/index.scss
+++ b/src/menu/components/table/edit-table/columns/tableIn/index.scss
@@ -52,10 +52,6 @@
   .custom-table .ant-empty {
     margin: 20px 8px!important;
   }
-  .excel-custom-table {
-    position: relative;
-    top: -25px;
-  }
   .errorval {
     display: inline-block;
     width: 30px;
diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.scss b/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.scss
index 120f02d..b73e55b 100644
--- a/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.scss
+++ b/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.scss
@@ -83,10 +83,6 @@
   .custom-table .ant-empty {
     margin: 20px 8px!important;
   }
-  .excel-custom-table {
-    position: relative;
-    top: -25px;
-  }
   .errorval {
     display: inline-block;
     width: 30px;
diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx
index 21d53fe..d1f3338 100644
--- a/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx
+++ b/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx
@@ -227,12 +227,12 @@
         dataIndex: 'operation',
         render: (text, record) =>
           (<div style={{textAlign: 'center'}}>
-            <span className="operation-btn" title="缂栬緫" onClick={() => this.handleEdit(record, 'scripts')} style={{color: '#1890ff'}}><EditOutlined /></span>
-            <span className="operation-btn" title="鐘舵�佸垏鎹�" onClick={() => this.handleStatus(record, 'scripts')} style={{color: '#8E44AD'}}><SwapOutlined /></span>
+            <span className="operation-btn" title="缂栬緫" onClick={() => this.handleEdit(record)} style={{color: '#1890ff'}}><EditOutlined /></span>
+            <span className="operation-btn" title="鐘舵�佸垏鎹�" onClick={() => this.handleStatus(record)} style={{color: '#8E44AD'}}><SwapOutlined /></span>
             <Popconfirm
               overlayClassName="popover-confirm"
               title="纭畾鍒犻櫎鍚�?"
-              onConfirm={() => this.handleDelete(record, 'scripts')
+              onConfirm={() => this.handleDelete(record)
             }>
               <span className="operation-btn" style={{color: '#ff4d4f'}}><DeleteOutlined /></span>
             </Popconfirm>
@@ -392,14 +392,9 @@
     })
   }
 
-  handleEdit = (record, type) => {
-    let node = null
-
-    if (type === 'scripts') {
-      this.scriptsForm.edit(record)
-      node = document.getElementById('mk-exout-script')
-    }
-
+  handleEdit = (record) => {
+    this.scriptsForm.edit(record)
+    let node = document.getElementById('mk-exout-script')
 
     if (node && node.scrollTop) {
       let inter = Math.ceil(node.scrollTop / 10)
@@ -415,19 +410,17 @@
     }
   }
 
-  handleStatus = (record, type) => {
+  handleStatus = (record) => {
     let verify = JSON.parse(JSON.stringify(this.state.verify))
     record.status = record.status === 'false' ? 'true' : 'false'
 
-    if (type === 'scripts') {
-      verify.scripts = verify.scripts.map(item => {
-        if (item.uuid === record.uuid) {
-          return record
-        } else {
-          return item
-        }
-      })
-    }
+    verify.scripts = verify.scripts.map(item => {
+      if (item.uuid === record.uuid) {
+        return record
+      } else {
+        return item
+      }
+    })
 
     this.setState({
       verify: verify
@@ -459,38 +452,12 @@
     })
   }
 
-  handleDelete = (record, type) => {
-    const { verify } = this.state
+  handleDelete = (record) => {
+    let verify = JSON.parse(JSON.stringify(this.state.verify))
 
-    verify.columns = verify.columns.filter(item => item.uuid !== record.uuid)
+    verify.scripts = verify.scripts.filter(item => item.uuid !== record.uuid)
 
     this.setState({ verify: verify })
-  }
-
-  handleUpDown = (record, type, direction) => {
-    let verify = JSON.parse(JSON.stringify(this.state.verify))
-    let index = 0
-
-    verify.columns = verify.columns.filter((item, i) => {
-      if (item.uuid === record.uuid) {
-        index = i
-      }
-
-      return item.uuid !== record.uuid
-    })
-    if ((index === 0 && direction === 'up') || (index === verify.columns.length && direction === 'down')) {
-      return
-    }
-
-    if (direction === 'up') {
-      verify.columns.splice(index - 1, 0, record)
-    } else {
-      verify.columns.splice(index + 1, 0, record)
-    }
-
-    this.setState({
-      verify: verify
-    })
   }
 
   showError = (errorType) => {
diff --git a/src/templates/sharecomponent/actioncomponent/verifymegvii/index.scss b/src/templates/sharecomponent/actioncomponent/verifymegvii/index.scss
index c26f463..457bdae 100644
--- a/src/templates/sharecomponent/actioncomponent/verifymegvii/index.scss
+++ b/src/templates/sharecomponent/actioncomponent/verifymegvii/index.scss
@@ -9,11 +9,6 @@
     word-wrap: break-word;
     word-break: break-word;
   }
-
-  .excel-custom-table {
-    position: relative;
-    top: -25px;
-  }
   .errorval {
     display: inline-block;
     width: 30px;
diff --git a/src/views/login/index.jsx b/src/views/login/index.jsx
index d3e22d8..01d88f8 100644
--- a/src/views/login/index.jsx
+++ b/src/views/login/index.jsx
@@ -41,13 +41,6 @@
     syncing: false,
   }
 
-  changelang (item) {
-    // 鍒囨崲璇█
-    this.setState({
-      dict: item === 'zh-CN' ? zhCN : enUS
-    })
-  }
-
   handleSubmit = () => {
     this.loginformRef.handleConfirm().then(res => {
       this.setState({
@@ -880,7 +873,6 @@
             lang={this.state.selectedlang}
             langList={this.state.langList}
             isDisabled={this.state.isDisabled}
-            changelang={(value) => this.changelang(value)}
             handleSubmit={() => this.handleSubmit()}
             authLogin={this.authLogin}
             wrappedComponentRef={(inst) => this.loginformRef = inst}
diff --git a/src/views/login/loginform.jsx b/src/views/login/loginform.jsx
index 4fdab93..057d84b 100644
--- a/src/views/login/loginform.jsx
+++ b/src/views/login/loginform.jsx
@@ -18,7 +18,6 @@
 class LoginTabForm extends Component {
   static propTpyes = {
     isDisabled: PropTypes.bool,
-    changelang: PropTypes.func,
     handleSubmit: PropTypes.func,
     authLogin: PropTypes.func,
     dict: PropTypes.object,
@@ -174,8 +173,12 @@
     })
   }
 
-  changelang = (item) => {
-    this.props.changelang(item)
+  changelang = (val) => {
+    const _href = window.location.href.split('#')[0]
+    localStorage.setItem(_href + 'lang', val)
+    sessionStorage.setItem('lang', val)
+
+    window.location.reload()
   }
 
   handleSubmit = e => {
diff --git a/src/views/tabledesign/index.jsx b/src/views/tabledesign/index.jsx
index 7d16779..8a10070 100644
--- a/src/views/tabledesign/index.jsx
+++ b/src/views/tabledesign/index.jsx
@@ -892,6 +892,13 @@
               <div className={'menu-view' + (menuloading ? ' saving' : '')}>
                 <Card bordered={false} extra={
                   <div className="mk-opeartion-list">
+                    {/* <Dropdown overlay={
+                      <div className="mk-button-dropdown-wrap">
+                        <ReplaceField type="custom" config={config} updateConfig={this.resetConfig}/>
+                      </div>
+                    } trigger={['click']} placement="bottomCenter">
+                      <Button className="mk-button-more">鏇村<DownOutlined/></Button>
+                    </Dropdown> */}
                     {config ? <Debug config={config}/> : null}
                     {config ? <Transfer config={config}/> : null}
                     {config ? <Unattended config={config} updateConfig={this.updateConfig}/> : null}

--
Gitblit v1.8.0