zhaobao 2 سال پیش
والد
کامیت
d387c15015

+ 2 - 2
src/config/index.js

@@ -4,8 +4,8 @@ module.exports = {
     * 服务API地址
     */
     serverUrl: 'http://113.141.93.143:1688', // 正式环境
-    // devServerUrl: 'http://1.15.92.205:8080/', // 开发环境
-    devServerUrl: 'http://192.168.3.5:8080/', // 开发环境 qu
+    devServerUrl: 'http://113.141.93.143:1688', // 开发环境
+    // devServerUrl: 'http://192.168.3.5:8080/', // 开发环境 qu
     // devServerUrl: 'http://192.168.3.201:8080/', // 开发环境  test
     mqttUrl: 'ws://1.15.92.205:8083/mqtt', // 水泥厂mqtt地址
     /**

+ 1 - 1
src/utils/auth.js

@@ -1,7 +1,7 @@
 import Cookies from 'js-cookie'
 
 // Token
-const TokenKey = 'User-Token'
+const TokenKey = 'bigsrceen-Token'
 
 export function getToken() {
   return Cookies.get(TokenKey)

+ 6 - 6
src/utils/request.js

@@ -41,18 +41,18 @@ service.interceptors.response.use(
       // 50008: Illegal token; 50012: Other clients logged in; 50014: Token expired;
       if (res.code === 401) {
         // to re-login
-        if(ElMessageBoxFlag){
-          ElMessageBoxFlag =false
-        }else{
-          return
-        }
+        // if(ElMessageBoxFlag){
+        //   ElMessageBoxFlag =false
+        // }else{
+        //   return
+        // }
         ElMessageBox.confirm('登录失效,请重新登录!', '温馨提示!', {
           confirmButtonText: '确认',
           cancelButtonText: '取消',
           type: 'warning'
         }).then(() => {
             setTimeout(()=>{
-              window.location.href="http://113.141.93.143:9528/"
+              window.history.back()
             },1000)
         })
       } else {

+ 10 - 2
src/views/home/components/SensorStatus.vue

@@ -1,8 +1,8 @@
 <template>
 <div class="item">
     <div class="title">
-        <span class="name">传感器状况</span>
-        <span class="number">{{total}}</span>
+        <span class="name">传感器状况<span class="number" style="padding-left:10px;">{{total}}</span></span>
+        <span class="detail" @click="linkTo">详情>></span>        
     </div>
     <div class="container">
         <div id="sensor-status-chart" v-if="status"></div>   
@@ -136,6 +136,14 @@ import { goafdevstatis} from '@/api/goaf/sensor'
                 }); 
                                  
             })
+        },
+        linkTo(){
+            this.$router.push({
+                path: '/particulars/sensor',
+                query: {
+                    id: '0'
+                }
+            })
         }
     },
     destroyed() {

+ 10 - 2
src/views/home/components/SensorWarningStatistics.vue

@@ -2,7 +2,7 @@
     <div class="item warning-statistics">
         <div class="title">
             <span class="name">传感器预警统计</span>
-            <span class="number">{{total}}</span>
+            <span class="number">{{total}}</span>            
         </div>
         <div class="container">
             <div class="lf">
@@ -82,7 +82,15 @@ export default {
             this.data=data
             this.total=total
             this.rectify_rate=(rectify_rate*100).toFixed(1)
-        }
+        },
+        linkTo(){
+            this.$router.push({
+                path: '/particulars/sensor',
+                query: {
+                    id: '0'
+                }
+            })
+        }        
     }
 }
 </script>

+ 5 - 2
src/views/home/components/WarningStatistics.vue

@@ -1,8 +1,8 @@
 <template>
     <div class="item warning-statistics">
         <div class="title">
-            <span class="name">巡检预警统计</span>
-            <span class="number">{{total}}</span>
+            <span class="name">巡检预警统计<span class="number" style="padding-left:10px;">{{total}}</span></span>
+            <span class="detail" @click="linkTo">详情>></span>
         </div>
         <div class="container">
             <div class="lf">
@@ -82,6 +82,9 @@ export default {
             this.data=data
             this.total=total
             this.rectify_rate=(rectify_rate*100).toFixed(1)
+        },
+        linkTo(){
+            this.$router.push('/particulars/check')
         }
     }
 }

+ 8 - 0
src/views/home/index.vue

@@ -143,6 +143,14 @@ import {
                 justify-content: space-between;
                 align-items: center;
                 text-indent: 24px;
+                .detail{
+                    color: #F4C000;
+                    font-size: 18px;
+                    cursor: pointer;
+                    &:hover{
+                        text-decoration: underline;
+                    }
+                }                
             }
             .container{
                 margin-top: 10px;