From 4e04b09bf71629843bccd6f8177388fb19150529 Mon Sep 17 00:00:00 2001
From: wang <3597712270@qq.com>
Date: 星期一, 22 四月 2024 16:38:20 +0800
Subject: [PATCH] 上片机接口
---
UI-Project/src/views/Caching/caching.vue | 58 +++++++++++++++++++++++++++++++++++-----------------------
1 files changed, 35 insertions(+), 23 deletions(-)
diff --git a/UI-Project/src/views/Caching/caching.vue b/UI-Project/src/views/Caching/caching.vue
index 7b7903b..1734d49 100644
--- a/UI-Project/src/views/Caching/caching.vue
+++ b/UI-Project/src/views/Caching/caching.vue
@@ -13,27 +13,39 @@
const tableData = ref([])
// 鍙戦�佽幏鍙栬〃鏍兼暟鎹殑璇锋眰
-const fetchTableData = async () => {
- try {
- // 鍙戦�佽幏鍙栬〃鏍兼暟鎹殑璇锋眰锛屽苟绛夊緟鍝嶅簲
- // const response = await request.post("/loadGlass/optimizeProject/listByState", requestData);
- const response = await request.get("/unLoadGlass/unLoadGlass/downstorage");
+// const fetchTableData = async () => {
+// try {
+// // 鍙戦�佽幏鍙栬〃鏍兼暟鎹殑璇锋眰锛屽苟绛夊緟鍝嶅簲
+// // const response = await request.post("/loadGlass/optimizeProject/listByState", requestData);
+// const response = await request.get("unLoadGlass/downStorage/selectStorageCage");
- // 妫�鏌ュ搷搴旂姸鎬�
- if (response.code === 200) {
- // 鏇存柊琛ㄦ牸鏁版嵁
- console.log('鎴愬姛鑾峰彇琛ㄦ牸鏁版嵁:', response.data);
- tableData.splice(0, tableData.length, ...response.data);
- } else {
- // 璇锋眰澶辫触锛屾樉绀洪敊璇秷鎭�
- ElMessage.error(response.msg);
- }
- } catch (error) {
- // 澶勭悊璇锋眰澶辫触鐨勬儏鍐�
- ElMessage.error('鑾峰彇琛ㄦ牸鏁版嵁澶辫触锛岃閲嶈瘯');
- }
-};
-onMounted(fetchTableData);
+// // 妫�鏌ュ搷搴旂姸鎬�
+// if (response.code === 200) {
+// // 鏇存柊琛ㄦ牸鏁版嵁
+// console.log('鎴愬姛鑾峰彇琛ㄦ牸鏁版嵁:', response.data);
+// tableData.splice(0, tableData.length, ...response.data);
+// } else {
+// // 璇锋眰澶辫触锛屾樉绀洪敊璇秷鎭�
+// ElMessage.error(response.msg);
+// }
+// } catch (error) {
+// // 澶勭悊璇锋眰澶辫触鐨勬儏鍐�
+// ElMessage.error('鑾峰彇琛ㄦ牸鏁版嵁澶辫触锛岃閲嶈瘯');
+// }
+// };
+// onMounted(fetchTableData);
+
+
+
+request.get("unLoadGlass/downStorage/selectStorageCage").then((res) => {
+ if (res.code == 200) {
+ console.log(res.data);
+ tableData.value = res.data
+ } else {
+ ElMessage.warning(res.msg)
+
+ }
+ });
const dialogForm = () => {
ElMessageBox.confirm(
@@ -139,9 +151,9 @@
@selection-change="handleSelectionChange"
:data="tableData" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
<el-table-column prop="id" align="center" label="鐜荤拑ID" min-width="80" />
- <el-table-column prop="long" align="center" label="浣嶇疆" min-width="120" />
- <el-table-column prop="wide" align="center" label="瀹�" min-width="120" />
- <el-table-column prop="type" align="center" label="闀�" min-width="120" />
+ <el-table-column prop="sequence" align="center" label="浣嶇疆" min-width="120" />
+ <el-table-column prop="width" align="center" label="瀹�" min-width="120" />
+ <el-table-column prop="height" align="center" label="闀�" min-width="120" />
<el-table-column fixed="right" label="鎿嶄綔" align="center" width="200">
<template #default>
<el-button size="mini" type="text" plain @click="dialogForm">鎶ョ己</el-button>
--
Gitblit v1.8.0