修复维保记录表格内容

This commit is contained in:
hr121 2025-08-10 17:47:21 +08:00
parent e80586761e
commit dd0d4b3301
2 changed files with 25 additions and 6 deletions

View File

@ -4,10 +4,14 @@
<span style="color: #027db4;">飞行器维保记录</span> <span style="color: #027db4;">飞行器维保记录</span>
</div> </div>
<el-table :data="data" style="width: 100%"> <el-table :data="data" style="width: 100%">
<el-table-column prop="manager" label="负责人" /> <el-table-column prop="updateBy" label="负责人" />
<el-table-column prop="type" label="维保类型" /> <el-table-column prop="maintenanceType" label="维保类型">
<el-table-column prop="remarks" label="备注" /> <template slot-scope="scope">
<el-table-column prop="time" label="维保时间" width="180" /> {{ handleMaintenanceValueChange(scope.row.maintenanceType) }}
</template>
</el-table-column>
<el-table-column prop="remark" label="备注" />
<el-table-column prop="updateTime" label="维保时间" width="180" />
</el-table> </el-table>
<div class="pagination-container"> <div class="pagination-container">
<el-pagination <el-pagination
@ -36,12 +40,27 @@ export default {
required: true required: true
} }
}, },
data() {
return {
//
maintenanceValue: ''
}
},
methods: { methods: {
handleSizeChange(val) { handleSizeChange(val) {
this.$emit('size-change', val) this.$emit('size-change', val)
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.$emit('current-change', val) this.$emit('current-change', val)
},
handleMaintenanceValueChange(val) {
// maintenanceType00-1-
if (val === 0) {
return '例行检查'
} else if (val === 1) {
return '电池损坏'
}
return ''
} }
} }
} }

View File

@ -126,7 +126,7 @@ export default {
} }
const response = await getInsuranceRecords(params) const response = await getInsuranceRecords(params)
this.insuranceData = response.records this.insuranceData = response.records
this.insurancePage.total = response.total this.insurancePage.total = Number(response.total)
} catch (error) { } catch (error) {
console.error('Failed to load insurance records:', error) console.error('Failed to load insurance records:', error)
this.$message.error('获取保险记录失败') this.$message.error('获取保险记录失败')
@ -141,7 +141,7 @@ export default {
} }
const response = await getMaintenanceRecords(params) const response = await getMaintenanceRecords(params)
this.maintenanceData = response.records this.maintenanceData = response.records
this.maintenancePage.total = response.total this.maintenancePage.total = Number(response.total)
} catch (error) { } catch (error) {
console.error('Failed to load maintenance records:', error) console.error('Failed to load maintenance records:', error)
this.$message.error('获取维护记录失败') this.$message.error('获取维护记录失败')