Changpeng Duan před 4 roky
rodič
revize
f8af0b2fc0

+ 8 - 8
package-lock.json

@@ -1,5 +1,5 @@
 {
-  "name": "new_back",
+  "name": "SignalDigger",
   "version": "0.1.0",
   "lockfileVersion": 1,
   "requires": true,
@@ -4248,11 +4248,11 @@
       }
     },
     "echarts": {
-      "version": "4.8.0",
-      "resolved": "https://registry.npm.taobao.org/echarts/download/echarts-4.8.0.tgz",
-      "integrity": "sha1-ssHPuSKbE9No7hBPyO6mALV01MQ=",
+      "version": "4.9.0",
+      "resolved": "https://registry.npm.taobao.org/echarts/download/echarts-4.9.0.tgz",
+      "integrity": "sha1-qbm6oD8Doqcx5jQMVb77V6nhNH0=",
       "requires": {
-        "zrender": "4.3.1"
+        "zrender": "4.3.2"
       }
     },
     "echarts-amap": {
@@ -11084,9 +11084,9 @@
       }
     },
     "zrender": {
-      "version": "4.3.1",
-      "resolved": "https://registry.npm.taobao.org/zrender/download/zrender-4.3.1.tgz?cache=0&sync_timestamp=1588758471315&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fzrender%2Fdownload%2Fzrender-4.3.1.tgz",
-      "integrity": "sha1-uviqbcgYei+BlpLX1fm+36K5D6M="
+      "version": "4.3.2",
+      "resolved": "https://registry.npm.taobao.org/zrender/download/zrender-4.3.2.tgz",
+      "integrity": "sha1-7HQy+UFcgsc1hLa3uMR+GwFiCcY="
     }
   }
 }

+ 2 - 1
package.json

@@ -9,7 +9,8 @@
   "dependencies": {
     "64": "^0.2.0",
     "core-js": "^3.6.5",
-    "echarts": "^4.8.0",
+    "echarts": "^4.9.0",
+    "echarts-gl": "^1.1.1",
     "element-ui": "^2.13.2",
     "js": "^0.1.0",
     "js-base": "^0.0.1-beta",

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 0 - 0
src/3d/Stats.js


+ 26 - 0
src/3d/mt_bruno_elevation.csv

@@ -0,0 +1,26 @@
+,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23
+0,27.80985,49.61936,83.08067,116.6632,130.414,150.7206,220.1871,156.1536,148.6416,203.7845,206.0386,107.1618,68.36975,45.3359,49.96142,21.89279,17.02552,11.74317,14.75226,13.6671,5.677561,3.31234,1.156517,-0.147662
+1,27.71966,48.55022,65.21374,95.27666,116.9964,133.9056,152.3412,151.934,160.1139,179.5327,147.6184,170.3943,121.8194,52.58537,33.08871,38.40972,44.24843,69.5786,4.019351,3.050024,3.039719,2.996142,2.967954,1.999594
+2,30.4267,33.47752,44.80953,62.47495,77.43523,104.2153,102.7393,137.0004,186.0706,219.3173,181.7615,120.9154,143.1835,82.40501,48.47132,74.71461,60.0909,7.073525,6.089851,6.53745,6.666096,7.306965,5.73684,3.625628
+3,16.66549,30.1086,39.96952,44.12225,59.57512,77.56929,106.8925,166.5539,175.2381,185.2815,154.5056,83.0433,62.61732,62.33167,60.55916,55.92124,15.17284,8.248324,36.68087,61.93413,20.26867,68.58819,46.49812,0.2360095
+4,8.815617,18.3516,8.658275,27.5859,48.62691,60.18013,91.3286,145.7109,116.0653,106.2662,68.69447,53.10596,37.92797,47.95942,47.42691,69.20731,44.95468,29.17197,17.91674,16.25515,14.65559,17.26048,31.22245,46.71704
+5,6.628881,10.41339,24.81939,26.08952,30.1605,52.30802,64.71007,76.30823,84.63686,99.4324,62.52132,46.81647,55.76606,82.4099,140.2647,81.26501,56.45756,30.42164,17.28782,8.302431,2.981626,2.698536,5.886086,5.268358
+6,21.83975,6.63927,18.97085,32.89204,43.15014,62.86014,104.6657,130.2294,114.8494,106.9873,61.89647,55.55682,86.80986,89.27802,122.4221,123.9698,109.0952,98.41956,77.61374,32.49031,14.67344,7.370775,0.03711011,0.6423392
+7,53.34303,26.79797,6.63927,10.88787,17.2044,56.18116,79.70141,90.8453,98.27675,80.87243,74.7931,75.54661,73.4373,74.11694,68.1749,46.24076,39.93857,31.21653,36.88335,40.02525,117.4297,12.70328,1.729771,0.0
+8,25.66785,63.05717,22.1414,17.074,41.74483,60.27227,81.42432,114.444,102.3234,101.7878,111.031,119.2309,114.0777,110.5296,59.19355,42.47175,14.63598,6.944074,6.944075,27.74936,0.0,0.0,0.09449376,0.07732264
+9,12.827,69.20554,46.76293,13.96517,33.88744,61.82613,84.74799,121.122,145.2741,153.1797,204.786,227.9242,236.3038,228.3655,79.34425,25.93483,6.944074,6.944074,6.944075,7.553681,0.0,0.0,0.0,0.0
+10,0.0,68.66396,59.0435,33.35762,47.45282,57.8355,78.91689,107.8275,168.0053,130.9597,212.5541,165.8122,210.2429,181.1713,189.7617,137.3378,84.65395,8.677168,6.956576,8.468093,0.0,0.0,0.0,0.0
+11,0.0,95.17499,80.03818,59.89862,39.58476,50.28058,63.81641,80.61302,66.37824,198.7651,244.3467,294.2474,264.3517,176.4082,60.21857,77.41475,53.16981,56.16393,6.949235,7.531059,3.780177,0.0,0.0,0.0
+12,0.0,134.9879,130.3696,96.86325,75.70494,58.86466,57.20374,55.18837,78.128,108.5582,154.3774,319.1686,372.8826,275.4655,130.2632,54.93822,25.49719,8.047439,8.084393,5.115252,5.678269,0.0,0.0,0.0
+13,0.0,48.08919,142.5558,140.3777,154.7261,87.9361,58.11092,52.83869,67.14822,83.66798,118.9242,150.0681,272.9709,341.1366,238.664,190.2,116.8943,91.48672,14.0157,42.29277,5.115252,0.0,0.0,0.0
+14,0.0,54.1941,146.3839,99.48143,96.19411,102.9473,76.14089,57.7844,47.0402,64.36799,84.23767,162.7181,121.3275,213.1646,328.482,285.4489,283.8319,212.815,164.549,92.29631,7.244015,1.167,0.0,0.0
+15,0.0,6.919659,195.1709,132.5253,135.2341,89.85069,89.45549,60.29967,50.33806,39.17583,59.06854,74.52159,84.93402,187.1219,123.9673,103.7027,128.986,165.1283,249.7054,95.39966,10.00284,2.39255,0.0,0.0
+16,0.0,21.73871,123.1339,176.7414,158.2698,137.235,105.3089,86.63255,53.11591,29.03865,30.40539,39.04902,49.23405,63.27853,111.4215,101.1956,40.00962,59.84565,74.51253,17.06316,2.435141,2.287471,-0.0003636982,0.0
+17,0.0,0.0,62.04672,136.3122,201.7952,168.1343,95.2046,58.90624,46.94091,49.27053,37.10416,17.97011,30.93697,33.39257,44.03077,55.64542,78.22423,14.42782,9.954997,7.768213,13.0254,21.73166,2.156372,0.5317867
+18,0.0,0.0,79.62993,139.6978,173.167,192.8718,196.3499,144.6611,106.5424,57.16653,41.16107,32.12764,13.8566,10.91772,12.07177,22.38254,24.72105,6.803666,4.200841,16.46857,15.70744,33.96221,7.575688,-0.04880907
+19,0.0,0.0,33.2664,57.53643,167.2241,196.4833,194.7966,182.1884,119.6961,73.02113,48.36549,33.74652,26.2379,16.3578,6.811293,6.63927,6.639271,8.468093,6.194273,3.591233,3.81486,8.600739,5.21889,0.0
+20,0.0,0.0,29.77937,54.97282,144.7995,207.4904,165.3432,171.4047,174.9216,100.2733,61.46441,50.19171,26.08209,17.18218,8.468093,6.63927,6.334467,6.334467,5.666687,4.272203,0.0,0.0,0.0,0.0
+21,0.0,0.0,31.409,132.7418,185.5796,121.8299,185.3841,160.6566,116.1478,118.1078,141.7946,65.56351,48.84066,23.13864,18.12932,10.28531,6.029663,6.044627,5.694764,3.739085,3.896037,0.0,0.0,0.0
+22,0.0,0.0,19.58994,42.30355,96.26777,187.1207,179.6626,221.3898,154.2617,142.1604,148.5737,67.17937,40.69044,39.74512,26.10166,14.48469,8.65873,3.896037,3.571392,3.896037,3.896037,3.896037,1.077756,0.0
+23,0.001229679,3.008948,5.909858,33.50574,104.3341,152.2165,198.1988,191.841,228.7349,168.1041,144.2759,110.7436,57.65214,42.63504,27.91891,15.41052,8.056102,3.90283,3.879774,3.936718,3.968634,0.1236256,3.985531,-0.1835741
+24,0.0,5.626141,7.676256,63.16226,45.99762,79.56688,227.311,203.9287,172.5618,177.1462,140.4554,123.9905,110.346,65.12319,34.31887,24.5278,9.561069,3.334991,5.590495,5.487353,5.909499,5.868994,5.833817,3.568177

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 6 - 0
src/3d/plotly-latest.min.js


+ 4 - 0
src/App.vue

@@ -43,4 +43,8 @@
         color: #015B9E;
         border: 1px solid #015B9E;
     }
