From 9a82bce9cf0ed4a51c1b0b0669eaa38cedbace07 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 16 七月 2020 16:35:58 +0800
Subject: [PATCH] 2020-07-16

---
 src/tabviews/zshare/chartcomponent/index.scss                         |   17 +++
 package-lock.json                                                     |    9 +
 src/locales/zh-CN/main.js                                             |    1 
 src/components/header/index.jsx                                       |   13 ++
 src/mob/datasource/verifycard/settingform/index.jsx                   |   18 +++
 src/templates/zshare/formconfig.jsx                                   |   11 ++
 src/tabviews/zshare/chartcomponent/asyncButtonComponent.jsx           |   34 ++++++
 src/tabviews/zshare/chartcomponent/index.jsx                          |   62 +++++++++++-
 src/tabviews/zshare/actionList/excelInbutton/index.jsx                |   20 ++-
 src/tabviews/zshare/actionList/excelInbutton/excelin/index.jsx        |    5 
 src/tabviews/zshare/actionList/exceloutbutton/index.jsx               |   18 ++-
 src/tabviews/zshare/actionList/index.jsx                              |    6 -
 src/tabviews/zshare/actionList/excelInbutton/index.scss               |    5 +
 src/tabviews/zshare/actionList/exceloutbutton/index.scss              |    5 +
 src/tabviews/subtable/index.jsx                                       |    3 
 package.json                                                          |    1 
 src/locales/en-US/main.js                                             |    1 
 src/tabviews/commontable/index.jsx                                    |    2 
 src/templates/sharecomponent/actioncomponent/verifyexcelin/index.scss |    1 
 src/templates/sharecomponent/chartgroupcomponent/chartform/index.jsx  |    8 +
 src/templates/sharecomponent/chartgroupcomponent/index.jsx            |   10 +
 21 files changed, 213 insertions(+), 37 deletions(-)

diff --git a/package-lock.json b/package-lock.json
index 48ebc57..92a2d4e 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1924,6 +1924,15 @@
         }
       }
     },
+    "@uiw/react-codemirror": {
+      "version": "2.2.1",
+      "resolved": "https://registry.npmjs.org/@uiw/react-codemirror/-/react-codemirror-2.2.1.tgz",
+      "integrity": "sha512-sHumpCEno+3Tkha5lC8rwYgWGnRYA8zB0Jh+SOuNvsoMzcqAyVw3Yz+tlu6z2TEINcD9lUWdY6KlvDsi9TRq3w==",
+      "requires": {
+        "codemirror": "5.52.2",
+        "prop-types": "15.7.2"
+      }
+    },
     "@webassemblyjs/ast": {
       "version": "1.8.5",
       "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.8.5.tgz",
diff --git a/package.json b/package.json
index 406bec5..d032eb3 100644
--- a/package.json
+++ b/package.json
@@ -10,6 +10,7 @@
     "@svgr/webpack": "4.3.2",
     "@typescript-eslint/eslint-plugin": "1.13.0",
     "@typescript-eslint/parser": "1.13.0",
+    "@uiw/react-codemirror": "^2.2.1",
     "antd": "^3.23.2",
     "antd-mobile": "^2.3.3",
     "axios": "^0.19.0",
diff --git a/src/components/header/index.jsx b/src/components/header/index.jsx
index d373b64..c34965b 100644
--- a/src/components/header/index.jsx
+++ b/src/components/header/index.jsx
@@ -633,6 +633,16 @@
     return !is(fromJS(this.props), fromJS(nextProps)) || !is(fromJS(this.state), fromJS(nextState))
   }
 
