king
2022-08-02 8d66ff34fae5b048a6b7923cc75d34f13a08be9d
src/tabviews/custom/components/card/cardcellList/index.jsx
@@ -23,6 +23,7 @@
const ChangeUserButton = asyncComponent(() => import('@/tabviews/zshare/actionList/changeuserbutton'))
const PrintButton = asyncComponent(() => import('@/tabviews/zshare/actionList/printbutton'))
const FuncMegvii = asyncComponent(() => import('@/tabviews/zshare/actionList/funcMegvii'))
const FuncZip = asyncComponent(() => import('@/tabviews/zshare/actionList/funczip'))
const BarCode = asyncElementComponent(() => import('@/components/barcode'))
const QrCode = asyncElementComponent(() => import('@/components/qrcode'))
const MkProgress = asyncElementComponent(() => import('@/components/mkProgress'))
@@ -262,11 +263,11 @@
      if (card.datatype === 'static') {
        val = card.value || ''
        if (/@username@|@fullName@|@login_city@/ig.test(val)) {
        if (/@username@|@fullName@|@mk_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)
          val = val.replace(/@username@/ig, userName).replace(/@fullName@/ig, fullName).replace(/@mk_city@/ig, city)
        }
      } else if (data.hasOwnProperty(card.field)) {
        val = data[card.field]
@@ -336,18 +337,15 @@
      }
      if (val !== '') {
        let orival = val
        if (card.fixStyle === 'alone') {
          let _s = {fontSize: card.fixSize, color: card.fixColor, marginLeft: card.fixLeft, marginRight: card.fixRight}
          if (card.copyable === 'true') {
            val = <><span style={_s}>{card.prefix || ''}</span><Paragraph copyable={{ text: `${card.prefix || ''}${val}${card.postfix || ''}` }}>{val}</Paragraph><span style={_s}>{card.postfix || ''}</span></>
          } else {
            val = <><span style={_s}>{card.prefix || ''}</span>{val}<span style={_s}>{card.postfix || ''}</span></>
          }
        } else if (card.copyable === 'true') {
          val = `${card.prefix || ''}${val}${card.postfix || ''}`
          val = <Paragraph copyable={{ text: val }}>{val}</Paragraph>
          val = <><span style={_s}>{card.prefix || ''}</span>{val}<span style={_s}>{card.postfix || ''}</span></>
        } else {
          val = `${card.prefix || ''}${val}${card.postfix || ''}`
        }
        if (card.copyable === 'true') {
          val = <Paragraph copyable={{ text: orival }}>{val}</Paragraph>
        }
      }
@@ -358,9 +356,9 @@
        if (mark.icon) {
          if (mark.position === 'front') {
            val = <span><MkIcon style={{color: mark.color}} type={mark.icon} /> {val}</span>
            val = <span><MkIcon style={mark.innerStyle} type={mark.icon} /> {val}</span>
          } else {
            val = <span>{val} <MkIcon style={{color: mark.color}} type={mark.icon} /></span>
            val = <span>{val} <MkIcon style={mark.innerStyle} type={mark.icon} /></span>
          }
        }
      }
@@ -439,9 +437,9 @@
        if (mark.icon) {
          if (mark.position === 'front') {
            val = <span><MkIcon style={{color: mark.color}} type={mark.icon} /> {val}</span>
            val = <span><MkIcon style={mark.innerStyle} type={mark.icon} /> {val}</span>
          } else {
            val = <span>{val} <MkIcon style={{color: mark.color}} type={mark.icon} /></span>
            val = <span>{val} <MkIcon style={mark.innerStyle} type={mark.icon} /></span>
          }
        }
      }
@@ -466,8 +464,8 @@
        <Col key={card.uuid} span={card.width}>
          <div style={card.style}>
            {val ? <Tooltip title={val}>
              <MkIcon type={card.icon}/>
            </Tooltip> : <MkIcon type={card.icon}/>}
              <MkIcon className="ant-mk-icon" style={{height: card.innerHeight || 'auto'}} type={card.icon}/>
            </Tooltip> : <MkIcon className="ant-mk-icon" style={{height: card.innerHeight || 'auto'}} type={card.icon}/>}
          </div>
        </Col>
      )
@@ -515,6 +513,9 @@
      if (card.datatype === 'static') {
        url = card.url || ''
        if (url === '@icon@') {
          url = sessionStorage.getItem('avatar') || ''
        }
      } else {
        url = data[card.field] || ''
      }
@@ -733,9 +734,9 @@
        if (mark.icon) {
          if (mark.position === 'front') {
            val = <span><MkIcon style={{color: mark.color}} type={mark.icon} /> {val}</span>
            val = <span><MkIcon style={mark.innerStyle} type={mark.icon} /> {val}</span>
          } else {
            val = <span>{val} <MkIcon style={{color: mark.color}} type={mark.icon} /></span>
            val = <span>{val} <MkIcon style={mark.innerStyle} type={mark.icon} /></span>
          }
        }
      }
@@ -887,6 +888,18 @@
              />
            </Col>
          )
        } else if (card.funcType === 'filezip') {
          return (
            <Col key={card.uuid} className="mk-cell-btn" style={card.wrapStyle} span={card.width}>
              <FuncZip
                btn={card}
                BID={data.$$BID}
                disabled={_disabled}
                setting={cards.setting}
                selectedData={_data}
              />
            </Col>
          )
        }
      }
    }