From 551e8f6756abbb1277566dd1225a14422c774d6f Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期四, 26 十二月 2024 14:33:08 +0800
Subject: [PATCH] 完成标准物质领用迁移
---
src/components/view/b4-site-hours-statistics.vue | 13 +++++--------
1 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/src/components/view/b4-site-hours-statistics.vue b/src/components/view/b4-site-hours-statistics.vue
index f14c36f..87f2526 100644
--- a/src/components/view/b4-site-hours-statistics.vue
+++ b/src/components/view/b4-site-hours-statistics.vue
@@ -247,12 +247,8 @@
}
},
mounted(){
- const year = new Date().getFullYear();
- const month = new Date().getMonth();
- // 璁剧疆璧峰鏃ユ湡鍜岀粨鏉熸棩鏈�
- this.startTime = new Date(year, month, 1).toISOString().slice(0, 10); // 鏈堝垵
- this.endTime = new Date(year, month + 1, 0).toISOString().slice(0, 10); // 鏈堟湯
- this.init()
+ this.month = new Date()
+ this.changeTime()
},
methods:{
init(){
@@ -298,9 +294,10 @@
changeTime(){
const year = new Date(this.month).getFullYear();
const month = new Date(this.month).getMonth();
+ const day = new Date(year, month + 1, 0).getDate(); //
// 璁剧疆璧峰鏃ユ湡鍜岀粨鏉熸棩鏈�
- this.startTime = new Date(year, month, 1).toISOString().slice(0, 10); // 鏈堝垵
- this.endTime = new Date(year, month + 1, 0).toISOString().slice(0, 10); // 鏈堟湯
+ this.startTime = `${year}-${month + 1}-01`
+ this.endTime = `${year}-${month + 1}-${day}` // 鏈堟湯
this.siteList.forEach(item=>{
item.page.current = 1
})
--
Gitblit v1.9.3