From 901b68695fcdab7e3ff1d5df3df88bd5001b0181 Mon Sep 17 00:00:00 2001
From: jiang <1354748262@qq.com>
Date: 星期四, 25 一月 2024 09:17:10 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 jcdm-ui/src/views/main/pr/tightenReport/index.vue |   64 ++++++++++++++++++++------------
 1 files changed, 40 insertions(+), 24 deletions(-)

diff --git a/jcdm-ui/src/views/main/pr/tightenReport/index.vue b/jcdm-ui/src/views/main/pr/tightenReport/index.vue
index f1f45df..f839cb2 100644
--- a/jcdm-ui/src/views/main/pr/tightenReport/index.vue
+++ b/jcdm-ui/src/views/main/pr/tightenReport/index.vue
@@ -14,14 +14,17 @@
             placeholder="璇疯緭鍏ュ伐浣嶅彿"
             @keyup.enter.native="handleQuery"/>
         </el-form-item>
-        <el-form-item label-width="120"  label="閲囬泦鏃堕棿" prop="startDate">
-            <el-date-picker
-              v-model="dateRange"
-              type="daterange"
-              range-separator="鑷�"
-              start-placeholder="寮�濮嬫棩鏈�"
-              end-placeholder="缁撴潫鏃ユ湡">
-            </el-date-picker>
+        <el-form-item label-width="130" label="淇濆瓨鏃ユ湡" prop="dateConditions">
+          <el-date-picker
+            v-model="queryParams.dateConditions"
+            type="datetimerange"
+            :picker-options="pickerOptions"
+            value-format="yyyy-MM-dd HH:mm:ss"
+            range-separator="鑷�"
+            start-placeholder="寮�濮嬫棩鏈�"
+            end-placeholder="缁撴潫鏃ユ湡"
+            align="right">
+          </el-date-picker>
         </el-form-item>
         <el-form-item style="float: right">
           <el-button type="primary" icon="el-icon-refresh" @click="handleQuery">鏌ヨ</el-button>
@@ -110,7 +113,35 @@
         unit: null,
         type: '鎷х揣鏁版嵁',
         startDate: null,
-        endDate: null
+        endDate: null,
+        dateConditions: [],
+      },
+      pickerOptions: {
+        shortcuts: [{
+          text: '鏈�杩戜竴鍛�',
+          onClick(picker) {
+            const end = new Date();
+            const start = new Date();
+            start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
+            picker.$emit('pick', [start, end]);
+          }
+        }, {
+          text: '鏈�杩戜竴涓湀',
+          onClick(picker) {
+            const end = new Date();
+            const start = new Date();
+            start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
+            picker.$emit('pick', [start, end]);
+          }
+        }, {
+          text: '鏈�杩戜笁涓湀',
+          onClick(picker) {
+            const end = new Date();
+            const start = new Date();
+            start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
+            picker.$emit('pick', [start, end]);
+          }
+        }]
       },
     }
   },
@@ -118,21 +149,6 @@
     this.getList();
   },
   methods: {
-
-    //   async fetchData() {
-    //     // 鏋勫缓API璇锋眰鐨刄RL锛屼娇鐢ㄩ�夋嫨鐨勬棩鏈熻寖鍥翠綔涓烘煡璇㈠弬鏁�
-    //     const url = `@/api/main/da/paramCollection/paramCollection?startDate=${this.dateRange[0]}&endDate=${this.dateRange[1]}`;
-    //
-    //     try {
-    //       // 鍙戦�丄PI璇锋眰锛岃幏鍙栨煡璇㈢粨鏋�
-    //       const response = await fetch(url);
-    //       const data = await response.json();
-    //       console.log(data); // 澶勭悊鏌ヨ缁撴灉锛屾瘮濡傚湪鎺у埗鍙拌緭鍑烘垨鏄剧ず鍦ㄩ〉闈笂
-    //     } catch (error) {
-    //       console.error('Error fetching data:', error);
-    //     }
-    //   },
-    // },
 
     reset() {
       this.form = {

--
Gitblit v1.9.3