develop_cloud #1

Merged
dashixiong merged 234 commits from develop_cloud into main-cloud 2026-02-11 02:06:04 +00:00
107 changed files with 11862 additions and 30 deletions
Showing only changes of commit 408ba489ca - Show all commits

View File

@ -66,13 +66,13 @@ export default {
const nowStartTimes = new Date(this.dateRange[0]).getTime(),nowEndTimes = new Date(this.dateRange[1]).getTime(),maxTime = new Date(this.defaultDateRange[1]).getTime()
const nowDis = nowEndTimes - nowStartTimes//用户当前选择时间差 可能=0
//baseTime,maxTime 毫秒数
const baseDis = this.dataUnit === 3 ? 24 * 60 * 60 * 1000 :this.dataUnit === 2 ? 60 * 60 * 1000 : 60 * 1000
const baseDis = 24 * 60 * 60 * 1000
const calcDis = nowDis === 0 ? baseDis : nowDis
let start = type === 'before' ? nowStartTimes - calcDis : nowStartTimes + calcDis
start = Math.min(start,maxTime)
if(start>maxTime) start=maxTime
let end = type === 'before' ? nowEndTimes - calcDis : nowEndTimes + calcDis
end = Math.min(end,maxTime)
this.dateRange = [formatDate(start,this.dataUnit !== 3),formatDate(end,this.dataUnit !== 3)]
if(end>maxTime) end=maxTime
this.dateRange = [formatDate(start),formatDate(end)]
this.$emit('updateDate',this.dateRange)
},
}

View File

@ -101,12 +101,12 @@ export default {
const nowStartTimes = new Date(this.dateRange[0]).getTime(),nowEndTimes = new Date(this.dateRange[1]).getTime(),maxTime = new Date(this.defaultDateRange[1]).getTime()
const nowDis = nowEndTimes - nowStartTimes//用户当前选择时间差 可能=0
//baseTime,maxTime 毫秒数
const baseDis = this.dataUnit === 3 ? 24 * 60 * 60 * 1000 :this.dataUnit === 2 ? 60 * 60 * 1000 : 60 * 1000
const baseDis = this.dataUnit === 3 ? 24 * 60 * 60 * 1000 :60 * 60 * 1000
const calcDis = nowDis === 0 ? baseDis : nowDis
let start = type === 'before' ? nowStartTimes - calcDis : nowStartTimes + calcDis
start = Math.min(start,maxTime)
if(start>maxTime) start=maxTime
let end = type === 'before' ? nowEndTimes - calcDis : nowEndTimes + calcDis
end = Math.min(end,maxTime)
if(end>maxTime) end=maxTime
this.dateRange = [formatDate(start,this.dataUnit !== 3),formatDate(end,this.dataUnit !== 3)]
this.$emit('updateDate',this.dateRange)
},