From 5ae8e447c55f61508546e00559f54eb623a5c803 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 31 七月 2020 19:23:38 +0800
Subject: [PATCH] 2020-07-31

---
 src/tabviews/zshare/actionList/index.scss                            |    2 
 src/tabviews/commontable/secretKeyTable/index.scss                   |    2 
 src/tabviews/verupmanage/actionList/index.jsx                        |    2 
 src/tabviews/verupmanage/subtabtable/index.jsx                       |    2 
 src/tabviews/subtabtable/index.scss                                  |    3 
 src/tabviews/zshare/chartcomponent/index.jsx                         |  136 +++++++++++++++++++---
 src/templates/comtableconfig/index.jsx                               |   41 +++++-
 src/tabviews/commontable/secretKeyTable/index.jsx                    |    2 
 src/tabviews/verupmanage/index.scss                                  |    1 
 src/tabviews/subtable/index.jsx                                      |    6 
 src/tabviews/subtabtable/index.jsx                                   |    6 
 src/tabviews/commontable/index.jsx                                   |    6 
 src/templates/sharecomponent/chartgroupcomponent/chartform/index.jsx |    2 
 src/index.js                                                         |    2 
 src/tabviews/zshare/chartcomponent/index.scss                        |    4 
 src/tabviews/verupmanage/subtabtable/index.scss                      |    4 
 src/tabviews/subtable/index.scss                                     |    3 
 src/tabviews/scriptmanage/actionList/index.jsx                       |    2 
 src/tabviews/verupmanage/actionList/index.scss                       |    2 
 src/tabviews/scriptmanage/actionList/index.scss                      |    4 
 src/templates/subtableconfig/index.jsx                               |   42 +++++-
 src/tabviews/zshare/actionList/printbutton/index.jsx                 |   26 +++-
 src/store/options.js                                                 |    1 
 src/tabviews/commontable/secretKeyTable/actionList/index.scss        |    3 
 src/tabviews/commontable/index.scss                                  |    9 
 src/views/login/index.scss                                           |    4 
 src/tabviews/commontable/secretKeyTable/actionList/index.jsx         |    2 
 src/tabviews/zshare/normalTable/index.scss                           |    2 
 28 files changed, 236 insertions(+), 85 deletions(-)

diff --git a/src/index.js b/src/index.js
index bcf9f6e..88e31d7 100644
--- a/src/index.js
+++ b/src/index.js
@@ -73,6 +73,8 @@
       if (config.appkey === options.cakey) {
         window.GLOB.appkey = ''
         console.warn('鍗曠偣绯荤粺appkey涓嶅彲涓庝簯绔浉鍚�')
+      } else {
+        window.GLOB.appkey = config.appkey
       }
     } else if (options.sysType === 'local') { // 涓氬姟绯荤粺
       if (config.appkey === options.cakey) {
diff --git a/src/store/options.js b/src/store/options.js
index c219ad8..6b22308 100644
--- a/src/store/options.js
+++ b/src/store/options.js
@@ -4,4 +4,5 @@
   caId: 'MjAyMDAxMTYxMjMzMzU1MDd$mkGQzkyMzI1Rjk4MDY0QUNGQjQ2Mg==',
   cakey: 'MjAyMDAxMTYxMjQwMDQ2NDM$mk2N0QzODE2MjExNUI0MTc4OTVDMQ==',
   cdomain: 'aHR0cDovL2Nsb3V$mkkLm1rOWguY24=' // window.btoa('') 鍩熷悕 涓嶅甫 /
+  // cdomain: 'aHR0cDovL2Nsb3VkLnBv$mkc2l0ZWNncm91cC5jb206ODA4MA==' // bao鈥攕hi-de
 }
\ No newline at end of file
diff --git a/src/tabviews/commontable/index.jsx b/src/tabviews/commontable/index.jsx
index e7d9944..f09b8fe 100644
--- a/src/tabviews/commontable/index.jsx
+++ b/src/tabviews/commontable/index.jsx
@@ -2,7 +2,7 @@
 import PropTypes from 'prop-types'
 import {connect} from 'react-redux'
 import { is, fromJS } from 'immutable'
-import { notification, Spin, Tabs, Icon, Switch, Modal, Button, message, Tree, Typography, Col } from 'antd'
+import { notification, Spin, Tabs, Icon, Switch, Modal, Button, message, Tree, Typography, Row, Col } from 'antd'
 import moment from 'moment'
 
 import Api from '@/api'
@@ -1045,7 +1045,7 @@
             refreshdata={this.refreshbysearch}
           /> : null
         }
