Jelajahi Sumber

Merge branch 'dev' of http://code.dashoo.cn/dashoo/labsop_mcs into dev

# Conflicts:
#	backend/src/dashoo.cn/mcs_api/business/device/deviceService.go
#	backend/src/dashoo.cn/mcs_api/controllers/equipment.go
#	frontend_sa/yarn.lock
sunmiao 4 tahun lalu
induk
melakukan
358d0df79d

+ 236 - 6
frontend_web/package-lock.json

@@ -60,6 +60,14 @@
         }
       }
     },
+    "aes-decrypter": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npm.taobao.org/aes-decrypter/download/aes-decrypter-1.0.3.tgz?cache=0&sync_timestamp=1610483565721&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Faes-decrypter%2Fdownload%2Faes-decrypter-1.0.3.tgz",
+      "integrity": "sha1-nAa4pUNaWtCduTP4oBSvzxhMw04=",
+      "requires": {
+        "pkcs7": "^0.2.3"
+      }
+    },
     "ajv": {
       "version": "4.11.8",
       "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz",
@@ -3005,6 +3013,11 @@
         }
       }
     },
+    "dom-walk": {
+      "version": "0.1.2",
+      "resolved": "https://registry.npm.taobao.org/dom-walk/download/dom-walk-0.1.2.tgz",
+      "integrity": "sha1-DFSL7wSPTR8qlySQAiNgYNqj/YQ="
+    },
     "domain-browser": {
       "version": "1.2.0",
       "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz",
@@ -3222,6 +3235,11 @@
         "es6-symbol": "~3.1.1"
       }
     },
+    "es5-shim": {
+      "version": "4.5.15",
+      "resolved": "https://registry.npm.taobao.org/es5-shim/download/es5-shim-4.5.15.tgz?cache=0&sync_timestamp=1609857992732&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fes5-shim%2Fdownload%2Fes5-shim-4.5.15.tgz",
+      "integrity": "sha1-aiaGmyYYVKOwRSc/VYPFLTkCF/4="
+    },
     "es6-iterator": {
       "version": "2.0.3",
       "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz",
@@ -4637,6 +4655,15 @@
         }
       }
     },
+    "global": {
+      "version": "4.4.0",
+      "resolved": "https://registry.npm.taobao.org/global/download/global-4.4.0.tgz",
+      "integrity": "sha1-PnsQUXkAajI+1xqvyj6cV6XMZAY=",
+      "requires": {
+        "min-document": "^2.19.0",
+        "process": "^0.11.10"
+      }
+    },
     "globals": {
       "version": "9.18.0",
       "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz",
@@ -5145,6 +5172,11 @@
       "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=",
       "dev": true
     },
+    "individual": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npm.taobao.org/individual/download/individual-2.0.0.tgz",
+      "integrity": "sha1-gzsJfa0jKU52EXqY+zjg2a1hu5c="
+    },
     "inflight": {
       "version": "1.0.6",
       "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
@@ -5354,6 +5386,11 @@
         "number-is-nan": "^1.0.0"
       }
     },
+    "is-function": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npm.taobao.org/is-function/download/is-function-1.0.2.tgz",
+      "integrity": "sha1-Twl/MKv2762smDOxfKXcA/gUTgg="
+    },
     "is-glob": {
       "version": "4.0.0",
       "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz",
@@ -5869,6 +5906,11 @@
         "yallist": "^2.1.2"
       }
     },
+    "m3u8-parser": {
+      "version": "2.1.0",
+      "resolved": "https://registry.nlark.com/m3u8-parser/download/m3u8-parser-2.1.0.tgz",
+      "integrity": "sha1-yBcDKewc1RXQ1Yu4t2LamJbLA2g="
+    },
     "macaddress": {
       "version": "0.2.8",
       "resolved": "https://registry.npmjs.org/macaddress/-/macaddress-0.2.8.tgz",
@@ -6062,6 +6104,14 @@
       "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==",
       "dev": true
     },
+    "min-document": {
+      "version": "2.19.0",
+      "resolved": "https://registry.npm.taobao.org/min-document/download/min-document-2.19.0.tgz",
+      "integrity": "sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU=",
+      "requires": {
+        "dom-walk": "^0.1.0"
+      }
+    },
     "minimalistic-assert": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz",
