From 6d0137932fcc8f9848123743c1aad5cff8172d8a Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期日, 09 二月 2020 13:09:39 +0800
Subject: [PATCH] 2020-02-09

---
 src/tabviews/commontable/index.jsx |   38 +++++++++++++++++++++++---------------
 1 files changed, 23 insertions(+), 15 deletions(-)

diff --git a/src/tabviews/commontable/index.jsx b/src/tabviews/commontable/index.jsx
index aaad835..57e5426 100644
--- a/src/tabviews/commontable/index.jsx
+++ b/src/tabviews/commontable/index.jsx
@@ -4,17 +4,19 @@
 import { is, fromJS } from 'immutable'
 import { BackTop, notification, Spin, Tabs, Icon, Switch, Modal, Button} from 'antd'
 import moment from 'moment'
+
 import Api from '@/api'
+import zhCN from '@/locales/zh-CN/main.js'
+import enUS from '@/locales/en-US/main.js'
+import Utils from '@/utils/utils.js'
+import asyncComponent from '@/utils/asyncLoadComponent'
+import {refreshTabView, modifyTabview} from '@/store/action'
+
 import MainTable from './mainTable'
 import MainAction from '@/tabviews/tableshare/actionList'
 import MainSearch from '@/tabviews/tableshare/topSearch'
 import SubTable from '@/tabviews/subtable'
 import NotFount from '@/components/404'
-import asyncComponent from '@/utils/asyncLoadComponent'
-import {refreshTabView, modifyTabview} from '@/store/action'
-import zhCN from '@/locales/zh-CN/main.js'
-import enUS from '@/locales/en-US/main.js'
-import Utils from '@/utils/utils.js'
 import './index.scss'
 
 const SubTabTable = asyncComponent(() => import('@/tabviews/subtabtable'))
@@ -29,6 +31,7 @@
 
   state = {
     dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
+    ContainerId: Utils.getuuid(), // 鑿滃崟澶栧眰html Id
     loadingview: true,    // 椤甸潰鍔犺浇涓�
     viewlost: false,      // 椤甸潰涓㈠け锛�1銆佹湭鑾峰彇鍒伴厤缃�-椤甸潰涓㈠け锛�2銆侀〉闈㈡湭鍚敤
     lostmsg: '',          // 椤甸潰涓㈠け鏃剁殑鎻愮ず淇℃伅
@@ -36,7 +39,7 @@
     searchlist: null,     // 鎼滅储鏉′欢
     actions: null,        // 鎸夐挳闆�
     columns: null,        // 鏄剧ず鍒�
-    logcolumns: null,     // 鏃ュ織涓樉绀虹殑鍒椾俊鎭�
+    logcolumns: null,     // 鏃ュ織涓樉绀虹殑鍒椾俊鎭� (澧炲姞鑷冲叏閮ㄥ垪锛岄櫎鍘诲悎骞跺垪)
     arr_field: '',        // 浣跨敤 sPC_Get_TableData 鏃剁殑鏌ヨ瀛楁闆�
     setting: null,        // 椤甸潰鍏ㄥ眬璁剧疆锛氭暟鎹簮銆佹寜閽強鏄剧ず鍒楀浐瀹氥�佷富閿瓑
     data: null,           // 鍒楄〃鏁版嵁闆�
@@ -47,7 +50,6 @@
     orderColumn: '',      // 鎺掑簭瀛楁
     orderType: 'asc',     // 鎺掑簭鏂瑰紡
     search: '',           // 鎼滅储鏉′欢鏁扮粍锛屼娇鐢ㄦ椂闇�鍒嗗満鏅鐞�
-    configMap: {},        // 椤甸潰閰嶇疆淇℃伅锛氫笅鎷夈�佹寜閽瓑
     BIDs: {},             // 涓婄骇琛╥d
     setsingle: false,     // 涓昏〃鍗曢�夊閫夊垏鎹�
     pickup: false,        // 涓昏〃鏁版嵁闅愯棌鏄剧ず鍒囨崲
@@ -116,10 +118,7 @@
         if (col.field) {
           _arrField.push(col.field)
 
-          // 绛涢�夊嚭鏃ュ織涓殑鏄剧ず鍒楋紝鍙栧墠鍥涗釜
-          if (col.Hide !== 'true' && _logcolumns.length < 4) {
-            _logcolumns.push(col)
-          }
+          _logcolumns.push(col)
         }
         if (col.type === 'colspan' && col.sublist) { // 绛涢�夐殣钘忓垪
           _hideCol = _hideCol.concat(col.sublist)
@@ -542,7 +541,6 @@
       orderColumn: '',
       orderType: 'asc',
       search: '',
-      configMap: {},
       BIDs: {},
       setsingle: false,
       pickup: false,
@@ -765,7 +763,7 @@
     const { setting, searchlist, actions, columns, loadingview, viewlost, setsingle, pickup, isLinkMain, config } = this.state
 
     return (
-      <div className={'commontable ' + (isLinkMain ? 'pick-control' : '')} id={'commontable' + this.props.MenuID}>
+      <div className={'commontable ' + (isLinkMain ? 'pick-control' : '')} id={this.state.ContainerId}>
         {loadingview && <Spin size="large" />}
         {searchlist && searchlist.length > 0 ?
           <MainSearch
@@ -781,9 +779,10 @@
             type="main"
             setting={setting}
             actions={actions}
-            logcolumns={this.state.logcolumns}
             dict={this.state.dict}
             MenuID={this.props.MenuID}
+            logcolumns={this.state.logcolumns}
+            ContainerId={this.state.ContainerId}
             refreshdata={this.refreshbyaction}
             triggerPopview={this.triggerPopview}
             gettableselected={this.gettableselected}
@@ -833,6 +832,7 @@
                           Tab={_tab}
                           MenuID={_tab.linkTab}
                           SupMenuID={this.props.MenuID}
+                          ContainerId={this.state.ContainerId}
                           BID={this.state.BIDs[_tab.supMenu] || ''}
                           BData={this.state.BIDs[_tab.supMenu + 'data'] || ''}
                           handleTableId={this.handleTableId}
@@ -857,7 +857,15 @@
           ]}
           destroyOnClose
         >
-          {<SubTabTable SupMenuID={this.props.MenuID} MenuID={this.state.popAction.linkTab} BID={''} ID={this.state.popData ? this.state.popData[setting.primaryKey] : ''} refreshSupView={this.reloadtable} />}
+          {<SubTabTable 
+            BID={''}
+            SupMenuID={this.props.MenuID}
+            MenuID={this.state.popAction.linkTab}
+            BData={this.state.BIDs['mainTabledata'] || ''}
+            ContainerId={this.state.ContainerId}
+            ID={this.state.popData ? this.state.popData[setting.primaryKey] : ''}
+            refreshSupView={this.reloadtable}
+          />}
         </Modal>
         <BackTop>
           <div className="ant-back-top">

--
Gitblit v1.8.0