feat(equipment-maintenance): 增加上下文设备解析

This commit is contained in:
sophie committed 2026-07-06 15:20:24 +08:00
1 parent 76d5778c3b
commit 2566ce53e4
21 files changed
+512 -62

No files matched your search

@@ -439,34 +439,30 @@ onMounted(loadRecords);
</div>
<div class="min-h-0 overflow-auto rounded-xl border border-default bg-surface">
<table class="min-w-full text-left text-sm">
<table class="w-full table-fixed text-left text-sm">
<thead class="bg-muted/50 text-secondary">
<tr>
<th class="px-3 py-2">{{ t('maintenance.record.table.deviceCode') }}</th>
<th class="px-3 py-2">{{ t('maintenance.record.table.deviceName') }}</th>
<th class="px-3 py-2">{{ t('maintenance.record.table.modelSpec') }}</th>
<th class="w-[24%] px-3 py-2">{{ t('maintenance.record.table.deviceCode') }}</th>
<th class="w-[22%] px-3 py-2">{{ t('maintenance.record.table.deviceName') }}</th>
<th class="px-3 py-2">{{ t('maintenance.record.table.faultDescription') }}</th>
<th class="px-3 py-2">{{ t('maintenance.record.table.status') }}</th>
<th class="px-3 py-2">{{ t('maintenance.record.table.repairer') }}</th>
<th class="px-3 py-2">{{ t('maintenance.record.table.operation') }}</th>
<th class="w-[14%] px-3 py-2">{{ t('maintenance.record.table.status') }}</th>
<th class="w-[18%] px-3 py-2 text-right">{{ t('maintenance.record.table.operation') }}</th>
</tr>
</thead>
<tbody>
<tr v-if="loading">
<td colspan="7" class="px-3 py-8 text-center text-secondary">{{ t('maintenance.record.table.loading') }}</td>
<td colspan="5" class="px-3 py-8 text-center text-secondary">{{ t('maintenance.record.table.loading') }}</td>
</tr>
<tr v-else-if="!records.length">
<td colspan="7" class="px-3 py-8 text-center text-secondary">{{ t('maintenance.record.table.empty') }}</td>
<td colspan="5" class="px-3 py-8 text-center text-secondary">{{ t('maintenance.record.table.empty') }}</td>
</tr>
<tr v-for="record in records" v-else :key="record.id" class="border-t border-default">
<td class="px-3 py-2 font-semibold">{{ record.deviceCode }}</td>
<td class="px-3 py-2">{{ record.deviceName || '-' }}</td>
<td class="px-3 py-2">{{ record.modelSpec || '-' }}</td>
<td class="max-w-[260px] truncate px-3 py-2">{{ record.faultDescription }}</td>
<td class="truncate px-3 py-2 font-semibold" :title="record.deviceCode">{{ record.deviceCode }}</td>
<td class="truncate px-3 py-2" :title="record.deviceName || '-'">{{ record.deviceName || '-' }}</td>
<td class="truncate px-3 py-2" :title="record.faultDescription">{{ record.faultDescription }}</td>
<td class="px-3 py-2">{{ formatStatus(record.repairStatus) }}</td>
<td class="px-3 py-2">{{ record.repairer || '-' }}</td>
<td class="px-3 py-2">
<div class="flex gap-2">
<div class="flex justify-end gap-2">
<button type="button" class="admin-report-page-btn" @click="startEdit(record)">{{ t('maintenance.record.actions.edit') }}</button>
<button
type="button"