Commit caa24a0d authored by zhangderong's avatar zhangderong

邮箱提示

parent 5db078f9
Pipeline #62 failed with stages
......@@ -349,7 +349,7 @@
multiple
:before-upload='beforUpload'
action="//jsonplaceholder.typicode.com/posts/">
<Button size='small' style="margin:-40px 0 0 95px" type="primary">选择文件</Button>
<Button size='small' style="margin:-40px 0 0 95px" type="primary" @click="uploadFile">选择文件</Button>
</Upload>
</span>
</p>
......@@ -420,6 +420,7 @@ import ckeditor from '../../components/ckeditor'
Enclosure:[],//附件
templateContent:'',//模板内容
},
limentName:0,
emailMassage:false,
allEmailVilitor:false,
emailContent:'',
......@@ -1280,9 +1281,36 @@ import ckeditor from '../../components/ckeditor'
this.sad=this.emailInline.templateContent
})
},
uploadFile(){
this.uploadFileList=[]
this.limentName=0
console.log(66666666,this.uploadFileList)
},
beforUpload(uploadFile){
// this.uploadFileList=[]
console.log(uploadFile,67868687)
this.uploadFileList.push(uploadFile)
this.fileList.push(uploadFile.name)
let isLiment=false
if(uploadFile.size/1024 > 10240){
isLiment=true
this.limentName+=1
if(this.limentName==1){
this.$Notice.error({
title: '提示',
desc: '单个文件不能大于10M'
});}
}
console.log(this.limentName,555555555)
if(this.limentName==1){
// this.$Notice.error({
// title: '提示',
// desc: '单个文件不能大于10M'
// });
}else{
this.fileList.push(uploadFile.name)
}
// this.uploadFileList=[]
return false
},
// 发送全部内容
......@@ -1318,7 +1346,7 @@ import ckeditor from '../../components/ckeditor'
},
delateFile(index){
this.fileList.splice(index,1)
this.isLimitSize=false
// this.isLimitSize=false
},
// 确认发送邮件
confireSendEmail(){
......@@ -1359,18 +1387,18 @@ import ckeditor from '../../components/ckeditor'
});
return
}
this.uploadFileList.map(item=>{
if(item.size/1024 > 10240){
this.isLimitSize=true
}
})
if(this.isLimitSize==true){
this.$Notice.error({
title: '提示',
desc: '单个文件不能大于10M'
});
return
}
// this.uploadFileList.map(item=>{
// if(item.size/1024 > 10240){
// this.isLimitSize=true
// }
// })
// if(this.isLimitSize==true){
// this.$Notice.error({
// title: '提示',
// desc: '单个文件不能大于10M'
// });
// return
// }
if( this.emailContent==''){
this.$Notice.error({
title: '提示',
......
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