zhoushihao
2024-07-22 33c14007ad4d284882ce54ad41300f5984c094f3
Merge remote-tracking branch 'origin/master'
4个文件已修改
134 ■■■■ 已修改文件
UI-Project/src/lang/zh.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/PurchaseReturn/purchaseReturn.vue 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/PurchaseReturn/purchaseStorage.vue 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/Slicecage/slicecage.vue 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/lang/zh.js
@@ -205,6 +205,12 @@
        down:'下一页',
        now:'当前页显示',
        tit:'条数据',
        temperingqueries:'钢化查询',
        specifytempering:'指定钢化',
        projectnumber:'工程号',
        layoutnumber:'钢化版图号',
        numberglasses:'玻璃数量',
        specifytemperinga:'是否指定钢化该条信息?',
    },
    workOrder:{
        glassID:'玻璃ID',
UI-Project/src/views/PurchaseReturn/purchaseReturn.vue
@@ -21,47 +21,55 @@
const socketUrl = `ws://${WebSocketHost}:${host}/api/temperingGlass/api/talk/temperingGlass`;
const handleMessage = (data) => {
// 进炉中
  if(data.intoGlass!=null){
  adjustedRects.value =  data.intoGlass[0].map(rect => ({  
        ...rect, 
        xcoordinate: rect.xCoordinate * 0.3,
        ycoordinate: rect.ycoordinate * 0.3,
        ycoordinate: rect.yCoordinate * 0.3,
        width: rect.width * 0.2,
        height: rect.height * 0.2,
        widtha: rect.width,
        heighta: rect.height,
      })); 
    }
  if(data.intoGlass2!=null){
  adjustedRects2.value =  data.intoGlass2[0].map(rect => ({  
        ...rect, 
        xcoordinate: rect.xCoordinate * 0.3,
        ycoordinate: rect.ycoordinate * 0.3,
        ycoordinate: rect.yCoordinate * 0.3,
        width: rect.width * 0.2,
        height: rect.height * 0.2,
        widtha: rect.width,
        heighta: rect.height,
      })); 
      console.log(data.intoGlass[0]);
    }
  // 进炉前
  if(data.waitingGlass!=null){
      adjustedRectsa.value = data.waitingGlass[0].map(rect => ({  
        ...rect, // 复制原始对象的其他属性  
        xcoordinate: rect.xCoordinate * 0.5,
        ycoordinate: rect.ycoordinate * 0.5,
        x: rect.xCoordinate * 0.4,
        y: rect.yCoordinate * 0.4,
        width: rect.width * 0.4,
        height: rect.height * 0.4,
        widtha: rect.width,
        heighta: rect.height,
        state: rect.state
        state: rect.state,
      }));
    }
    // 已出炉
  if(data.outGlass!=null){
      adjustedRectsb.value = data.outGlass[0].map(rect => ({  
        ...rect, // 复制原始对象的其他属性  
        xcoordinate: rect.xCoordinate * 0.5,
        ycoordinate: rect.ycoordinate * 0.5,
        x: rect.xCoordinate * 0.4,
        y: rect.yCoordinate * 0.4,
        width: rect.width * 0.4,
        height: rect.height * 0.4,
        widtha: rect.width,
        heighta: rect.height,
        state: rect.state
      }));  
      console.log(data.outGlass[0]);
    }
};
onMounted(() => {
  initializeWebSocket(socketUrl, handleMessage);
@@ -79,6 +87,8 @@
<div v-if="dialogFormVisible" >
    <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;margin-right: 10px;height: 600px;" v-loading="loading">
<div style="width: 49%;float: left;background-color: #f4f4f5;height: 550px;">
    <div v-if="adjustedRects.length > 0">
      <div style="text-align: center;">流程卡: {{ adjustedRects[0].flowCardId }}</div>
  <el-scrollbar height="630px">
    <div  style="position: relative;width: 1400px;">  
      <div  
@@ -88,14 +98,17 @@
      :style="{ position: 'absolute',  top: `${rect.ycoordinate}px`, left: `${rect.xcoordinate}px`, width: `${rect.width}px`, height: `${rect.height}px`  }"  
    >
     <div  class="centered-text">
    <div >{{ rect.flowcardId }}</div>
    <div >{{ rect.glassId }}</div>
    <div style="text-align: center;">{{ rect.widtha }}*{{ rect.heighta }}</div>  
  </div>
  </div>
   </div>
   </el-scrollbar>
  </div>
  </div>
<div style="width: 49%;float: right;background-color: #f4f4f5;height: 550px;">
    <div v-if="adjustedRects2.length > 0">
      <div style="text-align: center;">流程卡: {{ adjustedRects2[0].flowCardId }}</div>
  <el-scrollbar height="550px">
    <div  style="position: relative;width: 1400px;">  
      <div  
@@ -105,55 +118,62 @@
      :style="{ position: 'absolute',  top: `${rect.ycoordinate}px`, left: `${rect.xcoordinate}px`, width: `${rect.width}px`, height: `${rect.height}px`  }"  
    >
     <div  class="centered-text">
    <div >{{ rect.flowcardId }}</div>
    <div >{{ rect.glassId }}</div>
    <div style="text-align: center;">{{ rect.widtha }}*{{ rect.heighta }}</div>  
  </div>
  </div>
   </div>
   </el-scrollbar>
   </div>
</div>
   </el-card>
    </div>
<div v-if="dialogFormVisiblea">
  <!-- 进炉前 -->
  <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;margin-right: 10px;" v-loading="loading">
    <div v-if="adjustedRectsa.length > 0">
    <div style="text-align: center;">流程卡: {{ adjustedRectsa[0].flowCardId }}</div>
      <el-scrollbar height="550px">
    <div  style="position: relative;width: 1400px;">
      <div  style="position: relative;width: 100%;height: 100%;">
      <div  
      v-for="(rect, index) in adjustedRectsa"  
      :key="index"  
      class="rect"  
      :style="{ position: 'absolute',  top: `${rect.ycoordinate}px`, left: `${rect.xcoordinate}px`,
      :style="{ position: 'absolute',  top: `${rect.y}px`, left: `${rect.x}px`,
       width: `${rect.width}px`, height: `${rect.height}px`,
       backgroundColor: rect.state === 0 ? '#dedfe0' : '#d1edc4' }">
     <div  class="centered-text">
    <div >{{ rect.flowcardId }}</div>
    <div style="text-align: center;">{{ rect.widtha }}*{{ rect.heighta }}</div>
    <div>{{ rect.glassId }}</div>
    <div>{{ rect.widtha }}*{{ rect.heighta }}</div>
  </div>
  </div> 
   </div>
   </el-scrollbar>
   </div>
   </el-card>
</div>
<div v-if="dialogFormVisibleb">
  <!-- 已出炉 -->
  <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;margin-right: 10px;" v-loading="loading">
      <div v-if="adjustedRectsb.length > 0">
        <div style="text-align: center;">流程卡: {{ adjustedRectsb[0].flowCardId }}</div>
      <el-scrollbar height="550px">
    <div  style="position: relative;width: 1400px;">  
      <div  
      v-for="(rect, index) in adjustedRectsb"  
      :key="index"  
      class="rect"  
      :style="{ position: 'absolute',  top: `${rect.ycoordinate}px`, left: `${rect.xcoordinate}px`,
      :style="{ position: 'absolute',  top: `${rect.y}px`, left: `${rect.x}px`,
       width: `${rect.width}px`, height: `${rect.height}px`,
       backgroundColor: rect.state === 4 ? '#911005' : '#f8e3c5' }">
     <div  class="centered-text">
    <div >{{ rect.flowcardId }}</div>
    <div >{{ rect.glassId }}</div>
    <div style="text-align: center;">{{ rect.widtha }}*{{ rect.heighta }}</div>  
  </div>
  </div> 
   </div>
   </el-scrollbar>
   </div>
   </el-card>
</div>
  </div>
@@ -233,9 +253,11 @@
}  
.centered-text {
  /* 设置文字居中样式 */  
  display: flex;
  /* display: flex; */
  justify-content: center;  
  text-align: center;
  align-items: center;  
  height: 100%; /* 确保div占据整个矩形的高度 */  
  margin-top: 60%
</style>
UI-Project/src/views/PurchaseReturn/purchaseStorage.vue
@@ -29,16 +29,17 @@
// 定义消息处理函数,更新 receivedData 变量
const handleMessage = (data) => {
  // 更新 tableData 的数据
  if(data.overGlass!=null){
  adjustedRects.value =  data.overGlass[0].map(rect => ({  
        ...rect, // 复制原始对象的其他属性  
        xcoordinate: rect.xCoordinate * 0.5, // 将x值除以3
        ycoordinate: rect.ycoordinate * 0.5,
        xcoordinate: rect.xCoordinate * 0.4, // 将x值除以3
        ycoordinate: rect.yCoordinate * 0.4,
        width: rect.width * 0.4,
        height: rect.height * 0.4,
        widtha: rect.width,
        heighta: rect.height,
      })); 
      console.log(adjustedRects.value);
    }
};
onMounted(() => {
  // fetchFlowCardId();
@@ -56,6 +57,8 @@
  <div style="margin-top: 10px;">
<div>
    <el-card style="margin-left: 10px;margin-top: 10px;margin-right: 10px;" v-loading="loading">
      <div v-if="adjustedRects.length > 0">
    <div style="text-align: center;">流程卡: {{ adjustedRects[0].flowCardId }}</div>
    <el-scrollbar height="600px">
    <div  style="position: relative;width: 1400px;">  
      <div  
@@ -66,12 +69,13 @@
       width: `${rect.width}px`, height: `${rect.height}px`,
       backgroundColor: rect.state === 4 ? '#d1edc4' : '#f8e3c5' }">
     <div  class="centered-text">
    <div >{{ rect.flowcardId }}</div>
    <div >{{ rect.glassId }}</div>
    <div style="text-align: center;">{{ rect.widtha }}*{{ rect.heighta }}</div>  
  </div>
  </div> 
   </div>
   </el-scrollbar>
   </div>
    </el-card>
    </div>
  </div>
@@ -94,9 +98,11 @@
.centered-text {
  /* 设置文字居中样式 */  
  display: flex;
  /* display: flex; */
  justify-content: center;  
  text-align: center;
  align-items: center;  
  height: 100%; /* 确保div占据整个矩形的高度 */  
  margin-top: 60%
</style>
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([])
@@ -70,7 +72,18 @@
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(() => {
@@ -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 {
@@ -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" 
@@ -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>