|
@@ -74,15 +74,20 @@ const historyAlarmInfoFn = () => {
|
|
|
const showAlarmDialog = async () => {
|
|
|
dialogvisable.value = true
|
|
|
// 获取重要天气列表
|
|
|
- timeList.value = [moment().subtract(1, 'days').format('YYYY-MM-DD HH:mm:ss'), moment().format('YYYY-MM-DD HH:mm:ss')]
|
|
|
+ timeList.value = []
|
|
|
postSignificantWeatherFn()
|
|
|
|
|
|
}
|
|
|
const postSignificantWeatherFn = async () => {
|
|
|
- let res = await postSignificantWeather({
|
|
|
- start_time: timeList.value[0],
|
|
|
- end_time: timeList.value[1]
|
|
|
- })
|
|
|
+ let obj = {}
|
|
|
+ if(timeList.value.length>0){
|
|
|
+ obj.start_time = timeList.value[0]
|
|
|
+ obj.end_time = timeList.value[1]
|
|
|
+ }else{
|
|
|
+ obj.start_time = ''
|
|
|
+ obj.end_time = ''
|
|
|
+ }
|
|
|
+ let res = await postSignificantWeather(obj)
|
|
|
detailsList.value = res.data
|
|
|
}
|
|
|
onMounted(async () => {
|