From 8d66ff34fae5b048a6b7923cc75d34f13a08be9d Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 02 八月 2022 11:42:43 +0800
Subject: [PATCH] Merge branch 'develop'

---
 src/tabviews/custom/components/card/cardcellList/index.jsx |   99 +++++++++++++++++++++++++------------------------
 1 files changed, 51 insertions(+), 48 deletions(-)

diff --git a/src/tabviews/custom/components/card/cardcellList/index.jsx b/src/tabviews/custom/components/card/cardcellList/index.jsx
index 34c8fe2..00b8a4e 100644
--- a/src/tabviews/custom/components/card/cardcellList/index.jsx
+++ b/src/tabviews/custom/components/card/cardcellList/index.jsx
@@ -1,7 +1,7 @@
 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'
@@ -13,6 +13,7 @@
 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'))
@@ -22,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'))
@@ -261,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]
@@ -335,11 +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}
           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>
         }
       }
 
@@ -350,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>
           }
         }
       }
@@ -431,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>
           }
         }
       }
@@ -458,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>
       )
@@ -507,6 +513,9 @@
 
       if (card.datatype === 'static') {
         url = card.url || ''
+        if (url === '@icon@') {
+          url = sessionStorage.getItem('avatar') || ''
+        }
       } else {
         url = data[card.field] || ''
       }
@@ -600,10 +609,18 @@
         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>
       )
@@ -717,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>
           }
         }
       }
@@ -759,13 +776,10 @@
         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}
@@ -776,13 +790,10 @@
         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}
             />
@@ -792,14 +803,12 @@
         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>
         )
@@ -807,13 +816,10 @@
         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}
             />
@@ -823,12 +829,9 @@
         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}
             />
@@ -838,12 +841,9 @@
         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}
             />
@@ -854,13 +854,10 @@
           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}
               />
@@ -870,13 +867,10 @@
           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}
               />
@@ -886,12 +880,21 @@
           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}
               />

--
Gitblit v1.8.0