From 31a6849672a6ccac2289fc3bd8fbacdd13c99634 Mon Sep 17 00:00:00 2001
From: zhangyong <517047165@qq.com>
Date: 星期二, 26 十一月 2024 13:24:43 +0800
Subject: [PATCH] Merge branch 'master' of http://bore.pub:10439/r/HangZhouMes

---
 UI-Project/src/views/Returns/upreturns2.vue |   78 ++++++++++++++++++++++++++++----------
 1 files changed, 57 insertions(+), 21 deletions(-)

diff --git a/UI-Project/src/views/Returns/upreturns2.vue b/UI-Project/src/views/Returns/upreturns2.vue
index bc4cdb7..afa5811 100644
--- a/UI-Project/src/views/Returns/upreturns2.vue
+++ b/UI-Project/src/views/Returns/upreturns2.vue
@@ -66,8 +66,8 @@
 let socket = null;
 const socketUrl = `ws://${WebSocketHost}:${host}/api/loadGlass/api/talk/uploadGlass`;
 const handleMessage = (data: any) => {
-  tableDataa.value = data.list[0].slice(0, 2);
-  tableDatab.value = data.list[0].slice(2, 4);
+  // tableDataa.value = data.list[0].slice(0, 2);
+  tableDataa.value = data.list[0].slice(2, 4);
 };
 onBeforeUnmount(() => {
   closeWebSocket();
@@ -96,7 +96,8 @@
     const response = await request.post('/loadGlass/up-patten-usage/selectUpPattenUsage', {
       stationCell: 6,
       engineerId: selectedProjectNo.value,
-      filmRemove: filmRemove.value,
+      // filmRemove: filmRemove.value,
+      filmRemove: parseInt(filmRemove.value, 10),
     })
     window.localStorage.setItem('engineeringId', selectedProjectNo.value)
     window.localStorage.setItem('filmRemove', filmRemove.value)
@@ -121,10 +122,10 @@
   let engineeringId = window.localStorage.getItem('engineeringId')
   if (markingMachineStatus.value === 'green' && cuttingMachineStatus.value === 'green') {
     try {
-      const response = await request.post('/loadGlass/engineering/engineering/pauseTask', {
+      const response = await request.post('/loadGlass/engineering/engineering/pause', {
         // const response = await request.post('/loadGlass/engineering/engineering/changeTask', {
-        stationCell: 6,
-        filmRemove: filmRemove,
+        // stationCell: 6,
+        // filmRemove: filmRemove,
         engineerId: engineeringId,
         state: 1,
       })
@@ -148,8 +149,8 @@
     let engineeringId = window.localStorage.getItem('engineeringId')
     console.log(engineeringId);
     if (engineeringId !== '') {
-      const response = await request.post('/loadGlass/engineering/engineering/pauseTask', {
-        stationCell: 6,
+      const response = await request.post('/loadGlass/engineering/engineering/pause', {
+        // stationCell: 6,
         engineerId: engineeringId,
         state: 0,
       })
@@ -236,6 +237,28 @@
     ElMessage.error(t('basicData.glassnull'));
   }
 };
+
+function getStatusType2(filmRemove) {
+  switch (filmRemove) {
+    case 0:
+      return 'success';
+    case 1:
+      return 'info';
+    case 2:
+      return 'warning';
+  }
+}
+
+function getStatusText2(filmRemove) {
+  switch (filmRemove) {
+    case 0:
+      return t('Mounting.noremoval');//瀹屾垚
+    case 1:
+      return t('Mounting.coarselyground');//鏂板缓
+    case 2:
+      return t('Mounting.finegrinding');//鎵ц涓�
+  }
+}
 </script>
 <template>
   <div style="height: 500px;">
@@ -301,16 +324,29 @@
             min-width="80"
             prop="state"
           >
-          <template #default="scope">  
-          <el-tag  
-            :type="scope.row.state === 100 ? 'success' : 'warning'"  
-            @click="toggleEnableState(scope.row)"  
-          >  
-            {{ scope.row.state === 100 ? $t('Mounting.pass') : $t('Mounting.waiting') }}
-          </el-tag>  
-        </template> 
-          </el-table-column>
+          <template #default="scope">
+            <el-tag
+                :type="scope.row.state === 100 ? 'success' : 'warning'"
+                @click="toggleEnableState(scope.row)"
+            >
+              {{ scope.row.state === 100 ? $t('Mounting.pass') : $t('Mounting.waiting') }}
+            </el-tag>
+          </template>
+      </el-table-column>
       <el-table-column prop="filmsId" :label="$t('Mounting.createtime')" align="center"/>
+      <!-- <el-table-column prop="filmRemove" :label="$t('Mounting.removalmethodp')" align="center"/> -->
+      <el-table-column
+          align="center"
+          :label="$t('Mounting.removalmethodp')"
+          prop="filmRemove"
+      >
+        <template #default="scope">
+          <el-tag :type="getStatusType2(scope.row.filmRemove)">
+            {{ getStatusText2(scope.row.filmRemove) }}
+          </el-tag>
+        </template>
+      </el-table-column>
+      <el-table-column prop="stationCell" :label="$t('Mounting.loadinglinea')" align="center"/>
     </el-table>
       </div>
     </el-card>
@@ -318,7 +354,7 @@
       <div style="width: 49%;float: left;margin-left: 300px;">
         <div style="display: flex;">
           <img src="../../assets/shangpianji.png" alt=""
-               style="max-width: 25%;max-height: 25%;margin-left: 10%;margin-top: 5%;">
+               style="max-width: 20%;max-height: 25%;margin-left: 10%;margin-top: 5%;">
           <el-table :data="tableDataa" border style="width: 75%;margin-top: 10%;margin-left: 8%;"
                     :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"
           >
@@ -328,8 +364,8 @@
             <el-table-column prop="filmsId" align="center" :label="$t('basicData.coatingtypes')" min-width="80"/>
             <el-table-column prop="number" align="center" :label="$t('basicData.quantity')" min-width="80"/>
           </el-table>
-        </div>
-      </div>
+    </div>
+  </div>
       <!-- <div style="width: 48%;float: right;">
         <div style="display: flex;">
           <img src="../../assets/shangpianji.png" alt="" style="max-width: 25%;max-height: 25%;margin-left: 10%;margin-top: 5%;">
@@ -398,7 +434,7 @@
       </div>
     </template>
   </el-dialog>
-    </div>
+        </div>
   <el-dialog v-model="dialogFormVisible" top="24vh" width="70%">
     <div class="flex-container" style="margin-left: 50px;margin-bottom: 10px;">
       <el-form-item :label="$t('Mounting.loadingline')" :required="true">

--
Gitblit v1.8.0