Ming пре 4 година
родитељ
комит
453baf82d2
4 измењених фајлова са 55 додато и 46 уклоњено
  1. BIN
      dist.zip
  2. 42 42
      package.json
  3. 8 2
      src/App.vue
  4. 5 2
      src/pages/inspectRecord/inspectRecord.vue

+ 42 - 42
package.json

@@ -1,46 +1,46 @@
 {
-  "name": "panel",
-  "version": "0.1.0",
-  "private": true,
-  "scripts": {
-    "serve": "vue-cli-service serve",
-    "build": "vue-cli-service build",
-    "lint": "vue-cli-service lint"
-  },
-  "dependencies": {
-    "core-js": "^3.6.5",
-    "echarts": "^4.8.0",
-    "element-ui": "^2.15.2",
-    "vue": "^2.6.11",
-    "vue-router": "^3.5.1",
-    "vuex": "^3.6.2"
-  },
-  "devDependencies": {
-    "@vue/cli-plugin-babel": "~4.5.0",
-    "@vue/cli-plugin-eslint": "~4.5.0",
-    "@vue/cli-service": "~4.5.0",
-    "babel-eslint": "^10.1.0",
-    "eslint": "^6.7.2",
-    "eslint-plugin-vue": "^6.2.2",
-    "vue-template-compiler": "^2.6.11"
-  },
-  "eslintConfig": {
-    "root": true,
-    "env": {
-      "node": true
+    "name": "panel",
+    "version": "0.1.0",
+    "private": true,
+    "scripts": {
+        "serve": "vue-cli-service serve",
+        "build": "vue-cli-service build",
+        "lint": "vue-cli-service lint"
     },
-    "extends": [
-      "plugin:vue/essential",
-      "eslint:recommended"
-    ],
-    "parserOptions": {
-      "parser": "babel-eslint"
+    "dependencies": {
+        "core-js": "^3.6.5",
+        "echarts": "^4.8.0",
+        "element-ui": "^2.15.2",
+        "vue": "^2.6.11",
+        "vue-router": "^3.5.1",
+        "vuex": "^3.6.2"
     },
-    "rules": {}
-  },
-  "browserslist": [
-    "> 1%",
-    "last 2 versions",
-    "not dead"
-  ]
+    "devDependencies": {
+        "@vue/cli-plugin-babel": "~4.5.0",
+        "@vue/cli-plugin-eslint": "~4.5.0",
+        "@vue/cli-service": "~4.5.0",
+        "babel-eslint": "^10.1.0",
+        "eslint": "^6.7.2",
+        "eslint-plugin-vue": "^6.2.2",
+        "vue-template-compiler": "^2.6.11"
+    },
+    "eslintConfig": {
+        "root": true,
+        "env": {
+            "node": true
+        },
+        "extends": [
+            "plugin:vue/essential",
+            "eslint:recommended"
+        ],
+        "parserOptions": {
+            "parser": "babel-eslint"
+        },
+        "rules": {}
+    },
+    "browserslist": [
+        "> 1%",
+        "last 2 versions",
+        "not dead"
+    ]
 }

+ 8 - 2
src/App.vue

@@ -49,9 +49,15 @@ export default {
       if ("WebSocket" in window) {
         // console.log("您的浏览器支持 WebSocket!");
         // location.host
-        // that.global.ws = new WebSocket("ws://172.16.120.210:6001"); //后台本机ip
+        that.global.ws = new WebSocket("ws://172.16.120.210:6001"); //后台本机ip
         // that.global.ws = new WebSocket("ws://121.199.52.195:6001");  //线上测试ip
-        that.global.ws = new WebSocket("ws://172.16.120.79:6001");  //虚拟机ip
+        // that.global.ws = new WebSocket("ws://172.16.120.79:6001");  //虚拟机ip
+
+
+        // that.global.ws = new WebSocket("ws://10.98.75.196:6001");  //现场测试ip
+
+
+
         that.global.setWs(that.global.ws);
         that.global.ws.onopen = function () {
           console.log("websocket连接成功");

+ 5 - 2
src/pages/inspectRecord/inspectRecord.vue

@@ -116,7 +116,10 @@
               <td>
                 <P
                   >A相电压:
-                  <span :class="[item.Points[7].Value == 0 ? 'normal' : 'error']"   v-if="'Value' in item.Points[7]">
+                  <span
+                    :class="[item.Points[7].Value == 0 ? 'normal' : 'error']"
+                    v-if="'Value' in item.Points[7]"
+                  >
                     {{ item.Points[7].Value }}
                   </span>
                   <span v-else> - </span>
@@ -155,7 +158,7 @@
                 <P
                   >C相电流:
                   <span class="normal" v-if="'Value' in item.Points[12]">
-                    {{ item.Points[12].Value}}
+                    {{ item.Points[12].Value }}
                   </span>
                   <span v-else> - </span>
                   <!-- <span class="normal">9.00</span> -->