From 9b9456c48be5a1a61de85cf3f4bafdb74be15fc6 Mon Sep 17 00:00:00 2001
From: wangfei <3597712270@qq.com>
Date: 星期二, 04 三月 2025 10:49:26 +0800
Subject: [PATCH] 钢化前大理片笼、中空理片笼进片添加是否相同,相同该行添加背景色,中空一线二线新增进入页面清空流程卡号

---
 UI-Project/src/views/Slicecage/slicecage.vue |   35 ++++++++++++++++++++++++++++++++++-
 1 files changed, 34 insertions(+), 1 deletions(-)

diff --git a/UI-Project/src/views/Slicecage/slicecage.vue b/UI-Project/src/views/Slicecage/slicecage.vue
index 41ecca8..750145f 100644
--- a/UI-Project/src/views/Slicecage/slicecage.vue
+++ b/UI-Project/src/views/Slicecage/slicecage.vue
@@ -1065,6 +1065,28 @@
     return t('searchOrder.waiting');
   }  
 }
+function getcasOnea(isSame) {  
+  switch (isSame) {  
+    case 1:
+      return 'danger';  
+    case 0: 
+      return 'info';  
+  }  
+}  
+function getStatuscasOnea(isSame) {
+  switch (isSame) {
+    case 1:  
+      return t('searchOrder.same');
+    case 0:  
+      return t('searchOrder.notsame'); 
+  }  
+}
+function tableRowClassName({ row }) {
+  if (row.isSame === 1) {
+    return 'row-red-background'; // 璁剧疆绾㈣壊鑳屾櫙
+  }
+  return '';
+}
 onBeforeUnmount(() => {
   closeWebSocket();
 });
@@ -1112,6 +1134,7 @@
     <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;" v-loading="loading">
       <el-table height="300px" ref="table" 
         @selection-change="handleSelectionChange"
+        :row-class-name="tableRowClassName"
         :data="tableDatad" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
           <el-table-column prop="glassId" align="center" :label="$t('searchOrder.intoglassid')" min-width="140" />
           <el-table-column prop="startSlot" align="center" :label="$t('searchOrder.startposition')" min-width="120" />
@@ -1120,6 +1143,13 @@
           <template #default="scope">
             <el-tag type="success" >{{ scope.row.taskState==0? $t('searchOrder.filmenter') : $t('searchOrder.infilm') }}</el-tag>
           </template>
+          </el-table-column>
+          <el-table-column prop="isSame" align="center" :label="$t('searchOrder.whethersame')" min-width="120">
+          <template #default="scope">
+        <el-tag :type="getcasOnea(scope.row.isSame)">
+          {{ getStatuscasOnea(scope.row.isSame) }}
+        </el-tag>
+      </template>
           </el-table-column>
         </el-table>
             </el-card>
@@ -1680,7 +1710,7 @@
                  :printGlassId="printGlassId" style=""/>
   </el-dialog>
 </template>
-<style scoped>
+<style>
 #dt { display:block; float:left;line-height: 20px;margin-left: 100px;}
 #dta { display:block; float:left;line-height: 20px;margin-left: 80%;}
 #dialog-footer{
@@ -1826,4 +1856,7 @@
   margin-top: 20px;
   margin-bottom: 10px;
 }
+.row-red-background {
+  background-color: #CDAF95 !important;
+}
 </style>
\ No newline at end of file

--
Gitblit v1.8.0