chore: lint

This commit is contained in:
skytek_xinliang
2026-06-22 17:35:23 +08:00
parent 11f309c54c
commit 6da57e1775
8 changed files with 355 additions and 68 deletions
@@ -27,9 +27,7 @@
<div>
<h1 class="text-h6 font-weight-black">{{ station.name }}</h1>
<span class="text-caption text-white-70"
> {{ currentStationIndex }} / 11 </span
>
<span class="text-caption text-white-70"> {{ currentStationIndex }} / 11 </span>
</div>
</div>
</v-card-item>
@@ -361,22 +359,22 @@ const formValues = reactive<Record<string, any>>({})
// 監聽 code 改變,初始化表單預設值
watch(
code,
(newCode) => {
newCode => {
if (stationsSpec[newCode]) {
// 優先從 store 中讀取已有的測量數據
const existing = store.measurements[newCode]
for (const field of stationsSpec[newCode].fields) {
formValues[field.key] =
existing && existing.completed && existing.values[field.key] !== undefined
formValues[field.key]
= existing && existing.completed && existing.values[field.key] !== undefined
? existing.values[field.key]
: field.defaultValue
}
}
},
{ immediate: true }
{ immediate: true },
)
function handleSave() {
function handleSave () {
// 將數據儲存到 store
store.saveMeasurement(code.value, { ...formValues })