From b9b44b51b201e2f5a9a1f3665c7fb76b5690f9af Mon Sep 17 00:00:00 2001
From: wu <731351411@qq.com>
Date: 星期一, 23 十二月 2024 16:13:08 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
UI-Project/src/views/Identify/identifwu.vue | 15 ---------------
1 files changed, 0 insertions(+), 15 deletions(-)
diff --git a/UI-Project/src/views/Identify/identifwu.vue b/UI-Project/src/views/Identify/identifwu.vue
index 651915c..5b4b87a 100644
--- a/UI-Project/src/views/Identify/identifwu.vue
+++ b/UI-Project/src/views/Identify/identifwu.vue
@@ -58,7 +58,6 @@
import request from "@/utils/request"
import {host, WebSocketHost} from '@/utils/constants'
import {useI18n} from 'vue-i18n'
-
const {t} = useI18n()
let language = ref(localStorage.getItem('lang') || 'zh')
const blind = ref(false)
@@ -84,7 +83,6 @@
const currentGlassRect = computed(() => {
return adjustedRects.value.find(rect => rect.glass_id === currentGlassId.value);
});
-
function showDialog(glassId: number) {
currentGlassId.value = glassId;
blind.value = true;
@@ -92,7 +90,6 @@
rect.glass_id === glassId ? {...rect, isActive: true} : rect
);
}
-
const handleDialogClose = () => {
adjustedRects.value = adjustedRects.value.map(rect => ({
...rect,
@@ -192,7 +189,6 @@
} else {
}
};
-
const handleCurrentChange = (val: number) => {
currentPage.value = val;
// window.localStorage.setItem('pagenumber', currentPage.value).
@@ -211,7 +207,6 @@
glass_state: rect.glass_state
}));
};
-
function getRectColor(state: number): string {
switch (state) {
case 0:
@@ -228,7 +223,6 @@
return '#f3d19e';
}
}
-
// 鏇存柊鐭╁舰鐘舵��
function updateRectStatus(glassId: string, status: number) {
adjustedRects.value.forEach(rect => {
@@ -237,7 +231,6 @@
}
});
}
-
const connectWebSocket = () => {
if (!webSocket) {
const socketUrl = `ws://${WebSocketHost}:${host}/api/cacheGlass/api/talk/cacheGlass`;
@@ -249,7 +242,6 @@
if (data.currentCutTerritory && data.currentCutTerritory.length > 0) {
const newRects = data.currentCutTerritory[0].map(rect => {
const existingRect = adjustedRects.value.find(r => r.glass_id === rect.glass_id);
-
if (existingRect) {
return {
...existingRect,
@@ -291,20 +283,17 @@
connectWebSocket();
}
});
-
onUnmounted(() => {
if (webSocket) {
webSocket.close();
}
});
</script>
-
<style scoped>
.rect {
border: 1px solid black; /* 璁剧疆鐭╁舰鐨勮竟妗� */
/* background-color: lightblue; 璁剧疆鐭╁舰鐨勮儗鏅壊 */
}
-
.centered-text {
/* 璁剧疆鏂囧瓧灞呬腑鏍峰紡 */
/* display: flex; */
@@ -313,12 +302,10 @@
height: 100%; /* 纭繚div鍗犳嵁鏁翠釜鐭╁舰鐨勯珮搴� */
font-size: small;
}
-
#rect {
position: relative; /* 纭繚绠ご鍙互鐩稿浜庣煩褰㈠畾浣� */
/* 鍏朵粬鏍峰紡 */
}
-
#arrow {
position: absolute;
top: 70%; /* 绠ご浣嶄簬鐭╁舰涓棿 */
@@ -331,7 +318,6 @@
border-right: 20px solid #911005; /* 鍙宠竟妗嗭紝褰㈡垚绠ご */
/* 鏍规嵁闇�瑕佽皟鏁磋竟妗嗗ぇ灏忓拰棰滆壊 */
}
-
#line {
position: absolute;
top: 70%; /* 鐩寸嚎浣嶄簬鐭╁舰涓棿 */
@@ -341,5 +327,4 @@
width: 240px; /* 鐩寸嚎鐨勯暱搴︼紝鏍规嵁闇�瑕佽皟鏁� */
background-color: #911005; /* 鐩寸嚎鐨勯鑹� */
}
-
</style>
\ No newline at end of file
--
Gitblit v1.8.0