| | |
| | | {content} |
| | | </span> |
| | | ) |
| | | } else if (col.type === 'link') { |
| | | let content = col.nameField ? data[col.nameField] : '' |
| | | let _href = data[col.field] || '' |
| | | |
| | | if (!content && _href) { |
| | | content = _href |
| | | } else if (!_href) { |
| | | content = '' |
| | | } |
| | | |
| | | if (col.joint === 'true' && _href) { |
| | | let _param = window.btoa('id=' + data[this.props.setting.primaryKey] + '&userid=' + sessionStorage.getItem('UserID') + '&loginuid=' + sessionStorage.getItem('LoginUID')) |
| | | _href += '?' + _param |
| | | } |
| | | |
| | | return ( |
| | | <span> |
| | | {_href ? <a href={_href} target="_blank" rel="noopener noreferrer">{content}</a> : null} |
| | | </span> |
| | | ) |
| | | } |
| | | } |
| | | |