king
2022-10-25 5891206952e2ff63e87aed2f47df5324b019d32e
src/tabviews/custom/components/card/cardcellList/index.jsx
@@ -9,11 +9,10 @@
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 Encrypts from '@/components/encrypts'
import './index.scss'
moment.suppressDeprecationWarnings = true
const { Paragraph } = Typography
const NormalButton = asyncComponent(() => import('@/tabviews/zshare/actionList/normalbutton'))
const ExcelInButton = asyncComponent(() => import('@/tabviews/zshare/actionList/excelInbutton'))
@@ -29,6 +28,7 @@
const QrCode = asyncElementComponent(() => import('@/components/qrcode'))
const MkProgress = asyncElementComponent(() => import('@/components/mkProgress'))
const Video = asyncComponent(() => import('@/components/video'))
const MkPicture = asyncComponent(() => import('@/components/mkPicture'))
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%',
@@ -243,7 +243,7 @@
        contents.push(
          <Col key={card.uuid} span={card.width}>
            <div style={card.style}>
              <div className="ant-mk-text"><span className="sequence-wrap" style={_style}>{data.$Index || ''}</span></div>
              <div className="ant-mk-text line1" style={{height: card.innerHeight || 'auto'}}><span className="sequence-wrap" style={_style}>{data.$Index || ''}</span></div>
            </div>
          </Col>
        )
@@ -454,6 +454,21 @@
        )
      } else if (card.eleType === 'icon') {
        let val = ''
        let height = card.innerHeight
        if (!height) { // 兼容
          let fontSize = 14
          let lineHeight = 1.5
          if (card.style.fontSize) {
            fontSize = parseInt(card.style.fontSize)
          }
          if (card.style.lineHeight) {
            lineHeight = parseFloat(card.style.lineHeight)
          }
          height = fontSize * lineHeight
        }
  
        if (card.datatype === 'static') {
          val = card.tooltip
@@ -465,8 +480,8 @@
          <Col key={card.uuid} span={card.width}>
            <div style={card.style}>
              {val ? <Tooltip title={val}>
                <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}/>}
                <MkIcon className="ant-mk-icon" style={{height: height}} type={card.icon}/>
              </Tooltip> : <MkIcon className="ant-mk-icon" style={{height: height}} type={card.icon}/>}
            </div>
          </Col>
        )
@@ -540,26 +555,12 @@
        }
  
        let scale = url && card.scale === 'true'
        let urls = url ? url.split(',').filter(Boolean) : [LostPng]
        if (!url) {
          _imagestyle = {backgroundSize: 'contain'}
        }
        let urls = url ? url.split(',').filter(Boolean) : ['']
        urls.forEach((u, i) => {
          contents.push(<Col key={card.uuid + i} span={card.width}>
            <div style={_style} onClick={(e) => {this.openNewView(e, card)}}>
              <div
                className={'ant-mk-picture' + (scale ? ' scale' : '')}
                onClick={(e) => {
                  if (!scale) return
                  e.stopPropagation()
                  MKEmitter.emit('mkImageScale', url, urls)
                }}
                style={{..._imagestyle, backgroundImage: `url('${u}')`}}
              ></div>
              <MkPicture style={_imagestyle} scale={scale} url={u} urls={urls}/>
            </div>
          </Col>)
        })
@@ -660,8 +661,8 @@
  
        contents.push(
          <Col key={card.uuid} span={card.width}>
            <div className="ant-mk-date" style={card.style}>
              {val}
            <div style={card.style}>
              <div className="ant-mk-text line1" style={{height: card.innerHeight || 'auto'}}>{val}</div>
            </div>
          </Col>
        )
@@ -832,9 +833,9 @@
            <Col key={card.uuid} className="mk-cell-btn" style={card.wrapStyle} span={card.width}>
              <TabButton
                btn={card}
                BID={data.$$BID}
                BData={data.$$BData || ''}
                disabled={_disabled}
                setting={cards.setting}
                selectedData={_data}
              />
            </Col>
@@ -846,7 +847,6 @@
                btn={card}
                BData={data.$$BData || ''}
                disabled={_disabled}
                setting={cards.setting}
                selectedData={_data}
              />
            </Col>