ZengTao
2025-04-01 a52b87449e493d4312cc81c33a4169eb6be3c144
UI-Project/src/views/Caching/cachingunhistory.vue
@@ -38,14 +38,14 @@
          <el-col :span="4">
              <div id="dt" style="font-size: 15px;">
              <el-form-item :label="$t('hellow.countOutTwo')"  style="width: 14vw">
                {{ countOutTwo }}
                {{ countOutOne }}
              </el-form-item>
              </div>
          </el-col>
          <el-col :span="5">
            <div id="dta" style="font-size: 15px;">
          <el-form-item :label="$t('hellow.totalAreaOutTwo')" style="width: 14vw">
                {{ totalAreaOutTwo }}
                {{ totalAreaOutOne }}
              </el-form-item>
              </div>
          </el-col>
@@ -53,7 +53,11 @@
      </el-form>
    </div>
        <el-table ref="table" style="margin-top: 20px;height: 580px;width: 1770px;" :data="tableDatax" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
      <el-table-column prop="glassIdIn" align="center" :label="$t('searchOrder.glassID')" min-width="80" />
      <el-table-column prop="glassIdIn" align="center" :label="$t('searchOrder.intoglassid')" min-width="80" />
      <el-table-column prop="glassIdOut" align="center" :label="$t('searchOrder.outputglassID')" min-width="80" />
      <el-table-column prop="currentCell" align="center" :label="$t('sorter.layernow')" min-width="80" />
      <el-table-column prop="startCell" align="center" :label="$t('searchOrder.startCell')" min-width="80" />
      <!-- <el-table-column prop="endCell" align="center" :label="$t('searchOrder.endCell')" min-width="80" /> -->
          <el-table-column
            align="center"
            :label="$t('film.taskstatus')"
@@ -78,8 +82,8 @@
        </el-tag>  
      </template> 
          </el-table-column>
          <el-table-column prop="createTime" align="center" :label="$t('reportmanage.starttime')" min-width="100" />
          <el-table-column prop="updateTime" align="center" :label="$t('reportmanage.endtime')" min-width="100" />
          <el-table-column prop="createTime" align="center" :label="$t('film.createtime')" min-width="100" />
          <el-table-column prop="updateTime" align="center" :label="$t('sorter.updateTime')" min-width="100" />
        </el-table>
  <div style="margin-top: 20px;margin-left: 40%;">
        <el-pagination
@@ -113,8 +117,8 @@
const tableDatax = ref([])
const currentPage2 = ref(1)
const totalRecords = ref(0)
const countOutTwo = ref(0)
const totalAreaOutTwo = ref(0)
const countOutOne = ref(0)
const totalAreaOutOne = ref(0)
const glassId = ref('');
const startSlot = ref('');
const targetSlot = ref('');
@@ -137,14 +141,12 @@
      if (response.code == 200) {
        ElMessage.success(response.message);
        tableDatax.value = response.data.records;
        console.log(response.data.pages);
        totalRecords.value = response.data.total/2 || 0
      } else {
        ElMessage.error(response.message);
    }
}
catch (error) {
    console.error(error);
  }
}
const Daily = async () => {
@@ -168,12 +170,10 @@
    }
}
catch (error) {
    console.error(error);
  }
}
const handlePageChange2 = (newPage) => {
  currentPage2.value = newPage;
  console.log(currentPage2.value);
  window.localStorage.setItem('pagenumber', currentPage2.value)
  historicala(currentPage2.value);
  Dailya(currentPage2.value);
@@ -201,7 +201,6 @@
    }
}
catch (error) {
    console.error(error);
  }
}
const Dailya = async (page) => {
@@ -226,7 +225,6 @@
    }
}
catch (error) {
    console.error(error);
  }
}
const handleClick = async () => {
@@ -238,7 +236,6 @@
  try { 
  let startTime = window.localStorage.getItem('startTime')
  let page = window.localStorage.getItem('pagenumber')
  console.log(page);
  const response = await request.post("/cacheGlass/edgStorageDeviceTaskHistory", {
        deviceId: 2,
        pageNo: 1,
@@ -259,7 +256,6 @@
    }
}
catch (error) {
    console.error(error);
  }
}
const Dailyhistorical = async () => {
@@ -284,7 +280,6 @@
    }
}
catch (error) {
    console.error(error);
  }
}
// 格式化时间戳为年月日时间字符串的函数
@@ -304,8 +299,6 @@
  const backendTime = new Date(getglobalDate);
  const oneWeekAgo = new Date(backendTime.getTime() - 7 * 24 * 60 * 60 * 1000); // 减去7天
  oneWeekAgo.setHours(0, 0, 0, 0);
  console.log(formatTimestamp(oneWeekAgo));
  console.log(oneWeekAgo);
  timeRange.value = [formatTimestamp(oneWeekAgo), formatTimestamp(backendTime)];
  window.localStorage.setItem('startTime', formatTimestamp(oneWeekAgo))
}