From 8e981498c3192e4c05dfb0c4f5ae1b3e77740601 Mon Sep 17 00:00:00 2001 From: wangfei <3597712270@qq.com> Date: 星期五, 28 六月 2024 09:13:44 +0800 Subject: [PATCH] 上片机点击事件,大理片笼部分 --- UI-Project/src/views/Returns/returns.vue | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-) diff --git a/UI-Project/src/views/Returns/returns.vue b/UI-Project/src/views/Returns/returns.vue index cff32bf..42dd369 100644 --- a/UI-Project/src/views/Returns/returns.vue +++ b/UI-Project/src/views/Returns/returns.vue @@ -323,8 +323,8 @@ const uniqueThicknesses = new Set(response.data.map(item => item.thickness)); selectOptions.value = Array.from(uniqueWidths).map(width => ({ - value: width, // 鍋囪杩欐槸浣犳兂瑕佷綔涓簐alue鐨勫睘鎬� - label: width, // 鍋囪杩欐槸浣犳兂瑕佹樉绀虹殑label + value: width, + label: width, })); selectOptionsa.value = Array.from(uniqueHeights).map(height => ({ value: height, @@ -504,14 +504,13 @@ ElMessage.error(t('basicData.updatanull')); return; // 濡傛灉 id 涓虹┖锛屽垯涓嶆墽琛屽悗缁搷浣� } - const newState = row.state === 100 ? 0 : 100; - try { // 鍙戦�佽姹傚埌鍚庣鏇存柊鐘舵�� const response = await request.post('/loadGlass/up-patten-usage/updateGlassState', { id: row.id, state: newState }); if (response.code === 200) { ElMessage.success(response.message); + row.state = newState; } else { ElMessage.error(response.message); } @@ -520,7 +519,6 @@ ElMessage.error(t('basicData.glassnull')); } }; - const wsUrl = `ws://${WebSocketHost}:${host}/api/loadGlass/api/talk/loadGlass`; const ws = new WebSocket(wsUrl); ws.onopen = () => { -- Gitblit v1.8.0