+  gotoDoc = () => {
+    if (options.sysType === 'local' && window.GLOB.mainSystemApi) {
+      let ssodomain = window.GLOB.mainSystemApi.replace('/webapi/dostars', '')
+      let url = `${ssodomain}/doc/index.html#?appkey=${window.GLOB.appkey}&LoginUID=${sessionStorage.getItem('LoginUID')}`
+      window.open(url)
+    } else if (options.sysType === 'SSO' || options.sysType === 'cloud') {
+      window.open(`${window.location.href.replace(/\/index.html(.*)|\/#(.*)/ig, '')}/doc/index.html#?appkey=${window.GLOB.appkey}&LoginUID=${sessionStorage.getItem('LoginUID')}`)
+    }
+  }
+
   render () {
     const { thdMenuList, searchkey } = this.state
 
@@ -648,7 +658,8 @@
             <Menu.Item className="header-subSystem" key={'sub' + index} onClick={() => {this.changeSystem(system)}}> {system.AppName} </Menu.Item>
           ))}
         </Menu.SubMenu> : null} */}
-        <Menu.Item key="2" onClick={this.logout}>{this.state.dict['main.logout']}</Menu.Item>
+        <Menu.Item key="2" onClick={this.gotoDoc}>{this.state.dict['main.doc']}</Menu.Item>
+        <Menu.Item key="3" onClick={this.logout}>{this.state.dict['main.logout']}</Menu.Item>
       </Menu>
     )
 
diff --git a/src/locales/en-US/main.js b/src/locales/en-US/main.js
index d26a8a5..64fa8d0 100644
--- a/src/locales/en-US/main.js
+++ b/src/locales/en-US/main.js
@@ -9,6 +9,7 @@
   'main.all': 'All',
   'main.cancel': 'Cancel',
   'main.logout': 'Logout',
+  'main.doc': '鏂囨。涓績',
   'main.logout.hint': 'Are you sure you want to log out?',
   'main.password': 'Change the password',
   'main.password.origin': 'Original Password',
diff --git a/src/locales/zh-CN/main.js b/src/locales/zh-CN/main.js
index c6c950b..d04855c 100644
--- a/src/locales/zh-CN/main.js
+++ b/src/locales/zh-CN/main.js
@@ -9,6 +9,7 @@
   'main.all': '鍏ㄩ儴',
   'main.cancel': '鍙栨秷',
   'main.logout': '閫�鍑�',
+  'main.doc': '鏂囨。涓績',
   'main.logout.hint': '鎮ㄧ‘瀹氳閫�鍑哄悧?',
   'main.password': '淇敼瀵嗙爜',
   'main.password.origin': '鍘熷瘑鐮�',
diff --git a/src/mob/datasource/verifycard/settingform/index.jsx b/src/mob/datasource/verifycard/settingform/index.jsx
index 75352f2..33115ba 100644
--- a/src/mob/datasource/verifycard/settingform/index.jsx
+++ b/src/mob/datasource/verifycard/settingform/index.jsx
@@ -3,6 +3,14 @@
 // import { fromJS } from 'immutable'
 import { Form, Row, Col, Input, Radio, Select, Tooltip, Icon, notification } from 'antd'
 import moment from 'moment'
+// import CodeMirror from '@uiw/react-codemirror'
+
+// import 'codemirror/theme/monokai.css'
+// import 'codemirror/theme/eclipse.css'
+// import 'codemirror/addon/selection/active-line'
+// import 'codemirror/addon/hint/javascript-hint'
+// import 'codemirror/addon/hint/show-hint'
+// import 'codemirror/addon/hint/show-hint.css'
 
 import Api from '@/api'
 import Utils from '@/utils/utils.js'
@@ -251,6 +259,16 @@
                 {getFieldDecorator('dataresource', {
                   initialValue: setting.dataresource || ''
                 })(<TextArea rows={4} />)}