+    @font-face {
+        font-family: UnidreamLED;
+        src: url('assets/font/UnidreamLED.ttf');
+    }
 </style>

+ 6 - 0
src/assets/css/panel.css

@@ -396,6 +396,12 @@
 .yellow {
     color:#FFDD00 ;
 }
+.red {
+    color: red;
+}
+/deep/ .red {
+    color: red;
+}
 /deep/ .el-table__empty-text {
     color: #015B9E;
 }

+ 2 - 2
src/components/Console.vue

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

+ 1 - 1
src/components/Navside.vue

@@ -98,7 +98,7 @@
                 }).catch(() => {
                     this.$message({
                         type: 'info',
-                        message: '已取消删除'
+                        message: '已取消用户退出'
                     });
                 })
             }

+ 3 - 2
src/components/SingleEquipInfo.vue

@@ -198,11 +198,12 @@
 
     .timePart .lt p {
         width: 100%;
-        height: 83px;
+        height: 72px;
         overflow: hidden;
         display: block;
         margin: 0 auto;
-        font-size: 68px;
+        padding-top: 10px;
+        font-size: 60px;
         color: #6DC1FF;
         text-align: left;
         font-family: UniDreamLED;

+ 1 - 1
src/components/Total.vue

@@ -104,7 +104,7 @@
                     if (json.Code == 0) {
                         that.totalRs = json;
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + ',错误代码:' + json.Code);
                     }
                 })
             },

+ 1 - 1
src/components/WifiSign3.vue

@@ -124,7 +124,7 @@
                 // test end
                 this.chartData.rows = json.Rs;
                 //       } else {
-                //           that.$message.error(json.Memo);
+                //           that.$message.error(json.Memo + ',错误代码:' + json.Code);
                 //       }
                 //   })
             },

+ 15 - 0
src/router/index.js

@@ -104,6 +104,21 @@ const routes = [
                 meta: {
                     title: "no use",
                 }
+            }, {
+                path: '/3d',
+                name: '3d',
+                component: () => import('@/views/3d.vue'),
+                meta: {
+                    title: "no use",
+                }
+            },
+            {
+                path: '/3d2',
+                name: '3d2',
+                component: () => import('@/views/3d2.vue'),
+                meta: {
+                    title: "no use",
+                }
             }
             // ,{
             //     path: '/setting',

+ 98 - 0
src/views/3d.vue

