新增检测计划列表

This commit is contained in:
sjl
2024-10-29 11:17:04 +08:00
parent ff892d9e24
commit f9bb15ad24
12 changed files with 672 additions and 714 deletions

View File

@@ -43,10 +43,11 @@
class='triangle-button'
type='primary'
@click='prevPeriod'
@change="emitDateChange"
>
<div class='left_triangle'></div>
</el-button>
<el-button class='triangle-button' type='primary' @click='goToCurrent'>
<el-button class='triangle-button' type='primary' @click='goToCurrent' >
当前
</el-button>
<el-button
@@ -108,6 +109,7 @@ interface TimeUnit {
// 发出日期变化事件
const emitDateChange = () => {
emit('update-dates', startDate.value, endDate.value);
//console.log('emitDateChange', startDate.value, endDate.value);
};
// 在组件挂载时更新日期范围
@@ -228,6 +230,7 @@ interface TimeUnit {
endDateAdjusted.setHours(0, 0, 0, 0);
// 仅比较日期部分
isNextDisabled.value = endDateAdjusted >= maxDate;
emitDateChange(); // 变化时也发出更新事件
}
// 限制开始日期不能选择超过当前日期
@@ -241,10 +244,7 @@ interface TimeUnit {
return date > today.value || (start && date <= start);
}
defineExpose({
startDate,
endDate,
})
</script>