| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Col, Tooltip, notification } from 'antd' |
| | | import { Col, Tooltip, notification, Typography } from 'antd' |
| | | import moment from 'moment' |
| | | |
| | | // import Api from '@/api' |
| | |
| | | import LostPng from '@/assets/img/lost.png' |
| | | import './index.scss' |
| | | |
| | | const { Paragraph } = Typography |
| | | const NormalButton = asyncComponent(() => import('@/tabviews/zshare/actionList/normalbutton')) |
| | | const ExcelInButton = asyncComponent(() => import('@/tabviews/zshare/actionList/excelInbutton')) |
| | | const ExcelOutButton = asyncComponent(() => import('@/tabviews/zshare/actionList/exceloutbutton')) |
| | |
| | | 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')) |
| | |
| | | |
| | | 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] |
| | |
| | | } |
| | | |
| | | if (val !== '') { |
| | | let orival = val |
| | | if (card.fixStyle === 'alone') { |
| | | let _s = {fontSize: card.fixSize, color: card.fixColor, marginLeft: card.fixLeft, marginRight: card.fixRight} |
| | | 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> |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | 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> |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | 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> |
| | | } |
| | | } |
| | | } |
| | |
| | | <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> |
| | | ) |
| | |
| | | |
| | | if (card.datatype === 'static') { |
| | | url = card.url || '' |
| | | if (url === '@icon@') { |
| | | url = sessionStorage.getItem('avatar') || '' |
| | | } |
| | | } else { |
| | | url = data[card.field] || '' |
| | | } |
| | |
| | | return null |
| | | } |
| | | |
| | | let poster = '' |
| | | |
| | | if (card.posterType === 'dynamic') { |
| | | poster = data[card.posterField] || '' |
| | | } else { |
| | | poster = card.posterUrl || '' |
| | | } |
| | | |
| | | return ( |
| | | <Col key={card.uuid} span={card.width}> |
| | | <div style={card.style}> |
| | | <Video card={card} value={url}/> |
| | | <div className="video-wrap" style={card.style}> |
| | | <Video card={card} poster={poster} value={url}/> |
| | | </div> |
| | | </Col> |
| | | ) |
| | |
| | | |
| | | 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> |
| | | } |
| | | } |
| | | } |
| | |
| | | return ( |
| | | <Col key={card.uuid} className="mk-cell-btn" style={card.wrapStyle} span={card.width}> |
| | | <NormalButton |
| | | btn={card} |
| | | 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} |
| | |
| | | return ( |
| | | <Col key={card.uuid} className="mk-cell-btn" style={card.wrapStyle} span={card.width}> |
| | | <ExcelInButton |
| | | btn={card} |
| | | BID={data.$$BID} |
| | | BData={data.$$BData || ''} |
| | | disabled={_disabled} |
| | | lineId={data.$$key || ''} |
| | | btn={card} |
| | | show={card.show} |
| | | style={card.style} |
| | | setting={cards.setting} |
| | | selectedData={_data} |
| | | /> |
| | |
| | | return ( |
| | | <Col key={card.uuid} className="mk-cell-btn" style={card.wrapStyle} span={card.width}> |
| | | <ExcelOutButton |
| | | btn={card} |
| | | BID={data.$$BID} |
| | | BData={data.$$BData || ''} |
| | | lineId={data.$$key || ''} |
| | | disabled={_disabled} |
| | | btn={card} |
| | | show={card.show} |
| | | style={card.style} |
| | | setting={cards.setting} |
| | | selectedData={_data} |
| | | /> |
| | | </Col> |
| | | ) |
| | |
| | | return ( |
| | | <Col key={card.uuid} className="mk-cell-btn" style={card.wrapStyle} span={card.width}> |
| | | <PopupButton |
| | | btn={card} |
| | | BID={data.$$BID} |
| | | BData={data.$$BData || ''} |
| | | disabled={_disabled} |
| | | lineId={data.$$key || ''} |
| | | btn={card} |
| | | show={card.show} |
| | | style={card.style} |
| | | setting={cards.setting} |
| | | selectedData={_data} |
| | | /> |
| | |
| | | return ( |
| | | <Col key={card.uuid} className="mk-cell-btn" style={card.wrapStyle} span={card.width}> |
| | | <TabButton |
| | | btn={card} |
| | | BData={data.$$BData || ''} |
| | | disabled={_disabled} |
| | | lineId={data.$$key || ''} |
| | | btn={card} |
| | | show={card.show} |
| | | style={card.style} |
| | | setting={cards.setting} |
| | | selectedData={_data} |
| | | /> |
| | |
| | | return ( |
| | | <Col key={card.uuid} className="mk-cell-btn" style={card.wrapStyle} span={card.width}> |
| | | <NewPageButton |
| | | btn={card} |
| | | BData={data.$$BData || ''} |
| | | disabled={_disabled} |
| | | lineId={data.$$key || ''} |
| | | btn={card} |
| | | show={card.show} |
| | | style={card.style} |
| | | setting={cards.setting} |
| | | selectedData={_data} |
| | | /> |
| | |
| | | return ( |
| | | <Col key={card.uuid} className="mk-cell-btn" style={card.wrapStyle} span={card.width}> |
| | | <ChangeUserButton |
| | | btn={card} |
| | | BID={data.$$BID} |
| | | BData={data.$$BData || ''} |
| | | disabled={_disabled} |
| | | lineId={data.$$key || ''} |
| | | btn={card} |
| | | show={card.show} |
| | | style={card.style} |
| | | setting={cards.setting} |
| | | selectedData={_data} |
| | | /> |
| | |
| | | return ( |
| | | <Col key={card.uuid} className="mk-cell-btn" style={card.wrapStyle} span={card.width}> |
| | | <PrintButton |
| | | btn={card} |
| | | BID={data.$$BID} |
| | | BData={data.$$BData || ''} |
| | | disabled={_disabled} |
| | | lineId={data.$$key || ''} |
| | | btn={card} |
| | | show={card.show} |
| | | style={card.style} |
| | | setting={cards.setting} |
| | | selectedData={_data} |
| | | /> |
| | |
| | | return ( |
| | | <Col key={card.uuid} className="mk-cell-btn" style={card.wrapStyle} span={card.width}> |
| | | <FuncMegvii |
| | | btn={card} |
| | | BID={data.$$BID} |
| | | disabled={_disabled} |
| | | lineId={data.$$key || ''} |
| | | setting={cards.setting} |
| | | selectedData={_data} |
| | | /> |
| | | </Col> |
| | | ) |
| | | } else if (card.funcType === 'filezip') { |
| | | return ( |
| | | <Col key={card.uuid} className="mk-cell-btn" style={card.wrapStyle} span={card.width}> |
| | | <FuncZip |
| | | btn={card} |
| | | show={card.show} |
| | | style={card.style} |
| | | BID={data.$$BID} |
| | | disabled={_disabled} |
| | | setting={cards.setting} |
| | | selectedData={_data} |
| | | /> |