From afbddf62e45bce6fd9428cddec36382c75cee53a Mon Sep 17 00:00:00 2001
From: wu <731351411@qq.com>
Date: 星期四, 07 十二月 2023 08:38:09 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/CanadaMes
---
springboot-vue3/src/main/resources/config.properties | 34 ++
CanadaMes-ui/src/views/Electrical/Positioning2.vue | 29 +
CanadaMes-ui/src/views/home/index.vue | 205 +++++------
springboot-vue3/src/main/java/com/example/springboot/component/PlcParameter2.java | 12
springboot-vue3/src/main/java/com/example/springboot/entity/alarmmg.java | 13
CanadaMes-ui/src/views/Electrical/Parameter2.vue | 20
springboot-vue3/src/main/java/com/example/springboot/entity/Glass.java | 4
springboot-vue3/src/main/java/com/example/springboot/controller/SpianController.java | 2
springboot-vue3/src/main/java/com/example/springboot/entity/StorageCage.java | 2
CanadaMes-ui/src/views/user/index.vue | 13
springboot-vue3/src/main/java/com/example/springboot/component/PlcServoManualone.java | 247 +++-----------
springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java | 4
springboot-vue3/src/main/java/com/example/springboot/component/Configuration.java | 28 +
CanadaMes-ui/src/views/Electrical/Positioning1.vue | 7
CanadaMes-ui/src/api/user.js | 8
springboot-vue3/src/main/java/com/example/springboot/controller/RolePermissionController.java | 1
springboot-vue3/src/main/java/com/example/springboot/entity/Out_slice.java | 29 +
springboot-vue3/src/main/java/com/example/springboot/entity/StorageTask.java | 2
springboot-vue3/src/main/java/com/example/springboot/component/PlcParameter1.java | 2
CanadaMes-ui/src/views/Electrical/ManualonePosition2.vue | 2
springboot-vue3/src/main/java/com/example/springboot/entity/vo/RolePermissionVo.java | 1
CanadaMes-ui/src/views/role/index.vue | 73 ++-
springboot-vue3/src/main/java/com/example/springboot/entity/OrderOut.java | 6
springboot-vue3/src/main/java/com/example/springboot/entity/Queue.java | 26
springboot-vue3/src/main/java/com/example/springboot/entity/north_glass_buffer1.java | 4
springboot-vue3/src/main/java/com/example/springboot/component/PlcHold.java | 14
CanadaMes-ui/src/views/Electrical/ManualonePosition.vue | 2
springboot-vue3/src/main/java/com/example/springboot/mapper/SpianMapper.java | 5
springboot-vue3/src/main/java/com/example/springboot/service/SpianService.java | 6
CanadaMes-ui/src/views/power/index.vue | 8
CanadaMes-ui/src/lang/locales/zh-CN.json | 7
springboot-vue3/src/main/java/com/example/springboot/controller/UserController.java | 14
springboot-vue3/src/main/java/com/example/springboot/config/AppRunnerConfig.java | 61 +--
CanadaMes-ui/src/lang/locales/en-US.json | 13
CanadaMes-ui/src/views/Electrical/ManualJog.vue | 13
CanadaMes-ui/src/views/Electrical/Parameter1.vue | 7
CanadaMes-ui/src/views/Electrical/ServoManualone.vue | 39 +
springboot-vue3/src/main/java/com/example/springboot/entity/RolePermission.java | 3
springboot-vue3/src/main/java/com/example/springboot/entity/CarPosition.java | 8
39 files changed, 488 insertions(+), 486 deletions(-)
diff --git a/CanadaMes-ui/src/api/user.js b/CanadaMes-ui/src/api/user.js
index 21a65ad..990b18a 100644
--- a/CanadaMes-ui/src/api/user.js
+++ b/CanadaMes-ui/src/api/user.js
@@ -14,6 +14,14 @@
}
+export function currentUsername() {
+ return request({
+ url: '/api/user/currentUsername',
+ method: 'get',
+
+ })
+ }
+
export function resetPass(data) {
return request({
url: '/api/user/resetPass',
diff --git a/CanadaMes-ui/src/lang/locales/en-US.json b/CanadaMes-ui/src/lang/locales/en-US.json
index 0030697..e6c052b 100644
--- a/CanadaMes-ui/src/lang/locales/en-US.json
+++ b/CanadaMes-ui/src/lang/locales/en-US.json
@@ -1,6 +1,6 @@
{
- "ip": "192.168.10.21",
+ "ip": "localhost",
"systemTitle": "Login System",
"usernamePlaceholder": "Please enter username",
"passwordPlaceholder": "Please enter password",
@@ -111,6 +111,8 @@
"鏈夋晥": "Valid",
"鏃犳晥": "Invalid",
"璇疯緭鍏ュ悕绉�": "Please enter a name",
+ "璇疯緭鍏ヨ鑹�": "Please enter a role",
+ "璇疯緭鍏ユ潈闄愭弿杩�":"Please enter a permission description",
"闀垮害鍦� 2 鍒� 15 涓瓧绗�": "Length between 2 and 15 characters",
"璇疯緭鍏ョ姸鎬�": "Please enter the status",
"娣诲姞瑙掕壊": "Add Role",
@@ -301,7 +303,7 @@
"Confirm Modification":"Confirm modification",
"The glass ID already exists in the loading queue":"The glass ID already exists in the loading queue",
"This glass ID already exists in the sorting cage":"This glass ID already exists in the sorting cage",
- "Production queue":"Production queue",
+ "Outing Queue":"Outing Queue",
"Enter the Frame No":"Enter the Frame No",
"Frame No":"Frame No",
"Glass information corresponding to aluminum frame":"Glass information corresponding to aluminum frame",
@@ -316,6 +318,9 @@
"Start":"Start",
"Sequence":"Sequence",
"Position":"Position",
+ "Top":"Top",
+ "Up":"Up",
+ "Down":"Down",
"ServoManualone": {
"A01 鎵�鍦ㄦ牸瀛�": "A01 Current Grid",
"鏁伴噺": "Quantity",
@@ -344,7 +349,7 @@
"A01~A02杈撻��": "A01~A02 Conveying",
"B01~B02杈撻��": "B01~B02 Conveying",
- "D01~D02杈撻��": "D01~D02 Conveying",
+ "D01~D06杈撻��": "D01~D06 Conveying",
"缈昏浆鐐瑰姩閫熷害": "Flip Jog Speed",
"灏忚溅鐐瑰姩閫熷害": "Cart Jog Speed",
"鏈�楂橀�熷害": "Max Speed",
@@ -465,7 +470,7 @@
"A02鎵嬪姩浣嶇疆": "A02 turn Target Angle(Manual)",
"A02瀹氫綅閫熷害": "A02 TURN POS Velocity manual",
"A02缈昏浆瀹炴椂浣嶇疆": "A02 turn Actual angle",
- "A02缈昏浆鍚姩": "SERVE TURN",
+ "A02缈昏浆鍚姩": "A02 SERVE TURN",
"A02澶嶄綅": "Reset",
"鏈洖闆�": "NotZero",
"鍥為浂": "Zero"
diff --git a/CanadaMes-ui/src/lang/locales/zh-CN.json b/CanadaMes-ui/src/lang/locales/zh-CN.json
index 28dcca4..05c7ab5 100644
--- a/CanadaMes-ui/src/lang/locales/zh-CN.json
+++ b/CanadaMes-ui/src/lang/locales/zh-CN.json
@@ -1,5 +1,5 @@
{
- "ip": "192.168.10.21",
+ "ip": "localhost",
"systemTitle": "鐧诲綍绯荤粺",
"usernamePlaceholder": "璇疯緭鍏ョ敤鎴峰悕",
"passwordPlaceholder": "璇疯緭鍏ュ瘑鐮�",
@@ -293,7 +293,7 @@
"Confirm Modification": "纭淇敼",
"The glass ID already exists in the loading queue": "涓婄墖闃熷垪宸插瓨鍦ㄦ鐜荤拑id",
"This glass ID already exists in the sorting cage": "鐞嗙墖绗煎唴宸插瓨鍦ㄦ鐜荤拑id",
- "Production queue":"涓婄墖闃熷垪",
+ "Outing Queue":"鍑虹墖闃熷垪",
"Enter the Aluminum Frame No":"璇疯緭鍏ラ摑妗唅d",
"Frame No":"閾濇id",
"Glass information corresponding to aluminum frame":"閾濇瀵瑰簲鐨勭幓鐠冧俊鎭�",
@@ -310,6 +310,9 @@
"Start":"寮�濮�",
"Sequence":"椤哄簭",
"Position":"浣嶇疆",
+ "Top":"缃《",
+ "Up":"涓婄Щ",
+ "Down":"涓嬬Щ",
"langparameter": {
"conveyor Velocity(Auto FAST)": "D01-D06 鐨甫杈撻�佽嚜鍔ㄥ揩閫�",
"conveyor Velocity(Auto SLOW)": "D01-D06 鐨甫杈撻�佽嚜鍔ㄦ參閫�",
diff --git a/CanadaMes-ui/src/views/Electrical/ManualJog.vue b/CanadaMes-ui/src/views/Electrical/ManualJog.vue
index 11e6754..9f88e38 100644
--- a/CanadaMes-ui/src/views/Electrical/ManualJog.vue
+++ b/CanadaMes-ui/src/views/Electrical/ManualJog.vue
@@ -51,10 +51,11 @@
<div class="button-row" style="display: flex; justify-content: flex-start;flex-wrap:wrap;">
<div v-for="(item, itemIndex) in dataGroup" :key="itemIndex" style="margin: 10px;">
- <el-button v-if="item.button" :name="item.button.name" :class="getStatusClass(item.button.value)"
- class="action-button" @click="updateButtonValue(dataGroup, itemIndex); submitDataToBackend();">{{
- item.button.name
- }}</el-button>
+ <el-button v-if="item.button" :name="item.button.name"
+ :class="{ 'dow': false, 'op': item.button.value === 1 }" class="action-button"
+ @click="updateButtonValue(dataGroup, itemIndex); submitDataToBackend();">{{
+ item.button.name
+ }}</el-button>
</div>
</div>
</el-card>
@@ -171,6 +172,7 @@
// console.log(parms);
+if(obj.params){
for (let i = 0; i < jsonData2.length; i++) {
let arr = jsonData2[i];
@@ -181,6 +183,7 @@
}
}
+ }
@@ -242,7 +245,7 @@
.action-button {
margin-right: 10px;
- background: #66b1ff;
+ background: #A0A0A0;
color: #FFF;
}
diff --git a/CanadaMes-ui/src/views/Electrical/ManualonePosition.vue b/CanadaMes-ui/src/views/Electrical/ManualonePosition.vue
index a99e44e..8548381 100644
--- a/CanadaMes-ui/src/views/Electrical/ManualonePosition.vue
+++ b/CanadaMes-ui/src/views/Electrical/ManualonePosition.vue
@@ -338,7 +338,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 < 4; i++) {
jsonData2[i].forEach((item, index) => {
diff --git a/CanadaMes-ui/src/views/Electrical/ManualonePosition2.vue b/CanadaMes-ui/src/views/Electrical/ManualonePosition2.vue
index 076b1cb..22ac330 100644
--- a/CanadaMes-ui/src/views/Electrical/ManualonePosition2.vue
+++ b/CanadaMes-ui/src/views/Electrical/ManualonePosition2.vue
@@ -277,7 +277,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) => {
diff --git a/CanadaMes-ui/src/views/Electrical/Parameter1.vue b/CanadaMes-ui/src/views/Electrical/Parameter1.vue
index 27d8f9a..7401d83 100644
--- a/CanadaMes-ui/src/views/Electrical/Parameter1.vue
+++ b/CanadaMes-ui/src/views/Electrical/Parameter1.vue
@@ -97,6 +97,7 @@
updateButtonValue (dataGroup, itemIndex) {
this.$set(dataGroup[itemIndex].button, 'value', 1); // 鐐瑰嚮鎸夐挳鍚庡皢鍊兼敼涓�1
},
+ //鎻愪氦鏁版嵁鍒板悗绔�
submitDataToBackend () {
const inputData = this.jsonData.map(dataGroup => {
return dataGroup.map(item => {
@@ -160,10 +161,11 @@
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))) {
- const parms = obj.params;
+ const parms = obj.params;
const fanzhuan = obj.fanzhuan;
const xiaoche = obj.xiaoche;
+ if (parms && inputBox && Array.from(inputBox).every(box => !box.contains(target))) {
+
// console.log(obj);
// console.log('parms:', parms);
// console.log('fanzhuan:', fanzhuan);
@@ -213,6 +215,7 @@
}
},
+ //璇█鏇挎崲
replaceChineseWithEnglish() {
diff --git a/CanadaMes-ui/src/views/Electrical/Parameter2.vue b/CanadaMes-ui/src/views/Electrical/Parameter2.vue
index 695107d..6dde045 100644
--- a/CanadaMes-ui/src/views/Electrical/Parameter2.vue
+++ b/CanadaMes-ui/src/views/Electrical/Parameter2.vue
@@ -66,9 +66,10 @@
<div class="item-row">
- <span class="name" v-if="groupIndex === 13" style="width:250px;">{{ item.name }}</span>
+ <span class="name" v-if="groupIndex === 12" style="width:250px;">{{ item.name }}</span>
<span class="name" v-else style="width:150px;">{{ item.name }}</span>
- <el-input v-if="item.type === '0'" v-model="item.value" readonly="readonly" style="width:400px;" class="input-box"></el-input>
+
+ <el-input v-if="item.type === '0'" v-model="item.value" readonly="readonly" style="width:300px;" class="input-box"></el-input>
@@ -212,11 +213,9 @@
let obj = JSON.parse(msg.data);
const jsonData2 = this.jsonData;
- // console.log(jsonData2);
- // 濡傛灉榧犳爣涓嶅湪杈撳叆妗嗗唴锛屾洿鏂拌緭鍏ユ鐨勫��
- // this.submitDataToBackend()
+
const parms = obj.params;
- // const xiaoche = obj.params[3];
+
// console.log(obj);
@@ -226,8 +225,9 @@
const inputBox = document.querySelectorAll('.action-button');
const target = event.target;
- if (inputBox && Array.from(inputBox).every(box => !box.contains(target))) {
+ if (parms && inputBox && Array.from(inputBox).every(box => !box.contains(target))) {
//娓呴櫎id
+
for (let i = 0; i < jsonData2.length; i++) {
let arr = jsonData2[i];
for (let j = 0; j < arr.length; j++) {
@@ -240,6 +240,7 @@
}
+
//ID
const specialChars = /[^\w\s]/g; // 姝e垯琛ㄨ揪寮忓尮閰嶉潪瀛楁瘝銆佹暟瀛椼�佷笅鍒掔嚎鍜岀┖鏍肩殑瀛楃
@@ -402,6 +403,11 @@
</script>
<style scoped>
+ html,body{
+width:100%;
+height:85%;
+
+}
.item-row {
display: flex;
align-items: center;
diff --git a/CanadaMes-ui/src/views/Electrical/Positioning1.vue b/CanadaMes-ui/src/views/Electrical/Positioning1.vue
index 68caa1e..0911f6f 100644
--- a/CanadaMes-ui/src/views/Electrical/Positioning1.vue
+++ b/CanadaMes-ui/src/views/Electrical/Positioning1.vue
@@ -99,6 +99,7 @@
updateButtonValue (dataGroup, itemIndex) {
this.$set(dataGroup[itemIndex].button, 'value', 1); // 鐐瑰嚮鎸夐挳鍚庡皢鍊兼敼涓�1
},
+ //鎻愪氦鏁版嵁鍒板悗绔�
submitDataToBackend () {
const inputData = this.jsonData.map(dataGroup => {
return dataGroup.map(item => {
@@ -161,10 +162,11 @@
document.addEventListener('mouseover', function (event) {
const inputBox = document.querySelectorAll('.el-card__body');
const target = event.target;
- if (inputBox && Array.from(inputBox).every(box => !box.contains(target))) {
+ const parms = obj.params;
+ if (parms && inputBox && Array.from(inputBox).every(box => !box.contains(target))) {
// 濡傛灉榧犳爣涓嶅湪杈撳叆妗嗗唴锛屾洿鏂拌緭鍏ユ鐨勫��
// this.submitDataToBackend()
- const parms = obj.params;
+
// console.log(parms)
@@ -208,6 +210,7 @@
}
},
+ //璇█鏇挎崲
replaceChineseWithEnglish() {
diff --git a/CanadaMes-ui/src/views/Electrical/Positioning2.vue b/CanadaMes-ui/src/views/Electrical/Positioning2.vue
index 889be3b..0e6ca75 100644
--- a/CanadaMes-ui/src/views/Electrical/Positioning2.vue
+++ b/CanadaMes-ui/src/views/Electrical/Positioning2.vue
@@ -44,7 +44,7 @@
}}</router-link>
</el-breadcrumb>
- <el-row :gutter="18" class='card'>
+ <el-row :gutter="18" class='card'>
<el-col :span="7" v-for="(dataGroup, groupIndex) in jsonData" :key="groupIndex">
<el-card class="json-block">
<div class="button-row" style="display: flex; justify-content: space-between;">
@@ -81,11 +81,15 @@
jsonData: data // 鍔犺浇鏁翠釜data.json鏂囦欢浣滀负jsonData
}
},
- activated(){
+ activated(){
+ // 婵�娲荤粍浠舵椂璋冪敤
+ // 鍒濆鍖朩ebSocket
this.initWebSocket ();
+ // 鑾峰彇褰撳墠璇█
const language = this.$i18n.locale;
console.log(language);
+ // 濡傛灉褰撳墠璇█鏄嫳璇紝鍒欏皢涓枃鏇挎崲涓鸿嫳鏂�
if (language === 'en-US') {
this.replaceChineseWithEnglish();
}
@@ -95,14 +99,19 @@
updateButtonValue (dataGroup, itemIndex) {
this.$set(dataGroup[itemIndex].button, 'value', 1); // 鐐瑰嚮鎸夐挳鍚庡皢鍊兼敼涓�1
},
- submitDataToBackend () {
+ //鎻愪氦鏁版嵁鍒板悗绔�
+ submitDataToBackend () {
+ // 灏唈sonData杞崲涓烘暟缁�
const inputData = this.jsonData.map(dataGroup => {
return dataGroup.map(item => {
+ // 濡傛灉鏄暟瀛楃被鍨嬶紝鍒欒浆鎹负鏁存暟
if (item.type === '0') {
return { value: parseInt(item.value) };
+ // 濡傛灉鏄寜閽被鍨嬶紝鍒欒浆鎹负鏁存暟
} else if (item.button) {
return { value: parseInt(item.title.value) };
}
+ // 鍚﹀垯杩斿洖null
return null;
});
});
@@ -110,9 +119,11 @@
// 灏唅nputData杞崲涓烘暣鏁版暟缁�
const integerArray = inputData.map(dataGroup => {
return dataGroup.map(item => {
+ // 濡傛灉item涓嶄负null锛屽垯杩斿洖item.value
if (item !== null) {
return item.value;
}
+ // 鍚﹀垯杩斿洖null
return null;
});
});
@@ -157,12 +168,14 @@
document.addEventListener('mouseover', function (event) {
const inputBox = document.querySelectorAll('.el-card__body');
const target = event.target;
- if (inputBox && Array.from(inputBox).every(box => !box.contains(target))) {
+ const parms = obj.params;
+ if ( parms && inputBox && Array.from(inputBox).every(box => !box.contains(target))) {
// 濡傛灉榧犳爣涓嶅湪杈撳叆妗嗗唴锛屾洿鏂拌緭鍏ユ鐨勫��
// this.submitDataToBackend()
- const parms = obj.params;
+
// console.log(parms)
+
let index = 0;
for (let i = 0; i < jsonData2.length; i++) {
let arr = jsonData2[i];
@@ -198,6 +211,7 @@
}
},
+ //璇█鏇挎崲
replaceChineseWithEnglish() {
@@ -223,9 +237,12 @@
// console.log(this.jsonData)
},
- send () {
+ send () {
+ // 鍚戞湇鍔″櫒鍙戦�佹秷鎭�
+
+ // 鍚戞湇鍔″櫒鍙戦�佹秷鎭�
socket?.send(JSON.stringify(this.messagepack));
},
diff --git a/CanadaMes-ui/src/views/Electrical/ServoManualone.vue b/CanadaMes-ui/src/views/Electrical/ServoManualone.vue
index 4512f87..0eea377 100644
--- a/CanadaMes-ui/src/views/Electrical/ServoManualone.vue
+++ b/CanadaMes-ui/src/views/Electrical/ServoManualone.vue
@@ -121,6 +121,8 @@
}
},
submitDataToBackend(currentButtonName) {
+
+//A01鍗婅嚜鍔ㄥ惎鍔ㄦ彁浜�
if (currentButtonName === 'A01鍗婅嚜鍔ㄥ惎鍔�' ||currentButtonName === 'A01 Semi-Auto Start') {
const data = [];
@@ -159,6 +161,7 @@
socket?.send(jsonString);
}
+ //A02鍗婅嚜鍔ㄥ惎鍔� 鎻愪氦
if (currentButtonName === 'A02鍗婅嚜鍔ㄥ惎鍔�' ||currentButtonName === 'A02 Semi-Auto Start') {
const data2 = [];
@@ -199,6 +202,8 @@
}
+ //澶嶄綅鎻愪氦
+
if (currentButtonName === '澶嶄綅' || currentButtonName === 'Reset') {
const data2 = [];
const resetButtonValues = this.jsonData.map(item => {
@@ -227,7 +232,7 @@
// )
}
-
+////鍥為浂鎻愪氦
if (currentButtonName === '鍥為浂' || currentButtonName === 'Home') {
const data3 = [];
const resetButtonValues3 = this.jsonData.map(item => {
@@ -256,7 +261,7 @@
}
-
+//A01鍗婅嚜鍔ㄦ彁浜�
if (currentButtonName === 'A01鍗婅嚜鍔�' || currentButtonName === 'A01 Semi-Auto' ) {
const elements = document.getElementsByClassName('special-class');
@@ -327,18 +332,26 @@
if (currentButtonName === 'A02鍗婅嚜鍔�' || currentButtonName === 'A02 Semi-Auto' ) {
+ // 鑾峰彇鎵�鏈塩lass涓簊pecial-class2鐨勫厓绱�
const elements = document.getElementsByClassName('special-class2');
const data = [];
+ // 閬嶅巻鎵�鏈夊厓绱�
for (let i = 0; i < elements.length; i++) {
+ // 濡傛灉鍏冪礌闅愯棌
if (elements[i].style.display === 'none') {
+ // 鏄剧ず鍏冪礌
elements[i].style.display = ''; // 鏄剧ず鍏冪礌
this.zhi2=1;
+ // 閬嶅巻jsonData
for (let i = 0; i < this.jsonData.length; i++) {
let arr = this.jsonData[i];
+ // 閬嶅巻arr
for (let j = 0; j < arr.length; j++) {
let obj2 = arr[j];
+ // 濡傛灉button鐨刵ame涓篈02鍗婅嚜鍔ㄦ垨鑰匒02 Semi-Auto
if (obj2.button && (obj2.button.name === "A02鍗婅嚜鍔�" || obj2.button.name === "A02 Semi-Auto")) {
+ // 璁剧疆button鐨剉alue涓�1
obj2.button.value = 1;
// console.log(obj2.button.value)
}
@@ -348,13 +361,18 @@
}
}else{
+ // 濡傛灉鍏冪礌鏄剧ず
elements[i].style.display = 'none';
this.zhi2=0;
+ // 閬嶅巻jsonData
for (let i = 0; i < this.jsonData.length; i++) {
let arr = this.jsonData[i];
+ // 閬嶅巻arr
for (let j = 0; j < arr.length; j++) {
let obj2 = arr[j];
+ // 濡傛灉button鐨刵ame涓篈02鍗婅嚜鍔ㄦ垨鑰匒02 Semi-Auto
if (obj2.button && (obj2.button.name === "A02鍗婅嚜鍔�" || obj2.button.name === "A02 Semi-Auto")) {
+ // 璁剧疆button鐨剉alue涓�0
obj2.button.value = 0;
// console.log(obj2.button.value)
}
@@ -365,8 +383,10 @@
}
}
+ // 灏唞hi2娣诲姞鍒癲ata鏁扮粍涓�
data.push([this.zhi2]);
+ // 灏哾ata鏁扮粍娣诲姞鍒癹sonObject涓�
data.unshift([],[],[],[],[],[],[]);
@@ -422,7 +442,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 < 6; i++) {
jsonData2[i].forEach((item, index) => {
@@ -433,7 +453,7 @@
}
-
+//鏁呴殰鏇存柊
for (let i = 0; i < jsonData2.length; i++) {
let arr = jsonData2[i];
@@ -448,7 +468,7 @@
}
-
+// 澶嶄綅鏇存柊
for (let i = 0; i < jsonData2.length; i++) {
let arr = jsonData2[i];
for (let j = 0; j < arr.length; j++) {
@@ -461,6 +481,7 @@
}
+//鏈洖闆舵洿鏂�
for (let i = 3; i < jsonData2.length; i++) {
let arr2 = jsonData2[i];
@@ -479,6 +500,7 @@
}
// console.log(jsonData2)
+//杩涚墖id
jsonData2.forEach((item) => {
item.forEach((subItem) => {
if (subItem.read === 9999) {
@@ -486,7 +508,7 @@
}
});
});
-
+//鍙栫墖id
jsonData2.forEach((item) => {
item.forEach((subItem) => {
if (subItem.read === 8888) {
@@ -527,6 +549,7 @@
socket?.send(JSON.stringify(this.messagepack));
},
+ //鏇挎崲璇█
replaceChineseWithEnglish() {
@@ -558,7 +581,11 @@
</script>
<style scoped>
+html,body{
+width:100%;
+height:85%;
+}
.item-row {
display: flex;
diff --git a/CanadaMes-ui/src/views/home/index.vue b/CanadaMes-ui/src/views/home/index.vue
index 4005110..88190e1 100644
--- a/CanadaMes-ui/src/views/home/index.vue
+++ b/CanadaMes-ui/src/views/home/index.vue
@@ -199,6 +199,10 @@
font-size: 25px;
}
+@media screen and (min-width: 1900px) {
+ .blocks{transform: scale(1.5,1.05);width: 1210px;}
+}
+
.el-message-box__btns {
padding: 0px 15px 0;
text-align: right;
@@ -315,7 +319,7 @@
<div class="blocks-img2"></div>
<div class="blocks-img3"></div>
<el-button class="orderbutton1" type="primary" @click="showform2()">{{ $t('OrderInfo') }}</el-button>
- <el-button class="orderbutton2" type="primary" @click="showform6()">{{ $t('Production queue') }}</el-button>
+ <el-button class="orderbutton2" type="primary" @click="showform6()">{{ $t('Outing Queue') }}</el-button>
<!-- <div style="display:flex;position: absolute;float:left;z-index: 999;top:112px;left:328px;">
<div :class="getStatusClass(item.state)" v-for="(item,index) in cagelist1" :key="item['date']"
@@ -419,14 +423,14 @@
<el-button type="primary" @click="showcageinfo(1)">{{ $t('Query') }}</el-button>
<el-table :data="cageinfo.slice((currentPages - 1) * pagesizes, currentPages * pagesizes)" :height="700" border
style="width: 100%;overflow: auto;">
- <el-table-column :width="90" prop="cage" :label="$t('Cage No')"></el-table-column>
- <el-table-column :width="90" prop="cell" :label="$t('Slot No')"></el-table-column>
- <el-table-column :width="55" prop="tier" :label="$t('The Side')"></el-table-column>
- <el-table-column :width="145" prop="glassId" :label="$t('Barcode')"></el-table-column>
- <el-table-column :width="100" prop="orderId" :label="$t('Order No')"></el-table-column>
- <el-table-column :width="80" prop="listId" :label="$t('List No')"></el-table-column>
- <el-table-column :width="100" prop="boxId" :label="$t('Box No')"></el-table-column>
- <el-table-column :width="100" prop="state" :label="$t('State')">
+ <el-table-column :min-width="50" prop="cage" :label="$t('Cage No')"></el-table-column>
+ <el-table-column :min-width="50" prop="cell" :label="$t('Slot No')"></el-table-column>
+ <el-table-column :min-width="55" prop="tier" :label="$t('The Side')"></el-table-column>
+ <el-table-column :min-width="145" prop="glassId" :label="$t('Barcode')"></el-table-column>
+ <el-table-column :min-width="100" prop="orderId" :label="$t('Order No')"></el-table-column>
+ <el-table-column :min-width="80" prop="listId" :label="$t('List No')"></el-table-column>
+ <el-table-column :min-width="100" prop="boxId" :label="$t('Box No')"></el-table-column>
+ <el-table-column :min-width="90" prop="state" :label="$t('State')">
<template slot-scope='scope'>
{{
scope.row.state == 1 ? $t('Normal') : scope.row.state == 2 ? $t('Entering') : scope.row.state == 3 ?
@@ -434,12 +438,12 @@
}}
</template>
</el-table-column>
- <el-table-column :width="150" prop="lengthWidth" :label="$t('Dim')">
+ <el-table-column :min-width="150" prop="lengthWidth" :label="$t('Dim')">
<template slot-scope='scope'>
{{ scope.row.glassWidthMm }}{{ scope.row.glassWidthMm > 0 ? "*" : "" }}{{ scope.row.glassHeightMm }}
</template>
</el-table-column>
- <el-table-column :width="280" :label="$t('Operate')">
+ <el-table-column :min-width="250" :label="$t('Operate')">
<template slot-scope='scope'>
<el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
@click="deleteglass(scope.row.glassId, scope.row.state)">{{ $t('Delete') }}</el-button>
@@ -614,11 +618,9 @@
</template>
</el-dialog>
- <el-dialog :visible.sync="dialogFormVisible6" :title="$t('Production queue')" top="5vh">
- <!-- <el-button type="primary" @click="showform7()">{{ $t('Increase') }}</el-button> -->
+ <el-dialog :visible.sync="dialogFormVisible6" :title="$t('Outing Queue')" top="5vh">
<el-button type="primary" @click="isAllowQueueState()">{{ this.isAllowQueue == true ? $t('Start') : $t('Stop')
}}</el-button>
-
<el-table :data="this.OutSlice" :height="700" :span-method="objectSpanMethod" border
style="width: 100%;overflow: auto;">
<el-table-column prop="glassId" :label="$t('Barcode')"></el-table-column>
@@ -637,16 +639,17 @@
<el-table-column prop="barcode" :label="$t('Frame No')"></el-table-column>
<el-table-column :width="280" :label="$t('Operate')">
<template slot-scope='scope'>
- <el-button type="text" size="small" @click="getTopMove(scope.row, scope.$index)"
+ <el-button type="text" size="small" @click="getTopMove(scope.row, scope.$index)" style="font-size: 15px;"
:disabled="(scope.$index == 0 || isAllowQueue == true || scope.row.state == 1)">
- 缃《
+ {{$t('Top')}}
</el-button>
- <el-button type="text" size="small" @click="getUpMove(scope.row, scope.$index)"
+ <el-button type="text" size="small" @click="getUpMove(scope.row, scope.$index)" style="font-size: 15px;"
:disabled="(scope.$index == 0 || isAllowQueue == true || scope.row.state == 1)">
- 涓婄Щ
+ {{$t('Up')}}
</el-button>
- <el-button type="text" size="small" @click="getDownMove(scope.row, scope.$index)"
- :disabled="(OutSlice.length - 1 == scope.$index || isAllowQueue == true || scope.row.state == 1)">涓嬬Щ
+ <el-button type="text" size="small" @click="getDownMove(scope.row, scope.$index)" style="font-size: 15px;"
+ :disabled="(OutSlice.length - 1 == scope.$index || isAllowQueue == true || scope.row.state == 1)">
+ {{$t('Down')}}
</el-button>
<el-button type="primary" style="padding: 4px 10px;font-size: 12px;" :disabled="isAllowQueue"
@click="deleteproductionqueueglass(scope.row.barcode)">{{ $t('Delete') }}</el-button>
@@ -671,9 +674,7 @@
<el-table-column prop="storageCage.cage" :label="$t('Cage No')"></el-table-column>
<el-table-column prop="storageCage.cell" :label="$t('Slot No')"></el-table-column>
<el-table-column prop="storageCage.tier" :label="$t('The Side')"></el-table-column>
-
<el-table-column prop="FrameNo" :label="$t('Frame No')"></el-table-column>
-
<el-table-column prop="Flip" :label="$t('Flip')"></el-table-column>
<el-table-column prop="out_slice.state" :label="$t('In the queue')">
<template slot-scope='scope'>
@@ -795,7 +796,7 @@
console.log("鎮ㄧ殑娴忚鍣ㄤ笉鏀寔WebSocket");
} else {
//console.log("鎮ㄧ殑娴忚鍣ㄦ敮鎸乄ebSocket");
- let socketUrl = "ws://" + this.$t('ip')+":8888" + "/springboot-vue3/api/talk/" + viewname;
+ let socketUrl = "ws://" + this.$t('ip') + ":8888" + "/springboot-vue3/api/talk/" + viewname;
if (socket != null) {
socket.close();
socket = null;
@@ -833,41 +834,39 @@
if (this.isAllowQueue == true) {
this.OutSlice = obj.listoutslice[0];
}
+ //鑾峰彇涓婄墖浣嶇幓鐠冧俊鎭�
this.loadglassheight = obj.loadglassheight;
if (obj.zhuangtai != null) {
this.zhuangtai = obj.zhuangtai[0];
}
- // if (this.dialogFormVisible7 == true) {
- // this.showform7();
- // } else {
- // if (obj.FrameNo != null && obj.FrameNo != "") {
- // this.framebarcode = obj.FrameNo[0];
- // this.showform7();
- // this.addoutslice();
- // }
- // }
+ //涓婄墖浣嶇幓鐠冧俊鎭�
if (obj.form2 != null && obj.form2 != "") {
this.form2 = obj.form2[0];
} else {
this.form2 = {};
}
+
+ //鏄惁闇�瑕佹墜鍔ㄧ‘璁や笂鐗�
+ this.isConfirm = obj.isConfirm[0];
+ //鎵爜浣嶇幓鐠冧俊鎭�
if (obj.form3 != null && obj.form3 != "" && obj.state[0] == 1) {
this.form3 = obj.form3[0];
} else {
this.form3 = {};
}
- this.isConfirm = obj.isConfirm[0];
if (obj.form3 != null && obj.form3 != "" && obj.state[0] == 0) {
this.form5 = obj.form3[0];
this.showform3();
- this.Sizerange(this.form5);
+ this.Sizerange(this.form5, 3);
} else {
- this.Sizerange(this.form5);
+ this.Sizerange(this.form5, 3);
}
+ //鏁版嵁搴撹繛鎺ユ槸鍚︽甯�
if (obj.dbconnected == "false") {
this.text = this.$t('DataBase Connection failed');
}
+ //鐞嗙墖绗肩幓鐠冧俊鎭�
if (this.dialogFormVisible3 == true) {
SelectCageInfo(this.cageglassid).then(res => {
this.cageinfo = res.data.cageinfo;
@@ -893,7 +892,8 @@
home().then(res => {
this.tableData = res.data.list;
});
- SelectCageInfo(1).then(res => {
+ //鍔犺浇鐞嗙墖绗肩幓鐠冧俊鎭�
+ SelectCageInfo("").then(res => {
this.cageinfo = res.data.cageinfo;
this.currentPages = 1;
});
@@ -1019,62 +1019,58 @@
},
//鑾峰彇鎵爜浣嶅拰涓婄墖浣嶆暟鎹�
SelectGlassByGlassIDs(parameter) {
-
this.showform3();
if (parameter == 1) {
SelectGlassByGlassID(this.glassid2).then(res => {
if (res.data.form != null) {
- this.form4 = res.data.form;
- this.$message.success(this.$t('query was successful'));
- this.Sizerange(this.form4);
+ if (res.data.form.glassId != null) {
+ this.form4 = res.data.form;
+ this.$message.success(this.$t('query was successful'));
+ this.Sizerange(this.form4, 2);
+ } else {
+ this.$message.error(this.$t('There is no such glass'));
+ }
+
} else {
this.$message.error(this.$t('There is no such glass'));
}
- if (this.form4.length > 0) {
- if (this.form4.glassId == "") {
- this.disabled = false;
- } else {
- this.disabled = true;
- }
- }
-
});
} else {
SelectGlassByGlassID(this.glassid1).then(res => {
if (res.data.form != null) {
- this.form5 = res.data.form;
- this.$message.success(this.$t('query was successful'));
- this.Sizerange(this.form5);
+ if (res.data.form.glassId != null) {
+ this.form5 = res.data.form;
+ this.$message.success(this.$t('query was successful'));
+ this.Sizerange(this.form5, 1);
+ } else {
+ this.$message.error(this.$t('There is no such glass'));
+ }
} else {
this.$message.error(this.$t('There is no such glass'));
}
- if (this.form5.length > 0) {
- if (this.form5.glassId == "") {
- this.disabled = false;
- } else {
- this.disabled = true;
- }
- }
-
});
}
},
+ //鏌ヨ瀹㈡埛鐜荤拑淇℃伅
selectglassinfo() {
SelectGlass(this.orderid).then(res => {
this.currentPage = 1;
this.GlassInfo = res.data.glass;
});
},
+ //鏄剧ず瀹㈡埛鐜荤拑淇℃伅
showform2() {
SelectGlass(this.orderid).then(res => {
this.GlassInfo = res.data.glass;
});
this.dialogFormVisible4 = true;
},
+ //鏄剧ず鍑虹墖闃熷垪
showform6() {
this.dialogFormVisible6 = true;
},
+ //鏄剧ず閾濇瀵瑰簲鐜荤拑淇℃伅
showform7() {
//鏌ヨ閾濇id瀵瑰簲鐜荤拑淇℃伅
SelectAluminumFrameInfoById(this.framebarcode).then(res => {
@@ -1111,6 +1107,7 @@
this.dialogFormVisible1 = false;
this.form1 = {};
},
+ //鍙栨秷鎿嶄綔鏃跺叧闂〉闈�
cancel3() {
this.dialogFormVisible5 = false;
this.form1 = {};
@@ -1144,7 +1141,6 @@
showcageinfo(cage) {
cage = this.cageglassid;
SelectCageInfo(cage).then(res => {
-
this.cageinfo = res.data.cageinfo;
this.currentPages = 1;
this.dialogFormVisible3 = true;
@@ -1282,8 +1278,6 @@
message: this.$t('Operation canceled')
});
});
- }, handleEdit(index, row) {
- console.log(index, row);
},
//琛ㄦ牸鍒犻櫎
handleDelete(index, row) {
@@ -1363,9 +1357,11 @@
}
});
},
+ //閾濇瀵瑰簲鐜荤拑淇℃伅娣诲姞閾濇id鍜屾槸鍚︽坊鍔犲埌闃熷垪
CheckBoxchange(glassid, isChecked) {
this.AluminumFrame.forEach(item => { item.barcode = glassid; item.isCheck = isChecked })
},
+ //娣诲姞鍒板嚭鐗囬槦鍒�
addoutslice() {
var dats_ = new Array();
this.AluminumFrame.forEach(item => {
@@ -1383,7 +1379,9 @@
this.$message.success(this.$t('Operation successful'));
}
});
- }, getTopMove(row, index) {
+ },
+ //缃《
+ getTopMove(row, index) {
let Sequence = [];
this.OutSlice.forEach(item => {
Sequence.push(item.sequence);
@@ -1485,6 +1483,7 @@
}
this.UpdateSequence(Sequence);
},
+ //淇敼椤哄簭
UpdateSequence(Sequence) {
let i = 0;
this.OutSlice.forEach(item => {
@@ -1509,16 +1508,6 @@
});
}
,
- arraySpanMethod({ row, column, rowIndex, columnIndex }) {
- console.log(row, column);
- if (rowIndex % 2 === 0) {
- if (columnIndex === 0) {
- return [1, 2];
- } else if (columnIndex === 1) {
- return [0, 0];
- }
- }
- },
//鍚堝苟琛�
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
// console.log(row, column, "ss");
@@ -1533,7 +1522,7 @@
if (rowIndex != 0) {
barcode2 = arrOutSlice[rowIndex - 1].barcode;
}
- if (columnIndex === 9) {
+ if (columnIndex === 10) {
if (barcode != barcode2) {
// this.FrameNoFlag = barcode;
for (let i = rowIndex; i < this.OutSlice.length; i++) {
@@ -1558,46 +1547,40 @@
}
},
//鍒ゆ柇鐜荤拑鏄惁瓒呭嚭鑼冨洿
- Sizerange(Glass) {
+ Sizerange(Glass, position) {
if ((Glass.glassheight < 380 || Glass.glasswidth < 390 || Glass.glassheight > 1810 || Glass.glasswidth > 2760) || (Glass.glassheight < 390 || Glass.glasswidth < 380 || Glass.glassheight > 2760 || Glass.glasswidth > 1810)) {
- // if (this.disabled == false) {
+ this.$alert(this.$t('The glass size is not within the range'), this.$t('confirm'), {
+ confirmButtonText: this.$t('Yes'),
+ type: 'info',
+ callback: (action) => {
+ this.$message({
+ type: 'info',
+ message: `action: ${ action }`
+ }).then(
+ this.DeleteBarcodeGlass()
+ );
+ }
+ });
+ if (position == 1 || position == 3) {
+ this.disabled1 = true;
+ } else {
this.disabled = true;
- // this.$message.error(this.$t('The glass size is not within the range'));
- this.$alert(this.$t('The glass size is not within the range'), this.$t('confirm'), {
- confirmButtonText: this.$t('Yes'),
- type:'info',
- callback: action => {
- this.$message({
- type: 'info',
- action: action
- }).then(
- this.DeleteBarcodeGlass()
- );
- }
- });
- // }
- // this.$message(this.$t('The glass size is not within the range'), this.$t('confirm'), {
- // // confirmwidth: 7000,
- // // height: 8000,
- // confirmButtonText: this.$t('Yes'),
- // type: 'info'
- // }).then(() => {
- // this.$message.success(this.$t('Operation successful'));
- // }).catch(() => {
- // this.$message({
- // type: 'warning',
- // message: this.$t('Operation canceled')
- // });
- // });
- // }
- this.disabled1 = true;
- } else {
- this.disabled1 = false;
+ }
+ } else {
+ if (position == 1 || position == 3) {
+ this.disabled1 = false;
+ } else {
+ this.disabled = false;
+ }
+ if (position == 3&&this.isConfirmState==true) {
+ this.InsertQueueGlass(1);
+ }
+ }
+ },
+ //娓呯┖寰呯‘璁ょ幓鐠冧俊鎭�
+ DeleteBarcodeGlass() {
+ this.form5 = {};
}
- },
- DeleteBarcodeGlass(){
- this.form5={};
}
-}
}
</script>
\ No newline at end of file
diff --git a/CanadaMes-ui/src/views/power/index.vue b/CanadaMes-ui/src/views/power/index.vue
index eb274a9..013b980 100644
--- a/CanadaMes-ui/src/views/power/index.vue
+++ b/CanadaMes-ui/src/views/power/index.vue
@@ -183,15 +183,15 @@
// 娣诲姞鏉冮檺鐨勯獙璇佽鍒�
powerRules: {
roleId: [
- {required: true, message: '璇疯緭鍏ヨ鑹�', trigger: 'blur'}
+ {required: true, message: this.$t('璇疯緭鍏ヨ鑹�'), trigger: 'blur'}
],
permissionId: [
- {required: true, message: '璇疯緭鍏ユ潈闄愭弿杩�', trigger: 'blur'},
+ {required: true, message: this.$t('璇疯緭鍏ユ潈闄愭弿杩�'), trigger: 'blur'},
]
},
options: [
- {label: '鐢熸晥', value: 1},
- {label: '鏃犳晥', value: 0}
+ {label: this.$t('鐢熸晥'), value: 1},
+ {label: this.$t('鏃犳晥'), value: 0}
],
roleList: [],
permissionList: []
diff --git a/CanadaMes-ui/src/views/role/index.vue b/CanadaMes-ui/src/views/role/index.vue
index 22d50ae..ae70468 100644
--- a/CanadaMes-ui/src/views/role/index.vue
+++ b/CanadaMes-ui/src/views/role/index.vue
@@ -114,14 +114,14 @@
<el-form label-width="130px">
<el-form-item :label="$t('langPermissions')" prop="permissionList">
<el-checkbox-group v-model="selectedPermissions">
- <el-checkbox
- v-for="(permission, index) in permissionList"
- :key="index"
- :label="permission.name"
- :checked="permission.state === 1"
- @change="updatePermissionState(permission.name, $event)"
- >{{ permission.name }}</el-checkbox>
- </el-checkbox-group>
+ <el-checkbox
+ v-for="(permission, index) in permissionList"
+ :key="index"
+ :label="permission.name"
+ @change="updatePermissionState(permission.name, $event)"
+ >{{ permission.name }}</el-checkbox>
+</el-checkbox-group>
+
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
@@ -178,16 +178,16 @@
// 娣诲姞瑙掕壊鐨勯獙璇佽鍒�
addRoleRules: {
name: [
- {required: true, message: '璇疯緭鍏ュ悕绉�', trigger: 'blur'},
- {min: 2, max: 15, message: '闀垮害鍦� 2 鍒� 15 涓瓧绗�', trigger: 'blur'}
+ {required: true, message: this.$t('璇疯緭鍏ュ悕绉�'), trigger: 'blur'},
+ {min: 2, max: 15, message: this.$t('闀垮害鍦� 2 鍒� 15 涓瓧绗�'), trigger: 'blur'}
],
state: [
- {required: true, message: '璇疯緭鍏ョ姸鎬�', trigger: 'blur'}
+ {required: true, message: this.$t('璇疯緭鍏ョ姸鎬�'), trigger: 'blur'}
]
},
options: [
- {label: '鏈夋晥', value: 1},
- {label: '鏃犳晥', value: 0}
+ {label: this.$t('鏈夋晥'), value: 1},
+ {label: this.$t('鏃犳晥'), value: 0}
]
}
},
@@ -251,22 +251,37 @@
},
- showPermissionDialog(role) {
- this.selectedPermissions=[];
- this.permissionList=[];
-
- getById2({ roleId: role.id }).then((res) => {
- this.permissionList = res.data.permissionList;
-
+ // 鍦� showPermissionDialog 鏂规硶涓紝鍙皢閫変腑鐨勬潈闄愬悕绉版坊鍔犲埌 selectedPermissions 鏁扮粍涓�
+showPermissionDialog(role) {
+ this.selectedPermissions = [];
+ this.permissionList = [];
+
+ getById2({ roleId: role.id }).then((res) => {
+ this.permissionList = res.data.permissionList;
+ // 鍙湁鐘舵�佷负 1 鐨勬潈闄愬悕绉颁細琚坊鍔犲埌 selectedPermissions 鏁扮粍涓�
+ this.selectedPermissions = this.permissionList
+ .filter(permission => permission.state === 1)
+ .map(permission => permission.name);
+ this.permissionDialogVisible = true;
+ });
+},
- this.selectedPermissions = this.permissionList.map(({ name, state }) => ({
- name,
- state: state === 1,
- }));
- console.log(this.selectedPermissions);
- this.permissionDialogVisible = true;
- });
- },
+// 鍦� updatePermissionState 鏂规硶涓紝鏍规嵁澶嶉�夋鐨勫嬀閫夌姸鎬佹洿鏂� selectedPermissions 鏁扮粍
+// updatePermissionState(name, isChecked) {
+// if (isChecked) {
+// // 濡傛灉澶嶉�夋琚嬀閫夛紝灏嗘潈闄愬悕绉版坊鍔犲埌鏁扮粍涓�
+// if (!this.selectedPermissions.includes(name)) {
+// this.selectedPermissions.push(name);
+// }
+// } else {
+// // 濡傛灉澶嶉�夋琚彇娑堝嬀閫夛紝灏嗘潈闄愬悕绉颁粠鏁扮粍涓Щ闄�
+// const index = this.selectedPermissions.indexOf(name);
+// if (index !== -1) {
+// this.selectedPermissions.splice(index, 1);
+// }
+// }
+// },
+
// 鍙栨秷缂栬緫鏉冮檺寮瑰嚭妗�
cancelEditPermissions() {
this.permissionDialogVisible = false;
@@ -277,6 +292,7 @@
if (permission) {
permission.state = isChecked ? 1 : 0;
}
+
},
@@ -293,6 +309,7 @@
// 鎴愬姛鏇存柊鏉冮檺鍚庢墽琛岀殑鎿嶄綔
const 鏇存柊鐘舵�佹垚鍔� = this.$t('鏇存柊鐘舵�佹垚鍔�');
this.$message.success(鏇存柊鐘舵�佹垚鍔�);
+ this.permissionDialogVisible = false;
});
},
// 灞曠ず娣诲姞瑙掕壊鐨勫璇濇
diff --git a/CanadaMes-ui/src/views/user/index.vue b/CanadaMes-ui/src/views/user/index.vue
index ba3de75..834c562 100644
--- a/CanadaMes-ui/src/views/user/index.vue
+++ b/CanadaMes-ui/src/views/user/index.vue
@@ -137,7 +137,7 @@
<script>
-import { getById, removeById, saveOrUpdate, selectPage, resetPass } from "../../api/user";
+import { getById, removeById, saveOrUpdate, selectPage, resetPass,currentUsername } from "../../api/user";
import { select } from "../../api/role";
import LanguageMixin from '../../lang/LanguageMixin'
@@ -193,6 +193,8 @@
},
created () {
this.getUserList();
+ this.getyonghu();
+
},
methods: {
getUserList () {
@@ -239,6 +241,7 @@
const successMessage = this.$t('updateSuccessMessage');
this.$message.success(successMessage);
});
+
},
resetPassword (info) {
this.$confirm(this.$t('confirmResetPassword'), this.$t('resetPassword'), {
@@ -265,6 +268,14 @@
this.roleList = res.data;
});
},
+
+getyonghu () {
+ currentUsername().then(res => {
+ console.log(res)
+ });
+
+
+},
removeUserById (user) {
// 寮规璇㈤棶鐢ㄦ埛鏄惁鍒犻櫎鍒嗙被
this.$confirm(this.$t('confirmDeleteCategory'), this.$t('prompt'), {
diff --git a/springboot-vue3/src/main/java/com/example/springboot/component/Configuration.java b/springboot-vue3/src/main/java/com/example/springboot/component/Configuration.java
new file mode 100644
index 0000000..9a0165c
--- /dev/null
+++ b/springboot-vue3/src/main/java/com/example/springboot/component/Configuration.java
@@ -0,0 +1,28 @@
+package com.example.springboot.component;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Properties;
+
+// Configuration 绫荤敤浜庡姞杞介厤缃枃浠跺苟鎻愪緵璁块棶閰嶇疆椤圭殑鏂规硶銆�
+public class Configuration {
+ private Properties properties; // Properties 瀵硅薄锛岀敤浜庡瓨鍌ㄩ厤缃枃浠朵腑鐨勯敭鍊煎銆�
+
+ // 鏋勯�犲嚱鏁帮紝鏍规嵁浼犲叆鐨勬枃浠跺悕鍔犺浇閰嶇疆鏂囦欢銆�
+ public Configuration(String fileName) throws IOException {
+ // 浣跨敤绫诲姞杞藉櫒鑾峰彇璧勬簮鏂囦欢鐨勮緭鍏ユ祦銆�
+ InputStream inputStream = getClass().getClassLoader().getResourceAsStream(fileName);
+ // 濡傛灉杈撳叆娴佷负null锛岃〃绀烘湭鎵惧埌鏂囦欢锛屾姏鍑篎ileNotFoundException銆�
+ if (inputStream == null) {
+ throw new FileNotFoundException("Property file '" + fileName + "' not found in the classpath");
+ }
+ properties = new Properties(); // 瀹炰緥鍖朠roperties瀵硅薄銆�
+ properties.load(inputStream); // 浠庤緭鍏ユ祦鍔犺浇閰嶇疆椤广��
+ }
+
+ // 鏍规嵁閰嶇疆椤圭殑閿幏鍙栧叾瀵瑰簲鐨勫�笺��
+ public String getProperty(String key) {
+ return properties.getProperty(key);
+ }
+}
diff --git a/springboot-vue3/src/main/java/com/example/springboot/component/PlcHold.java b/springboot-vue3/src/main/java/com/example/springboot/component/PlcHold.java
index d40420e..764e5d8 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/component/PlcHold.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/component/PlcHold.java
@@ -1,16 +1,8 @@
package com.example.springboot.component;
-
-import java.sql.SQLException;
-import java.util.ArrayList;
-import java.util.Base64;
import java.util.List;
-
-import org.apache.ibatis.javassist.compiler.ast.Symbol;
import org.springframework.beans.factory.annotation.Autowired;
-
import com.example.springboot.service.JdbcConnections;
import com.example.springboot.service.SpianService;
-import com.example.springboot.entity.Glass;
import com.example.springboot.entity.north_glass_buffer1;
import com.example.springboot.mapper.AlarmMapper;
import com.example.springboot.mapper.SpianMapper;
@@ -23,7 +15,7 @@
private JdbcConnections jdbcConnections;
private SpianMapper spianMapper;
private SpianService spianService;
-
+
@Override
public void run() {
boolean inglassbegin = false;
@@ -148,7 +140,7 @@
outglassbegin = false;
}
- if (outstate == true & glass.getbarcode() != null) { // 褰撳嚭鐗囪溅绌洪棽涓旀湁鍑虹墖浠诲姟寰呭畬鎴愭椂
+ if (outstate == true & glass.getbarcode() != null&&Plchome.isAllowQueue==true) { // 褰撳嚭鐗囪溅绌洪棽涓旀湁鍑虹墖浠诲姟寰呭畬鎴愭椂
// 鍒ゆ柇鏈変袱涓嚭鐗囨垨璋冩嫧浠诲姟鏃跺苟涓斿嚭鐗噄d鍜屾湭瀹屾垚鐨勫嚭鐗囦换鍔d涓嶄竴鏍锋椂鎵ц鍑虹墖
if (!writedstrIdOut.toString().equals(glass.getbarcode().toString())) {
spianService.selectout2(glass.getbarcode().toString());
@@ -158,7 +150,7 @@
// 鍒ゆ柇褰撳墠鏄惁鏈夋湭鎵ц鐨勪换鍔�
int outnum = spianMapper.SelectOutSliceshu();
// 褰撴病鏈変换鍔℃墽琛屽苟涓斿嚭鐗囪溅绌洪棽鏃�
- if (outnum == 0 && outstate == true) {
+ if (outnum == 0 && outstate == true&&Plchome.isAllowQueue==true) {
// 鍒ゆ柇閾濇鍑虹墖闃熷垪琛ㄦ槸鍚︽湁寰呭嚭鐗囩殑鐜荤拑
String outglassid = spianMapper.SelectOutSlice();
if (outglassid != null) {
diff --git a/springboot-vue3/src/main/java/com/example/springboot/component/PlcParameter1.java b/springboot-vue3/src/main/java/com/example/springboot/component/PlcParameter1.java
index e2fa2b8..18ce165 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/component/PlcParameter1.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/component/PlcParameter1.java
@@ -85,7 +85,7 @@
addresses.add("DB100.38");
addresses.add("DB100.40");
List<Short> arraylist = S7control.getinstance().readWords(addresses);
-
+//缈昏浆
List<Short> fanzhuan1 = S7control.getinstance().ReadWord("DB100.8", 1);
List<Short> xiaoche1 = S7control.getinstance().ReadWord("DB100.12", 1);
// Short[] values1 = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 };
diff --git a/springboot-vue3/src/main/java/com/example/springboot/component/PlcParameter2.java b/springboot-vue3/src/main/java/com/example/springboot/component/PlcParameter2.java
index 81522f1..81ad490 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/component/PlcParameter2.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/component/PlcParameter2.java
@@ -117,13 +117,13 @@
addressList0.add("DB101.10.2");
addressList0.add("DB101.10.3");
-
+ // 鎵爜鏋�
List<Boolean> data2 = S7control.getinstance().readBits(addressList0);
List<String> addressList3 = new ArrayList<>();
addressList3.add("DB103.256");
addressList3.add("DB103.270");
List<String> data3 = S7control.getinstance().readStrings(addressList3);
-
+// A01 A02 B01 B02
List<String> addresses4 = new ArrayList<>();
addresses4.add("DB103.52");
addresses4.add("DB103.54");
@@ -143,10 +143,10 @@
// String[] values6 = { ".x1 ","x2 ","x3",";;x4","x5","x6","x7","x8","x9","x10","x11"};
// List<String> paramlist = new ArrayList<>(Arrays.asList(values6));
-// Short[] values1 = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
+// Short[] values1 = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1};
// List<Short> data = new ArrayList<>(Arrays.asList(values1));
-// Boolean[] value4 = { true, true, true, true, true, true, true, true, true,
-// true};
+// Boolean[] value4 = { false, false, false, false, false, false, false, false, false,
+// false};
// List<Boolean> data2 = new ArrayList<>(Arrays.asList(value4));
// String[] values3 = { ".x11 ","x21 "};
// List<String> data3 = new ArrayList<>(Arrays.asList(values3));
@@ -217,7 +217,7 @@
}
// 灏嗗竷灏斿垪琛ㄥ啓鍏� PLC
-// S7control.getinstance().WriteBit(addressList, messageBooleans);
+ S7control.getinstance().WriteBit(addressList, messageBooleans);
System.out.println("messageValues锛�" + messageBooleans);
System.out.println("addressList锛�" + addressList);
// 娓呯┖娑堟伅鍒楄〃
diff --git a/springboot-vue3/src/main/java/com/example/springboot/component/PlcServoManualone.java b/springboot-vue3/src/main/java/com/example/springboot/component/PlcServoManualone.java
index 21ab755..01b178d 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/component/PlcServoManualone.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/component/PlcServoManualone.java
@@ -11,40 +11,17 @@
import java.util.List;
public class PlcServoManualone extends Thread {
- String name = "";
- Integer count = 0;
- public static String readFileToString(String filePath) throws IOException {
- File file = new File(filePath);
- return FileUtils.readFileToString(file, "UTF-8");
+
+
+ private Configuration config;
+
+ public PlcServoManualone() throws IOException {
+ config = new Configuration("config.properties");
}
-
-
-// public void insertDataToList(List<Short> list, String rangeAddress, int insertIndex) {
-// if (list.size() >= insertIndex + 14) {
-// List<Short> rangeData = new ArrayList<>();
-// byte[] byteData = S7control.getinstance().ReadByte(rangeAddress, 14);
-// if (byteData != null && byteData.length >= 13) {
-// for (byte b : byteData) {
-// rangeData.add((short) b);
-// }
-// } else {
-// // 璇诲彇鏁版嵁澶辫触锛屾坊鍔犻粯璁ゅ��
-// for (int i = 0; i < 14; i++) {
-// rangeData.add((short) -1);
-// }
-// }
-//
-// list.addAll(insertIndex, rangeData);
-// }else{
-// List<Short> rangeData = new ArrayList<>();
-// rangeData.add((short) 0);
-// list.addAll(insertIndex, rangeData);
-// }
-// }
-
+//璇诲彇id
public StringBuilder queGlassid(String address,int count) {
StringBuilder writedstrIdOut = new StringBuilder();
byte[] writedglassidbytesOut = S7control.getinstance().ReadByte(address, count);
@@ -56,7 +33,7 @@
}
return writedstrIdOut;
}
-
+//鍐欏叆id
public void outmesid(String glassid,String address) {
//System.out.println("outmesid:" + glassid);
List<Byte> glassidlist = new ArrayList();
@@ -66,7 +43,7 @@
}
byte[] bytes = Bytes.toArray(glassidlist);
System.out.println("outmesidbytes:" + bytes.length);
- S7control.getinstance().WriteByte(address, bytes);// 娲惧彂鍑虹墖id
+ S7control.getinstance().WriteByte(address, bytes);
}
@Override
@@ -80,59 +57,53 @@
}
//A01缁勫悎涓湴鍧�琛ㄩ泦鍚�
- List<String> addresses = new ArrayList<>();
- addresses.add("DB103.32");
- addresses.add("DB100.144");
- addresses.add("DB100.184");
- addresses.add("DB100.186");
- addresses.add("DB100.180");
- addresses.add("DB100.182");
+ List<String> addresses = Arrays.asList(config.getProperty("A01.addresses").split(","));
+ //System.out.println(addresses);
List<Short> arraylist = S7control.getinstance().readWords(addresses);
-// String rangeAddress = "DB100.148-161";
-// String rangeAddress = "DB100.148";
-// int insertIndex = 2;
-// insertDataToList(arraylist, rangeAddress, insertIndex);
-
//A02缁勫悎涓湴鍧�琛ㄩ泦鍚�
- List<String> addresses2 = new ArrayList<>();
- addresses2.add("DB103.26");
- addresses2.add("DB100.188");
- addresses2.add("DB100.190");
- addresses2.add("DB100.146");
-// addresses2.add("DB100.162-175");
+ List<String> addresses2 = Arrays.asList(config.getProperty("A02.addresses").split(","));
List<Short> arraylist2 = S7control.getinstance().readWords(addresses2);
-// String rangeAddress2 = "DB100.148-161";
-// String rangeAddress2 = "DB100.162";
-// int insertIndex2 = 4;
-// insertDataToList(arraylist2, rangeAddress2, insertIndex2);
-// System.out.println(arraylist2);
//A01缈昏浆鍦板潃
- List<String> addresses3 = new ArrayList<>();
- addresses3.add("DB103.42");
+ List<String> addresses3 = Arrays.asList(config.getProperty("A01.flipAddress"));
List<Short> arraylist3 = S7control.getinstance().readWords(addresses3);
-
//A02缈昏浆鍦板潃
- List<String> addresses4 = new ArrayList<>();
- addresses4.add("DB103.46");
+ List<String> addresses4 = Arrays.asList(config.getProperty("A02.flipAddress"));
+
List<Short> arraylist4 = S7control.getinstance().readWords(addresses4);
//B01缁勫悎涓湴鍧�
- List<Short> arraylist5 = S7control.getinstance().ReadWord("DB103.27", 2);
+ String b01Address = config.getProperty("B01.address");
+ List<Short> arraylist5 = S7control.getinstance().ReadWord(b01Address, 2);
//B02缁勫悎鍦板潃
- List<Short> arraylist6 = S7control.getinstance().ReadWord("DB103.29", 2);
-
+ String b02Address = config.getProperty("B02.address");
+ List<Short> arraylist6 = S7control.getinstance().ReadWord(b02Address, 2);
+ System.out.println(b02Address);
// 鎵�鏈夋晠闅滄寜閽湴鍧�
- List<String> addresses7 = new ArrayList<>();
- addresses7.add("DB104.1.4");
- addresses7.add("DB104.1.5");
- addresses7.add("DB104.1.2");
- addresses7.add("DB104.1.3");
- addresses7.add("DB104.1.6");
- addresses7.add("DB104.1.7");
+ List<String> addresses7 = Arrays.asList(config.getProperty("faultButtonAddresses").split(","));
List<Boolean> arraylist7 = S7control.getinstance().readBits(addresses7);
+ // 杩涚墖id鍦板潃
+ String inputGlassIdAddress = config.getProperty("inputGlassIdAddress");
+ String outputGlassIdAddress = config.getProperty("outputGlassIdAddress");
+ StringBuilder queueid1 = queGlassid(inputGlassIdAddress, 14);
+ // 瀛樼墖id鍦板潃
+ StringBuilder queueid2 = queGlassid(outputGlassIdAddress, 14);
+ //A01鍚姩鍦板潃
+ List<String> A01start = Arrays.asList(config.getProperty("A01start"));
+ //A02鍚姩鍦板潃
+ List<String> A02start = Arrays.asList(config.getProperty("A02start"));
+//A01鍗婅嚜鍔ㄥ湴鍧�
+ List<String> A01Bstart = Arrays.asList(config.getProperty("A01Bstart"));
+ //A02鍗婅嚜鍔ㄥ湴鍧�
+ List<String> A02Bstart = Arrays.asList(config.getProperty("A02Bstart"));
+ //鍥為浂鎸夐挳鍦板潃
+ List<String> waddresses4 = Arrays.asList(config.getProperty("HomedButtonAddresses").split(","));
+ // 鎵�鏈夊浣嶆寜閽湴鍧�
+ List<String> Reset = Arrays.asList(config.getProperty("resetButtonAddresses"));
+ // 鎵�鏈夋湭鍥為浂鎸夐挳鍦板潃
+ List<String> addresses8 = Arrays.asList(config.getProperty("notHomedButtonAddresses"));
// 鎵�鏈夋晠闅滄寜閽浆鎹负1鍜�0
short[] params2 = new short[arraylist7.size()];
@@ -142,14 +113,6 @@
}
- // 鎵�鏈夊浣嶆寜閽湴鍧�
- List<String> Reset = new ArrayList<>();
- Reset.add("DB101.4.0");
- Reset.add("DB101.4.3");
- Reset.add("DB101.3.6");
- Reset.add("DB101.4.1");
- Reset.add("DB101.4.4");
- Reset.add("DB101.4.6");
List<Boolean> Reset1 = S7control.getinstance().readBits(Reset);
// 鎵�鏈夋晠闅滄寜閽浆鎹负1鍜�0
@@ -159,14 +122,8 @@
rReset[i] = value ? (short) 1 : (short) 0;
}
- // 鎵�鏈夋湭鍥為浂鎸夐挳鍦板潃
- List<String> addresses8 = new ArrayList<>();
- addresses8.add("DB104.9.0");
- addresses8.add("DB104.9.1");
- addresses8.add("DB104.9.0");
- addresses8.add("DB104.9.1");
- addresses8.add("DB104.9.4");
- addresses8.add("DB104.9.5");
+
+
List<Boolean> arraylist8 = S7control.getinstance().readBits(addresses8);
short[] params = new short[arraylist8.size()];
for (int i = 0; i < arraylist8.size(); i++) {
@@ -174,10 +131,7 @@
params[i] = value ? (short) 1 : (short) 0;
}
- // 杩涚墖id鍦板潃
- StringBuilder queueid1 = queGlassid("DB100.148", 14);
- // 瀛樼墖id鍦板潃
- StringBuilder queueid2 = queGlassid("DB100.162", 14);
+
@@ -239,47 +193,6 @@
WebSocketServer webSocketServer = WebSocketServer.sessionMap.get("ServoManualone");
if (webSocketServer != null) {
List<String> messages = webSocketServer.getMessages();
- // A01缁勫悎鍦板潃
- List<String> waddresses1 = new ArrayList<>();
- waddresses1.add("DB103.32");
- waddresses1.add("DB100.144");
-// waddresses1.add("DB100.148-161");
- waddresses1.add("DB100.184");
- waddresses1.add("DB100.186");
- waddresses1.add("DB100.180");
- waddresses1.add("DB100.182");
-
- // A02缁勫悎鍦板潃
- List<String> waddresses2 = new ArrayList<>();
- waddresses2.add("DB103.26");
- waddresses2.add("DB100.188");
- waddresses2.add("DB100.190");
- waddresses2.add("DB100.146");
-// waddresses2.add("DB100.162-175");
-
-
- // 澶嶄綅鎸夐挳鍦板潃
- List<String> waddresses3 = new ArrayList<>();
- waddresses3.add("DB101.4.0");
- waddresses3.add("DB101.4.3");
- waddresses3.add("DB101.3.6");
- waddresses3.add("DB101.4.1");
- waddresses3.add("DB101.4.4");
- waddresses3.add("DB101.4.6");
-
- //鍥為浂鎸夐挳鍦板潃
- List<String> waddresses4 = new ArrayList<>();
- waddresses4.add("DB101.3.7");
- waddresses4.add("DB101.4.2");
- waddresses4.add("DB101.4.5");
- waddresses4.add("DB101.4.7");
-
-
-String waddresses5="DB100.148";
-String waddresses6="DB100.162";
-
-
-
@@ -288,8 +201,6 @@
String lastMessage = messages.get(messages.size() - 1);
// System.out.println("lastMessage锛�" + lastMessage);
JSONArray messageArray = new JSONArray(lastMessage);
-
-
// 鍐欏叆AO1缁勫悎
@@ -312,15 +223,11 @@
}
if (!sValue.isEmpty()) {
-
-
- S7control.getinstance().WriteWord(waddresses1, sValue);
- List<String> A01start = new ArrayList<>();
- A01start.add("DB101.5.0");
+ S7control.getinstance().WriteWord(addresses, sValue);
Boolean[] a01values7 = { true};
List<Boolean> a01startval = new ArrayList<>(Arrays.asList(a01values7));
S7control.getinstance().WriteBit(A01start, a01startval);
- System.out.println("Values " + sValue + " written to PLC at address " + waddresses1);
+ System.out.println("Values " + sValue + " written to PLC at address " + addresses);
}
}
@@ -344,13 +251,12 @@
}
}
if (!sValue2.isEmpty()) {
- S7control.getinstance().WriteWord(waddresses2, sValue2);
- List<String> A02start = new ArrayList<>();
- A02start.add("DB101.5.1");
+ S7control.getinstance().WriteWord(addresses2, sValue2);
+
Boolean[] a02values7 = {true};
List<Boolean> a02startval = new ArrayList<>(Arrays.asList(a02values7));
S7control.getinstance().WriteBit(A02start, a02startval);
- System.out.println("Values " + sValue2 + " written to PLC at address " + waddresses2);
+ System.out.println("Values " + sValue2 + " written to PLC at address " + addresses2);
}
}
@@ -374,8 +280,8 @@
}
}
if (!sValue3.isEmpty()) {
- S7control.getinstance().WriteBit(waddresses3, sValue3);
- System.out.println("Values " + sValue3 + " written to PLC at address " + waddresses3);
+ S7control.getinstance().WriteBit(Reset, sValue3);
+ System.out.println("Values " + sValue3 + " written to PLC at address " + Reset);
}
}
@@ -404,7 +310,6 @@
}
-
//杩涚墖ID鍐欏叆
if (messageArray.getJSONArray(4).size() > 0) {
// JSONArray jsonArray5 = messageArray.getJSONArray(4);
@@ -412,8 +317,8 @@
if (!jsonArray5.isEmpty()) {
// String value = (String) jsonArray5.get(0);
jsonArray5 = jsonArray5.replaceAll("[\\[\\]\"]", ""); // 鍘婚櫎鏂规嫭鍙峰拰鍙屽紩鍙�
- outmesid( jsonArray5,waddresses5);
- System.out.println("Values " + jsonArray5 + " written to PLC at address " + waddresses5);
+ outmesid( jsonArray5,inputGlassIdAddress);
+ System.out.println("Values " + jsonArray5 + " written to PLC at address " + inputGlassIdAddress);
}
}
// 瀛樼墖ID鍐欏叆
@@ -422,8 +327,8 @@
if (!jsonArray6.isEmpty()) {
String value2 = (String) jsonArray6.get(0);
- outmesid( value2,waddresses6);
- System.out.println("Values " + value2 + " written to PLC at address " + waddresses6);
+ outmesid( value2,outputGlassIdAddress);
+ System.out.println("Values " + value2 + " written to PLC at address " + outputGlassIdAddress);
}
}
if (messageArray.getJSONArray(6).size() > 0) {
@@ -445,17 +350,10 @@
}
if (!sValueb4.isEmpty()) {
- List<String> A01Bstart = new ArrayList<>();
- A01Bstart.add("DB101.11.0");
-// Boolean[] a01values7 = {true};
-// List<Boolean> a01Bstartval = new ArrayList<>(Arrays.asList(a01values7));
S7control.getinstance().WriteBit(A01Bstart, sValueb4);
System.out.println("Values " + sValueb4 + " written to PLC at address " + A01Bstart);
}
}
-
-
-
if (messageArray.getJSONArray(7).size() > 0) {
@@ -477,46 +375,11 @@
}
if (!sValueb5.isEmpty()) {
- List<String> A02Bstart = new ArrayList<>();
- A02Bstart.add("DB101.11.1");
-// Boolean[] a01values7 = {true};
-// List<Boolean> a01Bstartval = new ArrayList<>(Arrays.asList(a01values7));
S7control.getinstance().WriteBit(A02Bstart, sValueb5);
System.out.println("Values " + sValueb5 + " written to PLC at address " + A02Bstart);
}
}
-
-
-
-
-// if (messageArray.getJSONArray(6).size() > 0) {
-// JSONArray jsonArray6 = messageArray.getJSONArray(6);
-//
-// if (!jsonArray6.isEmpty()) {
-// String value2 = (String) jsonArray6.get(0);
-// List<String> A01Bstart = new ArrayList<>();
-// A01Bstart.add("DB101.11.0");
-// Boolean[] a01values7 = {true};
-// List<Boolean> a01Bstartval = new ArrayList<>(Arrays.asList(a01values7));
-// S7control.getinstance().WriteBit(A01Bstart, a01Bstartval);
-// System.out.println("Values " + value2 + " written to PLC at address " + waddresses6);
-// }
-// }
-
-// if (messageArray.getJSONArray(7).size() > 0) {
-// JSONArray jsonArray6 = messageArray.getJSONArray(7);
-//
-// if (!jsonArray6.isEmpty()) {
-// String value2 = (String) jsonArray6.get(0);
-// List<String> A02Bstart = new ArrayList<>();
-// A02Bstart.add("DB101.11.1");
-// Boolean[] a02values7 = {true};
-// List<Boolean> a02Bstartval = new ArrayList<>(Arrays.asList(a02values7));
-// S7control.getinstance().WriteBit(A02Bstart, a02Bstartval);
-// System.out.println("Values " + value2 + " written to PLC at address " + waddresses6);
-// }
-// }
// 娓呯┖娑堟伅鍒楄〃
webSocketServer.clearMessages();
diff --git a/springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java b/springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java
index abb213e..28c2308 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java
@@ -32,7 +32,7 @@
// 閾濇id
public static String FrameNo;
// 鏄惁闇�瑕佹墜鍔ㄧ‘璁ょ幓鐠�
- public static Boolean isConfirm = true;
+ public static Boolean isConfirm = false;
// public static Map b=new HashMap<>();
// b.put()
@@ -96,7 +96,7 @@
// 鑾峰彇杩涙槸鍚︽湁寰呯‘璁ょ殑鐜荤拑id
String queid = spianMapper.Selectqueueid();
int state = spianMapper.Selectqueuestate();
- jsonObject.append("queid", queid);
+ jsonObject.append("state", queid);
jsonObject.append("state", state);
// 鑾峰彇鎵爜浣嶄笌涓婄墖浣嶇幓鐠冧俊鎭�
Queue form2 = homeMapper.GetQueueInfo(2);
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 0f33a07..c787b6c 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
@@ -1,28 +1,10 @@
package com.example.springboot.config;
-import org.springframework.beans.factory.annotation.Autowired;
+import com.example.springboot.component.*;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;
-
-import com.example.springboot.component.PLCAutomaticParameterSetting;
-import com.example.springboot.component.PlcHold;
-import com.example.springboot.component.PlcParameter;
-import com.example.springboot.component.Plcaction;
-import com.example.springboot.component.Plchome;
-import com.example.springboot.component.Plcalarm;
-import com.example.springboot.component.Plcsign;
-import com.example.springboot.component.Plcstate;
-import com.example.springboot.component.PlcPositioning1;
-import com.example.springboot.component.PlcPositioning2;
-import com.example.springboot.component.PlcParameter2;
-import com.example.springboot.component.PlcParameter1;
-import com.example.springboot.component.PlcServoManualone;
-import com.example.springboot.component.PLCAutomaticParameterSetting;
-import com.example.springboot.component.PlcManualonePosition;
-import com.example.springboot.component.PlcManualonePosition2;
-import com.example.springboot.component.PLCManualJog;
@Component
@Order(1)
@@ -35,28 +17,29 @@
//
System.out.println("鍚姩瀹屾垚");
- new PlcHold().start();
-//
+ new PlcHold().start();
//
+ //
+
new Plchome().start();
-// //
- new PlcParameter().start();
- //
- // new Plcalarm().start();
- //
- new Plcsign().start();
- //
- new Plcaction().start();
- new Plcstate().start();
- new PlcPositioning1().start();
- new PlcPositioning2().start();
- new PlcParameter2().start();
- new PlcParameter1().start();
- new PLCAutomaticParameterSetting().start();
+
+ // new PlcParameter().start();
+ // //
+ // // new Plcalarm().start();
+ // //
+ // new Plcsign().start();
+ // //
+ // new Plcaction().start();
+ // new Plcstate().start();
+ // new PlcPositioning1().start();
+ // new PlcPositioning2().start();
+ // new PlcParameter2().start();
+ // new PlcParameter1().start();
+ // new PLCAutomaticParameterSetting().start();
- new PlcManualonePosition().start();
- new PlcManualonePosition2().start();
- new PlcServoManualone().start();
- new PLCManualJog().start();
+ // new PlcManualonePosition().start();
+ // new PlcManualonePosition2().start();
+ // new PlcServoManualone().start();
+ // new PLCManualJog().start();
}
}
\ No newline at end of file
diff --git a/springboot-vue3/src/main/java/com/example/springboot/controller/RolePermissionController.java b/springboot-vue3/src/main/java/com/example/springboot/controller/RolePermissionController.java
index 32044f9..626a185 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/controller/RolePermissionController.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/controller/RolePermissionController.java
@@ -94,6 +94,7 @@
@GetMapping("/getByRoleId")
+
public com.example.springboot.common.Result selectquanxian(@RequestParam("roleId") int roleId) {
List<Map<String, Object>> resultSet = RolePermissionMapper.selectquanxian(roleId);
diff --git a/springboot-vue3/src/main/java/com/example/springboot/controller/SpianController.java b/springboot-vue3/src/main/java/com/example/springboot/controller/SpianController.java
index 7ab5b9a..0968120 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/controller/SpianController.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/controller/SpianController.java
@@ -24,7 +24,7 @@
@GetMapping("/all2")
public void selectdd(String orderid){
SpianService service=new SpianService();
- service.selectout(orderid);
+ service.selectout2(orderid);
}
diff --git a/springboot-vue3/src/main/java/com/example/springboot/controller/UserController.java b/springboot-vue3/src/main/java/com/example/springboot/controller/UserController.java
index a40ae9e..517cc19 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/controller/UserController.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/controller/UserController.java
@@ -168,6 +168,20 @@
private class UpdatePasswordRequest {
}
+ @ApiOperation(value = "鑾峰彇褰撳墠鐧诲綍鐢ㄦ埛鐨勭敤鎴峰悕")
+ @GetMapping("/currentUsername")
+ @RequiresAuthentication // 纭繚鍙湁璁よ瘉杩囩殑鐢ㄦ埛鍙互璁块棶姝ゆ帴鍙�
+ public Result getCurrentUsername() {
+ User currentUser = SecurityUtil.getCurrentUser();
+ if (currentUser != null) {
+ // 鍋囪User绫绘湁getUsername鏂规硶鍙互鑾峰彇鐢ㄦ埛鍚�
+ String username = currentUser.getUsername();
+ return Result.success(username);
+ } else {
+ return Result.fail("鐢ㄦ埛鏈櫥褰曟垨浼氳瘽宸茶繃鏈�");
+ }
+ }
+
diff --git a/springboot-vue3/src/main/java/com/example/springboot/entity/CarPosition.java b/springboot-vue3/src/main/java/com/example/springboot/entity/CarPosition.java
index c307c00..0b54c55 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/entity/CarPosition.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/entity/CarPosition.java
@@ -1,9 +1,9 @@
package com.example.springboot.entity;
-
+//灏忚溅淇℃伅琛�
public class CarPosition {
- public int carid;
- public int start;
- public int end;
+ public int carid;//灏忚溅id
+ public int start;//灏忚溅璧峰浣嶇疆
+ public int end;//灏忚溅缁堢偣浣嶇疆
public void setcarId(Integer carid) {
this.carid = carid;
diff --git a/springboot-vue3/src/main/java/com/example/springboot/entity/Glass.java b/springboot-vue3/src/main/java/com/example/springboot/entity/Glass.java
index ab1ce6f..82a59ec 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/entity/Glass.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/entity/Glass.java
@@ -1,7 +1,7 @@
package com.example.springboot.entity;
-
+//鐜荤拑淇℃伅琛�
public class Glass {
- private Integer id;
+ private Integer id;//鑷id
private String orderId;//璁㈠崟id
private double width;//瀹藉害
private double height;//楂樺害
diff --git a/springboot-vue3/src/main/java/com/example/springboot/entity/OrderOut.java b/springboot-vue3/src/main/java/com/example/springboot/entity/OrderOut.java
index 209de27..1b6b068 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/entity/OrderOut.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/entity/OrderOut.java
@@ -1,12 +1,12 @@
package com.example.springboot.entity;
import java.sql.Date;
-
+//鎸夎鍗曞嚭鐗囪〃
public class OrderOut {
- private Integer id;
+ private Integer id;//鑷id
private String orderid;//璁㈠崟id
private Integer state;//鐘舵��
- private Date modtime;
+ private Date modtime;//淇敼鏃堕棿
public Integer id() {
return id;
diff --git a/springboot-vue3/src/main/java/com/example/springboot/entity/Out_slice.java b/springboot-vue3/src/main/java/com/example/springboot/entity/Out_slice.java
index c380d66..5ea7bb2 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/entity/Out_slice.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/entity/Out_slice.java
@@ -1,15 +1,16 @@
package com.example.springboot.entity;
-
+//鍑虹墖闃熷垪琛�
public class Out_slice {
- private int id;
- private String glassId;
- private String barcode;
- private double glasswidth;
- private double glassheight;
- private int state;
- private String time;
- private int sequence;
- private String position;
+ private int id;//鑷id
+ private String glassId;//鐜荤拑id
+ private String barcode;//閾濇id
+ private double glasswidth;//鐜荤拑瀹�
+ private double glassheight;//鐜荤拑楂�
+ private int state;//鍑虹墖鐘舵��
+ private int flip;//鏄惁缈昏浆
+ private String time;//淇敼鏃堕棿
+ private int sequence;//鍑虹墖椤哄簭
+ private String position;//鐜荤拑鎽嗘斁浣嶇疆
public String getPosition() {
return position;
@@ -52,6 +53,14 @@
this.time = time;
}
+ public int getFlip() {
+ return flip;
+ }
+
+ public void setFlip(int flip) {
+ this.flip = flip;
+ }
+
public int getID() {
return id;
}
diff --git a/springboot-vue3/src/main/java/com/example/springboot/entity/Queue.java b/springboot-vue3/src/main/java/com/example/springboot/entity/Queue.java
index 9df4c96..08c5b72 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/entity/Queue.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/entity/Queue.java
@@ -1,18 +1,18 @@
package com.example.springboot.entity;
-
+//涓婄墖闃熷垪琛�
public class Queue {
- private int id;
- private String glassId;
- private String orderId;
- private String listId;
- private String boxId;
- private double glasswidth;
- private double glassheight;
- private double glasswidthmm;
- private double glassheightmm;
- private int type;
- private int state;
- private String time;
+ private int id;//鑷id
+ private String glassId;//鐜荤拑id
+ private String orderId;//璁㈠崟id
+ private String listId;//鍒楄〃id
+ private String boxId;//绠卞瓙id
+ private double glasswidth;//鐜荤拑瀹�
+ private double glassheight;//鐜荤拑楂�
+ private double glasswidthmm;//鐜荤拑瀹借嫳鍒�
+ private double glassheightmm;//鐜荤拑楂樿嫳鍒�
+ private int type;//绫诲瀷
+ private int state;//鐘舵��
+ private String time;//淇敼鏃堕棿
public int getid() {
return id;
diff --git a/springboot-vue3/src/main/java/com/example/springboot/entity/RolePermission.java b/springboot-vue3/src/main/java/com/example/springboot/entity/RolePermission.java
index a55723f..fca3450 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/entity/RolePermission.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/entity/RolePermission.java
@@ -21,7 +21,8 @@
private Long permissionId;
@ApiModelProperty("鐘舵��")
private Integer state;
-
+ @ApiModelProperty("鍚嶅瓧")
+ private String name;
diff --git a/springboot-vue3/src/main/java/com/example/springboot/entity/StorageCage.java b/springboot-vue3/src/main/java/com/example/springboot/entity/StorageCage.java
index c1ff53e..d290dc3 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/entity/StorageCage.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/entity/StorageCage.java
@@ -1,5 +1,5 @@
package com.example.springboot.entity;
-
+//鐞嗙墖绗艰〃
public class StorageCage {
private Integer id; //鑷簭id
private Integer prcId;//plcid
diff --git a/springboot-vue3/src/main/java/com/example/springboot/entity/StorageTask.java b/springboot-vue3/src/main/java/com/example/springboot/entity/StorageTask.java
index 5fae01d..e1bd6bf 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/entity/StorageTask.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/entity/StorageTask.java
@@ -1,5 +1,5 @@
package com.example.springboot.entity;
-
+//鍑虹墖浠诲姟琛�
public class StorageTask{
private Integer id;//鑷簭
private String taskType;//绫诲瀷
diff --git a/springboot-vue3/src/main/java/com/example/springboot/entity/alarmmg.java b/springboot-vue3/src/main/java/com/example/springboot/entity/alarmmg.java
index a9128ea..cde8841 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/entity/alarmmg.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/entity/alarmmg.java
@@ -1,14 +1,13 @@
package com.example.springboot.entity;
import java.util.Date;
-
+//鎶ヨ淇℃伅琛�
public class alarmmg {
- private Integer id;
- private String content;
- private Date timeon;
- private Date endTime;
-
- private String timeons;
+ private Integer id;//鑷id
+ private String content;//鎶ヨ鍐呭
+ private Date timeon;//鎶ヨ鏃堕棿
+ private Date endTime;//鎶ヨ缁撴潫鏃堕棿
+ private String timeons;//鎶ヨ鏃堕棿锛岄潪鏃堕棿鎴崇被鍨�
// 鑷id
public void setid(Integer id) {
diff --git a/springboot-vue3/src/main/java/com/example/springboot/entity/north_glass_buffer1.java b/springboot-vue3/src/main/java/com/example/springboot/entity/north_glass_buffer1.java
index 3698e08..2e2843d 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/entity/north_glass_buffer1.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/entity/north_glass_buffer1.java
@@ -1,5 +1,5 @@
package com.example.springboot.entity;
-
+//瀹㈡埛鐜荤拑淇℃伅琛�
public class north_glass_buffer1 {
private Integer id; //鑷id
private String ordernumber;//璁㈠崟id
@@ -15,7 +15,7 @@
private String glassinside;//
private String glassbetween;//
private String itemtype;//
- private String slotnumber;//
+ private String slotnumber;//鏍煎瓙
private String datemodified;//
private String datecreated;//
private String FrameBarcode;//閾濇id
diff --git a/springboot-vue3/src/main/java/com/example/springboot/entity/vo/RolePermissionVo.java b/springboot-vue3/src/main/java/com/example/springboot/entity/vo/RolePermissionVo.java
index 89db5eb..9cd9dbc 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/entity/vo/RolePermissionVo.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/entity/vo/RolePermissionVo.java
@@ -16,4 +16,5 @@
private Integer state;
private Date createTime;
private Date updateTime;
+ private String name;
}
diff --git a/springboot-vue3/src/main/java/com/example/springboot/mapper/SpianMapper.java b/springboot-vue3/src/main/java/com/example/springboot/mapper/SpianMapper.java
index 75581e5..1d58dd7 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/mapper/SpianMapper.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/mapper/SpianMapper.java
@@ -2,14 +2,11 @@
import org.apache.ibatis.annotations.*;
-import com.example.springboot.entity.Glass;
import com.example.springboot.entity.StorageCage;
-import com.example.springboot.entity.StorageTask;
import com.example.springboot.entity.north_glass_buffer1;
import java.util.List;
-import javax.print.DocFlavor.STRING;
@Mapper
@@ -58,7 +55,7 @@
StorageCage selectGlassCage(int cage,double width,int cage1,int cage2);
//鍒犻櫎绗煎瓙淇℃伅(鍑虹墖)
- @Update("update storage_cage as a set state=#{state},glass_id=null,order_id=null,glasswidth=0,a.glassheight=null,a.glasswidthmm=null,a.glassheightmm=null,a.listid=null,a.boxid=null where glassid=#{glassid};")
+ @Update("update storage_cage as a set state=#{state},glass_id=null,order_id=null,glasswidth=0,a.glassheight=null,a.glasswidthmm=null,a.glassheightmm=null,a.listid=null,a.boxid=null where glass_id=#{glassid};")
void UpdataGlassCage(String glassid,int state);
//鏀瑰彉鐜荤拑鐘舵�佷负鍑虹墖涓�
@Update("update storage_cage as a set state=#{state} where glass_id=#{glassid};")
diff --git a/springboot-vue3/src/main/java/com/example/springboot/service/SpianService.java b/springboot-vue3/src/main/java/com/example/springboot/service/SpianService.java
index 0df6072..e26b4ab 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/service/SpianService.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/service/SpianService.java
@@ -1,16 +1,10 @@
package com.example.springboot.service;
-
-import java.lang.reflect.Array;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List;
-
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
-
-import com.example.springboot.common.Result;
import com.example.springboot.component.S7control;
-import com.example.springboot.entity.Glass;
import com.example.springboot.entity.StorageCage;
import com.example.springboot.entity.north_glass_buffer1;
import com.example.springboot.mapper.SpianMapper;
diff --git a/springboot-vue3/src/main/resources/config.properties b/springboot-vue3/src/main/resources/config.properties
new file mode 100644
index 0000000..41ceb42
--- /dev/null
+++ b/springboot-vue3/src/main/resources/config.properties
@@ -0,0 +1,34 @@
+#PlcServoManualone 鍦板潃 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+# A01缁勫悎涓湴鍧�琛ㄩ泦鍚�
+A01.addresses=DB103.32,DB100.144,DB100.184,DB100.186,DB100.180,DB100.182
+# A02缁勫悎涓湴鍧�琛ㄩ泦鍚�
+A02.addresses=DB103.26,DB100.188,DB100.190,DB100.146
+# A01缈昏浆鍦板潃
+A01.flipAddress=DB103.42
+# A02缈昏浆鍦板潃
+A02.flipAddress=DB103.46
+# B01缁勫悎涓湴鍧�
+B01.address=DB103.27
+# B02缁勫悎鍦板潃
+B02.address=DB103.29
+# 鎵�鏈夋晠闅滄寜閽湴鍧�
+faultButtonAddresses=DB104.1.4,DB104.1.5,DB104.1.2,DB104.1.3,DB104.1.6,DB104.1.7
+# 澶嶄綅鎸夐挳鍦板潃
+resetButtonAddresses=DB101.4.0,DB101.4.3,DB101.3.6,DB101.4.1,DB101.4.4,DB101.4.6
+# 鎵�鏈夋湭鍥為浂鎸夐挳鍦板潃
+notHomedButtonAddresses=DB104.9.0,DB104.9.1,DB104.9.0,DB104.9.1,DB104.9.4,DB104.9.5
+# 杩涚墖id鍦板潃
+inputGlassIdAddress=DB100.148
+# 瀛樼墖id鍦板潃
+outputGlassIdAddress=DB100.162
+#鍥為浂鎸夐挳鍦板潃
+HomedButtonAddresses=DB101.3.7,DB101.4.2,DB101.4.5,DB101.4.7
+#A02start
+A02start=DB101.5.1
+#A01start
+A01start=DB101.5.0
+#A02start
+A02Bstart=DB101.11.1
+#A01start
+A01Bstart=DB101.11.0
+#------------------------------------------------------------
\ No newline at end of file
--
Gitblit v1.8.0