From eea9f3f7b76d4e6bb8e79e8d0e07ffe9d4b66b5c Mon Sep 17 00:00:00 2001 From: wang <3597712270@qq.com> Date: 星期二, 21 五月 2024 14:24:57 +0800 Subject: [PATCH] 调整上片机刷新方式,新增磨边(冷加工)界面 --- UI-Project/src/views/Identify/identify.vue | 16 +++++++++++----- 1 files changed, 11 insertions(+), 5 deletions(-) diff --git a/UI-Project/src/views/Identify/identify.vue b/UI-Project/src/views/Identify/identify.vue index c8c0ce0..84ef2b6 100644 --- a/UI-Project/src/views/Identify/identify.vue +++ b/UI-Project/src/views/Identify/identify.vue @@ -26,16 +26,12 @@ </div> <!-- 鐐瑰嚮寮瑰嚭 --> <el-dialog v-model="blind" top="30vh" width="15%" style="text-align: center;"> - <!-- <template #footer> --> - <!-- <div id="dialog-footer"> --> <el-button type="warning" plain :icon="Delete" @click="handleDamage(currentGlassId)" style="width: 120px;margin-left: 10px;"> 鐮存崯 </el-button> <el-button type="danger" plain @click="handleManualTake(currentGlassId)" style="width: 120px;margin-top: 10px;"> <el-icon class="el-icon--right"><Upload /></el-icon> 浜哄伐鎷胯蛋</el-button> - <!-- </div> --> - <!-- </template> --> </el-dialog> </div> </div> @@ -113,6 +109,7 @@ ElMessage.success(response.message); // window.location.reload() blind.value = false; + updateRectStatus(currentGlassId.value, 201); } else { // 璇锋眰澶辫触锛屾樉绀洪敊璇秷鎭� ElMessage.error(response.msg); @@ -138,6 +135,7 @@ ElMessage.success(response.message); // window.location.reload() blind.value = false; + updateRectStatus(currentGlassId.value, 200); } else { // 璇锋眰澶辫触锛屾樉绀洪敊璇秷鎭� ElMessage.error(response.msg); @@ -165,7 +163,15 @@ default: return '#911005'; // 榛樿棰滆壊 } -} +} +// 鏇存柊鐭╁舰鐘舵�� +function updateRectStatus(glassId: string, status: number) { + adjustedRects.value.forEach(rect => { + if (rect.glass_id === glassId) { + rect.glass_state = status; // 鏇存柊鐭╁舰鐨勭姸鎬� + } + }); +} </script> <style scoped> -- Gitblit v1.8.0