1.修复字典导出失败的问题

ywj_dev
x_z 2 years ago
parent 043e7aed4b
commit 17504e1c1a

@ -22,7 +22,8 @@
<el-divider style="margin: 15px"></el-divider> <el-divider style="margin: 15px"></el-divider>
<el-table v-loading="loading" :data="list" style="width: 100%" @selection-change="handleSelectionChange" border highlight-current-row> <el-table v-loading="loading" :data="list" style="width: 100%" @selection-change="handleSelectionChange" border
highlight-current-row>
<el-table-column label="序号" type="index"></el-table-column> <el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="记录ID" prop="genKey" show-overflow-tooltip></el-table-column> <el-table-column label="记录ID" prop="genKey" show-overflow-tooltip></el-table-column>
<el-table-column label="更新日期" prop="updateTime" show-overflow-tooltip></el-table-column> <el-table-column label="更新日期" prop="updateTime" show-overflow-tooltip></el-table-column>
@ -129,8 +130,8 @@ export default {
hideSearch() { hideSearch() {
this.showSearch = !this.showSearch; this.showSearch = !this.showSearch;
}, },
Onsearch(){ Onsearch() {
this.filterQuery.page=1; this.filterQuery.page = 1;
this.getList(); this.getList();
}, },
getList() { getList() {
@ -157,13 +158,10 @@ export default {
this.udiImportDetailVisible = true; this.udiImportDetailVisible = true;
}, },
downloadExcel(row) { downloadExcel(row) {
let url = process.env.VUE_APP_BASE_API + "/udiwms/products/exportLog/download" + "?genKey=" + row.genKey;
axios.get("./config.json").then(res => {
let baseUrl = res.data.BASE_URL;
let href = baseUrl + "/udiwms/products/exportLog/download" + "?genKey=" + row.genKey;
let a = document.createElement("a"); let a = document.createElement("a");
var timestamp = formatDate(new Date(), "yyyyMMddhhmmss") var timestamp = formatDate(new Date(), "yyyyMMddhhmmss")
fetch(href) fetch(url)
.then((res) => res.blob()) .then((res) => res.blob())
.then((blob) => { .then((blob) => {
a.href = URL.createObjectURL(blob); a.href = URL.createObjectURL(blob);
@ -173,10 +171,6 @@ export default {
a.click(); a.click();
this.getList(); this.getList();
}); });
});
}, },
cancelDialog(val) { cancelDialog(val) {

Loading…
Cancel
Save