From 9e39c53e5cec0f5a98a2d805aeda7c2d87060633 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 29 七月 2021 15:18:12 +0800
Subject: [PATCH] 2021-07-29

---
 src/mob/components/tabs/antv-tabs/index.scss              |    9 +
 src/tabviews/zshare/actionList/tabbutton/index.jsx        |   21 ++++
 src/mob/components/tabs/antv-tabs/index.jsx               |    2 
 src/tabviews/zshare/actionList/popupbutton/index.jsx      |   21 ++++
 src/menu/components/share/actioncomponent/formconfig.jsx  |    2 
 src/mob/components/menubar/normal-menubar/index.jsx       |    2 
 src/menu/pastecontroller/index.jsx                        |   21 +++--
 src/tabviews/zshare/actionList/excelInbutton/index.jsx    |   21 ++++
 src/tabviews/zshare/actionList/printbutton/index.jsx      |   21 ++++
 src/tabviews/zshare/actionList/exceloutbutton/index.jsx   |   21 ++++
 src/tabviews/custom/index.jsx                             |   16 +++
 src/tabviews/zshare/actionList/newpagebutton/index.jsx    |   21 ++++
 src/tabviews/zshare/actionList/normalbutton/index.jsx     |   21 ++++
 src/tabviews/zshare/actionList/changeuserbutton/index.jsx |   21 ++++
 14 files changed, 178 insertions(+), 42 deletions(-)