@@ -0,0 +1,98 @@
+<template>
+    <div class="container">
+        <div id="bg_three"></div>
+    </div>
+</template>
+
+<script>
+    export default {
+        data() {
+            return {
+                camera: null,
+                scene: null,
+                renderer: null,
+                mesh: null,
+                stats: null,
+                size: 10,
+                res: 40,
+                sizeres: this.size * this.res,
+                halfsizeres: this.sizeres /2,
+                buffer1:[],
+                buffer2:[],
+                temp:null,
+                grid:[],
+                plane:null,
+                light:null,
+                geometry:null,
+                material:null,
+                mouse:null,
+                projector:null,
+                ray:null,
+                intersects:[],
+            }
+        },
+        mounted() {
+            this.init();
+            // this.animate()
+        },
+        methods: {
+            createDate() {
+                let randomData = [];
+                let x, y, z;
+                for (var i = 0; i < 50; i++) {
+                    for (var j = 0; j < 30; j++) {
+                        x = j;
+                        y = i;
+                        z = Math.random() * 100;
+                        randomData.push([x, y, z])
+                    }
+
+                }
+                return randomData
+            },
+            init: function () {
+                let container = document.getElementById('bg_three');
+                this.stats = new Stats();
+                this.stats.domElement.style.position = 'absolute';
+                this.stats.domElement.style.top = '0px';
+                for (var i = 0, l = res * res; i < l; i++) {
+                    this.buffer1[i] = 0;
+                    this.buffer2[i] = 0;
+                }
+
+
+
+
+
+                // this.camera = new Three.PerspectiveCamera(45, container.clientWidth / container.clientHeight, 0.01, 10)
+                // this.camera.position.z = 0.6
+                // this.scene = new Three.Scene()
+                // let geometry = new Three.BoxGeometry(0.2, 0.2, 0.2)
+                // let material = new Three.MeshNormalMaterial()
+                // this.mesh = new Three.Mesh(geometry, material)
+                // this.scene.add(this.mesh)
+                //
+                // this.renderer = new Three.WebGLRenderer({antialias: true})
+                // this.renderer.setSize(container.clientWidth, container.clientHeight)
+                // container.appendChild(this.renderer.domElement)
+            },
+            animate: function () {
+                requestAnimationFrame(this.animate)
+                this.mesh.rotation.x += 0.01
+                this.mesh.rotation.y += 0.02
+                this.renderer.render(this.scene, this.camera)
+            }
+        },
+    }
+</script>
+
+<style scoped>
+
+    #bg_three {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        height: 840px;
+    }
+</style>

+ 90 - 0
src/views/3d2.vue

@@ -0,0 +1,90 @@
+<template>
+    <div class="container">
+        <div id="main">
+            <H5>3D图</H5>
+            <div id="tester" style="width:600px;height:250px;"></div>
+        </div>
+    </div>
+</template>
+
+<script>
+    import Plotly from '../3d/plotly-latest.min'
+
+    export default {
+        mounted() {
+            this.init();
+        },
+        methods: {
+            init() {
+                // let TESTER = document.getElementById('tester');
+                // Plotly.newPlot( TESTER, [{
+                //     x: [1, 2, 3, 4, 5],
+                //     y: [1, 2, 4, 8, 16] }], {
+                //     margin: { t: 0 } } );
+
+
+                // Plotly.d3.csv('https://raw.githubusercontent.com/plotly/datasets/master/api_docs/mt_bruno_elevation.csv', function (err, rows) {
+                // Plotly.d3.csv('http://sdzhsh/mt_bruno_elevation.csv', function (err, rows) {
+                //     function unpack(rows, key) {
+                //         return rows.map(function (row) {
+                //             return row[key];
+                //         });
+                //     }
+
+                var z_data = [];
+                var t = 0;
+                var t1 = 0;
+                var t2 = 0;
+                var t3 = 0;
+                for (var i = 0; i < 24; i++) {
+                    // z_data.push(unpack(rows, i));
+                    t = parseInt(Math.random()*100);
+                    t1 = parseInt(Math.random()*100);
+                    t2 = parseInt(Math.random()*100);
+                    t3 = parseInt(Math.random()*100);
+                    z_data.push(
+                        [t1, t, t, t3, t, t, t, t2, t3, t, t, t, t2, t3, t, t, t, t2],
+                    )
+                }
+
+                var data = [{
+                    z: z_data,
+                    type: 'surface'
+                }];
+
+                var layout = {
+                    title: '',
+                    autosize: false,
+                    width: 960,
+                    height: 600,
+                    margin: {
+                        l: 15,
+                        r: 10,
+                        b: 15,
+                        t: 10,
+                    }
+                };
+                Plotly.newPlot('tester', data, layout);
+                // });
+            }
+        }
+    }
+</script>
+
+<style scoped>
+    #main {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        height: 840px;
+    }
+
+    #bg_three {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        height: 840px;
+    }
+</style>

+ 127 - 0
src/views/3d3.vue

