| | |
| | | className = mark.signType |
| | | } |
| | | contents.push( |
| | | <Col key={card.uuid} style={_style_} span={card.width}> |
| | | <div className={'ant-col ant-col-' + card.width} key={card.uuid} style={_style_} span={card.width}> |
| | | <div style={card.style}> |
| | | <div className={'ant-mk-text line1' + className} style={{height: card.innerHeight || 'auto'}}><span className="sequence-wrap" style={_style}>{data.$Index || ''}</span></div> |
| | | </div> |
| | | </Col> |
| | | </div> |
| | | ) |
| | | } else if (card.eleType === 'text') { |
| | | let val = '' |
| | |
| | | } |
| | | |
| | | contents.push( |
| | | <Col key={card.uuid} style={_style_} span={card.width}> |
| | | <div className={'ant-col ant-col-' + card.width} key={card.uuid} style={_style_} span={card.width}> |
| | | <div style={_style} onClick={(e) => {this.openNewView(e, card)}}> |
| | | <div className={'ant-mk-text line' + (card.height || '') + className} style={lineStyle}>{val}</div> |
| | | </div> |
| | | </Col> |
| | | </div> |
| | | ) |
| | | } else if (card.eleType === 'number') { |
| | | let val = '' |
| | |
| | | } |
| | | |
| | | contents.push( |
| | | <Col key={card.uuid} style={_style_} span={card.width}> |
| | | <div className={'ant-col ant-col-' + card.width} key={card.uuid} style={_style_} span={card.width}> |
| | | <div style={_style}> |
| | | <div className={'ant-mk-text line' + (card.height || '') + className} style={lineStyle}>{val}</div> |
| | | </div> |
| | | </Col> |
| | | </div> |
| | | ) |
| | | } else if (card.eleType === 'icon') { |
| | | let val = '' |
| | |
| | | } |
| | | |
| | | contents.push( |
| | | <Col key={card.uuid} style={_style_} span={card.width}> |
| | | <div className={'ant-col ant-col-' + card.width} key={card.uuid} style={_style_} span={card.width}> |
| | | <div style={card.style}> |
| | | {val ? <Tooltip title={val}> |
| | | <MkIcon className="ant-mk-icon" style={{height: height}} type={icon}/> |
| | | </Tooltip> : <MkIcon className="ant-mk-icon" style={{height: height}} type={icon}/>} |
| | | </div> |
| | | </Col> |
| | | </div> |
| | | ) |
| | | } else if (card.eleType === 'slider') { |
| | | let val = 0 |
| | |
| | | } |
| | | |
| | | contents.push( |
| | | <Col key={card.uuid} style={_style_} span={card.width}> |
| | | <div className={'ant-col ant-col-' + card.width} key={card.uuid} style={_style_} span={card.width}> |
| | | <div style={card.style}> |
| | | <MkProgress value={val} config={card} color={color}/> |
| | | </div> |
| | | </Col> |
| | | </div> |
| | | ) |
| | | } else if (card.eleType === 'picture') { |
| | | let _imagestyle = {} |
| | |
| | | let urls = url ? url.split(',').filter(Boolean) : [''] |
| | | |
| | | urls.forEach((u, i) => { |
| | | contents.push(<Col key={card.uuid + i} style={_style_} span={card.width}> |
| | | contents.push(<div className={'ant-col ant-col-' + card.width} key={card.uuid + i} style={_style_} span={card.width}> |
| | | <div style={_style} onClick={(e) => {this.openNewView(e, card)}}> |
| | | <MkPicture style={_imagestyle} scale={scale} url={u} urls={urls}/> |
| | | </div> |
| | | </Col>) |
| | | </div>) |
| | | }) |
| | | } else if (card.eleType === 'splitline') { |
| | | let _borderWidth = card.borderWidth === undefined ? 1 : card.borderWidth |
| | | _style_ = _style_ || {} |
| | | _style_.minHeight = _borderWidth |
| | | contents.push( |
| | | <Col key={card.uuid} span={card.width} style={_style_}> |
| | | <div className={'ant-col ant-col-' + card.width} key={card.uuid} span={card.width} style={_style_}> |
| | | <div style={card.style}> |
| | | <div className="ant-mk-splitline" style={{borderColor: card.color, borderWidth: _borderWidth}}></div> |
| | | </div> |
| | | </Col> |
| | | </div> |
| | | ) |
| | | } else if (card.eleType === 'barcode') { |
| | | let val = '' |
| | |
| | | } |
| | | |
| | | contents.push( |
| | | <Col key={card.uuid} style={_style_} span={card.width}> |
| | | <div className={'ant-col ant-col-' + card.width} key={card.uuid} style={_style_} span={card.width}> |
| | | <div style={card.style}> |
| | | <div style={{height: card.innerHeight || 25}}> |
| | | {val ? <BarCode card={card} value={val}/> : null} |
| | | </div> |
| | | </div> |
| | | </Col> |
| | | </div> |
| | | ) |
| | | } else if (card.eleType === 'video') { |
| | | let url = '' |
| | |
| | | |
| | | urls.forEach((u, i) => { |
| | | contents.push( |
| | | <Col key={card.uuid + i} style={_style_} span={card.width}> |
| | | <div className={'ant-col ant-col-' + card.width} key={card.uuid + i} style={_style_} span={card.width}> |
| | | <div className="video-wrap" style={card.style}> |
| | | <Video card={card} poster={poster} value={u}/> |
| | | </div> |
| | | </Col> |
| | | </div> |
| | | ) |
| | | }) |
| | | } else if (card.eleType === 'qrcode') { |
| | |
| | | } |
| | | |
| | | contents.push( |
| | | <Col key={card.uuid} style={_style_} span={card.width}> |
| | | <div className={'ant-col ant-col-' + card.width} key={card.uuid} style={_style_} span={card.width}> |
| | | <div style={card.style}> |
| | | <div style={{minHeight: card.qrWidth || 50}}> |
| | | {val ? <QrCode card={card} value={val}/> : null} |
| | | </div> |
| | | </div> |
| | | </Col> |
| | | </div> |
| | | ) |
| | | } else if (card.eleType === 'currentDate') { |
| | | let val = moment().format(card.dateFormat || 'YYYY-MM-DD') |
| | |
| | | } |
| | | |
| | | contents.push( |
| | | <Col key={card.uuid} style={_style_} span={card.width}> |
| | | <div className={'ant-col ant-col-' + card.width} key={card.uuid} style={_style_} span={card.width}> |
| | | <div style={card.style}> |
| | | <div className="ant-mk-text line1" style={{height: card.innerHeight || 'auto'}}>{val}</div> |
| | | </div> |
| | | </Col> |
| | | </div> |
| | | ) |
| | | } else if (card.eleType === 'formula') { |
| | | let val = 0 |
| | |
| | | } |
| | | |
| | | contents.push( |
| | | <Col key={card.uuid} style={_style_} span={card.width}> |
| | | <div className={'ant-col ant-col-' + card.width} key={card.uuid} style={_style_} span={card.width}> |
| | | <div style={_style}> |
| | | <div className={'ant-mk-text line' + (card.height || '') + className} style={lineStyle}>{val}</div> |
| | | </div> |
| | | </Col> |
| | | </div> |
| | | ) |
| | | } else if (card.eleType === 'color') { |
| | | let color = '' |
| | |
| | | } |
| | | |
| | | contents.push( |
| | | <Col key={card.uuid} style={_style_} span={card.width}> |
| | | <div className={'ant-col ant-col-' + card.width} key={card.uuid} style={_style_} span={card.width}> |
| | | <div className="ant-mk-color" style={card.style}> |
| | | <div style={_bgstyle} onClick={(e) => { |
| | | if (card.copyable === 'true') { |
| | |
| | | } |
| | | }}></div> |
| | | </div> |
| | | </Col> |
| | | </div> |
| | | ) |
| | | } else if (card.eleType === 'button') { |
| | | let _disabled = data.$disabled |
| | |
| | | |
| | | if (['exec', 'prompt', 'pop', 'form'].includes(card.OpenType)) { |
| | | contents.push( |
| | | <Col key={card.uuid} className="mk-cell-btn" style={_style_} span={card.width}> |
| | | <div className={'ant-col mk-cell-btn ant-col-' + card.width} key={card.uuid} style={_style_} span={card.width}> |
| | | <NormalButton |
| | | btn={card} |
| | | BID={data.$$BID} |
| | |
| | | columns={cards.columns} |
| | | selectedData={_data} |
| | | /> |
| | | </Col> |
| | | </div> |
| | | ) |
| | | } else if (card.OpenType === 'excelIn') { |
| | | contents.push( |
| | | <Col key={card.uuid} className="mk-cell-btn" style={_style_} span={card.width}> |
| | | <div className={'ant-col mk-cell-btn ant-col-' + card.width} key={card.uuid} style={_style_} span={card.width}> |
| | | <ExcelInButton |
| | | btn={card} |
| | | BID={data.$$BID} |
| | |
| | | setting={cards.setting} |
| | | selectedData={_data} |
| | | /> |
| | | </Col> |
| | | </div> |
| | | ) |
| | | } else if (card.OpenType === 'excelOut') { |
| | | contents.push( |
| | | <Col key={card.uuid} className="mk-cell-btn" style={_style_} span={card.width}> |
| | | <div className={'ant-col mk-cell-btn ant-col-' + card.width} key={card.uuid} style={_style_} span={card.width}> |
| | | <ExcelOutButton |
| | | btn={card} |
| | | BID={data.$$BID} |
| | |
| | | setting={cards.setting} |
| | | selectedData={_data} |
| | | /> |
| | | </Col> |
| | | </div> |
| | | ) |
| | | } else if (card.OpenType === 'popview') { |
| | | contents.push( |
| | | <Col key={card.uuid} className="mk-cell-btn" style={_style_} span={card.width}> |
| | | <div className={'ant-col mk-cell-btn ant-col-' + card.width} key={card.uuid} style={_style_} span={card.width}> |
| | | <PopupButton |
| | | btn={card} |
| | | BID={data.$$BID} |
| | |
| | | setting={cards.setting} |
| | | selectedData={_data} |
| | | /> |
| | | </Col> |
| | | </div> |
| | | ) |
| | | } else if (card.OpenType === 'tab') { |
| | | contents.push( |
| | | <Col key={card.uuid} className="mk-cell-btn" style={_style_} span={card.width}> |
| | | <div className={'ant-col mk-cell-btn ant-col-' + card.width} key={card.uuid} style={_style_} span={card.width}> |
| | | <TabButton |
| | | btn={card} |
| | | BID={data.$$BID} |
| | |
| | | disabled={_disabled} |
| | | selectedData={_data} |
| | | /> |
| | | </Col> |
| | | </div> |
| | | ) |
| | | } else if (card.OpenType === 'innerpage') { |
| | | contents.push( |
| | | <Col key={card.uuid} className="mk-cell-btn" style={_style_} span={card.width}> |
| | | <div className={'ant-col mk-cell-btn ant-col-' + card.width} key={card.uuid} style={_style_} span={card.width}> |
| | | <NewPageButton |
| | | btn={card} |
| | | BData={data.$$BData || ''} |
| | | disabled={_disabled} |
| | | selectedData={_data} |
| | | /> |
| | | </Col> |
| | | </div> |
| | | ) |
| | | } else if (card.OpenType === 'funcbutton') { |
| | | if (card.funcType === 'changeuser' || card.funcType === 'closetab') { |
| | | contents.push( |
| | | <Col key={card.uuid} className="mk-cell-btn" style={_style_} span={card.width}> |
| | | <div className={'ant-col mk-cell-btn ant-col-' + card.width} key={card.uuid} style={_style_} span={card.width}> |
| | | <ChangeUserButton |
| | | btn={card} |
| | | BID={data.$$BID} |
| | |
| | | setting={cards.setting} |
| | | selectedData={_data} |
| | | /> |
| | | </Col> |
| | | </div> |
| | | ) |
| | | } else if (card.funcType === 'print') { |
| | | contents.push( |
| | | <Col key={card.uuid} className="mk-cell-btn" style={_style_} span={card.width}> |
| | | <div className={'ant-col mk-cell-btn ant-col-' + card.width} key={card.uuid} style={_style_} span={card.width}> |
| | | <PrintButton |
| | | btn={card} |
| | | BID={data.$$BID} |
| | |
| | | columns={cards.columns} |
| | | selectedData={_data} |
| | | /> |
| | | </Col> |
| | | </div> |
| | | ) |
| | | } else if (card.funcType === 'megvii') { |
| | | contents.push( |
| | | <Col key={card.uuid} className="mk-cell-btn" style={_style_} span={card.width}> |
| | | <div className={'ant-col mk-cell-btn ant-col-' + card.width} key={card.uuid} style={_style_} span={card.width}> |
| | | <FuncMegvii |
| | | btn={card} |
| | | BID={data.$$BID} |
| | |
| | | setting={cards.setting} |
| | | selectedData={_data} |
| | | /> |
| | | </Col> |
| | | </div> |
| | | ) |
| | | } else if (card.funcType === 'filezip') { |
| | | contents.push( |
| | | <Col key={card.uuid} className="mk-cell-btn" style={_style_} span={card.width}> |
| | | <div className={'ant-col mk-cell-btn ant-col-' + card.width} key={card.uuid} style={_style_} span={card.width}> |
| | | <FuncZip |
| | | btn={card} |
| | | BID={data.$$BID} |
| | |
| | | setting={cards.setting} |
| | | selectedData={_data} |
| | | /> |
| | | </Col> |
| | | </div> |
| | | ) |
| | | } |
| | | } |
| | |
| | | return ( |
| | | <div className={'card-cell-list ' + (cardCell && cardCell.setting && cardCell.setting.layout === 'flex' ? 'mk-flex' : '')}> |
| | | {this.getContent()} |
| | | <Col style={{display: 'none'}} span={24}></Col> |
| | | </div> |
| | | ) |
| | | } |