Commit 25e4fcf7 by liimin

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

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