Browse Source

默认站点加id store index,js

Ming 4 years ago
parent
commit
9bbcc9a8c0
2 changed files with 9 additions and 1 deletions
  1. 8 0
      src/components/topHeader.vue
  2. 1 1
      src/store/index.js

+ 8 - 0
src/components/topHeader.vue

@@ -93,9 +93,17 @@ export default {
     messageHandle(e) {
       if (e.data.search("{") != -1) {
         const redata = JSON.parse(e.data);
+        console.log('redata')
+        console.log(redata )
 
         if (redata.CMD == "getStationInfo") {
           this.siteList = redata.RESULT;
+
+
+           console.log('this.getStationId')
+          console.log(this.getStationId)
+
+
           if (this.getStationId.length == 0) {
             console.log("created走没有的逻辑");
             // 初始化时,获取下拉列表的第一个值 放入store里

+ 1 - 1
src/store/index.js

@@ -6,7 +6,7 @@ Vue.use(Vuex)
 export default new Vuex.Store({
     state: {
         wsInfo: null,
-        StationID: '',
+        StationID: 'a5f41517-44be-4565-b27b-c9cc044c5061',
         wsTimer: 30
     },
     mutations: {