fix:日志明细

This commit is contained in:
吉浩茹
2025-10-11 10:44:08 +08:00
parent 8b1a84f739
commit f88e21d934

View File

@ -846,8 +846,8 @@ export default {
return return
} }
if (numValue > 50) { if (numValue > 30) {
this.tempValidationMessage = '温度不能高于50°C' this.tempValidationMessage = '温度不能高于30°C'
this.tempValidationClass = 'error' this.tempValidationClass = 'error'
return return
} }
@ -865,16 +865,16 @@ export default {
// 提高目标温度 // 提高目标温度
increaseTemperature() { increaseTemperature() {
if (this.targetTemperature < 50) { if (this.targetTemperature < 30) {
const oldTemp = this.targetTemperature const oldTemp = this.targetTemperature
this.targetTemperature++ this.targetTemperature++
console.log('目标温度提高至:', this.targetTemperature + '°C') console.log('目标温度提高至:', this.targetTemperature + '°C')
this.showTemperatureChangeToast() this.showTemperatureChangeToast()
// 记录温度调节日志 // 记录温度调节日志
this.logTemperatureAdjustment('高', oldTemp, this.targetTemperature) this.logTemperatureAdjustment('高', oldTemp, this.targetTemperature)
} else { } else {
uni.showToast({ uni.showToast({
title: '温度不能高于50°C', title: '温度不能高于30°C',
icon: 'none' icon: 'none'
}) })
} }
@ -1156,7 +1156,7 @@ export default {
try { try {
const currentTime = this.formatDateTime(new Date()) const currentTime = this.formatDateTime(new Date())
const logEvent = { const logEvent = {
eventType: `空调目标温度${action}`, eventType: `空调目标温度${action}: ${oldTemp}°C -> ${newTemp}°C`,
eventTime: currentTime, eventTime: currentTime,
status: "已完成", status: "已完成",
description: `用户手动${action}空调目标温度,从${oldTemp}°C调整到${newTemp}°C当前环境温度${this.temperature}°C空调状态${this.acStatusList[this.acStatus]}`, description: `用户手动${action}空调目标温度,从${oldTemp}°C调整到${newTemp}°C当前环境温度${this.temperature}°C空调状态${this.acStatusList[this.acStatus]}`,
@ -1175,7 +1175,7 @@ export default {
try { try {
const currentTime = this.formatDateTime(new Date()) const currentTime = this.formatDateTime(new Date())
const logEvent = { const logEvent = {
eventType: `空调目标湿度${action}`, eventType: `空调目标湿度${oldHumidity}%${action}${newHumidity}%`,
eventTime: currentTime, eventTime: currentTime,
status: "已完成", status: "已完成",
description: `用户手动${action}空调目标湿度,从${oldHumidity}%调整到${newHumidity}%,当前环境湿度:${this.humidity}%,空调状态:${this.acStatusList[this.acStatus]}`, description: `用户手动${action}空调目标湿度,从${oldHumidity}%调整到${newHumidity}%,当前环境湿度:${this.humidity}%,空调状态:${this.acStatusList[this.acStatus]}`,
@ -1194,7 +1194,7 @@ export default {
try { try {
const currentTime = this.formatDateTime(new Date()) const currentTime = this.formatDateTime(new Date())
const logEvent = { const logEvent = {
eventType: "环境控制范围更新", eventType: `环境控制范围更新:温度范围${this.tempSettings.min}°C-${this.tempSettings.max}°C湿度范围${this.humiditySettings.min}%-${this.humiditySettings.max}%`,
eventTime: currentTime, eventTime: currentTime,
status: "已完成", status: "已完成",
description: `用户修改温湿度控制范围:温度范围${this.tempSettings.min}°C-${this.tempSettings.max}°C湿度范围${this.humiditySettings.min}%-${this.humiditySettings.max}%,当前环境温度:${this.temperature}°C当前环境湿度${this.humidity}%,空调状态:${this.acStatusList[this.acStatus]}`, description: `用户修改温湿度控制范围:温度范围${this.tempSettings.min}°C-${this.tempSettings.max}°C湿度范围${this.humiditySettings.min}%-${this.humiditySettings.max}%,当前环境温度:${this.temperature}°C当前环境湿度${this.humidity}%,空调状态:${this.acStatusList[this.acStatus]}`,