Commit a7d6a238 authored by youjie's avatar youjie

no message

parent 442333ca
<template>
<div>
<el-dialog title="批量上传附件" :visible.sync="isUploadAttachment" width="765px"
<el-dialog :title="saveUploadMsg.length>0?'批量上传附件/已传'+saveUploadMsg.length:'批量上传附件'"
:visible.sync="isUploadAttachment" width="780px"
:close-on-click-modal="false"
:show-close="true" @close="cancel">
......@@ -50,7 +51,8 @@ export default {
return {
saveUploadMsg: [],
loading: false,
isUploadAttachment: false
isUploadAttachment: false,
imgLength: 0
}
},
mounted() {
......@@ -80,6 +82,7 @@ export default {
}, err => {})
},
cancel() {
this.imgLength = 0
this.saveUploadMsg = []
this.isUploadAttachment = false
this.$emit('cancel')
......@@ -90,6 +93,7 @@ export default {
// return
// }
// 1 文档 2 数据 3 图片
if(file) this.imgLength++
let typeArr=[
{stringArr:'GIF|JPG|JPEG|PNG|BMP',type:3},
{stringArr:'DOCX|DOC|XLSX|XLS|PPT|PPTX|PDF',type:1},
......@@ -108,7 +112,7 @@ export default {
let newArr = [];
newArr.push(file.file)
let path = "/Upload/RegimentAttachment/"
// this.$message.info(this.$t('tips.shangchuanzhong'))
if(this.imgLength==1) this.$message.info(this.$t('tips.shangchuanzhong'))
this.UploadSelfFileT(path, newArr, x => {
let fileSize = file.file.size<1024? file.file.size:(file.file.size / 1024).toFixed(0);
let SourceFileName = x.data.SourceFileName.split('.')
......@@ -116,7 +120,8 @@ export default {
DMCOPCredentials: this.domainManager().ViittoFileUrl + x.data.FilePath,
TCID: SourceFileName[0]
})
this.$message.success(this.$t('tips.scchenggong'))
if(this.imgLength>0) this.imgLength--
if(!this.imgLength) this.$message.success(this.$t('tips.scchenggong'))
});
},
handleRemove(index) {
......
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