From a13b2a8d6e84662275ea913850e01be9b2ff31e5 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 13 八月 2021 00:24:31 +0800
Subject: [PATCH] 2021-08-13

---
 src/index.js                                                   |    1 
 src/tabviews/custom/components/chart/antv-dashboard/index.scss |    4 
 src/tabviews/custom/components/chart/antv-scatter/index.jsx    |   20 +--
 src/tabviews/custom/components/chart/antv-bar-line/index.jsx   |   32 +----
 src/tabviews/custom/components/chart/antv-dashboard/index.jsx  |   21 +--
 src/tabviews/custom/components/chart/antv-scatter/index.scss   |    4 
 src/menu/components/chart/antv-scatter/index.scss              |   11 +
 src/tabviews/custom/components/chart/antv-bar-line/index.scss  |    4 
 src/pc/components/login/normal-login/loginform.jsx             |    4 
 src/menu/components/chart/antv-pie/index.scss                  |   11 +
 src/router/index.js                                            |    5 +
 src/tabviews/custom/components/chart/antv-pie/index.jsx        |   22 +--
 src/tabviews/custom/components/chart/antv-pie/index.scss       |    4 
 public/options.json                                            |    1 
 src/menu/components/chart/antv-pie/index.jsx                   |   14 --
 src/menu/components/chart/antv-bar/index.scss                  |   13 +-
 src/menu/components/chart/antv-bar/index.jsx                   |   26 +---
 src/menu/components/chart/antv-scatter/index.jsx               |    9 -
 src/menu/components/chart/antv-dashboard/index.jsx             |    6 
 src/tabviews/home/index.jsx                                    |    2 
 src/menu/components/chart/antv-dashboard/index.scss            |   11 +
 src/views/login/index.jsx                                      |   26 +++--
 22 files changed, 112 insertions(+), 139 deletions(-)

diff --git a/public/options.json b/public/options.json
index 40ee2e8..7ca016a 100644
--- a/public/options.json
+++ b/public/options.json
@@ -10,6 +10,7 @@
   "defaultLang": "zh-CN",
   "WXAppID": "",
   "debugger": false,
+  "licenseKey": "E1A8FE",
   "host": "http://qingqiumarket.cn",
   "service": "mkwms/"
 }
\ No newline at end of file
diff --git a/src/index.js b/src/index.js
index 63f2034..7a16674 100644
--- a/src/index.js
+++ b/src/index.js
@@ -70,6 +70,7 @@
     let GLOB = {}
     GLOB.appId = config.appId || ''
     GLOB.lineColor = config.lineColor || ''
