优化暂态事件列表

This commit is contained in:
guanj
2026-06-09 19:51:31 +08:00
parent 03d302ded8
commit bda7373133
48 changed files with 1834 additions and 1474 deletions

View File

@@ -1,25 +1,12 @@
<template>
<div style="width: 540px">
<el-select
v-model.trim="interval"
style="min-width: 90px; width: 90px; margin-right: 10px"
@change="timeChange"
>
<el-select v-model.trim="interval" style="min-width: 90px; width: 90px; margin-right: 10px"
@change="timeChange">
<el-option v-for="item in filteredTimeOptions" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
<el-date-picker
v-model.trim="timeValue"
type="daterange"
:disabled="disabledPicker"
style="width: 220px; margin-right: 10px"
unlink-panels
:clearable="false"
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="YYYY-MM-DD"
:shortcuts="shortcuts"
/>
<el-date-picker v-model.trim="timeValue" type="daterange" :disabled="disabledPicker"
style="width: 220px; margin-right: 10px" unlink-panels :clearable="false" range-separator=""
start-placeholder="开始日期" end-placeholder="结束日期" value-format="YYYY-MM-DD" :shortcuts="shortcuts" />
<el-button :disabled="backDisabled" type="primary" :icon="DArrowLeft" @click="preClick"></el-button>
<el-button type="primary" :icon="VideoPause" @click="nowTime">当前</el-button>
@@ -95,7 +82,12 @@ const shortcuts = [
// 计算过滤后的 timeOptions
const filteredTimeOptions = computed(() => {
console.log("🚀 ~ props.timeKeyList :", props.timeKeyList )
// console.log("🚀 ~ props.timeKeyList:", props.timeKeyList)
if (props.timeKeyList.length > 0 && !props.timeKeyList.includes(interval.value.toString())) {
interval.value = Number(props.timeKeyList[0])
}
if (!props.timeKeyList || props.timeKeyList.length === 0) {
return timeOptions.value
}
@@ -182,10 +174,10 @@ const timeChange = (e: number) => {
timeFlag.value = 1
}
nextTick(() => {
nextTick(() => {
// 检查按钮状态
checkInitialButtonStatus()
})
checkInitialButtonStatus()
})
// 触发 change 事件
emitChange()