@@ -6180,6 +6230,11 @@
       "integrity": "sha1-j7+rsKmKJT0xhDMfno3rc3L6xsA=",
       "dev": true
     },
+    "mux.js": {
+      "version": "4.3.2",
+      "resolved": "https://registry.npm.taobao.org/mux.js/download/mux.js-4.3.2.tgz",
+      "integrity": "sha1-V21TffA33F7DXsExa5SNgV01whA="
+    },
     "nan": {
       "version": "2.9.2",
       "resolved": "https://registry.npmjs.org/nan/-/nan-2.9.2.tgz",
@@ -6456,8 +6511,7 @@
     "object-assign": {
       "version": "4.1.1",
       "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
-      "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
-      "dev": true
+      "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
     },
     "object-copy": {
       "version": "0.1.0",
@@ -6857,6 +6911,11 @@
         }
       }
     },
+    "parse-headers": {
+      "version": "2.0.3",
+      "resolved": "https://registry.npm.taobao.org/parse-headers/download/parse-headers-2.0.3.tgz",
+      "integrity": "sha1-Xo51Ejg9FAugLwx6qfSbQ5nJJRU="
+    },
     "parse-json": {
       "version": "2.2.0",
       "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz",
@@ -6972,6 +7031,11 @@
         "pinkie": "^2.0.0"
       }
     },
+    "pkcs7": {
+      "version": "0.2.3",
+      "resolved": "https://registry.npm.taobao.org/pkcs7/download/pkcs7-0.2.3.tgz",
+      "integrity": "sha1-ItYGZtAQZcXyRDkJjkpIMEUic74="
+    },
     "pkg-dir": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-1.0.0.tgz",
@@ -7613,8 +7677,7 @@
     "process": {
       "version": "0.11.10",
       "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
-      "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=",
-      "dev": true
+      "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI="
     },
     "process-nextick-args": {
       "version": "2.0.0",
@@ -8316,6 +8379,14 @@
         "aproba": "^1.1.1"
       }
     },
+    "rust-result": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npm.taobao.org/rust-result/download/rust-result-1.0.0.tgz",
+      "integrity": "sha1-NMdbLm3Dn+WHXlveyFteD5FTb3I=",
+      "requires": {
+        "individual": "^2.0.0"
+      }
+    },
     "rx-lite": {
       "version": "3.1.2",
       "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-3.1.2.tgz",
@@ -8328,6 +8399,14 @@
       "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==",
       "dev": true
     },
+    "safe-json-parse": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npm.taobao.org/safe-json-parse/download/safe-json-parse-4.0.0.tgz",
+      "integrity": "sha1-fA9XjPzNEtM6ccDgVBPi7KFx6qw=",
+      "requires": {
+        "rust-result": "^1.0.0"
+      }
+    },
     "safe-regex": {
       "version": "1.1.0",
       "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz",
@@ -9334,6 +9413,11 @@
       "integrity": "sha1-Antp+oIyJeVRys4+8DsR9qs3wdc=",
       "dev": true
     },
+    "tsml": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npm.taobao.org/tsml/download/tsml-1.0.1.tgz",
+      "integrity": "sha1-ifghi52eJX9H1/a1bQHFpNLGj8M="
+    },
     "tty-browserify": {
       "version": "0.0.0",
       "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz",
@@ -9627,6 +9711,11 @@
         }
       }
     },
+    "url-toolkit": {
+      "version": "2.2.2",
+      "resolved": "https://registry.nlark.com/url-toolkit/download/url-toolkit-2.2.2.tgz?cache=0&sync_timestamp=1619295234340&other_urls=https%3A%2F%2Fregistry.nlark.com%2Furl-toolkit%2Fdownload%2Furl-toolkit-2.2.2.tgz",
+      "integrity": "sha1-Ue8ntW0xhxhfns9Kisfo9VIDyJ0="
+    },
     "use": {
       "version": "3.1.0",
       "resolved": "https://registry.npmjs.org/use/-/use-3.1.0.tgz",
@@ -9727,6 +9816,104 @@
         "extsprintf": "^1.2.0"
       }
     },