@@ -0,0 +1,127 @@
+<template>
+    <div class="container">
+        <div id="main">
+
+        </div>
+    </div>
+</template>
+
+<script>
+    import echarts from 'echarts'
+    import 'echarts-gl'
+    import Vue from 'vue'
+
+    Vue.prototype.$echarts = echarts;
+
+    export default {
+        mounted() {
+            // let randomData = [];
+
+            let randomData = [];
+            randomData = this.createDate();
+            this.createChart(randomData);
+            setInterval(() => {
+                randomData = this.createDate();
+                // this.createChart(randomData);
+            },3000);
+        },
+        methods: {
+            createDate(){
+                let randomData = [];
+                let x, y, z;
+                for (var i = 0; i < 50; i++) {
+                    // x = Math.random() * 100;
+                    // y = Math.random() * 100;
+                    // // x =  i;
+                    // // y =  i;
+                    // z = Math.random() * 100;
+                    for(var j = 0; j < 30; j++) {
+                        x = j;
+                        y = i;
+                        z = Math.random() * 100;
+                        randomData.push([x, y, z])
+                    }
+
+                }
+                return randomData
+            },
+            createChart(randomData) {
+
+                // 基于准备好的dom,初始化echarts实例
+                var myChart = echarts.init(document.getElementById('main'));
+// 绘制图表
+                myChart.setOption({
+                    title: {
+                        text: 'ECharts 入门示例'
+                    },
+                    visualMap: {
+                        show: false,
+                        min: 2,
+                        max: 100,
+                        inRange: {
+                            color: ['#313695', '#4575b4', '#74add1', '#abd9e9', '#e0f3f8', '#ffffbf', '#fee090', '#fdae61', '#f46d43', '#d73027', '#a50026']
+                        }
+                    },
+                    xAxis3D: {
+                        type: 'value',
+                    },
+                    yAxis3D: {
+                        type: 'value'
+                    },
+                    zAxis3D: {
+                        type: 'value',
+                        max: 100,
+                        min: 0
+                    },
+                    grid3D: {
+                        // show:false,
+                        axisLine: {
+                            lineStyle: {color: '#fff'}
+                        },
+                        axisPointer: {
+                            lineStyle: {color: '#fff'}
+                        },
+                        viewControl: {
+                            autoRotate: false
+                        },
+                        light: {
+                            main: {
+                                shadow: true,
+                                quality: 'ultra',
+                                intensity: 1.5
+                            }
+                        }
+                    },
+                    series: [{
+                        type: 'bar3D',
+                        // data: [[0, 0, 3], [0, 1, 3.57], [0, 2, 4.57]],
+                        data: randomData,
+                        shading: 'lambert',
+                        label: {
+                            formatter: function (param) {
+                                return param.value[2].toFixed(1);
+                            }
+                        }
+                    }]
+                });
+            }
+        }
+    }
+</script>
+
+<style scoped>
+    #main {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        height: 840px;
+    }
+    #bg_three {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        height: 840px;
+    }
+</style>

+ 1 - 1
src/views/Basic.vue

@@ -74,7 +74,7 @@
                             type: 'success'
                         });
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + ',错误代码:' + json.Code);
                     }
                 })
             },

+ 48 - 38
src/views/Equip.vue

@@ -85,21 +85,25 @@
             <el-table-column
                     prop="FirmwareVersion"
                     label="软件版本"
+                    sortable
             >
             </el-table-column>
             <el-table-column
                     prop="HardwareVersion"
                     label="硬件版本"
+                    sortable
             >
             </el-table-column>
             <el-table-column
                     prop="LastOnline"
                     label="最近上线"
+                    sortable
             >
             </el-table-column>
             <el-table-column
                     prop="Dayfind"
                     label="当日报警"
+                    sortable
             >
             </el-table-column>
             <el-table-column
@@ -110,13 +114,14 @@
             <el-table-column
                     prop="Status"
                     label="状态"
+                    sortable
             >
                 <template slot-scope="scope">
-                    <span v-if="scope.row.Status == 0">已禁用</span>
+                    <span class="red" 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>
+                    <span class="red" v-if="scope.row.Status == 2">已离线</span>
+                    <span class="yellow" v-if="scope.row.Status == 3">已返厂</span>
+                    <span class="red" v-if="scope.row.Status == 4">已离线</span>
                 </template>
             </el-table-column>
             <el-table-column
@@ -167,28 +172,28 @@
                         <el-input v-model="dialog.tagname"></el-input>
                     </el-col>
                     <!--<el-col :span="12">-->
-                        <!--<label>-->
-                            <!--硬件版本-->
-                        <!--</label>-->
-                        <!--<el-input v-model="dialog.HardwareVersion"></el-input>-->
+                    <!--<label>-->
+                    <!--硬件版本-->
+                    <!--</label>-->
+                    <!--<el-input v-model="dialog.HardwareVersion"></el-input>-->
                     <!--</el-col>-->
                     <!--<el-col :span="12">-->
-                        <!--<label>-->
-                            <!--esp固件版本-->
-                        <!--</label>-->
-                        <!--<el-input v-model="dialog.FirmwareVersion"></el-input>-->
+                    <!--<label>-->
+                    <!--esp固件版本-->
+                    <!--</label>-->
+                    <!--<el-input v-model="dialog.FirmwareVersion"></el-input>-->
                     <!--</el-col>-->
                     <!--<el-col :span="12">-->
-                        <!--<label>-->
-                            <!--M4固件版本-->
-                        <!--</label>-->
-                        <!--<el-input v-model="dialog.FirmwareScanM4Version"></el-input>-->
+                    <!--<label>-->
+                    <!--M4固件版本-->
+                    <!--</label>-->
+                    <!--<el-input v-model="dialog.FirmwareScanM4Version"></el-input>-->
                     <!--</el-col>-->
                     <!--<el-col :span="12">-->
-                        <!--<label>-->
-                            <!--M0固件版本-->
-                        <!--</label>-->
-                        <!--<el-input v-model="dialog.FirmwareScanM0Version"></el-input>-->
+                    <!--<label>-->
+                    <!--M0固件版本-->
+                    <!--</label>-->
+                    <!--<el-input v-model="dialog.FirmwareScanM0Version"></el-input>-->
                     <!--</el-col>-->
                     <el-col :span="12">
                         <label>
@@ -309,9 +314,9 @@
                     time1: globalBt3(2),
                 },
                 pageination: {
-                    pageItem: 10,
+                    pageItem: 100,
                     pageoptions: pageOptions(),
-                    total: 300,
+                    total: 500,
                     pageIndex: 1,
                 },
                 draw: 1,
@@ -345,8 +350,8 @@
                 // 查询检测设备。上级区域id,区域id必传。regionid传0,查询supregionid对应所有子区域的检测设备。 如果supregionid,regionid都传0,默认查询企业ID下所有检测设备
                 let param = {
                     token: localStorage.token,
-                    supregionid: 0,//
-                    regionid: this.panel.regionid,//
+                    supregionid: this.panel.regionid,//
+                    regionId: 0,//
                     comid: 1,//
                     tagname: that.panel.tagname,//标签名
                     start: 1,//
@@ -364,11 +369,10 @@
                             that.allTableData = [];
                             that.recordsTotal = 0;
                         }
-
                         // 设置分页数据
                         that.setPaginations();
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + ',错误代码:' + json.Code);
                     }
                 })
             },
