From b4fb42f2b0bc4eb72adc3c76e51f09584e6bcf9b Mon Sep 17 00:00:00 2001
From: wu <731351411@qq.com>
Date: 星期三, 24 七月 2024 13:37:07 +0800
Subject: [PATCH] 上片机获取原始宽高

---
 UI-Project/src/views/Slicecage/slicecage.vue |   78 +++++++++++++++++++++++++++++++++------
 1 files changed, 66 insertions(+), 12 deletions(-)

diff --git a/UI-Project/src/views/Slicecage/slicecage.vue b/UI-Project/src/views/Slicecage/slicecage.vue
index 2828438..5870cad 100644
--- a/UI-Project/src/views/Slicecage/slicecage.vue
+++ b/UI-Project/src/views/Slicecage/slicecage.vue
@@ -14,7 +14,9 @@
 const dialogFormVisible = ref(false)
 const dialogFormVisiblea = ref(false)
 const dialogFormVisibleb = ref(false)
+const dialogFormVisiblec = ref(false)
 const tableData = ref([])
+const tableDatagh = ref([])
 const tableDatab = ref([])
 const tableDatac = ref([])
 const tableDatad = ref([])
@@ -69,8 +71,19 @@
 const cell8=ref(true);
 const cell9=ref(true);
 const selectedRow = ref(null); // 瀛樺偍閫変腑鐨勮鏁版嵁  
-
-
+ 
+onMounted(async () => {  
+  try {  
+    const response = await request.post('/cacheVerticalGlass/bigStorageCageDetails/selectTemperingGlass');
+    if (response.code === 200) {  
+      tableDatagh.value = response.data
+    } else {  
+      ElMessage.warning(response.msg)
+    }  
+  } catch (error) {  
+    // console.error('Error fetching rects :', error);  
+  }  
+}); 
     // 褰撳墠椤电爜鍜屾瘡椤垫樉绀虹殑鏉℃暟
     const currentPage = ref(1);
     const itemsPerPage = computed(() => {
@@ -94,14 +107,14 @@
         return 25; // 榛樿鍊硷紝鍙互鏍规嵁瀹為檯闇�姹備慨鏀�
       }
     });
-
+ 
     // 璁$畻鍒嗛〉鍚庣殑鏁版嵁
     const paginatedUsers = computed(() => {
       const startIndex = calculateStartIndex();
       const endIndex = startIndex + itemsPerPage.value;
       return tableData.value.slice(startIndex, endIndex);
     });
-
+ 
     // 璁$畻褰撳墠椤电殑璧峰绱㈠紩
     function calculateStartIndex() {
       let index = 0;
@@ -145,7 +158,7 @@
         currentPage.value++;
       }
     };
-
+ 
     // 鎬婚〉鏁拌绠�
     const totalPages = computed(() => {
       // let total = 0;
@@ -162,9 +175,9 @@
       // }
       return 9;
     });
-
-
-
+ 
+ 
+ 
 const getTableRow = (row,type) =>{
   switch (type) {
     case 'edit' :{
@@ -349,6 +362,33 @@
     console.error('鍙戠敓閿欒:', error);  
   }  
 }; 
+ // 鎸囧畾閽㈠寲
+ const brokee = async(row) => {  
+  try {
+    const confirmResult = await ElMessageBox.confirm(  
+      t('searchOrder.specifytemperinga'), 
+      t('searchOrder.prompt'),  
+      {  
+        confirmButtonText: t('searchOrder.yes'), 
+        cancelButtonText: t('searchOrder.cancel'),
+        type: 'warning',  
+      } 
+    ); 
+    if (confirmResult === 'confirm') {  
+      const response = await request.post("/cacheVerticalGlass/bigStorageCageDetails/TemperingGlass",{
+        engineerId: row.engineer_id,
+        temperingLayoutId: row.tempering_layout_id,
+    });
+    if (response.code === 200) {
+      ElMessage.success(response.message);
+      } else {  
+      ElMessage.error(response.message);
+      }  
+    }  
+  } catch (error) {  
+    console.error('鍙戠敓閿欒:', error);  
+  }  
+}; 
 // 鍑虹墖闃熷垪鎷胯蛋
 const brokeb = async(row) => {  
   try {
@@ -452,7 +492,7 @@
       ElMessage.success(response.message);
       glassId.value = '';
       tableDataf.value = '';
-
+ 
       } else {  
       ElMessage.error(response.message);
       }  
@@ -548,14 +588,14 @@
             top: 29/length
           })); 
   }
-
+ 
   
 };
 // 鍒濆鍖� WebSocket锛屽苟浼犻�掓秷鎭鐞嗗嚱鏁�
 onMounted(() => {
   // fetchFlowCardId();
   initializeWebSocket(socketUrl, handleMessage);
-
+ 
 });
 function getStatusType(enableState: number) {  
   switch (enableState) {  
@@ -617,6 +657,7 @@
   <div style="height: 600px;">
     <el-button style="margin-top: 5px;margin-left: 10px;"   id="searchButton" type="primary" @click="dialogFormVisiblea = true">{{ $t('searchOrder.cageinformation') }}</el-button>
     <el-button style="margin-top: 5px;margin-left: 10px;"   id="searchButton" type="success" @click="dialogFormVisibleb = true">{{ $t('searchOrder.productionqueue') }}</el-button>
+    <el-button style="margin-top: 5px;margin-left: 10px;"   id="searchButton" type="info" @click="dialogFormVisiblec = true">{{ $t('searchOrder.temperingqueries') }}</el-button>
     <el-card style="flex: 1;margin-left: 10px;margin-top: 5px;" v-loading="loading">
       <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;max-height: 100px;">
         <el-table height="100px" ref="table" 
@@ -1039,7 +1080,7 @@
           </el-input>
           <el-button type="primary" plain style="margin-left: 10px;" @click="searchout">{{ $t('searchOrder.search') }}</el-button>
     </div>
-
+ 
     <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;max-height: 200px;">
         <el-table height="100%" ref="table"
         :data="tableDataf" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
@@ -1239,6 +1280,19 @@
         </el-table-column>
         </el-table>
 </el-dialog>
+<el-dialog v-model="dialogFormVisiblec" top="5vh" width="85%" :title="$t('searchOrder.temperingqueries')">
+    <el-table  ref="table" style="margin-top: 20px;height: 500px;"
+        :data="tableDatagh" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
+          <el-table-column prop="engineer_id" fixed align="center" :label="$t('searchOrder.projectnumber')" min-width="150"/>
+          <el-table-column prop="tempering_layout_id" fixed align="center" :label="$t('searchOrder.layoutnumber')" min-width="120" />
+          <el-table-column prop="count" align="center" :label="$t('searchOrder.numberglasses')" min-width="150" />
+          <el-table-column fixed="right" :label="$t('searchOrder.operate')" align="center" width="150">
+            <template #default="scope">
+              <el-button size="mini" type="text" plain @click="brokee(scope.row)">{{ $t('searchOrder.specifytempering') }}</el-button>
+            </template>
+        </el-table-column>
+        </el-table>
+</el-dialog>
  
 </template>
 <style scoped>

--
Gitblit v1.8.0