From bc4ee6130db80f8f2020bb3bb7248b6e55ae90cc Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 20 三月 2020 17:47:01 +0800
Subject: [PATCH] 2020-03-20

---
 src/templates/comtableconfig/index.jsx |   57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 56 insertions(+), 1 deletions(-)

diff --git a/src/templates/comtableconfig/index.jsx b/src/templates/comtableconfig/index.jsx
index ae52c66..6058e1a 100644
--- a/src/templates/comtableconfig/index.jsx
+++ b/src/templates/comtableconfig/index.jsx
@@ -337,6 +337,12 @@
             }
           })
         })
+      } else {
+        notification.warning({
+          top: 92,
+          message: res.message,
+          duration: 10
+        })
       }
     })
   }
@@ -348,6 +354,46 @@
     this.setState = () => {
       return
     }
+  }
+
+  /**
+   * @description 鍔犺浇鎴栧埛鏂版爣绛句俊鎭�
+   */
+  reloadTab = () => {
+    this.setState({
+      loading: true,
+      tabviews: []
+    })
+    Api.getSystemConfig({func: 'sPC_Get_UserTemp', TypeCharTwo: 'tab'}).then(res => {
+      if (res.status) {
+        this.setState({
+          loading: false,
+          tabviews: res.UserTemp.map(temp => {
+            return {
+              uuid: temp.MenuID,
+              value: temp.MenuID,
+              text: temp.MenuName,
+              type: temp.Template,
+              MenuNo: temp.MenuNo
+            }
+          })
+        })
+        notification.success({
+          top: 92,
+          message: '鍒锋柊鎴愬姛銆�',
+          duration: 2
+        })
+      } else {
+        this.setState({
+          loading: false
+        })
+        notification.warning({
+          top: 92,
+          message: res.message,
+          duration: 10
+        })
+      }
+    })
   }
 
   /**
@@ -1486,6 +1532,10 @@
           LongParam: _LongParam,
           LText: _vals.func.map(item => `select '${menu.MenuID}' as MenuID,'${item.func}' as ProcName,'${item.label}' as MenuName`),
           LTexttb: _tables.map(item => `select '${menu.MenuID}' as MenuID,'${item}' as tbName`)
+        }
+
+        if (menu.menuSort) { // 鑿滃崟鏂板缓鏃惰缃帓搴�
+          param.Sort = menu.menuSort
         }
 
         param.LText = param.LText.join(' union all ')
@@ -2712,7 +2762,12 @@
             </Collapse>
           </div>
           <div className="setting">
-            <Card title={this.state.dict['header.menu.page.configurable']} bordered={false} extra={
+            <Card title={
+              <div>
+                {this.state.dict['header.menu.page.configurable']} 
+                <Icon type="redo" style={{marginLeft: '10px'}} title="鍒锋柊鏍囩鍒楄〃" onClick={this.reloadTab} />
+              </div>
+            } bordered={false} extra={
               <div>
                 <Switch className="big" checkedChildren="鍚�" unCheckedChildren="鍋�" checked={this.state.config.enabled} onChange={this.onEnabledChange} />
                 <Button type="primary" onClick={this.changeTemplate}>{this.state.dict['header.menu.template.change']}</Button>

--
Gitblit v1.8.0