diff --git a/src/menu/components/share/actioncomponent/formconfig.jsx b/src/menu/components/share/actioncomponent/formconfig.jsx
index b038d5c..29b9405 100644
--- a/src/menu/components/share/actioncomponent/formconfig.jsx
+++ b/src/menu/components/share/actioncomponent/formconfig.jsx
@@ -415,7 +415,7 @@
     {
       type: 'radio',
       key: 'show',
-      label: "鏄剧ず涓�",
+      label: '鏄剧ず涓�',
       initVal: card.show || 'button',
       required: true,
       options: [{
diff --git a/src/menu/pastecontroller/index.jsx b/src/menu/pastecontroller/index.jsx
index 7b3153c..796dc1c 100644
--- a/src/menu/pastecontroller/index.jsx
+++ b/src/menu/pastecontroller/index.jsx
@@ -65,6 +65,11 @@
         cell.uuid = Utils.getuuid()
         return cell
       })
+    } else if (item.type === 'balcony') {
+      item.elements = item.elements.map(cell => {
+        cell.uuid = Utils.getuuid()
+        return cell
+      })
     } else if (item.type === 'card' || (item.type === 'table' && item.subtype === 'tablecard')) {
       item.subcards && item.subcards.forEach(card => {
         card.uuid = Utils.getuuid()
@@ -201,20 +206,18 @@
     const { Tab } = this.props
 
     let isgroup = Tab && Tab.type === 'group' ? true : false
-    let options = ['tabs', 'datacard', 'propcard', 'mainsearch', 'group', 'normaltable', 'tablecard', 'line', 'bar', 'pie', 'dashboard', 'scatter']
+    let options = ['tabs', 'datacard', 'propcard', 'mainsearch', 'balcony', 'group', 'normaltable', 'tablecard', 'line', 'bar', 'pie', 'dashboard', 'scatter']
 
     if (sessionStorage.getItem('appType') === 'mob') {
       options.push('menubar')
     }
+
+    if (isgroup) {
+      options = options.filter(item => !['tabs', 'mainsearch', 'group'].includes(item))
+    }
+
     this.pasteFormRef.handleConfirm().then(res => {
-      if (!isgroup && !options.includes(res.copyType)) {
-        notification.warning({
-          top: 92,
-          message: '閰嶇疆淇℃伅鏍煎紡閿欒锛�',
-          duration: 5
-        })
-        return
-      } else if (isgroup && !['datacard', 'propcard', 'normaltable', 'tablecard', 'line', 'bar', 'pie', 'dashboard', 'scatter'].includes(res.copyType)) {
+      if (!options.includes(res.copyType)) {
         notification.warning({
           top: 92,
           message: '閰嶇疆淇℃伅鏍煎紡閿欒锛�',
diff --git a/src/mob/components/menubar/normal-menubar/index.jsx b/src/mob/components/menubar/normal-menubar/index.jsx
index 8603277..982740a 100644
--- a/src/mob/components/menubar/normal-menubar/index.jsx
+++ b/src/mob/components/menubar/normal-menubar/index.jsx
@@ -247,7 +247,7 @@
           <div className="mk-popover-control">
             <Icon className="plus" title="娣诲姞鑿滃崟" onClick={this.addMenu} type="plus" />
             <WrapComponent config={card} updateConfig={this.updateComponent} />
-            <CopyComponent type="normalmenu" card={card}/>
+            <CopyComponent type="menubar" card={card}/>
             <PasteComponent config={card} options={['menucell']} updateConfig={this.updateComponent} />
             <Icon className="style" title="璋冩暣鏍峰紡" onClick={this.changeStyle} type="font-colors" />
             <UserComponent config={card}/>
diff --git a/src/mob/components/tabs/antv-tabs/index.jsx b/src/mob/components/tabs/antv-tabs/index.jsx
index b98c70c..d5e2437 100644
--- a/src/mob/components/tabs/antv-tabs/index.jsx
+++ b/src/mob/components/tabs/antv-tabs/index.jsx
@@ -350,7 +350,7 @@
     let _style = resetStyle(tabs.style)
 
     return (
-      <div className={'menu-tabs-edit-box ' + tabs.setting.display} style={_style} onClick={this.clickComponent} id={tabs.uuid}>
+      <div className={'mob-tabs-edit-box ' + tabs.setting.display} style={_style} onClick={this.clickComponent} id={tabs.uuid}>
         <DraggableTabs tabPosition={tabs.setting.position} type={tabs.setting.tabStyle} tabsMove={this.moveSwitch}>
           {tabs.subtabs.map(tab => (
             <TabPane tab={
diff --git a/src/mob/components/tabs/antv-tabs/index.scss b/src/mob/components/tabs/antv-tabs/index.scss
index 7ad16c9..2157466 100644
--- a/src/mob/components/tabs/antv-tabs/index.scss
+++ b/src/mob/components/tabs/antv-tabs/index.scss
@@ -1,4 +1,4 @@
-.menu-tabs-edit-box {
+.mob-tabs-edit-box {
   position: relative;
   box-sizing: border-box;
   background: #ffffff;
@@ -17,6 +17,9 @@
     background: rgba(255, 255, 255, 0.55);
   }
 
+  .ant-tabs-bar.ant-tabs-top-bar {
+    margin-bottom: 0;
+  }
   .ant-tabs.ant-tabs-left, .ant-tabs.ant-tabs-bottom {
     .tab-shell-inner {
       padding-top: 25px;
@@ -92,13 +95,13 @@
     padding: 3px;
   }
 }
-.menu-tabs-edit-box:hover {
+.mob-tabs-edit-box:hover {
   z-index: 1;
   box-shadow: 0px 0px 4px #1890ff;
 }
 
 .mob-shell {
-  .menu-tabs-edit-box.flex {
+  .mob-tabs-edit-box.flex {
     >.ant-tabs.ant-tabs-top, >.ant-tabs.ant-tabs-bottom {
       >.ant-tabs-bar {
         >.ant-tabs-nav-container {
diff --git a/src/tabviews/custom/index.jsx b/src/tabviews/custom/index.jsx
index 8cf4cc6..4b084e0 100644
--- a/src/tabviews/custom/index.jsx
+++ b/src/tabviews/custom/index.jsx
@@ -439,6 +439,14 @@
 
   filterComponent = (components, roleId, permAction, permMenus) => {
     return components.filter(item => {
+      
+      if (item.style && item.style.boxShadow) {
+        delete item.style.hShadow
+        delete item.style.vShadow
+        delete item.style.shadowBlur
+        delete item.style.shadowColor
+      }
+
       if (item.type === 'tabs') {
         if (
           item.setting.blacklist && item.setting.blacklist.length > 0 &&
@@ -572,9 +580,11 @@
         item.subcards && item.subcards.forEach(card => {
           let _hasheight = card.style.height && card.style.height !== 'auto'
 
-          if (card.style.shadow) { // 鍗$墖闃村奖
-            card.style.boxShadow = '0 0 4px ' + card.style.shadow
-            delete card.style.shadow
+          if (card.style.boxShadow) {
+            delete card.style.hShadow
+            delete card.style.vShadow
+            delete card.style.shadowBlur
+            delete card.style.shadowColor
           }
 
           card.elements = card.elements.filter(cell => {
diff --git a/src/tabviews/zshare/actionList/changeuserbutton/index.jsx b/src/tabviews/zshare/actionList/changeuserbutton/index.jsx
index 454d8a1..27ccfca 100644
--- a/src/tabviews/zshare/actionList/changeuserbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/changeuserbutton/index.jsx
@@ -1,7 +1,7 @@
 import React, {Component} from 'react'
 import PropTypes from 'prop-types'
 import { is, fromJS } from 'immutable'
-import { Button, notification, Modal } from 'antd'
+import { Button, notification, Modal, Icon } from 'antd'
 
 import Api from '@/api'
 import zhCN from '@/locales/zh-CN/main.js'
@@ -196,6 +196,21 @@
         >{btn.label}</Button>
       )
     } else { // icon銆乼ext銆� all 鍗$墖
+      let label = ''
+      let icon = ''
+
+      if (show === 'button') {
+        label = btn.label
+        icon = btn.icon || ''
+      } else if (show === 'link') {
+        label = <span>{btn.label}{btn.icon ? <Icon type={btn.icon}/> : ''}</span>
+        icon = ''
+      } else if (show === 'icon') {
+        icon = btn.icon || ''
+      } else if (show === 'text') {
+        label = btn.label
+      }
+
       return (
         <Button
           type="link"
@@ -203,9 +218,9 @@
           loading={loading}
           disabled={disabled}
           style={btn.style}
-          icon={show === 'text' ? '' : (btn.icon || '')}
+          icon={icon}
           onClick={(e) => {e.stopPropagation(); this.actionTrigger()}}
-        >{show === 'icon' && btn.icon ? '' : btn.label}</Button>
+        >{label}</Button>
       )
     }
   }
diff --git a/src/tabviews/zshare/actionList/excelInbutton/index.jsx b/src/tabviews/zshare/actionList/excelInbutton/index.jsx
index 2fc88ba..56bbb05 100644
--- a/src/tabviews/zshare/actionList/excelInbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/excelInbutton/index.jsx
@@ -3,7 +3,7 @@
 import moment from 'moment'
 import {connect} from 'react-redux'
 import { is, fromJS } from 'immutable'
-import { Button, Modal, notification, message } from 'antd'
+import { Button, Modal, notification, message, Icon } from 'antd'
 
 import ExcelIn from './excelin'
 import Utils, { getExcelInSql } from '@/utils/utils.js'
@@ -456,6 +456,21 @@
         <ExcelIn btn={btn} triggerExcelIn={() => this.updateStatus('start')} returndata={this.getexceldata} ref="excelIn" />
       </div>
     } else { // icon銆乼ext銆� all 鍗$墖
+      let label = ''
+      let icon = ''
+
+      if (show === 'button') {
+        label = btn.label
+        icon = btn.icon || ''
+      } else if (show === 'link') {
+        label = <span>{btn.label}{btn.icon ? <Icon type={btn.icon}/> : ''}</span>
+        icon = ''
+      } else if (show === 'icon') {
+        icon = btn.icon || 'upload'
+      } else if (show === 'text') {
+        label = btn.label
+      }
+
       return <div style={{display: 'inline-block'}} onClick={(e) => e.stopPropagation()}>
         <Button
           type="link"
@@ -463,9 +478,9 @@
           loading={loading}
           disabled={disabled}
           style={btn.style}
-          icon={show === 'text' ? '' : (show === 'icon' ? (btn.icon || 'upload') : (btn.icon || ''))}
+          icon={icon}
           onClick={() => {this.actionTrigger()}}
-        >{show === 'icon' ? '' : btn.label}</Button>
+        >{label}</Button>
         <ExcelIn btn={btn} triggerExcelIn={() => this.updateStatus('start')} returndata={this.getexceldata} ref="excelIn" />
       </div>
     }
diff --git a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx b/src/tabviews/zshare/actionList/exceloutbutton/index.jsx
index 2bd9686..127a679 100644
--- a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/exceloutbutton/index.jsx
@@ -3,7 +3,7 @@
 import moment from 'moment'
 import {connect} from 'react-redux'
 import { is, fromJS } from 'immutable'
-import { Button, Modal, notification, message } from 'antd'
+import { Button, Modal, notification, message, Icon } from 'antd'
 import * as XLSX from 'xlsx'
 
 import Utils from '@/utils/utils.js'
@@ -870,15 +870,30 @@
         >{btn.label}</Button>
       )
     } else { // icon銆乼ext銆� all 鍗$墖
+      let label = ''
+      let icon = ''
+
+      if (show === 'button') {
+        label = btn.label
+        icon = btn.icon || ''
+      } else if (show === 'link') {
+        label = <span>{btn.label}{btn.icon ? <Icon type={btn.icon}/> : ''}</span>
+        icon = ''
+      } else if (show === 'icon') {
+        icon = btn.icon || 'download'
+      } else if (show === 'text') {
+        label = btn.label
+      }
+
       return (
         <Button
           type="link"
           title={show === 'icon' ? btn.label : ''}
           loading={loading}
           style={btn.style}
-          icon={show === 'text' ? '' : (show === 'icon' ? (btn.icon || 'download') : (btn.icon || ''))}
+          icon={icon}
           onClick={(e) => {e.stopPropagation(); this.actionTrigger()}}
-        >{show === 'icon' ? '' : btn.label}</Button>
+        >{label}</Button>
       )
     }
   }
diff --git a/src/tabviews/zshare/actionList/newpagebutton/index.jsx b/src/tabviews/zshare/actionList/newpagebutton/index.jsx
index 2ff034c..d385c04 100644
--- a/src/tabviews/zshare/actionList/newpagebutton/index.jsx
+++ b/src/tabviews/zshare/actionList/newpagebutton/index.jsx
@@ -1,7 +1,7 @@
 import React, {Component} from 'react'
 import PropTypes from 'prop-types'
 import { is, fromJS } from 'immutable'
-import { Button, notification, Modal } from 'antd'
+import { Button, notification, Modal, Icon } from 'antd'
 
 import zhCN from '@/locales/zh-CN/main.js'
 import enUS from '@/locales/en-US/main.js'
@@ -202,15 +202,30 @@
         >{btn.label}</Button>
       )
     } else { // icon銆乼ext銆� all 鍗$墖
+      let label = ''
+      let icon = ''
+
+      if (show === 'button') {
+        label = btn.label
+        icon = btn.icon || ''
+      } else if (show === 'link') {
+        label = <span>{btn.label}{btn.icon ? <Icon type={btn.icon}/> : ''}</span>
+        icon = ''
+      } else if (show === 'icon') {
+        icon = btn.icon || ''
+      } else if (show === 'text') {
+        label = btn.label
+      }
+
       return (
         <Button
           type="link"
           title={show === 'icon' ? btn.label : ''}
           style={btn.style}
           disabled={disabled}
-          icon={show === 'text' ? '' : (btn.icon || '')}
+          icon={icon}
           onClick={(e) => {e.stopPropagation(); this.actionTrigger()}}
-        >{show === 'icon' && btn.icon ? '' : btn.label}</Button>
+        >{label}</Button>
       )
     }
   }
diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx
index 952fd74..7d03c60 100644
--- a/src/tabviews/zshare/actionList/normalbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx
@@ -3,7 +3,7 @@
 import moment from 'moment'
 import {connect} from 'react-redux'
 import { is, fromJS } from 'immutable'
-import { Button, Modal, notification, message, Drawer } from 'antd'
+import { Button, Modal, notification, message, Drawer, Icon } from 'antd'
 
 import Api from '@/api'
 import Utils, { getSysDefaultSql } from '@/utils/utils.js'
@@ -1804,6 +1804,21 @@
         {this.getModels()}
       </div>
     } else { // icon銆乼ext銆� all 鍗$墖
+      let label = ''
+      let icon = ''
+
+      if (show === 'button') {
+        label = btn.label
+        icon = btn.icon || ''
+      } else if (show === 'link') {
+        label = <span>{btn.label}{btn.icon ? <Icon type={btn.icon}/> : ''}</span>
+        icon = ''
+      } else if (show === 'icon') {
+        icon = btn.icon || ''
+      } else if (show === 'text') {
+        label = btn.label
+      }
+
       return <div style={{display: 'inline-block'}} onClick={(e) => e.stopPropagation()}>
         <Button
           type="link"
@@ -1811,9 +1826,9 @@
           loading={loading}
           disabled={disabled}
           style={btn.style || style}
-          icon={show === 'text' ? '' : (btn.icon || '')}
+          icon={icon}
           onClick={() => {this.actionTrigger()}}
-        >{show === 'icon' && btn.icon ? '' : btn.label}</Button>
+        >{label}</Button>
         {this.getModels()}
       </div>
     }
diff --git a/src/tabviews/zshare/actionList/popupbutton/index.jsx b/src/tabviews/zshare/actionList/popupbutton/index.jsx
index c519a94..8b5b86b 100644
--- a/src/tabviews/zshare/actionList/popupbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/popupbutton/index.jsx
@@ -2,7 +2,7 @@
 import PropTypes from 'prop-types'
 import {connect} from 'react-redux'
 import { is, fromJS } from 'immutable'
-import { Button, Modal, notification } from 'antd'
+import { Button, Modal, notification, Icon } from 'antd'
 
 import asyncSpinComponent from '@/utils/asyncSpinComponent'
 import zhCN from '@/locales/zh-CN/main.js'
@@ -196,6 +196,21 @@
     const { btn, show } = this.props
     const { loading, popData, primaryId, disabled } = this.state
 
+    let label = ''
+    let icon = ''
+
+    if (show === 'button') {
+      label = btn.label
+      icon = btn.icon || ''
+    } else if (show === 'link') {
+      label = <span>{btn.label}{btn.icon ? <Icon type={btn.icon}/> : ''}</span>
+      icon = ''
+    } else if (show === 'icon') {
+      icon = btn.icon || ''
+    } else if (show === 'text') {
+      label = btn.label
+    }
+
     return (
       <div style={{display: 'inline-block'}} onClick={(e) => e.stopPropagation()}>
         {show === 'actionList' ? <Button
@@ -211,9 +226,9 @@
           loading={loading}
           disabled={disabled}
           style={btn.style}
-          icon={show === 'text' ? '' : (btn.icon || '')}
+          icon={icon}
           onClick={() => {this.actionTrigger()}}
-        >{show === 'icon' && btn.icon ? '' : btn.label}</Button> : null}
+        >{label}</Button> : null}
         <Modal
           className={'popview-modal ' + (btn.$view === 'CustomPage' ? 'custom-popview' : '')}
           title={btn.label}
diff --git a/src/tabviews/zshare/actionList/printbutton/index.jsx b/src/tabviews/zshare/actionList/printbutton/index.jsx
index fb45054..205ef81 100644
--- a/src/tabviews/zshare/actionList/printbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/printbutton/index.jsx
@@ -3,7 +3,7 @@
 import moment from 'moment'
 import {connect} from 'react-redux'
 import { is, fromJS } from 'immutable'
-import { Button, Modal, notification, message } from 'antd'
+import { Button, Modal, notification, message, Icon } from 'antd'
 
 import Api from '@/api'
 import Utils from '@/utils/utils.js'
@@ -1338,6 +1338,21 @@
         {this.getModels()}
       </div>
     } else { // icon銆乼ext銆� all 鍗$墖
+      let label = ''
+      let icon = ''
+
+      if (show === 'button') {
+        label = btn.label
+        icon = btn.icon || ''
+      } else if (show === 'link') {
+        label = <span>{btn.label}{btn.icon ? <Icon type={btn.icon}/> : ''}</span>
+        icon = ''
+      } else if (show === 'icon') {
+        icon = btn.icon || ''
+      } else if (show === 'text') {
+        label = btn.label
+      }
+
       return <div style={{display: 'inline-block'}} onClick={(e) => e.stopPropagation()}>
         <Button
           type="link"
@@ -1345,9 +1360,9 @@
           loading={loading}
           disabled={disabled}
           style={btn.style}
-          icon={show === 'text' ? '' : (btn.icon || '')}
+          icon={icon}
           onClick={() => {this.actionTrigger()}}
-        >{show === 'icon' && btn.icon ? '' : btn.label}</Button>
+        >{label}</Button>
         {this.getModels()}
       </div>
     }
diff --git a/src/tabviews/zshare/actionList/tabbutton/index.jsx b/src/tabviews/zshare/actionList/tabbutton/index.jsx
index fdb9d78..dd4b82c 100644
--- a/src/tabviews/zshare/actionList/tabbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/tabbutton/index.jsx
@@ -2,7 +2,7 @@
 import PropTypes from 'prop-types'
 import {connect} from 'react-redux'
 import { is, fromJS } from 'immutable'
-import { Button, notification } from 'antd'
+import { Button, notification, Icon } from 'antd'
 
 import { modifyTabview } from '@/store/action'
 import zhCN from '@/locales/zh-CN/main.js'
@@ -194,15 +194,30 @@
         >{btn.label}</Button>
       )
     } else { // icon銆乼ext銆� all 鍗$墖
+      let label = ''
+      let icon = ''
+
+      if (show === 'button') {
+        label = btn.label
+        icon = btn.icon || ''
+      } else if (show === 'link') {
+        label = <span>{btn.label}{btn.icon ? <Icon type={btn.icon}/> : ''}</span>
+        icon = ''
+      } else if (show === 'icon') {
+        icon = btn.icon || ''
+      } else if (show === 'text') {
+        label = btn.label
+      }
+
       return (
         <Button
           type="link"
           title={show === 'icon' ? btn.label : ''}
           style={btn.style}
           disabled={disabled}
-          icon={show === 'text' ? '' : (btn.icon || '')}
+          icon={icon}
           onClick={(e) => {e.stopPropagation(); this.actionTrigger()}}
-        >{show === 'icon' && btn.icon ? '' : btn.label}</Button>
+        >{label}</Button>
       )
     }
   }

--
Gitblit v1.8.0