下载方法修改不读config

prod
郑明梁 2 years ago
parent a99e5923ac
commit 16040a9dd6

@ -22,13 +22,14 @@
<el-divider style="margin: 15px"></el-divider> <el-divider style="margin: 15px"></el-divider>
<el-table v-loading="loading" :data="list" style="width: 100%" border highlight-current-row @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="list" style="width: 100%" border highlight-current-row
@selection-change="handleSelectionChange">
<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>
<el-table-column label="状态" prop="status" show-overflow-tooltip> <el-table-column label="状态" prop="status" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag :type="statusFilterType(scope.row.status)">{{ status[scope.row.status] }}</el-tag > <el-tag :type="statusFilterType(scope.row.status)">{{ status[scope.row.status] }}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="下载次数" prop="dlCount" show-overflow-tooltip></el-table-column> <el-table-column label="下载次数" prop="dlCount" show-overflow-tooltip></el-table-column>
@ -66,13 +67,15 @@
</template> </template>
<script> <script>
import {filterLog, deleteLog} from "@/api/basic/corpExport"; import {filterLog, deleteLog} from "@/api/basic/corpExport";
import corpSelect from "./corpSelect"; import corpSelect from "./corpSelect";
import axios from "axios"; import axios from "axios";
import {formatDate} from "@/utils/date"; import {formatDate} from "@/utils/date";
export default {
export default {
data() { data() {
return { return {
BASE_URL: process.env.VUE_APP_BASE_API,
showSearch: true, showSearch: true,
filterQuery: { filterQuery: {
genKey: null, genKey: null,
@ -152,10 +155,8 @@
this.corpImportDetailVisible = true; this.corpImportDetailVisible = true;
}, },
downloadExcel(row) { downloadExcel(row) {
axios.get("./config.json").then(res => { let baseUrl = this.BASE_URL
let baseUrl = res.data.BASE_URL; let href = baseUrl + "/udiwms/corps/exportLog/download" + "?genKey=" + row.genKey;
let href = baseUrl + "/udiwms/corps/exportLog/download" +
"?genKey=" + row.genKey;
console.log("href = " + href); console.log("href = " + href);
let a = document.createElement("a"); let a = document.createElement("a");
var timestamp = formatDate(new Date(), "yyyyMMddhhmmss") var timestamp = formatDate(new Date(), "yyyyMMddhhmmss")
@ -169,9 +170,6 @@
a.click(); a.click();
this.getList(); this.getList();
}); });
});
}, },
cancelDialog(val) { cancelDialog(val) {
@ -237,29 +235,29 @@
// this.getBasicThirdSys(); // this.getBasicThirdSys();
this.getList(); this.getList();
}, },
}; };
</script> </script>
<style scoped> <style scoped>
.itemTag { .itemTag {
float: left; float: left;
text-align: left; text-align: left;
margin-top: 10px; margin-top: 10px;
width: 100px; width: 100px;
} }
.text { .text {
font-size: 13px; font-size: 13px;
font-family: "Microsoft YaHei"; font-family: "Microsoft YaHei";
} }
.el-row { .el-row {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
} }
.el-col { .el-col {
border-radius: 4px; border-radius: 4px;
flex-wrap: wrap; flex-wrap: wrap;
} }
</style> </style>