+                {/* <CodeMirror
+                  value={'code'}
+                  options={{
+                    theme: 'eclipse',
+                    lineNumbers: false,
+                    mode: 'SQL',
+                    extraKeys: {"Ctrl": "autocomplete"},
+                    styleActiveLine: true
+                  }}
+                /> */}
               </Form.Item>
             </Col> : null}
             {interType === 'inner' ? <Col span={8}>
diff --git a/src/tabviews/commontable/index.jsx b/src/tabviews/commontable/index.jsx
index eb32253..623948b 100644
--- a/src/tabviews/commontable/index.jsx
+++ b/src/tabviews/commontable/index.jsx
@@ -1133,9 +1133,11 @@
               return (
                 <Col span={item.width} key={item.uuid}>
                   <ChartComponent
+                    BID={BID}
                     plot={item}
                     config={config}
                     data={this.state.data}
+                    getexceloutparam={this.getexceloutparam}
                     loading={this.state.loading}
                   />
                 </Col>
diff --git a/src/tabviews/subtable/index.jsx b/src/tabviews/subtable/index.jsx
index 83c7b13..eefdad5 100644
--- a/src/tabviews/subtable/index.jsx
+++ b/src/tabviews/subtable/index.jsx
@@ -890,7 +890,10 @@
                   <ChartComponent
                     plot={item}
                     config={config}
+                    BID={this.props.BID}
+                    Tab={this.props.Tab}
                     data={this.state.data}
+                    getexceloutparam={this.getexceloutparam}
                     loading={this.state.loading}
                   />
                 </Col>
diff --git a/src/tabviews/zshare/actionList/excelInbutton/excelin/index.jsx b/src/tabviews/zshare/actionList/excelInbutton/excelin/index.jsx
index 0a57faa..70b0c70 100644
--- a/src/tabviews/zshare/actionList/excelInbutton/excelin/index.jsx
+++ b/src/tabviews/zshare/actionList/excelInbutton/excelin/index.jsx
@@ -8,7 +8,6 @@
 class ExcelIn extends Component {
   static propTpyes = {
     btn: PropTypes.object,         // 鎸夐挳淇℃伅
-    MenuID: PropTypes.string,      // 鑿滃崟ID
     returndata: PropTypes.func,    // 鑾峰彇杩斿洖鏁版嵁
     triggerExcelIn: PropTypes.func // 淇敼涓婁紶鐘舵��
   }
@@ -19,7 +18,7 @@
 
   exceltrigger = () => {
     const { excelId } = this.state
-    let _excelInput = document.getElementById(excelId + this.props.MenuID)
+    let _excelInput = document.getElementById(excelId)
     
     if (_excelInput) {
       _excelInput.click()
@@ -105,7 +104,7 @@
   render() {
     return (
       <span>
-        {this.state.excelId ? <input className="excel-in-input" id={this.state.excelId + this.props.MenuID} type='file' accept='.xlsx, .xls' onAbort={this.onImportExcel} onChange={this.onImportExcel} /> : null}
+        {this.state.excelId ? <input className="excel-in-input" id={this.state.excelId} type='file' accept='.xlsx, .xls' onAbort={this.onImportExcel} onChange={this.onImportExcel} /> : null}
       </span>
     )
   }
diff --git a/src/tabviews/zshare/actionList/excelInbutton/index.jsx b/src/tabviews/zshare/actionList/excelInbutton/index.jsx
index 6130d75..1804531 100644
--- a/src/tabviews/zshare/actionList/excelInbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/excelInbutton/index.jsx
@@ -15,15 +15,12 @@
 
 class ExcelInButton extends Component {
   static propTpyes = {
+    show: PropTypes.any,              // 鏄剧ず鏍峰紡
     BID: PropTypes.string,            // 涓昏〃ID
-    BData: PropTypes.any,             // 涓昏〃鏁版嵁
     selectedData: PropTypes.any,      // 瀛愯〃涓�夋嫨鏁版嵁
     Tab: PropTypes.any,               // 濡傛灉褰撳墠鍏冪礌涓烘爣绛炬椂锛宼ab涓烘爣绛句俊鎭�
-    MenuID: PropTypes.string,         // 鑿滃崟ID
     btn: PropTypes.object,            // 鎸夐挳
-    columns: PropTypes.array,         // 瀛楁鍒�
     setting: PropTypes.any,           // 椤甸潰閫氱敤璁剧疆
-    ContainerId: PropTypes.any,       // tab椤甸潰ID锛岀敤浜庡脊绐楁帶鍒�
     updateStatus: PropTypes.func,     // 鎸夐挳鐘舵�佹洿鏂�
     triggerBtn: PropTypes.any,
   }
@@ -392,18 +389,25 @@
   }
 
   render() {
-    const { btn } = this.props
+    const { btn, show } = this.props
     const { loading } = this.state
 
     return (
       <div className="mk-btn-wrap">
-        <Button
+        {!show ? <Button
           className={'mk-btn mk-' + btn.class}
           icon={btn.icon}
           onClick={() => {this.actionTrigger()}}
           loading={loading}
-        >{btn.label}</Button>
-        <ExcelIn MenuID={this.props.MenuID} btn={btn} triggerExcelIn={() => this.updateStatus('start')} returndata={this.getexceldata} ref="excelIn" />
+        >{btn.label}</Button> : null}
+        {show === 'icon' ? <Button
+          className="import-icon"
+          icon="upload"
+          onClick={() => {this.actionTrigger()}}
+          loading={loading}
+          title={btn.label}
+        ></Button> : null}
+        <ExcelIn btn={btn} triggerExcelIn={() => this.updateStatus('start')} returndata={this.getexceldata} ref="excelIn" />
       </div>
     )
   }
diff --git a/src/tabviews/zshare/actionList/excelInbutton/index.scss b/src/tabviews/zshare/actionList/excelInbutton/index.scss
index fe21ce9..fe79b6e 100644
--- a/src/tabviews/zshare/actionList/excelInbutton/index.scss
+++ b/src/tabviews/zshare/actionList/excelInbutton/index.scss
@@ -1,3 +1,8 @@
 .mk-btn-wrap {
   display: inline-block;
+
+  .import-icon {
+    border: 0;
+    box-shadow: unset;
+  }
 }
diff --git a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx b/src/tabviews/zshare/actionList/exceloutbutton/index.jsx
index c1c6dc0..f49bcf5 100644
--- a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/exceloutbutton/index.jsx
@@ -16,13 +16,10 @@
 class ExcelOutButton extends Component {
   static propTpyes = {
     BID: PropTypes.string,            // 涓昏〃ID
-    BData: PropTypes.any,             // 涓昏〃鏁版嵁
+    show: PropTypes.any,              // 鏄剧ず鏍峰紡
     Tab: PropTypes.any,               // 濡傛灉褰撳墠鍏冪礌涓烘爣绛炬椂锛宼ab涓烘爣绛句俊鎭�
-    MenuID: PropTypes.string,         // 鑿滃崟ID
     btn: PropTypes.object,            // 鎸夐挳
-    columns: PropTypes.array,         // 瀛楁鍒�
     setting: PropTypes.any,           // 椤甸潰閫氱敤璁剧疆
-    ContainerId: PropTypes.any,       // tab椤甸潰ID锛岀敤浜庡脊绐楁帶鍒�
     updateStatus: PropTypes.func,     // 鎸夐挳鐘舵�佹洿鏂�
     getexceloutparam: PropTypes.func, // 鑾峰彇琛ㄦ牸涓弬鏁�
     triggerBtn: PropTypes.any,
@@ -704,17 +701,24 @@
   }
 
   render() {
-    const { btn } = this.props
+    const { btn, show } = this.props
     const { loading } = this.state
 
     return (
       <div className="mk-btn-wrap">
-        <Button
+        {!show ? <Button
           className={'mk-btn mk-' + btn.class}
           icon={btn.icon}
           onClick={() => {this.actionTrigger()}}
           loading={loading}
-        >{btn.label}</Button>
+        >{btn.label}</Button> : null}
+        {show === 'icon' ? <Button
+          className="export-icon"
+          icon="download"
+          onClick={() => {this.actionTrigger()}}
+          loading={loading}
+          title={btn.label}
+        ></Button> : null}
       </div>
     )
   }
diff --git a/src/tabviews/zshare/actionList/exceloutbutton/index.scss b/src/tabviews/zshare/actionList/exceloutbutton/index.scss
index fe21ce9..cb6cb8d 100644
--- a/src/tabviews/zshare/actionList/exceloutbutton/index.scss
+++ b/src/tabviews/zshare/actionList/exceloutbutton/index.scss
@@ -1,3 +1,8 @@
 .mk-btn-wrap {
   display: inline-block;
+
+  .export-icon {
+    border: 0;
+    box-shadow: unset;
+  }
 }
diff --git a/src/tabviews/zshare/actionList/index.jsx b/src/tabviews/zshare/actionList/index.jsx
index ddc7bca..8a70ac9 100644
--- a/src/tabviews/zshare/actionList/index.jsx
+++ b/src/tabviews/zshare/actionList/index.jsx
@@ -97,10 +97,7 @@
             BID={BID}
             Tab={Tab}
             btn={item}
-            BData={BData}
             setting={setting}
-            columns={logcolumns}
-            ContainerId={ContainerId}
             selectedData={selectedData}
             triggerBtn={this.state.triggerBtn}
             updateStatus={this.updateStatus}
@@ -113,10 +110,7 @@
             BID={BID}
             Tab={Tab}
             btn={item}
-            BData={BData}
             setting={setting}
-            columns={logcolumns}
-            ContainerId={ContainerId}
             triggerBtn={this.state.triggerBtn}
             getexceloutparam={getexceloutparam}
             updateStatus={this.updateStatus}
diff --git a/src/tabviews/zshare/chartcomponent/asyncButtonComponent.jsx b/src/tabviews/zshare/chartcomponent/asyncButtonComponent.jsx
new file mode 100644
index 0000000..5fb9c1a
--- /dev/null
+++ b/src/tabviews/zshare/chartcomponent/asyncButtonComponent.jsx
@@ -0,0 +1,34 @@
+import React, {Component} from 'react'
+import { Button } from 'antd'
+
+/**
+ * @description 寮傛鍔犺浇妯″潡
+ * @param {*} importComponent
+ */
+export default function asyncComponent(importComponent) {
+  return class extends Component {
+    constructor(props) {
+      super(props)
+
+      this.state = {
+        component: null
+      }
+    }
+
+    async componentDidMount() {
+      const {default: component} = await importComponent()
+
+      this.setState({component})
+    }
+
+    // <Button className="loading-skeleton" disabled={true}></Button> // 楠ㄦ灦鎸夐挳
+    render() {
+      const C = this.state.component
+      const btn = this.props.btn || {}
+
+      return C ?
+        <C {...this.props} /> :
+        <Button icon={btn.OpenType === 'excelOut' ? 'download' : 'upload'} disabled={true} title={btn.label} style={{border: 0, background: 'transparent'}}></Button>
+    }
+  }
+}
\ No newline at end of file
diff --git a/src/tabviews/zshare/chartcomponent/index.jsx b/src/tabviews/zshare/chartcomponent/index.jsx
index 9bea2d7..b9ab3d2 100644
--- a/src/tabviews/zshare/chartcomponent/index.jsx
+++ b/src/tabviews/zshare/chartcomponent/index.jsx
@@ -5,22 +5,30 @@
 import DataSet from '@antv/data-set'
 import { Spin, Empty, Select } from 'antd'
 
+import asyncComponent from './asyncButtonComponent'
 import Utils from '@/utils/utils.js'
 import zhCN from '@/locales/zh-CN/model.js'
 import enUS from '@/locales/en-US/model.js'
 import './index.scss'
 
+const ExcelOutButton = asyncComponent(() => import('@/tabviews/zshare/actionList/exceloutbutton'))
+const ExcelInButton = asyncComponent(() => import('@/tabviews/zshare/actionList/excelInbutton'))
+
 class LineChart extends Component {
   static propTpyes = {
+    BID: PropTypes.any,
+    Tab: PropTypes.any,
     plot: PropTypes.object,
     data: PropTypes.array,
     loading: PropTypes.bool,
-    config: PropTypes.object
+    config: PropTypes.object,
+    getexceloutparam: PropTypes.func
   }
 
   state = {
     dict: localStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
     empty: true,
+    actions: [],
     chartId: Utils.getuuid(),
     chartData: [],
     chartFields: [],
@@ -28,20 +36,29 @@
   }
 
   componentDidMount () {
-    const { plot, data } = this.props
-
+    const { plot, data, config } = this.props
     let _state = {}
+    let actions = []
+    config.action.forEach(item => {
+      if (!plot.actions || plot.actions.length === 0) return
+      if (!(item.OpenType === 'excelOut' || (item.OpenType === 'excelIn' && item.Ot === 'notRequired'))) return
+      if (plot.actions.includes(item.uuid)) {
+        actions.push(fromJS(item).toJS())
+      }
+    })
 
     if (plot.datatype === 'statistics' && (plot.chartType === 'line' || plot.chartType === 'bar')) {
       let result = this.getStaticMsg(data)
       _state.chartData = result.data
       _state.chartFields = result.chartFields
       _state.selectFields = result.selectFields
+      _state.actions = actions
 
       this.setState(_state, () => {
         this.viewrender()
       })
     } else {
+      this.setState({ actions })
       this.viewrender()
     }
   }
@@ -74,7 +91,6 @@
 
   getdata = () => {
     const { data, plot, config } = this.props
-    
     let vFields = plot.Yaxis && typeof(plot.Yaxis) === 'string' ? [plot.Yaxis] : plot.Yaxis
     let _columns = config.columns.filter(col => vFields.includes(col.field))
 
@@ -948,8 +964,8 @@
   }
 
   render() {
-    const { plot, loading } = this.props
-    const { empty, chartFields, selectFields } = this.state
+    const { plot, loading, config, BID, Tab } = this.props
+    const { empty, chartFields, selectFields, actions } = this.state
 
     return (
       <div className="line-chart-plot-box">
@@ -971,7 +987,39 @@
         >
           {chartFields.map((item, i) => <Select.Option key={i} value={item}>{item}</Select.Option>)}
         </Select> : null}
-        <div className={'canvas' + (empty ? ' empty' : '')} style={{minHeight: plot.height ? plot.height : 400}} id={this.state.chartId}></div>
+        <div className="canvas-wrap">
+          <div className={'chart-action ' + (plot.title ? 'with-title' : '')}>
+            {actions.map(item => {
+              if (item.OpenType === 'excelOut') {
+                return (
+                  <ExcelOutButton
+                    key={item.uuid}
+                    BID={BID}
+                    Tab={Tab}
+                    btn={item}
+                    show="icon"
+                    setting={config.setting}
+                    getexceloutparam={this.props.getexceloutparam}
+                    updateStatus={() => {}}
+                  />
+                )
+              } else {
+                return (
+                  <ExcelInButton
+                    key={item.uuid}
+                    BID={BID}
+                    Tab={Tab}
+                    btn={item}
+                    show="icon"
+                    setting={config.setting}
+                    updateStatus={() => {}}
+                  />
+                )
+              }
+            })}
+          </div>
+          <div className={'canvas' + (empty ? ' empty' : '')} style={{minHeight: plot.height ? plot.height : 400}} id={this.state.chartId}></div>
+        </div>
         {empty ? <Empty description={false}/> : null}
       </div>
     )
diff --git a/src/tabviews/zshare/chartcomponent/index.scss b/src/tabviews/zshare/chartcomponent/index.scss
index 9c2838b..d8968db 100644
--- a/src/tabviews/zshare/chartcomponent/index.scss
+++ b/src/tabviews/zshare/chartcomponent/index.scss
@@ -1,8 +1,23 @@
 .line-chart-plot-box {
   margin-bottom: 30px;
   
-  .canvas {
+  .canvas-wrap {
     margin: 0 20px;
+    position: relative;
+    border-top: 1px solid transparent;
+    .chart-action {
+      position: absolute;
+      top: 2px;
+      right: 5px;
+      z-index: 1;
+    }
+    .chart-action.with-title {
+      top: 35px;
+    }
+  }
+
+  .canvas {
+    margin: 0;
     border: 1px solid #e8e8e8;
     padding: 25px 15px;
   }
diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.scss b/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.scss
index 4c5cd60..fd44063 100644
--- a/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.scss
+++ b/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.scss
@@ -69,6 +69,7 @@
       position: relative;
       float: right;
       top: -40px;
+      z-index: 1;
     }
   }
 }
\ No newline at end of file
diff --git a/src/templates/sharecomponent/chartgroupcomponent/chartform/index.jsx b/src/templates/sharecomponent/chartgroupcomponent/chartform/index.jsx
index b011390..548f2a6 100644
--- a/src/templates/sharecomponent/chartgroupcomponent/chartform/index.jsx
+++ b/src/templates/sharecomponent/chartgroupcomponent/chartform/index.jsx
@@ -210,7 +210,9 @@
       columns: _columns,
       selectlegend: _selectlegend,
       formlist: formlist.map(item => {
-        if (item.key === 'height' && ['table', 'card'].includes(_type)) {
+        if (item.key === 'actions' && ['table', 'card'].includes(_type)) { // 鎸夐挳缁�
+          item.hidden = true
+        } else if (item.key === 'height' && ['table', 'card'].includes(_type)) {
           item.hidden = true
         } else if (item.key === 'widthType' && _type === 'card') {
           item.hidden = false
@@ -262,7 +264,9 @@
         legends: syslegends[value] || null,
         selectlegend: syslegends[value] ? syslegends[value][0] : null,
         formlist: formlist.map(item => {
-          if (item.key === 'height' && ['table', 'card'].includes(value)) {
+          if (item.key === 'actions' && ['table', 'card'].includes(value)) { // 鎸夐挳缁�
+            item.hidden = true
+          } else if (item.key === 'height' && ['table', 'card'].includes(value)) {
             item.hidden = true
           } else if (item.key === 'widthType' && value === 'card') {
             item.hidden = false
diff --git a/src/templates/sharecomponent/chartgroupcomponent/index.jsx b/src/templates/sharecomponent/chartgroupcomponent/index.jsx
index b1aa66f..8650363 100644
--- a/src/templates/sharecomponent/chartgroupcomponent/index.jsx
+++ b/src/templates/sharecomponent/chartgroupcomponent/index.jsx
@@ -130,10 +130,18 @@
       }
     }
 
+    let actions = config.action.filter(item => item.OpenType === 'excelOut' || (item.OpenType === 'excelIn' && item.Ot === 'notRequired'))
+    actions = actions.map(cell => ({value: cell.uuid, text: cell.label}))
+
+    if (item.actions && item.actions.length > 0) {
+      let keys = actions.map(cell => cell.value)
+      item.actions = item.actions.filter(cell => keys.includes(cell))
+    }
+
     this.setState({
       card: item,
       modaltype: _type,
-      formlist: getChartViewForm(item, this.props.sysRoles, _columns)
+      formlist: getChartViewForm(item, this.props.sysRoles, _columns, actions)
     })
   }
 
diff --git a/src/templates/zshare/formconfig.jsx b/src/templates/zshare/formconfig.jsx
index ad2c2c1..c0774c5 100644
--- a/src/templates/zshare/formconfig.jsx
+++ b/src/templates/zshare/formconfig.jsx
@@ -1579,8 +1579,9 @@
  * @param {object} card       // 鎼滅储鏉′欢瀵硅薄
  * @param {Array}  roleList   // 瑙掕壊鍒楄〃-榛戝悕鍗�
  * @param {Array}  columns    // 鏄剧ず鍒�
+ * @param {Array}  actions    // 鎸夐挳缁�
  */
-export function getChartViewForm (card, roleList = [], _columns) {
+export function getChartViewForm (card, roleList = [], _columns, actions) {
   let _charts = [{
     value: 'line',
     text: '鎶樼嚎鍥�'
@@ -1759,6 +1760,14 @@
       initVal: card.blacklist || [],
       required: false,
       options: roleList
+    },
+    {
+      type: 'multiselect',
+      key: 'actions',
+      label: '鎸夐挳缁�',
+      initVal: card.actions || [],
+      required: false,
+      options: actions
     }
   ]
 }

--
Gitblit v1.8.0