From 0ecf7b3bc6d6a008a804d55c859833bf2cf6473a Mon Sep 17 00:00:00 2001
From: zmc <zmc_li@foxmail.com>
Date: 星期三, 22 十一月 2023 10:06:29 +0800
Subject: [PATCH] 1.增加了有效率异常展示页面 2.风险模型的所属场景和运维商的详细信息,以及1个跳转页面链接 3.飞行巡检页面增加增加地址和运维商的筛选条件 4.飞行巡检页面是最新当日日期时,每类异常右上角增加一个“辅助审核” 5.历史数据管理增加 站点总数

---
 src/sfc/TimeShortCuts.vue |  100 ++++++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 85 insertions(+), 15 deletions(-)

diff --git a/src/sfc/TimeShortCuts.vue b/src/sfc/TimeShortCuts.vue
index 3c4b16b..6790532 100644
--- a/src/sfc/TimeShortCuts.vue
+++ b/src/sfc/TimeShortCuts.vue
@@ -14,12 +14,15 @@
       },
   ***
 -->
+
+
 <script>
 import dayjs from 'dayjs';
+import time from '@/utils/time.js'
 export default {
   props: {
     beginAndEndTime:{
-      type:Object,
+      type:Array,
       default: ()=>{
         return []
       }
@@ -27,6 +30,11 @@
     timeType: {
       type: String,
       default: 'month'
+    },
+    // 鏄惁璁剧疆鍙灞炴��
+    readOnly: {
+      type: Boolean,
+      default:false
     }
   },
   emits: ['submitTime'],
@@ -56,34 +64,89 @@
   },
   methods: {
     initShortCuts() {
+      // this.shortcuts = [
+      //   {
+      //     text: '鍓嶄竴鏃�',
+      //     value: () => {
+      //       const start = dayjs().subtract(1,'day').format('YYYY-MM-DD 00:00:00')
+      //       const end = dayjs().subtract(1,'day').format('YYYY-MM-DD 23:59:59')
+      //       return [start, end];
+      //     } 
+      //   },
+
+      //   {
+      //     text: '鍓�7澶�',
+      //     value: () => {
+      //       const start = dayjs().subtract(7,'day').format('YYYY-MM-DD 00:00:00');
+      //       const end = dayjs().subtract(1,'day').format('YYYY-MM-DD 23:59:59');
+      //       return [start, end];
+      //     }
+      //   },
+      //   {
+      //     text: '涓婁竴鏈�',
+      //     value: () => {
+      //       const start = dayjs().subtract(1,'month').startOf('month').format('YYYY-MM-DD HH:mm:ss');
+      //       const end = dayjs().subtract(1,'month').endOf('month').format('YYYY-MM-DD HH:mm:ss');
+      //       return [start, end];
+      //     }
+      //   }
+      // ];
+
+
       this.shortcuts = [
         {
           text: '鍓嶄竴鏃�',
           value: () => {
-            const start = dayjs().subtract(1,'day').format('YYYY-MM-DD 00:00:00')
-            const end = dayjs().subtract(1,'day').format('YYYY-MM-DD 23:59:59')
-            return [start, end];
+            if (this.time[0]=='2023-06-01 12:00:00' && this.time[1] == '2023-06-20 16:00:00'){
+              const start = dayjs().subtract(1,'day').format('YYYY-MM-DD 00:00:00')
+              const end = dayjs().subtract(1,'day').format('YYYY-MM-DD 23:59:59')
+              return [start, end];
+            }else{
+              const start = dayjs(this.time[0]).subtract(1,'day').format('YYYY-MM-DD 00:00:00')
+              const end = dayjs(this.time[1]).subtract(1,'day').format('YYYY-MM-DD 23:59:59')
+              return [start, end];
+            }
           }
         },
 
         {
           text: '鍓�7澶�',
           value: () => {
-            const start = dayjs().subtract(7,'day').format('YYYY-MM-DD 00:00:00');
-            const end = dayjs().subtract(1,'day').format('YYYY-MM-DD 23:59:59');
+            if (this.time[0]=='2023-06-01 12:00:00' && this.time[1] == '2023-06-20 16:00:00'){
+              const start = dayjs().subtract(7,'day').format('YYYY-MM-DD 00:00:00');
+              const end = dayjs().subtract(1,'day').format('YYYY-MM-DD 23:59:59');
             return [start, end];
+            }else{
+              const start = dayjs(this.time[0]).subtract(7,'day').format('YYYY-MM-DD 00:00:00')
+              const end = dayjs(this.time[1]).subtract(7,'day').format('YYYY-MM-DD 23:59:59')
+              return [start, end];
+            }
+            
           }
         },
         {
           text: '涓婁竴鏈�',
           value: () => {
-            const start = dayjs().subtract(1,'month').startOf('month').format('YYYY-MM-DD HH:mm:ss');
-            const end = dayjs().subtract(1,'month').endOf('month').format('YYYY-MM-DD HH:mm:ss');
-            return [start, end];
+            if (this.time[0]=='2023-06-01 12:00:00' && this.time[1] == '2023-06-20 16:00:00'){
+              const start = dayjs().subtract(1,'month').startOf('month').format('YYYY-MM-DD HH:mm:ss');
+              const end = dayjs().subtract(1,'month').endOf('month').format('YYYY-MM-DD HH:mm:ss');
+              return [start, end];
+            }else{
+              const start = dayjs(this.time[0]).subtract(1,'month').format('YYYY-MM-DD HH:mm:ss')
+              const end = dayjs(this.time[1]).subtract(1,'month').format('YYYY-MM-DD HH:mm:ss')
+              return [start, end];
+            }
+            
           }
         }
       ];
+
     },
+
+
+
+
+
     initOneWeekAgoTime() {
       switch (this.timeType) {
         case 'day':
@@ -107,12 +170,18 @@
         case 'currentMonth':
         this.time[0] = dayjs().startOf('month').format('YYYY-MM-DD HH:mm:ss')
         this.time[1] = dayjs().subtract(1,'day').format('YYYY-MM-DD 23:59:59')
-        break  
+        // 闃叉鍦ㄦ瘡鏈堢殑1鍙凤紝鍑虹幇time[0]>time[1]鐨勬儏鍐�
+        if(this.time[0]<this.time[1]){
+          break  
+          }
         default:
           this.time[0] = dayjs().subtract(1, 'month').format('YYYY-MM-DD HH:mm:ss');
           this.time[1] = dayjs().format('YYYY-MM-DD HH:mm:ss');
       }
-    }
+    },
+    judgeDateValid(date) {
+          return time.judgeDateValid(date)
+        }
   }
 };
 </script>
@@ -129,10 +198,13 @@
       start-placeholder="寮�濮嬫椂闂�"
       end-placeholder="缁撴潫鏃堕棿"
       value-format="YYYY-MM-DD HH:mm:ss"
+      :disabled-date="judgeDateValid"
       @change="$emit('submitTime', time)"
       :default-time = "defaultTime"
-      
+      :readonly="readOnly"
     />
+      
+
   </div>
   </div>
 </template>
@@ -148,7 +220,5 @@
   font-size: 14px;
 }
 
-/* .pick-date {
-  width: 200px;
-} */
+
 </style>

--
Gitblit v1.9.3