From 71594bd2dc9201834aa533099e9e49a9b84506cd Mon Sep 17 00:00:00 2001 From: wangfei <3597712270@qq.com> Date: 星期四, 12 六月 2025 15:32:25 +0800 Subject: [PATCH] 新增韩语 --- UI-Project/src/views/Caching/cachingunhistory.vue | 95 +++++++++++++++++++++++++++++++---------------- 1 files changed, 62 insertions(+), 33 deletions(-) diff --git a/UI-Project/src/views/Caching/cachingunhistory.vue b/UI-Project/src/views/Caching/cachingunhistory.vue index 0b222b1..bebbc58 100644 --- a/UI-Project/src/views/Caching/cachingunhistory.vue +++ b/UI-Project/src/views/Caching/cachingunhistory.vue @@ -26,10 +26,15 @@ :value="item.value" /> </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-date-picker + style="margin-left: 15px;" + v-model="timeRange" + type="datetimerange" + :shortcuts="shortcuts" + range-separator="鑷�" + :start-placeholder="$t('reportmanage.starttime')" + :end-placeholder="$t('reportmanage.endtime')" + /> <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;"> @@ -38,14 +43,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> @@ -117,8 +122,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(''); @@ -141,14 +146,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 () => { @@ -165,19 +168,17 @@ endTime: getglobalDate }) if (response.code == 200) { - countOutTwo.value = response.data.countOutTwo - totalAreaOutTwo.value = response.data.totalAreaOutTwo + 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); @@ -193,8 +194,8 @@ glassId: glassId.value, taskState: taskState.value, taskType: taskType.value, - startTime: (timeRange.value && timeRange.value[0]) || '', - endTime: (timeRange.value && timeRange.value[1]) || '', + beginDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[0])) || '', + endDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[1])) || '', }) if (response.code == 200) { ElMessage.success(response.message); @@ -205,7 +206,6 @@ } } catch (error) { - console.error(error); } } const Dailya = async (page) => { @@ -219,18 +219,17 @@ glassId: glassId.value, taskState: taskState.value, taskType: taskType.value, - startTime: (timeRange.value && timeRange.value[0]) || '', - endTime: (timeRange.value && timeRange.value[1]) || '', + beginDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[0])) || '', + endDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[1])) || '', }) if (response.code == 200) { - countOutTwo.value = response.data.countOutTwo - totalAreaOutTwo.value = response.data.totalAreaOutTwo + countOutOne.value = response.data.countOutOne + totalAreaOutOne.value = response.data.totalAreaOutOne } else { ElMessage.error(response.message); } } catch (error) { - console.error(error); } } const handleClick = async () => { @@ -242,7 +241,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, @@ -250,8 +248,8 @@ glassId: glassId.value, taskState: taskState.value, taskType: taskType.value, - startTime: (timeRange.value && timeRange.value[0]) || '', - endTime: (timeRange.value && timeRange.value[1]) || '', + beginDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[0])) || '', + endDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[1])) || '', }) if (response.code == 200) { currentPage2.value = 1; @@ -263,7 +261,6 @@ } } catch (error) { - console.error(error); } } const Dailyhistorical = async () => { @@ -277,18 +274,17 @@ glassId: glassId.value, taskState: taskState.value, taskType: taskType.value, - startTime: (timeRange.value && timeRange.value[0]) || '', - endTime: (timeRange.value && timeRange.value[1]) || '', + beginDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[0])) || '', + endDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[1])) || '', }) if (response.code == 200) { - countOutTwo.value = response.data.countOutTwo - totalAreaOutTwo.value = response.data.totalAreaOutTwo + countOutOne.value = response.data.countOutOne + totalAreaOutOne.value = response.data.totalAreaOutOne } else { ElMessage.error(response.message); } } catch (error) { - console.error(error); } } // 鏍煎紡鍖栨椂闂存埑涓哄勾鏈堟棩鏃堕棿瀛楃涓茬殑鍑芥暟 @@ -302,14 +298,47 @@ const seconds = String(date.getSeconds()).padStart(2, '0'); // 琛ラ浂锛堝鏋滈渶瑕佹樉绀烘椂闂达級 return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; } +const shortcuts = [ + { + text: '鏈�杩戜竴鍛�', + value: () => { + const backendTime = new Date(getglobalDate) + const oneWeekAgo = new Date(getglobalDate) + oneWeekAgo.setHours(0, 0, 0, 0); + oneWeekAgo.setDate(oneWeekAgo.getDate() - 7) + timeRange.value = [formatTimestamp(oneWeekAgo), formatTimestamp(backendTime)] + window.localStorage.setItem('startTime', formatTimestamp(oneWeekAgo)) + }, + }, + { + text: '鏈�杩戜竴涓湀', + value: () => { + const backendTime = new Date(getglobalDate) + const oneWeekAgo = new Date(getglobalDate) + oneWeekAgo.setHours(0, 0, 0, 0); + oneWeekAgo.setMonth(oneWeekAgo.getMonth() - 1) + timeRange.value = [formatTimestamp(oneWeekAgo), formatTimestamp(backendTime)] + window.localStorage.setItem('startTime', formatTimestamp(oneWeekAgo)) + }, + }, + { + text: '鏈�杩戜笁涓湀', + value: () => { + const backendTime = new Date(getglobalDate) + const oneWeekAgo = new Date(getglobalDate) + oneWeekAgo.setHours(0, 0, 0, 0); + oneWeekAgo.setMonth(oneWeekAgo.getMonth() - 3) + timeRange.value = [formatTimestamp(oneWeekAgo), formatTimestamp(backendTime)] + window.localStorage.setItem('startTime', formatTimestamp(oneWeekAgo)) +}, + }, +] // 鏍煎紡鍖栧悗绔椂闂村苟璁$畻涓�鍛ㄥ墠鐨勬椂闂� 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澶� 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)) } -- Gitblit v1.8.0