Commit 25e4fcf7 by liimin

refactor(ReceptionCenter): 重构失败记录列表映射逻辑,添加开始和结束时间字段

将变量名i改为更具描述性的record,并添加startTime和endTime字段到返回对象中,提高代码可读性和数据完整性
1 parent 8f642f8e
......@@ -280,14 +280,16 @@ export default {
},
getRecordFail () {
this.getRecordNum()
this.list[0] = this.recordFailList.map(i => {
this.list[0] = this.recordFailList.map(record => {
return {
result: i.result,
customerPhone: i.customerPhone,
customerType: i.customerType,
customerName: i.customerName || '未填写姓名',
carType: i.carType || '未选择车型',
duration: this.formatSeconds(new Date(i.endTime).getTime() - new Date(i.startTime).getTime()),
result: record.result,
customerPhone: record.customerPhone,
customerType: record.customerType,
customerName: record.customerName || '未填写姓名',
carType: record.carType || '未选择车型',
duration: this.formatSeconds(new Date(record.endTime).getTime() - new Date(record.startTime).getTime()),
startTime: record.startTime,
endTime: record.endTime
}
})
this.flag = true
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!