@ -94,6 +94,7 @@ import corpImportDetail from "./corpImportDetail";
export default { export default {
data() { data() {
return { return {
BASE_URL: process.env.VUE_APP_BASE_API,
showSearch: true, showSearch: true,
filterQuery: { filterQuery: {
genKey: null, genKey: null,
@ -212,15 +213,9 @@ export default {
this.loading = false; this.loading = false;
this.list = []; this.list = [];
}); });
axios.get("./config.json").then(res => { let response = this.BASE_URL;
//
let response = res.data.BASE_URL;
this.uploadFileUrl = response + "/udiwms/corps/importLog/upload"; this.uploadFileUrl = response + "/udiwms/corps/importLog/upload";
});
axios.get("./config.json").then(res => {
let response = res.data.SERVER_IP;
this.templateDlUrl = response + "/已对照往来单位模板.xlsx"; this.templateDlUrl = response + "/已对照往来单位模板.xlsx";
});
}, },
jumpDl() { jumpDl() {
window.open(this.templateDlUrl, '_blank'); window.open(this.templateDlUrl, '_blank');

@ -86,6 +86,7 @@
export default { export default {
data() { data() {
return { return {
BASE_URL: process.env.VUE_APP_BASE_API,
showSearch: true, showSearch: true,
filterQuery: { filterQuery: {
genKey: null, genKey: null,
@ -212,14 +213,9 @@
this.loading = false; this.loading = false;
this.list = []; this.list = [];
}); });
axios.get("./config.json").then(res => { let response = this.BASE_URL;
let response = res.data.BASE_URL;
this.uploadFileUrl = response + "/udiwms/products/importLog/upload"; this.uploadFileUrl = response + "/udiwms/products/importLog/upload";
});
axios.get("./config.json").then(res => {
let response = res.data.SERVER_IP;
this.templateDlUrl = response + "/已对照产品信息模板.xlsx"; this.templateDlUrl = response + "/已对照产品信息模板.xlsx";
});
}, },
jumpDl() { jumpDl() {
window.open(this.templateDlUrl, '_blank'); window.open(this.templateDlUrl, '_blank');

@ -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>
@ -74,6 +75,7 @@ import {formatDate} from "@/utils/date";
export default { export default {
data() { data() {
return { return {
BASE_URL: process.env.VUE_APP_BASE_API,
showSearch: true, showSearch: true,
filterQuery: { filterQuery: {
type: 3, type: 3,
@ -129,8 +131,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,9 +159,7 @@ export default {
this.udiImportDetailVisible = true; this.udiImportDetailVisible = true;
}, },
downloadExcel(row) { downloadExcel(row) {
let baseUrl = this.BASE_URL
axios.get("./config.json").then(res => {
let baseUrl = res.data.BASE_URL;
let href = baseUrl + "/udiwms/products/exportLog/download" + "?genKey=" + row.genKey; 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")
@ -173,10 +173,6 @@ export default {
a.click(); a.click();
this.getList(); this.getList();
}); });
});
}, },
cancelDialog(val) { cancelDialog(val) {

@ -136,6 +136,7 @@ import {isBlank} from "@/utils/strUtil";
export default { export default {
data() { data() {
return { return {
BASE_URL: process.env.VUE_APP_BASE_API,
filterQuery: { filterQuery: {
thirdSys: null, thirdSys: null,
key: "", key: "",
@ -408,11 +409,8 @@ export default {
}, },
init() { init() {
axios.get("./config.json").then(res => { let response = this.BASE_URL;
//
let response = res.data.BASE_URL;
this.uploadFileUrl = response + "udiwms/busstiness/file/upload"; this.uploadFileUrl = response + "udiwms/busstiness/file/upload";
});
}, },
handleChange(response, files, fileList) { handleChange(response, files, fileList) {
if (response.code != 20000) { if (response.code != 20000) {

@ -71,6 +71,7 @@ import {formatDate} from "@/utils/date";
export default { export default {
data() { data() {
return { return {
BASE_URL: process.env.VUE_APP_BASE_API,
showSearch: true, showSearch: true,
filterQuery: { filterQuery: {
genKey: null, genKey: null,
@ -154,8 +155,7 @@ export default {
this.thrCorpSelectVisible = true; this.thrCorpSelectVisible = true;
}, },
downloadExcel(row) { downloadExcel(row) {
axios.get("./config.json").then(res => { let baseUrl = this.BASE_URL
let baseUrl = res.data.BASE_URL;
let href = baseUrl + "/udiwms/thrCorp/exportLog/download" + let href = baseUrl + "/udiwms/thrCorp/exportLog/download" +
"?genKey=" + row.genKey; "?genKey=" + row.genKey;
let a = document.createElement("a"); let a = document.createElement("a");
@ -170,7 +170,6 @@ export default {
a.click(); a.click();
this.getList(); this.getList();
}); });
});
}, },
cancelDialog(val) { cancelDialog(val) {

@ -68,6 +68,7 @@ import axios from "axios";
export default { export default {
data() { data() {
return { return {
BASE_URL: process.env.VUE_APP_BASE_API,
showSearch: true, showSearch: true,
filterQuery: { filterQuery: {
genKey: null, genKey: null,
@ -153,8 +154,7 @@ export default {
this.thrCorpSelectVisible = true; this.thrCorpSelectVisible = true;
}, },
downloadExcel(row) { downloadExcel(row) {
axios.get("./config.json").then(res => { let baseUrl = this.BASE_URL
let baseUrl = res.data.BASE_URL;
let href = baseUrl + "/udiwms/thrCorp/exportLog/download" + let href = baseUrl + "/udiwms/thrCorp/exportLog/download" +
"?genKey=" + row.genKey; "?genKey=" + row.genKey;
let a = document.createElement("a"); let a = document.createElement("a");
@ -171,7 +171,6 @@ export default {
a.click(); a.click();
this.getList(); this.getList();
}); });
});
}, },
cancelDialog(val) { cancelDialog(val) {

@ -126,6 +126,7 @@ import axios from "axios";
export default { export default {
data() { data() {
return { return {
BASE_URL: process.env.VUE_APP_BASE_API,
showSearch: true, showSearch: true,
filterQuery: { filterQuery: {
genKey: null, genKey: null,
@ -334,11 +335,8 @@ export default {
this.list = []; this.list = [];
}); });
this.uploadData.thirdSys = this.filterQuery.thirdSysFk; this.uploadData.thirdSys = this.filterQuery.thirdSysFk;
axios.get("./config.json").then(res => { let response = this.BASE_URL;
let response = res.data.SERVER_IP;
this.templateDlUrl = response + "/第三方往来单位信息导入模板.xlsx"; this.templateDlUrl = response + "/第三方往来单位信息导入模板.xlsx";
});
} }
, ,
downloadDatas() { downloadDatas() {

@ -108,6 +108,7 @@ import axios from "axios";
export default { export default {
data() { data() {
return { return {
BASE_URL: process.env.VUE_APP_BASE_API,
showSearch: true, showSearch: true,
filterQuery: { filterQuery: {
genKey: null, genKey: null,
@ -191,8 +192,7 @@ export default {
this.thrInvProductsSelectVisible = true; this.thrInvProductsSelectVisible = true;
}, },
downloadExcel(row) { downloadExcel(row) {
axios.get("./config.json").then(res => { let baseUrl = this.BASE_URL
let baseUrl = res.data.BASE_URL;
let href = baseUrl + "/udiwms/invProducts/exportLog/download" + "?genKey=" + row.genKey; let href = baseUrl + "/udiwms/invProducts/exportLog/download" + "?genKey=" + row.genKey;
let a = document.createElement("a"); let a = document.createElement("a");
fetch(href) fetch(href)
@ -208,10 +208,6 @@ export default {
a.click(); a.click();
this.getList(); this.getList();
}); });
});
}, },
cancelDialog(val) { cancelDialog(val) {

@ -176,6 +176,7 @@ import axios from "axios";
export default { export default {
data() { data() {
return { return {
BASE_URL: process.env.VUE_APP_BASE_API,
showSearch: true, showSearch: true,
filterQuery: { filterQuery: {
genKey: null, genKey: null,
@ -327,12 +328,9 @@ export default {
this.loading = false; this.loading = false;
this.list = []; this.list = [];
}); });
axios.get("./config.json").then(res => {
let response = res.data.SERVER_IP;
this.templateDlUrl = response + "/第三方库存产品信息导入模板.xlsx";
console.log(this.templateDlUrl);
}); let response = this.BASE_URL;
this.templateDlUrl = response + "/第三方库存产品信息导入模板.xlsx";
}, },
jumpDl() { jumpDl() {

@ -75,6 +75,7 @@ import {formatDate} from "@/utils/date";
export default { export default {
data() { data() {
return { return {
BASE_URL: process.env.VUE_APP_BASE_API,
showSearch: true, showSearch: true,
filterQuery: { filterQuery: {
type: 1, type: 1,
@ -158,8 +159,7 @@ export default {
this.thrOrderSelectVisible = true; this.thrOrderSelectVisible = true;
}, },
downloadExcel(row) { downloadExcel(row) {
axios.get("./config.json").then(res => { let baseUrl = this.BASE_URL
let baseUrl = res.data.BASE_URL;
let href = baseUrl + "/udiwms/thrOrder/exportLog/download" + "?genKey=" + row.genKey; let href = baseUrl + "/udiwms/thrOrder/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")
@ -173,7 +173,6 @@ export default {
a.click(); a.click();
this.getList(); this.getList();
}); });
});
}, },
cancelDialog(val) { cancelDialog(val) {

@ -129,6 +129,7 @@ import {selectIp} from "@/api/param/systemParamConfig";
export default { export default {
data() { data() {
return { return {
BASE_URL: process.env.VUE_APP_BASE_API,
showSearch: true, showSearch: true,
filterQuery: { filterQuery: {
genKey: null, genKey: null,
@ -278,14 +279,8 @@ export default {
this.loading = false; this.loading = false;
this.list = []; this.list = [];
}); });
axios.get("./config.json").then(res => { let response = this.BASE_URL;
// this.templateDlUrl = response + "/第三方业务单据导入模板.xlsx";
let response = res.data.BASE_URL;
// this.uploadFileUrl = response + "/udiwms/thrOrder/importLog/upload";
let response2 = res.data.SERVER_IP;
this.templateDlUrl = response2 + "/第三方业务单据导入模板.xlsx";
console.log(res.data.BASE_URL + "\n");
});
}, },
selectSysParam() { selectSysParam() {

@ -78,6 +78,7 @@ import {formatDate} from "../../../utils/date";
export default { export default {
data() { data() {
return { return {
BASE_URL: process.env.VUE_APP_BASE_API,
showSearch: true, showSearch: true,
filterQuery: { filterQuery: {
genKey: null, genKey: null,
@ -158,8 +159,7 @@ export default {
this.thrProductsSelectVisible = true; this.thrProductsSelectVisible = true;
}, },
downloadExcel(row) { downloadExcel(row) {
axios.get("./config.json").then(res => { let baseUrl = this.BASE_URL
let baseUrl = res.data.BASE_URL;
let href = baseUrl + "/udiwms/thrProducts/exportLog/download" + "?genKey=" + row.genKey; let href = baseUrl + "/udiwms/thrProducts/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")
@ -173,8 +173,6 @@ export default {
a.click(); a.click();
this.getList(); this.getList();
}); });
});
}, },
cancelDialog(val) { cancelDialog(val) {

@ -135,6 +135,7 @@ import axios from "axios";
export default { export default {
data() { data() {
return { return {
BASE_URL: process.env.VUE_APP_BASE_API,
showSearch: true, showSearch: true,
filterQuery: { filterQuery: {
genKey: null, genKey: null,
@ -296,13 +297,9 @@ export default {
this.loading = false; this.loading = false;
this.list = []; this.list = [];
}); });
axios.get("./config.json").then(res => {
let response = res.data.SERVER_IP;
this.templateDlUrl = response + "/第三方产品信息导入模板.xls";
console.log(this.templateDlUrl);
});
let response = this.BASE_URL;
this.templateDlUrl = response + "/第三方产品信息导入模板.xls";
}, },
selectSysParam() { selectSysParam() {
let query = { let query = {

Loading…
Cancel
Save