From 31101f632c27c05d15f30ca3084e3ed3da2a29af Mon Sep 17 00:00:00 2001
From: wu <731351411@qq.com>
Date: 星期五, 08 十二月 2023 11:42:08 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/CanadaMes

---
 CanadaMes-ui/src/views/Electrical/Action.vue |   37 ++++++++++++++++++++++---------------
 1 files changed, 22 insertions(+), 15 deletions(-)

diff --git a/CanadaMes-ui/src/views/Electrical/Action.vue b/CanadaMes-ui/src/views/Electrical/Action.vue
index 68a1f2f..4f9a45d 100644
--- a/CanadaMes-ui/src/views/Electrical/Action.vue
+++ b/CanadaMes-ui/src/views/Electrical/Action.vue
@@ -2,17 +2,17 @@
   <div class="app">
     <!--闈㈠寘灞戝鑸尯鍩�-->
     <el-breadcrumb separator-class="el-icon-arrow-right" class="el-breadcrumb">
-      <router-link to="/Electrical/alarm" tag="el-button" type="text" active-class="blue-button">{{ $t('Alarm')
+      <router-link to="/Electrical/ServoManualone" tag="el-button" type="text" active-class="blue-button">{{ $t('Alarm')
       }}</router-link>
       <router-link to="/Electrical/State" tag="el-button" type="text" active-class="blue-button">{{ $t('State')
       }}</router-link>
       <router-link to="/Electrical/Action" tag="el-button" type="text" active-class="blue-button">{{ $t('Action')
       }}</router-link>
-      <router-link to="/Electrical/Parameter" tag="el-button" type="text" active-class="blue-button">{{ $t('Parameter')
-      }}</router-link>
+      <!-- <router-link to="/Electrical/Parameter" tag="el-button" type="text" active-class="blue-button">{{ $t('Parameter')
+      }}</router-link> -->
       <router-link to="/Electrical/Sign" tag="el-button" type="text" active-class="blue-button">{{ $t('Sign')
       }}</router-link>
-       <router-link to="/Electrical/Servomanual" tag="el-button" type="text" active-class="blue-button">{{ $t('Servo Manual')
+       <router-link to="/Electrical/Servomanual" tag="el-button" type="text" active-class="blue-button">{{ $t('Parameter')
       }}</router-link>
     </el-breadcrumb>
     
@@ -71,10 +71,10 @@
           'A02 SERVE TRAVEL POS',
           'B01 SERVE TRAVEL POS',
           'B02 SERVE TRAVEL POS',
-          'B01 YV TURN',
-          'B01 YV UP DOWN',
-          'B02 YV TURN',
-          'B02 YV UP DOWN',
+          'B01 Solenoid TURN',
+          'B01 Solenoid UP DOWN',
+          'B02 Solenoid TURN',
+          'B02 Solenoid UP DOWN',
         ],
         xyData: [
           { name: 'D01 VFD conveyor', value: "0" },
@@ -99,10 +99,10 @@
           { name: 'A02 SERVE TRAVEL POS', value: "0" },
           { name: 'B01 SERVE TRAVEL POS', value: "0" },
           { name: 'B02 SERVE TRAVEL POS', value: "0" },
-          { name: 'B01 YV TURN', value: "0" },
-          { name: 'B01 YV UP DOWN', value: "0" },
-          { name: 'B02 YV TURN', value: "0" },
-          { name: 'B02 YV UP DOWN', value: "0" },
+          { name: 'B01 Solenoid TURN', value: "0" },
+          { name: 'B01 Solenoid UP DOWN', value: "0" },
+          { name: 'B02 Solenoid TURN', value: "0" },
+          { name: 'B02 Solenoid UP DOWN', value: "0" },
         ]
         ,
       },
@@ -118,9 +118,13 @@
 
     }
   },
-  created () {
+  // created () {
+  //   this.init();
+  // },
+  activated(){
+   
     this.init();
-  },
+ },
   methods: {
 
     setActiveButton (buttonName) {
@@ -134,7 +138,7 @@
       } else {
         //console.log("鎮ㄧ殑娴忚鍣ㄦ敮鎸乄ebSocket");
 
-        let socketUrl = "ws://" + "localhost:8888" + "/springboot-vue3/api/talk/" + viewname;
+        let socketUrl = "ws://" + this.$t('ip')+":8888" + "/springboot-vue3/api/talk/" + viewname;
         if (socket != null) {
           socket.close();
           socket = null;
@@ -179,6 +183,9 @@
         socket.onerror = function () {
           console.log("websocket鍙戠敓浜嗛敊璇�");
         }
+        this.$router.afterEach(function(){
+          socket.close();
+        })
       }
 
     },

--
Gitblit v1.8.0