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/ManualonePosition2.vue |   87 ++++++++++++++++++++++++++++---------------
 1 files changed, 56 insertions(+), 31 deletions(-)

diff --git a/CanadaMes-ui/src/views/Electrical/ManualonePosition2.vue b/CanadaMes-ui/src/views/Electrical/ManualonePosition2.vue
index 50d9f61..96cd5e3 100644
--- a/CanadaMes-ui/src/views/Electrical/ManualonePosition2.vue
+++ b/CanadaMes-ui/src/views/Electrical/ManualonePosition2.vue
@@ -12,37 +12,41 @@
       <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('ServoManual')
+        $t('Parameter')
       }}</router-link>
     </el-breadcrumb>
 
     <el-breadcrumb separator-class="el-icon-arrow-right" class="el-breadcrumb">
-
-      <router-link to="/Electrical/Servomanualone" tag="el-button" type="text" active-class="blue-button">{{
-        $t('Servomanualone')
-      }}</router-link>
-      <router-link to="/Electrical/Parameter1" tag="el-button" type="text" active-class="blue-button">{{ $t('Parameter1')
-      }}</router-link>
-     <router-link to="/Electrical/Parameter2" tag="el-button" type="text" active-class="blue-button">{{ $t('Parameter2')
-        }}</router-link> 
-      <router-link to="/Electrical/Positioning1" tag="el-button" type="text" active-class="blue-button">{{
-        $t('Positioning1')
-      }}</router-link>
-      <router-link to="/Electrical/Positioning2" tag="el-button" type="text" active-class="blue-button">{{
-        $t('Positioning2')
-      }}</router-link>
-      <router-link to="/Electrical/ManualonePosition" tag="el-button" type="text" active-class="blue-button">{{
-        $t('ManualonePosition')
-      }}</router-link>
-      <router-link to="/Electrical/ManualonePosition2" tag="el-button" type="text" active-class="blue-button">{{
-        $t('ManualonePosition2')
-      }}</router-link>
-      <router-link to="/Electrical/AutomaticParameterSetting" tag="el-button" type="text" active-class="blue-button">{{
-        $t('AutomaticParameterSetting')
+      <router-link to="/Electrical/Parameter2" tag="el-button" type="text" active-class="blue-button">{{ $t('Automatic State')
       }}</router-link>
       <router-link to="/Electrical/ManualJog" tag="el-button" type="text" active-class="blue-button">{{
         $t('ManualJog')
       }}</router-link>
+      
+       <router-link to="/Electrical/ManualonePosition" tag="el-button" type="text" active-class="blue-button">{{
+        $t('ManualonePosition')
+      }}</router-link>
+
+<router-link to="/Electrical/Servomanualone" tag="el-button" type="text" active-class="blue-button">{{
+        $t('Servomanualone')
+      }}</router-link>
+      <router-link to="/Electrical/Parameter1" tag="el-button" type="text" active-class="blue-button">{{ $t('Parameter1')
+      }}</router-link>
+     
+      <router-link to="/Electrical/Positioning1" tag="el-button" type="text" active-class="blue-button">{{
+        $t('Address parameter settings')
+      }}</router-link>
+      <router-link to="/Electrical/Positioning2" tag="el-button" type="text" active-class="blue-button">{{
+        $t('Positioning2')
+      }}</router-link>
+     
+      <router-link to="/Electrical/ManualonePosition2" tag="el-button" type="text" active-class="blue-button">{{
+        $t('ManualonePosition2')
+      }}</router-link>
+      <router-link to="/Electrical/AutomaticParameterSetting" tag="el-button" type="text" active-class="blue-button">{{
+        $t('Speed parameter settings')
+      }}</router-link>
+      
     </el-breadcrumb>
 
     <el-row :gutter="20">
@@ -58,11 +62,11 @@
           <div class="button-row" style="display: flex; justify-content: space-between;">
             <div v-for="(item, itemIndex) in dataGroup" :key="itemIndex">
               <el-button v-if="item.button && language === 'en-US'" :name="item.button.name" v-model="item.button.value"
-                :class="{ 'action-button': true, 'error-button': item.button.name === 'Fault' && item.button.value === 1, 'error-button2': item.button.name === 'NotZero' && item.button.value === 0 }"
+                :class="{ 'action-button': true, 'error-button': item.button.name === 'Fault' && item.button.value === 1, 'error-button2': item.button.name === 'NotZero' && item.button.value === 0,'greenbutton': item.button.name !== 'NotZero' && item.button.name !== 'Fault' && item.button.value === 1 }"
                 @click="updateButtonValue(dataGroup, itemIndex); submitDataToBackend(item.button.name);">{{
                   item.button.name }}</el-button>
               <el-button v-if="item.button && language === 'zh-CN'" :name="item.button.name" v-model="item.button.value"
-                :class="{ 'action-button': true, 'error-button': item.button.name === '鏁呴殰' && item.button.value === 1, 'error-button2': item.button.name === '鏈洖闆�' && item.button.value === 0 }"
+                :class="{ 'action-button': true, 'error-button': item.button.name === '鏁呴殰' && item.button.value === 1, 'error-button2': item.button.name === '鏈洖闆�' && item.button.value === 0,'greenbutton': item.button.name !== '鏈洖闆�' && item.button.name !== '鏁呴殰' && item.button.value === 1 }"
                 @click="updateButtonValue(dataGroup, itemIndex); submitDataToBackend(item.button.name);">{{
                   item.button.name }}</el-button>
             </div>
@@ -110,12 +114,12 @@
     updateButtonValue (dataGroup, itemIndex) {
       // 灏嗗綋鍓嶆寜閽殑鍊艰涓�1
 
-      if (dataGroup[itemIndex].button.value === 1) {
+      if (dataGroup[itemIndex].button.value === 0) {
     // 濡傛灉褰撳墠鎸夐挳鐨勫�兼槸 0锛屽皢鍏惰涓� 1
-    this.$set(dataGroup[itemIndex].button, 'value', 0);
+    this.$set(dataGroup[itemIndex].button, 'value', 1);
   } else {
     // 鍚﹀垯灏嗗叾璁句负 0
-    this.$set(dataGroup[itemIndex].button, 'value', 1);
+    this.$set(dataGroup[itemIndex].button, 'value', 0);
   }
 
 
@@ -249,7 +253,7 @@
       if (typeof WebSocket === "undefined") {
         console.log("鎮ㄧ殑娴忚鍣ㄤ笉鏀寔WebSocket");
       } else {
-        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();
@@ -277,7 +281,7 @@
           const handleMouseMove = throttle(function (event) {
             const inputBox = document.querySelectorAll('.el-card__body');
             const target = event.target;
-            if (inputBox && Array.from(inputBox).every(box => !box.contains(target))) {
+            if (obj.zuhe1 && inputBox && Array.from(inputBox).every(box => !box.contains(target))) {
               // 鎵ц鏇存柊閫昏緫
               for (let i = 0; i < 2; i++) {
                 jsonData2[i].forEach((item, index) => {
@@ -318,6 +322,9 @@
 
               }
 
+                
+
+
               for (let i = 0; i < jsonData2.length; i++) {
                 let arr2 = jsonData2[i];
                 for (let j = 0; j < arr2.length; j++) {
@@ -330,6 +337,20 @@
 
                   }
 
+                }
+
+
+              }
+
+              //鍚姩
+              for (let i = 0; i < jsonData2.length; i++) {
+                let arr4 = jsonData2[i];
+                for (let j = 0; j < arr4.length; j++) {
+                  let obj4 = arr4[j];
+                  if (obj4.button && (obj4.button.name.includes("鍚姩") || obj4.button.name.includes("Start"))) {
+                    obj4.button.value = obj.qidong[0][i];
+                    // console.log(obj2.button.value)
+                  }
                 }
 
 
@@ -389,7 +410,7 @@
       });
 
 
-      console.log(this.jsonData)
+      // console.log(this.jsonData)
 
     }
 
@@ -422,4 +443,8 @@
 .error-button2 {
   background-color: red;
 }
+.greenbutton{
+
+background-color: green;
+}
 </style>
\ No newline at end of file

--
Gitblit v1.8.0