From 2e81d145301fcd7082217c088acea50fbdc5b13e Mon Sep 17 00:00:00 2001
From: wangfei <3597712270@qq.com>
Date: 星期五, 14 三月 2025 11:30:17 +0800
Subject: [PATCH] 卧理一线二线新增页面显示接口,中空一线、二线新增历史任务,磨边时间戳转换
---
UI-Project/src/views/Caching/cachingunhistory.vue | 104 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 103 insertions(+), 1 deletions(-)
diff --git a/UI-Project/src/views/Caching/cachingunhistory.vue b/UI-Project/src/views/Caching/cachingunhistory.vue
index 3714311..9192d2f 100644
--- a/UI-Project/src/views/Caching/cachingunhistory.vue
+++ b/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>
--
Gitblit v1.8.0