| | |
| | | _total = config.setting.pageSize * pageIndex |
| | | switchable = true |
| | | } |
| | | let offset = 0 |
| | | if (config.wrap.cardFloat && config.wrap.cardFloat !== 'left') { |
| | | if (data && card.setting.width * data.length < 24) { |
| | | offset = 24 - card.setting.width * data.length |
| | | if (config.wrap.cardFloat === 'center') { |
| | | offset = Math.floor(offset / 2) |
| | | } |
| | | } |
| | | } |
| | | |
| | | return ( |
| | | <div className="custom-data-card-box" style={{...config.style, minHeight: config.wrap.minHeight}}> |
| | | {loading ? |
| | | <div className="loading-mask"> |
| | | <div className="ant-spin-blur"></div> |
| | | {data ? <div className="ant-spin-blur"></div> : null} |
| | | <Spin /> |
| | | </div> : null |
| | | } |
| | |
| | | getexceloutparam={this.getexceloutparam} |
| | | /> : null |
| | | } |
| | | <div className="data-zoom"> |
| | | <div className={`data-zoom ${config.wrap.cardType} ${config.wrap.scale}`}> |
| | | {switchable ? <div className={'prev-page ' + (pageIndex === 1 ? 'disabled' : '')} onClick={this.prevPage}><div><div><img src={preImg} alt=""/></div></div></div> : null} |
| | | {data && data.length > 0 ? <div className="card-row-list"> |
| | | {data.map((item, index) => ( |
| | | <Col className={activeKey === index ? 'active' : (selectKeys.indexOf(index) > -1 ? 'selected' : '')} key={index} span={card.setting.width} onClick={() => {this.changeCard(index, item)}}> |
| | | <Col className={activeKey === index ? 'active' : (selectKeys.indexOf(index) > -1 ? 'selected' : '')} key={index} span={card.setting.width} offset={!index ? offset : 0} onClick={() => {this.changeCard(index, item)}}> |
| | | <CardItem card={card} cards={config} data={item} updateStatus={this.updateStatus}/> |
| | | </Col> |
| | | ))} |