From f9945d84badac1949b8ff19cdbd9197203b09caa Mon Sep 17 00:00:00 2001
From: wu <731351411@qq.com>
Date: 星期三, 18 九月 2024 09:13:04 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10105/r/JiuMuMES

---
 UI-Project/src/views/Marking/marking.vue |   41 +++++++++++++++++++++--------------------
 1 files changed, 21 insertions(+), 20 deletions(-)

diff --git a/UI-Project/src/views/Marking/marking.vue b/UI-Project/src/views/Marking/marking.vue
index 264514c..4421a9f 100644
--- a/UI-Project/src/views/Marking/marking.vue
+++ b/UI-Project/src/views/Marking/marking.vue
@@ -14,6 +14,7 @@
 });
 const loadData = ref([]);
 const findMachine = ref([]);
+const machineId=11;//褰撳墠椤甸潰鐨勮澶嘔D
 //浣跨敤WebSocket鏂瑰紡灞曠ず鏁版嵁
 let socket = null;
 const socketUrl = `ws://${WebSocketHost}:${host}/api/deviceInteraction/api/talk/marking`;
@@ -75,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";
@@ -97,7 +98,7 @@
           //寮�濮嬩慨鏀�
           request.post(url,
             {
-              "id": 11
+              "id": machineId
             }).then((res) => { // 鏇挎崲涓轰綘鐨凙PI绔偣  
               if (res.code === 200) {
                 ElMessage.success(res.message);
@@ -130,7 +131,7 @@
           //涓嬬嚎鎺ュ彛
           request.post("/deviceInteraction/machine/updateMachineState",
             {
-              "id": 11,
+              "id": machineId,
               "state": state
             }).then((res) => { // 鏇挎崲涓轰綘鐨凙PI绔偣  
               if (res.code === 200) {
@@ -216,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.marking')}}
     </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="primary" 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> -->
@@ -236,20 +237,20 @@
         :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>

--
Gitblit v1.8.0