From 50122609dfab86da64df82396a30a30455e5bd67 Mon Sep 17 00:00:00 2001
From: ZengTao <2773468879@qq.com>
Date: 星期三, 27 十二月 2023 08:31:08 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/CanadaMes
---
CanadaMes-ui/src/views/Electrical/ServoManualone.vue | 35 ++++++++++++++++++++---------------
1 files changed, 20 insertions(+), 15 deletions(-)
diff --git a/CanadaMes-ui/src/views/Electrical/ServoManualone.vue b/CanadaMes-ui/src/views/Electrical/ServoManualone.vue
index 8eb562a..e2acb21 100644
--- a/CanadaMes-ui/src/views/Electrical/ServoManualone.vue
+++ b/CanadaMes-ui/src/views/Electrical/ServoManualone.vue
@@ -116,7 +116,7 @@
<el-input
v-if="item.type === '0' && groupIndex === 0"
v-model="item.value"
- @keyup.enter.native="zuhe1"
+ @keyup.enter.native="zuhe1($event)"
class="input-box"
:class="{
'special-class': groupIndex === 0,
@@ -127,7 +127,7 @@
<el-input
v-else-if="item.type === '0' && groupIndex === 1"
v-model="item.value"
- @keyup.enter.native="zuhe2"
+ @keyup.enter.native="zuhe2($event)"
class="input-box"
:class="{
'special-class': groupIndex === 0,
@@ -317,7 +317,7 @@
this.$set(dataGroup[itemIndex].button, "value", 1);
}
},
- zuhe1() {
+ zuhe1(event) {
const data = [];
for (let i = 0; i < 1; i++) {
@@ -387,8 +387,9 @@
const jsonString = JSON.stringify(jsonObject);
console.log("鎵�鏈塗ype涓�0鐨剉alue:", jsonString);
socket?.send(jsonString);
+ event.target.blur(); // 鍙栨秷杈撳叆妗嗙劍鐐�
},
- zuhe2() {
+ zuhe2(event) {
const data2 = [];
for (let i = 1; i < 2; i++) {
@@ -453,6 +454,7 @@
const jsonString = JSON.stringify(jsonObject);
console.log("鎵�鏈塗ype涓�0鐨剉alue:", jsonString);
socket?.send(jsonString);
+ event.target.blur(); // 鍙栨秷杈撳叆妗嗙劍鐐�
},
submitDataToBackend(currentButtonName) {
const data = [];
@@ -682,17 +684,17 @@
console.log("websocket宸叉墦寮�");
};
- let isMouseInInputBox = false; // 鏍囪榧犳爣鏄惁鍦ㄨ緭鍏ユ鍐�
+ // let isMouseInInputBox = false; // 鏍囪榧犳爣鏄惁鍦ㄨ緭鍏ユ鍐�
- const inputBox = document.querySelectorAll(".input-box");
- inputBox.forEach((box) => {
- box.addEventListener("mouseenter", () => {
- isMouseInInputBox = true;
- });
- box.addEventListener("mouseleave", () => {
- isMouseInInputBox = false;
- });
- });
+ // const inputBox = document.querySelectorAll(".input-box");
+ // inputBox.forEach((box) => {
+ // box.addEventListener("mouseenter", () => {
+ // isMouseInInputBox = true;
+ // });
+ // box.addEventListener("mouseleave", () => {
+ // isMouseInInputBox = false;
+ // });
+ // });
socket.onmessage = (msg) => {
if (!msg.data) {
@@ -703,8 +705,11 @@
// console.log(obj)
const weihuiling = obj.weihuiling;
const jsonData2 = this.jsonData;
+ if (document.activeElement.tagName.toLowerCase() === 'input') {
+ return;
+ }
- if (obj.zuhe1 && !isMouseInInputBox) {
+ if (obj.zuhe1 ) {
//鍚姩鎸夐挳
// 鎵ц鏇存柊閫昏緫
--
Gitblit v1.8.0