| | |
| | | import Utils from '@/utils/utils.js' |
| | | import UtilsDM from '@/utils/utils-datamanage.js' |
| | | import MKEmitter from '@/utils/events.js' |
| | | import NormalHeader from '@/tabviews/custom/components/share/normalheader' |
| | | import './index.scss' |
| | | |
| | | const NormalHeader = asyncComponent(() => import('@/tabviews/custom/components/share/normalheader')) |
| | | // const NormalHeader = asyncComponent(() => import('@/tabviews/custom/components/share/normalheader')) |
| | | const ExcelOutButton = asyncComponent(() => import('@/tabviews/zshare/actionList/exceloutbutton')) |
| | | const ExcelInButton = asyncComponent(() => import('@/tabviews/zshare/actionList/excelInbutton')) |
| | | |
| | |
| | | }) |
| | | } |
| | | |
| | | let padding = 0 |
| | | if (_config.style.paddingTop && !isNaN(parseInt(_config.style.paddingTop))) { |
| | | padding += parseInt(_config.style.paddingTop) |
| | | } |
| | | if (_config.style.paddingBottom && !isNaN(parseInt(_config.style.paddingBottom))) { |
| | | padding += parseInt(_config.style.paddingBottom) |
| | | } |
| | | |
| | | let height = config.plot.height || 400 |
| | | if (config.plot.title || config.search.length > 0) { |
| | | _config.plot.height = height - 70 - padding |
| | | } else { |
| | | _config.plot.height = height - 25 - padding |
| | | } |
| | | |
| | | _config.style.height = height |
| | | _config.style.height = config.plot.height || 400 |
| | | |
| | | let transfield = {} |
| | | _config.columns.forEach(col => { |
| | |
| | | |
| | | _data = dv.rows |
| | | } |
| | | |
| | | |
| | | const chart = new Chart({ |
| | | container: this.state.chartId, |
| | | autoFit: true, |
| | | height: plot.height |
| | | height: this.wrap.offsetHeight - 25 |
| | | }) |
| | | |
| | | chart.data(_data) |
| | |
| | | const chart = new Chart({ |
| | | container: this.state.chartId, |
| | | autoFit: true, |
| | | height: plot.height |
| | | height: this.wrap.offsetHeight - 25 |
| | | }) |
| | | |
| | | // 坐标轴格式化 |
| | |
| | | const chart = new Chart({ |
| | | container: this.state.chartId, |
| | | autoFit: true, |
| | | height: plot.height |
| | | height: this.wrap.offsetHeight - 25 |
| | | }) |
| | | |
| | | chart.data(_data) |
| | |
| | | </div> : null |
| | | } |
| | | <NormalHeader config={config} BID={BID} menuType={this.props.menuType} refresh={this.refreshSearch} /> |
| | | <div className="canvas-wrap"> |
| | | <div className="canvas-wrap" ref={ref => this.wrap = ref}> |
| | | <div className="chart-action"> |
| | | {config.action.map(item => { |
| | | if (item.OpenType === 'excelOut') { |
| | |
| | | } |
| | | })} |
| | | </div> |
| | | <div className={'canvas' + (empty ? ' empty' : '')} style={{height: config.plot.height + 25}} id={this.state.chartId}></div> |
| | | <div className={'canvas' + (empty ? ' empty' : '')} id={this.state.chartId}></div> |
| | | </div> |
| | | {empty ? <Empty description={false}/> : null} |
| | | </div> |