+    "video.js": {
+      "version": "6.13.0",
+      "resolved": "https://registry.nlark.com/video.js/download/video.js-6.13.0.tgz",
+      "integrity": "sha1-+Uh9RjJzQPpI7NUTcqKYHbts3kw=",
+      "requires": {
+        "babel-runtime": "^6.9.2",
+        "global": "4.3.2",
+        "safe-json-parse": "4.0.0",
+        "tsml": "1.0.1",
+        "videojs-font": "2.1.0",
+        "videojs-ie8": "1.1.2",
+        "videojs-vtt.js": "0.12.6",
+        "xhr": "2.4.0"
+      },
+      "dependencies": {
+        "global": {
+          "version": "4.3.2",
+          "resolved": "https://registry.npm.taobao.org/global/download/global-4.3.2.tgz",
+          "integrity": "sha1-52mJJopsdMOJCLEwWxD8DjlOnQ8=",
+          "requires": {
+            "min-document": "^2.19.0",
+            "process": "~0.5.1"
+          }
+        },
+        "process": {
+          "version": "0.5.2",
+          "resolved": "https://registry.npm.taobao.org/process/download/process-0.5.2.tgz",
+          "integrity": "sha1-FjjYqONML0QKkduVq5rrZ3/Bhc8="
+        }
+      }
+    },
+    "videojs-contrib-hls": {
+      "version": "5.15.0",
+      "resolved": "https://registry.npm.taobao.org/videojs-contrib-hls/download/videojs-contrib-hls-5.15.0.tgz",
+      "integrity": "sha1-/klXNn5daLfSP3jtMuN6ndiSoKg=",
+      "requires": {
+        "aes-decrypter": "1.0.3",
+        "global": "^4.3.0",
+        "m3u8-parser": "2.1.0",
+        "mux.js": "4.3.2",
+        "url-toolkit": "^2.1.3",
+        "video.js": "^5.19.1 || ^6.2.0",
+        "videojs-contrib-media-sources": "4.7.2",
+        "webwackify": "0.1.6"
+      }
+    },
+    "videojs-contrib-media-sources": {
+      "version": "4.7.2",
+      "resolved": "https://registry.npm.taobao.org/videojs-contrib-media-sources/download/videojs-contrib-media-sources-4.7.2.tgz",
+      "integrity": "sha1-Ct+SkQfVt0zyyKuygkyCF35DhY4=",
+      "requires": {
+        "global": "^4.3.0",
+        "mux.js": "4.3.2",
+        "video.js": "^5.17.0 || ^6.2.0",
+        "webwackify": "0.1.6"
+      }
+    },
+    "videojs-flash": {
+      "version": "2.2.1",
+      "resolved": "https://registry.npm.taobao.org/videojs-flash/download/videojs-flash-2.2.1.tgz",
+      "integrity": "sha1-GiJduxztIArpu/FeAf5KYQhtkPE=",
+      "requires": {
+        "global": "^4.4.0",
+        "video.js": "^6 || ^7",
+        "videojs-swf": "5.4.2"
+      }
+    },
+    "videojs-font": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npm.taobao.org/videojs-font/download/videojs-font-2.1.0.tgz",
+      "integrity": "sha1-olkwpn9snPvyu4jay4xrRR8JM3k="
+    },
+    "videojs-hotkeys": {
+      "version": "0.2.27",
+      "resolved": "https://registry.npm.taobao.org/videojs-hotkeys/download/videojs-hotkeys-0.2.27.tgz",
+      "integrity": "sha1-Dfl5Urnf8ObMHPikOf7X6snHPwE="
+    },
+    "videojs-ie8": {
+      "version": "1.1.2",
+      "resolved": "https://registry.npm.taobao.org/videojs-ie8/download/videojs-ie8-1.1.2.tgz",
+      "integrity": "sha1-oj09hgitcZK2nGB3/E64SJmNNdk=",
+      "requires": {
+        "es5-shim": "^4.5.1"
+      }
+    },
+    "videojs-swf": {
+      "version": "5.4.2",
+      "resolved": "https://registry.npm.taobao.org/videojs-swf/download/videojs-swf-5.4.2.tgz",
+      "integrity": "sha1-aWSpv/kDtzLz5GUxSuR4oCoX6Ks="
+    },
+    "videojs-vtt.js": {
+      "version": "0.12.6",
+      "resolved": "https://registry.nlark.com/videojs-vtt.js/download/videojs-vtt.js-0.12.6.tgz",
+      "integrity": "sha1-4HhgC9qJnqpvnDMHE0zQyBGUe44=",
+      "requires": {
+        "global": "^4.3.1"
+      }
+    },
     "vm-browserify": {
       "version": "0.0.4",
       "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz",
@@ -9837,6 +10024,18 @@
       "integrity": "sha512-x3LV3wdmmERhVCYy3quqA57NJW7F3i6faas++pJQWtknWT+n7k30F4TVdHvCLn48peTJFRvCpxs3UuFPqgeELg==",
       "dev": true
     },
