From f44c449c2f5ec5439d7df4145a28bc878018ba2b Mon Sep 17 00:00:00 2001 From: wuyouming666 <2265557248@qq.com> Date: 星期三, 15 五月 2024 15:33:02 +0800 Subject: [PATCH] 前端工位显示 --- UI-Project/src/views/Returns/returns.vue | 34 ++++++++++++++++++---------------- 1 files changed, 18 insertions(+), 16 deletions(-) diff --git a/UI-Project/src/views/Returns/returns.vue b/UI-Project/src/views/Returns/returns.vue index 49db7d7..c290cf4 100644 --- a/UI-Project/src/views/Returns/returns.vue +++ b/UI-Project/src/views/Returns/returns.vue @@ -62,23 +62,25 @@ } }; request.get("/loadGlass/LoadGlass/list").then((res) => { - if (res.code == 200) { - console.log(res.data); - tableDataa.value = res.data - window.localStorage.setItem('patternWidth', res.data.patternWidth) - window.localStorage.setItem('workstationId', res.data.workstationId) - let workstationIda = window.localStorage.getItem('workstationId') - let patternWidth = window.localStorage.getItem('patternWidth') - if (patternWidth !== '' || workstationIda == '1') { - flake.value = true - } else if (patternWidth !== '' || workstationIda == '2') { - flakea.value = true + if (res.code === 200) { + console.log(res.data); + tableDataa.value = res.data; + + if (tableDataa.value.length === 2) { + if (tableDataa.value[0].patternWidth > 0) { + flake.value = true; + } + + if (tableDataa.value[1].patternWidth > 0) { + flakea.value = true; + } } - } else { - ElMessage.warning(res.msg) - // router.push("/login") - } - }); + } else { + ElMessage.warning(res.msg); + // router.push("/login"); + } +}); + //瀹氫箟鎺ユ敹鍔犺浇琛ㄥご涓嬫媺鏁版嵁 const titleSelectJson = ref({ processType: [], -- Gitblit v1.8.0