更新10.15

This commit is contained in:
许允枞 2024-10-15 15:27:01 +08:00
parent a63a74a8ec
commit 705b4980c6

View File

@ -158,7 +158,7 @@
</div> </div>
<div style="margin-right: 40px"> <div style="margin-right: 40px">
<el-date-picker <el-date-picker
v-model="value1" v-model="showValue"
type="daterange" type="daterange"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
range-separator="至" range-separator="至"
@ -230,7 +230,7 @@
</div> </div>
<div style="margin-right: 40px"> <div style="margin-right: 40px">
<el-date-picker <el-date-picker
v-model="value1" v-model="countValue"
type="daterange" type="daterange"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
range-separator="至" range-separator="至"
@ -293,6 +293,8 @@ export default {
}], }],
value: '', value: '',
value1: [], value1: [],
showValue:[],
countValue:[],
value2: [], value2: [],
imagePath: process.env.VUE_APP_SERVER_URL, imagePath: process.env.VUE_APP_SERVER_URL,
queryParams: {}, queryParams: {},
@ -359,19 +361,52 @@ export default {
start.setMinutes(0) start.setMinutes(0)
start.setSeconds(0) start.setSeconds(0)
start.setMilliseconds(0) start.setMilliseconds(0)
this.value1 = [start,new Date()]; if (index == "1"){
this.countValue = [start,new Date()]
}else if (index == "2") {
this.showValue = [start,new Date()]
}else if (index == "3") {
this.value2 = [start,new Date()]
}else if (index == "4") {
this.value1 = [start,new Date()];
}
} else if (command=='近一周'){ } else if (command=='近一周'){
let nowDate = new Date(); let nowDate = new Date();
let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000) let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000)
this.value1 = [parseTime(oneWeekAgo),parseTime(nowDate)] if (index == "1"){
this.countValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
}else if (index == "2") {
this.showValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
}else if (index == "3") {
this.value2 = [parseTime(oneWeekAgo),parseTime(nowDate)]
}else if (index == "4") {
this.value1 = [parseTime(oneWeekAgo),parseTime(nowDate)]
}
} else if (command=='近一月'){ } else if (command=='近一月'){
let nowDate = new Date(); let nowDate = new Date();
let oneWeekAgo = new Date(nowDate.getTime() - 30 * 24 * 60 * 60 * 1000) let oneWeekAgo = new Date(nowDate.getTime() - 30 * 24 * 60 * 60 * 1000)
this.value1 = [parseTime(oneWeekAgo),parseTime(nowDate)] if (index == "1"){
this.countValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
}else if (index == "2") {
this.showValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
}else if (index == "3") {
this.value2 = [parseTime(oneWeekAgo),parseTime(nowDate)]
}else if (index == "4") {
this.value1 = [parseTime(oneWeekAgo),parseTime(nowDate)]
}
} else if (command=='近一年'){ } else if (command=='近一年'){
let nowDate = new Date(); let nowDate = new Date();
let oneWeekAgo = new Date(nowDate.getFullYear() - 1, nowDate.getMonth(), nowDate.getDate()) let oneWeekAgo = new Date(nowDate.getFullYear() - 1, nowDate.getMonth(), nowDate.getDate())
this.value1 = [parseTime(oneWeekAgo),parseTime(nowDate)] this.value1 = [parseTime(oneWeekAgo),parseTime(nowDate)]
if (index == "1"){
this.countValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
}else if (index == "2") {
this.showValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
}else if (index == "3") {
this.value2 = [parseTime(oneWeekAgo),parseTime(nowDate)]
}else if (index == "4") {
this.value1 = [parseTime(oneWeekAgo),parseTime(nowDate)]
}
}else if (command=='自定义'){ }else if (command=='自定义'){
this.disabled = false this.disabled = false
} }