|
|
@ -195,6 +195,7 @@ export default { |
|
|
|
"articleDemandLoading", |
|
|
|
"artId", |
|
|
|
"xAxis", |
|
|
|
"articleDemandData", |
|
|
|
"articleDemandHeight", |
|
|
|
"showChar", |
|
|
|
"selectArticleDemandRow", |
|
|
@ -318,17 +319,27 @@ export default { |
|
|
|
this.$message({ type: "error", message: "请先查询数据" }); |
|
|
|
return false |
|
|
|
} |
|
|
|
let maplist = JSON.parse(JSON.stringify(this.articleDemandData)); |
|
|
|
maplist.Item.forEach(item => { |
|
|
|
item["AP_ArticleDemand-ArtId"] = item.key; |
|
|
|
delete item.index; |
|
|
|
delete item.show; |
|
|
|
delete item.key; |
|
|
|
delete item.Label; |
|
|
|
}); |
|
|
|
|
|
|
|
exportData(this.getTableDataJson()).then(({ data = [] }) => { |
|
|
|
exportData(JSON.stringify(maplist)).then(({ data = "" }) => { |
|
|
|
console.log('%cindex.vue line:332 data', 'color: #007acc;', data); |
|
|
|
let link = document.createElement('a'); |
|
|
|
link.style.display = 'none'; |
|
|
|
link.href = (process.env.VUE_APP_BASE_URL || "http://101.201.121.115:9003/") + data; |
|
|
|
dataInfo = data.splice("/") |
|
|
|
let dataInfo = data.split("/") |
|
|
|
console.log('%cindex.vue line:336 dataInfo', 'color: #007acc;', dataInfo); |
|
|
|
link.setAttribute('download', dataInfo[dataInfo.length - 1]); |
|
|
|
document.body.appendChild(link); |
|
|
|
link.click(); |
|
|
|
}).catch(() => { |
|
|
|
this.$message({ type: "error", message: "导出失败" }); |
|
|
|
}).catch((e) => { |
|
|
|
this.$message({ type: "error", message: "导出失败"+e }); |
|
|
|
}); |
|
|
|
}, |
|
|
|
// 刷新数据 |
|
|
@ -436,8 +447,9 @@ export default { |
|
|
|
}, |
|
|
|
// 设置选中行 |
|
|
|
setSelectRow(row) { |
|
|
|
this.SET_artId(row.artid) |
|
|
|
|
|
|
|
if (row.Label == "净生产量") { |
|
|
|
this.SET_artId(row.artid) |
|
|
|
this.setRowStatus(row.key); |
|
|
|
this.$emit("editTableData", row); |
|
|
|
} |
|
|
|