zhoushihao
2025-03-14 86903050702bb898277ed8f87202c0224867c47f
Merge remote-tracking branch 'origin/master'
21个文件已修改
2个文件已添加
1148 ■■■■ 已修改文件
UI-Project/src/lang/en.js 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/lang/py.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/lang/zh.js 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/router/index.js 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/Caching/cachingbefore.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/Caching/cachingbeforehistory.vue 105 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/Caching/cachingun.vue 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/Caching/cachingunhistory.vue 104 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/GlassStorage/rawfilmstorage.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/Identify/identifwu.vue 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/Identify/identifwutwo.vue 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/ReportWork/reportWork.vue 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/Returns/upreturns.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/Returns/upreturns2.vue 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/Slicecage/slicecage.vue 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/Slicecage/slicecagehistory.vue 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/StockBasicData/stockBasicData.vue 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/hollow/hellowquiphistory.vue 281 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/hollow/hellowquiptwohistory.vue 281 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/hollow/hellowslicecagehistory.vue 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/hollow/hollowequipment.vue 59 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/hollow/hollowequipmenttwo.vue 59 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/hollow/hollowslicecage.vue 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/lang/en.js
@@ -561,6 +561,13 @@
          starttime :'Start Time',
          endtime :'End Time',
          loading :'In the process of uploading:',
          brokenNum:'brokenNum',
          inventory:'inventory',
          inventoryarea:'inventoryarea',
          shippedQuantity:'shippedQuantity',
          reportWorkQuantity:'reportWorkQuantity',
          reportWorkQuantityCount:'reporting_work_num_count',
          processId:'processId',
      },
      reportmanage:{
          productiontime :'production time',
@@ -710,6 +717,12 @@
          finegrinding: '精磨',
      },
      hellow: {
          totalLayer: '总层数',
          totalPairQuantity: '总配对数量',
          pairQuantity: '已完成配对数量',
          isForceList: '是否强制',
          yesisForceList: '强制',
          noisForceList: '非强制',
          hollowCountOutOne: '中空一线玻璃数量',
          hollowCountOutTwo: '中空二线玻璃数量',
          hollowTotalAreaOutOne: '中空一线玻璃面积',
UI-Project/src/lang/py.js
@@ -708,6 +708,12 @@
        finegrinding: '精磨',
    },
    hellow: {
        totalLayer: '总层数',
        totalPairQuantity: '总配对数量',
        pairQuantity: '已完成配对数量',
        isForceList: '是否强制',
        yesisForceList: '强制',
        noisForceList: '非强制',
        hollowCountOutOne: '中空一线玻璃数量',
        hollowCountOutTwo: '中空二线玻璃数量',
        hollowTotalAreaOutOne: '中空一线玻璃面积',
UI-Project/src/lang/zh.js
@@ -517,7 +517,7 @@
          serialnumber: '订单序号',
          productname: '产品名称',
          serial: '工艺确认序号',
          slicemarker: '片标记(位置)',
          slicemarker: '层号',
          numberpatches: '补片数量',
          width: '宽',
          height: '高',
@@ -560,6 +560,13 @@
          starttime :'开始时间',
          endtime :'结束时间',
          loading :'正在上片:',
          brokenNum:'破损数量',
          inventory:'库存',
          inventoryarea:'库存面积',
          shippedQuantity:'已发货数量',
          reportWorkQuantity:'完工数量',
          reportWorkQuantityCount:'破损数量',
          processId:'流程卡号',
      },
      reportmanage:{
          productiontime :'生产时间',
@@ -709,6 +716,12 @@
          finegrinding: '精磨',
      },
    hellow: {
        totalLayer: '总层数',
        totalPairQuantity: '总配对数量',
        pairQuantity: '已完成配对数量',
        isForceList: '是否强制',
        yesisForceList: '强制',
        noisForceList: '非强制',
        hollowCountOutOne: '中空一线玻璃数量',
        hollowCountOutTwo: '中空二线玻璃数量',
        hollowTotalAreaOutOne: '中空一线玻璃面积',
UI-Project/src/router/index.js
@@ -351,6 +351,30 @@
           ]
          },
          {
             path: '/hellowquiphistory',
              name: 'hellowquiphistory',
              component: () => import('../views/hollow/hellowquiphistory.vue'),
              children: [
                {
                 path: '/hollow/hellowquiphistory',
                 name: 'hellowquiphistory',
                 component: () => import('../views/hollow/hellowquiphistory.vue')
                },
              ]
             },
             {
                path: '/hellowquiptwohistory',
                 name: 'hellowquiptwohistory',
                 component: () => import('../views/hollow/hellowquiptwohistory.vue'),
                 children: [
                   {
                    path: '/hollow/hellowquiptwohistory',
                    name: 'hellowquiptwohistory',
                    component: () => import('../views/hollow/hellowquiptwohistory.vue')
                   },
                 ]
                },
          {
             path: '/cachingbeforehistory',
              name: 'cachingbeforehistory',
              component: () => import('../views/Caching/cachingbeforehistory.vue'),
UI-Project/src/views/Caching/cachingbefore.vue
@@ -446,13 +446,13 @@
</div>
</div>
<!-- 历史任务 -->
<el-dialog v-model="blindb" top="10vh" width="90%">
<el-dialog v-model="blindb" top="10vh" width="95%">
     <iframe 
     :src="iframeUrl" 
     marginwidth="2000px"
     marginheight="2000px"
     width="100%" 
     height="700px"
     height="750px"
     frameborder="0"
     ></iframe>
  </el-dialog>
UI-Project/src/views/Caching/cachingbeforehistory.vue
@@ -30,8 +30,28 @@
             style="margin-left: 15px;" value-format = "YYYY-MM-DD hh:mm:ss"
              :end-placeholder="$t('reportmanage.endtime')">
            </el-date-picker>
          <el-button type="primary" style="margin-left: 10px;margin-bottom: 10px;" @click="sethistorical()">{{$t('reportmanage.inquire')}}</el-button>
          <el-button type="primary" style="margin-left: 10px;margin-bottom: 10px;" @click="handleClick()">{{$t('reportmanage.inquire')}}</el-button>
     </div>
     <div style="margin-bottom: 10px;margin-top: 20px;margin-left: 20px;">
      <el-form>
        <el-row style="margin-top: -15px;margin-bottom: -2px;">
          <el-col :span="4">
              <div id="dt" style="font-size: 15px;">
              <el-form-item :label="$t('hellow.countOutOne')"  style="width: 14vw">
                {{ countOutOne }}
              </el-form-item>
              </div>
          </el-col>
          <el-col :span="5">
            <div id="dta" style="font-size: 15px;">
          <el-form-item :label="$t('hellow.totalAreaOutOne')" style="width: 14vw">
                {{ totalAreaOutOne }}
              </el-form-item>
              </div>
          </el-col>
        </el-row>
      </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
@@ -93,6 +113,8 @@
const tableDatax = ref([])
const currentPage2 = ref(1)
const totalRecords = ref(0)
const totalAreaOutOne = ref(0)
const countOutOne = ref(0)
const glassId = ref('');
const startSlot = ref('');
const targetSlot = ref('');
@@ -124,11 +146,36 @@
    console.error(error);
  }
}
const Daily = async () => {
  try {
  let startTime = window.localStorage.getItem('startTime')
      const response = await request.post("/cacheGlass/edgStorageDeviceTaskHistory/queryEdgDailyProduction", {
        deviceId: 1,
        pageNo: 1,
        pageSize: 20,
        glassId: glassId.value,
        taskState: '',
        taskType: '',
        startTime: startTime,
        endTime: getglobalDate
    })
      if (response.code == 200) {
        countOutOne.value = response.data.countOutOne
        totalAreaOutOne.value = response.data.totalAreaOutOne
      } else {
        ElMessage.error(response.message);
    }
}
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);
};
const historicala = async (page) => {
  try { 
@@ -156,6 +203,35 @@
    console.error(error);
  }
}
const Dailya = async (page) => {
  try {
  let page = window.localStorage.getItem('pagenumber')
  let startTime = window.localStorage.getItem('startTime')
      const response = await request.post("/cacheGlass/edgStorageDeviceTaskHistory/queryEdgDailyProduction", {
        deviceId: 1,
        pageNo: page,
        pageSize: 20,
        glassId: glassId.value,
        taskState: taskState.value,
        taskType: taskType.value,
        startTime: (timeRange.value && timeRange.value[0]) || '',
        endTime: (timeRange.value && timeRange.value[1]) || '',
    })
      if (response.code == 200) {
        countOutOne.value = response.data.countOutOne
        totalAreaOutOne.value = response.data.totalAreaOutOne
      } else {
        ElMessage.error(response.message);
    }
}
catch (error) {
    console.error(error);
  }
}
const handleClick = async () => {
  await sethistorical();
  await Dailyhistorical();
};
// 历史查询点击
const sethistorical = async () => {
  try { 
@@ -177,6 +253,32 @@
        ElMessage.success(response.message);
        tableDatax.value = response.data.records;
        totalRecords.value = response.data.total/2 || 0
      } else {
        ElMessage.error(response.message);
    }
}
catch (error) {
    console.error(error);
  }
}
const Dailyhistorical = async () => {
  try {
  let startTime = window.localStorage.getItem('startTime')
  let page = window.localStorage.getItem('pagenumber')
  console.log(page);
  const response = await request.post("/cacheGlass/edgStorageDeviceTaskHistory/queryEdgDailyProduction", {
        deviceId: 1,
        pageNo: 1,
        pageSize: 20,
        glassId: glassId.value,
        taskState: taskState.value,
        taskType: taskType.value,
        startTime: (timeRange.value && timeRange.value[0]) || '',
        endTime: (timeRange.value && timeRange.value[1]) || '',
    })
      if (response.code == 200) {
        countOutOne.value = response.data.countOutOne
        totalAreaOutOne.value = response.data.totalAreaOutOne
      } else {
        ElMessage.error(response.message);
    }
@@ -269,6 +371,7 @@
onMounted(() => {
  parseAndSetTime();
  historical();
  Daily()
});
  </script>
  <style scoped>  
UI-Project/src/views/Caching/cachingun.vue
@@ -33,11 +33,6 @@
  }
  tableDataa.value = data.EdgStorageCageinfos[0]
  tableDatab.value = data.taskMessage
  // adjustedRects.value = data.EdgStorageCageinfos[0].map(rect => ({
  //     ...rect,
  //     width: rect.width * 0.5 ,
  //     id: rect.id * 10,
  //   }));
};
// 格式化后端时间并计算一周前的时间
const defaultTime = ref<[Date, Date]>([new Date(), new Date()]);
@@ -428,13 +423,13 @@
</div>
</div>
<!-- 历史任务 -->
<el-dialog v-model="blindb" top="10vh" width="90%">
<el-dialog v-model="blindb" top="10vh" width="95%">
     <iframe 
     :src="iframeUrl" 
     marginwidth="2000px"
     marginheight="2000px"
     width="100%" 
     height="700px"
     height="750px"
     frameborder="0"
     ></iframe>
  </el-dialog>
