From 94f66dff2fb642c7f503a3d8a845ff39a3a8d634 Mon Sep 17 00:00:00 2001
From: wangfei <3597712270@qq.com>
Date: 星期一, 10 三月 2025 15:52:33 +0800
Subject: [PATCH] 中空模块增加玻璃数据显示、掰片/识别模块整体颜色根据钢化更改、上片模块架子复位按钮做限制判断

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

diff --git a/UI-Project/src/views/Slicecage/slicecage.vue b/UI-Project/src/views/Slicecage/slicecage.vue
index 41ecca8..2927c05 100644
--- a/UI-Project/src/views/Slicecage/slicecage.vue
+++ b/UI-Project/src/views/Slicecage/slicecage.vue
@@ -35,6 +35,7 @@
 const tableDatae = ref([])
 const tableDatax = ref([])
 const tableDatas = ref([])
+const tableDatass = ref([])
 const tableDatalack = ref([])
 const tableDataspecify = ref([])
 const tableDatacagedetails = ref([])
@@ -779,6 +780,11 @@
 let socket = null;
 const socketUrl = `ws://${WebSocketHost}:${host}/api/cacheVerticalGlass/api/talk/slicecage`;
 const handleMessage = (data) => {
+  if(data.bigStorageSummary!=null){
+    tableDatass.value = data.bigStorageSummary[0]
+  }else{
+    tableDatass.value = ''
+      }
   if (data.inkageEntity != null) {
     inkageEntity.value = data.inkageEntity[0] == true ? 'green' : '#911005';
   }
@@ -879,7 +885,7 @@
 const rectStyle = (rect, index) => ({
   position: 'absolute',
   width: '170px',
-  left: '0px',
+  right: '0px',
   top: `${index*rect.top}px`,
   height: `${rect.height}px`,
 });
@@ -895,24 +901,24 @@
 // 璁$畻姣忎釜灏忕煩褰㈢殑鏍峰紡
 const subRectStyle = (rectIndex, subIndex) => {
   const width = '18px';
-  const marginLeft = '8px';
-  const totalWidth = 6 * (parseInt(width) + parseInt(marginLeft));
-  const left = `${(subIndex * (parseInt(width) + parseInt(marginLeft))) / totalWidth * 100}%`;
+  const marginRight = '8px';
+  const totalWidth = 6 * (parseInt(width) + parseInt(marginRight));
+  const right = `${(subIndex * (parseInt(width) + parseInt(marginRight))) / totalWidth * 100}%`;
   return {
     position: 'absolute',
     width,
     height: '100%',
-    marginLeft,
+    marginRight,
     top: '0px',
     backgroundColor: '#911005',
-    left,
+    right,
   };
 };
 // 璁$畻姣忎釜澶х煩褰㈢殑鏍峰紡
 const rectStylea = (rect, index) => ({
   position: 'absolute',
   width: '170px',
-  left: '0px',
+  right: '0px',
   top: `${index*rect.top}px`,
   height: `${rect.height}px`,
 });
@@ -928,24 +934,24 @@
 // 璁$畻姣忎釜灏忕煩褰㈢殑鏍峰紡
 const subRectStylea = (rectIndex, subIndex) => {
   const width = '18px';
-  const marginLeft = '8px';
-  const totalWidth = 6 * (parseInt(width) + parseInt(marginLeft));
-  const left = `${(subIndex * (parseInt(width) + parseInt(marginLeft))) / totalWidth * 100}%`;
+  const marginRight = '8px';
+  const totalWidth = 6 * (parseInt(width) + parseInt(marginRight));
+  const right = `${(subIndex * (parseInt(width) + parseInt(marginRight))) / totalWidth * 100}%`;
   return {
     position: 'absolute',
     width,
     height: '100%',
-    marginLeft,
+    marginRight,
     top: '0px',
     backgroundColor: '#911005',
-    left,
+    right,
   };
 };
 // 璁$畻姣忎釜澶х煩褰㈢殑鏍峰紡
 const rectStyleb = (rect, index) => ({
   position: 'absolute',
   width: '170px',
-  left: '0px',
+  right: '0px',
   top: `${index*rect.top}px`,
   height: `${rect.height}px`,
 });
@@ -961,24 +967,24 @@
 // 璁$畻姣忎釜灏忕煩褰㈢殑鏍峰紡
 const subRectStyleb = (rectIndex, subIndex) => {
   const width = '18px';
-  const marginLeft = '8px';
-  const totalWidth = 6 * (parseInt(width) + parseInt(marginLeft));
-  const left = `${(subIndex * (parseInt(width) + parseInt(marginLeft))) / totalWidth * 100}%`;
+  const marginRight = '8px';
+  const totalWidth = 6 * (parseInt(width) + parseInt(marginRight));
+  const right = `${(subIndex * (parseInt(width) + parseInt(marginRight))) / totalWidth * 100}%`;
   return {
     position: 'absolute',
     width,
     height: '100%',
-    marginLeft,
+    marginRight,
     top: '0px',
     backgroundColor: '#911005',
-    left,
+    right,
   };
 };
 // 璁$畻姣忎釜澶х煩褰㈢殑鏍峰紡
 const rectStylec = (rect, index) => ({
   position: 'absolute',
   width: '170px',
-  left: '0px',
+  right: '0px',
   top: `${index*rect.top}px`,
   height: `${rect.height}px`,
 });
@@ -994,17 +1000,17 @@
 // 璁$畻姣忎釜灏忕煩褰㈢殑鏍峰紡
 const subRectStylec = (rectIndex, subIndex) => {
   const width = '18px';
-  const marginLeft = '8px';
-  const totalWidth = 6 * (parseInt(width) + parseInt(marginLeft));
-  const left = `${(subIndex * (parseInt(width) + parseInt(marginLeft))) / totalWidth * 100}%`;
+  const marginRight = '8px';
+  const totalWidth = 6 * (parseInt(width) + parseInt(marginRight));
+  const right = `${(subIndex * (parseInt(width) + parseInt(marginRight))) / totalWidth * 100}%`;
   return {
     position: 'absolute',
     width,
     height: '100%',
-    marginLeft,
+    marginRight,
     top: '0px',
     backgroundColor: '#911005',
-    left,
+    right,
   };
 };
 onMounted(() => {
@@ -1065,6 +1071,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 +1140,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 +1149,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>
@@ -1138,7 +1174,7 @@
     </div>
 <!-- // 鐖剁骇妗� -->
 <div class="img-dlpl" >
-    <div class="img-car1" :style="'z-index:999;left:375px;top:' + 350*carPosition[0] + 'px;position:absolute;'">
+    <div class="img-car1" :style="'z-index:999;left:290px;top:' + 350*carPosition[0] + 'px;position:absolute;'">
       <div  
       v-for="(rect, index) in adjusta"  
       :key="rect.id"  
@@ -1152,7 +1188,7 @@
     >
     </div>
     </div>
-    <div class="img-car4" :style="'z-index:999;left:770px;top:' + 350*carPosition[1] + 'px;position:absolute;'">
+    <div class="img-car4" :style="'z-index:999;left:735px;top:' + 350*carPosition[1] + 'px;position:absolute;'">
       <div  
       v-for="(rect, index) in adjust"  
       :key="rect.id"  
@@ -1167,7 +1203,7 @@
     </div>
     </div>
     <div style="position: relative;">
-    <div v-show="cell1" style="width: 170px;height: 53px;position: relative;top:63px;left: 585px;">
+    <div v-show="cell1" style="width: 170px;height: 53px;position: relative;top:63px;left: 525px;">
       <div v-for="(rect, rectIndex) in adjustedRects" :key="rect.id" :style="rectStyle(rect, rectIndex)">
     <div
       v-for="(subRect, subIndex) in getSubRects(rectIndex)"
@@ -1176,7 +1212,7 @@
     ></div>
     </div>
     </div>
- <div v-show="cell2" style="width: 170px;height: 53px;position: relative;top:67px;left: 585px;">
+ <div v-show="cell2" style="width: 170px;height: 53px;position: relative;top:67px;left: 525px;">
     <div v-for="(rect, rectIndex) in adjustedRectsa" :key="rect.id" :style="rectStylea(rect, rectIndex)">
     <div
       v-for="(subRect, subIndex) in getSubRectsa(rectIndex)"
@@ -1185,7 +1221,7 @@
     ></div>
     </div>
     </div>
-  <div v-show="cell3" style="width: 170px;height: 53px;position: relative;top:72px;left: 585px;">
+  <div v-show="cell3" style="width: 170px;height: 53px;position: relative;top:72px;left: 525px;">
     <div v-for="(rect, rectIndex) in adjustedRectsb" :key="rect.id" :style="rectStyleb(rect, rectIndex)">
     <div
       v-for="(subRect, subIndex) in getSubRectsb(rectIndex)"
@@ -1194,7 +1230,7 @@
     ></div>
     </div>
     </div>
-  <div v-show="cell4" style="width: 170px;height: 53px;position: relative;top:77px;left: 585px;">
+  <div v-show="cell4" style="width: 170px;height: 53px;position: relative;top:77px;left: 525px;">
     <div v-for="(rect, rectIndex) in adjustedRectsc" :key="rect.id" :style="rectStylec(rect, rectIndex)">
     <div
       v-for="(subRect, subIndex) in getSubRectsc(rectIndex)"
@@ -1205,6 +1241,21 @@
     </div>
 </div>
 </div>
+<el-card style="flex: 1;margin-left: 1220px;margin-top: -510px;" v-loading="loading">
+      <div style="width: 100%; height: calc(100% - 35px); overflow-y: auto;max-height: 420px;">
+       <el-table height="420px" ref="table" border 
+       :data="tableDatass" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
+         <el-table-column prop="engineerId" align="center" :label="$t('Mounting.project')" min-width="140" />
+         <el-table-column prop="countTemp" align="center" :label="$t('searchOrder.totalfurnaces')" min-width="120" />
+         <el-table-column prop="countGlass" align="center" :label="$t('searchOrder.cagesnumber')" min-width="120" />
+         <el-table-column prop="area" align="center" :label="$t('large.are')" min-width="120" />
+         <el-table-column prop="fullTemp" align="center" :label="$t('searchOrder.fullfurnaces')" min-width="120" />
+         <el-table-column prop="countSlot" align="center" :label="$t('searchOrder.slotnumber')" min-width="120" />
+         <el-table-column prop="percent" align="center" :label="$t('searchOrder.progress')" min-width="120" />
+       </el-table>
+       </div>
+    </el-card>
+
   </div>
   <el-dialog v-model="add" top="10vh" width="70%" :title="$t('searchOrder.addcage')" >
     <div style="margin-bottom: 20px">
@@ -1680,7 +1731,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 +1877,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