Changpeng Duan 5 роки тому
батько
коміт
d659019dea

+ 0 - 1
src/components/Console.vue

@@ -207,7 +207,6 @@
                         }
                         that.FullChildlRs = json.FullChildlRs;//全部关系
                     } else {
-
                         if (json.Code == 1010) {
                             that.$message.error(json.Memo);
                             that.$router.push({path: '/login', query: {status: 1}});

+ 31 - 29
src/router/index.js

@@ -20,98 +20,100 @@ const routes = [
                 meta: {
                     title: "首页",
                 }
-            },{
+            }, {
                 path: '/phoneSign',
                 name: 'PhoneSign',
                 component: () => import('@/views/PhoneSign.vue'),
                 meta: {
                     title: "WiFi信号记录",
                 }
-            },{
+            }, {
                 path: '/wifiSign',
                 name: 'WifiSign',
                 component: () => import('@/views/WifiSign.vue'),
                 meta: {
                     title: "WiFi信号记录",
                 }
-            },{
+            }, {
                 path: '/white',
                 name: 'white',
                 component: () => import('@/views/white.vue'),
                 meta: {
                     title: "白名单",
                 }
-            },{
+            }, {
                 path: '/GSign',
                 name: 'GSign',
                 component: () => import('@/views/GSign.vue'),
                 meta: {
                     title: "0-6G扫描记录",
                 }
-            },{
+            }, {
                 path: '/equip',
                 name: 'Equip',
                 component: () => import('@/views/Equip.vue'),
                 meta: {
                     title: "设备管理",
                 }
-            },{
+            }, {
                 path: '/qrcodemanage',
                 name: 'qrcodemanage',
                 component: () => import('@/views/Qrcodemanage.vue'),
                 meta: {
                     title: "二维码管理",
                 }
-            },{
+            }, {
                 path: '/record',
                 name: 'record',
                 component: () => import('@/views/Record.vue'),
                 meta: {
                     title: "监测记录",
                 }
-            },{
+            }, {
                 path: '/region',
                 name: 'Region',
                 component: () => import('@/views/Region.vue'),
                 meta: {
-                    title: "关于我们",
+                    title: "区域管理",
                 }
-            },{
+            }, {
                 path: '/hardware',
                 name: 'Hardware',
                 component: () => import('@/views/Hardware.vue'),
                 meta: {
                     title: "固件管理",
                 }
-            },{
+            }, {
                 path: '/police',
                 name: 'Police',
                 component: () => import('@/views/Police.vue'),
                 meta: {
                     title: "警务通管理",
                 }
-            },{
+            }, {
                 path: '/pwd',
                 name: 'Pwd',
                 component: () => import('@/views/Pwd.vue'),
                 meta: {
                     title: "密码修改",
                 }
-            },{
+            }, {
                 path: '/basic',
                 name: 'Basic',
                 component: () => import('@/views/Basic.vue'),
                 meta: {
                     title: "no use",
                 }
-            },{
-                path: '/setting',
-                name: 'Setting',
-                component: () => import('@/views/Setting.vue'),
-                meta: {
-                    title: "基本设置",
-                }
-            },{
+            }
+            // ,{
+            //     path: '/setting',
+            //     name: 'Setting',
+            //     component: () => import('@/views/Setting.vue'),
+            //     meta: {
+            //         title: "基本设置",
+            //     }
+            // }
+            , {
                 path: '/createmeetingqrcode',
                 name: 'Createmeetingqrcode',
                 component: () => import('@/views/Createmeetingqrcode.vue'),
@@ -124,15 +126,15 @@ const routes = [
         path: '/login',
         name: 'Login',
         component: () => import( '../views/Login.vue')
-    },{
+    }, {
         path: '/wifiSign',
         name: 'wifiSign',
         component: () => import( '../components/WifiSign.vue')
-    },{
+    }, {
         path: '/equipInfo',
         name: 'equipInfo',
         component: () => import( '../components/EquipInfo.vue')
-    },{
+    }, {
         path: '/poster',
         name: 'Poster',
         component: () => import( '../views/Poster.vue')
@@ -156,15 +158,15 @@ const router = new VueRouter({
 });
 
 // 路由守卫
-router.beforeEach((to,from,next)=> {
+router.beforeEach((to, from, next) => {
     NProgress.start();
-    const isLogin = localStorage.token? true : false;
+    const isLogin = localStorage.token ? true : false;
 
-    if(to.path == '/login' || to.path == '/register'|| to.path == '/poster'){//'login'和'register'相当于是路由白名单
+    if (to.path == '/login' || to.path == '/register' || to.path == '/poster') {//'login'和'register'相当于是路由白名单
         next();
-    }else{
+    } else {
         //如果token存在,就正常跳转,如果不存在,则说明未登陆,则跳转到'login'
-        isLogin? next() : next("/login");
+        isLogin ? next() : next("/login");
     }
 });
 

+ 2 - 0
src/views/Hardware.vue

@@ -156,6 +156,8 @@
                         <span v-if="scope.row.Status == 0">已禁用</span>
                         <span v-if="scope.row.Status == 1">已启用</span>
                         <span v-if="scope.row.Status == 2">已离线</span>
+                        <span v-if="scope.row.Status == 3">已返厂</span>
+                        <span v-if="scope.row.Status == 4">已离线</span>
                     </template>
                 </el-table-column>
             </el-table>

+ 1 - 0
src/views/Main.vue

@@ -306,6 +306,7 @@
                             localStorage.usercode = '';
                             localStorage.token = '';
                             that.$router.push({path: '/login', query: {status: 1}});
+                            return false
                         }
                         that.$message.error(json.Memo);
                     }

+ 4 - 0
src/views/Qrcodemanage.vue

@@ -347,6 +347,10 @@
             handleImgbefore(file) {
                 this.dialog.image = file;
                 this.dialog.imgSrc = '';
+                if(file.size > 376396){
+                    this.$message.error('图片容量过大,请选择小于4M的容量重新上传');
+                    return false
+                }
             },
             handleImgSuccess(res, file) {
                 let that = this;

+ 4 - 0
src/views/Region.vue

@@ -438,6 +438,10 @@
             handleImgbefore(file) {
                 this.dialog.image = file;
                 this.dialog.imgSrc = '';
+                if(file.size > 376396){
+                    this.$message.error('图片容量过大,请选择小于4M的容量重新上传');
+                    return false
+                }
             },
             handleCheckChange(data, checked, indeterminate) {
                 console.log(data, checked, indeterminate);