king
2020-06-23 c83a50317baeba1a4771e4d802eee029ed2b7e31
src/tabviews/zshare/normalTable/index.jsx
@@ -438,9 +438,38 @@
      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>
      )
@@ -478,7 +507,7 @@
          }
    
          if (content !== '') {
            if (item.format === 'percent') {
            if (col.format === 'percent') {
              content = content * 100
            }
            
@@ -547,6 +576,28 @@
          }
          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]