+    "vue-video-player": {
+      "version": "5.0.2",
+      "resolved": "https://registry.npm.taobao.org/vue-video-player/download/vue-video-player-5.0.2.tgz",
+      "integrity": "sha1-NKQiOf8wTvx2mNogpBZQUddmweY=",
+      "requires": {
+        "object-assign": "^4.1.1",
+        "video.js": "^6.6.0",
+        "videojs-contrib-hls": "^5.12.2",
+        "videojs-flash": "^2.1.0",
+        "videojs-hotkeys": "^0.2.20"
+      }
+    },
     "vuedraggable": {
       "version": "2.16.0",
       "resolved": "https://registry.npmjs.org/vuedraggable/-/vuedraggable-2.16.0.tgz",
@@ -10124,6 +10323,11 @@
         }
       }
     },
+    "webwackify": {
+      "version": "0.1.6",
+      "resolved": "https://registry.npm.taobao.org/webwackify/download/webwackify-0.1.6.tgz",
+      "integrity": "sha1-HUKhKsYYI9fjRaveCE6qpipKles="
+    },
     "whet.extend": {
       "version": "0.9.9",
       "resolved": "https://registry.npmjs.org/whet.extend/-/whet.extend-0.9.9.tgz",
@@ -10201,6 +10405,33 @@
         "safe-buffer": "~5.1.0"
       }
     },
+    "xhr": {
+      "version": "2.4.0",
+      "resolved": "https://registry.npm.taobao.org/xhr/download/xhr-2.4.0.tgz",
+      "integrity": "sha1-4W5mpF+GmGHu76tBbV7/ci3ECZM=",
+      "requires": {
+        "global": "~4.3.0",
+        "is-function": "^1.0.1",
+        "parse-headers": "^2.0.0",
+        "xtend": "^4.0.0"
+      },
+      "dependencies": {
+        "global": {
+          "version": "4.3.2",
+          "resolved": "https://registry.npm.taobao.org/global/download/global-4.3.2.tgz",
+          "integrity": "sha1-52mJJopsdMOJCLEwWxD8DjlOnQ8=",
+          "requires": {
+            "min-document": "^2.19.0",
+            "process": "~0.5.1"
+          }
+        },
+        "process": {
+          "version": "0.5.2",
+          "resolved": "https://registry.npm.taobao.org/process/download/process-0.5.2.tgz",
+          "integrity": "sha1-FjjYqONML0QKkduVq5rrZ3/Bhc8="
+        }
+      }
+    },
     "xml-char-classes": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/xml-char-classes/-/xml-char-classes-1.0.0.tgz",
