| | |
| | | <el-input v-model="current" style="margin-left: 20px;margin-top: 15px;width: 240px" placeholder="请输入工程号" @input="updateUrl"/> |
| | | <el-button style="margin-top: 15px;margin-left: 15px;" type="primary" @click="fetchData">查询</el-button> |
| | | </div> |
| | | <el-card style="flex: 1;margin-left: 400px;margin-top: 50px;margin-right: 10px;width: 1100px;" height="900" v-loading="loading"> |
| | | <el-card style="flex: 1;margin-left: 400px;margin-top: 50px;margin-right: 10px;width: 1100px;" height="900" > |
| | | <div v-for="(row, rowIndex) in divsData" :key="rowIndex" class="row"> |
| | | <div v-for="(rect, colIndex) in row" :key="colIndex" class="div-container"> |
| | | <div style="text-align: center;">炉号:{{ getAdjustedRectsForRow(rowIndex)[0].layout_id }} ---- 装载率:{{ getAdjustedRectsForRow(rowIndex)[0].olLayoutRate }}</div> |
| | |
| | | height: `${rect.height}px`, |
| | | backgroundColor: 'lightblue'}"> |
| | | <div class="centered-text"> |
| | | <div style="font-size: 15px;font-weight: bold;">{{ rect.sort }}</div> |
| | | <div style="font-size: 15px;font-weight: bold;">{{ rect.process_id }}</div> |
| | | <div style="font-size: 15px;font-weight: bold;">{{ rect.project_no }}</div> |
| | | <div style="font-size: 30px;font-weight: bold;">{{ rect.widtha }}*{{ rect.heighta }}</div> |
| | |
| | | if (response.code === 200) { |
| | | rawData.value = response.data; |
| | | processData(rawData.value); |
| | | } else { |
| | | // ElMessage.warning(res.msg) |
| | | } else { |
| | | } |
| | | } catch (error) { |
| | | // console.error('Error fetching rects :', error); |
| | | } catch (error) { |
| | | } |
| | | }); |
| | | watch( |
| | |
| | | const response = await request.post(`/cacheGlass/taskCache/temperingTerritory?current=${current.value}`); |
| | | if (response.code === 200) { |
| | | rawData.value = response.data; |
| | | console.log(response.data); |
| | | |
| | | processData(rawData.value); |
| | | } |
| | | } catch (error) { |
| | | console.error('Failed to fetch data:', error); |
| | | } catch (error) { |
| | | } finally { |
| | | loading.value = false; |
| | | } |
| | |
| | | function getAdjustedRectsForRow(rowIndex) { |
| | | return adjustedRectsPerRow.value[rowIndex] || []; |
| | | } |
| | | </script> |
| | | |
| | | |
| | | </script> |
| | | <style scoped> |
| | | .row { |
| | | display: flex; |