| | |
| | | <div> |
| | | <div style="display: flex;width: 1770px;"> |
| | | <el-input v-model="glassId" clearable style="margin-left: 10px;margin-bottom: 10px;width: 200px;" :placeholder="$t('searchOrder.inglassID')" /> |
| | | <el-input v-model="startSlot" clearable style="margin-left: 10px;margin-bottom: 10px;width: 200px;" :placeholder="$t('film.originateslot')" /> |
| | | <el-input v-model="targetSlot" clearable style="margin-left: 10px;margin-bottom: 10px;width: 200px;" :placeholder="$t('film.endslot')" /> |
| | | <el-input v-model="startSlot" clearable style="margin-left: 10px;margin-bottom: 10px;width: 200px;" @input="handleInputa" :placeholder="$t('film.originateslot')" /> |
| | | <el-input v-model="targetSlot" clearable style="margin-left: 10px;margin-bottom: 10px;width: 200px;" @input="handleInputb" :placeholder="$t('film.endslot')" /> |
| | | <el-select v-model="selectValuesa[0]" filterable :placeholder="$t('searchOrder.taskstatus')" clearable |
| | | style="width: 200px;margin-left: 10px;"> |
| | | <el-option :label="$t('searchOrder.begin')" value="0"></el-option> |
| | |
| | | </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="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 |
| | |
| | | }) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | tableDatax.value = response.data.records; |
| | | const formattedData = response.data.records.map(record => ({ |
| | | ...record, |
| | | formattedCreateTime: formatTimestamp(record.createTime), |
| | | formattedUpdateTime: formatTimestamp(record.updateTime), |
| | | })); |
| | | // tableDatax.value = response.data.records; |
| | | tableDatax.value = formattedData; |
| | | console.log(response.data.pages); |
| | | |
| | | totalRecords.value = response.data.total/2 || 0 |
| | |
| | | }; |
| | | const historicala = async (page) => { |
| | | try { |
| | | let page = window.localStorage.getItem('pagenumber') |
| | | let startTime = window.localStorage.getItem('startTime') |
| | | const response = await request.post("/cacheVerticalGlass/bigStorageCageHistoryTask/queryBigStorageCageHistoryTask", { |
| | | pageNo: page, |
| | | pageSize: 20, |
| | | glassId: glassId.value, |
| | | startSlot: 0, |
| | | targetSlot: 0, |
| | | taskStateList: [], |
| | | taskTypeList: [], |
| | | beginDate: startTime, |
| | | endDate: getglobalDate |
| | | }) |
| | | 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 sethistorical = async () => { |
| | | try { |
| | | let startTime = window.localStorage.getItem('startTime') |
| | | let celllist=[] |
| | | let stateList=[] |
| | | let pstartSlot= '' |
| | |
| | | stateList=[selectValuesa[1]]; |
| | | } |
| | | } |
| | | console.log(startSlot.value); |
| | | |
| | | if(startSlot.value != ""){ |
| | | pstartSlot = startSlot.value |
| | | }else{ |
| | |
| | | ptargetSlot = '0' |
| | | } |
| | | let page = window.localStorage.getItem('pagenumber') |
| | | const response = await request.post("/cacheVerticalGlass/bigStorageCageHistoryTask/queryBigStorageCageHistoryTask", { |
| | | let startTime = window.localStorage.getItem('startTime') |
| | | const response = await request.post("/cacheVerticalGlass/bigStorageCageHistoryTask/queryBigStorageCageHistoryTask", { |
| | | pageNo: page, |
| | | pageSize: 20, |
| | | glassId: glassId.value, |
| | |
| | | targetSlot: ptargetSlot, |
| | | taskStateList: celllist, |
| | | taskTypeList: stateList, |
| | | beginDate: startTime, |
| | | endDate: getglobalDate |
| | | beginDate: (timeRange.value && timeRange.value[0]) || '', |
| | | endDate: (timeRange.value && timeRange.value[1]) || '', |
| | | }) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | tableDatax.value = response.data.records; |
| | | const formattedData = response.data.records.map(record => ({ |
| | | ...record, |
| | | formattedCreateTime: formatTimestamp(record.createTime), |
| | | formattedUpdateTime: formatTimestamp(record.updateTime), |
| | | })); |
| | | // tableDatax.value = response.data.records; |
| | | tableDatax.value = formattedData; |
| | | console.log(response.data.pages); |
| | | |
| | | totalRecords.value = response.data.total/2 || 0 |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | |
| | | console.error(error); |
| | | } |
| | | } |
| | | // 历史查询点击 |
| | | const sethistorical = async () => { |
| | | try { |
| | | let celllist=[] |
| | | let stateList=[] |
| | | let pstartSlot= '' |
| | | let ptargetSlot='' |
| | | 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]]; |
| | | } |
| | | } |
| | | if(startSlot.value != ""){ |
| | | pstartSlot = startSlot.value |
| | | }else{ |
| | | pstartSlot = '0' |
| | | } |
| | | if(targetSlot.value != ""){ |
| | | ptargetSlot = targetSlot.value |
| | | }else{ |
| | | ptargetSlot = '0' |
| | | } |
| | | const response = await request.post("/cacheVerticalGlass/bigStorageCageHistoryTask/queryBigStorageCageHistoryTask", { |
| | | pageNo: 1, |
| | | pageSize: 20, |
| | | glassId: glassId.value, |
| | | startSlot: pstartSlot, |
| | | targetSlot: ptargetSlot, |
| | | taskStateList: celllist, |
| | | taskTypeList: stateList, |
| | | beginDate: (timeRange.value && timeRange.value[0]) || '', |
| | | endDate: (timeRange.value && timeRange.value[1]) || '', |
| | | }) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | currentPage2.value = 1 |
| | | totalRecords.value = response.data.total/2 || 0 |
| | | const formattedData = response.data.records.map(record => ({ |
| | | ...record, |
| | | formattedCreateTime: formatTimestamp(record.createTime), |
| | | formattedUpdateTime: formatTimestamp(record.updateTime), |
| | | })); |
| | | // tableDatax.value = response.data.records; |
| | | tableDatax.value = formattedData; |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | } |
| | | catch (error) { |
| | | console.error(error); |
| | | } |
| | | } |
| | | const handleInputa = (value: string) => { |
| | | const isNumeric = /^\d*$/.test(value); |
| | | if (isNumeric) { |
| | | startSlot.value = value; |
| | | } else { |
| | | startSlot.value = ''; |
| | | } |
| | | }; |
| | | const handleInputb = (value: string) => { |
| | | const isNumeric = /^\d*$/.test(value); |
| | | if (isNumeric) { |
| | | targetSlot.value = value; |
| | | } else { |
| | | targetSlot.value = ''; |
| | | } |
| | | }; |
| | | // 格式化时间戳为年月日时间字符串的函数 |
| | | function formatTimestamp(timestamp) { |
| | | const date = new Date(timestamp); |