@@ -389,7 +393,7 @@
                         that.panel.regionidOptions = json.Rs;
                         that.panel.regionidOptions.unshift({Id: 0, Name: "全部", DisplayName: "全部"});
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + ',错误代码:' + json.Code);
                     }
                 })
             },
@@ -406,7 +410,7 @@
                         that.dialog.regionlevelOneIdOptions = json.Rs;
                         that.dialog.regionId = json.Rs[0].Id;
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + ',错误代码:' + json.Code);
                     }
                 })
             },
@@ -422,7 +426,7 @@
                     let json = res;
                     if (json.Code == 0) {
                         if (level == 1) {
-                            console.log( json.Rs);
+                            console.log(json.Rs);
                             that.dialog.regionlevelOneIdOptions = json.Rs;
                             that.dialog.regionlevelOneId = regionId;
                         } else {
@@ -436,7 +440,7 @@
                             }
                         }
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + ',错误代码:' + json.Code);
                     }
                 })
             },
@@ -470,7 +474,7 @@
                     return index < that.pageination.pageItem;
                 });
                 that.draw = that.pageination.pageItem;
-                that.getTableQuery();
+                // that.getTableQuery();
             },
             // 翻页
             pageChange(pageIndex) {
@@ -488,7 +492,7 @@
                     this.tableData = tables;
                 }
                 that.start = index * that.draw;
-                that.getTableQuery();
+                // that.getTableQuery();
             },
             // 自动排序
             sortChange(params) {
@@ -561,7 +565,7 @@
                             that.getTableQuery();
                             that.dialog_state = false;
                         } else {
-                            that.$message.error(json.Memo);
+                            that.$message.error(json.Memo + ',错误代码:' + json.Code);
                         }
                     });
                 }).catch(() => {
@@ -631,7 +635,7 @@
                             that.dialog.CoordsId = 0;
                         }
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + ',错误代码:' + json.Code);
                     }
                 })
             },
@@ -736,7 +740,7 @@
                         that.dialog_state = false;
 
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + ',错误代码:' + json.Code);
                     }
                 });
             },
@@ -801,7 +805,7 @@
                         that.dialog_state = false;
 
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + ',错误代码:' + json.Code);
                     }
                 });
             },
@@ -825,7 +829,7 @@
                         // table 重载
                         that.getTableQuery();
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + ',错误代码:' + json.Code);
                     }
                 })
             },
@@ -860,7 +864,7 @@
                     if (json.Code == 0) {
                         that.dialog.plateImgSrc = json.EncodeString;
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + ',错误代码:' + json.Code);
                     }
                 })
             },
@@ -1005,4 +1009,10 @@
     /deep/ .el-input.is-disabled .el-input__inner {
         background-color: #015B9E;
     }
+    .red {
+        color: red;
+    }
+    .yellow {
+        color: #fd0;
+    }
 </style>

+ 37 - 27
src/views/Hardware.vue

@@ -59,9 +59,9 @@
                 <!--<el-button size="small" type="primary" @click="startUpdate">开始更新</el-button>-->
                 <div class="version">
                     <em>NEW </em>
-                    <span>最新固件版本:M0固件:v{{FirmwareScanM0Version}}</span>
-                    <span>M4固件: v{{FirmwareScanM4Version}}</span>
-                    <span>ESP固件 :v{{FirmwareVersion}}</span>
+                    <span>最新固件版本: M0固件:v{{FirmwareScanM0Version}}  </span>
+                    <span>M4固件: v{{FirmwareScanM4Version}}  </span>
+                    <span>ESP固件 v{{FirmwareVersion}}  </span>
                 </div>
                 <!--<el-tooltip class="item" effect="dark" content="一键更新全部设备固件" placement="top">-->
                 <!--<i class="question"></i>-->
@@ -121,26 +121,31 @@
                 <el-table-column
                         prop="FirmwareVersion"
                         label="ESP固件"
+                        sortable
                 >
                 </el-table-column>
                 <el-table-column
                         prop="HardwareVersion"
                         label="硬件版本"
+                        sortable
                 >
                 </el-table-column>
                 <el-table-column
                         prop="FirmwareScanM4Version"
                         label="M4固件版本"
+                        sortable
                 >
                 </el-table-column>
                 <el-table-column
                         prop="FirmwareScanM0Version"
                         label="M0固件版本"
+                        sortable
                 >
                 </el-table-column>
                 <el-table-column
                         prop="LastOnline"
                         label="最近上线"
+                        sortable
                 >
                 </el-table-column>
                 <el-table-column
@@ -151,13 +156,14 @@
                 <el-table-column
                         prop="Status"
                         label="状态"
+                        sortable
                 >
                     <template slot-scope="scope">
-                        <span v-if="scope.row.Status == 0">已禁用</span>
+                        <span class="red" 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>
+                        <span class="red" v-if="scope.row.Status == 2">已离线</span>
+                        <span class="yellow" v-if="scope.row.Status == 3">已返厂</span>
+                        <span class="red" v-if="scope.row.Status == 4">已离线</span>
                     </template>
                 </el-table-column>
             </el-table>
@@ -217,8 +223,10 @@
         GetChildRegionSelect,
         GetLastVerionFirmwareinfo,
         RegionPictureGetByRegionId,
+        getGeFullRegionSelect,
         FirmwareAdd,
     } from '../api/getApiRes.js'
+    import {GeFullRegionSelect} from "../api/getApiRes";
 
     let qs = require('qs');
     export default {
@@ -303,8 +311,8 @@
                 // 查询检测设备。上级区域id,区域id必传。regionid传0,查询supregionid对应所有子区域的检测设备。 如果supregionid,regionid都传0,默认查询企业ID下所有检测设备
                 let param = {
                     token: localStorage.token,
-                    supregionid: 0,//
-                    regionid: this.panel.regionid,//
+                    supregionid: this.panel.regionid,//
+                    regionId: 0,//
                     comid: 1,//
                     tagname: that.panel.tagname,//标签名
                     start: 1,//
@@ -326,7 +334,7 @@
                         // 设置分页数据
                         that.setPaginations();
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + ',错误代码:' + json.Code);
                     }
                 })
             },
