ZengTao
2024-10-19 8738b8e0f7cfa65732bfc0e40fa80e1ca3c7e27e
Merge branch 'master' of http://bore.pub:10439/r/HangZhouMes
3个文件已修改
51 ■■■■ 已修改文件
UI-Project/src/views/GlassStorage/rawfilmstorage.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/Identify/identify.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/NewPage.vue 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/GlassStorage/rawfilmstorage.vue
@@ -117,7 +117,7 @@
    console.error('发生错误:', error);  
  }  
};  
  // 出库 
  const openc = async(row) => {  
  try {
UI-Project/src/views/Identify/identify.vue
@@ -14,7 +14,7 @@
    <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;margin-right: 10px;height: 800px;" v-loading="loading">
      <el-scrollbar height="750px" width="1400px" style="background-color: #e9e9eb;">
  <div style="position: relative;">  
    <div
    <div
      v-for="(rect, index) in adjustedRects"  
      :key="rect.glass_id"  
      class="rect"  
UI-Project/src/views/NewPage.vue
@@ -5,21 +5,22 @@
<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: 10px;margin-top: 20px;margin-right: 10px;width: 1850px;" height="900" v-loading="loading">
  <el-card style="flex: 1;margin-left: 150px;margin-top: 50px;margin-right: 10px;width: 1558px;" height="900" v-loading="loading">
  <div v-for="(row, rowIndex) in divsData" :key="rowIndex" class="row">  
      <div v-for="(rect, colIndex) in row" :key="colIndex" class="div-container">  
  <el-scrollbar height="430px" width="900px" style="background-color: #e9e9eb;">
  <div  style="position: relative;width: 100%;height: 100%;">
    <div
    <div style="text-align: center;">炉号:{{ getAdjustedRectsForRow(rowIndex)[0].layout_id }}</div>
  <el-scrollbar height="430px" width="1516px" style="background-color: #e9e9eb;">
  <div  style="position: relative;width: 100%;height: 100%;">
    <div
      v-for="(rect, index) in getAdjustedRectsForRow(rowIndex)"
    :key="index"  
    class="rect"
    :style="{ position: 'absolute',
    :style="{ position: 'absolute',
     top: `${rect.y_axis}px`, 
     left: `${rect.x_axis}px`,
     width: `${rect.width}px`,  
       height: `${rect.height}px`,  
      backgroundColor:  '#911005'}">
      backgroundColor:  'lightblue'}">
   <div  class="centered-text">
  <div style="font-size: 15px;font-weight: bold;">{{ rect.process_id }}</div>  
  <div style="font-size: 15px;font-weight: bold;">{{ rect.project_no }}</div>  
@@ -33,7 +34,6 @@
 </el-card>
</div>
</template>  
   <script setup>  
   import { ref, onMounted, watch, watchEffect } from 'vue';  
   import { useRoute, useRouter } from 'vue-router';  
@@ -49,7 +49,6 @@
   onMounted(() => {  
     if (route.query.current) {  
       current.value = route.query.current;
       console.log(current.value);
       window.localStorage.setItem('current', current.value)
     }  
   });  
@@ -59,7 +58,6 @@
           const response = await request.post(`/cacheGlass/taskCache/temperingTerritory?current=${current}`);
         if (response.code === 200) {  
           rawData.value = response.data;
                 console.log(rawData.value);
                 processData(rawData.value);
         } else {  
          //  ElMessage.warning(res.msg)
@@ -80,7 +78,6 @@
       const response = await request.post(`/cacheGlass/taskCache/temperingTerritory?current=${current.value}`);
       if (response.code === 200) {
          rawData.value = response.data;
          console.log(rawData.value);
          processData(rawData.value);
  }  
} catch (error) {  
@@ -91,31 +88,30 @@
};
   function processData(data) {  
const groupedData = [];  
for (let i = 0; i < data.length; i += 2) {
  groupedData.push(data.slice(i, i + 2));
for (let i = 0; i < data.length; i += 1) {
  groupedData.push(data.slice(i, i + 1));
}  
divsData.value = groupedData;
adjustedRectsPerRow.value = divsData.value.map(() => []);
divsData.value.forEach((row, rowIndex) => {
const rowIndex = divsData.value;
  adjustedRectsPerRow.value = divsData.value.map(() => []);
divsData.value.forEach((row, rowIndex) => {
  const rawRowData = rawData.value[rowIndex];
  if (rawRowData) {
adjustedRectsPerRow.value[rowIndex] = rawRowData.map(rect => {
  if (rawRowData) {
adjustedRectsPerRow.value[rowIndex] = rawRowData.map(rect => {
      let adjustedWidth, adjustedHeight,newX;
      if (rect.rotate_angle  === 0) {
       newX = rect.olHeight -(rect.y_axis + rect.height); 
       adjustedWidth = rect.height * (900/rect.olHeight);
       adjustedWidth = rect.height * (1516/rect.olHeight);
       adjustedHeight = rect.width * (430/rect.olWidth);
      } else {  
        newX = rect.olHeight -(rect.y_axis + rect.width); 
       adjustedWidth = rect.width * (900/rect.olHeight);
       adjustedWidth = rect.width * (1516/rect.olHeight);
       adjustedHeight = rect.height * (430/rect.olWidth);
      } 
      // 该页面为顺时针旋转90度
      let adjustedRect = {  
        ...rect,
        // x_axis: rect.y_axis * (959.35/rect.olHeight),
        y_axis: rect.x_axis * (430/rect.olWidth),
        x_axis: newX * (900/rect.olHeight),
        x_axis: newX * (1516/rect.olHeight),
        // y_axis: rect.x_axis * (430/rect.olWidth),
        width: adjustedWidth,  
        height: adjustedHeight,  
@@ -128,7 +124,7 @@
});  
}
// 方法用于获取当前行的adjustedRects  
function getAdjustedRectsForRow(rowIndex) {
function getAdjustedRectsForRow(rowIndex) {
return adjustedRectsPerRow.value[rowIndex] || [];  
}  
   </script>  
@@ -139,13 +135,12 @@
display: flex;  
justify-content: space-between;  
margin-bottom: 20px;
}
}
.div-container {  
width: 900px;
width: 1516px;
float: left;
background-color: #f4f4f5;
height: 430px;
box-sizing: border-box;
}
}
</style>