From 73033f1d691ef89f39b175ffb96f800076975d5c Mon Sep 17 00:00:00 2001
From: ZengTao <2773468879@qq.com>
Date: 星期三, 10 四月 2024 09:11:03 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/Albania_Mes
---
springboot-vue3/src/main/resources/config.properties | 2
Albania_Mes-ui/src/lang/locales/zh-CN.json | 2
springboot-vue3/src/main/java/com/example/springboot/config/AppRunnerConfig.java | 12 +++---
Albania_Mes-ui/src/lang/locales/en-US.json | 2
Albania_Mes-ui/src/views/home/index.vue | 13 +++---
springboot-vue3/src/main/resources/application.properties | 4 +-
springboot-vue3/src/main/java/com/example/springboot/component/PlcAlbaniaServo.java | 4 -
springboot-vue3/src/main/java/com/example/springboot/component/Plcalarm.java | 5 --
springboot-vue3/src/main/java/com/example/springboot/component/Plcsign.java | 28 ++++----------
Albania_Mes-ui/src/views/Electrical/Sign.vue | 13 ++----
10 files changed, 31 insertions(+), 54 deletions(-)
diff --git a/Albania_Mes-ui/src/lang/locales/en-US.json b/Albania_Mes-ui/src/lang/locales/en-US.json
index 8ca0508..d22eba1 100644
--- a/Albania_Mes-ui/src/lang/locales/en-US.json
+++ b/Albania_Mes-ui/src/lang/locales/en-US.json
@@ -42,7 +42,7 @@
"Clear":"Clear",
- "ip":"localhost",
+ "ip":"192.168.10.97",
"systemTitle": "Login System",
"usernamePlaceholder": "Please enter username",
"passwordPlaceholder": "Please enter password",
diff --git a/Albania_Mes-ui/src/lang/locales/zh-CN.json b/Albania_Mes-ui/src/lang/locales/zh-CN.json
index 1e709c4..3e3327d 100644
--- a/Albania_Mes-ui/src/lang/locales/zh-CN.json
+++ b/Albania_Mes-ui/src/lang/locales/zh-CN.json
@@ -40,7 +40,7 @@
"Thickness":"鍘氬害",
"Clear":"娓呴櫎",
- "ip":"localhost",
+ "ip":"192.168.10.97",
"systemTitle": "鐧诲綍绯荤粺",
"usernamePlaceholder": "璇疯緭鍏ョ敤鎴峰悕",
"passwordPlaceholder": "璇疯緭鍏ュ瘑鐮�",
diff --git a/Albania_Mes-ui/src/views/Electrical/Sign.vue b/Albania_Mes-ui/src/views/Electrical/Sign.vue
index 24f4640..bde8673 100644
--- a/Albania_Mes-ui/src/views/Electrical/Sign.vue
+++ b/Albania_Mes-ui/src/views/Electrical/Sign.vue
@@ -78,8 +78,6 @@
},
methods: {
showdata () {
- console.log(1111);
- console.log(this.jsonData.sign[0].name);
// console.log(this.record.xyData);
},
@@ -128,7 +126,6 @@
this.record.params[0] = obj.sig[0];
this.record.xyData = this.jsonData.sign;
- console.log(this.jsonData.sign)
for (let a = 0; a < this.record.xyData.length; a++) {
this.record.xyData[a].value = this.record.params[0][a];
@@ -164,12 +161,12 @@
//璇█杞崲
replaceChineseWithEnglish () {
- const translation = this.$t('Signlang');
+ // const translation = this.$t('Signlang');
- if (translation != null) {
- this.record.xyData = this.record.xyData.map(item => { return { name: translation[item.name] || item.name, value: item.value,unit:item.unit }; });
- //console.log(translation);
- }
+ // if (translation != null) {
+ // this.record.xyData = this.record.xyData.map(item => { return { name: translation[item.name] || item.name, value: item.value,unit:item.unit }; });
+ // //console.log(translation);
+ // }
}
}
diff --git a/Albania_Mes-ui/src/views/home/index.vue b/Albania_Mes-ui/src/views/home/index.vue
index 0d6fdfb..94f15c1 100644
--- a/Albania_Mes-ui/src/views/home/index.vue
+++ b/Albania_Mes-ui/src/views/home/index.vue
@@ -488,13 +488,12 @@
<!--鏄剧ず-->
<div style="width:1000px;height: 720px;border: 2px solid #d1d1d1;float: left;">
<!--鐜荤拑鍥� #81b337-->
- <div :style="'top:10px;bottom: 10px;left: 10px;right: 10px;margin:'+((1000-(this.LastQueue.glasswidth / 25 * 7))/2)+'px auto;'+
- 'width:'+ (this.LastQueue.glasswidth / 25 * 7) + 'px;'+
- 'height:'+ (this.LastQueue.glassheight / 25 * 7) + 'px;'+
- 'line-height: '+ (this.LastQueue.glassheight / 25 * 7) + 'px;'+
- 'background-color: '+ (this.LastQueue.state>0?'#4CCCE4':(this.LastQueue.state==0?'#E4CA4C':'#E4CA4C'))+
- ';text-align: center;'">
- {{ this.LastQueue.glasswidth!=null?(this.LastQueue.glasswidth+"*"+this.LastQueue.glassheight):"" }}
+ <div :style="'top:10px;bottom: 10px;left: 10px;right: 10px;margin:'+((720-(this.LastQueue.glassheight / 25 * 7))/2)+'px auto;width:'
+ + (this.LastQueue.glasswidth / 25 * 7) + 'px;height:'
+ + (this.LastQueue.glassheight / 25 * 7) + 'px;line-height: '
+ + (this.LastQueue.glassheight / 25 * 7) + 'px; background-color: '
+ + (this.LastQueue.state>0?'#4CCCE4':(this.LastQueue.state==0?'#E4CA4C':'#E4CA4C'))+';text-align: center;'">
+ {{ (this.LastQueue.glasswidth+this.LastQueue.glassheight)!=0?(this.LastQueue.glasswidth+"*"+this.LastQueue.glassheight):"" }}
</div>
</div>
diff --git a/springboot-vue3/src/main/java/com/example/springboot/component/PlcAlbaniaServo.java b/springboot-vue3/src/main/java/com/example/springboot/component/PlcAlbaniaServo.java
index 13ae0ee..c2bf875 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/component/PlcAlbaniaServo.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/component/PlcAlbaniaServo.java
@@ -2,10 +2,8 @@
import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONObject;
-import org.apache.commons.io.FileUtils;
import java.io.*;
-import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@@ -13,7 +11,7 @@
public class PlcAlbaniaServo extends Thread {
private Configuration config;
- public PlcAlbaniaServo() throws IOException {
+ public PlcAlbaniaServo() throws IOException {
config = new Configuration("config.properties");
}
diff --git a/springboot-vue3/src/main/java/com/example/springboot/component/Plcalarm.java b/springboot-vue3/src/main/java/com/example/springboot/component/Plcalarm.java
index 07f299f..a1adb2b 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/component/Plcalarm.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/component/Plcalarm.java
@@ -88,7 +88,6 @@
// 鏍规嵁鍦板潃璇诲彇PCL鏁版嵁
List<Boolean> plclist = S7control.getinstance().ReadBits("DB15.0.0", Plccount);
// List<Boolean> plclist = S7control.getinstance().ReadBits(PlcAddress, Plccount);
- System.out.println(plclist);
// Boolean[] values = { false, false, true, false, true, false, true, false,
// true, false, true, false, true, false,
// true, false, true, false, true, false, true, false, true, false, true, false,
@@ -128,10 +127,6 @@
alarmMapper = WebSocketServer.applicationContext.getBean(AlarmMapper.class);
for (short i = 0; i < array1.length; i++) {
// 鏌ヨ瀵瑰簲鎶ヨ淇℃伅缁撴潫鏃堕棿涓簄ull鐨勬潯鏁�
- if(i==48){
- short result = alarmMapper.selectnullti(array1[i]);
- System.out.println(result+"-"+array1[i]);
- }
short result = alarmMapper.selectnullti(array1[i]);
// 璇诲彇鍒癙LC鐨勫�间负1骞朵笖瀵瑰簲鎶ヨ淇℃伅缁撴潫鏃堕棿涓簄ull鐨勬潯鏁扮殑鏉℃暟涓�0
//System.out.println(result);
diff --git a/springboot-vue3/src/main/java/com/example/springboot/component/Plcsign.java b/springboot-vue3/src/main/java/com/example/springboot/component/Plcsign.java
index e1120ea..1a4e0f9 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/component/Plcsign.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/component/Plcsign.java
@@ -17,6 +17,11 @@
// 鐢ㄤ簬瀛樺偍搴旂敤绋嬪簭鐨勯厤缃俊鎭�
private Configuration config;
+
+ public Plcsign() throws IOException {
+ config = new Configuration("config.properties");
+ }
+
String name = "";
Integer count = 0;
@@ -63,33 +68,16 @@
public void run() {
while (this != null) {
try {
- Thread.sleep(1000);
+ Thread.sleep(100);
} catch (InterruptedException e) {
e.printStackTrace();
}
-
-// this.readValue();
-// String PlcAddress = this.name;
-// Integer Plccount = this.count;
- // System.out.println(PlcAddress);
-
-// List<Boolean> plclist = S7control.getinstance().ReadBits(PlcAddress, Plccount);
- // List<Boolean> plclist = S7control.getinstance().ReadBits("DB102.0.0", 112);
List<String> addressList21 = Arrays.asList(config.getProperty("PlcIO.State").split(","));
List<Boolean> plclist = S7control.getinstance().readBits(addressList21);
List<String> addressListName = Arrays.asList(config.getProperty("PlcIO.Name").split(","));
-
-// Boolean[] values = { true, true, true, true, true, false, true, false,
-// true, false, true, false, true, false,
-// true, false, true, false, true, false, true, false, true, false, true, false,
-// true, false, true, false, true,
-// false, true, false, true, false,
-// true, false, true, false, true, false, true, false, null,
-// true, false,
-// true, false, true, false, true, false,
-// true, false, true, false, true, };
-// List<Boolean> plclist = new ArrayList<>(Arrays.asList(values));
+ // System.out.println("鎬ュ仠"+S7control.getinstance().ReadBits("DB10.0.5", 1));
+
if (plclist != null) {
// 灏嗚幏鍙栫殑甯冨皵绫诲瀷杞崲涓烘暣鏁扮被鍨�
List<Integer> Intlist = new ArrayList<>();
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 9089c4a..85c3f78 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
@@ -17,12 +17,12 @@
//
System.out.println("鍚姩瀹屾垚");
- // new Plcalarm().start();
- // new PLCAutoMes().start();
- // new PlcHoldNew().start();
- new Plchome().start();
- // new PlcAlbaniaServo().start();
- // new Plcsign().start();
+ new Plcalarm().start();
+ new PLCAutoMes().start();
+ new PlcHoldNew().start();
+ new Plchome().start();
+ new PlcAlbaniaServo().start();
+ new Plcsign().start();
}
diff --git a/springboot-vue3/src/main/resources/application.properties b/springboot-vue3/src/main/resources/application.properties
index 01f54d2..bb1147e 100644
--- a/springboot-vue3/src/main/resources/application.properties
+++ b/springboot-vue3/src/main/resources/application.properties
@@ -6,8 +6,8 @@
#\u6570\u636E\u5E93\u9A71\u52A8
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
#\u6570\u636E\u5E93\u8FDE\u63A5\u5730\u5740
-#spring.datasource.url=jdbc:mysql://localhost:3306/albania?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
-spring.datasource.url=jdbc:mysql://10.153.19.150:3306/albania?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
+spring.datasource.url=jdbc:mysql://localhost:3306/albania?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
+#spring.datasource.url=jdbc:mysql://10.153.19.150:3306/albania?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
#\u6570\u636E\u5E93\u7528\u6237\u540D
spring.datasource.username=root
#\u6570\u636E\u5E93\u7528\u6237\u5BC6\u7801
diff --git a/springboot-vue3/src/main/resources/config.properties b/springboot-vue3/src/main/resources/config.properties
index 614d072..6919bdc 100644
--- a/springboot-vue3/src/main/resources/config.properties
+++ b/springboot-vue3/src/main/resources/config.properties
@@ -225,7 +225,7 @@
#IO鐘舵��
PlcIO.State=DB10.2.1,DB10.2.2,DB10.2.5,DB10.10.6,DB10.11.1,DB10.11.2,DB10.11.3,DB10.11.4,DB10.11.5,DB10.11.6,DB10.12.1,DB10.12.3,DB10.10.0,DB10.10.2,DB10.10.3,DB10.10.5,DB10.26.6,DB10.30.4,DB10.33.0,DB10.30.5,DB10.33.1,DB10.30.0,DB10.30.1,DB10.30.2,DB10.30.3,DB10.32.4,DB10.32.5,DB10.32.6,DB10.32.7,DB10.32.0,DB10.32.1,DB10.32.2,DB10.32.3,DB10.27.7,DB10.24.6,DB10.38.4,DB10.41.0,DB10.38.5,DB10.41.1,DB10.35.7,DB10.38.0,DB10.38.1,DB10.38.2,DB10.38.3,DB10.40.4,DB10.40.5,DB10.40.6,DB10.40.7,DB10.40.0,DB10.40.1,DB10.40.2,DB10.40.3,DB10.0.0,DB10.0.1,DB10.0.5,DB10.0.2,DB10.0.7,DB10.0.3,DB10.28.0,DB10.36.0,DB10.1.0,DB10.18.2,DB10.18.4,DB10.19.7,DB10.18.3,DB10.18.5,DB10.20.0,DB10.18.6,DB10.19.5,DB10.19.6
-PLCIO.Name=A01Sr.Low-E,A01Sr.dec,A01Sr.Pos,A02Sr.YZero,A02Sr.YH1,A02Sr.YH2,A02Sr.YH3,A02Sr.YH4,A02Sr.LimitTop,A02Sr.LimiBottom,A02Sr.Check,A02Sr.YDec,A02Sr.Xin,A02Sr.XCheck,A02Sr.XDec,A02Sr.XPos,C01Sr.Zero,C01YV1.Bas1,C01YV1.Work1,C01.YV1.Bas2,C01.YV1.Work2,C01.YV2.Bas1,C01.YV2.Bas2,C01.YV2.Bas3,C01.YV2.Bas4,C01.YV2.Work1,C01.YV2.Work2,C01.YV2.Work3,C01.YV2.Work4,C01.YV.Blow1,C01.YV.Blow2,C01.YV.Blow3,C01.YV.Blow4,C01.SR.Limit1,C02.Sr.Zero,C02.YV1.Bas1,C02.YV1.Work1,C02.YV1.Bas2,C02.YV1.Work2,C02.Sr.limit1,C02.YV2.Bas1,C02.YV2.Bas2,C02.YV2.Bas3,C02.YV2.Bas4,C02.YV2.Work1,C02.YV2.Work2,C02.YV2.Work3,C02.YV2.Work4,C02.YV.Blow1,C02.YV.Blow2,C02.YV.Blow3,C02.YV.Blow4,bStart,bStop,bEstop,bReset,bAuto/Manual,bPause,C01.Sr.Limit2,C02.Sr.Limit2,A01.FootControl,B01.Sr.DecLeft,B01.Sr.PosLeft,B01.Sr.SafetyLeft,B01.Sr.DecRight,B01.Sr.PosRight,B01.Sr.SafetyRight,B01.Sr.TurnZero,B01.Sr.TurnLimitTop,B01.Sr.TurnLimitBottom
+PlcIO.Name=A01Sr.Low-E,A01Sr.dec,A01Sr.Pos,A02Sr.YZero,A02Sr.YH1,A02Sr.YH2,A02Sr.YH3,A02Sr.YH4,A02Sr.LimitTop,A02Sr.LimiBottom,A02Sr.Check,A02Sr.YDec,A02Sr.Xin,A02Sr.XCheck,A02Sr.XDec,A02Sr.XPos,C01Sr.Zero,C01YV1.Bas1,C01YV1.Work1,C01.YV1.Bas2,C01.YV1.Work2,C01.YV2.Bas1,C01.YV2.Bas2,C01.YV2.Bas3,C01.YV2.Bas4,C01.YV2.Work1,C01.YV2.Work2,C01.YV2.Work3,C01.YV2.Work4,C01.YV.Blow1,C01.YV.Blow2,C01.YV.Blow3,C01.YV.Blow4,C01.SR.Limit1,C02.Sr.Zero,C02.YV1.Bas1,C02.YV1.Work1,C02.YV1.Bas2,C02.YV1.Work2,C02.Sr.limit1,C02.YV2.Bas1,C02.YV2.Bas2,C02.YV2.Bas3,C02.YV2.Bas4,C02.YV2.Work1,C02.YV2.Work2,C02.YV2.Work3,C02.YV2.Work4,C02.YV.Blow1,C02.YV.Blow2,C02.YV.Blow3,C02.YV.Blow4,bStart,bStop,bEstop,bReset,bAuto/Manual,bPause,C01.Sr.Limit2,C02.Sr.Limit2,A01.FootControl,B01.Sr.DecLeft,B01.Sr.PosLeft,B01.Sr.SafetyLeft,B01.Sr.DecRight,B01.Sr.PosRight,B01.Sr.SafetyRight,B01.Sr.TurnZero,B01.Sr.TurnLimitTop,B01.Sr.TurnLimitBottom
#A01鍙傛暟
PlcA01.param=DB10.1664,DB10.1668,DB10.1672,DB10.1676,DB10.1680
--
Gitblit v1.8.0