文件上传加头部参数

master
anthonywj 4 years ago
parent d01d1f43fd
commit 6f7e4ec2d2

@ -503,14 +503,14 @@ export const asyncRouterMap = [
authRule: ["thrsys/thrCorpsImport"]
}
},
{
path: "thrCorpsExport",
name: "往来单位导出",
component: thrCorpsExport,
meta: {
authRule: ["thrsys/thrCorpsExport"]
}
}
// {
// path: "thrCorpsExport",
// name: "往来单位导出",
// component: thrCorpsExport,
// meta: {
// authRule: ["thrsys/thrCorpsExport"]
// }
// }
],
},

@ -1,5 +1,6 @@
import {getStore, setStore} from "../../utils/store";
import * as types from "../mutation-types";
import store from "@/store";
const state = {
sidebar: {
@ -65,9 +66,11 @@ const mutations = {
}
};
export default {
state,
getters,
actions,
mutations
mutations,
};

@ -28,6 +28,7 @@
:action="uploadFileUrl"
multiple
:limit="3"
:headers="headers"
:show-file-list="false"
:on-success="handleChange"
:file-list="fileList"
@ -145,6 +146,7 @@ import {
import modifyDialog from "./BussinessTypeModify";
import axios from "axios";
import store from "@/store";
export default {
data() {
@ -197,6 +199,8 @@ export default {
total: 0,
multipleSelection: [],
uploadFileUrl: null,
headers: {},
};
},
@ -359,6 +363,10 @@ export default {
let response = res.data.BASE_URL;
this.uploadFileUrl = response + "/udiwms/busstiness/file/upload";
});
this.headers = {
ADMIN_ID: store.getters.adminId,
ADMIN_TOKEN: store.getters.token,
};
},
},
components: {

@ -36,10 +36,10 @@
:action="uploadFileUrl"
multiple
:limit="3"
:headers="headers"
:data="uploadData"
:show-file-list="false"
:on-success="handleChange"
:file-list="fileList"
>
<el-button size="mini" type="primary">导入往来单位</el-button>
@ -158,6 +158,7 @@
import thrCorpsImportDetail from "./ThrCorpsImportDetail";
import thrCorpSelect from "./ThrCorpSelect";
import axios from "axios";
import store from "@/store";
export default {
data() {
@ -174,6 +175,7 @@
thrCorpSelectVisible: false,
checked: false,
list: [],
headers: {},
detailList: [],
thirdSys: [],
thirdSysDetail: null,
@ -416,6 +418,10 @@
},
components: {thrCorpsImportDetail, thrCorpSelect},
created() {
this.headers = {
ADMIN_ID: store.getters.adminId,
ADMIN_TOKEN: store.getters.token,
};
this.getBasicThirdSys();
// this.getList();
},

@ -37,6 +37,7 @@
multiple
:limit="3"
:data="uploadData"
:headers="headers"
:show-file-list="false"
:on-success="handleChange"
:file-list="fileList"
@ -159,6 +160,7 @@
import thrProductsImportDetail from "./ThrProductsImportDetail";
import thrProductsSelect from "./ThrProductsSelect";
import axios from "axios";
import store from "@/store";
export default {
data() {
@ -171,6 +173,7 @@
limit: 20,
thirdSysFk: null,
},
headers:{},
udiImportDetailVisible: false,
thrProductsSelectVisible: false,
checked: false,
@ -396,6 +399,10 @@
},
components: {thrProductsImportDetail,thrProductsSelect},
created() {
this.headers = {
ADMIN_ID: store.getters.adminId,
ADMIN_TOKEN: store.getters.token,
};
this.getBasicThirdSys();
// this.getList();
},

Loading…
Cancel
Save