-        {setting && setting.onload !== 'false' ? <div className="chart-view">
+        {setting && setting.onload !== 'false' ? <Row className="chart-view" gutter={16}>
           {/* 瑙嗗浘缁� */}
           {!config.expand ? <Tabs activeKey={chartId} onChange={this.changeChart}>
             {config.charts.map(item => (
@@ -1145,7 +1145,7 @@
               )
             }
           })}
-        </div> : null }
+        </Row> : null }
         {setting && setting.onload !== 'false' &&
           config.tabgroups.map(group => (
             <Tabs activeKey={tabActive[group.uuid]} key={group.uuid} onChange={(key) => this.setState({tabActive: {...tabActive, [group.uuid]: key}})}>
diff --git a/src/tabviews/commontable/index.scss b/src/tabviews/commontable/index.scss
index ed350f4..9a643fe 100644
--- a/src/tabviews/commontable/index.scss
+++ b/src/tabviews/commontable/index.scss
@@ -53,14 +53,14 @@
     position: relative;
     .main-pickup {
       position: absolute;
-      right: 55px;
+      right: 35px;
       top: -22px;
       z-index: 1;
     }
     .custom-control {
       position: absolute;
       z-index: 1;
-      right: 20px;
+      right: 0px;
       top: -23px;
       font-size: 18px;
       padding: 3px;
@@ -94,6 +94,7 @@
   }
   > .chart-view {
     position: relative;
+    padding: 0 20px;
     >.ant-tabs {
       .ant-tabs-bar {
         position: relative;
@@ -124,7 +125,7 @@
       text-overflow: ellipsis;
       white-space: nowrap;
       overflow: hidden;
-      margin: 0px 0px 0px 20px;
+      margin: 0px;
       padding: 5px 10px;
       float: left;
       max-width: 50%;
@@ -140,7 +141,7 @@
 }
 .commontable.pick-control {
   .button-list {
-    padding-right: 140px;
+    padding-right: 110px;
   }
 }
 .menu-tree-modal {
diff --git a/src/tabviews/commontable/secretKeyTable/actionList/index.jsx b/src/tabviews/commontable/secretKeyTable/actionList/index.jsx
index 5705a4e..db46404 100644
--- a/src/tabviews/commontable/secretKeyTable/actionList/index.jsx
+++ b/src/tabviews/commontable/secretKeyTable/actionList/index.jsx
@@ -335,7 +335,7 @@
 
   render() {
     return (
-      <div className="button-list toolbar-button">
+      <div className="secret-button-list secret-toolbar-button">
         {this.props.actions.map((item, index) => {
           return (
             <Button
diff --git a/src/tabviews/commontable/secretKeyTable/actionList/index.scss b/src/tabviews/commontable/secretKeyTable/actionList/index.scss
index 9dd1f19..8259d3f 100644
--- a/src/tabviews/commontable/secretKeyTable/actionList/index.scss
+++ b/src/tabviews/commontable/secretKeyTable/actionList/index.scss
@@ -1,6 +1,5 @@
-.button-list.toolbar-button {
+.secret-button-list.secret-toolbar-button {
   position: relative;
-  padding: 10px 20px 5px;
   background: #ffffff;
   button {
     min-width: 65px;
diff --git a/src/tabviews/commontable/secretKeyTable/index.jsx b/src/tabviews/commontable/secretKeyTable/index.jsx
index 89cef32..98ce131 100644
--- a/src/tabviews/commontable/secretKeyTable/index.jsx
+++ b/src/tabviews/commontable/secretKeyTable/index.jsx
@@ -324,7 +324,7 @@
     const { setting, actions, columns, pickup, config, selectedData } = this.state
 
     return (
-      <div className="subtable" id={'subtable' + this.props.MenuID}>
+      <div className="secretKey-subtable" id={'subtable' + this.props.MenuID}>
         <div className="sub-action">
           <SubAction
             setting={setting}
diff --git a/src/tabviews/commontable/secretKeyTable/index.scss b/src/tabviews/commontable/secretKeyTable/index.scss
index 7203900..564ff3f 100644
--- a/src/tabviews/commontable/secretKeyTable/index.scss
+++ b/src/tabviews/commontable/secretKeyTable/index.scss
@@ -1,4 +1,4 @@
-.subtable {
+.secretKey-subtable {
   position: relative;
   min-height: 200px;
 
diff --git a/src/tabviews/scriptmanage/actionList/index.jsx b/src/tabviews/scriptmanage/actionList/index.jsx
index fea7be1..8053551 100644
--- a/src/tabviews/scriptmanage/actionList/index.jsx
+++ b/src/tabviews/scriptmanage/actionList/index.jsx
@@ -297,7 +297,7 @@
 
   render() {
     return (
-      <div className="button-list toolbar-button">
+      <div className="script-button-list script-toolbar-button">
         {this.props.actions.map((item, index) => {
           return (
             <Button
diff --git a/src/tabviews/scriptmanage/actionList/index.scss b/src/tabviews/scriptmanage/actionList/index.scss
index 9dd1f19..3ed2c30 100644
--- a/src/tabviews/scriptmanage/actionList/index.scss
+++ b/src/tabviews/scriptmanage/actionList/index.scss
@@ -1,6 +1,6 @@
-.button-list.toolbar-button {
+.script-button-list.script-toolbar-button {
   position: relative;
-  padding: 10px 20px 5px;
+  padding: 15px 20px 5px;
   background: #ffffff;
   button {
     min-width: 65px;
diff --git a/src/tabviews/subtable/index.jsx b/src/tabviews/subtable/index.jsx
index 358931c..b5f3a7f 100644
--- a/src/tabviews/subtable/index.jsx
+++ b/src/tabviews/subtable/index.jsx
@@ -2,7 +2,7 @@
 import PropTypes from 'prop-types'
 import {connect} from 'react-redux'
 import { is, fromJS } from 'immutable'
-import { notification, Spin, Switch, Col, Icon, Tabs} from 'antd'
+import { notification, Spin, Switch, Row, Col, Icon, Tabs} from 'antd'
 import moment from 'moment'
 
 import Api from '@/api'
@@ -810,7 +810,7 @@
             refreshdata={this.refreshbysearch}
           /> : null
         }
-        {config ? <div className="chart-view">
+        {config ? <Row className="chart-view" gutter={16}>
           {/* 瑙嗗浘缁� */}
           {!config.expand ? <Tabs activeKey={chartId} onChange={this.changeChart}>
             {config.charts.map(item => (
@@ -901,7 +901,7 @@
               )
             }
           })}
-        </div> : null }
+        </Row> : null }
         {viewlost ? <NotFount msg={this.state.lostmsg} /> : null}
       </div>
     )
diff --git a/src/tabviews/subtable/index.scss b/src/tabviews/subtable/index.scss
index 5cd9b2d..193ee27 100644
--- a/src/tabviews/subtable/index.scss
+++ b/src/tabviews/subtable/index.scss
@@ -7,9 +7,6 @@
   }
   .sub-action {
     min-height: 25px;
-    .button-list {
-      padding: 10px 0px 5px;
-    }
   }
   > .chart-view {
     position: relative;
diff --git a/src/tabviews/subtabtable/index.jsx b/src/tabviews/subtabtable/index.jsx
index 677219b..c43cd29 100644
--- a/src/tabviews/subtabtable/index.jsx
+++ b/src/tabviews/subtabtable/index.jsx
@@ -2,7 +2,7 @@
 import PropTypes from 'prop-types'
 import {connect} from 'react-redux'
 import { is, fromJS } from 'immutable'
-import { notification, Spin, Col, Icon, Tabs} from 'antd'
+import { notification, Spin, Col, Row, Icon, Tabs} from 'antd'
 import moment from 'moment'
 
 import Api from '@/api'
@@ -642,7 +642,7 @@
             refreshdata={this.refreshbysearch}
           /> : null
         }
-        {config ? <div className="chart-view">
+        {config ? <Row className="chart-view" gutter={16}>
           {/* 瑙嗗浘缁� */}
           {!config.expand ? <Tabs activeKey={chartId} onChange={this.changeChart}>
             {config.charts.map(item => (
@@ -721,7 +721,7 @@
               )
             }
           })}
-        </div> : null }
+        </Row> : null }
         {viewlost ? <NotFount msg={this.state.lostmsg} /> : null}
       </div>
     )
diff --git a/src/tabviews/subtabtable/index.scss b/src/tabviews/subtabtable/index.scss
index 80bbcfe..9f9a722 100644
--- a/src/tabviews/subtabtable/index.scss
+++ b/src/tabviews/subtabtable/index.scss
@@ -5,9 +5,6 @@
   > .top-search {
     padding: 0 0px 10px;
   }
-  .button-list.toolbar-button {
-    padding: 10px 0px 5px;
-  }
   .normal-data-table {
     padding: 0 0 30px;
   }
diff --git a/src/tabviews/verupmanage/actionList/index.jsx b/src/tabviews/verupmanage/actionList/index.jsx
index 77c455f..e8fb246 100644
--- a/src/tabviews/verupmanage/actionList/index.jsx
+++ b/src/tabviews/verupmanage/actionList/index.jsx
@@ -812,7 +812,7 @@
     const { loadingUuid, loadingNumber } = this.state
 
     return (
-      <div className="button-list toolbar-button">
+      <div className="verup-button-list verup-toolbar-button">
         {this.props.actions.map((item, index) => {
           let label = item.label
           if (loadingUuid === item.uuid && loadingNumber !== '') {
diff --git a/src/tabviews/verupmanage/actionList/index.scss b/src/tabviews/verupmanage/actionList/index.scss
index 9dd1f19..e1a1938 100644
--- a/src/tabviews/verupmanage/actionList/index.scss
+++ b/src/tabviews/verupmanage/actionList/index.scss
@@ -1,4 +1,4 @@
-.button-list.toolbar-button {
+.verup-button-list.verup-toolbar-button {
   position: relative;
   padding: 10px 20px 5px;
   background: #ffffff;
diff --git a/src/tabviews/verupmanage/index.scss b/src/tabviews/verupmanage/index.scss
index d3ec298..e9d1fae 100644
--- a/src/tabviews/verupmanage/index.scss
+++ b/src/tabviews/verupmanage/index.scss
@@ -56,6 +56,7 @@
   }
   .main-table-box {
     position: relative;
+    padding: 0 20px;
     .pickchange {
       position: absolute;
       right: 0px;
diff --git a/src/tabviews/verupmanage/subtabtable/index.jsx b/src/tabviews/verupmanage/subtabtable/index.jsx
index d7d7390..96e7057 100644
--- a/src/tabviews/verupmanage/subtabtable/index.jsx
+++ b/src/tabviews/verupmanage/subtabtable/index.jsx
@@ -437,7 +437,7 @@
     const { config, setting, searchlist, actions, columns, pickup, selectedData } = this.state
 
     return (
-      <div className="subtable" id={'subtable' + this.props.MenuID}>
+      <div className="verup-subtable" id={'subtable' + this.props.MenuID}>
         {searchlist && searchlist.length > 0 ?
           <SubSearch
             dict={this.state.dict}
diff --git a/src/tabviews/verupmanage/subtabtable/index.scss b/src/tabviews/verupmanage/subtabtable/index.scss
index 7203900..7159b95 100644
--- a/src/tabviews/verupmanage/subtabtable/index.scss
+++ b/src/tabviews/verupmanage/subtabtable/index.scss
@@ -1,4 +1,4 @@
-.subtable {
+.verup-subtable {
   position: relative;
   min-height: 200px;
 
@@ -7,7 +7,7 @@
   }
   >.sub-action {
     min-height: 25px;
-    .button-list {
+    .verup-button-list {
       padding: 10px 0px 5px;
     }
   }
diff --git a/src/tabviews/zshare/actionList/index.scss b/src/tabviews/zshare/actionList/index.scss
index ef3b2be..ad2d2bb 100644
--- a/src/tabviews/zshare/actionList/index.scss
+++ b/src/tabviews/zshare/actionList/index.scss
@@ -1,6 +1,6 @@
 .button-list.toolbar-button {
   position: relative;
-  padding: 10px 20px 5px;
+  padding: 15px 0px 5px;
   background: #ffffff;
   button {
     min-width: 65px;
diff --git a/src/tabviews/zshare/actionList/printbutton/index.jsx b/src/tabviews/zshare/actionList/printbutton/index.jsx
index 75f4e11..2cf6082 100644
--- a/src/tabviews/zshare/actionList/printbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/printbutton/index.jsx
@@ -826,9 +826,7 @@
         }
         socket.send(JSON.stringify(request))
       } else {
-        printerList.forEach((cell, index) => {
-          setTimeout(() => {socket.send(JSON.stringify(cell))}, 500 * index)
-        })
+        this.syncMessageSend(printerList)
 
         this.execSuccess({
           ErrCode: 'S',
@@ -849,9 +847,7 @@
         }
         socket.send(JSON.stringify(request))
       } else {
-        printerList.forEach((cell, index) => {
-          setTimeout(() => {socket.send(JSON.stringify(cell))}, 500 * index)
-        })
+        this.syncMessageSend(printerList)
 
         this.execSuccess({
           ErrCode: 'S',
@@ -881,12 +877,14 @@
       }
 
       if (data && data.cmd === 'getPrinters' && data.status) {
-        printerList.forEach((cell, index) => {
+        printerList = printerList.map(cell => {
           if (cell.task.printer === 'lackprinter') {
             cell.task.printer = data.defaultPrinter
           }
-          setTimeout(() => {socket.send(JSON.stringify(cell))}, 500 * index)
+          return cell
         })
+
+        this.syncMessageSend(printerList)
 
         this.execSuccess({
           ErrCode: 'S',
@@ -913,6 +911,18 @@
       })
     }
   }
+
+  syncMessageSend = (list) => {
+    let param = list.shift()
+
+    if (socket && param) {
+      socket.send(JSON.stringify(param))
+    }
+
+    if (list && list.length > 0) {
+      setTimeout(() => {this.syncMessageSend(list)}, 3000)
+    }
+  }
   /**
    * @description 鎿嶄綔鎴愬姛鍚庡鐞�
    * 1銆乪xcel瀵煎嚭锛屾垚鍔熷悗鍙栨秷瀵煎嚭鎸夐挳鍔犺浇涓姸鎬�
diff --git a/src/tabviews/zshare/chartcomponent/index.jsx b/src/tabviews/zshare/chartcomponent/index.jsx
index b9ab3d2..80e3629 100644
--- a/src/tabviews/zshare/chartcomponent/index.jsx
+++ b/src/tabviews/zshare/chartcomponent/index.jsx
@@ -7,8 +7,8 @@
 
 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 zhCN from '@/locales/zh-CN/main.js'
+import enUS from '@/locales/en-US/main.js'
 import './index.scss'
 
 const ExcelOutButton = asyncComponent(() => import('@/tabviews/zshare/actionList/exceloutbutton'))
@@ -16,29 +16,35 @@
 
 class LineChart extends Component {
   static propTpyes = {
-    BID: PropTypes.any,
-    Tab: PropTypes.any,
-    plot: PropTypes.object,
-    data: PropTypes.array,
-    loading: PropTypes.bool,
-    config: PropTypes.object,
-    getexceloutparam: PropTypes.func
+    BID: PropTypes.any,              // 鐖剁骇Id
+    Tab: PropTypes.any,              // 鏍囩淇℃伅
+    plot: PropTypes.object,          // 鍥炬爣璁剧疆淇℃伅
+    data: PropTypes.array,           // 鍥捐〃浼犲叆鏁版嵁
+    loading: PropTypes.bool,         // 鏁版嵁鍔犺浇涓�
+    config: PropTypes.object,        // 椤甸潰閰嶇疆淇℃伅
+    getexceloutparam: PropTypes.func // 鑾峰彇excel瀵煎嚭鍙傛暟
   }
 
   state = {
-    dict: localStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
-    empty: true,
-    actions: [],
-    chartId: Utils.getuuid(),
-    chartData: [],
-    chartFields: [],
-    selectFields: []
+    dict: localStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, // 瀛楀吀
+    empty: true,               // 鍥捐〃鏁版嵁涓虹┖
+    actions: [],               // 鍥捐〃缁戝畾鐨勬寜閽粍
+    chartId: Utils.getuuid(),  // 鍥捐〃Id
+    chartData: [],             // 鍥捐〃鏁版嵁
+    chartFields: [],           // 缁熻鍥捐〃鐢熸垚瀛楁闆�
+    selectFields: [],          // 缁熻鍥捐〃閫夋嫨瀛楁
+    percentFields: []          // 璁剧疆涓虹櫨鍒嗘瘮鐨勫瓧娈碉紝tooltip鏃跺鍔�%
   }
 
+  /**
+   * @description 鏍¢獙鍥捐〃鐨勬寜閽粍锛屽鏋滀负缁熻鍥捐〃锛岃绠楀浘琛ㄥ瓧娈�
+   */
   componentDidMount () {
     const { plot, data, config } = this.props
     let _state = {}
     let actions = []
+    let percentFields = []
+
     config.action.forEach(item => {
       if (!plot.actions || plot.actions.length === 0) return
       if (!(item.OpenType === 'excelOut' || (item.OpenType === 'excelIn' && item.Ot === 'notRequired'))) return
@@ -54,15 +60,38 @@
       _state.selectFields = result.selectFields
       _state.actions = actions
 
+      let _column = config.columns.filter(col => plot.InfoValue === col.field)[0]
+
+      if (_column && _column.format === 'percent') {
+        percentFields.push(plot.InfoValue)
+        _state.percentFields = percentFields
+      }
+
       this.setState(_state, () => {
         this.viewrender()
       })
     } else {
-      this.setState({ actions })
-      this.viewrender()
+      if (plot.chartType === 'line' || plot.chartType === 'bar') {
+        try {
+          plot.Yaxis.forEach(yaxis => {
+            let _column = config.columns.filter(col => yaxis === col.field)[0]
+            if (_column && _column.format === 'percent') {
+              percentFields.push(_column.label)
+            }
+          })
+        } catch {
+          console.warn('Incorrect percentage setting')
+        }
+      }
+      this.setState({ actions, percentFields }, () => {
+        this.viewrender()
+      })
     }
   }
 
+  /**
+   * @description 鍥捐〃鏁版嵁鏇存柊锛屽埛鏂板唴瀹�
+   */
   UNSAFE_componentWillReceiveProps (nextProps) {
     const { plot } = this.props
     if (!is(fromJS(this.props.data), fromJS(nextProps.data))) {
@@ -89,6 +118,12 @@
     return !is(fromJS(this.props), fromJS(nextProps)) || !is(fromJS(this.state), fromJS(nextState))
   }
 
+  /**
+   * @description 鍥捐〃鏁版嵁棰勫鐞�
+   * 1銆侀�氳繃鏄剧ず鍒楄繘琛屾暟鎹被鍨嬭浆鎹�
+   * 2銆侀噸澶嶆暟鎹細鍙栧钩鍧囧�笺�佺疮璁°�佸幓閲�
+   * 3銆佹煴鐘跺浘鏁版嵁琛ラ綈
+   */
   getdata = () => {
     const { data, plot, config } = this.props
     let vFields = plot.Yaxis && typeof(plot.Yaxis) === 'string' ? [plot.Yaxis] : plot.Yaxis
@@ -217,6 +252,9 @@
     return _data
   }
 
+  /**
+   * @description 缁熻鏁版嵁棰勫鐞嗭紝鍔ㄦ�佺敓鎴愮粺璁″瓧娈靛苟杩涜鏁版嵁杞崲
+   */
   getStaticMsg = (data) => {
     const { plot, config } = this.props
 
@@ -248,7 +286,7 @@
 
         item.$uuid = item[plot.InfoType] + item[plot.Xaxis]
         if (typeof(item[plot.InfoValue]) !== 'number') {
-          item[plot.InfoValue] = parseFloat(plot.InfoValue)
+          item[plot.InfoValue] = parseFloat(item[plot.InfoValue])
           if (isNaN(item[plot.InfoValue])) {
             item[plot.InfoValue] = 0
           }
@@ -285,7 +323,7 @@
         item.$uuid = item[plot.InfoType] + item[plot.Xaxis]
 
         if (typeof(item[plot.InfoValue]) !== 'number') {
-          item[plot.InfoValue] = parseFloat(plot.InfoValue)
+          item[plot.InfoValue] = parseFloat(item[plot.InfoValue])
           if (isNaN(item[plot.InfoValue])) {
             item[plot.InfoValue] = 0
           }
@@ -320,7 +358,7 @@
 
         if (!_mdata.has(item.$uuid)) {
           if (typeof(item[plot.InfoValue]) !== 'number') {
-            item[plot.InfoValue] = parseFloat(plot.InfoValue)
+            item[plot.InfoValue] = parseFloat(item[plot.InfoValue])
             if (isNaN(item[plot.InfoValue])) {
               item[plot.InfoValue] = 0
             }
@@ -350,6 +388,9 @@
     return {data: _data, chartFields: _chartFields, selectFields: _selectFields}
   }
 
+  /**
+   * @description 鑾峰彇缁熻鍥捐〃灞曠ず鏁版嵁锛岄�氳繃閫夋嫨绫诲瀷绛涢��
+   */
   getStaticData = () => {
     const { plot } = this.props
     const { chartData, chartFields, selectFields } = this.state
@@ -365,6 +406,9 @@
     return _data
   }
 
+  /**
+   * @description 鍥捐〃娓叉煋鍒嗙粍
+   */
   viewrender = () => {
     const { plot } = this.props
 
@@ -377,8 +421,12 @@
     }
   }
 
+  /**
+   * @description 鎶樼嚎鍥炬覆鏌�
+   */
   linerender = () => {
     const { plot, config } = this.props
+    const { percentFields } = this.state
 
     let _data = []
     let _valfield = 'value'
@@ -489,6 +537,12 @@
       .position(`${plot.Xaxis}*${_valfield}`)
       .color(_typefield)
       .shape(plot.shape || 'smooth')
+      .tooltip(`${plot.Xaxis}*${_valfield}*${_typefield}`, (name, value, type) => {
+        return {
+          name: type,
+          value: percentFields.includes(type) ? value + '%' : value
+        }
+      })
 
     if (plot.label === 'true') {
       _chart.label(_valfield)
@@ -506,8 +560,12 @@
     chart.render()
   }
 
+  /**
+   * @description 鑷畾涔夋覆鏌�
+   */
   customrender = (data, transfield) => {
     const { plot } = this.props
+    const { percentFields } = this.state
 
     let barfields = []
     let fields = []
@@ -630,13 +688,19 @@
           label: null
         })
       }
-      
+
       if (item.chartType === 'bar') {
         let _chart = chart
           .interval()
           .position(`${plot.Xaxis}*${item.name}`)
           .color(item.color)
           .shape(item.shape)
+          .tooltip(`${item.name}`, (value) => {
+            return {
+              name: item.name,
+              value: percentFields.includes(item.name) ? value + '%' : value
+            }
+          })
 
         if (item.label === 'true') {
           _chart.label(item.name)
@@ -647,6 +711,12 @@
           .position(`${plot.Xaxis}*${item.name}`)
           .color(item.color)
           .shape(item.shape)
+          .tooltip(`${item.name}`, (value) => {
+            return {
+              name: item.name,
+              value: percentFields.includes(item.name) ? value + '%' : value
+            }
+          })
 
         if (item.label === 'true') {
           _chart.label(item.name)
@@ -666,8 +736,12 @@
     chart.render()
   }
 
+  /**
+   * @description 鏌辩姸鍥炬覆鏌�
+   */
   barrender = () => {
     const { plot, config } = this.props
+    const { percentFields } = this.state
 
     let _data = []
     let _valfield = 'value'
@@ -785,6 +859,12 @@
           }
         ])
         .shape(plot.shape || 'rect')
+        .tooltip(`${plot.Xaxis}*${_valfield}*${_typefield}`, (name, value, type) => {
+          return {
+            name: type,
+            value: percentFields.includes(type) ? value + '%' : value
+          }
+        })
 
       if (plot.label === 'true') {
         _chart.label(_valfield)
@@ -796,6 +876,12 @@
         .color(_typefield)
         .adjust('stack')
         .shape(plot.shape || 'rect')
+        .tooltip(`${plot.Xaxis}*${_valfield}*${_typefield}`, (name, value, type) => {
+          return {
+            name: type,
+            value: percentFields.includes(type) ? value + '%' : value
+          }
+        })
 
       if (plot.label === 'true') {
         _chart.label(_valfield)
@@ -805,6 +891,9 @@
     chart.render()
   }
 
+  /**
+   * @description 楗煎浘娓叉煋
+   */
   pierender = () => {
     const { plot, config } = this.props
 
@@ -953,6 +1042,9 @@
     chart.render()
   }
 
+  /**
+   * @description 缁熻鍥捐〃锛岀粺璁$被鍨嬪垏鎹�
+   */
   handleChange = (val) => {
     this.setState({selectFields: val}, () => {
       let _element = document.getElementById(this.state.chartId)
diff --git a/src/tabviews/zshare/chartcomponent/index.scss b/src/tabviews/zshare/chartcomponent/index.scss
index d8968db..16e8af7 100644
--- a/src/tabviews/zshare/chartcomponent/index.scss
+++ b/src/tabviews/zshare/chartcomponent/index.scss
@@ -2,7 +2,7 @@
   margin-bottom: 30px;
   
   .canvas-wrap {
-    margin: 0 20px;
+    margin: 0 0px;
     position: relative;
     border-top: 1px solid transparent;
     .chart-action {
@@ -61,6 +61,8 @@
   > .ant-select {
     width: 150px;
     float: right;
+    position: relative;
+    z-index: 1;
     .ant-select-selection {
       min-height: 24px;
       height: 28px;
diff --git a/src/tabviews/zshare/normalTable/index.scss b/src/tabviews/zshare/normalTable/index.scss
index d9c6447..3dbaa8b 100644
--- a/src/tabviews/zshare/normalTable/index.scss
+++ b/src/tabviews/zshare/normalTable/index.scss
@@ -1,5 +1,5 @@
 .normal-data-table {
-  padding: 0 20px 30px;
+  padding: 0 0px 30px;
   table {
     max-width: 100%;
     width: 100%;
diff --git a/src/templates/comtableconfig/index.jsx b/src/templates/comtableconfig/index.jsx
index 2a759b4..3c18dcf 100644
--- a/src/templates/comtableconfig/index.jsx
+++ b/src/templates/comtableconfig/index.jsx
@@ -1145,19 +1145,42 @@
       })
     }
 
-    let charterr = ''
-    config.charts.forEach(chart => {
-      if (!charterr && ['line', 'bar', 'pie'].includes(chart.chartType) && !chart.Xaxis) {
-        charterr = '鍥捐〃' + (chart.title ? '銆�' + chart.title + '銆�' : '') + '鍧愭爣杞存湭璁剧疆锛屼笉鍙惎鐢紒'
-      }
-    })
-
     let hasKey = false
+    let chartcols = []
     config.columns.forEach(col => {
+      if (col.field) {
+        chartcols.push(col.field)
+      }
       if (config.setting.primaryKey === col.field) {
         hasKey = true
       }
     })
+
+    let chartError = ''
+    config.charts && config.charts.forEach((chart, index) => {
+      if (chartError) return
+      if (chart.Hide === 'true') return
+      if (!['line', 'bar', 'pie'].includes(chart.chartType)) return
+
+      if (!chart.Xaxis) {
+        chartError = `鍥捐〃${chart.title ? '銆�' + chart.title + '銆�' : index + 1}鍧愭爣杞村瓧娈靛皻鏈缃紝涓嶅彲鍚敤锛乣
+      } else if (['line', 'bar'].includes(chart.chartType) && chart.datatype !== 'statistics' && (!chart.Yaxis || chart.Yaxis.length === 0)) { // query 鏌ヨ鏁版嵁
+        chartError = `鍥捐〃${chart.title ? '銆�' + chart.title + '銆�' : index + 1}鍧愭爣杞村瓧娈靛皻鏈缃紝涓嶅彲鍚敤锛乣
+      } else if (['line', 'bar'].includes(chart.chartType) && chart.datatype === 'statistics' && (!chart.InfoType || !chart.InfoValue)) { // statistics 缁熻鏁版嵁
+        chartError = `鍥捐〃${chart.title ? '銆�' + chart.title + '銆�' : index + 1}鍧愭爣杞村瓧娈靛皻鏈缃紝涓嶅彲鍚敤锛乣
+      } else if (chart.chartType === 'pie' && !chart.Yaxis) {
+        chartError = `鍥捐〃${chart.title ? '銆�' + chart.title + '銆�' : index + 1}鍧愭爣杞村瓧娈靛皻鏈缃紝涓嶅彲鍚敤锛乣
+      } else if (!chartcols.includes(chart.Xaxis)) {
+        chartError = `鍥捐〃${chart.title ? '銆�' + chart.title + '銆�' : index + 1}鍧愭爣杞村瓧娈靛湪鏄剧ず鍒椾腑涓嶅瓨鍦紝涓嶅彲鍚敤锛乣
+      } else if (chart.chartType === 'pie' && !chartcols.includes(chart.Yaxis)) {
+        chartError = `鍥捐〃${chart.title ? '銆�' + chart.title + '銆�' : index + 1}鍧愭爣杞村瓧娈靛湪鏄剧ず鍒椾腑涓嶅瓨鍦紝涓嶅彲鍚敤锛乣
+      } else if (['line', 'bar'].includes(chart.chartType) && chart.datatype === 'statistics' && (!chartcols.includes(chart.InfoType) || !chartcols.includes(chart.InfoValue))) { // statistics 缁熻鏁版嵁
+        chartError = `鍥捐〃${chart.title ? '銆�' + chart.title + '銆�' : index + 1}鍧愭爣杞村瓧娈靛湪鏄剧ず鍒椾腑涓嶅瓨鍦紝涓嶅彲鍚敤锛乣
+      } else if (['line', 'bar'].includes(chart.chartType) && chart.datatype !== 'statistics' && chart.Yaxis.filter(yaxis => !chartcols.includes(yaxis)).length > 0) {
+        chartError = `鍥捐〃${chart.title ? '銆�' + chart.title + '銆�' : index + 1}鍧愭爣杞村瓧娈靛湪鏄剧ず鍒椾腑涓嶅瓨鍦紝涓嶅彲鍚敤锛乣
+      }
+    })
+    
 
     if (config.setting.interType === 'inner' && !config.setting.innerFunc && config.setting.default !== 'false' && !config.setting.dataresource) {
       return '鑿滃崟灏氭湭璁剧疆鏁版嵁婧愶紝涓嶅彲鍚敤锛�'
@@ -1167,8 +1190,8 @@
       return '鏄剧ず鍒椾腑涓嶅瓨鍦ㄤ富閿瓧娈碉紝涓嶅彲鍚敤锛�'
     } else if (!tabinvalid) {
       return '鑿滃崟鏍囩椤佃缃敊璇紙瀛樺湪澶氳鏍囩鏃讹紝琛屾爣绛句笉鍙负绌猴級锛�'
-    } else if (charterr) {
-      return charterr
+    } else if (chartError) {
+      return chartError
     } else {
       return true
     }
diff --git a/src/templates/sharecomponent/chartgroupcomponent/chartform/index.jsx b/src/templates/sharecomponent/chartgroupcomponent/chartform/index.jsx
index e530784..86be460 100644
--- a/src/templates/sharecomponent/chartgroupcomponent/chartform/index.jsx
+++ b/src/templates/sharecomponent/chartgroupcomponent/chartform/index.jsx
@@ -510,7 +510,7 @@
             card: 'credit-card'
           }
 
-          if (result.chartType === 'line' || result.chartType === 'bar' || result.chartType === 'line') {
+          if (result.chartType === 'line' || result.chartType === 'bar' || result.chartType === 'pie') {
             if (selectlegend && this.props.card.modelId !== selectlegend.uuid) {
               result = {...result, ...selectlegend.options}
             }
diff --git a/src/templates/subtableconfig/index.jsx b/src/templates/subtableconfig/index.jsx
index 282f7a6..b079e6c 100644
--- a/src/templates/subtableconfig/index.jsx
+++ b/src/templates/subtableconfig/index.jsx
@@ -951,17 +951,39 @@
    * @description 鏍¢獙閰嶇疆淇℃伅鐨勫悎娉曟��
    */
   verifyconfig = (config) => {
-    let charterr = ''
-    config.charts.forEach(chart => {
-      if (!charterr && ['line', 'bar', 'pie'].includes(chart.chartType) && !chart.Xaxis) {
-        charterr = '鍥捐〃' + (chart.title ? '銆�' + chart.title + '銆�' : '') + '鍧愭爣杞存湭璁剧疆锛屼笉鍙惎鐢紒'
+    let hasKey = false
+    let chartcols = []
+    config.columns.forEach(col => {
+      if (col.field) {
+        chartcols.push(col.field)
+      }
+      if (config.setting.primaryKey === col.field) {
+        hasKey = true
       }
     })
 
-    let hasKey = false
-    config.columns.forEach(col => {
-      if (config.setting.primaryKey === col.field) {
-        hasKey = true
+    let chartError = ''
+    config.charts && config.charts.forEach((chart, index) => {
+      if (chartError) return
+      if (chart.Hide === 'true') return
+      if (!['line', 'bar', 'pie'].includes(chart.chartType)) return
+
+      if (!chart.Xaxis) {
+        chartError = `鍥捐〃${chart.title ? '銆�' + chart.title + '銆�' : index + 1}鍧愭爣杞村瓧娈靛皻鏈缃紝涓嶅彲鍚敤锛乣
+      } else if (['line', 'bar'].includes(chart.chartType) && chart.datatype !== 'statistics' && (!chart.Yaxis || chart.Yaxis.length === 0)) { // query 鏌ヨ鏁版嵁
+        chartError = `鍥捐〃${chart.title ? '銆�' + chart.title + '銆�' : index + 1}鍧愭爣杞村瓧娈靛皻鏈缃紝涓嶅彲鍚敤锛乣
+      } else if (['line', 'bar'].includes(chart.chartType) && chart.datatype === 'statistics' && (!chart.InfoType || !chart.InfoValue)) { // statistics 缁熻鏁版嵁
+        chartError = `鍥捐〃${chart.title ? '銆�' + chart.title + '銆�' : index + 1}鍧愭爣杞村瓧娈靛皻鏈缃紝涓嶅彲鍚敤锛乣
+      } else if (chart.chartType === 'pie' && !chart.Yaxis) {
+        chartError = `鍥捐〃${chart.title ? '銆�' + chart.title + '銆�' : index + 1}鍧愭爣杞村瓧娈靛皻鏈缃紝涓嶅彲鍚敤锛乣
+      } else if (!chartcols.includes(chart.Xaxis)) {
+        chartError = `鍥捐〃${chart.title ? '銆�' + chart.title + '銆�' : index + 1}鍧愭爣杞村瓧娈靛湪鏄剧ず鍒椾腑涓嶅瓨鍦紝涓嶅彲鍚敤锛乣
+      } else if (chart.chartType === 'pie' && !chartcols.includes(chart.Yaxis)) {
+        chartError = `鍥捐〃${chart.title ? '銆�' + chart.title + '銆�' : index + 1}鍧愭爣杞村瓧娈靛湪鏄剧ず鍒椾腑涓嶅瓨鍦紝涓嶅彲鍚敤锛乣
+      } else if (['line', 'bar'].includes(chart.chartType) && chart.datatype === 'statistics' && (!chartcols.includes(chart.InfoType) || !chartcols.includes(chart.InfoValue))) { // statistics 缁熻鏁版嵁
+        chartError = `鍥捐〃${chart.title ? '銆�' + chart.title + '銆�' : index + 1}鍧愭爣杞村瓧娈靛湪鏄剧ず鍒椾腑涓嶅瓨鍦紝涓嶅彲鍚敤锛乣
+      } else if (['line', 'bar'].includes(chart.chartType) && chart.datatype !== 'statistics' && chart.Yaxis.filter(yaxis => !chartcols.includes(yaxis)).length > 0) {
+        chartError = `鍥捐〃${chart.title ? '銆�' + chart.title + '銆�' : index + 1}鍧愭爣杞村瓧娈靛湪鏄剧ず鍒椾腑涓嶅瓨鍦紝涓嶅彲鍚敤锛乣
       }
     })
 
@@ -971,8 +993,8 @@
       return '鑿滃崟灏氭湭璁剧疆涓婚敭锛屼笉鍙惎鐢紒'
     } else if (!hasKey) {
       return '鏄剧ず鍒椾腑涓嶅瓨鍦ㄤ富閿瓧娈碉紝涓嶅彲鍚敤锛�'
-    } else if (charterr) {
-      return charterr
+    } else if (chartError) {
+      return chartError
     } else {
       return true
     }
diff --git a/src/views/login/index.scss b/src/views/login/index.scss
index 5ef5f7b..3f3b132 100644
--- a/src/views/login/index.scss
+++ b/src/views/login/index.scss
@@ -42,6 +42,9 @@
         border-radius: 0;
         text-align: center;
         font-size: 18px;
+        white-space: nowrap;
+        text-overflow: ellipsis;
+        overflow: hidden;
       }
       .ant-tabs-tab.ant-tabs-tab-active {
         cursor: default;
@@ -52,6 +55,7 @@
     .ant-tabs-tab {
       text-align: left!important;
       padding-left: 1.6vw!important;
+      line-height: 60px!important;
     }
   }
   .login-middle {

--
Gitblit v1.8.0