From 0613a5b982c6521560ea17eda7c07bb97e6ec5e9 Mon Sep 17 00:00:00 2001
From: wuyouming666 <2265557248@qq.com>
Date: 星期三, 17 一月 2024 09:14:43 +0800
Subject: [PATCH] 修改交互状态页面
---
springboot-vue3/src/main/java/com/example/springboot/component/PlcInteractionState.java | 2
springboot-vue3/src/main/resources/config.properties | 4
CanadaMes-ui/src/views/Electrical/Sign.vue | 2
springboot-vue3/src/main/java/com/example/springboot/config/AppRunnerConfig.java | 4
CanadaMes-ui/src/configuration/InteractionState.json | 113 ++++++++++++++++++++++++-------------
springboot-vue3/src/main/java/com/example/springboot/component/PLCAutomaticParameterSettingReview.java | 2
CanadaMes-ui/src/views/Electrical/ManualonePosition.vue | 8 ++
CanadaMes-ui/src/views/Electrical/InteractionState.vue | 6 +-
springboot-vue3/src/main/java/com/example/springboot/component/PlcParameter1Review.java | 12 ++-
9 files changed, 96 insertions(+), 57 deletions(-)
diff --git a/CanadaMes-ui/src/configuration/InteractionState.json b/CanadaMes-ui/src/configuration/InteractionState.json
index 910b317..c89820d 100644
--- a/CanadaMes-ui/src/configuration/InteractionState.json
+++ b/CanadaMes-ui/src/configuration/InteractionState.json
@@ -16,7 +16,7 @@
"sending": 0,
"type": "0",
"unit": "mm",
- "value":"0",
+ "value":"",
"address":"DB100.48",
"count":10,
"min":0,
@@ -28,7 +28,7 @@
"sending": 0,
"unit": "mm",
"type": "0" ,
- "value":"0",
+ "value":"",
"min":0,
"max":22000
},
@@ -38,7 +38,7 @@
"sending": 0,
"unit": "mm",
"type": "0" ,
- "value":"0",
+ "value":"",
"min":0,
"max":22000
},
@@ -48,7 +48,7 @@
"sending": 0,
"unit": "mm",
"type": "0" ,
- "value":"0",
+ "value":"",
"min":0,
"max":22000
},
@@ -58,7 +58,7 @@
"sending": 0,
"unit": "mm",
"type": "0" ,
- "value":"0",
+ "value":"",
"min":0,
"max":22000
},
@@ -68,7 +68,7 @@
"sending": 0,
"unit": "mm",
"type": "0" ,
- "value":"0",
+ "value":"",
"min":0,
"max":22000
}
@@ -91,7 +91,7 @@
"sending": 0,
"type": "0" ,
"unit": "mm",
- "value":"0",
+ "value":"",
"address":"DB100.68",
"count":10,
"min":0,
@@ -103,7 +103,7 @@
"sending": 0,
"unit": "mm",
"type": "0" ,
- "value":"0",
+ "value":"",
"min":0,
"max":22000
},
@@ -113,7 +113,7 @@
"sending": 0,
"unit": "mm",
"type": "0" ,
- "value":"0",
+ "value":"",
"min":0,
"max":22000
},
@@ -123,7 +123,7 @@
"sending": 0,
"unit": "mm",
"type": "0" ,
- "value":"0",
+ "value":"",
"min":0,
"max":22000
},
@@ -133,7 +133,7 @@
"sending": 0,
"unit": "mm",
"type": "0" ,
- "value":"0",
+ "value":"",
"min":0,
"max":22000
},
@@ -143,7 +143,7 @@
"sending": 0,
"unit": "mm",
"type": "0" ,
- "value":"0",
+ "value":"",
"min":0,
"max":22000
},
@@ -153,7 +153,7 @@
"sending": 0,
"unit": "mm",
"type": "0" ,
- "value":"0",
+ "value":"",
"min":0,
"max":22000
}
@@ -175,7 +175,7 @@
"unit": "mm",
"address":"DB100.0",
"count":3,
- "value":"0",
+ "value":"",
"min":0,
"max":9999
},
@@ -185,7 +185,7 @@
"sending": 0,
"unit": "mm",
"type": "0",
- "value":"0",
+ "value":"",
"min":0,
"max":9999
},
@@ -195,7 +195,7 @@
"sending": 0,
"unit": "mm",
"type": "0",
- "value":"0",
+ "value":"",
"min":0,
"max":9999
},
@@ -205,7 +205,7 @@
"sending": 0,
"unit": "mm",
"type": "0",
- "value":"0",
+ "value":"",
"min":0,
"max":9999
},
@@ -215,7 +215,7 @@
"sending": 0,
"unit": "mm",
"type": "0",
- "value":"0",
+ "value":"",
"min":0,
"max":9999
},
@@ -225,7 +225,7 @@
"sending": 0,
"unit": "mm",
"type": "0",
- "value":"0",
+ "value":"",
"min":0,
"max":9999
}
@@ -247,7 +247,7 @@
"sending": 0,
"unit": "mm",
"type": "0",
- "value":"0",
+ "value":"",
"min":0,
"max":9999
},
@@ -257,7 +257,7 @@
"sending": 0,
"unit": "mm",
"type": "0",
- "value":"0",
+ "value":"",
"min":0,
"max":9999
},
@@ -267,7 +267,7 @@
"sending": 0,
"unit": "mm",
"type": "0",
- "value":"0",
+ "value":"",
"min":0,
"max":9999
},
@@ -277,7 +277,7 @@
"sending": 0,
"unit": "mm",
"type": "0",
- "value":"0",
+ "value":"",
"min":0,
"max":9999
}
@@ -293,22 +293,43 @@
}, "type": "1"
},
{
- "name": "B01姹囨姤搴旂瓟",
+ "name": "B01MES姹囨姤搴旂瓟",
"read": 22,
"sending": 0,
"unit": "mm",
"type": "0",
- "value":"0",
+ "value":"",
"min":0,
"max":9999
},
{
- "name": "B02姹囨姤搴旂瓟",
+ "name": "B02MES姹囨姤搴旂瓟",
"read": 22,
"sending": 0,
"unit": "mm",
"type": "0",
- "value":"0",
+ "value":"",
+ "min":0,
+ "max":9999
+ },
+
+ {
+ "name": "B01PLC鍙戦�佸簲绛�",
+ "read": 22,
+ "sending": 0,
+ "unit": "mm",
+ "type": "0",
+ "value":"",
+ "min":0,
+ "max":9999
+ },
+ {
+ "name": "B02PLC鍙戦�佸簲绛�",
+ "read": 22,
+ "sending": 0,
+ "unit": "mm",
+ "type": "0",
+ "value":"",
"min":0,
"max":9999
},
@@ -318,7 +339,7 @@
"sending": 0,
"unit": "mm",
"type": "0",
- "value":"0",
+ "value":"",
"min":0,
"max":9999
},
@@ -328,9 +349,23 @@
"sending": 0,
"unit": "mm",
"type": "0",
- "value":"0",
+ "value":"",
"min":0,
"max":9999
+ }
+
+
+
+
+
+ ],
+ [
+
+ {
+ "title": {
+ "name": "MES浠诲姟淇℃伅"
+
+ }, "type": "1"
},
{
"name": "B02灏忚溅褰撳墠浣嶇疆",
@@ -338,7 +373,7 @@
"sending": 0,
"unit": "mm",
"type": "0",
- "value":"0",
+ "value":"",
"min":0,
"max":9999
},
@@ -348,27 +383,28 @@
"sending": 0,
"unit": "mm",
"type": "0",
- "value":"0",
+ "value":"",
"min":0,
"max":9999
},
- {
+ {
"name": "A01 ID1",
"read": 22,
"sending": 0,
"unit": "mm",
"type": "0",
- "value":"0",
+ "value":"",
"min":0,
"max":9999
},
+
{
"name": "A01 ID2",
"read": 22,
"sending": 0,
"unit": "mm",
"type": "0",
- "value":"0",
+ "value":"",
"min":0,
"max":9999
},
@@ -378,7 +414,7 @@
"sending": 0,
"unit": "mm",
"type": "0",
- "value":"0",
+ "value":"",
"min":0,
"max":9999
},
@@ -388,7 +424,7 @@
"sending": 0,
"unit": "mm",
"type": "0",
- "value":"0",
+ "value":"",
"min":0,
"max":9999
},
@@ -398,13 +434,10 @@
"sending": 0,
"unit": "mm",
"type": "0",
- "value":"0",
+ "value":"",
"min":0,
"max":9999
}
-
-
-
]
diff --git a/CanadaMes-ui/src/views/Electrical/InteractionState.vue b/CanadaMes-ui/src/views/Electrical/InteractionState.vue
index 940ab9d..456c315 100644
--- a/CanadaMes-ui/src/views/Electrical/InteractionState.vue
+++ b/CanadaMes-ui/src/views/Electrical/InteractionState.vue
@@ -121,7 +121,7 @@
v-for="(dataGroup, groupIndex) in jsonData"
:key="groupIndex"
>
- <el-card class="json-block" style="width: 300px; margin-bottom: 2px;height:500px" >
+ <el-card class="json-block" style="width: 300px; margin-bottom: 2px;height:360px" >
<div
class="button-row"
style="display: flex; justify-content: space-between"
@@ -226,7 +226,7 @@
const zuhe1=obj.zuhe1;
-
+ const specialChars = /[^\w\s]/g;
if(obj.zuhe1){
//console.log(obj);
@@ -237,7 +237,7 @@
const subitem = item[j];
if (subitem.type === '0' ) {
if (j - 1 < zuhe1[i].length) {
- subitem.value = zuhe1[i][j - 1];
+ subitem.value = zuhe1[i][j - 1].replace(specialChars, "");
} else {
subitem.value = 'N/A';
}
diff --git a/CanadaMes-ui/src/views/Electrical/ManualonePosition.vue b/CanadaMes-ui/src/views/Electrical/ManualonePosition.vue
index 879c4c2..79d41fa 100644
--- a/CanadaMes-ui/src/views/Electrical/ManualonePosition.vue
+++ b/CanadaMes-ui/src/views/Electrical/ManualonePosition.vue
@@ -336,6 +336,7 @@
console.log('鍙嶈浆鍚�:', reversedJsonString);
socket?.send(reversedJsonString);
}, 1000);
+ this.$forceUpdate();
}
@@ -368,6 +369,7 @@
console.log('鍙嶈浆鍚�:', reversedJsonString);
socket?.send(reversedJsonString);
}, 1000);
+ this.$forceUpdate();
}
@@ -400,6 +402,7 @@
console.log('鍙嶈浆鍚�:', reversedJsonString);
socket?.send(reversedJsonString);
}, 1000);
+ this.$forceUpdate();
}
@@ -432,6 +435,7 @@
console.log('鍙嶈浆鍚�:', reversedJsonString);
socket?.send(reversedJsonString);
}, 1000);
+ this.$forceUpdate();
}
@@ -490,7 +494,7 @@
console.log('鍙嶈浆鍚�:', reversedJsonString);
socket?.send(reversedJsonString);
}, 1000);
-
+ this.$forceUpdate();
}
if (currentButtonName === '鍥為浂' || currentButtonName === 'Home') {
@@ -586,7 +590,7 @@
if(obj.zuhe1){
-// console.log(obj);
+ console.log(obj);
// 鎵ц鏇存柊閫昏緫
for (let i = 0; i < 4; i++) {
diff --git a/CanadaMes-ui/src/views/Electrical/Sign.vue b/CanadaMes-ui/src/views/Electrical/Sign.vue
index 5dc1d7d..160e9f0 100644
--- a/CanadaMes-ui/src/views/Electrical/Sign.vue
+++ b/CanadaMes-ui/src/views/Electrical/Sign.vue
@@ -205,7 +205,7 @@
}
.kuai_sb {
- text-align: center;
+ text-align: left;
width:18%;
margin-bottom: 5px;
}
diff --git a/springboot-vue3/src/main/java/com/example/springboot/component/PLCAutomaticParameterSettingReview.java b/springboot-vue3/src/main/java/com/example/springboot/component/PLCAutomaticParameterSettingReview.java
index c9d5b49..b1c3859 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/component/PLCAutomaticParameterSettingReview.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/component/PLCAutomaticParameterSettingReview.java
@@ -108,7 +108,7 @@
JSONObject jsonObject = new JSONObject();
// new short[]{1,1, 1, 1, 1, 1, 2, 33, 2,3, 4, 5}
// new short[]{0,0, 0, 0, 0, 0, 0, 0, 0, 0}
-
+System.out.println(plcParameterObject.getPlcParameterValues(addresses));
jsonObject.append("params", plcParameterObject.getPlcParameterValues(addresses));
jsonObject.append("dache1", plcParameterObject.getPlcParameter("A01A02TRAVELPOSVelocityAUTO").getValue());
jsonObject.append("xiaoche", plcParameterObject.getPlcParameter("B01B02TRAVELPOSVelocityAUTO").getValue());
diff --git a/springboot-vue3/src/main/java/com/example/springboot/component/PlcInteractionState.java b/springboot-vue3/src/main/java/com/example/springboot/component/PlcInteractionState.java
index 216a4a5..416ae25 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/component/PlcInteractionState.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/component/PlcInteractionState.java
@@ -27,7 +27,7 @@
public void run() {
while (this != null) {
try {
- Thread.sleep(500);
+ Thread.sleep(100);
} catch (InterruptedException e) {
e.printStackTrace();
diff --git a/springboot-vue3/src/main/java/com/example/springboot/component/PlcParameter1Review.java b/springboot-vue3/src/main/java/com/example/springboot/component/PlcParameter1Review.java
index f3737e1..fbfba3c 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/component/PlcParameter1Review.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/component/PlcParameter1Review.java
@@ -25,7 +25,7 @@
private ResourceLoader resourceLoader;
private volatile static PlcParameter1Review instance = null;
- private PlcParameter1Review() {
+ public PlcParameter1Review() {
init();
}
@@ -94,9 +94,9 @@
e.printStackTrace();
}
byte[] getplcvlues = S7control.getinstance().ReadByte(plcParameterObject.getPlcAddressBegin(), plcParameterObject.getPlcAddressLength());
- plcParameterObject.setPlcParameterList(getplcvlues);
- int index = plcParameterObject.getPlcParameter("conveyorVelocity(AutoFAST)").getAddressIndex();
- S7control.getinstance().WriteWord(plcParameterObject.getPlcParameter("conveyorVelocity(AutoFAST)").getAddress(index), (short) 100);
+ plcParameterObject.setPlcParameterList(getplcvlues);
+ // int index = plcParameterObject.getPlcParameter("conveyorVelocity(AutoFAST)").getAddressIndex();
+ // S7control.getinstance().WriteWord(plcParameterObject.getPlcParameter("conveyorVelocity(AutoFAST)").getAddress(index), (short) 100);
List<String> addresses = new ArrayList<>();
addresses.add("conveyorVelocity(AutoFAST)");
@@ -105,7 +105,9 @@
addresses.add("A01A02TURNJOGVelocity");
addresses.add("A01A02TRAVELJOGVelocity");
- plcParameterObject.getPlcParameterValues(addresses);
+
+ System.out.println(plcParameterObject.getPlcParameterValues(addresses));
+
JSONObject jsonObject = new JSONObject();
diff --git a/springboot-vue3/src/main/java/com/example/springboot/config/AppRunnerConfig.java b/springboot-vue3/src/main/java/com/example/springboot/config/AppRunnerConfig.java
index f913657..e56419f 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/config/AppRunnerConfig.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/config/AppRunnerConfig.java
@@ -36,10 +36,10 @@
new PlcManualonePosition2().start();
new PlcServoManualone().start();
new PLCManualJog().start();
- new Plclog().start();
+ //new Plclog().start();
new PlcInteractionState().start();
-
+new PlcParameter1Review().start();
// new PLCAutomaticParameterSettingReview().start();
}
}
\ No newline at end of file
diff --git a/springboot-vue3/src/main/resources/config.properties b/springboot-vue3/src/main/resources/config.properties
index 1c82dd2..4a5935c 100644
--- a/springboot-vue3/src/main/resources/config.properties
+++ b/springboot-vue3/src/main/resources/config.properties
@@ -211,14 +211,14 @@
#杩涚墖
PlcInteractionState.MESImporttask=DB105.0,DB105.2,DB105.4,DB105.6,DB105.8,DB105.20-33
-PlcInteractionState.PLCImporttask=DB106.8,DB106.4,DB106.6,DB106.24,DB106.26-39,DB103.40-57,DB103.58-71
+PlcInteractionState.PLCImporttask=DB106.8,DB106.4,DB106.6,DB106.24,DB106.26-39,DB103.44-57,DB103.58-71
#鍑虹墖浠诲姟
PlcInteractionState.MESProductiontask=DB105.10,DB105.12,DB105.14,DB105.16,DB105.18,DB105.34-47
PlcInteractionState.PLCProductiontask=DB106.20,DB106.16,DB106.18,DB103.156-169
#浠诲姟淇℃伅
-PlcInteractionState.MEStaskinformation=DB105.48,DB105.50,DB106.42,DB106.48,DB106.50,DB106.58,DB103.128-141,DB103.142-155,DB103.156-169,DB103.184-197,DB103.212-225
+PlcInteractionState.MEStaskinformation=DB105.48,DB105.50,DB105.48,DB105.50,DB106.42,DB106.48,DB106.50,DB106.58,DB103.128-141,DB103.142-155,DB103.156-169,DB103.184-197,DB103.212-225
--
Gitblit v1.8.0