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/tabscomponent/index.jsx |   27 +++++++++++----------------
 1 files changed, 11 insertions(+), 16 deletions(-)

diff --git a/src/templates/sharecomponent/tabscomponent/index.jsx b/src/templates/sharecomponent/tabscomponent/index.jsx
index 43e9a29..73c4dba 100644
--- a/src/templates/sharecomponent/tabscomponent/index.jsx
+++ b/src/templates/sharecomponent/tabscomponent/index.jsx
@@ -5,9 +5,7 @@
 import { QuestionCircleOutlined, ArrowDownOutlined, ArrowUpOutlined, PlusOutlined, DeleteOutlined } from '@ant-design/icons'
 
 import Utils from '@/utils/utils.js'
-import zhCN from '@/locales/zh-CN/model.js'
-import enUS from '@/locales/en-US/model.js'
-import { getTabForm } from '@/templates/zshare/formconfig'
+import { getTabForm } from './formconfig'
 
 import TabForm from './tabform'
 import TabDragElement from './tabdragelement'
@@ -24,7 +22,6 @@
   }
 
   state = {
-    dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
     tabgroups: [],     // 鏍囩缁�
     card: [],          // 缂栬緫鏍囩
     group: [],         // 缂栬緫缁�
@@ -222,7 +219,7 @@
    */
   deleteElement = (card, group) => {
     const { config } = this.props
-    let _this = this
+    let that = this
     let tabgroups = fromJS(this.state.tabgroups).toJS()
 
     confirm({
@@ -246,10 +243,10 @@
           return _group
         })
 
-        _this.setState({
+        that.setState({
           tabgroups: tabgroups
         }, () => {
-          _this.props.updatetabs({...config, tabgroups: tabgroups})
+          that.props.updatetabs({...config, tabgroups: tabgroups})
         })
       },
       onCancel() {}
@@ -261,7 +258,7 @@
    */
   addTabGroup = () => {
     const { config } = this.props
-    let _this = this
+    let that = this
     let _tabgroups = fromJS(this.state.tabgroups).toJS()
 
     confirm({
@@ -278,10 +275,10 @@
           sublist:[]
         })
 
-        _this.setState({
+        that.setState({
           tabgroups: _tabgroups
         }, () => {
-          _this.props.updatetabs({...config, tabgroups: _tabgroups})
+          that.props.updatetabs({...config, tabgroups: _tabgroups})
         })
       },
       onCancel() {}
@@ -293,7 +290,7 @@
    */
   delTabGroup = (group) => {
     const { config } = this.props
-    let _this = this
+    let that = this
     let _tabgroups = fromJS(this.state.tabgroups).toJS()
 
     confirm({
@@ -301,10 +298,10 @@
       onOk() {
         _tabgroups = _tabgroups.filter(_group => _group.uuid !== group.uuid)
 
-        _this.setState({
+        that.setState({
           tabgroups: _tabgroups
         }, () => {
-          _this.props.updatetabs({...config, tabgroups: _tabgroups}, group.sublist)
+          that.props.updatetabs({...config, tabgroups: _tabgroups}, group.sublist)
         })
       },
       onCancel() {}
@@ -385,7 +382,7 @@
   }
 
   render() {
-    const { tabgroups, visible, dict } = this.state
+    const { tabgroups, visible } = this.state
 
     return (
       <div className="model-table-tab-list">
@@ -407,7 +404,6 @@
                 handleMenu={(card) => this.handleTab(card, group)}
                 deleteMenu={(card) => this.deleteElement(card, group)}
                 doubleClickCard={this.props.setSubConfig}
-                placeholder={dict['form.required.add'] + dict['model.form.tab']}
               />
             </div>)
         })}
@@ -422,7 +418,6 @@
           destroyOnClose
         >
           <TabForm
-            dict={dict}
             card={this.state.card}
             tabs={this.props.tabs}
             levels={this.state.levels}

--
Gitblit v1.8.0