@@ -343,7 +351,7 @@
                         that.FirmwareScanM4Version = json.FirmwareScanM4Version;
                         that.FirmwareVersion = json.FirmwareVersion;
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + ',错误代码:' + json.Code);
                     }
                 })
             },
@@ -352,27 +360,19 @@
                 let that = this;
                 let param = {
                     token: localStorage.token,
-                    regionId: regionId,
                 };
                 let postdata = qs.stringify(param);
-                GetChildRegionSelect(postdata).then(res => {
+                GeFullRegionSelect(postdata).then(res => {
                     let json = res;
                     if (json.Code == 0) {
-                        if (level == 1) {
-                            that.panel.regionidOptions = json.Rs;
-                            that.panel.regionidOptions.unshift({Id: 0, Name: "全部"});
-                        } else {
-                            if (json.Rs) {
-                                that.panel.regionidOptions2 = json.Rs;
-                                that.panel.regionid2 = json.Rs[0].Id;
-                            } else {
-                                that.panel.regionidOptions2 = [];
-                                that.panel.regionid2 = '';
-                            }
-
+                        if (!json.Rs) {
+                            that.$message.error('区域列表为空,请先添加有效区域');
+                            return false
                         }
+                        that.panel.regionidOptions = json.Rs;
+                        that.panel.regionidOptions.unshift({Id: 0, Name: "全部", DisplayName: "全部"});
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + ',错误代码:' + json.Code);
                     }
                 })
             },
@@ -383,6 +383,7 @@
             // 查询按钮
             query() {
                 this.getTableQuery();
+                this.getGetLastVerionFirmwareinfo();
                 this.$message.success('查询完毕');
             },
             handleSelectionChange(val) {
@@ -392,7 +393,10 @@
             successResave(response) {
                 if (response.Code == 0) {
                     this.$message.success('上传成功,等待系统自动更新中....');
+                    // 列表重载
                     this.getTableQuery();
+                    // 版本重载
+                    this.getGetLastVerionFirmwareinfo();
                 } else {
                     this.$message.error(response.Memo);
                 }
@@ -523,7 +527,7 @@
                         // 关闭弹窗
                         that.dialog_state = false;
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + ',错误代码:' + json.Code);
                     }
                 })
             },
@@ -732,4 +736,10 @@
         width: 160px;
         float: left;
     }
+    .red {
+        color: red;
+    }
+    .yellow {
+        color: #fd0;
+    }
 </style>

+ 11 - 9
src/views/Login.vue

@@ -80,7 +80,7 @@
                         that.form.picId = json.Id;
                         this.validImgState = false;
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + ',错误代码:' + json.Code);
                     }
                 })
             },
@@ -155,7 +155,7 @@
                         } else {
                             that.$notify({
                                 title: '警告',
-                                message: res.Memo,
+                                message: res.Memo + ',错误代码:' + res.Code,
                                 type: 'warning'
                             });
                             that.form.valid = '';
@@ -270,14 +270,16 @@
         text-align: center;
         color: #6DC1FF;
     }
+
     /*响应式调整*/
 
-        @media (min-width:481px) and (max-width: 1537px) {
-            .box-card {
-                height: 399px;
-            }
-            .center {
-                margin-top: 5px;
-            }
+    @media (min-width: 481px) and (max-width: 1537px) {
+        .box-card {
+            height: 399px;
         }
+
+        .center {
+            margin-top: 5px;
+        }
+    }
 </style>

+ 14 - 14
src/views/Main.vue

@@ -242,7 +242,7 @@
                     if (json.Code == 0) {
                         that.ScanRs = json;
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + ',错误代码:' + json.Code);
                     }
                 })
             },
@@ -253,7 +253,7 @@
                     if (json.Code == 0) {
                         that.ScanRs = json;
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + ',错误代码:' + json.Code);
                     }
                 })
             },
@@ -266,7 +266,7 @@
                         that.historyRs = json;
                         // localStorage.Start = json.LastId;
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + ',错误代码:' + json.Code);
                     }
                 })
             },
@@ -279,7 +279,7 @@
                         that.historyRs = json;
                         // localStorage.Start = json.LastId;
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + ',错误代码:' + json.Code);
                     }
                 })
             },
@@ -291,7 +291,7 @@
                         that.totalRs = json;
                         localStorage.Start = json.LastId;
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + ',错误代码:' + json.Code);
                     }
                 })
             },
@@ -302,13 +302,13 @@
                     if (json.Code == 0) {
                         that.equipRs = json;
                     } else {
-                        if(json.Code == 1010){
+                        if (json.Code == 1010) {
                             localStorage.usercode = '';
                             localStorage.token = '';
                             that.$router.push({path: '/login', query: {status: 1}});
                             return false
                         }
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + ',错误代码:' + json.Code);
                     }
                 })
             },
@@ -320,7 +320,7 @@
                         that.totalRs = json;
                         localStorage.Start = json.LastId;
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + ',错误代码:' + json.Code);
                     }
                 })
             },
@@ -331,7 +331,7 @@
                     if (json.Code == 0) {
                         that.historyRs = json;
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + ',错误代码:' + json.Code);
                     }
                 })
             },
@@ -342,7 +342,7 @@
                     if (json.Code == 0) {
                         that.historyRs = json;
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + ',错误代码:' + json.Code);
                     }
                 })
             },
@@ -355,7 +355,7 @@
                     if (json.Code == 0) {
                         that.WifiRs = json;
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + ',错误代码:' + json.Code);
                     }
                 })
             },
@@ -367,7 +367,7 @@
                     if (json.Code == 0) {
                         that.WifiRs = json;
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + ',错误代码:' + json.Code);
                     }
                 })
             },
@@ -380,7 +380,7 @@
                     if (json.Code == 0) {
                         that.loftMap = json.EncodeString;
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + ',错误代码:' + json.Code);
                     }
                 });
                 // 点
@@ -390,7 +390,7 @@
                         that.loftTitle = json.Rs.Region.Name;
                         that.loftPoints = json.Rs.DetAndFindRs;
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + ',错误代码:' + json.Code);
                     }
                 });
 

+ 26 - 7
src/views/PhoneSign.vue

@@ -68,18 +68,21 @@
             <el-table-column
                     prop="Operator"
                     label="信道"
