文档服务地址:http://47.92.0.57:3000/ 周报索引地址:http://47.92.0.57:3000/s/NruNXRYmV

Commit 3f0c3456 by 李景熙

Merge branch 'develop' of https://gitlab.redhtc.com/Berlincen/DA-Platform into develop

parents 74f5b919 208ae2fe
...@@ -365,7 +365,7 @@ ...@@ -365,7 +365,7 @@
let formData = new window.FormData(); let formData = new window.FormData();
formData.set("file",fileObj.file); formData.set("file",fileObj.file);
var file = formData.getAll("file"); var file = formData.getAll("file");
// console.log(file[0].name); console.log(file[0].size);
this.axios.post("/files/upload",formData,{ this.axios.post("/files/upload",formData,{
headers:{ headers:{
"Content-type":"multipart/form-data" "Content-type":"multipart/form-data"
...@@ -375,7 +375,7 @@ ...@@ -375,7 +375,7 @@
alert("文件上传失败,请重新上传"); alert("文件上传失败,请重新上传");
else{ else{
this.url = res.data; this.url = res.data;
this.dynamicValidateForm.domains[this.Index ].fileName.push({name:file[0].name,url:this.url}); this.dynamicValidateForm.domains[this.Index ].fileName.push({name:file[0].name,url:this.url,size:file[0].size});
} }
}) })
}, },
...@@ -392,7 +392,7 @@ ...@@ -392,7 +392,7 @@
alert("文件上传失败,请重新上传"); alert("文件上传失败,请重新上传");
else{ else{
this.url = res.data; this.url = res.data;
this.dynamicValidateForm.pictureDomains[this.Index ].fileName.push({name:file[0].name,url:this.url}); this.dynamicValidateForm.pictureDomains[this.Index ].fileName.push({name:file[0].name,url:this.url,size:file[0].size});
} }
}) })
}, },
...@@ -409,7 +409,7 @@ ...@@ -409,7 +409,7 @@
alert("文件上传失败,请重新上传"); alert("文件上传失败,请重新上传");
else{ else{
this.url = res.data; this.url = res.data;
this.dynamicValidateForm.layerDomains[this.Index ].fileName.push({name:file[0].name,url:this.url}); this.dynamicValidateForm.layerDomains[this.Index ].fileName.push({name:file[0].name,url:this.url,size:file[0].size});
} }
}) })
}, },
...@@ -450,15 +450,17 @@ ...@@ -450,15 +450,17 @@
} }
} }
} }
// this.axios({ this.axios({
// method:'post', method:'post',
// params:{ params:{
// url : url url : url
// }, },
// url:'/files/del', url:'/files/delFile',
// }).then(res=>{ }).then(res=>{
// if(res.data == 0){
// }) alert("文件删除失败");
}
})
}, },
handleRemoveP(file,fileList){ handleRemoveP(file,fileList){
var flag = 0; var flag = 0;
...@@ -473,15 +475,17 @@ ...@@ -473,15 +475,17 @@
} }
} }
} }
// this.axios({ this.axios({
// method:'post', method:'post',
// params:{ params:{
// url : url url : url
// }, },
// url:'/files/del', url:'/files/delFile',
// }).then(res=>{ }).then(res=>{
// if(res.data == 0){
// }) alert("文件删除失败");
}
})
}, },
handleRemoveL(file,fileList){ handleRemoveL(file,fileList){
var flag = 0; var flag = 0;
...@@ -496,15 +500,17 @@ ...@@ -496,15 +500,17 @@
} }
} }
} }
// this.axios({ this.axios({
// method:'post', method:'post',
// params:{ params:{
// url : url url : url
// }, },
// url:'/files/del', url:'/files/delFile',
// }).then(res=>{ }).then(res=>{
// if(res.data == 0){
// }) alert("文件删除失败");
}
})
}, },
submitForm(formName) { submitForm(formName) {
console.log(this.dynamicValidateForm); console.log(this.dynamicValidateForm);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment