From 8444d8830dbe22f146da426a8ca19ce1aa9b40e0 Mon Sep 17 00:00:00 2001
From: wang <3597712270@qq.com>
Date: 星期一, 22 四月 2024 09:41:39 +0800
Subject: [PATCH] 上片机图片

---
 UI-Project/src/views/Caching/caching.vue |  661 ++----------------------------------------------------
 1 files changed, 27 insertions(+), 634 deletions(-)

diff --git a/UI-Project/src/views/Caching/caching.vue b/UI-Project/src/views/Caching/caching.vue
index 18f3a10..7b7903b 100644
--- a/UI-Project/src/views/Caching/caching.vue
+++ b/UI-Project/src/views/Caching/caching.vue
@@ -4,643 +4,36 @@
 import {useRouter} from "vue-router"
 const router = useRouter()
 
-import { ref } from 'vue'
+import request from "@/utils/request"
+import { ref, onMounted } from "vue";
+// import { ref } from 'vue'
 import { ElMessage, ElMessageBox } from 'element-plus'
 //  import LanguageMixin from './lang/LanguageMixin'
 
+const tableData = ref([])
 
-const tableData = [
-  {
-    id: '1',
-    long: '1005',
-    wide: '183.6',
-    thick: '1991',
-    type: '1200',
-    typea: '1',
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '1200'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '1200'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '1200'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
-  },
-  {
-    id: '2',
-    long: '105',
-    wide: '183',
-    thick: '191',
-    typea: '1',
-    type: '寰呰瘑鍒�'
+// 鍙戦�佽幏鍙栬〃鏍兼暟鎹殑璇锋眰
+const fetchTableData = async () => {
+  try {
+    // 鍙戦�佽幏鍙栬〃鏍兼暟鎹殑璇锋眰锛屽苟绛夊緟鍝嶅簲
+    // const response = await request.post("/loadGlass/optimizeProject/listByState", requestData);
+    const response = await request.get("/unLoadGlass/unLoadGlass/downstorage");
+
+    // 妫�鏌ュ搷搴旂姸鎬�
+    if (response.code === 200) {
+      // 鏇存柊琛ㄦ牸鏁版嵁
+      console.log('鎴愬姛鑾峰彇琛ㄦ牸鏁版嵁:', response.data);
+      tableData.splice(0, tableData.length, ...response.data);
+    } else {
+      // 璇锋眰澶辫触锛屾樉绀洪敊璇秷鎭�
+      ElMessage.error(response.msg);
+    }
+  } catch (error) {
+    // 澶勭悊璇锋眰澶辫触鐨勬儏鍐�
+    ElMessage.error('鑾峰彇琛ㄦ牸鏁版嵁澶辫触锛岃閲嶈瘯');
   }
-]
-const tableDataa = [
-  {
-    ida: '3',
-    longa: '1005',
-    widea: '183.6',
-    thicka: '1991',
-  },
-  {
-    ida: '4',
-    longa: '105',
-    widea: '183',
-    thicka: '191',
-  }
-]
+};
+onMounted(fetchTableData);
 
 const dialogForm = () => {
   ElMessageBox.confirm(
@@ -741,8 +134,8 @@
 <template>
   <div>
     <el-card style="flex: 1;margin-left: 10px;margin-top: 20px;" v-loading="loading">
-      <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;max-height: 240px;">
-        <el-table height="100%" ref="table" 
+      <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;">
+        <el-table height="240" ref="table" 
         @selection-change="handleSelectionChange"
         :data="tableData" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
           <el-table-column prop="id" align="center" label="鐜荤拑ID" min-width="80" />

--
Gitblit v1.8.0