| | |
| | | |
| | | return ( |
| | | <div> |
| | | <div className="baseboard"></div> |
| | | <div className="content" style={{ minWidth: (item.Width || 120) + 'px' }}> |
| | | {content ? <Paragraph copyable ellipsis={{ rows: 3, expandable: true }}>{content}</Paragraph> : null } |
| | | </div> |
| | | </div> |
| | | ) |
| | | } else if (item.type === 'link') { |
| | | let content = '' |
| | | let _href = record[item.field] || '' |
| | | |
| | | if (item.nameField && record.hasOwnProperty(item.nameField)) { |
| | | content = record[item.nameField] |
| | | } |
| | | |
| | | if (!content && _href) { |
| | | content = _href |
| | | } else if (!_href) { |
| | | content = '' |
| | | } |
| | | |
| | | if (item.joint === 'true' && _href) { |
| | | let _param = window.btoa('id=' + record[this.props.setting.primaryKey] + '&userid=' + sessionStorage.getItem('UserID') + '&loginuid=' + sessionStorage.getItem('LoginUID')) |
| | | _href += '?' + _param |
| | | } |
| | | |
| | | if (item.blur) { |
| | | content = md5(content) |
| | | } |
| | | |
| | | return ( |
| | | <div> |
| | | <div className="content" style={{ minWidth: (item.Width || 120) + 'px' }}> |
| | | {content ? <a href={_href} target="_blank" rel="noopener noreferrer">{content}</a> : null } |
| | | </div> |
| | | </div> |
| | | ) |
| | |
| | | } |
| | | |
| | | if (content !== '') { |
| | | if (item.format === 'percent') { |
| | | if (col.format === 'percent') { |
| | | content = content * 100 |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | contents.push(content) |
| | | } else if (col.type === 'link') { |
| | | let content = col.nameField ? record[col.nameField] : '' |
| | | let _href = record[col.field] || '' |
| | | |
| | | if (!content && _href) { |
| | | content = _href |
| | | } else if (!_href) { |
| | | content = '' |
| | | } |
| | | |
| | | if (col.joint === 'true' && _href) { |
| | | let _param = window.btoa('id=' + record[this.props.setting.primaryKey] + '&userid=' + sessionStorage.getItem('UserID') + '&loginuid=' + sessionStorage.getItem('LoginUID')) |
| | | _href += '?' + _param |
| | | } |
| | | |
| | | if (item.blur) { |
| | | content = md5(content) |
| | | } |
| | | |
| | | content = _href ? <a href={_href} target="_blank" rel="noopener noreferrer">{content}</a> : null |
| | | |
| | | contents.push(content) |
| | | } else { |
| | | let content = record[col.field] |
| | | |