From 2292d1826e69e21c8a411c217faef635fe57d458 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 07 一月 2021 10:48:49 +0800 Subject: [PATCH] Merge branch 'bms' of ssh://39.106.218.81:29418/~jinfei/pc-plat into bms --- src/tabviews/custom/components/table/normal-table/index.jsx | 15 +++++++++------ 1 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/tabviews/custom/components/table/normal-table/index.jsx b/src/tabviews/custom/components/table/normal-table/index.jsx index 06357dc..714259b 100644 --- a/src/tabviews/custom/components/table/normal-table/index.jsx +++ b/src/tabviews/custom/components/table/normal-table/index.jsx @@ -410,15 +410,17 @@ /** * @description 瀵煎嚭Excel鏃讹紝鑾峰彇椤甸潰鎼滅储鎺掑簭绛夊弬鏁� */ - getexceloutparam = () => { + getexceloutparam = (menuId, btnId) => { const { arr_field, config, orderBy, search, setting} = this.state - return { + if (config.uuid !== menuId) return + + MKEmitter.emit('execExcelout', config.uuid, btnId, { arr_field: arr_field, orderBy: orderBy || setting.order, search: search, menuName: config.name - } + }) } reloadData = (menuId, id, btn) => { @@ -487,6 +489,7 @@ componentDidMount () { MKEmitter.addListener('reloadData', this.reloadData) MKEmitter.addListener('resetSelectLine', this.resetParentParam) + MKEmitter.addListener('getexceloutparam', this.getexceloutparam) } /** @@ -498,13 +501,14 @@ } MKEmitter.removeListener('reloadData', this.reloadData) MKEmitter.removeListener('resetSelectLine', this.resetParentParam) + MKEmitter.removeListener('getexceloutparam', this.getexceloutparam) } render() { const { BID, setting, searchlist, actions, config, columns, selectedData } = this.state return ( - <div className="custom-normal-table"> + <div className="custom-normal-table" style={config.style}> <NormalHeader config={config}/> {searchlist && searchlist.length ? <MainSearch BID={BID} searchlist={searchlist} menuType={this.props.menuType} refreshdata={this.refreshbysearch}/> : null @@ -517,9 +521,8 @@ columns={config.columns} selectedData={selectedData} refreshdata={this.refreshbyaction} - getexceloutparam={this.getexceloutparam} /> - <div className="main-table-box"> + <div className={'main-table-box ' + (!actions || actions.length === 0 ? 'no-action' : '')}> <MainTable setting={setting} columns={columns} -- Gitblit v1.8.0