king
2022-03-23 151f90d6aa701be749ff2fc80b3599b88ece3844
src/tabviews/custom/components/card/cardcellList/index.jsx
@@ -1,14 +1,15 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Icon, Col, Tooltip, notification } from 'antd'
import { Col, Tooltip, notification } from 'antd'
import moment from 'moment'
import zhCN from '@/locales/zh-CN/model.js'
import enUS from '@/locales/en-US/model.js'
import asyncComponent from './asyncButtonComponent'
import asyncElementComponent from '@/utils/asyncComponent'
import { getMark } from '@/utils/utils.js'
import MkIcon from '@/components/mk-icon'
import MKEmitter from '@/utils/events.js'
import LostPng from '@/assets/img/lost.png'
import './index.scss'
const NormalButton = asyncComponent(() => import('@/tabviews/zshare/actionList/normalbutton'))
@@ -21,20 +22,24 @@
const PrintButton = asyncComponent(() => import('@/tabviews/zshare/actionList/printbutton'))
const BarCode = asyncElementComponent(() => import('@/components/barcode'))
const QrCode = asyncElementComponent(() => import('@/components/qrcode'))
const MkProgress = asyncElementComponent(() => import('@/components/mkProgress'))
const Video = asyncComponent(() => import('@/components/video'))
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 CardCellComponent extends Component {
  static propTpyes = {
    BID: PropTypes.any,              // 上级ID
    seq: PropTypes.any,              // 序号
    cards: PropTypes.object,         // 菜单配置信息
    cardCell: PropTypes.object,
    data: PropTypes.object,
    syncData: PropTypes.array,
    elements: PropTypes.array,       // 元素集
    updateStatus: PropTypes.func,    // 状态更新
  }
  state = {
    dict: localStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
    card: null,          // 编辑中元素
    elements: null,      // 按钮组
  }
@@ -63,59 +68,224 @@
    }
  }
  openNewView = (card, url) => {
  openNewView = (e, card) => {
    const { cardCell, data, cards } = this.props
    if (!card.link) return
    e.stopPropagation()
    let url = ''
    if (card.link === 'static') {
      url = card.linkurl
    } else {
      url = data[card.linkurl]
    }
    if (!url) {
      notification.warning({
        top: 92,
        message: '地址链接不可为空!',
        message: '链接地址不存在!',
        duration: 5
      })
      return
    }
    let Id = ''
    let con = '?'
    if (/\?/ig.test(url)) {
      con = '&'
    if (card.linkType === 'tel') {
      window.open('tel:' + url)
      return
    } else if (card.linkType === 'email') {
      let _url = 'mailto:' + url
      let fullName = sessionStorage.getItem('Full_Name') || ''
      if (fullName) {
        _url = _url + `?subject=来自${fullName}的邮件`
      }
      window.open(_url)
      return
    }
    if (cards.subtype === 'propcard') {
      Id = cardCell.setting.primaryId || ''
    if (/^sso$/ig.test(url)) {
      if (!data.LinkUrl1) {
        notification.warning({
          top: 92,
          message: '链接地址不存在!',
          duration: 5
        })
        return
      }
      let _url = data.LinkUrl1
      if (/index\.html/ig.test(_url)) {
        _url = _url.replace(/index\.html.*/ig, '')
      } else if (!/\/$/ig.test(_url)) {
        _url = _url + '/'
      }
      url = _url + 'index.html#/ssologin/' + window.btoa(window.encodeURIComponent(JSON.stringify({
        UserID: sessionStorage.getItem('UserID'),
        LoginUID: sessionStorage.getItem('LoginUID'),
        User_Name: sessionStorage.getItem('User_Name'),
        Full_Name: sessionStorage.getItem('Full_Name'),
        avatar: sessionStorage.getItem('avatar'),
        dataM: data.dataM ? 'true' : '',
        debug: data.debug || '',
        role_id: data.role_id || ''
      })))
    } else {
      Id = data[cards.setting.primaryKey] || ''
    }
    if (card.joint === 'true') {
      url = url + `${con}id=${Id}&appkey=${window.GLOB.appkey}&userid=${sessionStorage.getItem('UserID')}&LoginUID=${sessionStorage.getItem('LoginUID') || ''}`
      let Id = ''
      let con = '?'
      if (/\?/ig.test(url)) {
        con = '&'
      }
      if (cards.subtype === 'propcard' && cardCell) {
        Id = cardCell.setting.primaryId || ''
      } else {
        Id = data[cards.setting.primaryKey] || ''
      }
      if (card.joint === 'true') {
        url = url + `${con}id=${Id}&appkey=${window.GLOB.appkey}&userid=${sessionStorage.getItem('UserID')}&LoginUID=${sessionStorage.getItem('LoginUID') || ''}`
      }
    }
    window.open(url)
  }
  getColor = (marks) => {
    const { data } = this.props
    let color = ''
    marks.some(mark => {
      let originVal = data[mark.field[0]] + ''
      let contrastVal = ''
      let result = false
      if (mark.field[1] === 'static') {
        contrastVal = mark.contrastValue + ''
      } else {
        contrastVal = data[mark.field[2]] + ''
      }
      if (mark.match === '=') {
        result = originVal === contrastVal
      } else if (mark.match === '!=') {
        result = originVal !== contrastVal
      } else if (mark.match === 'like') {
        result = originVal.indexOf(contrastVal) > -1
      } else if (mark.match === '>') {
        result = parseFloat(originVal) > parseFloat(contrastVal)
      } else if (mark.match === '<') {
        result = parseFloat(originVal) < parseFloat(contrastVal)
      }
      if (result) {
        color = mark.color
      }
      return result
    })
    return color
  }
  getContent = (card) => {
    const { data, BID, cards, seq } = this.props
    const { data, cards } = this.props
    if (card.eleType === 'sequence') {
      let _style = {}
      if (card.marks) {
        _style.width = card.innerHeight
        _style.height = card.innerHeight
        _style.lineHeight = card.innerHeight + 'px'
        let mark = getMark(card.marks, data, _style)
        _style = mark.style
      }
      return (
        <Col key={card.uuid} span={card.width}>
          <div style={card.style}>
            <div className={'ant-mk-text'}>{seq}</div>
            <div className="ant-mk-text"><span className="sequence-wrap" style={_style}>{data.$Index || ''}</span></div>
          </div>
        </Col>
      )
    } else if (card.eleType === 'text') {
      let val = ''
      let _style = card.style ? {...card.style} : {}
      if (card.datatype === 'static') {
        val = card.value
        val = card.value || ''
        if (/@username@|@fullName@|@login_city@/ig.test(val)) {
          let userName = sessionStorage.getItem('User_Name') || ''
          let fullName = sessionStorage.getItem('Full_Name') || ''
          let city = sessionStorage.getItem('city') || ''
          val = val.replace(/@username@/ig, userName).replace(/@fullName@/ig, fullName).replace(/@login_city@/ig, city)
        }
      } else if (data.hasOwnProperty(card.field)) {
        val = data[card.field]
      }
      if (val === '' && card.noValue === 'hide') { // 空值隐藏
        return null
      }
      if (val !== '' && card.format) {
        if (card.format === 'YYYY-MM-DD' && /^[1-9]\d{3}(-|\/)(0[1-9]|1[0-2])(-|\/)(0[1-9]|[1-2][0-9]|3[0-1])/.test(val)) {
          val = `${val.substr(0, 4)}-${val.substr(5, 2)}-${val.substr(8, 2)}`
        let _val = null
        if (card.format === 'calendar1') {
          _val = moment(val).calendar(null, {
            sameDay: '[今天] ahh:mm',
            nextDay: '[明天] ahh:mm',
            nextWeek: 'MM月DD日 ahh:mm',
            lastDay: '[昨天] ahh:mm',
            lastWeek: 'dddd ahh:mm',
            sameElse: 'MM月DD日 ahh:mm'
          })
        } else if (card.format === 'calendar2') {
          let time = new Date(val).getTime()
          if (!isNaN(time)) {
            time = parseInt(time / 60000)                                     // 时间值
            let now = parseInt(new Date().getTime() / 60000)                  // 当前时间值
            let start = new Date(new Date().toDateString()).getTime() / 60000 // 今天零点时间值
            let split = now - time
            if (split < 0) { // 时间值在当前时间之后
              _val = moment(val).format('MM月DD日 HH:mm')
            } else if (split < 3) {
              _val = '刚刚'
            } else if (split < 5) {
              _val = '3分钟前'
            } else if (split < 10) {
              _val = '5分钟前'
            } else if (split < 20) {
              _val = '10分钟前'
            } else if (split < 30) {
              _val = '20分钟前'
            } else if (split < 60) {
              _val = '30分钟前'
            } else if (split < 420 || time > start) { // 7小时内或时间值在今天零点后
              _val = parseInt(split / 60) + '小时前'
            } else {                                  // 时间值在今天零点之前
              let _day = parseInt((start - time) / (24 * 60)) + 1
              if (_day === 1) {
                _val = '昨天'
              } else if (_day <= 30) {
                _val = _day + '天前'
              } else {
                _val = moment(val).format('MM月DD日 HH:mm')
              }
            }
          }
        } else {
          _val = moment(val).format(card.format)
        }
        // if (card.format === 'YYYY-MM-DD' && /^[1-9]\d{3}(-|\/)(0[1-9]|1[0-2])(-|\/)(0[1-9]|[1-2][0-9]|3[0-1])/.test(val)) {
        //   val = `${val.substr(0, 4)}-${val.substr(5, 2)}-${val.substr(8, 2)}`
        // }
        if (_val && _val !== 'Invalid date') {
          val = _val
        }
      }
@@ -123,15 +293,34 @@
        val = `${card.prefix || ''}${val}${card.postfix || ''}`
      }
      if (card.marks) {
        let mark = getMark(card.marks, data, _style)
        _style = mark.style
        if (mark.icon) {
          if (mark.position === 'front') {
            val = <span><MkIcon style={{color: mark.color}} type={mark.icon} /> {val}</span>
          } else {
            val = <span>{val} <MkIcon style={{color: mark.color}} type={mark.icon} /></span>
          }
        }
      }
      if (card.link) {
        _style.cursor = 'pointer'
      }
      return (
        <Col key={card.uuid} span={card.width}>
          <div style={card.style}>
            <div className={'ant-mk-text line' + card.height} style={{height: card.innerHeight || 21}}>{val}</div>
          <div style={_style} onClick={(e) => {this.openNewView(e, card)}}>
            <div className={'ant-mk-text line' + (card.height || '')} style={{height: card.innerHeight || 'auto'}}>{val}</div>
          </div>
        </Col>
      )
    } else if (card.eleType === 'number') {
      let val = ''
      let _style = card.style ? {...card.style} : {}
      if (card.datatype === 'static') {
        val = card.value
@@ -139,18 +328,35 @@
        val = data[card.field]
      }
      if (val !== '' && typeof(val) === 'number') {
      if (val === '' && card.noValue === 'hide') { // 空值隐藏
        return null
      }
      if (typeof(val) === 'number') {
        if (card.format === 'percent') {
          val = val * 100
        } else if (card.format === 'abs') {
          val = Math.abs(val)
        }
        if (card.col && card.col.type === 'number') {
          val = val.toFixed(card.col.decimal || 0)
        if (typeof(card.decimal) === 'number') {
          let decimal = card.decimal
          if (card.format === 'percent') {
            decimal = decimal - 2
          }
          if (decimal < 0) {
            decimal = 0
          }
          val = val.toFixed(decimal)
        } else {
          val = '' + val
        }
        
        if (card.format === 'thdSeparator') {
        if (card.format === 'percent' && (!card.postfix || card.postfix.indexOf('%') === -1)) {
          val = val + '%'
        } else if (card.format === 'thdSeparator') {
          val = val.replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g, '$&,')
        }
      }
@@ -158,31 +364,25 @@
      if (val !== '') {
        val = `${card.prefix || ''}${val}${card.postfix || ''}`
      }
      if (card.marks) {
        let mark = getMark(card.marks, data, _style)
      return (
        <Col key={card.uuid} span={card.width}>
          <div style={card.style}>
            <div className={'ant-mk-text line' + card.height} style={{height: card.innerHeight || 21}}>{val}</div>
          </div>
        </Col>
      )
    } else if (card.eleType === 'link') {
      let url = ''
        _style = mark.style
      if (card.datatype === 'static') {
        url = card.value
      } else if (data.hasOwnProperty(card.field)) {
        url = data[card.field]
        if (mark.icon) {
          if (mark.position === 'front') {
            val = <span><MkIcon style={{color: mark.color}} type={mark.icon} /> {val}</span>
          } else {
            val = <span>{val} <MkIcon style={{color: mark.color}} type={mark.icon} /></span>
          }
        }
      }
      let val = card.label || url
      return (
        <Col key={card.uuid} span={card.width}>
          <div style={card.style}>
            <div className={'ant-mk-text line' + card.height} style={{height: card.innerHeight || 21}}>
              <span style={{cursor: 'pointer'}} onClick={(e) => {e.stopPropagation(); this.openNewView(card, url)}}>{val}</span>
            </div>
          <div style={_style}>
            <div className={'ant-mk-text line' + (card.height || '')} style={{height: card.innerHeight || 'auto'}}>{val}</div>
          </div>
        </Col>
      )
@@ -199,13 +399,14 @@
        <Col key={card.uuid} span={card.width}>
          <div style={card.style}>
            {val ? <Tooltip title={val}>
              <Icon type={card.icon}/>
            </Tooltip> : <Icon type={card.icon}/>}
              <MkIcon type={card.icon}/>
            </Tooltip> : <MkIcon type={card.icon}/>}
          </div>
        </Col>
      )
    } else if (card.eleType === 'slider') {
      let val = 0
      let color = card.color
      if (card.datatype === 'static') {
        val = card.value
@@ -219,53 +420,80 @@
      val = val / card.maxValue * 100
      val = parseInt(val * 100) / 100
      let _val = val
      if (val > 100) {
        _val = '100%'
      } else {
        _val = `${val}%`
      if (card.marks) {
        let _color = this.getColor(card.marks)
        color = _color ? _color : color
      }
      return (
        <Col key={card.uuid} span={card.width}>
          <div style={card.style}>
            <div className="ant-mk-slider">
              <div className="ant-mk-slider-rail"></div>
              <div className="ant-mk-slider-track" style={{width: _val, backgroundColor: card.color}}></div>
              <Tooltip title={val}>
                <div className="ant-mk-slider-handle" style={{left: _val, borderColor: card.color}}></div>
              </Tooltip>
            </div>
            <MkProgress value={val} config={card} color={color}/>
          </div>
        </Col>
      )
    } else if (card.eleType === 'picture') {
      let _imagestyle = {}
      let _style = card.style ? {margin: '0 auto', ...card.style} : {}
      let url = ''
      if (card.maxWidth) {
        _style.maxWidth = card.maxWidth
        if (_style.marginLeft === '0px') {
          delete _style.marginLeft
        }
        if (_style.marginRight === '0px') {
          delete _style.marginRight
        }
      }
      if (card.url) {
        _imagestyle = {backgroundImage: `url('${card.url}')`}
      if (card.datatype === 'static') {
        url = card.url || ''
      } else {
        _imagestyle = {backgroundImage: `url('')`}
        url = data[card.field] || ''
      }
      if (card.radius === 'true') {
        _imagestyle.borderRadius = '50%'
      if (url === '' && card.noValue === 'hide') { // 空值隐藏
        return null
      }
      if (url) {
        _imagestyle = {backgroundImage: `url('${url}')`}
      } else {
        _imagestyle = {backgroundImage: `url(${LostPng})`, backgroundSize: 'contain'}
      }
      if (card.lenWidRadio === '16:9') {
        _imagestyle.paddingTop = '56.25%'
      } else if (card.lenWidRadio === '3:2') {
        _imagestyle.paddingTop = '66.67%'
      } else if (card.lenWidRadio === '4:3') {
        _imagestyle.paddingTop = '75%'
      if (_style.borderRadius) {
        _imagestyle.borderRadius = _style.borderRadius
      }
      if (PicRadio[card.lenWidRadio]) {
        _imagestyle.paddingTop = PicRadio[card.lenWidRadio]
      } else {
        _imagestyle.paddingTop = '100%'
      }
      if (card.link) {
        _style.cursor = 'pointer'
      }
      let scale = url && card.scale === 'true'
      return (
        <Col key={card.uuid} span={card.width}>
          <div style={card.style}>
            <div className="ant-mk-picture" style={_imagestyle}></div>
          <div style={_style} onClick={(e) => {this.openNewView(e, card)}}>
            <div
              className={'ant-mk-picture' + (scale ? ' scale' : '')}
              onClick={(e) => {
                if (scale) {
                  e.stopPropagation()
                } else {
                  return
                }
                MKEmitter.emit('mkImageScale', url)
              }}
              style={_imagestyle}
            ></div>
          </div>
        </Col>
      )
@@ -284,7 +512,11 @@
      if (card.datatype === 'static') {
        val = card.value
      } else if (data.hasOwnProperty(card.field)) {
        val = data[card.field]
        val = data[card.field] || ''
      }
      if (val === '' && card.noValue === 'hide') { // 空值隐藏
        return null
      }
      return (
@@ -296,13 +528,37 @@
          </div>
        </Col>
      )
    } else if (card.eleType === 'video') {
      let url = ''
      if (card.datatype === 'static') {
        url = card.url
      } else {
        url = data[card.field] || ''
      }
      if (url === '' && card.noValue === 'hide') { // 空值隐藏
        return null
      }
      return (
        <Col key={card.uuid} span={card.width}>
          <div style={card.style}>
            <Video card={card} value={url}/>
          </div>
        </Col>
      )
    } else if (card.eleType === 'qrcode') {
      let val = ''
      if (card.datatype === 'static') {
        val = card.value
      } else if (data.hasOwnProperty(card.field)) {
        val = data[card.field]
        val = data[card.field] || ''
      }
      if (val === '' && card.noValue === 'hide') { // 空值隐藏
        return null
      }
      return (
@@ -322,138 +578,237 @@
          </div>
        </Col>
      )
    } else if (card.eleType === 'formula') {
      let val = 0
      let _style = card.style ? {...card.style} : {}
      if (card.$sync) {
        if (card.eval === 'false') {
          val = ''
        }
        this.props.syncData.forEach(item => {
          let _val = card.formula
          Object.keys(item).forEach(key => {
            let reg = new RegExp('@' + key + '@', 'ig')
            _val = _val.replace(reg, item[key])
          })
          if (card.eval !== 'false') {
            try {
              // eslint-disable-next-line
              _val = eval(_val)
            } catch (e) {
              _val = 0
            }
          }
          if (!val) return
          val += _val
        })
      } else if (data) {
        let _val = card.formula
        Object.keys(data).forEach(key => {
          let reg = new RegExp('@' + key + '@', 'ig')
          _val = _val.replace(reg, data[key])
        })
        if (card.eval !== 'false') {
          try {
            // eslint-disable-next-line
            _val = eval(_val)
          } catch (e) {
            _val = ''
          }
        }
        val = _val === undefined ? '' : _val
      }
      if (val !== '') {
        val = `${card.prefix || ''}${val}${card.postfix || ''}`
        if (card.eval === 'false') {
          val = val.replace(/\n/ig, '<br/>').replace(/\s/ig, '&nbsp;')
          val = <span dangerouslySetInnerHTML={{__html: val}}></span>
        }
      }
      if (card.marks) {
        let mark = getMark(card.marks, data, _style)
        _style = mark.style
        if (mark.icon) {
          if (mark.position === 'front') {
            val = <span><MkIcon style={{color: mark.color}} type={mark.icon} /> {val}</span>
          } else {
            val = <span>{val} <MkIcon style={{color: mark.color}} type={mark.icon} /></span>
          }
        }
      }
      return (
        <Col key={card.uuid} span={card.width}>
          <div style={_style}>
            <div className={'ant-mk-text line' + (card.height || '')} style={{height: card.innerHeight || 'auto'}}>{val}</div>
          </div>
        </Col>
      )
    } else if (card.eleType === 'button') {
      if (['exec', 'prompt', 'pop'].includes(card.OpenType)) {
      let _disabled = data.$disabled
      if (card.control === 'hidden') {
        let s = data[card.controlField] !== undefined ? data[card.controlField] + '' : ''
        if (s === card.controlVal || (card.controlVal && card.controlVal.split(',').includes(s))) {
          return null
        }
      } else if (card.control === 'disabled') {
        let s = data[card.controlField] !== undefined ? data[card.controlField] + '' : ''
        if (s === card.controlVal || (card.controlVal && card.controlVal.split(',').includes(s))) {
          _disabled = true
        }
      }
      let _data = [data]
      if (data.$$type === 'extendCard') {
        _data = data.$$selectedData || []
      } else if (data.$$empty) {
        _data = []
      } else if (card.$sync) {
        _data = this.props.syncData
      }
      if (['exec', 'prompt', 'pop', 'form'].includes(card.OpenType)) {
        return (
          <Col key={card.uuid} span={card.width}>
            <div style={card.style}>
              <NormalButton
                BID={BID}
                btn={card}
                show={card.show}
                style={card.btnstyle}
                setting={cards.setting}
                columns={cards.columns}
                selectedData={[data]}
                updateStatus={this.props.updateStatus}
              />
            </div>
          <Col key={card.uuid} className="mk-cell-btn" style={card.wrapStyle} span={card.width}>
            <NormalButton
              BID={data.$$BID}
              BData={data.$$BData || ''}
              disabled={_disabled}
              lineId={data.$$key || ''}
              btn={card}
              show={card.show}
              style={card.style}
              setting={cards.setting}
              columns={cards.columns}
              selectedData={_data}
            />
          </Col>
        )
      } else if (card.OpenType === 'excelIn') {
        return (
          <Col key={card.uuid} span={card.width}>
            <div style={card.style}>
              <ExcelInButton
                BID={BID}
                btn={card}
                show={card.show}
                style={card.btnstyle}
                setting={cards.setting}
                selectedData={[data]}
                updateStatus={this.props.updateStatus}
              />
            </div>
          <Col key={card.uuid} className="mk-cell-btn" style={card.wrapStyle} span={card.width}>
            <ExcelInButton
              BID={data.$$BID}
              BData={data.$$BData || ''}
              disabled={_disabled}
              lineId={data.$$key || ''}
              btn={card}
              show={card.show}
              style={card.style}
              setting={cards.setting}
              selectedData={_data}
            />
          </Col>
        )
      } else if (card.OpenType === 'excelOut') {
        return (
          <Col key={card.uuid} span={card.width}>
            <div style={card.style}>
              <ExcelOutButton
                BID={BID}
                btn={card}
                show={card.show}
                style={card.btnstyle}
                setting={cards.setting}
                // getexceloutparam={getexceloutparam}
                updateStatus={this.props.updateStatus}
              />
            </div>
          <Col key={card.uuid} className="mk-cell-btn" style={card.wrapStyle} span={card.width}>
            <ExcelOutButton
              BID={data.$$BID}
              BData={data.$$BData || ''}
              lineId={data.$$key || ''}
              disabled={_disabled}
              btn={card}
              show={card.show}
              style={card.style}
              setting={cards.setting}
            />
          </Col>
        )
      } else if (card.OpenType === 'popview') {
        return (
          <Col key={card.uuid} span={card.width}>
            <div style={card.style}>
              <PopupButton
                BID={BID}
                btn={card}
                show={card.show}
                style={card.btnstyle}
                setting={cards.setting}
                selectedData={[data]}
                updateStatus={this.props.updateStatus}
              />
            </div>
          <Col key={card.uuid} className="mk-cell-btn" style={card.wrapStyle} span={card.width}>
            <PopupButton
              BID={data.$$BID}
              BData={data.$$BData || ''}
              disabled={_disabled}
              lineId={data.$$key || ''}
              btn={card}
              show={card.show}
              style={card.style}
              setting={cards.setting}
              selectedData={_data}
            />
          </Col>
        )
      } else if (card.OpenType === 'tab') {
        return (
          <Col key={card.uuid} span={card.width}>
            <div style={card.style}>
              <TabButton
                btn={card}
                show={card.show}
                style={card.btnstyle}
                setting={cards.setting}
                selectedData={[data]}
                updateStatus={this.props.updateStatus}
              />
            </div>
          <Col key={card.uuid} className="mk-cell-btn" style={card.wrapStyle} span={card.width}>
            <TabButton
              BData={data.$$BData || ''}
              disabled={_disabled}
              lineId={data.$$key || ''}
              btn={card}
              show={card.show}
              style={card.style}
              setting={cards.setting}
              selectedData={_data}
            />
          </Col>
        )
      } else if (card.OpenType === 'innerpage') {
        return (
          <Col key={card.uuid} span={card.width}>
            <div style={card.style}>
              <NewPageButton
                btn={card}
                show={card.show}
                style={card.btnstyle}
                setting={cards.setting}
                selectedData={[data]}
                updateStatus={this.props.updateStatus}
              />
            </div>
          <Col key={card.uuid} className="mk-cell-btn" style={card.wrapStyle} span={card.width}>
            <NewPageButton
              BData={data.$$BData || ''}
              disabled={_disabled}
              lineId={data.$$key || ''}
              btn={card}
              show={card.show}
              style={card.style}
              setting={cards.setting}
              selectedData={_data}
            />
          </Col>
        )
      } else if (card.OpenType === 'funcbutton') {
        if (card.funcType === 'changeuser') {
        if (card.funcType === 'changeuser' || card.funcType === 'closetab') {
          return (
            <Col key={card.uuid} span={card.width}>
              <div style={card.style}>
                <ChangeUserButton
                  BID={BID}
                  btn={card}
                  show={card.show}
                  style={card.btnstyle}
                  setting={cards.setting}
                  selectedData={[data]}
                  updateStatus={this.props.updateStatus}
                />
              </div>
            <Col key={card.uuid} className="mk-cell-btn" style={card.wrapStyle} span={card.width}>
              <ChangeUserButton
                BID={data.$$BID}
                BData={data.$$BData || ''}
                disabled={_disabled}
                lineId={data.$$key || ''}
                btn={card}
                show={card.show}
                style={card.style}
                setting={cards.setting}
                selectedData={_data}
              />
            </Col>
          )
        } else if (card.funcType === 'print') {
          return (
            <Col key={card.uuid} span={card.width}>
              <div style={card.style}>
                <PrintButton
                  BID={BID}
                  btn={card}
                  show={card.show}
                  style={card.btnstyle}
                  setting={cards.setting}
                  selectedData={[data]}
                  updateStatus={this.props.updateStatus}
                />
              </div>
            <Col key={card.uuid} className="mk-cell-btn" style={card.wrapStyle} span={card.width}>
              <PrintButton
                BID={data.$$BID}
                BData={data.$$BData || ''}
                disabled={_disabled}
                lineId={data.$$key || ''}
                btn={card}
                show={card.show}
                style={card.style}
                setting={cards.setting}
                selectedData={_data}
              />
            </Col>
          )
        }
      }
    }
    return null
  }
  render() {