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/ManualonePosition.vue | 53 +++++++++++++++++++++++++++++------------------------
1 files changed, 29 insertions(+), 24 deletions(-)
diff --git a/CanadaMes-ui/src/views/Electrical/ManualonePosition.vue b/CanadaMes-ui/src/views/Electrical/ManualonePosition.vue
index b43fd36..8d15a80 100644
--- a/CanadaMes-ui/src/views/Electrical/ManualonePosition.vue
+++ b/CanadaMes-ui/src/views/Electrical/ManualonePosition.vue
@@ -58,16 +58,16 @@
<el-input style="width:250px;" v-if="item.state != 0 && item.type === '0' && groupIndex === 0 && (itemIndex === 2)" readonly v-model="item.value"
class="input-box" :oninput="`value=value.replace(/^0|[^0-9]/g,'');if(value<`+item.min+`){value=`+item.value+`}else if(value>`+item.max+`){value=`+item.value+`}`" ></el-input>
- <el-input style="width:250px;" v-else-if="item.state != 0 && item.type === '0' && groupIndex === 0 " v-model="item.value" @keyup.enter.native="A01start"
+ <el-input style="width:250px;" v-else-if="item.state != 0 && item.type === '0' && groupIndex === 0 " v-model="item.value" @keyup.enter.native="A01start($event)"
class="input-box" :oninput="`value=value.replace(/^0|[^0-9]/g,'');if(value<`+item.min+`){value=`+item.value+`}else if(value>`+item.max+`){value=`+item.value+`}`" ></el-input>
<el-input style="width: 250px;" v-else-if="(item.state !== 0) && (item.type === '0') && (itemIndex === 2)" v-model="item.value" readonly class="input-box" ></el-input>
- <el-input style="width:250px;" v-else-if="item.state != 0 && item.type === '0' && groupIndex === 1" v-model="item.value" @keyup.enter.native="A02start"
+ <el-input style="width:250px;" v-else-if="item.state != 0 && item.type === '0' && groupIndex === 1" v-model="item.value" @keyup.enter.native="A02start($event)"
class="input-box" :oninput="`value=value.replace(/^0|[^0-9]/g,'');if(value<`+item.min+`){value=`+item.value+`}else if(value>`+item.max+`){value=`+item.value+`}`" ></el-input>
- <el-input style="width:250px;" v-else-if="item.state != 0 && item.type === '0' && groupIndex === 2" v-model="item.value" @keyup.enter.native="B01start"
+ <el-input style="width:250px;" v-else-if="item.state != 0 && item.type === '0' && groupIndex === 2" v-model="item.value" @keyup.enter.native="B01start($event)"
class="input-box" :oninput="`value=value.replace(/^0|[^0-9]/g,'');if(value<`+item.min+`){value=`+item.value+`}else if(value>`+item.max+`){value=`+item.value+`}`" ></el-input>
- <el-input style="width:250px;" v-else-if="item.state != 0 && item.type === '0' && groupIndex === 3" v-model="item.value" @keyup.enter.native="B02start"
+ <el-input style="width:250px;" v-else-if="item.state != 0 && item.type === '0' && groupIndex === 3" v-model="item.value" @keyup.enter.native="B02start($event)"
class="input-box" :oninput="`value=value.replace(/^0|[^0-9]/g,'');if(value<`+item.min+`){value=`+item.value+`}else if(value>`+item.max+`){value=`+item.value+`}`" ></el-input>
<el-input style="width:250px;" v-else-if="item.state != 0 && item.type === '0'" v-model="item.value"
class="input-box" :oninput="`value=value.replace(/^0|[^0-9]/g,'');if(value<`+item.min+`){value=`+item.value+`}else if(value>`+item.max+`){value=`+item.value+`}`" ></el-input>
@@ -151,7 +151,7 @@
},
- A01start(){
+ A01start(event){
const data = [];
@@ -190,9 +190,9 @@
const jsonString = JSON.stringify(jsonObject);
console.log('鎵�鏈塗ype涓�0鐨剉alue:', jsonString);
socket?.send(jsonString);
-
+event.target.blur(); // 鍙栨秷杈撳叆妗嗙劍鐐�
},
- A02start(){
+ A02start(event){
const data = [];
for (let i = 1; i < 2; i++) {
@@ -223,9 +223,9 @@
const jsonString = JSON.stringify(jsonObject);
console.log('鎵�鏈塗ype涓�0鐨剉alue:', jsonString);
socket?.send(jsonString);
-
+event.target.blur(); // 鍙栨秷杈撳叆妗嗙劍鐐�
},
- B01start(){
+ B01start(event){
const data = [];
for (let i = 2; i < 3; i++) {
@@ -248,9 +248,9 @@
const jsonString = JSON.stringify(jsonObject);
console.log('鎵�鏈塗ype涓�0鐨剉alue:', jsonString);
socket?.send(jsonString);
-
+event.target.blur(); // 鍙栨秷杈撳叆妗嗙劍鐐�
},
- B02start(){
+ B02start(event){
const data = [];
for (let i = 3; i < 4; i++) {
@@ -283,7 +283,7 @@
const jsonString = JSON.stringify(jsonObject);
console.log('鎵�鏈塗ype涓�0鐨剉alue:', jsonString);
socket?.send(jsonString);
-
+event.target.blur(); // 鍙栨秷杈撳叆妗嗙劍鐐�
},
submitDataToBackend (currentButtonName) {
if (currentButtonName === 'A01鍚姩' || currentButtonName === 'A01 Start') {
@@ -440,7 +440,7 @@
}
-
+
},
@@ -467,21 +467,26 @@
};
// 鏀跺埌娑堟伅
- 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) {
return; // 濡傛灉鏀跺埌绌烘暟鎹紝鍒欑洿鎺ヨ繑鍥烇紝涓嶆墽琛屽悗缁�昏緫
+ }
+
+ // 娣诲姞鍒ゆ柇鏉′欢锛氬鏋滃厜鏍囧湪杈撳叆妗嗗唴锛屽垯涓嶆墽琛屽悗缁�昏緫
+ if (document.activeElement.tagName.toLowerCase() === 'input') {
+ return;
}
let obj = JSON.parse(msg.data);
@@ -489,7 +494,7 @@
const weihuiling = obj.weihuiling;
- if(obj.zuhe1&& !isMouseInInputBox){
+ if(obj.zuhe1){
// console.log(obj);
--
Gitblit v1.8.0