Browse Source

last commit

a1140836302 2 years ago
parent
commit
81b82f833f
4 changed files with 3 additions and 24 deletions
  1. 0 5
      src/main.js
  2. 0 3
      src/permission.js
  3. 0 13
      src/views/equipment-monitoring/index.vue
  4. 3 3
      vue.config.js

+ 0 - 5
src/main.js

@@ -14,11 +14,6 @@ import * as filters from './filters' // global filters
 import * as echarts from 'echarts'
 import moment from "moment"
 
-if (process.env.NODE_ENV === 'production') {
-  const { mockXHR } = require('../mock')
-  mockXHR()
-}
-
 Vue.use(Element, {
   size: Cookies.get('size') || 'medium', // set element-ui default size
 })

+ 0 - 3
src/permission.js

@@ -13,10 +13,8 @@ const whiteList = ['/login', '/auth-redirect'] // no redirect whitelist
 router.beforeEach(async(to, from, next) => {
   // start progress bar
   NProgress.start()
-
   // set page title
   document.title = getPageTitle(to.meta.title)
-
   // determine whether the user has logged in
   const hasToken = getToken()
   if (hasToken) {
@@ -45,7 +43,6 @@ router.beforeEach(async(to, from, next) => {
           const accessRoutes = await store.dispatch('permission/generateRoutes', roles)
           // dynamically add accessible routes
           router.addRoutes(accessRoutes)
-
           // hack method to ensure that addRoutes is complete
           // set the replace: true, so the navigation will not leave a history record
           next({ ...to, replace: true })

+ 0 - 13
src/views/equipment-monitoring/index.vue

@@ -184,8 +184,6 @@ export default {
             this.clearTimerList();
             //检测断开重连
             this.detectWebsocketConnection();
-            //开启定时器
-            this.setTimerList();
         }
     },
     destroyed() {
@@ -193,17 +191,8 @@ export default {
         this.clearTimerList();
     },
     methods: {
-        //定时器列表
-        setTimerList() {
-            this.exchargeTimer = setInterval(() => {
-
-            }, 5000);
-        },
         //清除定时器列表
         clearTimerList() {
-            if (this.exchargeTimer) {
-                clearInterval(this.exchargeTimer);
-            }
             if (this.wsTimer) {
                 clearInterval(this.wsTimer);
             }
@@ -273,10 +262,8 @@ export default {
     width: 100%;
     min-height: 100%;
     height: auto !important;
-
     ul {
         display: none;
     }
-
 }
 </style>

+ 3 - 3
vue.config.js

@@ -4,7 +4,7 @@ const path = require('path')
 function resolve(dir) {
   return path.join(__dirname, dir)
 }
-const name = '重卡换电智能站控系统' // page title
+const name = '重卡换电智能站控系统'
 module.exports = {
   publicPath: "/",
   outputDir: 'dist',
@@ -21,13 +21,13 @@ module.exports = {
     },
     proxy: {
       '/api': {
-        target: `http://192.168.2.27:8080`,
+        target: `http://192.168.0.63:8080`,
         // target: `http://172.16.12.146:8080`,
         ws: true,
         changeOrigin: true,
       },
       '/ws': {
-         target: `ws://192.168.2.27:8080/ws`,
+         target: `ws://192.168.0.63:8080/ws`,
         // target: `ws://172.16.12.146:8080/ws`,
         ws: true,
         changeOrigin: true,