Commit dd6d3359 authored by 高飞's avatar 高飞
parents 8de7ed17 7397d806
This diff is collapsed.
......@@ -265,7 +265,8 @@
</el-dialog>
<el-dialog title="大文件上传" :visible.sync="centerDialogVisible_bigFile" width="30%" center class="xzwd">
<BigfileUpload @Completed="completeUploadBigFile"></BigfileUpload>
<BigfileUpload :checkFileExist="checkFileExist" :addFileInfo="addFileInfo" @Finished="bigFileUploadFinished">
</BigfileUpload>
</el-dialog>
<el-dialog :title="title" :visible.sync="centerDialogVisible_video" center width="800px">
......@@ -636,7 +637,7 @@ export default {
}, 200)
},
bigFileUploadAdd() {
bigFileUploadAdd() {//弹出
if (this.clientDetails_type[0] == 1 || this.clientDetails_type[0] == 2 || this.clientDetails_type[0] == 3 || this.clientDetails_type[0] == 4) {
this.$message({
type: "warning",
......@@ -648,13 +649,11 @@ export default {
_this.centerDialogVisible_bigFile = true;
},
completeUploadBigFile(evt) {
if (!evt.success) {
this.$message({
type: "warning",
message: "上传失败!",
});
}
bigFileUploadFinished(evt) {//所有文件上传完成,不一定都成功
this.handleCurrentChange_lb(1);
},
addFileInfo(evt) {//文件信息的上传,在文件上传后执行
let fd = new FormData();
let fileInfo = {
createId: this.$store.getters.userInfo.account,
......@@ -668,17 +667,11 @@ export default {
fd.append("info", JSON.stringify(fileInfo));
fd.append("destFilename", evt.file.uuid);
fd.append("md5", evt.md5);
fileUpload_PUT("api/rest/3z/document/upload", fd).then((data) => {
this.$message({
type: "success",
message: "文件上传成功!",
});
this.centerDialogVisible_add = false;
this.handleCurrentChange_lb(1);
})
.catch((err) => {
this.$message.warning(err.message);
})
return fileUpload_PUT("api/rest/3z/document/upload", fd);
},
checkFileExist(md5) {
return get(`api/rest/3z/document/checkFileInfoExist?md5=${md5}&bucket=Document`);
},
//编辑弹出框确定
......
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