From 769725931ef28d1a86b0fdd89cf5a44faf7bec27 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 03 八月 2020 12:07:57 +0800
Subject: [PATCH] 2020-08-03

---
 src/components/sidemenu/index.scss           |    2 +-
 src/tabviews/zshare/chartcomponent/index.jsx |   22 +++++++++++++++++-----
 src/views/login/index.jsx                    |   12 +++++++-----
 3 files changed, 25 insertions(+), 11 deletions(-)

diff --git a/src/components/sidemenu/index.scss b/src/components/sidemenu/index.scss
index 30e02a4..954e8de 100644
--- a/src/components/sidemenu/index.scss
+++ b/src/components/sidemenu/index.scss
@@ -4,7 +4,7 @@
 .side-menu {
   flex: 0 0 235px;
   width: 235px;
-  padding: 48px 0 20px;
+  padding: 48px 0 40px;
   transition: width 0.2s, flex 0.2s;
   .ant-menu-item {
     padding-left: 0!important;
diff --git a/src/tabviews/zshare/chartcomponent/index.jsx b/src/tabviews/zshare/chartcomponent/index.jsx
index 80e3629..f791085 100644
--- a/src/tabviews/zshare/chartcomponent/index.jsx
+++ b/src/tabviews/zshare/chartcomponent/index.jsx
@@ -431,10 +431,15 @@
     let _data = []
     let _valfield = 'value'
     let _typefield = 'key'
+    let ispercent = false
 
     if (plot.datatype === 'statistics') {
       _valfield = plot.InfoValue
       _typefield = plot.InfoType
+
+      if (percentFields.length > 0) {
+        ispercent = true
+      }
 
       _data = this.getStaticData()
     } else {
@@ -490,7 +495,8 @@
       })
     }
     chart.scale(_valfield, {
-      nice: true
+      nice: true,
+      range: [0, 0.93]
     })
 
     // 鍧愭爣杞存牸寮忓寲
@@ -540,7 +546,7 @@
       .tooltip(`${plot.Xaxis}*${_valfield}*${_typefield}`, (name, value, type) => {
         return {
           name: type,
-          value: percentFields.includes(type) ? value + '%' : value
+          value: percentFields.includes(type) || ispercent ? value + '%' : value
         }
       })
 
@@ -746,10 +752,15 @@
     let _data = []
     let _valfield = 'value'
     let _typefield = 'key'
+    let ispercent = false
 
     if (plot.datatype === 'statistics') {
       _valfield = plot.InfoValue
       _typefield = plot.InfoType
+
+      if (percentFields.length > 0) {
+        ispercent = true
+      }
 
       _data = this.getStaticData()
     } else {
@@ -804,7 +815,8 @@
     chart.data(_data)
 
     chart.scale(_valfield, {
-      nice: true
+      nice: true,
+      range: [0, 0.93]
     })
 
     // 鍧愭爣杞存牸寮忓寲
@@ -862,7 +874,7 @@
         .tooltip(`${plot.Xaxis}*${_valfield}*${_typefield}`, (name, value, type) => {
           return {
             name: type,
-            value: percentFields.includes(type) ? value + '%' : value
+            value: percentFields.includes(type) || ispercent ? value + '%' : value
           }
         })
 
@@ -879,7 +891,7 @@
         .tooltip(`${plot.Xaxis}*${_valfield}*${_typefield}`, (name, value, type) => {
           return {
             name: type,
-            value: percentFields.includes(type) ? value + '%' : value
+            value: percentFields.includes(type) || ispercent ? value + '%' : value
           }
         })
 
diff --git a/src/views/login/index.jsx b/src/views/login/index.jsx
index f8e8807..8b029a1 100644
--- a/src/views/login/index.jsx
+++ b/src/views/login/index.jsx
@@ -153,7 +153,8 @@
   }
 
   componentDidMount () {
-    let timeStamp = new Date().getTime()
+    const timeStamp = new Date().getTime()
+    const _authUrl = window.location.href.split('#')[0] + 'AuthCode'
     let _appId = window.GLOB.appId
 
     if (options.sysType === 'cloud') { // 浜戠浣跨敤绯荤粺閰嶇疆appid
@@ -167,6 +168,7 @@
       func: 'sEmpowerCloud_Get_LinkUrl',
       AppID: _appId,
       TimeStamp: timeStamp,
+      appkey: window.GLOB.appkey,
       userid: 'bh0bapabtd45epsgra79segbch6c1ibk',
       LoginUID: 'bh0bapabtd45epsgra79segbch6c1ibk'
     }
@@ -180,26 +182,26 @@
             box.push(md5(s))
           }
           box = box.join(',')
-          localStorage.setItem('AuthCode', box)
+          localStorage.setItem(_authUrl, box)
   
           this.setState({
             auth: true
           })
         } else {
-          localStorage.removeItem('AuthCode')
+          localStorage.removeItem(_authUrl)
           this.setState({
             auth: false
           })
         }
       } else if (res.ErrCode === 'N') {
-        localStorage.removeItem('AuthCode')
+        localStorage.removeItem(_authUrl)
         this.setState({
           auth: false
         })
       }
     })
 
-    let authCode = localStorage.getItem('AuthCode')
+    let authCode = localStorage.getItem(_authUrl)
     let _s = md5('mksoft' + moment().format('YYYYMMDD'))
     if (authCode && authCode.includes(_s)) {
       this.setState({

--
Gitblit v1.8.0