+    GLOB.licenseKey = config.licenseKey || ''
 
     if (config.externalDatabase !== false && config.externalDatabase !== 'false' && config.externalDatabase !== undefined) {
       GLOB.externalDatabase = config.externalDatabase ? `[${config.externalDatabase}]..` : ''
diff --git a/src/menu/components/chart/antv-bar/index.jsx b/src/menu/components/chart/antv-bar/index.jsx
index 2da2eaf..6930709 100644
--- a/src/menu/components/chart/antv-bar/index.jsx
+++ b/src/menu/components/chart/antv-bar/index.jsx
@@ -198,14 +198,10 @@
    */
   linerender = () => {
     const { card } = this.state
-    let plot = {...card.plot} // 鍘婚櫎title鎵�鍗犵┖闂�
+    const plot = card.plot
     let color = plot.color || 'rgba(0, 0, 0, 0.65)'
     let X_axis = plot.Xaxis || 'x'
     let Y_axis = plot.Yaxis || ['y']
-
-    if (card.plot.title || card.search.length > 0) {
-      plot.height = card.plot.height - 70
-    }
 
     let data = this.getdata(X_axis, Y_axis)
 
@@ -239,7 +235,7 @@
       const chart = new Chart({
         container: card.uuid + 'canvas',
         autoFit: true,
-        height: plot.height || 400
+        height: this.wrap.offsetHeight - 25
       })
   
       chart.data(dv.rows)
@@ -423,16 +419,12 @@
    */
   customrender = (data) => {
     let card = fromJS(this.state.card).toJS()
-    let plot = {...card.plot} // 鍘婚櫎title鎵�鍗犵┖闂�
+    let plot = card.plot
     let color = plot.color || 'rgba(0, 0, 0, 0.65)'
     let fields = []
     let legends = []
     let transfield = {}
     let Bar_axis = []
-
-    if (card.plot.title || card.search.length > 0) {
-      plot.height = card.plot.height - 70
-    }
 
     card.columns.forEach(col => {
       if (col.field) {
@@ -568,7 +560,7 @@
     const chart = new Chart({
       container: card.uuid + 'canvas',
       autoFit: true,
-      height: plot.height || 400,
+      height: this.wrap.offsetHeight - 25,
     })
 
     // chart.axis(plot.Xaxis, { label: { style: { fill: color } }, tickLine: {style: { stroke: color }}, line: { style: { stroke: color } } })
@@ -920,14 +912,10 @@
    */
   barrender = () => {
     const { card } = this.state
-    let plot = {...card.plot}
+    const plot = card.plot
     let color = plot.color || 'rgba(0, 0, 0, 0.65)'
     let X_axis = plot.Xaxis || 'x'
     let Y_axis = plot.Yaxis || ['y']
-
-    if (card.plot.title || card.search.length > 0) {
-      plot.height = card.plot.height - 70
-    }
 
     let data = this.getdata(X_axis, Y_axis)
     
@@ -962,7 +950,7 @@
       const chart = new Chart({
         container: card.uuid + 'canvas',
         autoFit: true,
-        height: plot.height || 400
+        height: this.wrap.offsetHeight - 25
       })
 
       chart.data(dv.rows)
@@ -1362,7 +1350,7 @@
           <Icon type="tool" />
         </Popover>
         {card.plot.title || card.search.length > 0 ? <NormalHeader config={card} updateComponent={this.updateComponent}/> : null}
-        <div className="canvas" id={card.uuid + 'canvas'}></div>
+        <div className="canvas" id={card.uuid + 'canvas'} ref={ref => this.wrap = ref}></div>
         {appType !== 'mob' ? <ActionComponent
           type="chart"
           config={card}
diff --git a/src/menu/components/chart/antv-bar/index.scss b/src/menu/components/chart/antv-bar/index.scss
index 0c212d3..b55ec7a 100644
--- a/src/menu/components/chart/antv-bar/index.scss
+++ b/src/menu/components/chart/antv-bar/index.scss
@@ -5,16 +5,19 @@
   background-position: center center;
   background-repeat: no-repeat;
   background-size: cover;
-  
+  display: flex;
+  flex-flow: column;
+
   .canvas {
     margin: 0px;
     padding: 15px 10px 10px;
     letter-spacing: 0px;
-    height: 100%;
+    // height: 100%;
+    flex: 1;
   }
-  .normal-header + .canvas {
-    height: calc(100% - 45px);
-  }
+  // .normal-header + .canvas {
+  //   height: calc(100% - 45px);
+  // }
 
   .chart-header {
     position: relative;
diff --git a/src/menu/components/chart/antv-dashboard/index.jsx b/src/menu/components/chart/antv-dashboard/index.jsx
index b9dea12..a6c9c1e 100644
--- a/src/menu/components/chart/antv-dashboard/index.jsx
+++ b/src/menu/components/chart/antv-dashboard/index.jsx
@@ -234,7 +234,7 @@
     const chart = new Chart({
       container: card.uuid + 'dashboard',
       autoFit: true,
-      height: plot.title ? plot.height - 45 : plot.height,
+      height: this.wrap.offsetHeight - 30,
     })
     
     chart.data(data)
@@ -333,7 +333,7 @@
     const chart = new Chart({
       container: card.uuid + 'dashboard',
       autoFit: true,
-      height: plot.title ? plot.height - 45 : plot.height,
+      height: this.wrap.offsetHeight - 30,
       padding: [0, 0, 0, 0],
     })
     chart.data(data)
@@ -529,7 +529,7 @@
           <Icon type="tool" />
         </Popover>
         {card.plot.title ? <NormalHeader config={card} updateComponent={this.updateComponent}/> : null}
-        <div className="canvas" id={card.uuid + 'dashboard'}></div>
+        <div className="canvas" id={card.uuid + 'dashboard'} ref={ref => this.wrap = ref}></div>
       </div>
     )
   }
diff --git a/src/menu/components/chart/antv-dashboard/index.scss b/src/menu/components/chart/antv-dashboard/index.scss
index efb4267..f56897e 100644
--- a/src/menu/components/chart/antv-dashboard/index.scss
+++ b/src/menu/components/chart/antv-dashboard/index.scss
@@ -5,16 +5,19 @@
   background-position: center center;
   background-repeat: no-repeat;
   background-size: cover;
+  display: flex;
+  flex-flow: column;
   
   .canvas {
     margin: 0px;
     padding: 15px;
     letter-spacing: 0px;
-    height: 100%;
+    // height: 100%;
+    flex: 1;
   }
-  .normal-header + .canvas {
-    height: calc(100% - 45px);
-  }
+  // .normal-header + .canvas {
+  //   height: calc(100% - 45px);
+  // }
 
   >.anticon-tool {
     position: absolute;
diff --git a/src/menu/components/chart/antv-pie/index.jsx b/src/menu/components/chart/antv-pie/index.jsx
index e08e450..7055125 100644
--- a/src/menu/components/chart/antv-pie/index.jsx
+++ b/src/menu/components/chart/antv-pie/index.jsx
@@ -223,10 +223,6 @@
     let X_axis = plot.Xaxis || 'x'
     let Y_axis = plot.Yaxis || 'y'
     let type = plot.type || 'type'
-    let height = plot.height || 400
-    if (card.plot.title || card.search.length > 0) {
-      height = height - 45
-    }
 
     const _data = this.getnestdata(X_axis, Y_axis, type)
     const dvx = new DataView().source(_data)
@@ -258,7 +254,7 @@
     const chart = new Chart({
       container: card.uuid + 'canvas',
       autoFit: true,
-      height: height,
+      height: this.wrap.offsetHeight - 30,
       padding: 0,
     })
 
@@ -420,10 +416,6 @@
     let color = plot.color || 'rgba(0, 0, 0, 0.85)'
     let X_axis = plot.Xaxis || 'x'
     let Y_axis = plot.Yaxis || 'y'
-    let height = plot.height || 400
-    if (card.plot.title || card.search.length > 0) {
-      height = height - 45
-    }
 
     let data = this.getdata(X_axis, Y_axis)
 
@@ -433,7 +425,7 @@
     const chart = new Chart({
       container: card.uuid + 'canvas',
       autoFit: true,
-      height: height
+      height: this.wrap.offsetHeight - 30
     })
 
     if (plot.shape !== 'nightingale' && plot.show !== 'value') {
@@ -693,7 +685,7 @@
           <Icon type="tool" />
         </Popover>
         {card.plot.title || card.search.length > 0 ? <NormalHeader config={card} updateComponent={this.updateComponent}/> : null}
-        <div className="canvas" id={card.uuid + 'canvas'}></div>
+        <div className="canvas" id={card.uuid + 'canvas'} ref={ref => this.wrap = ref}></div>
       </div>
     )
   }
diff --git a/src/menu/components/chart/antv-pie/index.scss b/src/menu/components/chart/antv-pie/index.scss
index 43bf1c5..2de1b1e 100644
--- a/src/menu/components/chart/antv-pie/index.scss
+++ b/src/menu/components/chart/antv-pie/index.scss
@@ -5,16 +5,19 @@
   background-position: center center;
   background-repeat: no-repeat;
   background-size: cover;
+  display: flex;
+  flex-flow: column;
   
   .canvas {
     margin: 0px;
     padding: 15px;
     letter-spacing: 0px;
-    height: 100%;
+    // height: 100%;
+    flex: 1;
   }
-  .normal-header + .canvas {
-    height: calc(100% - 45px);
-  }
+  // .normal-header + .canvas {
+  //   height: calc(100% - 45px);
+  // }
 
   >.anticon-tool {
     position: absolute;
diff --git a/src/menu/components/chart/antv-scatter/index.jsx b/src/menu/components/chart/antv-scatter/index.jsx
index b9ae970..9a7b1f3 100644
--- a/src/menu/components/chart/antv-scatter/index.jsx
+++ b/src/menu/components/chart/antv-scatter/index.jsx
@@ -187,16 +187,11 @@
     const { card } = this.state
     const plot = card.plot
     const data = this.getdata()
-    let height = plot.height - 25
-
-    if (card.plot.title || card.search.length > 0) {
-      height = plot.height - 70
-    }
 
     const chart = new Chart({
       container: card.uuid + 'canvas',
       autoFit: true,
-      height: height
+      height: this.wrap.offsetHeight - 25
     })
 
     chart.data(data);
@@ -393,7 +388,7 @@
           <Icon type="tool" />
         </Popover>
         {card.plot.title || card.search.length > 0 ? <NormalHeader config={card} updateComponent={this.updateComponent}/> : null}
-        <div className="canvas" id={card.uuid + 'canvas'}></div>
+        <div className="canvas" id={card.uuid + 'canvas'} ref={ref => this.wrap = ref}></div>
         {appType !== 'mob' ? <ActionComponent type="chart" config={card} updateaction={this.updateComponent}/> : null}
       </div>
     )
diff --git a/src/menu/components/chart/antv-scatter/index.scss b/src/menu/components/chart/antv-scatter/index.scss
index 4403718..f5f3597 100644
--- a/src/menu/components/chart/antv-scatter/index.scss
+++ b/src/menu/components/chart/antv-scatter/index.scss
@@ -5,16 +5,19 @@
   background-position: center center;
   background-repeat: no-repeat;
   background-size: cover;
+  display: flex;
+  flex-flow: column;
   
   .canvas {
     margin: 0px;
     padding: 15px 10px 10px;
     letter-spacing: 0px;
-    height: 100%;
+    // height: 100%;
+    flex: 1;
   }
-  .normal-header + .canvas {
-    height: calc(100% - 45px);
-  }
+  // .normal-header + .canvas {
+  //   height: calc(100% - 45px);
+  // }
 
   .chart-header {
     position: relative;
diff --git a/src/pc/components/login/normal-login/loginform.jsx b/src/pc/components/login/normal-login/loginform.jsx
index 2bfe6a0..0bce326 100644
--- a/src/pc/components/login/normal-login/loginform.jsx
+++ b/src/pc/components/login/normal-login/loginform.jsx
@@ -48,9 +48,7 @@
           _loginWays.push(item)
         }
       })
-      console.log(nextProps.wrap)
-      console.log(loginWays)
-      console.log(_loginWays)
+
       this.setState({
         loginWays: _loginWays,
         activeWay: _loginWays[0],
diff --git a/src/router/index.js b/src/router/index.js
index f496dec..9af2b9f 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -81,6 +81,11 @@
     let authCode = localStorage.getItem(window.location.href.split('#')[0] + 'AuthCode') // 鍒ゆ柇绯荤粺鏄惁鍦ㄦ巿鏉冩湡闄愬唴
     let _s = md5('mksoft' + moment().format('YYYYMMDD'))
     let isauth = authCode && authCode.includes(_s)
+    let key = md5(window.GLOB.appId + 'minke_software' + window.GLOB.appkey).toUpperCase().substr(-6)
+
+    if (window.GLOB.licenseKey === key) {
+      isauth = true
+    }
 
     if (userId && isauth) {
       return (<item.component {...props}/>)
diff --git a/src/tabviews/custom/components/chart/antv-bar-line/index.jsx b/src/tabviews/custom/components/chart/antv-bar-line/index.jsx
index f279ed3..febdcc4 100644
--- a/src/tabviews/custom/components/chart/antv-bar-line/index.jsx
+++ b/src/tabviews/custom/components/chart/antv-bar-line/index.jsx
@@ -12,9 +12,10 @@
 import Utils from '@/utils/utils.js'
 import UtilsDM from '@/utils/utils-datamanage.js'
 import MKEmitter from '@/utils/events.js'
+import NormalHeader from '@/tabviews/custom/components/share/normalheader'
 import './index.scss'
 
-const NormalHeader = asyncComponent(() => import('@/tabviews/custom/components/share/normalheader'))
+// const NormalHeader = asyncComponent(() => import('@/tabviews/custom/components/share/normalheader'))
 const ExcelOutButton = asyncComponent(() => import('@/tabviews/zshare/actionList/exceloutbutton'))
 const ExcelInButton = asyncComponent(() => import('@/tabviews/zshare/actionList/excelInbutton'))
 
@@ -94,22 +95,7 @@
       })
     }
 
-    let padding = 0
-    if (_config.style.paddingTop && !isNaN(parseInt(_config.style.paddingTop))) {
-      padding += parseInt(_config.style.paddingTop)
-    }
-    if (_config.style.paddingBottom && !isNaN(parseInt(_config.style.paddingBottom))) {
-      padding += parseInt(_config.style.paddingBottom)
-    }
-
-    let height = config.plot.height || 400
-    if (config.plot.title || config.search.length > 0) {
-      _config.plot.height = height - 70 - padding
-    } else {
-      _config.plot.height = height - 25 - padding
-    }
-
-    _config.style.height = height
+    _config.style.height = config.plot.height || 400
 
     let transfield = {}
     _config.columns.forEach(col => {
@@ -906,11 +892,11 @@
   
       _data = dv.rows
     }
-    
+
     const chart = new Chart({
       container: this.state.chartId,
       autoFit: true,
-      height: plot.height
+      height: this.wrap.offsetHeight - 25
     })
 
     chart.data(_data)
@@ -1089,7 +1075,7 @@
     const chart = new Chart({
       container: this.state.chartId,
       autoFit: true,
-      height: plot.height
+      height: this.wrap.offsetHeight - 25
     })
     
     // 鍧愭爣杞存牸寮忓寲
@@ -1477,7 +1463,7 @@
     const chart = new Chart({
       container: this.state.chartId,
       autoFit: true,
-      height: plot.height
+      height: this.wrap.offsetHeight - 25
     })
 
     chart.data(_data)
@@ -1718,7 +1704,7 @@
           </div> : null
         }
         <NormalHeader config={config} BID={BID} menuType={this.props.menuType} refresh={this.refreshSearch} />
-        <div className="canvas-wrap">
+        <div className="canvas-wrap" ref={ref => this.wrap = ref}>
           <div className="chart-action">
             {config.action.map(item => {
               if (item.OpenType === 'excelOut') {
@@ -1744,7 +1730,7 @@
               }
             })}
           </div>
-          <div className={'canvas' + (empty ? ' empty' : '')} style={{height: config.plot.height + 25}} id={this.state.chartId}></div>
+          <div className={'canvas' + (empty ? ' empty' : '')} id={this.state.chartId}></div>
         </div>
         {empty ? <Empty description={false}/> : null}
       </div>
diff --git a/src/tabviews/custom/components/chart/antv-bar-line/index.scss b/src/tabviews/custom/components/chart/antv-bar-line/index.scss
index 714a088..093ce92 100644
--- a/src/tabviews/custom/components/chart/antv-bar-line/index.scss
+++ b/src/tabviews/custom/components/chart/antv-bar-line/index.scss
@@ -5,11 +5,13 @@
   background-repeat: no-repeat;
   background-size: cover;
   min-height: 100px;
+  display: flex;
+  flex-flow: column;
 
   .canvas-wrap {
     margin: 0 0px;
     position: relative;
-    min-height: calc(100% - 45px);
+    flex: 1;
     .chart-action {
       position: absolute;
       top: 0px;
diff --git a/src/tabviews/custom/components/chart/antv-dashboard/index.jsx b/src/tabviews/custom/components/chart/antv-dashboard/index.jsx
index 041e41d..af8a9bf 100644
--- a/src/tabviews/custom/components/chart/antv-dashboard/index.jsx
+++ b/src/tabviews/custom/components/chart/antv-dashboard/index.jsx
@@ -7,12 +7,13 @@
 
 import Api from '@/api'
 import Utils from '@/utils/utils.js'
-import asyncComponent from '@/utils/asyncComponent'
+// import asyncComponent from '@/utils/asyncComponent'
 import UtilsDM from '@/utils/utils-datamanage.js'
 import MKEmitter from '@/utils/events.js'
+import NormalHeader from '@/tabviews/custom/components/share/normalheader'
 import './index.scss'
 
-const NormalHeader = asyncComponent(() => import('@/tabviews/custom/components/share/normalheader'))
+// const NormalHeader = asyncComponent(() => import('@/tabviews/custom/components/share/normalheader'))
 
 registerShape('point', 'pointer', {
   draw(cfg, container) {
@@ -96,13 +97,7 @@
       }
     }
 
-    let height = config.plot.height || 400
-    if (config.plot.title) {
-      _config.plot.height = height - 75
-    } else {
-      _config.plot.height = height - 30
-    }
-    _config.style.height = height
+    _config.style.height = config.plot.height || 400
 
     this.setState({
       config: _config,
@@ -355,7 +350,7 @@
     const chart = new Chart({
       container: chartId,
       autoFit: true,
-      height: plot.height,
+      height: this.wrap.offsetHeight - 30,
     })
     
     chart.data(data)
@@ -462,7 +457,7 @@
     const chart = new Chart({
       container: chartId,
       autoFit: true,
-      height: plot.height,
+      height: this.wrap.offsetHeight - 30,
       padding: [0, 0, 0, 0],
     })
     chart.data([_data])
@@ -607,8 +602,8 @@
           </div> : null
         }
         <NormalHeader config={config} />
-        <div className="canvas-wrap">
-          <div className={'canvas' + (empty ? ' empty' : '')} style={{height: config.plot.height + 30}} id={this.state.chartId}></div>
+        <div className="canvas-wrap" ref={ref => this.wrap = ref}>
+          <div className={'canvas' + (empty ? ' empty' : '')} id={this.state.chartId}></div>
         </div>
       </div>
     )
diff --git a/src/tabviews/custom/components/chart/antv-dashboard/index.scss b/src/tabviews/custom/components/chart/antv-dashboard/index.scss
index d9f3566..10db44d 100644
--- a/src/tabviews/custom/components/chart/antv-dashboard/index.scss
+++ b/src/tabviews/custom/components/chart/antv-dashboard/index.scss
@@ -5,11 +5,13 @@
   background-repeat: no-repeat;
   background-size: cover;
   min-height: 100px;
+  display: flex;
+  flex-flow: column;
   
   .canvas-wrap {
     margin: 0 0px;
     position: relative;
-    min-height: calc(100% - 45px);
+    flex: 1;
     .chart-action {
       position: absolute;
       top: 2px;
diff --git a/src/tabviews/custom/components/chart/antv-pie/index.jsx b/src/tabviews/custom/components/chart/antv-pie/index.jsx
index 002b51b..145efac 100644
--- a/src/tabviews/custom/components/chart/antv-pie/index.jsx
+++ b/src/tabviews/custom/components/chart/antv-pie/index.jsx
@@ -11,12 +11,13 @@
 import Utils from '@/utils/utils.js'
 import { modifyTabview } from '@/store/action'
 import { chartColors } from '@/utils/option.js'
-import asyncComponent from '@/utils/asyncComponent'
+// import asyncComponent from '@/utils/asyncComponent'
 import UtilsDM from '@/utils/utils-datamanage.js'
 import MKEmitter from '@/utils/events.js'
+import NormalHeader from '@/tabviews/custom/components/share/normalheader'
 import './index.scss'
 
-const NormalHeader = asyncComponent(() => import('@/tabviews/custom/components/share/normalheader'))
+// const NormalHeader = asyncComponent(() => import('@/tabviews/custom/components/share/normalheader'))
 
 class PieChart extends Component {
   static propTpyes = {
@@ -55,14 +56,7 @@
       _sync = false
     }
 
-    let height = config.plot.height || 400
-    if (config.plot.title || config.search.length > 0) {
-      _config.plot.height = height - 75
-    } else {
-      _config.plot.height = height - 30
-    }
-
-    _config.style.height = height
+    _config.style.height = config.plot.height || 400
 
     let decimal = 0
     _config.columns.forEach(col => {
@@ -558,7 +552,7 @@
     const chart = new Chart({
       container: chartId,
       autoFit: true,
-      height: plot.height,
+      height: this.wrap.offsetHeight - 30,
       padding: 0,
     })
 
@@ -752,7 +746,7 @@
     const chart = new Chart({
       container: chartId,
       autoFit: true,
-      height: plot.height
+      height: this.wrap.offsetHeight - 30
     })
 
     if (plot.shape !== 'nightingale' && plot.show !== 'value') {
@@ -1021,8 +1015,8 @@
           </div> : null
         }
         <NormalHeader config={config} BID={BID} menuType={this.props.menuType} refresh={this.refreshSearch} />
-        <div className="canvas-wrap">
-          <div className={'canvas' + (empty ? ' empty' : '')} style={{height: config.plot.height + 30}} id={this.state.chartId}></div>
+        <div className="canvas-wrap" ref={ref => this.wrap = ref}>
+          <div className={'canvas' + (empty ? ' empty' : '')} id={this.state.chartId}></div>
         </div>
         {empty ? <Empty description={false}/> : null}
       </div>
diff --git a/src/tabviews/custom/components/chart/antv-pie/index.scss b/src/tabviews/custom/components/chart/antv-pie/index.scss
index 3360ffe..5db4d2f 100644
--- a/src/tabviews/custom/components/chart/antv-pie/index.scss
+++ b/src/tabviews/custom/components/chart/antv-pie/index.scss
@@ -5,11 +5,13 @@
   background-repeat: no-repeat;
   background-size: cover;
   min-height: 100px;
+  display: flex;
+  flex-flow: column;
   
   .canvas-wrap {
     margin: 0 0px;
     position: relative;
-    min-height: calc(100% - 45px);
+    flex: 1;
     .chart-action {
       position: absolute;
       top: 2px;
diff --git a/src/tabviews/custom/components/chart/antv-scatter/index.jsx b/src/tabviews/custom/components/chart/antv-scatter/index.jsx
index 742617f..a085d4e 100644
--- a/src/tabviews/custom/components/chart/antv-scatter/index.jsx
+++ b/src/tabviews/custom/components/chart/antv-scatter/index.jsx
@@ -7,13 +7,14 @@
 
 import Api from '@/api'
 import Utils from '@/utils/utils.js'
-import asyncComponent from '@/utils/asyncComponent'
+// import asyncComponent from '@/utils/asyncComponent'
 import asyncBtnComponent from './asyncButtonComponent'
 import UtilsDM from '@/utils/utils-datamanage.js'
 import MKEmitter from '@/utils/events.js'
+import NormalHeader from '@/tabviews/custom/components/share/normalheader'
 import './index.scss'
 
-const NormalHeader = asyncComponent(() => import('@/tabviews/custom/components/share/normalheader'))
+// const NormalHeader = asyncComponent(() => import('@/tabviews/custom/components/share/normalheader'))
 const ExcelOutButton = asyncBtnComponent(() => import('@/tabviews/zshare/actionList/exceloutbutton'))
 const ExcelInButton = asyncBtnComponent(() => import('@/tabviews/zshare/actionList/excelInbutton'))
 
@@ -52,14 +53,7 @@
       _sync = false
     }
 
-    let height = config.plot.height || 400
-    if (config.plot.title || config.search.length > 0) {
-      _config.plot.height = height - 70
-    } else {
-      _config.plot.height = height - 25
-    }
-
-    _config.style.height = height
+    _config.style.height = config.plot.height || 400
 
     this.setState({
       config: _config,
@@ -327,7 +321,7 @@
     const chart = new Chart({
       container: chartId,
       autoFit: true,
-      height: plot.height
+      height: this.wrap.offsetHeight - 25
     })
 
     chart.data(data);
@@ -395,7 +389,7 @@
           </div> : null
         }
         <NormalHeader config={config} BID={BID} menuType={this.props.menuType} refresh={this.refreshSearch} />
-        <div className="canvas-wrap">
+        <div className="canvas-wrap" ref={ref => this.wrap = ref}>
           <div className="chart-action">
             {config.action.map(item => {
               if (item.OpenType === 'excelOut') {
@@ -421,7 +415,7 @@
               }
             })}
           </div>
-          <div className={'canvas' + (empty ? ' empty' : '')} style={{height: config.plot.height + 25}} id={this.state.chartId}></div>
+          <div className={'canvas' + (empty ? ' empty' : '')} id={this.state.chartId}></div>
         </div>
         {empty ? <Empty description={false}/> : null}
       </div>
diff --git a/src/tabviews/custom/components/chart/antv-scatter/index.scss b/src/tabviews/custom/components/chart/antv-scatter/index.scss
index c9ad16c..1f52198 100644
--- a/src/tabviews/custom/components/chart/antv-scatter/index.scss
+++ b/src/tabviews/custom/components/chart/antv-scatter/index.scss
@@ -5,11 +5,13 @@
   background-repeat: no-repeat;
   background-size: cover;
   min-height: 100px;
+  display: flex;
+  flex-flow: column;
 
   .canvas-wrap {
     margin: 0 0px;
     position: relative;
-    min-height: calc(100% - 45px);
+    flex: 1;
     .chart-action {
       position: absolute;
       top: 0px;
diff --git a/src/tabviews/home/index.jsx b/src/tabviews/home/index.jsx
index dfb3f7d..ae14a8f 100644
--- a/src/tabviews/home/index.jsx
+++ b/src/tabviews/home/index.jsx
@@ -78,7 +78,7 @@
     if (loading || waiting) {
       return (<div className="home-loading-view" style={{background: background}}><Spin className="home-box-spin" size="large" /></div>)
     } else if (view === 'custom') {
-      return (<CustomPage MenuID={this.props.MenuID}/>)
+      return (<CustomPage MenuID={this.props.MenuID} MenuName="棣栭〉"/>)
     } else {
       return (<DefaultHome />)
     }
diff --git a/src/views/login/index.jsx b/src/views/login/index.jsx
index 3ef55be..d34928c 100644
--- a/src/views/login/index.jsx
+++ b/src/views/login/index.jsx
@@ -198,15 +198,17 @@
 
   componentDidMount () {
     // 鑾峰彇ip鍙婂煄甯備俊鎭�
-    let ipurl = window.atob('aHR0cHM6Ly9lcGMubWs5a$mkC5jbi93ZWJhcGkvaXBsb2M='.replace(/\$mk/ig, ''))
-    Api.directRequest(ipurl, 'get', null, 'true').then(res => {
-      if (!res || !res.location) return
-      sessionStorage.setItem('city', res.location)
-      this.setState({
-        ipAddress: res.ip || '',
-        city: res.location
-      })
-    })
+    // 鑾峰彇鍦扮悊浣嶇疆锛氳胺姝屾棤鏁堬紝璋锋瓕瀹氫綅闇�瑕佸皢闄勮繎鐨勬棤绾夸俊鎭彂閫佸埌璋锋瓕鐨勬湇鍔″櫒锛屾煡璇㈠畾浣嶄俊鎭紝鍥藉唴鏃犳硶杩炴帴鍒拌胺姝屾湇鍔″櫒锛岀伀鐙愬彲浠ヨ幏鍙栫粡绾害
+    // let ipurl = window.atob('aHR0cHM6Ly9lcGMubWs5a$mkC5jbi93ZWJhcGkvaXBsb2M='.replace(/\$mk/ig, ''))
+    // Api.directRequest(ipurl, 'get', null, 'true').then(res => {
+    //   if (!res || !res.location) return
+    //   sessionStorage.setItem('city', res.location)
+    //   this.setState({
+    //     ipAddress: res.ip || '',
+    //     city: res.location
+    //   })
+    // })
+    sessionStorage.setItem('city', '') // ip鍦板潃瀹氫綅鏆傚仠浣跨敤
     const timeStamp = new Date().getTime()
     const _authUrl = window.location.href.split('#')[0] + 'AuthCode'
 
@@ -215,13 +217,15 @@
     authCode = authCode ? authCode.split(',') : []
     let index = authCode.findIndex(key => key === _s)
 
-    if (index > -1) {
+    let key = md5(window.GLOB.appId + 'minke_software' + window.GLOB.appkey).toUpperCase().substr(-6)
+
+    if (index > -1 || window.GLOB.licenseKey === key) {
       this.setState({
         auth: true
       })
     }
 
-    if (index === -1 || index > 5) {
+    if (window.GLOB.licenseKey !== key && (index === -1 || index > 5)) {
       let _appId = window.GLOB.appId
   
       if (options.sysType === 'cloud') { // 浜戠浣跨敤绯荤粺閰嶇疆appid

--
Gitblit v1.8.0