Commit caa24a0d authored by zhangderong's avatar zhangderong

邮箱提示

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