diff --git a/stdiet-ui/src/components/FileUpload/DragUpload.vue b/stdiet-ui/src/components/FileUpload/DragUpload.vue
index cd1bb1cdd..46fedccf7 100644
--- a/stdiet-ui/src/components/FileUpload/DragUpload.vue
+++ b/stdiet-ui/src/components/FileUpload/DragUpload.vue
@@ -56,7 +56,7 @@ export default {
},
methods: {
uploadFile(){
- if(this.upload.fileList.length > 0 && this.uploadResult.fileUrl.length != this.upload.fileList.length){
+ if(this.upload.fileList.length > 0 && this.uploadResult.fileUrl.length < this.upload.fileList.length){
this.$refs.upload.submit();
}else{
this.$emit('callbackMethod', this.uploadResult);
@@ -106,19 +106,21 @@ export default {
}else{
this.upload.fileList = fileList.pop();
this.$message.error('文件上传失败,请检查文件格式');
+ this.$emit('changeSubmitFlag', false);
}
},
// 文件上传失败处理
handleFileFail(err, file, fileList){
this.$message.error('文件上传失败,请检查文件格式');
this.upload.fileList = fileList.pop();
+ this.$emit('changeSubmitFlag', false);
}
},
props: {
},
created() {
- this.uploadReset();
+ //this.uploadReset();
},
};
diff --git a/stdiet-ui/src/components/FileUpload/DragUploadEdit.vue b/stdiet-ui/src/components/FileUpload/DragUploadEdit.vue
index 439024c6a..eb69c4693 100644
--- a/stdiet-ui/src/components/FileUpload/DragUploadEdit.vue
+++ b/stdiet-ui/src/components/FileUpload/DragUploadEdit.vue
@@ -134,12 +134,14 @@ export default {
}else{
this.upload.fileList = fileList.pop();
this.$message.error('文件上传失败,请检查文件格式');
+ this.$emit('changeSubmitFlag', false);
}
},
// 文件上传失败处理
handleFileFail(err, file, fileList){
this.$message.error('文件上传失败,请检查文件格式');
this.upload.fileList = fileList.pop();
+ this.$emit('changeSubmitFlag', false);
}
},
props: {
@@ -153,6 +155,12 @@ export default {
created() {
},
+ watch : {
+ caseFileList:function(newVal, oldVal) {
+ //console.log(newVal.length);
+ this.oldCaseFileList = newVal;
+ }
+ }
};
diff --git a/stdiet-ui/src/views/custom/customerCase/index.vue b/stdiet-ui/src/views/custom/customerCase/index.vue
index 58c823493..a17314f58 100644
--- a/stdiet-ui/src/views/custom/customerCase/index.vue
+++ b/stdiet-ui/src/views/custom/customerCase/index.vue
@@ -170,8 +170,8 @@
选择所属客户
-
-
+
+
@@ -264,8 +264,8 @@
// 取消按钮
cancel() {
this.open = false;
- //this.$refs["uploadCaseFile"].uploadReset();
- //this.$refs["editUploadCaseFile"].uploadReset();
+ this.$refs["uploadCaseFile"].uploadReset();
+ this.$refs["editUploadCaseFile"].uploadReset();
this.reset();
},
// 表单重置
@@ -363,15 +363,18 @@
console.log(this.form.caseFileName.length);
updateCustomerCase(this.form).then(response => {
if (response.code === 200) {
+ this.$refs["editUploadCaseFile"].uploadReset();
this.msgSuccess("修改成功");
this.open = false;
this.getList();
}
this.submitFlag = false;
+
});
}else{
addCustomerCase(this.form).then(response => {
if (response.code === 200) {
+ this.$refs["uploadCaseFile"].uploadReset();
this.msgSuccess("新增成功");
this.open = false;
this.getList();
@@ -380,6 +383,9 @@
});
}
},
+ changeSubmitFlag(flag){
+ this.submitFlag = flag;
+ },
selectCustomer(){
this.$refs['selectCustomerRef'].showDialog("选择案例所属客户");
},
@@ -405,8 +411,8 @@
return delCustomerCase(ids);
}).then(() => {
this.getList();
- this.msgSuccess("删除成功");
- }).catch(function() {});
+ this.msgSuccess("删除成功");
+ }).catch(function() {});
},
/** 导出按钮操作 */
handleExport() {