From 36be21e34ce064d190527d96ac7f09f9023e3bc4 Mon Sep 17 00:00:00 2001
From: ZengTao <2773468879@qq.com>
Date: 星期二, 20 五月 2025 11:42:35 +0800
Subject: [PATCH] Merge branch 'aerjiliya' of http://10.153.19.25:10105/r/YiWuProject into aerjiliya

---
 UI-Project/src/views/hollow/hellowquiptwohistory.vue |   62 ++++++++++++++++++++++++++-----
 1 files changed, 52 insertions(+), 10 deletions(-)

diff --git a/UI-Project/src/views/hollow/hellowquiptwohistory.vue b/UI-Project/src/views/hollow/hellowquiptwohistory.vue
index c61da50..824e909 100644
--- a/UI-Project/src/views/hollow/hellowquiptwohistory.vue
+++ b/UI-Project/src/views/hollow/hellowquiptwohistory.vue
@@ -13,10 +13,15 @@
       <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-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="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'}">
@@ -112,7 +117,7 @@
               </div>
           </el-col>
         </el-row>
-        <el-row style="margin-top: 10px;">
+        <el-row style="margin-top: 20px;">
           <el-col :span="8">
               <div id="dt" style="font-size: 15px;">
         <div>
@@ -129,7 +134,7 @@
             </div></div>
           </el-col>
         </el-row>
-        <el-row style="margin-top: 10px;">
+        <el-row style="margin-top: 20px;">
           <el-col :span="8">
               <div id="dt" style="font-size: 15px;">
         <div>
@@ -263,8 +268,8 @@
       flowCardId: flowCardId.value,
       isForceList: celllist,
       stateList: stateList,
-      beginDate: (timeRange.value && timeRange.value[0]) || '',
-      endDate: (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);
@@ -380,8 +385,8 @@
       flowCardId: flowCardId.value,
       isForceList: celllist,
       stateList: stateList,
-      beginDate: (timeRange.value && timeRange.value[0]) || '',
-      endDate: (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
@@ -412,6 +417,41 @@
 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() {
@@ -463,4 +503,6 @@
 });
 </script>
 <style scoped>  
+#dt { display:block; float:left;line-height: 20px;margin-left: 10px;}
+#dta { display:block; float:left;line-height: 20px;margin-left: 50%;}
 </style>
\ No newline at end of file

--
Gitblit v1.8.0