From 55aa572d4750c29b1bb6b21dae800a2dbe71a9d4 Mon Sep 17 00:00:00 2001
From: wangfei <3597712270@qq.com>
Date: 星期五, 13 十二月 2024 14:26:04 +0800
Subject: [PATCH] 删除废弃代码

---
 UI-Project/src/views/Caching/cachingbefore.vue |   45 ++++++++++++---------------------------------
 1 files changed, 12 insertions(+), 33 deletions(-)

diff --git a/UI-Project/src/views/Caching/cachingbefore.vue b/UI-Project/src/views/Caching/cachingbefore.vue
index ae01dab..f97f343 100644
--- a/UI-Project/src/views/Caching/cachingbefore.vue
+++ b/UI-Project/src/views/Caching/cachingbefore.vue
@@ -2,16 +2,10 @@
 import {onBeforeUnmount, onMounted, onUnmounted, ref} from "vue";
 import {useRouter} from "vue-router"
 import {host, WebSocketHost} from '@/utils/constants'
-
 import request from "@/utils/request"
 import {closeWebSocket, initializeWebSocket} from '@/utils/WebSocketService';
-// import { ref } from 'vue'
 import {ElMessage, ElMessageBox} from 'element-plus'
-//  import LanguageMixin from './lang/LanguageMixin'
 import {useI18n} from 'vue-i18n'
-
-const router = useRouter()
-const adda = ref(false)
 const {t} = useI18n()
 let language = ref(localStorage.getItem('lang') || 'zh')
 const tableData = ref([])
@@ -19,17 +13,15 @@
 const adjustedRects = ref([]);
 onMounted(async () => {
   try {
-    const response = await request.post('/cacheGlass/edgStorageCage/selectEdgStorageCage'); // 鏇挎崲涓轰綘鐨凙PI绔偣  
+    const response = await request.post('/cacheGlass/edgStorageCage/selectEdgStorageCage');
     if (response.code === 200) {
-      const rawRects = response.data; // 璁剧疆鐭╁舰鏁版嵁  
+      const rawRects = response.data;
       tableData.value = response.data
-          console.log(response.data);
-          adjustedRects.value = rawRects.map(rect => ({  
-            ...rect, // 澶嶅埗鍘熷瀵硅薄鐨勫叾浠栧睘鎬�  
-            width: rect.width * 0.5 ,
-            id: rect.id * 10,
-          })); 
-          console.log(adjustedRects.value);
+      adjustedRects.value = rawRects.map(rect => ({
+        ...rect,
+        width: rect.width * 0.5 ,
+        id: rect.id * 10,
+      }));
     } else {  
       ElMessage.warning(res.msg)
     }  
@@ -39,7 +31,6 @@
 }); 
 const toggleEnableState = async (row) => {  
   const newState = row.enable_state === 1 ? 0 : 1;
-  // 鍙戦�佽姹傚埌鍚庣鏇存柊鐘舵�侊紙杩欓噷鐪佺暐浜嗗疄闄呯殑璇锋眰閫昏緫锛�  
   const response = await request.post('/cacheGlass/edgStorageCage/updateEdgStorageCage', { id: row.id, enableState: newState });  
   if (response.code === 200) {
       ElMessage.success(response.message);
@@ -61,7 +52,6 @@
     );  
     if (confirmResult === 'confirm') {  
       var url="/cacheGlass/edgStorageCage/edgStorageCageGlass?edgStorageCageId="+row.id;
-      console.log(row);
       const response = await request.post(url, {
         glassId:row.glass_id
     })
@@ -77,17 +67,13 @@
 };   
 let socket = null;
 const socketUrl = `ws://${WebSocketHost}:${host}/api/cacheGlass/api/talk/cacheGlass`;
-// 瀹氫箟娑堟伅澶勭悊鍑芥暟锛屾洿鏂� receivedData 鍙橀噺
 const handleMessage = (data) => {
-  // 鏇存柊 tableData 鐨勬暟鎹�
   tableData.value = data.EdgStorageCageinfos[0]
-  // adjustedRects.value = data.EdgStorageCageinfos[0]
   adjustedRects.value = data.EdgStorageCageinfos[0].map(rect => ({  
-            ...rect, // 澶嶅埗鍘熷瀵硅薄鐨勫叾浠栧睘鎬�  
-            width: rect.width * 0.5 ,
-            id: rect.id * 10,
-          })); 
-
+      ...rect,
+      width: rect.width * 0.5 ,
+      id: rect.id * 10,
+    })); 
 };
 // 鍒濆鍖� WebSocket锛屽苟浼犻�掓秷鎭鐞嗗嚱鏁�
 onMounted(() => {
@@ -127,14 +113,10 @@
           >  
             {{ scope.row.enable_state === 1 ?  $t('sorter.start') : $t('sorter.disable') }}
           </el-tag>  
-        </template> 
-          <!-- <template #default="scope">
-            <el-tag type="success" >{{ scope.row.enable_state==1?"鍚敤":"鏈惎鐢�"  }}</el-tag>
-          </template> -->
+        </template>
           </el-table-column>
           <el-table-column fixed="right" :label="$t('sorter.operate')" align="center" width="200">
             <template #default="scope">
-              <!-- <el-button size="mini" type="text" plain @click="handleBindRacka(scope.row)">鎶ョ己</el-button> -->
               <el-button size="mini" type="text" plain  @click="open(scope.row)">{{ $t('sorter.deficiencieste') }}</el-button>
             </template>
         </el-table-column>
@@ -157,9 +139,7 @@
 </div>
 </div>
 </template>
-
 <style scoped>
-
 #dt { display:block; float:left;line-height: 20px;margin-left: 100px;}
 #dta { display:block; float:left;line-height: 20px;margin-left: 80%;}
 #dialog-footer{
@@ -180,5 +160,4 @@
   width: 1500px;
   max-width: 100%;
 }
-
 </style>

--
Gitblit v1.8.0