fix(接口定义): 修复csv无法预览的缺陷

--bug=1017827 --user=王孝刚 【接口测试】历史数据中的csv变量不能预览,可以正常执行
https://www.tapd.cn/55049933/s/1282485
This commit is contained in:
wxg0103 2022-10-28 17:18:04 +08:00 committed by wxg0103
parent c31736561c
commit 7475715356
1 changed files with 5 additions and 9 deletions

View File

@ -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;