king
2021-04-08 9a60da3f80eacbaadb98b6c9697aeffcc8affe57
src/tabviews/custom/components/share/normalTable/index.jsx
@@ -15,7 +15,11 @@
const { Paragraph } = Typography
const CardCellComponent = asyncComponent(() => import('@/tabviews/custom/components/card/cardcellList'))
const PicRadio = {
  '4:3': '75%', '3:2': '66.67%', '16:9': '56.25%', '2:1': '50%', '3:1': '33.33%', '4:1': '25%',
  '5:1': '20%', '6:1': '16.67%', '7:1': '14.29%', '8:1': '12.5%', '9:1': '11.11%',
  '10:1': '10%', '3:4': '133.33%', '2:3': '150%', '9:16': '177.78%'
}
class BodyRow extends React.Component {
  shouldComponentUpdate (nextProps, nextState) {
    return !is(fromJS(this.props.data), fromJS(nextProps.data)) || !is(fromJS(this.props.className), fromJS(nextProps.className))
@@ -272,12 +276,8 @@
      let cols = 24 / (col.picSort || 1)
      let paddingTop = '100%'
      if (col.lenWidRadio === '16:9') {
        paddingTop = '56.25%'
      } else if (col.lenWidRadio === '3:2') {
        paddingTop = '66.67%'
      } else if (col.lenWidRadio === '4:3') {
        paddingTop = '75%'
      if (PicRadio[col.lenWidRadio]) {
        paddingTop = PicRadio[col.lenWidRadio]
      }
      resProps.children = (
@@ -507,15 +507,22 @@
    const { tabviews } = this.props
    e.stopPropagation()
    let __param = {
      $searchkey: item.field,
      $searchval: record[item.field] || '',
      $BID: record.$$uuid
    }
    if (item.linkfields && item.linkfields.length > 0) {
      item.linkfields.forEach(field => {
        __param[field] = record[field] || ''
      })
    }
    if (item.linkThdMenu) {
      let tabmenu = item.linkThdMenu
      tabmenu.param = {
        searchkey: item.field,
        searchval: record[item.field] || '',
        BID: record.$$uuid
      }
      tabmenu.param = __param
      tabmenu.selected = true
  
      let tabs = tabviews.filter((tab, i) => {
@@ -531,26 +538,36 @@
        tabs.push(tabmenu)
        this.props.modifyTabview(tabs)
      })
    } else {
    } else if (item.linkurl) {
      let src = item.linkurl
      if (item.linkurl.indexOf('paramsmain/') > -1) {
      if (src.indexOf('paramsmain/') > -1) {
        try {
          let _url = item.linkurl.split('paramsmain/')[0] + 'paramsmain/'
          let _param = JSON.parse(window.decodeURIComponent(window.atob(item.linkurl.split('paramsmain/')[1])))
          let dataparam = {
            searchkey: item.field,
            searchval: record[item.field] || '',
            BID: record.$$uuid
          }
          _param.UserID = sessionStorage.getItem('UserID')
          _param.LoginUID = sessionStorage.getItem('LoginUID')
          _param.User_Name = sessionStorage.getItem('User_Name')
          _param.param = dataparam
          _param.param = __param
          src = _url + window.btoa(window.encodeURIComponent(JSON.stringify(_param)))
        } catch {
          console.warn('菜单参数解析错误!')
        }
      } else {
        let con = '?'
        if (/\?/ig.test(src)) {
          con = '&'
        }
        if (item.linkfields && item.linkfields.length > 0) {
          item.linkfields.forEach(field => {
            if (field.toLowerCase() === 'id') return
            con += `${field}=${record[field] || ''}&`
          })
        }
        src = src + `${con}id=${record.$$uuid}&appkey=${window.GLOB.appkey}&userid=${sessionStorage.getItem('UserID')}&LoginUID=${sessionStorage.getItem('LoginUID') || ''}`
      }
      window.open(src)