分支自 SuZhouGuanHong/TaiYuanTaiZhong

dengjunjie
2024-06-27 a18249404f0b3003a6b7c3df7775805edc06f756
´úÂë¹ÜÀí/WMS/WMS_Client/src/views/Home.vue
@@ -1,12 +1,12 @@
<template>
  <div class="fixed-row">
    <el-button type="success" style="width: 10%;height: 40px;font-size: 35px;" v-on:click="selList()">刷新</el-button>
    <span style="margin-left: 40px;">
        <el-button  circle style="background-color: #409eff;color: #000;">有货</el-button>
        <el-button  circle style="background-color: lightgreen;color: #000;">空货位</el-button>
        <el-button  circle style="background-color: yellow;color: #000;">出入库占用</el-button>
        <el-button  circle style="background-color: red;color: #000;">异常</el-button>
        <el-button  circle style="background-color: #C0C4CC;color: #000;">禁用</el-button>
    <span style="margin-left: 40px;font-size: 20px;">
        <el-button  circle style="background-color: #409eff;color: #000;width: 70px;height: 50px;">有货</el-button>
        <el-button  circle style="background-color: lightgreen;color: #000;width: 70px;height: 50px;">空货位</el-button>
        <el-button  circle style="background-color: yellow;color: #000;width: 70px;height: 50px;">出入库占用</el-button>
        <el-button  circle style="background-color: red;color: #000;width: 70px;height: 50px;">异常</el-button>
        <el-button  circle style="background-color: #C0C4CC;color: #000;width: 70px;height: 50px;">禁用</el-button>
      </span>
  </div>
  <div style="height: 50px;">
@@ -14,16 +14,17 @@
  </div>
  <div v-for="(index,inst) in datalist.length" :key="inst" style="padding: 10px;">
    <h1 style="border-bottom: 1px dashed silver; padding: 5px;;height: 52px;">
      <span v-if="inst==0">托盘叠放区</span>
      <span v-else-if="inst==1">上料区</span>
      <span v-if="inst==0">外协区</span>
      <span v-else-if="inst==1">托盘叠放区</span>
      <!-- <span v-else-if="inst==1">上料区</span>
      <span v-else-if="inst==2">下料区</span>
      <span v-else-if="inst==3">外协区</span>
      <span v-else-if="inst==4">叠盘区</span>
      <span v-else>{{inst-3}}库区</span>
      <span v-else-if="inst==4">叠盘区</span> -->
      <span v-else>{{inst}}库区</span>
    </h1>
  <div class="table-container">
    <div class="scrollable-table">
      <table class="one_tal">
      <table class="one_tal" >
        <tr v-for="(item, k) in datalist[inst].item2" :key="k">
          <td v-for="items in filteredItems(datalist[inst].item1, k+1)" :key="items.stationCode"
          :style="{ 'background-color': getBackgroundColor(items.enable,items.location_state) }">
@@ -34,6 +35,11 @@
                <div>炉号: {{ items.heatNumber }}</div>
                <div>车轮SN号:{{ items.bindSN }}</div>
                <div>钢坯号:{{ items.billetID }}</div>
              </template>
              <template #content v-else-if="items.area==3 && items.tray_status=='EmptyTray'">
                <div v-if="item.tray_type==SmallTray">小托盘</div>
                <div v-else>大托盘</div>
                <div>数量:{{ items.quantity }}</div>
              </template>
              <template #content v-else>
                <div>目前暂无信息</div>
@@ -47,10 +53,11 @@
                <div>数量:{{ items.quantity }}</div>
              </template>
              <template #content v-if="items.area==12">
                <div v-if="item.tray_type=='SmallTray'">小托盘</div>
                <div v-if="item.tray_type==SmallTray">小托盘</div>
                <div v-else>大托盘</div>
                <div>数量:{{ items.quantity }}</div>
              </template>
              <div>{{ items.stationCode}}</div>
            </el-tooltip>
          </td>
@@ -66,19 +73,20 @@
  data() {
    return {
      visible: false,
      datalist:[]
      datalist:[],
    };
  },
  mounted() {
    this.$nextTick(() => {
      this.selList();
    });
    setInterval(() => {
    this.selList(); // ä½¿ç”¨ç®­å¤´å‡½æ•°ç»‘定this
  }, 3000);
  },
  methods: {
    selList(){
      this.loading=true
      this.http.post("/api/dt_stationinfo/dt_stationinfolist").then(x => {
        this.datalist = x.data;
        console.log(this.datalist)
                  })
      .catch(error => {
        console.error('请求出错:', error);