提交 65e946f0 authored 作者: 翟畅's avatar 翟畅

zc文本上传优化

上级 57d80261
......@@ -386,7 +386,6 @@ export default {
name:null,
otherName:null,
},
isFirstComplete:null,
domain: process.env.BASE_API,
requestPath: requestPath,
uploadPath: uploadPath,
......@@ -584,21 +583,12 @@ export default {
formData.append("file", this.$refs.file.files[0]);
projectImportExcelAPI(formData).then((res1) => {
if(res1.data.code == 0){
fileAnalysisAPI().then((res2) => {
if(res2.data.code == 0){
if(res2.data.status){
this.isFirstComplete = res2.data.status
this.$message.success('导入并解析成功');
this.confirmLoading = false
this.batchResForm.name = null
this.$refs.file.value = ''
this.uploadBatchResDialog = false
}
}else{
this.$message.error(res2.data.msg)
this.confirmLoading = false
}
})
this.$message.success('导入成功');
this.confirmLoading = false
this.batchResForm.name = null
this.$refs.file.value = ''
this.uploadBatchResDialog = false
fileAnalysisAPI().then((res2) => {})
}else{
this.$message.error(res1.data.msg)
this.confirmLoading = false
......@@ -614,11 +604,6 @@ export default {
this.confirmTxtLoading = false
return false
}
// if(!this.isFirstComplete){
// this.$message.warning('请先上传文本文件,并执行导入')
// this.confirmTxtLoading = false
// return false
// }
let formData = new FormData();
formData.append("file", this.$refs.fileOther.files[0]);
projectImportTextExcelAPI(formData).then((res) => {
......
......@@ -142,7 +142,6 @@ export default {
name:null,
otherName:null,
},
isFirstComplete:null,
}
},
methods: {
......@@ -195,21 +194,12 @@ export default {
formData.append("file", this.$refs.file.files[0]);
projectImportExcelAPI(formData).then((res1) => {
if(res1.data.code == 0){
fileAnalysisAPI().then((res2) => {
if(res2.data.code == 0){
if(res2.data.status){
this.isFirstComplete = res2.data.status
this.$message.success('导入并解析成功');
this.confirmLoading = false
this.batchResForm.name = null
this.$refs.file.value = ''
this.uploadBatchResDialog = false
}
}else{
this.$message.error(res2.data.msg)
this.confirmLoading = false
}
})
this.$message.success('导入成功');
this.confirmLoading = false
this.batchResForm.name = null
this.$refs.file.value = ''
this.uploadBatchResDialog = false
fileAnalysisAPI().then((res2) => {})
}else{
this.$message.error(res1.data.msg)
this.confirmLoading = false
......@@ -225,11 +215,6 @@ export default {
this.confirmTxtLoading = false
return false
}
// if(!this.isFirstComplete){
// this.$message.warning('请先上传文本文件,并执行导入')
// this.confirmTxtLoading = false
// return false
// }
let formData = new FormData();
formData.append("file", this.$refs.fileOther.files[0]);
projectImportTextExcelAPI(formData).then((res) => {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论