+                    sortable
                     width="120"
             >
             </el-table-column>
             <el-table-column
                     prop="Wwan"
                     label="通信方式"
+                    sortable
                     width="120"
             >
             </el-table-column>
             <el-table-column
                     prop="SignalIntensity"
                     label="信号强度"
+                    sortable
                     width="140"
             >
             </el-table-column>
@@ -100,7 +103,7 @@
                     label="运行时间"
             >
                 <template slot-scope="scope">
-                    {{scope.row.BeginTime|filterFmtDate}} ---   {{scope.row.EndTime|filterFmtDate}}
+                    {{scope.row.BeginTime|filterFmtDate}} --- {{scope.row.EndTime|filterFmtDate}}
                 </template>
             </el-table-column>
             <el-table-column
@@ -109,7 +112,7 @@
                     width="120"
             >
                 <template slot-scope="scope">
-                    <span  v-if="scope.row.DangerLevel == -1">正常</span>
+                    <span v-if="scope.row.DangerLevel == -1">正常</span>
                     <span v-if="scope.row.DangerLevel == 1">白名单</span>
                     <span v-if="scope.row.DangerLevel == 2">已处理</span>
                     <span class="yellow" v-if="scope.row.DangerLevel == 3">危险</span>
@@ -187,6 +190,10 @@
             }
         },
         mounted() {
+            if (this.$route.query.detectorid) {
+                this.panel.detidstr = parseInt(this.$route.query.detectorid);
+            }
+            this.getDetOption();
             this.getTableQuery();
         },
         methods: {
@@ -204,9 +211,14 @@
                             return false
                         }
                         this.panel.detOptions = json.DectectorRs;//所有设备
-                        this.panel.detOptions.push({Id: 0, Name: '全部'})
+                        this.panel.detOptions.push({Id: 0, Name: '全部'});
+                        if (this.$route.query.detectorid) {
+                            this.panel.detidstr = parseInt(this.$route.query.detectorid)
+                        } else {
+                            this.panel.detidstr = 0;
+                        }
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + ',错误代码:' + json.Code);
                     }
                 })
             },
@@ -222,7 +234,6 @@
             // 页面数据查询
             getTableQuery() {
                 // 获取探测器列表
-                this.getDetOption();
                 let that = this;
                 that.loading = true;
                 let param = {
@@ -249,7 +260,7 @@
                         // 设置分页数据
                         that.setPaginations();
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + ',错误代码:' + json.Code);
                     }
                 })
             },
@@ -308,7 +319,14 @@
                 return parseFloat(column).toFixed(2);
             },
         },
-        filters:{
+        watch: {
+            // call again the method if the route changes
+            '$route': function () {
+                this.getDetOption();
+                this.getTableQuery();
+            }
+        },
+        filters: {
             // 过滤时间
             filterFmtDate(column) {
                 return nonTfmtDate(column, 16);
@@ -336,6 +354,7 @@
         margin: 0 auto;
         padding-left: 20px;
     }
+
     /deep/ .el-table__empty-text {
         color: #015B9E;
     }

+ 1 - 1
src/views/Poster.vue

@@ -295,7 +295,7 @@
                             localStorage.result = JSON.stringify(json);
                         }
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + ',错误代码:' + json.Code);
                     }
                 })
             },

+ 3 - 3
src/views/Pwd.vue

@@ -124,7 +124,7 @@
                         that.form.picId = json.Id;
                         this.validImgState = false;
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + ',错误代码:' + json.Code);
                     }
                 })
             },
@@ -180,7 +180,7 @@
                         that.again = '';
                         that.logoutPage();
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + ',错误代码:' + json.Code);
                     }
                 });
             },
@@ -201,7 +201,7 @@
                             }
                         })
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + ',错误代码:' + json.Code);
                     }
                 })
             }

+ 27 - 9
src/views/Qrcodemanage.vue

@@ -76,6 +76,7 @@
             <el-table-column
                     prop="CreateTime"
                     label="创建时间"
+                    sortable
                     width="180">
                 <template slot-scope="scope">
                     {{scope.row.CreateTime |fmtDate}}
@@ -85,6 +86,9 @@
                     prop="Frequency"
                     label="有效时长(分钟)"
             >
+                <template slot-scope="scope">
+                    {{scope.row.Frequency |fmtTimeStr}}
+                </template>
             </el-table-column>
             <el-table-column
                     prop="DetIdStr"
@@ -116,8 +120,12 @@
                 <template slot-scope="scope">
                     <el-button class="control_btn" type="text" @click="goPoster(scope.row)">海报</el-button>
                     <el-button class="control_btn" type="text" @click="goQrcode(scope.row)">二维码</el-button>
-                    <el-button class="control_btn red" type="text" v-if="scope.row.State == 1" @click="pauseQrcode(scope.row)">禁用</el-button>
-                    <el-button class="control_btn green" type="text" v-if="scope.row.State == 0" @click="runQrcode(scope.row)">启用</el-button>
+                    <el-button class="control_btn red" type="text" v-if="scope.row.State == 1"
+                               @click="pauseQrcode(scope.row)">禁用
+                    </el-button>
+                    <el-button class="control_btn green" type="text" v-if="scope.row.State == 0"
+                               @click="runQrcode(scope.row)">启用
+                    </el-button>
                 </template>
             </el-table-column>
         </el-table>
@@ -347,7 +355,7 @@
             handleImgbefore(file) {
                 this.dialog.image = file;
                 this.dialog.imgSrc = '';
-                if(file.size > 376396){
+                if (file.size > 376396) {
                     this.$message.error('图片容量过大,请选择小于4M的容量重新上传');
                     return false
                 }
@@ -407,7 +415,7 @@
                         // 设置分页数据
                         that.setPaginations();
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + ',错误代码:' + json.Code);
                     }
                 })
             },
@@ -504,7 +512,7 @@
                             that.getTableQuery();
                             that.dialog_state = false;
                         } else {
-                            that.$message.error(json.Memo);
+                            that.$message.error(json.Memo + ',错误代码:' + json.Code);
                         }
                     });
                 }).catch(() => {
@@ -657,7 +665,7 @@
                         that.getTableQuery()
 
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + ',错误代码:' + json.Code);
                     }
                 });
 
