fix: 兼容接口返回格式

develop
时启龙 2024-10-18 11:22:14 +08:00
parent a95d702a8f
commit 90247e5565
1 changed files with 8 additions and 2 deletions

View File

@ -68,7 +68,13 @@ export default {
getItemList() {
getTaskList(this.params).then(data => {
if (data.success) {
this.tableList = data.data.data
this.tableList = data.data.data.map(item => {
item.task_name = item.taskName || item.task_name
item.approve_status = item.approveStatus || item.approve_status
item.create_name = item.createName || item.create_name
item.create_time = item.createTime || item.create_time
return item
})
this.total = data.data.total * 1
}
})
@ -81,7 +87,7 @@ export default {
},
goPage(row) {
if (!this.yunkongUrl) return this.$message.error('运控系统地址未配置, 请联系管理员查看 管理中心-系统配置-系统对接-运控系统地址 页面是否配置正确')
const url = row ? `${this.yunkongUrl}/taskManageFlow?taskCode=${row.task_code}&src=fromYW` : `${this.yunkongUrl}/faultRepairsList`
const url = row ? `${this.yunkongUrl}/taskManageFlow?taskCode=${row.taskCode || row.task_code}&src=fromYW` : `${this.yunkongUrl}/faultRepairsList`
console.log(url)
window.open(url, '_blank')
}