修复维保记录表格内容
This commit is contained in:
parent
e80586761e
commit
dd0d4b3301
@ -4,10 +4,14 @@
|
||||
<span style="color: #027db4;">飞行器维保记录</span>
|
||||
</div>
|
||||
<el-table :data="data" style="width: 100%">
|
||||
<el-table-column prop="manager" label="负责人" />
|
||||
<el-table-column prop="type" label="维保类型" />
|
||||
<el-table-column prop="remarks" label="备注" />
|
||||
<el-table-column prop="time" label="维保时间" width="180" />
|
||||
<el-table-column prop="updateBy" label="负责人" />
|
||||
<el-table-column prop="maintenanceType" label="维保类型">
|
||||
<template slot-scope="scope">
|
||||
{{ handleMaintenanceValueChange(scope.row.maintenanceType) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="remark" label="备注" />
|
||||
<el-table-column prop="updateTime" label="维保时间" width="180" />
|
||||
</el-table>
|
||||
<div class="pagination-container">
|
||||
<el-pagination
|
||||
@ -36,12 +40,27 @@ export default {
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 维护记录分页信息
|
||||
maintenanceValue: ''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleSizeChange(val) {
|
||||
this.$emit('size-change', val)
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.$emit('current-change', val)
|
||||
},
|
||||
handleMaintenanceValueChange(val) {
|
||||
// 当maintenanceType为0时,0-例行检查,1-电池损坏
|
||||
if (val === 0) {
|
||||
return '例行检查'
|
||||
} else if (val === 1) {
|
||||
return '电池损坏'
|
||||
}
|
||||
return ''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -126,7 +126,7 @@ export default {
|
||||
}
|
||||
const response = await getInsuranceRecords(params)
|
||||
this.insuranceData = response.records
|
||||
this.insurancePage.total = response.total
|
||||
this.insurancePage.total = Number(response.total)
|
||||
} catch (error) {
|
||||
console.error('Failed to load insurance records:', error)
|
||||
this.$message.error('获取保险记录失败')
|
||||
@ -141,7 +141,7 @@ export default {
|
||||
}
|
||||
const response = await getMaintenanceRecords(params)
|
||||
this.maintenanceData = response.records
|
||||
this.maintenancePage.total = response.total
|
||||
this.maintenancePage.total = Number(response.total)
|
||||
} catch (error) {
|
||||
console.error('Failed to load maintenance records:', error)
|
||||
this.$message.error('获取维护记录失败')
|
||||
|
Loading…
Reference in New Issue
Block a user