|
|
@@ -59,6 +59,7 @@ export default {
|
|
|
currentPage: 1,
|
|
|
pageSize: 20,
|
|
|
tableData: [],
|
|
|
+ onlineUrl:'http://8.136.230.133:8080'
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -153,30 +154,33 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
// 下载资料接口
|
|
|
- selectInformationAgentList: function (data) {
|
|
|
- return new Promise((resolve, reject) => {
|
|
|
- this.$http({
|
|
|
- url: '/dealerDownload',
|
|
|
- method: "post",
|
|
|
- data: data,
|
|
|
- // responseType: 'blob'
|
|
|
- })
|
|
|
- .then((res) => {
|
|
|
- console.log(res);
|
|
|
- resolve(res);
|
|
|
- let link = document.createElement("a");
|
|
|
- link.href = window.URL.createObjectURL(new Blob([res.data]));
|
|
|
- link.target = "_blank";
|
|
|
- //文件名和格式
|
|
|
- link.download = "文件模板.zip";
|
|
|
- document.body.appendChild(link);
|
|
|
- link.click();
|
|
|
- document.body.removeChild(link);
|
|
|
- })
|
|
|
- .catch((err) => {
|
|
|
- reject(err);
|
|
|
- });
|
|
|
- });
|
|
|
+ selectInformationAgentList: function (data) { console.log(data)
|
|
|
+ let url = this.onlineUrl+"/dealerDownload?informationId="+data.informationId
|
|
|
+ window.open(url)
|
|
|
+ // return new Promise((resolve, reject) => {
|
|
|
+ // this.$http({
|
|
|
+ // url: '/dealerDownload',
|
|
|
+ // method: "get",
|
|
|
+ // params: data,
|
|
|
+ // // responseType: 'blob'
|
|
|
+ // })
|
|
|
+ // .then((res) => {
|
|
|
+ // console.log(res);
|
|
|
+ // resolve(res);
|
|
|
+ // window.open(res.data)
|
|
|
+ // // let link = document.createElement("a");
|
|
|
+ // // link.href = window.URL.createObjectURL(new Blob([res.data]));
|
|
|
+ // // link.target = "_blank";
|
|
|
+ // // //文件名和格式
|
|
|
+ // // link.download = "文件模板.zip";
|
|
|
+ // // document.body.appendChild(link);
|
|
|
+ // // link.click();
|
|
|
+ // // document.body.removeChild(link);
|
|
|
+ // })
|
|
|
+ // .catch((err) => {
|
|
|
+ // reject(err);
|
|
|
+ // });
|
|
|
+ // });
|
|
|
},
|
|
|
// 删除记录接口
|
|
|
deleteInformationInfo: function (dataId) {
|