diff --git a/src/components/NoiseMonitorDetail.vue b/src/components/NoiseMonitorDetail.vue index 9e674b3..3e71251 100644 --- a/src/components/NoiseMonitorDetail.vue +++ b/src/components/NoiseMonitorDetail.vue @@ -72,15 +72,6 @@ 统计报告 - - - mdi-cog - - 自习配置 - @@ -370,14 +361,12 @@ - 校准({{ calibrateTarget }}dB) + 校准 @@ -772,177 +761,195 @@ - - - -
-
- - mdi-clock-edit-outline - - 晚自习时间段 - - - 添加时段 - -
- -
- 配置晚自习时间段后,系统会在对应时段内自动开启噪音监测并记录统计报告。时间段外不会长期记录。 -
- -
- - -
- - - - - - - - 至 {{ sessionEndTime(session) }} - - - -
-
-
-
- - - - -
- - mdi-alert-decagram - - 监测参数 -
- -
- - -
- - - -
- - 重置 - - - 保存配置 - -
-
-
+ + + + + + mdi-crosshairs-gps + + 分贝校准 + + + + + + + + + + +
+ 当前校准值 +
+
+
+ 基准分贝: + + {{ calibrationSettings.baselineDb }} dB + +
+
+ 基准 RMS: + + {{ calibrationSettings.baselineRms != null ? calibrationSettings.baselineRms.toFixed(6) : '未校准' }} + +
+
+ 最大分贝: + + {{ calibrationSettings.maxLevelDb }} dB + +
+
+
+
+ + +
+ + mdi-auto-fix + + 自动校准 +
+
+ 在已知环境分贝的场景下,输入当前环境的真实分贝值,点击开始后保持环境安静 3 秒。 +
+
+ + + 开始校准 + + + 需先开启监测 + + + {{ calibrateMessage }} + +
+ + + + +
+ + mdi-pencil-ruler + + 手动校准 / 参数调整 +
+
+ 直接输入校准参数。修改后点击保存生效。 +
+
+ + + +
+
+ + + + 恢复默认 + + + + 保存校准 + + +
+
+ diff --git a/src/components/TimeCard.vue b/src/components/TimeCard.vue index 02b04c5..4243cda 100644 --- a/src/components/TimeCard.vue +++ b/src/components/TimeCard.vue @@ -80,7 +80,6 @@ :last-slice="noiseLastSlice" :history="noiseHistory" :is-monitoring="noiseMonitoring" - :session-config="noiseSessionConfig" :session-active="noiseSessionActive" :session-data="noiseSessionData" :report-meta="noiseReportMeta" @@ -88,9 +87,7 @@ :date-reports="noiseCurrentDateReports" @start="startNoise" @stop="stopNoise" - @calibrate="calibrateNoise" @clear-history="clearNoiseHistory" - @save-config="onSaveSessionConfig" @select-date="onSelectReportDate" @clear-date-reports="onClearDateReports" @clear-all-reports="onClearAllReports" @@ -1200,11 +1197,6 @@ export default { this.noiseScore = null this.noiseScoreDetail = null }, - calibrateNoise(targetDb) { - noiseService.calibrate(targetDb, (success, msg) => { - console.log(success ? '校准成功' : `校准失败: ${msg}`) - }) - }, clearNoiseHistory() { noiseService.clearHistory() this.noiseHistory = [] @@ -1470,10 +1462,6 @@ export default { } return result }, - onSaveSessionConfig(config) { - this.noiseSessionConfig = config - this.saveNoiseSessionConfig() - }, async onSelectReportDate(dateStr) { await this.loadReportsForDate(dateStr) }, diff --git a/src/components/settings/cards/NoiseSettingsCard.vue b/src/components/settings/cards/NoiseSettingsCard.vue index 7bc37a9..a409a89 100644 --- a/src/components/settings/cards/NoiseSettingsCard.vue +++ b/src/components/settings/cards/NoiseSettingsCard.vue @@ -13,15 +13,272 @@ + + + + +
+
+ + mdi-clock-edit-outline + + 晚自习时间段 + + + 添加时段 + +
+ +
+ 配置晚自习时间段后,系统会在对应时段内自动开启噪音监测并记录统计报告。时间段外不会长期记录。 +
+ + + + + + + +
+ + mdi-alert-decagram + + 监测参数 +
+ +
+ +
+ +
+ + 重置 + + + 保存配置 + +
+
diff --git a/src/pages/settings.vue b/src/pages/settings.vue index 14ffbb5..67f3148 100644 --- a/src/pages/settings.vue +++ b/src/pages/settings.vue @@ -172,10 +172,10 @@ border @saved="onSettingsSaved" /> - + + + + @@ -420,6 +420,11 @@ export default { icon: "mdi-eye", value: "display", }, + { + title: "噪音监测", + icon: "mdi-microphone", + value: "noise", + }, { title: "通知铃声", icon: "mdi-bell-ring",