king
2021-04-07 f3167f8371d19d0ea8fe7d0e7af5517ff0b08cd2
src/tabviews/custom/components/card/cardcellList/index.jsx
@@ -4,8 +4,6 @@
import { Icon, 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'
@@ -34,7 +32,6 @@
  }
  state = {
    dict: localStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
    card: null,          // 编辑中元素
    elements: null,      // 按钮组
  }
@@ -278,7 +275,13 @@
      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]
      }
@@ -304,7 +307,7 @@
      return (
        <Col key={card.uuid} span={card.width}>
          <div style={_style} onClick={(e) => {this.openNewView(e, card)}}>
            <div className={'ant-mk-text line' + card.height} style={{height: card.innerHeight || 21}}>{val}</div>
            <div className={'ant-mk-text line' + card.height} style={{height: card.innerHeight || 'auto'}}>{val}</div>
          </div>
        </Col>
      )
@@ -356,7 +359,7 @@
      return (
        <Col key={card.uuid} span={card.width}>
          <div style={_style}>
            <div className={'ant-mk-text line' + card.height} style={{height: card.innerHeight || 21}}>{val}</div>
            <div className={'ant-mk-text line' + card.height} style={{height: card.innerHeight || 'auto'}}>{val}</div>
          </div>
        </Col>
      )