CN-1372 fix: 曲线图步长优化后,恢复默认时间范围为1小时;修复短时间范围时横坐标显示不友好的问题

This commit is contained in:
chenjinsong
2023-10-12 17:05:05 +08:00
parent 76c0c081e5
commit b44a99f354
3 changed files with 5 additions and 4 deletions

View File

@@ -283,10 +283,10 @@ export default {
const endTimeParam = query.endTime
// 若url携带了使用携带的值否则使用默认值。
const dateRangeValue = rangeParam ? parseInt(query.range) : 60 * 24
const dateRangeValue = rangeParam ? parseInt(query.range) : 60
const timeFilter = ref({ dateRangeValue })
if (!startTimeParam || !endTimeParam) {
const { startTime, endTime } = getNowTime(60 * 24)
const { startTime, endTime } = getNowTime(60)
timeFilter.value.startTime = getSecond(startTime)
timeFilter.value.endTime = getSecond(endTime)
// 如果没有时间参数就将参数写入url

View File

@@ -125,10 +125,10 @@ export default {
const endTimeParam = query.endTime
// 若url携带了使用携带的值否则使用默认值。
const dateRangeValue = rangeParam ? parseInt(query.range) : 60 * 24
const dateRangeValue = rangeParam ? parseInt(query.range) : 60
const timeFilter = ref({ dateRangeValue })
if (!startTimeParam || !endTimeParam) {
const { startTime, endTime } = getNowTime(60 * 24)
const { startTime, endTime } = getNowTime(60)
timeFilter.value.startTime = startTime
timeFilter.value.endTime = endTime
} else {

View File

@@ -185,6 +185,7 @@ export const stackedLineChartOption = {
{
type: 'time',
splitNumber: 8,
minInterval: 60000,
axisLabel: {
formatter: xAxisTimeFormatter,
rich: xAxisTimeRich