@@ -754,7 +762,7 @@
                         that.getTableQuery()
 
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + ',错误代码:' + json.Code);
                     }
                 });
 
@@ -785,7 +793,7 @@
                             });
                             that.getTableQuery();
                         } else {
-                            that.$message.error(json.Memo);
+                            that.$message.error(json.Memo + ',错误代码:' + json.Code);
                         }
                     })
 
@@ -819,7 +827,7 @@
                             });
                             that.getTableQuery();
                         } else {
-                            that.$message.error(json.Memo);
+                            that.$message.error(json.Memo + ',错误代码:' + json.Code);
                         }
                     })
 
@@ -866,6 +874,13 @@
                     res = new Date(+new Date(value) + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '');
                     return res;
                 }
+            },
+            fmtTimeStr: function (value) {
+                if (!value || value == 0) {
+                    return '无限期';
+                } else {
+                    return value;
+                }
             }
         }
         ,
@@ -966,9 +981,11 @@
         float: left;
         margin-left: 30px;
     }
+
     /deep/ .el-table__empty-text {
         color: #015B9E;
     }
+
     .detList {
         width: 100%;
         overflow: hidden;
@@ -977,6 +994,7 @@
         height: 220px;
         overflow-y: scroll;
     }
+
     .detList::-webkit-scrollbar { /*滚动条整体样式*/
 
         width: 10px; /*高宽分别对应横竖滚动条的尺寸*/

+ 8 - 8
src/views/Region.vue

@@ -220,7 +220,7 @@
                             that.seeFirstLoft(Name, Id)
                         }
                     } else {
-                        this.$message.error(json.Memo);
+                        this.$message.error(json.Memo + ',错误代码:' + json.Code);
                     }
                 })
             },
@@ -237,7 +237,7 @@
                     if (json.Code == 0) {
                         that.loftList = json.Rs;
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + ',错误代码:' + json.Code);
                     }
                 })
             },
@@ -311,7 +311,7 @@
                             // 重载
                             that.getDate(2);
                         } else {
-                            that.$message.error(json.Memo);
+                            that.$message.error(json.Memo + ',错误代码:' + json.Code);
                         }
                     });
                 }).catch(() => {
@@ -360,7 +360,7 @@
                         // 重载tree
                         that.getDate(2);
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + ',错误代码:' + json.Code);
                     }
                 })
             },
@@ -405,7 +405,7 @@
                         that.getDate(2);
 
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + ',错误代码:' + json.Code);
                     }
                 });
 
@@ -550,7 +550,7 @@
                     if (json.Code == 0) {
                         that.dialog.description = json.Rs.Region.Description
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + ',错误代码:' + json.Code);
                     }
                 })
             },
@@ -567,7 +567,7 @@
                     if (json.Code == 0) {
                         that.plateImgSrc = json.EncodeString
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + ',错误代码:' + json.Code);
                     }
                 })
             },
@@ -584,7 +584,7 @@
                     if (json.Code == 0) {
                         that.dialog.imgSrc = json.EncodeString;
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + ',错误代码:' + json.Code);
                     }
                 })
             }

+ 23 - 4
src/views/WifiSign.vue

@@ -103,6 +103,7 @@
                     prop="SignalIntensity"
                     label="信号强度"
                     :formatter="filterSignal"
+                    sortable
                     width="120"
             >
             </el-table-column>
@@ -118,6 +119,7 @@
                     prop="DeviceType"
                     label="信号类型"
                     width="120"
+                    sortable
                     :formatter="filterDeviceType"
             >
             </el-table-column>
@@ -125,6 +127,7 @@
                     prop="DangerLevel"
                     label="危险等级"
                     width="120"
+                    sortable
             >
                 <template slot-scope="scope">
                     <span  v-if="scope.row.DangerLevel == -1">正常</span>
@@ -238,9 +241,13 @@
                         }
                         this.panel.detOptions = json.DectectorRs;//所有设备
                         this.panel.detOptions.unshift({Id: 0, Name: '全部'});
-
+                        if (this.$route.query.detectorid) {
+                            this.panel.detidstr = parseInt(this.$route.query.detectorid)
+                        } else {
+                            this.panel.detidstr = 0;
+                        }
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + ',错误代码:' + json.Code);
                     }
                 })
             },
@@ -259,6 +266,11 @@
                 this.getDetOption();
                 let that = this;
                 that.loading = true;
+                if (this.$route.query.detectorid) {
+                    this.panel.detidstr = parseInt(this.$route.query.detectorid)
+                } else {
+                    this.panel.detidstr = 0;
+                }
                 let param = {
                     token: localStorage.token,
                     detectorId: that.panel.detidstr,//探测器id列表
@@ -285,7 +297,7 @@
                         // 设置分页数据
                         that.setPaginations();
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + ',错误代码:' + json.Code);
                     }
                 })
             },
@@ -382,7 +394,7 @@
                                 message: '当前设备已加入白名单中'
                             });
                         } else {
-                            that.$message.error(json.Memo);
+                            that.$message.error(json.Memo + ',错误代码:' + json.Code);
                         }
                     });
                     return false
@@ -395,6 +407,13 @@
                 });
             }
         },
+        watch: {
+            // call again the method if the route changes
+            '$route': function () {
+                this.getDetOption();
+                this.getTableQuery();
+            }
+        },
         filters: {
             // 过滤时间
             filterFmtDate(column) {

+ 3 - 2
src/views/white.vue

@@ -73,6 +73,7 @@
             <el-table-column
                     prop="CreateTime"
                     label="标注时间"
+                    sortable
             >
                 <template slot-scope="scope">
                     {{scope.row.CreateTime |fmtDate}}
@@ -206,7 +207,7 @@
                         // 设置分页数据
                         that.setPaginations();
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + ',错误代码:' + json.Code);
                     }
                 })
             },
@@ -281,7 +282,7 @@
                             });
                             that.getTableQuery();
                         } else {
-                            that.$message.error(json.Memo);
+                            that.$message.error(json.Memo + ',错误代码:' + json.Code);
                         }
                     })
                 }).catch(() => {

Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů