|
|
@@ -18,7 +18,7 @@ class ViewLayoutItem extends React.Component {
|
|
|
}
|
|
|
|
|
|
render() {
|
|
|
- const { dispatch, main, dashboardDesigner, item, isPreview, reload } = this.props;
|
|
|
+ const { dispatch, main, dashboardDesigner, item, isPreview, reload, showPreviewBox, hidePreviewBox } = this.props;
|
|
|
const { editing, title } = this.state;
|
|
|
const { currentUser } = main;
|
|
|
const { dashboardDesignerCode, editMode, minLayoutHeight } = dashboardDesigner;
|
|
|
@@ -78,7 +78,7 @@ class ViewLayoutItem extends React.Component {
|
|
|
let pageSize = chartOption ? chartOption.pageSize : (~~((layout.h * minLayoutHeight + (layout.h - 1) * 12 - 20 - 40 - 24 - 8 * 2)/38) + 1)
|
|
|
dispatch({ type: 'dashboardDesigner/fetchChartData', item, mandatory: true, page, pageSize });
|
|
|
}}/>}
|
|
|
- {!isPreview && viewType !== 'richText' && <Icon className={iconCls} type="fullscreen" onClick={() => this.showPreviewBox(item)}/>}
|
|
|
+ {!isPreview && viewType !== 'richText' && <Icon className={iconCls} type="fullscreen" onClick={() => showPreviewBox(item)}/>}
|
|
|
{editMode && !isPreview && (item.creatorCode === currentUser.code || currentUser.role === 'superAdmin') && viewType !== 'richText' && <Icon className={iconCls} type='edit' onClick={() => {
|
|
|
dispatch({ type: 'dashboard/remoteModify',hideMessage:true });
|
|
|
dispatch({ type: 'dashboardDesigner/reset' });
|
|
|
@@ -87,7 +87,7 @@ class ViewLayoutItem extends React.Component {
|
|
|
{!isPreview && editMode && <Icon className={iconCls} type='delete' onClick={() => {
|
|
|
dispatch({ type: 'dashboardDesigner/deleteItem', item });
|
|
|
}} />}
|
|
|
- {isPreview && <Icon className={iconCls} type="close" onClick={this.hidePreviewBox}/>}
|
|
|
+ {isPreview && <Icon className={iconCls} type="close" onClick={hidePreviewBox}/>}
|
|
|
</div>
|
|
|
</div>
|
|
|
<ChartView chartRef={`chartRef-${dashboardDesignerCode}-${code}`} minLayoutHeight={minLayoutHeight} editMode={isPreview ? false : editMode} item={{...item}} reload={reload}/>
|