@@ -10210,8 +10441,7 @@
     "xtend": {
       "version": "4.0.1",
       "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz",
-      "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=",
-      "dev": true
+      "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68="
     },
     "y18n": {
       "version": "4.0.0",

+ 4 - 2
frontend_web/src/libraries/plugins/services.js

@@ -20,7 +20,8 @@ import {
   PermissionsService,
   OrgpermissionService,
   DeviceService,
-  EquipmentService
+  EquipmentService,
+  Expirechannels
 } from '../services'
 
 export default Vue => {
@@ -47,7 +48,8 @@ export default Vue => {
     permissions: PermissionsService,
     orgpermissions: OrgpermissionService,
     device: DeviceService,
-    equipment: EquipmentService
+    equipment: EquipmentService,
+    expirechannels: Expirechannels
   }
 
   // mount the services to Vue

+ 7 - 0
frontend_web/src/libraries/router/main-routes.js

@@ -193,6 +193,13 @@ export default [
     meta: { requiresAuth: true },
     component: resolve => require.ensure([], () => resolve(require('views/main/userchangepwd')), 'userchangepwd')
   },
+  // - 过期模块
+  {
+    name: 'expirechannels',
+    path: 'expirechannels',
+    meta: { requiresAuth: true },
+    component: resolve => require.ensure([], () => resolve(require('views/main/expirechannels')), 'expirechannels')
+  },
   // - 日志管理
   {
     name: 'loginfo',

+ 7 - 0
frontend_web/src/libraries/services/expirechannels.js

@@ -0,0 +1,7 @@
+/**
+ * device service
+ */
+
+import Resource from './resource'
+
+export default new Resource('expirechannels')

+ 3 - 1
frontend_web/src/libraries/services/index.js

@@ -25,6 +25,7 @@ import PermissionsService from './permissions'
 import OrgpermissionService from './orgpermission' // 新增,2017/09/07 09:57
 import DeviceService from './device' // 新增,2017-09-11 11:56
 import EquipmentService from './equipment'
+import Expirechannels from './expirechannels'
 
 export {
   CommentService,
@@ -48,5 +49,6 @@ export {
   PermissionsService,
   OrgpermissionService, // 柴新增,2017/09/07 09:57
   DeviceService,
-  EquipmentService
+  EquipmentService,
+  Expirechannels
 }

+ 1 - 0
frontend_web/src/libraries/store/state.js

@@ -141,6 +141,7 @@ const state = {
         children: [
           { text: '账户设置', name: 'usersetting' },
           { text: '组织管理', name: 'organize' },
+          { text: '过期模块', name: 'expirechannels' },
           { text: '账户一览', name: 'management' },
           { text: '密码修改', name: 'userchangepwd' }
         ]

+ 93 - 35
frontend_web/src/views/main/devicegps.vue

@@ -8,12 +8,22 @@
             </el-date-picker>
           </div>
         </el-col>
-        <el-col :span="8">
+        <el-col :span="6">
           <div style="padding-top:8px;color:blue">{{pointmsg}}</div>
         </el-col>
-        <el-col :span="4" style="padding-top:3px;">
-          <el-button type="primary" size="small" icon="search" @click="initData">查询</el-button>
+        <el-col :span="2" style="padding-top:3px;">
+          <el-button type="primary" size="small" icon="search" @click="initData()">查询</el-button>
         </el-col>
+       <el-col :span="2" style="padding-top:2px;">
+         <el-select v-model="roadOption" @change="initData()" placeholder="路线显示">
+           <el-option
+             v-for="item in roadOptionList"
+             :key="item.value"
+             :label="item.label"
+             :value="item.value">
+           </el-option>
+         </el-select>
+       </el-col>
       </el-row>
       <el-amap vid="amap" :zoom="zoom" :center="center" class="amap-demo">
         <el-amap-polyline :editable="false"  :path="pathpath" ></el-amap-polyline>
@@ -29,6 +39,7 @@
 <script>
   import Vue from 'vue'
   import VueAMap from 'vue-amap'
+  import axios from 'axios'
   Vue.use(VueAMap)
   let amapManager = new VueAMap.AMapManager()
   export default {
@@ -57,8 +68,21 @@
             }
           }
         }],
+        tempMarkers: [],
         markers: [],
-        pathpath: []
+        tempPaths: [],
+        pathpath: [],
+        roadOption: 1,
+        roadOptionList: [
+          {
+            value: 1,
+            label: '直线连接'
+          },
+          {
+            value: 2,
+            label: '路线连接'
+          }
+        ]
       }
     },
 
@@ -69,7 +93,7 @@
         // 插件集合
         plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor',
           'AMap.CircleEditor'
-        ]
+        ]// 默认高德 sdk 版本为 1.4.4
       })
       let paramarr = this.$route.params.serial.split('_')
       console.log('------111-------', paramarr)
