fix(接口定义): 修复csv无法预览的缺陷
--bug=1017827 --user=王孝刚 【接口测试】历史数据中的csv变量不能预览,可以正常执行 https://www.tapd.cn/55049933/s/1282485
This commit is contained in:
parent
c31736561c
commit
7475715356
|
@ -79,9 +79,10 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import MsCsvFileUpload from "./CsvFileUpload";
|
||||
import MsCsvFileUpload from "./CsvFileUpload";
|
||||
import axios from "axios";
|
||||
|
||||
export default {
|
||||
export default {
|
||||
name: "MsEditCsv",
|
||||
components: {
|
||||
MsCsvFileUpload
|
||||
|
@ -159,13 +160,8 @@
|
|||
// 远程下载文件
|
||||
if (this.editData.files && this.editData.files.length > 0 && !this.editData.files[0].file) {
|
||||
let file = this.editData.files[0];
|
||||
let conf = {
|
||||
url: "/api/automation/file/download",
|
||||
method: 'post',
|
||||
data: file,
|
||||
responseType: 'blob',
|
||||
};
|
||||
this.result = this.$request(conf).then(response => {
|
||||
let url = '/api/automation/file/download';
|
||||
this.result = axios.post(url, file , {responseType: 'blob'}).then(response => {
|
||||
const content = response.data;
|
||||
const blob = new Blob([content]);
|
||||
this.loading = true;
|
||||
|
|
Loading…
Reference in New Issue