From fdc39f2277775b9cdaf8add9170d7ac0d68ed607 Mon Sep 17 00:00:00 2001
From: wu <731351411@qq.com>
Date: 星期三, 18 九月 2024 16:45:37 +0800
Subject: [PATCH] 拉取前提交更改
---
JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/job/PLCMechanicalArm.java | 1
UI-Project/src/views/MechanicalArm/mechanicalArm.vue | 82 ++++++++++++++++++++--------------------
2 files changed, 42 insertions(+), 41 deletions(-)
diff --git a/JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/job/PLCMechanicalArm.java b/JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/job/PLCMechanicalArm.java
index 1e7e8a1..947e4cd 100644
--- a/JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/job/PLCMechanicalArm.java
+++ b/JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/job/PLCMechanicalArm.java
@@ -58,6 +58,7 @@
Machine machine=machineMapper.selectById(1L);
List<Tasking> taskingList=taskingService.findMachineTask(machine);
jsonObject.append("taskingList", taskingList);
+ jsonObject.append("machine", machine);
ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("mechanicalArm");
if (sendwServer != null) {
for (WebSocketServer webserver : sendwServer) {
diff --git a/UI-Project/src/views/MechanicalArm/mechanicalArm.vue b/UI-Project/src/views/MechanicalArm/mechanicalArm.vue
index e9a0f38..a519970 100644
--- a/UI-Project/src/views/MechanicalArm/mechanicalArm.vue
+++ b/UI-Project/src/views/MechanicalArm/mechanicalArm.vue
@@ -1,4 +1,4 @@
-<!-- 涓婄墖鏈� -->
+<!-- 鎵撴爣鏈� -->
<script setup>
import request from "@/utils/request";
import { ElMessage, ElMessageBox } from "element-plus";
@@ -14,7 +14,7 @@
});
const loadData = ref([]);
const findMachine = ref([]);
-const machineid=1//鑾峰彇鏁版嵁
+const machineId=1;//褰撳墠椤甸潰鐨勮澶嘔D
//浣跨敤WebSocket鏂瑰紡灞曠ず鏁版嵁
let socket = null;
const socketUrl = `ws://${WebSocketHost}:${host}/api/deviceInteraction/api/talk/mechanicalArm`;
@@ -76,7 +76,7 @@
//淇敼宸ヤ綔鐘舵�� 銆愬け璐�/姝e湪宸ヤ綔/瀹屽伐銆�
const workStatus = async(row,state) => {
let url;
- if(state=="澶辫触"){
+ if(state=="閲嶅彂"){
url="/deviceInteraction/tasking/loseMachineTask";
}else if(state=="姝e湪宸ヤ綔"){
url="/deviceInteraction/tasking/startMachineTask";
@@ -86,11 +86,11 @@
return;
}
ElMessageBox.confirm(
- t('marking.tips'),
+ t('functionState.tips'),
t('delivery.prompt'),
{
- confirmButtonText: t('marking.sure'),
- cancelButtonText: t('marking.cancel'),
+ confirmButtonText: t('functionState.sure'),
+ cancelButtonText: t('functionState.cancel'),
type: 'warning',
}
)
@@ -98,7 +98,7 @@
//寮�濮嬩慨鏀�
request.post(url,
{
- "id": machineid,
+ "id": machineId
}).then((res) => { // 鏇挎崲涓轰綘鐨凙PI绔偣
if (res.code === 200) {
ElMessage.success(res.message);
@@ -110,7 +110,7 @@
.catch(() => {
ElMessage({
type: 'info',
- message: t('marking.cancel'),
+ message: t('functionState.cancel'),
})
})
@@ -119,11 +119,11 @@
//寮�宸�/鏆傚仠
const machineStatus = async(state) => {
ElMessageBox.confirm(
- t('marking.tips'),
+ t('functionState.tips'),
t('delivery.prompt'),
{
- confirmButtonText: t('marking.sure'),
- cancelButtonText: t('marking.cancel'),
+ confirmButtonText: t('functionState.sure'),
+ cancelButtonText: t('functionState.cancel'),
type: 'warning',
}
)
@@ -131,7 +131,7 @@
//涓嬬嚎鎺ュ彛
request.post("/deviceInteraction/machine/updateMachineState",
{
- "id": machineid,
+ "id": machineId,
"state": state
}).then((res) => { // 鏇挎崲涓轰綘鐨凙PI绔偣
if (res.code === 200) {
@@ -144,18 +144,18 @@
.catch(() => {
ElMessage({
type: 'info',
- message: t('marking.cancel'),
+ message: t('functionState.cancel'),
})
})
}
//鐮存崯
const damagedTask = async(row) => {
ElMessageBox.confirm(
- t('marking.tips'),
+ t('functionState.tips'),
t('delivery.prompt'),
{
- confirmButtonText: t('marking.sure'),
- cancelButtonText: t('marking.cancel'),
+ confirmButtonText: t('functionState.sure'),
+ cancelButtonText: t('functionState.cancel'),
type: 'warning',
}
)
@@ -175,18 +175,18 @@
.catch(() => {
ElMessage({
type: 'info',
- message: t('marking.cancel'),
+ message: t('functionState.cancel'),
})
})
}
//涓嬬嚎(鎷胯蛋)
const glassDownLine = async(row) => {
ElMessageBox.confirm(
- t('marking.tips'),
+ t('functionState.tips'),
t('delivery.prompt'),
{
- confirmButtonText: t('marking.sure'),
- cancelButtonText: t('marking.cancel'),
+ confirmButtonText: t('functionState.sure'),
+ cancelButtonText: t('functionState.cancel'),
type: 'warning',
}
)
@@ -206,7 +206,7 @@
.catch(() => {
ElMessage({
type: 'info',
- message: t('marking.cancel'),
+ message: t('functionState.cancel'),
})
})
}
@@ -217,16 +217,16 @@
</script>
<template>
- <div ref="content">
+ <div ref="content" style="padding:0 20px;">
<div id="div-title" style="font-size: 20px; font-weight: bold; margin:10px 0 10px 0;padding-left: 20px;">
- 鑷姩涓婄墖鏈�
+ {{$t('machine.mechanicalArm')}}
</div>
<hr />
<br>
- <div id="search" style="padding-left: 20px;">
+ <div id="search" >
<!-- 鍔熻兘 -->
- <el-button type="primary" id="ButtonMachineStatus" @click="machineStatus((findMachine['state']=='鏆傚仠'?'寮�宸�':'鏆傚仠'))">{{findMachine['state']=='寮�宸�'?'寮�宸�':'鏆傚仠'}}</el-button>
- <el-button type="primary" id="ButtonTopLine" @click="topLine">涓婄嚎</el-button>
+ <el-button :type="(findMachine['state']=='鏆傚仠'?'danger':'success')" id="ButtonMachineStatus" @click="machineStatus((findMachine['state']=='鏆傚仠'?'寮�宸�':'鏆傚仠'))">{{findMachine['state']=='寮�宸�'?$t('functionState.start'):$t('functionState.stop')}}</el-button>
+ <el-button type="primary" id="ButtonTopLine" @click="topLine">{{$t('functionState.topLine')}}</el-button>
<!-- <el-button type="primary" id="searchButton" @click="downLine('涓嬬嚎')">涓嬬嚎</el-button>
<el-button type="primary" id="searchButton" @click="workStatus('鐮存崯')">鐮存崯</el-button>
<el-button type="primary" id="searchButton" @click="workStatus('瀹屽伐')">瀹屽伐</el-button> -->
@@ -237,29 +237,29 @@
:header-cell-style="{ background: '#F2F3F5 ', color: '#1D2129', textAlign: 'center' }"
:cell-style="{ textAlign: 'center' }">
<!-- <el-table-column type="selection" min-width="30" /> -->
- <el-table-column type="index" label="搴忓彿" min-width="30" />
- <el-table-column prop="batchNumber" label="鎵规鍙�" />
- <el-table-column prop="taskType" label="浠诲姟绫诲瀷" />
- <el-table-column prop="glassId" label="鐜荤拑缂栧彿" />
- <el-table-column prop="length" label="闀�" />
- <el-table-column prop="width" label="瀹�" />
- <el-table-column prop="thickness" label="鍘�" />
- <el-table-column prop="workState" label="鐘舵��" />
+ <el-table-column type="index" :label="$t('glassInfo.number')" min-width="30" />
+ <el-table-column prop="batchNumber" :label="$t('glassInfo.batchNumber')"/>
+ <el-table-column prop="taskType" :label="$t('glassInfo.taskType')"/>
+ <el-table-column prop="glassId" :label="$t('glassInfo.glassId')"/>
+ <el-table-column prop="length" :label="$t('glassInfo.length')"/>
+ <el-table-column prop="width" :label="$t('glassInfo.width')"/>
+ <el-table-column prop="thickness" :label="$t('glassInfo.thickness')"/>
+ <el-table-column prop="workState" :label="$t('glassInfo.workState')"/>
<el-table-column fixed="right" :label="$t('productStock.operate')" align="center" width="270">
<template #default="scope">
- <el-button size="mini" link type="primary" plain @click="workStatus(scope.row, '澶辫触')">閲嶅彂</el-button>
- <el-button size="mini" link type="primary" plain @click="workStatus(scope.row, '瀹屽伐')">瀹屽伐</el-button>
- <el-button size="mini" link type="primary" plain @click="damagedTask(scope.row)">鐮存崯</el-button>
- <el-button size="mini" link type="primary" plain @click="glassDownLine(scope.row)">涓嬬嚎</el-button>
+ <el-button size="mini" link type="primary" plain @click="workStatus(scope.row, '閲嶅彂')" >{{$t('functionState.anew')}}</el-button>
+ <el-button size="mini" link type="primary" plain @click="workStatus(scope.row, '瀹屽伐')">{{$t('functionState.finish')}}</el-button>
+ <el-button size="mini" link type="primary" plain @click="damagedTask(scope.row)">{{$t('functionState.lose')}}</el-button>
+ <el-button size="mini" link type="primary" plain @click="glassDownLine(scope.row)">{{$t('functionState.downLine')}}</el-button>
</template>
</el-table-column>
</el-table>
</div>
- <div id="main-body"
- style="width: 100%; height: 460px;background-image: url(../../src/assets/鑷姩鎵撴爣鏈�.png) ;background-size: 100% 100%;">
+ <div id="main-body"
+ style="width: 45%; height: 400px;;background-image: url(../../src/assets/涓婄墖鏈�.png) ;background-size: 100% 100%;">
<!-- 鐢诲浘鍐呭 -->
- <div style="width: 100px; height: 100px; background-color: red; position: relative; top: 171px; left: 218px">
+ <div style="width: 200px; height: 100px; background-color: red; position: relative; top: 271px; left: 158px">
</div>
</div>
</div>
--
Gitblit v1.8.0