|
|
@ -98,13 +98,7 @@
|
|
|
|
// 正则匹配文件名
|
|
|
|
// 正则匹配文件名
|
|
|
|
var fileName = dis.match(/filename="(.*\..*)"/)[1];
|
|
|
|
var fileName = dis.match(/filename="(.*\..*)"/)[1];
|
|
|
|
// 模拟下载
|
|
|
|
// 模拟下载
|
|
|
|
var url = window.URL.createObjectURL(new Blob([response.data]));
|
|
|
|
utils.downBlob(decodeURIComponent(fileName),new Blob([response.data]))
|
|
|
|
var link = document.createElement('a')
|
|
|
|
|
|
|
|
link.style.display = 'none';
|
|
|
|
|
|
|
|
link.href = url;
|
|
|
|
|
|
|
|
link.setAttribute('download', decodeURIComponent(fileName))
|
|
|
|
|
|
|
|
document.body.appendChild(link)
|
|
|
|
|
|
|
|
link.click();
|
|
|
|
|
|
|
|
return Promise.resolve({errors: []});
|
|
|
|
return Promise.resolve({errors: []});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}, function (error) {
|
|
|
|
}, function (error) {
|
|
|
@ -135,6 +129,8 @@
|
|
|
|
nav.e(rsp.errors[0].message)
|
|
|
|
nav.e(rsp.errors[0].message)
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
nav.barFinish();
|
|
|
|
nav.barFinish();
|
|
|
|
|
|
|
|
var bytes = utils.base64toBytes(rsp.base64);
|
|
|
|
|
|
|
|
utils.downBlob(rsp.name,new Blob([bytes]))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
reader.readAsText(response.data, "utf-8");
|
|
|
|
reader.readAsText(response.data, "utf-8");
|
|
|
@ -146,13 +142,7 @@
|
|
|
|
// 正则匹配文件名
|
|
|
|
// 正则匹配文件名
|
|
|
|
var fileName = dis.match(/filename="(.*\..*)"/)[1];
|
|
|
|
var fileName = dis.match(/filename="(.*\..*)"/)[1];
|
|
|
|
// 模拟下载
|
|
|
|
// 模拟下载
|
|
|
|
var url = window.URL.createObjectURL(new Blob([response.data]));
|
|
|
|
utils.downBlob(decodeURIComponent(fileName),new Blob([response.data]))
|
|
|
|
var link = document.createElement('a')
|
|
|
|
|
|
|
|
link.style.display = 'none';
|
|
|
|
|
|
|
|
link.href = url;
|
|
|
|
|
|
|
|
link.setAttribute('download', decodeURIComponent(fileName))
|
|
|
|
|
|
|
|
document.body.appendChild(link)
|
|
|
|
|
|
|
|
link.click();
|
|
|
|
|
|
|
|
return Promise.resolve({errors: []});
|
|
|
|
return Promise.resolve({errors: []});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}, function (response) {
|
|
|
|
}, function (response) {
|
|
|
@ -234,6 +224,7 @@
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
Vue.config.productionTip = false;
|
|
|
|
var mixin = {
|
|
|
|
var mixin = {
|
|
|
|
data: {
|
|
|
|
data: {
|
|
|
|
activeIndex: 'home',
|
|
|
|
activeIndex: 'home',
|
|
|
|