UI-Project/src/views/Caching/cachingunhistory.vue
@@ -30,8 +30,28 @@
             style="margin-left: 15px;" value-format = "YYYY-MM-DD hh:mm:ss"
              :end-placeholder="$t('reportmanage.endtime')">
            </el-date-picker>
          <el-button type="primary" style="margin-left: 10px;margin-bottom: 10px;" @click="sethistorical()">{{$t('reportmanage.inquire')}}</el-button>
          <el-button type="primary" style="margin-left: 10px;margin-bottom: 10px;" @click="handleClick()">{{$t('reportmanage.inquire')}}</el-button>
     </div>
     <div style="margin-bottom: 10px;margin-top: 20px;margin-left: 20px;">
      <el-form>
        <el-row style="margin-top: -15px;margin-bottom: -2px;">
          <el-col :span="4">
              <div id="dt" style="font-size: 15px;">
              <el-form-item :label="$t('hellow.countOutTwo')"  style="width: 14vw">
                {{ countOutTwo }}
              </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 }}
              </el-form-item>
              </div>
          </el-col>
        </el-row>
      </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
@@ -93,6 +113,8 @@
const tableDatax = ref([])
const currentPage2 = ref(1)
const totalRecords = ref(0)
const countOutTwo = ref(0)
const totalAreaOutTwo = ref(0)
const glassId = ref('');
const startSlot = ref('');
const targetSlot = ref('');
@@ -125,11 +147,36 @@
    console.error(error);
  }
}
const Daily = async () => {
  try {
  let startTime = window.localStorage.getItem('startTime')
      const response = await request.post("/cacheGlass/edgStorageDeviceTaskHistory/queryEdgDailyProduction", {
        deviceId: 2,
        pageNo: 1,
        pageSize: 20,
        glassId: glassId.value,
        taskState: '',
        taskType: '',
        startTime: startTime,
        endTime: getglobalDate
    })
      if (response.code == 200) {
        countOutTwo.value = response.data.countOutTwo
        totalAreaOutTwo.value = response.data.totalAreaOutTwo
      } else {
        ElMessage.error(response.message);
    }
}
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);
};
const historicala = async (page) => {
  try { 
@@ -157,6 +204,35 @@
    console.error(error);
  }
}
const Dailya = async (page) => {
  try {
  let page = window.localStorage.getItem('pagenumber')
  let startTime = window.localStorage.getItem('startTime')
      const response = await request.post("/cacheGlass/edgStorageDeviceTaskHistory/queryEdgDailyProduction", {
        deviceId: 2,
        pageNo: page,
        pageSize: 20,
        glassId: glassId.value,
        taskState: taskState.value,
        taskType: taskType.value,
        startTime: (timeRange.value && timeRange.value[0]) || '',
        endTime: (timeRange.value && timeRange.value[1]) || '',
    })
      if (response.code == 200) {
        countOutTwo.value = response.data.countOutTwo
        totalAreaOutTwo.value = response.data.totalAreaOutTwo
      } else {
        ElMessage.error(response.message);
    }
}
catch (error) {
    console.error(error);
  }
}
const handleClick = async () => {
  await sethistorical();
  await Dailyhistorical();
};
// 历史查询点击
const sethistorical = async () => {
  try { 
@@ -178,6 +254,31 @@
        ElMessage.success(response.message);
        tableDatax.value = response.data.records;
        totalRecords.value = response.data.total/2 || 0
      } else {
        ElMessage.error(response.message);
    }
}
catch (error) {
    console.error(error);
  }
}
const Dailyhistorical = async () => {
  try {
  let startTime = window.localStorage.getItem('startTime')
  let page = window.localStorage.getItem('pagenumber')
    const response = await request.post("/cacheGlass/edgStorageDeviceTaskHistory/queryEdgDailyProduction", {
        deviceId: 2,
        pageNo: 1,
        pageSize: 20,
        glassId: glassId.value,
        taskState: taskState.value,
        taskType: taskType.value,
        startTime: (timeRange.value && timeRange.value[0]) || '',
        endTime: (timeRange.value && timeRange.value[1]) || '',
    })
      if (response.code == 200) {
        countOutTwo.value = response.data.countOutTwo
        totalAreaOutTwo.value = response.data.totalAreaOutTwo
      } else {
        ElMessage.error(response.message);
    }
@@ -270,6 +371,7 @@
onMounted(() => {
  parseAndSetTime();
  historical();
  Daily()
});
  </script>
  <style scoped>  
UI-Project/src/views/GlassStorage/rawfilmstorage.vue
@@ -554,7 +554,7 @@
        </el-table>
</el-dialog>
<!-- 历史任务 -->
<el-dialog v-model="blindb" top="10vh" width="90%">
<el-dialog v-model="blindb" top="10vh" width="95%">
     <iframe 
     :src="iframeUrl" 
     marginwidth="2000px"
UI-Project/src/views/Identify/identifwu.vue
@@ -1,6 +1,7 @@
<template>
  <div style="height: 500px;">
    <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;margin-right: 10px;height: 800px;" v-loading="loading">
    <div style="text-align: center;"> {{ $t('processCard.temperinglayout') }}:{{ ava }}-{{ avanum }} </div>
      <el-scrollbar height="750px" width="1400px" style="background-color: #e9e9eb;">
        <div style="position: relative;">
          <div
@@ -37,7 +38,7 @@
  </div>
</template>
<script setup lang="ts">
import {ElMessage} from 'element-plus'
import {avatarEmits, ElMessage} from 'element-plus'
import {onBeforeUnmount, computed, onMounted, onUnmounted, ref} from 'vue';
import request from "@/utils/request"
import {host, WebSocketHost} from '@/utils/constants'
@@ -48,6 +49,8 @@
const blind = ref(false)
const currentGlassId = ref(null);
const adjustedRects = ref([]);
const ava = ref([]);
const avanum = ref([]);
let socket = null;
const currentGlassRect = computed(() => {
  return adjustedRects.value.find(rect => rect.glassId === currentGlassId.value);
@@ -139,6 +142,16 @@
}
const socketUrl = `ws://${WebSocketHost}:${host}/api/cacheGlass/api/talk/currentCutDrawingOne`;
const handleMessage = (data: any) => {
  if (data.engineer != null) {
  ava.value = data.engineer[0]
  }else{
    ava.value = 0
  }
  if (data.engineer != null) {
    avanum.value = data.sequence[0]
  }else{
    avanum.value = 0
  }
      const scaleFactor = 1621.78 / 6000;
      const scaleFactory = 750 / 3300;
      if (data.currentCutTerritory && data.currentCutTerritory.length > 0) {
UI-Project/src/views/Identify/identifwutwo.vue
@@ -1,7 +1,8 @@
<template>
  <div style="height: 500px;">
    <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="text-align: center;"> {{ $t('processCard.temperinglayout') }}:{{ ava }}-{{ avanum }} </div>
    <el-scrollbar height="750px" width="1400px" style="background-color: #e9e9eb;">
        <div style="position: relative;">
          <div
              v-for="(rect, index) in adjustedRects"
@@ -48,9 +49,21 @@
const blind = ref(false)
const currentGlassId = ref(null);
const adjustedRects = ref([]);
const ava = ref([]);
const avanum = ref([]);
let socket = null;
const socketUrl = `ws://${WebSocketHost}:${host}/api/cacheGlass/api/talk/currentCutDrawingTwo`;
const handleMessage = (data: any) => {
  if (data.engineer != null) {
  ava.value = data.engineer[0]
  }else{
    ava.value = 0
  }
  if (data.engineer != null) {
    avanum.value = data.sequence[0]
  }else{
    avanum.value = 0
  }
      const scaleFactor = 1621.78 / 6000;
      const scaleFactory = 750 / 3300;
      if (data.currentCutTerritory && data.currentCutTerritory.length > 0) {
UI-Project/src/views/ReportWork/reportWork.vue
@@ -2,16 +2,11 @@
  <div style="height: 600px;">
    <div style="display: flex; flex-direction: row; align-items: center; margin-top: 20px;">
      <span style="margin-left: 10px;" class="demonstration">{{ $t('reportmanage.productiontime') }}</span>
      <!-- <el-date-picker style="margin-left: 10px;" v-model="timeRange" type="daterange" format="YYYY/MM/DD"
        value-format="YYYY-MM-DD" :start-placeholder="$t('reportmanage.starttime')"
        :end-placeholder="$t('reportmanage.endtime')" :default-time="defaultTime" /> -->
        <el-date-picker v-model="timeRange" type="datetimerange" range-separator="至" :start-placeholder="$t('reportmanage.starttime')" 
             style="margin-left: 15px;" value-format = "YYYY-MM-DD hh:mm:ss"
              :end-placeholder="$t('reportmanage.endtime')">
            </el-date-picker>
      <el-select v-model="report.type" :placeholder="$t('reportmanage.ctype')" style="margin-left: 10px;">
        <!-- <el-option :label="$t('reportmanage.all')" value="0"></el-option> -->
        <!-- <el-option :label="$t('reportmanage.completed')" value="1"></el-option> -->
        <el-option :label="$t('reportmanage.broke')" value="8"></el-option>
        <el-option :label="$t('reportmanage.takeout')" value="9"></el-option>
      </el-select>
@@ -49,8 +44,8 @@
          <el-table-column prop="engineerId" align="center" :label="$t('reportmanage.projectnumber')" min-width="120" />
          <el-table-column prop="temperingLayoutId" align="center" :label="$t('reportmanage.layoutID')"
            min-width="120" />
          <el-table-column prop="damageTime" align="center" :label="$t('reportmanage.productiontime')"
            min-width="230" />
          <el-table-column prop="formattedCreateTime" align="center" :label="$t('reportmanage.productiontime')"
            min-width="230" />damageTime
          <el-table-column prop="type" align="center" :label="$t('reportmanage.type')" min-width="120" />
          <el-table-column prop="status" align="center" :label="$t('reportmanage.state')" min-width="120" />
          <el-table-column prop="processId" align="center" :label="$t('reportmanage.processcards')" min-width="140" />
@@ -156,6 +151,7 @@
function parseAndSetTime() {
  const backendTime = new Date(globalDate);
  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)];
@@ -173,11 +169,8 @@
const selectValuese = reactive({});
const inputValuesa = reactive({});
const inputValuesb = reactive({});
const selectedType = ref(true);
const selectedStatus = ref(false);
// 查询数据
const selectReportData = async () => {
  const response = await request.post("/cacheVerticalGlass/damage/selectDamage", {
@@ -198,13 +191,16 @@
    selectedStatus.value = false;
  }
  if (response.code === 200) {
    reportData.value = response.data;
    const formattedData = response.data.map(record => ({
        ...record,
        formattedCreateTime: formatTimestamp(record.createTime),
      }));
    reportData.value = formattedData;
    ElMessage.success(response.message);
  } else {
    ElMessage.error(response.message);
  }
  // const responses = await request.post("/cacheVerticalGlass/damage/insertDamage", {
  //   glassId:"P24081502|1|1",
  //   line:"1001",
UI-Project/src/views/Returns/upreturns.vue
@@ -611,7 +611,7 @@
    </template>
  </el-dialog>
    <!-- 历史任务 -->
<el-dialog v-model="blindbd" top="10vh" width="90%">
<el-dialog v-model="blindbd" top="10vh" width="95%">
     <iframe 
     :src="iframeUrl" 
     marginwidth="2000px"
UI-Project/src/views/Returns/upreturns2.vue
@@ -73,11 +73,17 @@
let socket = null;
const socketUrl = `ws://${WebSocketHost}:${host}/api/loadGlass/api/talk/loadGlass`;
const handleMessage = (data: any) => {
  tableDataa.value = data.list[0].slice(2, 4);
  if (data.list!=null) {
  tableDataa.value = data.list[0].slice(2, 4);
    const processedData = [...data.list[0].slice(2, 4)];
 if (processedData.length > 0) {
   processedData[0] = { ...processedData[0], workstationId: 1 };
 }
 if (processedData.length > 1) {
   processedData[1] = { ...processedData[1], workstationId: 2 };
 }
  tableDataa.value = processedData;
  }else {
    tableDataa.value = ''
    tableDataa.value = []
  }
  if (data.LoadTwoervice != null) {
    cuttingMachineStatusColor.value = data.LoadTwoervice[0] == 1 ? 'green' : '#911005';
@@ -496,7 +502,7 @@
  </div>
</div>
   <!-- 历史任务 -->
   <el-dialog v-model="blindbd" top="10vh" width="90%">
   <el-dialog v-model="blindbd" top="10vh" width="95%">
     <iframe 
     :src="iframeUrl" 
     marginwidth="2000px"
UI-Project/src/views/Slicecage/slicecage.vue
@@ -821,6 +821,11 @@
    adjusta.value = ''
  }
  if(data.bigStorageCageDetailsFeedTask!=null){
    tableDatax.value = data.bigStorageCageDetailsFeedTask[0]
  } else {
    tableDatax.value = ''
  }
  if(data.bigStorageCageDetailsFeedTask!=null){
    tableDatad.value = data.bigStorageCageDetailsFeedTask[0]
    adjust.value = data.bigStorageCageDetailsFeedTask[0].filter(rect => rect.slot !== null && rect.slot !== undefined); 
  }else{
@@ -1141,20 +1146,6 @@
    <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;" v-loading="loading">
      <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;max-height: 300px;">
       <el-table height="300px" ref="table" 
       :data="tableDatac" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
         <el-table-column prop="glassId" align="center" :label="$t('searchOrder.outputglassID')" min-width="140" />
         <el-table-column prop="startSlot" align="center" :label="$t('searchOrder.startposition')" min-width="120" />
         <el-table-column prop="targetSlot" align="center" :label="$t('searchOrder.targetlocation')" min-width="120" />
         <el-table-column prop="taskState" align="center" :label="$t('searchOrder.taskstatus')" min-width="157">
           <template #default="scope">
             <el-tag type="success" >{{ scope.row.taskState==0? $t('searchOrder.filmenter') : $t('searchOrder.infilm') }}</el-tag>
           </template>
         </el-table-column>
       </el-table>
       </div>
    </el-card>
    <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;" v-loading="loading">
      <el-table height="300px" ref="table"
        @selection-change="handleSelectionChange"
        :row-class-name="tableRowClassName"
        :data="tableDatax" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
@@ -1174,6 +1165,20 @@
      </template>
          </el-table-column>
        </el-table>
       </div>
    </el-card>
    <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;" v-loading="loading">
      <el-table height="300px" ref="table"
       :data="tableDatac" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
         <el-table-column prop="glassId" align="center" :label="$t('searchOrder.outputglassID')" min-width="140" />
         <el-table-column prop="startSlot" align="center" :label="$t('searchOrder.startposition')" min-width="120" />
         <el-table-column prop="targetSlot" align="center" :label="$t('searchOrder.targetlocation')" min-width="120" />
         <el-table-column prop="taskState" align="center" :label="$t('searchOrder.taskstatus')" min-width="157">
           <template #default="scope">
             <el-tag type="success" >{{ scope.row.taskState==0? $t('searchOrder.filmenter') : $t('searchOrder.infilm') }}</el-tag>
           </template>
         </el-table-column>
       </el-table>
            </el-card>
  </div>
    <div style="padding: 10px;display: flex;height:130px;">
@@ -1439,7 +1444,7 @@
  </div>
  </el-dialog>
<!-- 历史任务 -->
<el-dialog v-model="blindb" top="10vh" width="90%">
<el-dialog v-model="blindb" top="10vh" width="95%">
     <iframe 
     :src="iframeUrl" 
     marginwidth="2000px"
UI-Project/src/views/Slicecage/slicecagehistory.vue
@@ -34,20 +34,20 @@
              </div>
          </el-col>
          <el-col :span="5">
            <div id="dta" style="font-size: 15px;">
          <el-form-item :label="$t('hellow.countOut')" style="width: 14vw">
                {{ countOut }}
              </el-form-item>
              </div>
          </el-col>
          <el-col :span="4">
              <div id="dt" style="font-size: 15px;">
              <el-form-item :label="$t('hellow.totalAreaIn')" style="width: 14vw">
                {{ totalAreaIn }}
              </el-form-item>
              </div>
          </el-col>
          <el-col :span="4">
          <el-col :span="5">
            <div id="dta" style="font-size: 15px;">
          <el-form-item :label="$t('hellow.countOut')" style="width: 14vw">
                {{ countOut }}
              </el-form-item>
              </div>
          </el-col>
          <el-col :span="5">
              <div id="dt" style="font-size: 15px;">
              <el-form-item :label="$t('hellow.totalAreaOut')" style="width: 14vw">
                {{ totalAreaOut }}
UI-Project/src/views/StockBasicData/stockBasicData.vue
@@ -106,7 +106,13 @@
let socket = null;
const socketUrl = `ws://${WebSocketHost}:${host}/api/cacheGlass/api/talk/edgTasks`;
const handleMessage = (data) => {
  tableData.value = data.edgTasks[0]
  const formattedTasks = data.edgTasks[0].map(cageInfo => {
    if (cageInfo && cageInfo.createTime) {
      cageInfo.formattedCreateTime = formatTimestamp(cageInfo.createTime);
    }
    return cageInfo;
  });
  tableData.value = formattedTasks
};
// 历史任务
const iframeUrl = ref('');
@@ -142,6 +148,16 @@
      return t('workOrder.finedging');
  }
}
function formatTimestamp(timestamp) {
  const date = new Date(timestamp);
  const year = date.getFullYear();
  const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始,需要加1,并补零
  const day = String(date.getDate()).padStart(2, '0'); // 补零
  const hours = String(date.getHours()).padStart(2, '0'); // 补零(如果需要显示时间)
  const minutes = String(date.getMinutes()).padStart(2, '0'); // 补零(如果需要显示时间)
  const seconds = String(date.getSeconds()).padStart(2, '0'); // 补零(如果需要显示时间)
  return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
}
onBeforeUnmount(() => {
  console.log("关闭了")
  closeWebSocket();
@@ -152,10 +168,10 @@
    <div>
      <el-card style="flex: 1;margin-left: 10px;margin-top: 20px;" v-loading="loading">
        <div style="display: flex;">
        <el-button style="margin-left: 20px;" id="searchButton" type="success" @click="handlehistorical">{{
        <!-- <el-button style="margin-left: 20px;" id="searchButton" type="success" @click="handlehistorical">{{
          $t('searchOrder.historicaltasks')
        }}
      </el-button>
      </el-button> -->
        <el-select v-model="selectValuesa[0]" filterable :placeholder="$t('workOrder.cway')" clearable
                   style="margin-left: 20px;margin-bottom: 10px;">
          <el-option :label="$t('workOrder.edgingone')" value="930"></el-option>
@@ -185,7 +201,7 @@
          <el-table-column prop="thickness" align="center" :label="$t('workOrder.thickness')" min-width="120" />
          <el-table-column prop="filmsid" align="center" :label="$t('workOrder.glasstype')" min-width="120" />
          <el-table-column prop="line" align="center" :label="$t('workOrder.line')" min-width="120" />
          <el-table-column prop="createTime" align="center" :label="$t('workOrder.time')" min-width="120" />
          <el-table-column prop="formattedCreateTime" align="center" :label="$t('workOrder.time')" min-width="120" />
          <el-table-column prop="state" :label="$t('workOrder.status')" align="center" width="200">
            <!-- <template #default="scope">
              {{ scope.row.status==0?"未磨边":scope.row.status==1?"磨边中":"已磨边" }}
@@ -213,7 +229,7 @@
      </el-card>
    </div>
  <!-- 历史任务 -->
<el-dialog v-model="blindb" top="10vh" width="90%">
<el-dialog v-model="blindb" top="10vh" width="95%">
     <iframe 
     :src="iframeUrl" 
     marginwidth="2000px"
UI-Project/src/views/hollow/hellowquiphistory.vue
New file
@@ -0,0 +1,281 @@
<template>
  <div>
<div style="display: flex;width: 1770px;">
  <el-input v-model="flowCardId" clearable style="margin-left: 10px;margin-bottom: 10px;width: 200px;" :placeholder="$t('searchOrder.processcards')" />
  <el-select v-model="selectValuesa[0]" filterable :placeholder="$t('hellow.isForceList')" clearable
      style="width: 200px;margin-left: 10px;">
      <el-option :label="$t('hellow.noisForceList')" value="0"></el-option>
      <el-option :label="$t('hellow.yesisForceList')" value="1"></el-option>
    </el-select>
    <el-select v-model="selectValuesa[1]" filterable :placeholder="$t('searchOrder.state')" clearable
      style="width: 200px;margin-left: 10px;">
      <el-option :label="$t('film.execution')" value="1"></el-option>
      <el-option :label="$t('basicData.stop')" value="2"></el-option>
      <el-option :label="$t('sorter.endingtask')" value="3"></el-option>
    </el-select>
          <el-date-picker v-model="timeRange" type="datetimerange" range-separator="至" :start-placeholder="$t('reportmanage.starttime')"
           style="margin-left: 15px;" value-format = "YYYY-MM-DD hh:mm:ss"
            :end-placeholder="$t('reportmanage.endtime')">
          </el-date-picker>
        <el-button type="primary" style="margin-left: 10px;margin-bottom: 10px;" @click="sethistorical()">{{$t('reportmanage.inquire')}}</el-button>
   </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="flowCardId" align="center" :label="$t('searchOrder.processcards')" min-width="80" />
    <el-table-column prop="totalLayer" align="center" :label="$t('hellow.totalLayer')" min-width="80" />
    <el-table-column prop="totalPairQuantity" align="center" :label="$t('hellow.totalPairQuantity')" min-width="80" />
    <el-table-column prop="pairQuantity" align="center" :label="$t('hellow.pairQuantity')" min-width="80" />
        <el-table-column
          align="center"
          :label="$t('hellow.isForceList')"
          min-width="80"
          prop="isForce"
        >
        <template #default="scope">
      <el-tag :type="getStatusTypea(scope.row.isForce)">
        {{ getStatusTexta(scope.row.isForce) }}
      </el-tag>
    </template>
        </el-table-column>
        <el-table-column
          align="center"
          :label="$t('searchOrder.state')"
          min-width="80"
          prop="state"
        >
        <template #default="scope">
      <el-tag :type="getStatusTypeb(scope.row.state)">
        {{ getStatusTextb(scope.row.state) }}
      </el-tag>
    </template>
        </el-table-column>
        <el-table-column prop="formattedCreateTime" align="center" :label="$t('reportmanage.starttime')" min-width="100" />
        <el-table-column prop="formattedUpdateTime" align="center" :label="$t('reportmanage.endtime')" min-width="100" />
      </el-table>
<div style="margin-top: 20px;margin-left: 40%;">
      <el-pagination
        v-model:current-page="currentPage2"
        :page-size="pageSize"
        :size="large"
        :disabled="disabled"
        layout="prev, pager, next, jumper"
        :total="totalRecords"
        @current-change="handlePageChange2"
        style="margin-top: 10px;"
    />
  </div>
</div>
</template>
<script lang="ts" setup>
import {useI18n} from 'vue-i18n'
import {useRouter} from "vue-router"
import request from "@/utils/request"
import {host, WebSocketHost} from '@/utils/constants'
import {onBeforeUnmount, onMounted, onUnmounted, reactive, ref} from "vue";
import {closeWebSocket, initializeWebSocket} from '@/utils/WebSocketService';
import {ElMessage, ElMessageBox} from 'element-plus'
const {t} = useI18n()
let language = ref(localStorage.getItem('lang') || 'zh')
import { inject } from 'vue';
const globalDate = inject('globalDate');
const router = useRouter()
const timeRange = ref([])
const selectValuesa = reactive([]);
const tableDatax = ref([])
const currentPage2 = ref(1)
const totalRecords = ref(0)
const rawGlassHeight = ref('');
const rawGlassThickness = ref('');
const flowCardId = ref('');
const rawGlassfilmsId = ref('');
const slot = ref('');
let getglobalDate = window.localStorage.getItem('getglobalDate')
const historical = async () => {
try {
let startTime = window.localStorage.getItem('startTime')
    const response = await request.post("/hollowGlass/hollowGlassOutRelationInfo/queryHollowHistoryTask", {
      pageNo: 1,
      pageSize: 20,
      cell: 930,
      flowCardId: '',
      isForceList: [],
      stateList: [],
      beginDate: startTime,
      endDate: getglobalDate
  })
    if (response.code == 200) {
      ElMessage.success(response.message);
      const formattedData = response.data.records.map(record => ({
      ...record,
      formattedCreateTime: formatTimestamp(record.createTime),
      formattedUpdateTime: formatTimestamp(record.updateTime),
    }));
      tableDatax.value = formattedData;
      console.log(response.data.pages);
      totalRecords.value = response.data.total/2 || 0
    } else {
      ElMessage.error(response.message);
  }
}
catch (error) {
  console.error(error);
}
}
const handlePageChange2 = (newPage) => {
currentPage2.value = newPage;
console.log(currentPage2.value);
window.localStorage.setItem('pagenumber', currentPage2.value)
historicala(currentPage2.value);
};
const historicala = async (page) => {
try {
let celllist=[]
let stateList=[]
  if(selectValuesa[0]!=null&&selectValuesa[0]!='undefined'){
if(selectValuesa[0]!=""){
  celllist=[selectValuesa[0]];
}
}
if(selectValuesa[1]!=null&&selectValuesa[1]!='undefined'){
    if(selectValuesa[1]!=""){
      stateList=[selectValuesa[1]];
    }
  }
let page = window.localStorage.getItem('pagenumber')
let startTime = window.localStorage.getItem('startTime')
    const response = await request.post("/hollowGlass/hollowGlassOutRelationInfo/queryHollowHistoryTask", {
      pageNo: page,
      pageSize: 20,
      cell: 930,
      flowCardId: flowCardId.value,
      isForceList: celllist,
      stateList: stateList,
      beginDate: (timeRange.value && timeRange.value[0]) || '',
      endDate: (timeRange.value && timeRange.value[1]) || '',
  })
    if (response.code == 200) {
      ElMessage.success(response.message);
      const formattedData = response.data.records.map(record => ({
      ...record,
      formattedCreateTime: formatTimestamp(record.createTime),
      formattedUpdateTime: formatTimestamp(record.updateTime),
    }));
      tableDatax.value = formattedData;
      totalRecords.value = response.data.total/2 || 0
    } else {
      ElMessage.error(response.message);
  }
}
catch (error) {
  console.error(error);
}
}
// 历史查询点击
const sethistorical = async () => {
try {
let celllist=[]
let stateList=[]
  if(selectValuesa[0]!=null&&selectValuesa[0]!='undefined'){
if(selectValuesa[0]!=""){
  celllist=[selectValuesa[0]];
}
}
if(selectValuesa[1]!=null&&selectValuesa[1]!='undefined'){
    if(selectValuesa[1]!=""){
      stateList=[selectValuesa[1]];
    }
  }
let startTime = window.localStorage.getItem('startTime')
let page = window.localStorage.getItem('pagenumber')
const response = await request.post("/hollowGlass/hollowGlassOutRelationInfo/queryHollowHistoryTask", {
      pageNo: 1,
      pageSize: 20,
      cell: 930,
      flowCardId: flowCardId.value,
      isForceList: celllist,
      stateList: stateList,
      beginDate: (timeRange.value && timeRange.value[0]) || '',
      endDate: (timeRange.value && timeRange.value[1]) || '',
  })
    if (response.code == 200) {
      currentPage2.value = 1
      ElMessage.success(response.message);
      const formattedData = response.data.records.map(record => ({
      ...record,
      formattedCreateTime: formatTimestamp(record.createTime),
      formattedUpdateTime: formatTimestamp(record.updateTime),
    }));
      // tableDatax.value = response.data.records;
      tableDatax.value = formattedData;
      totalRecords.value = response.data.total/2 || 0
    } else {
      ElMessage.error(response.message);
  }
}
catch (error) {
  console.error(error);
}
}
// 格式化时间戳为年月日时间字符串的函数
function formatTimestamp(timestamp) {
const date = new Date(timestamp);
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始,需要加1,并补零
const day = String(date.getDate()).padStart(2, '0'); // 补零
const hours = String(date.getHours()).padStart(2, '0'); // 补零(如果需要显示时间)
const minutes = String(date.getMinutes()).padStart(2, '0'); // 补零(如果需要显示时间)
const seconds = String(date.getSeconds()).padStart(2, '0'); // 补零(如果需要显示时间)
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
}
// 格式化后端时间并计算一周前的时间
const defaultTime = ref<[Date, Date]>([new Date(), new Date()]);
function parseAndSetTime() {
const backendTime = new Date(getglobalDate);
const oneWeekAgo = new Date(backendTime.getTime() - 7 * 24 * 60 * 60 * 1000); // 减去7天
console.log(formatTimestamp(oneWeekAgo));
console.log(oneWeekAgo);
timeRange.value = [formatTimestamp(oneWeekAgo), formatTimestamp(backendTime)];
window.localStorage.setItem('startTime', formatTimestamp(oneWeekAgo))
}
function getStatusTypeb(state: number) {
switch (state) {
  case 1:
    return 'primary';
  case 2:
    return 'success';
  case 3:
    return 'info';
}
}
function getStatusTextb(state: number) {
switch (state) {
  case 1:
    return t('film.execution');
  case 2:
    return t('basicData.stop');
  case 3:
    return t('sorter.endingtask');
}
}
function getStatusTypea(isForce: number) {
switch (isForce) {
  case 0:
    return 'primary';
  case 1:
    return 'success';
}
}
function getStatusTexta(isForce: number) {
switch (isForce) {
  case 0:
    return t('hellow.noisForceList');
  case 1:
  return t('hellow.yesisForceList');
}
}
onMounted(() => {
parseAndSetTime();
historical();
});
</script>
<style scoped>
</style>
UI-Project/src/views/hollow/hellowquiptwohistory.vue
New file
@@ -0,0 +1,281 @@
<template>
  <div>
<div style="display: flex;width: 1770px;">
  <el-input v-model="flowCardId" clearable style="margin-left: 10px;margin-bottom: 10px;width: 200px;" :placeholder="$t('searchOrder.processcards')" />
  <el-select v-model="selectValuesa[0]" filterable :placeholder="$t('hellow.isForceList')" clearable
      style="width: 200px;margin-left: 10px;">
      <el-option :label="$t('hellow.noisForceList')" value="0"></el-option>
      <el-option :label="$t('hellow.yesisForceList')" value="1"></el-option>
    </el-select>
    <el-select v-model="selectValuesa[1]" filterable :placeholder="$t('searchOrder.state')" clearable
      style="width: 200px;margin-left: 10px;">
      <el-option :label="$t('film.execution')" value="1"></el-option>
      <el-option :label="$t('basicData.stop')" value="2"></el-option>
      <el-option :label="$t('sorter.endingtask')" value="3"></el-option>
    </el-select>
          <el-date-picker v-model="timeRange" type="datetimerange" range-separator="至" :start-placeholder="$t('reportmanage.starttime')"
           style="margin-left: 15px;" value-format = "YYYY-MM-DD hh:mm:ss"
            :end-placeholder="$t('reportmanage.endtime')">
          </el-date-picker>
        <el-button type="primary" style="margin-left: 10px;margin-bottom: 10px;" @click="sethistorical()">{{$t('reportmanage.inquire')}}</el-button>
   </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="flowCardId" align="center" :label="$t('searchOrder.processcards')" min-width="80" />
    <el-table-column prop="totalLayer" align="center" :label="$t('hellow.totalLayer')" min-width="80" />
    <el-table-column prop="totalPairQuantity" align="center" :label="$t('hellow.totalPairQuantity')" min-width="80" />
    <el-table-column prop="pairQuantity" align="center" :label="$t('hellow.pairQuantity')" min-width="80" />
        <el-table-column
          align="center"
          :label="$t('hellow.isForceList')"
          min-width="80"
          prop="isForce"
        >
        <template #default="scope">
      <el-tag :type="getStatusTypea(scope.row.isForce)">
        {{ getStatusTexta(scope.row.isForce) }}
      </el-tag>
    </template>
        </el-table-column>
        <el-table-column
          align="center"
          :label="$t('searchOrder.state')"
          min-width="80"
          prop="state"
        >
        <template #default="scope">
      <el-tag :type="getStatusTypeb(scope.row.state)">
        {{ getStatusTextb(scope.row.state) }}
      </el-tag>
    </template>
        </el-table-column>
        <el-table-column prop="formattedCreateTime" align="center" :label="$t('reportmanage.starttime')" min-width="100" />
        <el-table-column prop="formattedUpdateTime" align="center" :label="$t('reportmanage.endtime')" min-width="100" />
      </el-table>
<div style="margin-top: 20px;margin-left: 40%;">
      <el-pagination
        v-model:current-page="currentPage2"
        :page-size="pageSize"
        :size="large"
        :disabled="disabled"
        layout="prev, pager, next, jumper"
        :total="totalRecords"
        @current-change="handlePageChange2"
        style="margin-top: 10px;"
    />
  </div>
</div>
</template>
<script lang="ts" setup>
import {useI18n} from 'vue-i18n'
import {useRouter} from "vue-router"
import request from "@/utils/request"
import {host, WebSocketHost} from '@/utils/constants'
import {onBeforeUnmount, onMounted, onUnmounted, reactive, ref} from "vue";
import {closeWebSocket, initializeWebSocket} from '@/utils/WebSocketService';
import {ElMessage, ElMessageBox} from 'element-plus'
const {t} = useI18n()
let language = ref(localStorage.getItem('lang') || 'zh')
import { inject } from 'vue';
const globalDate = inject('globalDate');
const router = useRouter()
const timeRange = ref([])
const selectValuesa = reactive([]);
const tableDatax = ref([])
const currentPage2 = ref(1)
const totalRecords = ref(0)
const rawGlassHeight = ref('');
const rawGlassThickness = ref('');
const flowCardId = ref('');
const rawGlassfilmsId = ref('');
const slot = ref('');
let getglobalDate = window.localStorage.getItem('getglobalDate')
const historical = async () => {
try {
let startTime = window.localStorage.getItem('startTime')
    const response = await request.post("/hollowGlass/hollowGlassOutRelationInfo/queryHollowHistoryTask", {
      pageNo: 1,
      pageSize: 20,
      cell: 931,
      flowCardId: '',
      isForceList: [],
      stateList: [],
      beginDate: startTime,
      endDate: getglobalDate
  })
    if (response.code == 200) {
      ElMessage.success(response.message);
      const formattedData = response.data.records.map(record => ({
      ...record,
      formattedCreateTime: formatTimestamp(record.createTime),
      formattedUpdateTime: formatTimestamp(record.updateTime),
    }));
      tableDatax.value = formattedData;
      console.log(response.data.pages);
      totalRecords.value = response.data.total/2 || 0
    } else {
      ElMessage.error(response.message);
  }
}
catch (error) {
  console.error(error);
}
}
const handlePageChange2 = (newPage) => {
currentPage2.value = newPage;
console.log(currentPage2.value);
window.localStorage.setItem('pagenumber', currentPage2.value)
historicala(currentPage2.value);
};
const historicala = async (page) => {
try {
let celllist=[]
let stateList=[]
  if(selectValuesa[0]!=null&&selectValuesa[0]!='undefined'){
if(selectValuesa[0]!=""){
  celllist=[selectValuesa[0]];
}
}
if(selectValuesa[1]!=null&&selectValuesa[1]!='undefined'){
    if(selectValuesa[1]!=""){
      stateList=[selectValuesa[1]];
    }
  }
let page = window.localStorage.getItem('pagenumber')
let startTime = window.localStorage.getItem('startTime')
    const response = await request.post("/hollowGlass/hollowGlassOutRelationInfo/queryHollowHistoryTask", {
      pageNo: page,
      pageSize: 20,
      cell: 931,
      flowCardId: flowCardId.value,
      isForceList: celllist,
      stateList: stateList,
      beginDate: (timeRange.value && timeRange.value[0]) || '',
      endDate: (timeRange.value && timeRange.value[1]) || '',
  })
    if (response.code == 200) {
      ElMessage.success(response.message);
      const formattedData = response.data.records.map(record => ({
      ...record,
      formattedCreateTime: formatTimestamp(record.createTime),
      formattedUpdateTime: formatTimestamp(record.updateTime),
    }));
      tableDatax.value = formattedData;
      totalRecords.value = response.data.total/2 || 0
    } else {
      ElMessage.error(response.message);
  }
}
catch (error) {
  console.error(error);
}
}
// 历史查询点击
const sethistorical = async () => {
try {
let celllist=[]
let stateList=[]
  if(selectValuesa[0]!=null&&selectValuesa[0]!='undefined'){
if(selectValuesa[0]!=""){
  celllist=[selectValuesa[0]];
}
}
if(selectValuesa[1]!=null&&selectValuesa[1]!='undefined'){
    if(selectValuesa[1]!=""){
      stateList=[selectValuesa[1]];
    }
  }
let startTime = window.localStorage.getItem('startTime')
let page = window.localStorage.getItem('pagenumber')
const response = await request.post("/hollowGlass/hollowGlassOutRelationInfo/queryHollowHistoryTask", {
      pageNo: 1,
      pageSize: 20,
      cell: 931,
      flowCardId: flowCardId.value,
      isForceList: celllist,
      stateList: stateList,
      beginDate: (timeRange.value && timeRange.value[0]) || '',
      endDate: (timeRange.value && timeRange.value[1]) || '',
  })
    if (response.code == 200) {
      currentPage2.value = 1
      ElMessage.success(response.message);
      const formattedData = response.data.records.map(record => ({
      ...record,
      formattedCreateTime: formatTimestamp(record.createTime),
      formattedUpdateTime: formatTimestamp(record.updateTime),
    }));
      // tableDatax.value = response.data.records;
      tableDatax.value = formattedData;
      totalRecords.value = response.data.total/2 || 0
    } else {
      ElMessage.error(response.message);
  }
}
catch (error) {
  console.error(error);
}
}
// 格式化时间戳为年月日时间字符串的函数
function formatTimestamp(timestamp) {
const date = new Date(timestamp);
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始,需要加1,并补零
const day = String(date.getDate()).padStart(2, '0'); // 补零
const hours = String(date.getHours()).padStart(2, '0'); // 补零(如果需要显示时间)
const minutes = String(date.getMinutes()).padStart(2, '0'); // 补零(如果需要显示时间)
const seconds = String(date.getSeconds()).padStart(2, '0'); // 补零(如果需要显示时间)
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
}
// 格式化后端时间并计算一周前的时间
const defaultTime = ref<[Date, Date]>([new Date(), new Date()]);
function parseAndSetTime() {
const backendTime = new Date(getglobalDate);
const oneWeekAgo = new Date(backendTime.getTime() - 7 * 24 * 60 * 60 * 1000); // 减去7天
console.log(formatTimestamp(oneWeekAgo));
console.log(oneWeekAgo);
timeRange.value = [formatTimestamp(oneWeekAgo), formatTimestamp(backendTime)];
window.localStorage.setItem('startTime', formatTimestamp(oneWeekAgo))
}
function getStatusTypeb(state: number) {
switch (state) {
  case 1:
    return 'primary';
  case 2:
    return 'success';
  case 3:
    return 'info';
}
}
function getStatusTextb(state: number) {
switch (state) {
  case 1:
    return t('film.execution');
  case 2:
    return t('basicData.stop');
  case 3:
    return t('sorter.endingtask');
}
}
function getStatusTypea(isForce: number) {
switch (isForce) {
  case 0:
    return 'primary';
  case 1:
    return 'success';
}
}
function getStatusTexta(isForce: number) {
switch (isForce) {
  case 0:
    return t('hellow.noisForceList');
  case 1:
  return t('hellow.yesisForceList');
}
}
onMounted(() => {
parseAndSetTime();
historical();
});
</script>
<style scoped>
</style>
UI-Project/src/views/hollow/hellowslicecagehistory.vue
@@ -26,7 +26,7 @@
  <div style="margin-bottom: 10px;margin-top: 20px;margin-left: 20px;">
      <el-form>
        <el-row style="margin-top: -15px;margin-bottom: -2px;">
          <el-col :span="4">
          <el-col :span="5">
              <div id="dt" style="font-size: 15px;">
              <el-form-item :label="$t('hellow.hollowCountOutOne')"  style="width: 14vw">
                {{ hollowCountOutOne }}
@@ -34,19 +34,19 @@
              </div>
          </el-col>
          <el-col :span="5">
            <div id="dta" style="font-size: 15px;">
          <el-form-item :label="$t('hellow.hollowCountOutTwo')" style="width: 14vw">
                {{ hollowCountOutTwo }}
              </el-form-item>
              </div>
          </el-col>
          <el-col :span="4">
              <div id="dt" style="font-size: 15px;">
              <el-form-item :label="$t('hellow.hollowTotalAreaOutOne')" style="width: 14vw">
                {{ hollowTotalAreaOutOne }}
              </el-form-item>
              </div>
          </el-col>
          <el-col :span="5">
            <div id="dta" style="font-size: 15px;">
          <el-form-item :label="$t('hellow.hollowCountOutTwo')" style="width: 14vw">
                {{ hollowCountOutTwo }}
              </el-form-item>
              </div>
          </el-col>
          <el-col :span="4">
              <div id="dt" style="font-size: 15px;">
              <el-form-item :label="$t('hellow.hollowTotalAreaOutTwo')" style="width: 14vw">
UI-Project/src/views/hollow/hollowequipment.vue
@@ -11,6 +11,7 @@
        <el-button type="primary" @click="selectproject">
          {{ $t('hellow.reviewproject') }}
        </el-button>
    <el-button style="margin-left: 10px;" id="searchButton" type="primary" @click="handlehistorical">{{ $t('searchOrder.historicaltasks') }}</el-button>
    <el-button style="margin-left: 10px;" id="searchButton" type="success" @click="handleBinda">
          {{ $t('hellow.starttask') }}
        </el-button>
@@ -20,10 +21,6 @@
        </el-button>
        <el-button style="margin-left: 10px;" id="searchButton" type="warning" @click="handleBindc">{{
            $t('hellow.stopproject')
          }}
        </el-button>
        <el-button style="margin-left: 10px;" id="searchButton" type="danger" @click="handleBindb">{{
            $t('hellow.stoptask')
          }}
        </el-button>
    <el-switch style="margin-top: 7px;margin-left: 10px;" v-model="ganghua" class="mb-2" :inactive-text="$t('hellow.schedulingswitch')" @change="handleChange" />
@@ -834,17 +831,6 @@
      </div>
    </template>
  </el-dialog>
  <!-- 停止任务 -->
  <el-dialog v-model="blindb" top="30vh" width="25%" :title="$t('hellow.pstoptask')">
    <template #footer>
      <div id="dialog-footer">
        <el-button type="primary" @click="handleb">
          {{ $t('basicData.confirm') }}
        </el-button>
        <el-button @click="blindb = false">{{ $t('basicData.cancel') }}</el-button>
      </div>
    </template>
  </el-dialog>
  <!-- 暂停任务 -->
  <el-dialog v-model="blindc" top="30vh" width="25%" :title="$t('hellow.pstopproject')">
    <template #footer>
@@ -999,6 +985,17 @@
      </div>
    </template>
</el-dialog>
 <!-- 历史任务 -->
 <el-dialog v-model="blindb" top="5vh" width="95%">
     <iframe
     :src="iframeUrl"
     marginwidth="2000px"
     marginheight="2000px"
     width="100%"
     height="750px"
     frameborder="0"
     ></iframe>
  </el-dialog>
</template>
<script setup>
import { ElMessage, ElMessageBox } from 'element-plus'
@@ -1069,6 +1066,11 @@
const formulaNameid = ref({ id: null });
const titleformulaName = ref({ formulaName: [] ,formulaId: []});
const titleSelectJson = ref({ processType: [] });
const iframeUrl = ref('');
const handlehistorical = (row) => {
  blindb.value = true;
  iframeUrl.value = `${window.location.origin}/#/hollow/hellowquiphistory`;
};
const options = [
  {
    value: 930,
@@ -1123,10 +1125,6 @@
// 开始任务 
const handleBinda = (row) => {
  blinda.value = true;
};
// 停止任务
const handleBindb = (row) => {
  blindb.value = true;
};
// 暂停任务 
const handleBindc = (row) => {
@@ -1710,29 +1708,6 @@
      if (response.code == 200) {
        ElMessage.success(response.message);
        blinda.value = false;
      } else {
        ElMessage.error(response.message);
      }
    } else {
      ElMessage({
        type: 'info',
        message: t('basicData.infonull'),
      })
    }
  } catch (error) {
    console.error(error);
  }
}
// 结束任务
const handleb = async () => {
  try {
    let flowCardId = window.localStorage.getItem('flowCardId')
    if (flowCardId !== '') {
    var url="/hollowGlass/hollowGlassOutRelationInfo/finishTask?flowCardId="+flowCardId + "&cell=" + 930;
    const response = await request.post(url)
      if (response.code == 200) {
        ElMessage.success(response.message);
        blindb.value = false;
      } else {
        ElMessage.error(response.message);
      }
UI-Project/src/views/hollow/hollowequipmenttwo.vue
@@ -11,6 +11,7 @@
        <el-button type="primary" @click="selectproject">
          {{ $t('hellow.reviewproject') }}
        </el-button>
    <el-button style="margin-left: 10px;" id="searchButton" type="primary" @click="handlehistorical">{{ $t('searchOrder.historicaltasks') }}</el-button>
    <el-button style="margin-left: 10px;" id="searchButton" type="success" @click="handleBinda">
          {{ $t('hellow.starttask') }}
        </el-button>
@@ -20,10 +21,6 @@
        </el-button>
        <el-button style="margin-left: 10px;" id="searchButton" type="warning" @click="handleBindc">{{
            $t('hellow.stopproject')
          }}
        </el-button>
        <el-button style="margin-left: 10px;" id="searchButton" type="danger" @click="handleBindb">{{
            $t('hellow.stoptask')
          }}
        </el-button>
    <el-switch style="margin-top: 7px;margin-left: 10px;" v-model="ganghua" class="mb-2" :inactive-text="$t('hellow.schedulingswitch')" @change="handleChange" />
@@ -398,17 +395,6 @@
      </div>
    </template>
  </el-dialog>
  <!-- 停止任务 -->
  <el-dialog v-model="blindb" top="30vh" width="25%" :title="$t('hellow.pstoptask')">
    <template #footer>
      <div id="dialog-footer">
        <el-button type="primary" @click="handleb">
          {{ $t('basicData.confirm') }}
        </el-button>
        <el-button @click="blindb = false">{{ $t('basicData.cancel') }}</el-button>
      </div>
    </template>
  </el-dialog>
  <!-- 暂停任务 -->
  <el-dialog v-model="blindc" top="30vh" width="25%" :title="$t('hellow.pstopproject')">
    <template #footer>
@@ -493,6 +479,17 @@
      </div>
    </template>
</el-dialog>
 <!-- 历史任务 -->
 <el-dialog v-model="blindb" top="5vh" width="95%">
     <iframe
     :src="iframeUrl"
     marginwidth="2000px"
     marginheight="2000px"
     width="100%"
     height="750px"
     frameborder="0"
     ></iframe>
  </el-dialog>
</template>
<script setup>
import { ElMessage, ElMessageBox } from 'element-plus'
@@ -542,6 +539,11 @@
const formulaNameid = ref({ id: null });
const titleformulaName = ref({ formulaName: [] ,formulaId: []});
const titleSelectJson = ref({ processType: [] });
const iframeUrl = ref('');
const handlehistorical = (row) => {
  blindb.value = true;
  iframeUrl.value = `${window.location.origin}/#/hollow/hellowquiptwohistory`;
};
const options = [
  {
    value: 930,
@@ -618,10 +620,6 @@
// 开始任务 
const handleBinda = (row) => {
  blinda.value = true;
};
// 停止任务
const handleBindb = (row) => {
  blindb.value = true;
};
// 暂停任务 
const handleBindc = (row) => {
@@ -897,29 +895,6 @@
      if (response.code == 200) {
        ElMessage.success(response.message);
        blinda.value = false;
      } else {
        ElMessage.error(response.message);
      }
    } else {
      ElMessage({
        type: 'info',
        message: t('basicData.infonull'),
      })
    }
  } catch (error) {
    console.error(error);
  }
}
// 结束任务
const handleb = async () => {
  try {
    let flowCardId = window.localStorage.getItem('flowCardId')
    if (flowCardId !== '') {
    var url="/hollowGlass/hollowGlassOutRelationInfo/finishTask?flowCardId="+flowCardId + "&cell=" + 931;
    const response = await request.post(url)
      if (response.code == 200) {
        ElMessage.success(response.message);
        blindb.value = false;
      } else {
        ElMessage.error(response.message);
      }
UI-Project/src/views/hollow/hollowslicecage.vue
@@ -300,9 +300,14 @@
const socketUrl = `ws://${WebSocketHost}:${host}/api/hollowGlass/api/talk/hollowGlassMessage`;
const handleMessage = (data) => {
  if(data.bigStorageCageUsageSummary!=null){
    tableDatass.value = data.bigStorageCageUsageSummary[0]
    const summaries = data.bigStorageCageUsageSummary[0];
      const updatedData = summaries.map(summary => ({
        ...summary,
        totalNumber: summary.layer * summary.sumCount,
      }));
      tableDatass.value = updatedData;
  }else{
    tableDatass.value = ''
    tableDatass.value = []
      }
  if (data.inkageEntity != null) {
    inkageEntity.value = data.inkageEntity[0] == true ? 'green' : '#911005';
@@ -330,8 +335,8 @@
    console.log(data.bigStorageCageDetailsOutTask[0])
    adjusta.value = data.bigStorageCageDetailsOutTask[0].filter(rect => rect.slot !== null && rect.slot !== undefined);
  } else {
    tableDatac.value = '',
    adjusta.value = ''
    tableDatac.value = [],
    adjusta.value = []
  }
    if (data.scanGlass != null) {
    scanGlass.value = data.scanGlass[0];
@@ -346,25 +351,25 @@
    tableDatad.value = data.bigStorageCageDetailsFeedTask[0]
    adjust.value = data.bigStorageCageDetailsFeedTask[0].filter(rect => rect.slot !== null && rect.slot !== undefined); 
  }else{
    tableDatad.value = ''
    tableDatad.value = []
      }
if(data.temperingGlassInfoList!=null){
  tableDatab.value = data.temperingGlassInfoList[0]
  console.log(tableDatab.value)
}else{
    tableDatab.value = ''
    tableDatab.value = []
      }
      console.log(data.bigStorageCageUsage);
      
if(data.bigStorageCageUsage!=null){
  tableDatae.value = data.bigStorageCageUsage[0]
}else{
    tableDatae.value = ''
    tableDatae.value = []
      }
if(data.carPostion!=null){
  carPosition.value = data.carPostion[0]
}else{
  carPosition.value = ''
  carPosition.value = []
  }
if(data.temperingSwitch!=null){
  ganghua.value = data.temperingSwitch[0]
@@ -623,7 +628,7 @@
}
function tableRowClassName({ row }) {
  if (row.isSame === 1) {
    return 'row-red-background'; // 设置红色背景
    return 'row-red-background';
  }
  return '';
}
@@ -788,7 +793,7 @@
         <el-table-column prop="flowCardId" align="center" :label="$t('searchOrder.cardnumber')" min-width="140" />
         <el-table-column prop="sumCount" align="center" :label="$t('searchOrder.totallogarithms')" min-width="120" />
         <el-table-column prop="pairCount" align="center" :label="$t('searchOrder.numberpairs')" min-width="120" />
         <el-table-column prop="sumCount" align="center" :label="$t('hellow.totalnumber')" min-width="120" />
         <el-table-column prop="totalNumber" align="center" :label="$t('hellow.totalnumber')" min-width="120" />
         <el-table-column prop="realCount" align="center" :label="$t('hellow.realpieces')" min-width="120" />
         <el-table-column prop="slotCount" align="center" :label="$t('searchOrder.numberoccupied')" min-width="120" />
       </el-table>
@@ -958,7 +963,7 @@
  </div>
  </el-dialog>
  <!-- 历史任务 -->
<el-dialog v-model="blindb" top="10vh" width="90%">
<el-dialog v-model="blindb" top="5vh" width="95%">
     <iframe 
     :src="iframeUrl" 
     marginwidth="2000px"