@@ -87,6 +111,7 @@
         })
       },
       initData() {
+         console.log('roadOption:', this.roadOption)
         // request
         let params = {
           _start: this.timerange[0].getTime(),
@@ -98,55 +123,88 @@
           .then(res => {
             // response
             var data = res.data
-            this.draemap(data)
+            this.draemap(data, this.roadOption)
           })
           .catch(err => {
             // handle error
             console.error(err)
           })
       },
-      draemap(arraygpsdata) {
+      draemap(arraygpsdata, roadOption) {
         // let o = amapManager.getMap()
         let _this = this
+        _this.tempMarkers = []
         _this.pathpath = []
         _this.markers = []
         //  let lineArr = []
         let totalpoint = arraygpsdata.length
+        console.log('lenth1', totalpoint)
         // var infoWindow = new AMap.InfoWindow({ offset: new AMap.Pixel(0, -30)})
         // let validpoint = 0
-        for (let i = 0; i < totalpoint; i++) {
-          let marker = {
-            position: [arraygpsdata[i][2], arraygpsdata[i][1]],
-            //  + timestring + '温度:' + arraygpsdata[i][3] + '湿度:' + arraygpsdata[i][4],
-            events: {
-              click: () => {
-                var vDate = new Date(arraygpsdata[i][0])
-                vDate.setHours(vDate.getHours())
-                vDate.setMonth(vDate.getMonth())
-                var date = new Date(arraygpsdata[i][0] * 1000)
-                var Y = date.getFullYear() + '-'
-                var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'
-                var D = date.getDate() + ' '
-                var h = date.getHours() + ':'
-                var m = date.getMinutes() + ':'
-                var s = date.getSeconds()
-                let timestring = Y + M + D + h + m + s
-                //  alert('时间:' + timestring + '温度:' + arraygpsdata[i][3] + '湿度:' + arraygpsdata[i][4])
-                _this.$message({
-                  message: '时间:' + timestring + '温度:' + arraygpsdata[i][3] + '湿度:' + arraygpsdata[i][4],
-                  center: true
-               })
+        if (roadOption === 2) {
+          for (let i = 0; i < totalpoint; i++) {
+            let marker = {
+              x: arraygpsdata[i][2],
+              y: arraygpsdata[i][1],
+              sp: arraygpsdata[i][4],
+              ag: 3,
+              tm: i === 0 ? arraygpsdata[i][0] : (arraygpsdata[i][0] - arraygpsdata[i - 1][0])
+            }
+            _this.tempMarkers.push(marker)
+          }
+          console.log('lenth2:', _this.tempMarkers.length)
+          this.getGraspRoad()
+        }
+        for (let j = 0; j < totalpoint; j++) {
+          if (arraygpsdata[j][1] !== 0 && arraygpsdata[j][2] !== 0) { // 经纬度均不为0(保存数据库时将空设为了0)
+            let marker = {
+              position: [arraygpsdata[j][2], arraygpsdata[j][1]],
+              //  + timestring + '温度:' + arraygpsdata[j][3] + '湿度:' + arraygpsdata[j][4],
+              events: {
+                click: () => {
+                  var vDate = new Date(arraygpsdata[j][0])
+                  vDate.setHours(vDate.getHours())
+                  vDate.setMonth(vDate.getMonth())
+                  var date = new Date(arraygpsdata[j][0] * 1000)
+                  var Y = date.getFullYear() + '-'
+                  var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'
+                  var D = date.getDate() + ' '
+                  var h = date.getHours() + ':'
+                  var m = date.getMinutes() + ':'
+                  var s = date.getSeconds()
+                  let timestring = Y + M + D + h + m + s
+                  //  alert('时间:' + timestring + '温度:' + arraygpsdata[j][3] + '湿度:' + arraygpsdata[j][4])
+                  _this.$message({
+                    message: '时间:' + timestring + '温度:' + arraygpsdata[j][3] + '湿度:' + arraygpsdata[j][4],
+                    center: true
+                  })
+                }
               }
             }
+            _this.center = [arraygpsdata[0][2], arraygpsdata[0][1]]
+            _this.markers.push(marker)
+            if (roadOption === 1) {
+              let path1 = [arraygpsdata[j][2], arraygpsdata[j][1]]
+              this.pathpath.push(path1)
+              console.log('local pathpath:', this.pathpath)
+            }
           }
-          _this.center = [arraygpsdata[0][2], arraygpsdata[0][1]]
-          _this.markers.push(marker)
-          let path1 = [arraygpsdata[i][2], arraygpsdata[i][1]]
-          this.pathpath.push(path1)
         }
-        // this.polyline.pathpath = [[120.430397, 36.324684], [120.418746, 36.196159], [120.449142, 36.114631]]
-        // console.log('------this.polyline.path----', this.polyline.path)
+        this.polyline.pathpath = [[120.430397, 36.324684], [120.418746, 36.196159], [120.449142, 36.114631]]
+        console.log('------this.polyline.path----', this.polyline.path)
         _this.pointmsg = `数据点:${totalpoint}    有效数据点:${totalpoint}`
+      },
+      getGraspRoad() {
+        axios.post('https://restapi.amap.com/v4/grasproad/driving?key=79e7667ae1734b9c639cb1e091ee9fc7', this.tempMarkers)
+          .then(res => {
+            this.tempPaths = res.data.data.points
+            console.log('local:', this.tempPaths, res.data.data)
+            for (let j = 0; j < this.tempPaths.length; j++) {
+              let path1 = [this.tempPaths[j].x, this.tempPaths[j].y]
+              this.pathpath.push(path1)
+            }
+            console.log('local pathpath:', this.pathpath)
+          })
       }
     },
     // https://router.vuejs.org/zh-cn/essentials/dynamic-matching.html#响应路由参数的变化

+ 103 - 0
frontend_web/src/views/main/expirechannels.vue

@@ -0,0 +1,103 @@
+<template>
+  <div v-loading="downloading"
+       :element-loading-text="$t('message.Load')">
+
+    <el-table :data="list"
+              @selection-change="handleSelectionChange">
+      <el-table-column prop="DeviceName"
+                       label="设备名称"
+                       show-overflow-tooltip></el-table-column>
+      <el-table-column prop="ChannelName"
+                       label="传感器名称"
+                       show-overflow-tooltip></el-table-column>
+      <el-table-column prop="ChannelCode"
+                       label="传感器序列号"
+                       show-overflow-tooltip></el-table-column>
+      <el-table-column prop="CreateOn"
+                       label="绑定日期"
+                       show-overflow-tooltip></el-table-column>
+      <el-table-column prop="ExpireOn"
+                       label="过期日期"
+                       show-overflow-tooltip></el-table-column>
+    </el-table>
+    <el-pagination @size-change="handleSizeChange"
+                   @current-change="handleCurrentChange"
+                   :current-page="currentPage"
+                   :page-sizes="[10, 15, 20, 25]"
+                   :page-size="size"
+                   layout="total, sizes, prev, pager, next, jumper"
+                   :total="currentItemCount">
+    </el-pagination>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'abnormalmsg',
+
+  data () {
+    return {
+      currentItemCount: 0,
+      currentPage: 1,
+      size: 10,
+      list: [],
+      dialogtitle: '',
+      selectlist: [],
+      seachform: {
+        etype: '',
+        timerange: [new Date(new Date() - 30 * 24 * 3600 * 1000), new Date()],
+        channel: ''
+      },
+      selectedorg: [],
+      downloading: false
+    }
+  },
+
+  created () {
+    // initial data
+    this.initData(this.$route.query.code)
+  },
+
+  methods: {
+    initData () {
+      let _this = this
+      // request
+      const params = {
+        _currentPage: this.currentPage,
+        _size: this.size
+      }
+      // 获取过期传感器列表
+      this.$services.expirechannels.get('list', {
+        params
+      }).then(res => {
+        _this.list = res.data.items
+        _this.currentItemCount = res.data.currentItemCount
+      }).catch(error => {
+        console.log(error)
+      })
+    },
+    handleSizeChange (value) {
+      this.size = value
+      this.currentPage = 1
+      this.initData(this.$route.query.code)
+    },
+    handleCurrentChange (value) {
+      this.currentPage = value
+      this.initData(this.$route.query.code)
+    },
+    handleSelectionChange (val) {
+      this.selectlist = val
+    }
+  }
+}
+</script>
+
+<style lang="css">
+.el-pagination {
+  margin: 1rem 0 2rem;
+  text-align: right;
+}
+::-webkit-input-placeholder {
+  color: #7a7a7a;
+}
+</style>