From 523cec6c87d88b43954a4409a8dfde6aade095a1 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 22 五月 2020 11:02:10 +0800 Subject: [PATCH] 2020-05-22 --- src/tabviews/commontable/index.jsx | 49 ++++++++++++++++++++++++++++++++++++------------- 1 files changed, 36 insertions(+), 13 deletions(-) diff --git a/src/tabviews/commontable/index.jsx b/src/tabviews/commontable/index.jsx index 91e6317..b206eb6 100644 --- a/src/tabviews/commontable/index.jsx +++ b/src/tabviews/commontable/index.jsx @@ -9,20 +9,22 @@ 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/asyncComponent' import asyncLoadComponent from '@/utils/asyncLoadComponent' import {refreshTabView, modifyTabview} from '@/store/action' -import ChartComponent from '@/tabviews/zshare/chartcomponent' import MainTable from '@/tabviews/zshare/normalTable' import MainSearch from '@/tabviews/zshare/topSearch' import NotFount from '@/components/404' import './index.scss' -const VerifyCard = asyncLoadComponent(() => import('@/tabviews/zshare/verifycard')) const MainAction = asyncLoadComponent(() => import('@/tabviews/zshare/actionList')) -const SubTable = asyncLoadComponent(() => import('@/tabviews/subtable')) -const SubTabTable = asyncLoadComponent(() => import('@/tabviews/subtabtable')) -const FormTab = asyncLoadComponent(() => import('@/tabviews/formtab')) +const VerifyCard = asyncComponent(() => import('@/tabviews/zshare/verifycard')) +const SubTable = asyncComponent(() => import('@/tabviews/subtable')) +const SubTabTable = asyncComponent(() => import('@/tabviews/subtabtable')) +const FormTab = asyncComponent(() => import('@/tabviews/formtab')) +const CardComponent = asyncComponent(() => import('@/tabviews/zshare/cardcomponent')) +const ChartComponent = asyncComponent(() => import('@/tabviews/zshare/chartcomponent')) const { TabPane } = Tabs const { TreeNode } = Tree @@ -62,7 +64,7 @@ BIDs: {}, // 涓婄骇琛╥d pickup: false, // 涓昏〃鏁版嵁闅愯棌鏄剧ず鍒囨崲 popAction: false, // 寮规椤甸潰锛屾寜閽俊鎭� - popData: false, // 寮规椤甸潰锛屾墍閫夌殑琛ㄦ牸鏁版嵁 + popData: null, // 寮规椤甸潰锛屾墍閫夌殑琛ㄦ牸鏁版嵁 visible: false, // 寮规鏄剧ず闅愯棌鎺у埗 treevisible: false, // 鑿滃崟缁撴瀯鏍戝脊妗嗘樉绀洪殣钘忔帶鍒� tabBtn: null, // 琛ㄥ崟鏍囩鎸夐挳 @@ -1332,7 +1334,6 @@ {config.charts.length > 1 && item.title ? <p className="chart-table chart-title">{item.title}</p> : null} <div style={{minHeight: '25px'}}> <MainAction - BID="" type="main" menuType="main" setting={setting} @@ -1381,11 +1382,34 @@ } else if (item.chartType === 'card') { return ( <Col span={item.width} key={item.uuid}> - <ChartComponent + <CardComponent plot={item} - data={this.state.data} config={config} + tableId="mainTable" + loading={this.state.loading} + data={this.state.data} + buttonTrigger={this.buttonTrigger} + handleTableId={this.handleTableId} /> + <div style={{display: 'none'}}> + <MainAction + type="main" + menuType="main" + setting={setting} + actions={actions} + triggerBtn={triggerBtn} + dict={this.state.dict} + MenuID={this.props.MenuID} + permRoles={this.props.permRoles} + dataManager={this.props.dataManager} + logcolumns={this.state.logcolumns} + ContainerId={this.state.ContainerId} + refreshdata={this.refreshbyaction} + triggerPopview={this.triggerPopview} + getexceloutparam={this.getexceloutparam} + gettableselected={this.gettableselected} + /> + </div> </Col> ) } else { @@ -1393,8 +1417,8 @@ <Col span={item.width} key={item.uuid}> <ChartComponent plot={item} - data={this.state.data} config={config} + data={this.state.data} /> </Col> ) @@ -1457,13 +1481,12 @@ destroyOnClose > {<SubTabTable - BID={''} + BID={this.state.popData ? this.state.popData[setting.primaryKey] : ''} menuType="main" SupMenuID={this.props.MenuID} MenuID={this.state.popAction.linkTab} - BData={this.state.BIDs['mainTabledata'] || ''} + BData={this.state.popData || ''} ContainerId={this.state.ContainerId} - ID={this.state.popData ? this.state.popData[setting.primaryKey] : ''} refreshSupView={this.reloadtable} />} </Modal> -- Gitblit v1.8.0