|
@@ -74,10 +74,20 @@ export default {
|
|
|
const { code, returnData } = await this.getQueryList(SERVICE_ID.bagDetailId, this.dataContent)
|
|
|
if (code == 0 && returnData && returnData.length) {
|
|
|
// this.messageList = [...returnData]
|
|
|
- this.messageList = returnData.map(message => ({
|
|
|
- ...message,
|
|
|
- readTime: message.readTime ? `${message.readTime.replace('T', ' ')}(广州)` : '(北京)'
|
|
|
- }))
|
|
|
+ const messageDatas = [...returnData]
|
|
|
+ messageDatas.map(item => {
|
|
|
+ const { dataObjectId } = item
|
|
|
+ const len = dataObjectId.length
|
|
|
+ const popNums = [206, 207, 208, 209, 210, 211, 212, 213].map(item => item.toString())
|
|
|
+ const target = dataObjectId.substr(len - 3, len)
|
|
|
+ const place = popNums.includes(target) ? '(广州)' : '(国航)'
|
|
|
+ item.readTime = item.readTime.replace('T', ' ') + place
|
|
|
+ })
|
|
|
+ this.messageList = messageDatas
|
|
|
+ // this.messageList = returnData.map(message => ({
|
|
|
+ // ...message,
|
|
|
+ // readTime: message.readTime ? `${message.readTime.replace('T', ' ')}(广州)` : '(北京)'
|
|
|
+ // }))
|
|
|
this.loading = false
|
|
|
} else {
|
|
|
this.loading = false
|