Prechádzať zdrojové kódy

优化大屏图表,更改登录和跳转逻辑

ming 3 rokov pred
rodič
commit
15a4fa3a2e

BIN
dist.zip


BIN
dist1.zip


BIN
dist2.zip


+ 9 - 7
public/static/config.js

@@ -4,13 +4,15 @@ var PLATFROM_CONFIG = {};
 // PLATFROM_CONFIG.baseUrl = "http://172.16.1.196:8010/"  //超博本地
 
 // console.log(window.location)
-if (window.location.host.indexOf("localhost") != -1 || window.location.host.indexOf("pcdev.ewoogi.com") != -1) {
-    PLATFROM_CONFIG.baseUrl = "https://qhome.usky.cn/fivapi/" //线上
-    PLATFROM_CONFIG.fileUrl = "https://qhome.usky.cn/file/" //xlsx文件访问路径
-} else {
-    PLATFROM_CONFIG.baseUrl = "https://wx.ewoogi.com/api/" //线上
-    PLATFROM_CONFIG.fileUrl = "https://wx.ewoogi.com/file/" //xlsx文件访问路径
-}
+PLATFROM_CONFIG.baseUrl = "https://qhome.usky.cn/fivapi/" //线上
+PLATFROM_CONFIG.fileUrl = "https://qhome.usky.cn/file/" //xlsx文件访问路径
+    // if (window.location.host.indexOf("localhost") != -1 || window.location.host.indexOf("pcdev.ewoogi.com") != -1) {
+    //     PLATFROM_CONFIG.baseUrl = "https://qhome.usky.cn/fivapi/" //线上
+    //     PLATFROM_CONFIG.fileUrl = "https://qhome.usky.cn/file/" //xlsx文件访问路径
+    // } else {
+    //     PLATFROM_CONFIG.baseUrl = "https://wx.ewoogi.com/api/" //线上
+    //     PLATFROM_CONFIG.fileUrl = "https://wx.ewoogi.com/file/" //xlsx文件访问路径
+    // }
 
 
 // 本地json文件请求路径

+ 9 - 18
src/main.js

@@ -46,27 +46,18 @@ router.beforeEach((to, from, next) => {
     if (to.path !== '/') {
         if (localStorage.getItem('accessToken') === null) {
             removeToken() //不用管
-                // if (localStorage.getItem('userInfo') === null) {
 
-            // 本地存储的accessToken不存在时,跳转至后台登录页
-            // alert('本地存储的accessToken不存在')
-
-            // console.log(window.location.host.indexOf("localhost") != -1)
-            if (window.location.host.indexOf("localhost") != -1) {
-                next({ path: '/' })
-            } else if (window.location.host.indexOf("pcdev.ewoogi.com") != -1) {
-                window.location.href = 'https://pcdev.ewoogi.com/adminfiv/#/login'
-            } else {
-                window.location.href = 'https://wx.ewoogi.com/manage/#/login'
-            }
+            next({ path: '/' })
+                // if (window.location.host.indexOf("localhost") != -1) {
+                //     next({ path: '/' })
+                // } else if (window.location.host.indexOf("pcdev.ewoogi.com") != -1) {
+                //     window.location.href = 'https://pcdev.ewoogi.com/adminfiv/#/login'
+                // } else {
+                //     window.location.href = 'https://wx.ewoogi.com/manage/#/login'
+                // }
 
             document.getElementById('routers').style.display = "none"
-                // setTimeout(() => {
-                //     ElMessage.warning({
-                //         message: '请登录后重试!',
-                //         type: 'warning'
-                //     })
-                // }, 100);
+
 
         } else {
             // alert('本地存储的accessToken存在')

+ 3 - 2
src/views/home/components/pieChart.vue

@@ -126,7 +126,8 @@ export default {
               normal: {
                 overflow: 'none',
                 position: 'outside',
-                padding:[20,20,20,20],
+                width:100,
+                padding:[20,10,20,30],
                 show: true,
                  lineHeight: 20,
                 textStyle: {
@@ -142,7 +143,7 @@ export default {
               // },
             },
             name: "访问来源",
-            radius: ["45%", "67%"],
+            radius: ["35%", "55%"],
             type: "pie",
             data: pie,
           },

+ 3 - 3
src/views/home/components/statisBottomChart.vue

@@ -77,7 +77,7 @@ export default {
             name: "",
             type: "pictorialBar",
             symbolSize: [20, 10], //aa顶部盖子大小
-            symbolOffset: [-24, -4], //aa盖子位置
+            symbolOffset: [-24, this.frtAnalogData.dayCount<0.001?-10:-4], //aa盖子位置
             z: 12,
             data: [
               {
@@ -115,7 +115,7 @@ export default {
             name: "",
             type: "pictorialBar",
             symbolSize: [20, 10], //aa顶部盖子大小
-            symbolOffset: [0, -4], //aa盖子位置
+            symbolOffset: [0, this.frtAnalogData.monthCount<0.001?-10:-4], //aa盖子位置
             z: 12,
             data: [
               {
@@ -153,7 +153,7 @@ export default {
             name: "",
             type: "pictorialBar",
             symbolSize: [20, 10],
-            symbolOffset: [24, -4],
+            symbolOffset: [24, this.frtAnalogData.yearCount<0.001?-10:-4],
             z: 12,
             data: [
               {

+ 13 - 1
src/views/index.vue

@@ -13,8 +13,15 @@
         >
           <span>{{ route.meta.title }}</span>
         </router-link>
-        <a
+        <!-- <a
           :href="'https://wx.ewoogi.com/manage/#/'"
+          class="router-left router_left1"
+          >后台管理</a
+        > -->
+
+        <a
+        @click="goAdmin"
+         
           class="router-left router_left1"
           >后台管理</a
         >
@@ -94,6 +101,7 @@
 </template>
 
 <script>
+import { ElMessage } from "element-plus";
 import api from "@/api/index";
 import { getToken } from "@/utils/auth";
 export default {
@@ -136,6 +144,10 @@ export default {
     // console.log(this.router);
   },
   methods: {
+    goAdmin(){
+      ElMessage.warning('开发中....');
+
+    },
     el_select(val) {
       // console.log(val);
       for (let i in this.options) {

+ 7 - 5
src/views/login.vue

@@ -84,11 +84,13 @@ export default {
   },
   mounted() {
     this.getCookie();
-    if (window.location.host.indexOf("localhost") != -1) {
-      this.loginFree();
-    } else {
-      this.$router.push({ path: "/home" });
-    }
+
+    this.loginFree();
+    // if (window.location.host.indexOf("localhost") != -1) {
+    //   this.loginFree();
+    // } else {
+    //   this.$router.push({ path: "/home" });
+    // }
   },
 
   methods: {