Commit c1419ed1 authored by zhangderong's avatar zhangderong

附件测试

parent 63ca5315
......@@ -116,7 +116,7 @@ export function uploadimage() {
// 发送邮件
export function sendEmail(parmars) {
return axios.post(`${sapi}/api/sendMail/sendEmailTemplate`,parmars,{headers: {
// 'Content-Type':'multipart/form-data',
'Content-Type':'multipart/form-data',
// 'Content-Disposition':'multipart/form-data'
// 'Content-Type':'application/json'
}})
......
......@@ -317,7 +317,7 @@
</p>
</div>
<div class="emailModalTitle-right" v-show="interviewIsShow==true">
<h3 style="text-align:center;margin-top:30px">请输入约面信息</h3>
<h3 style="text-align:center;margin-top:10px">请输入约面信息</h3>
<Form :label-width="75" ref="formInline" :rules="ruleInline" :model="formInline" style="margin-top:27px" label-position="left">
<FormItem label="邀约人" style="margin-top:20px" prop="UpdateOWER">
<Input v-model="formInline.UpdateOWER" style="width:100%" :maxlength="5"/>
......@@ -329,6 +329,7 @@
<Input v-model="formInline.UpdateVIEW" style="width:100%" :maxlength="5"/>
</FormItem>
</Form>
<Checkbox v-model="disabledSingle" style="margin-left:40px" @on-change='changenotice'><span style="margin-left:20px">微信通知面试官</span></Checkbox>
</div>
</div>
<div class="ckeditor">
......@@ -366,6 +367,7 @@ import qs from 'qs'
import {
sapi
} from '../../config'
import localStorage from '../../service/localstorage.service'
import Router from 'vue-router';
import ckeditor from '../../components/ckeditor'
// import ckeditor from '../../../static/ckeditor'
......@@ -420,8 +422,10 @@ import ckeditor from '../../components/ckeditor'
UpdateTIMETwo:'',
uploadFileList:[],
temp:'',
uploadurl:'192.168.28.10',
uploadurl:`${sapi}/api/ckeditor/uploadImage?token=${localStorage.get('token')}&&backUrl=/getimage`,
isShowAll:false,
isLimitSize:false,
disabledSingle:true,
emailId:'',
RescopyArr:[],
interelement:'1',
......@@ -829,6 +833,7 @@ import ckeditor from '../../components/ckeditor'
item.srcSite=item.srcSite
item.optSource=item.optSource
item.modifier=item.modifier
item.hasForward=item.hasForward
item.STATES=false
item.isShow=false
item.c=item.modifier==''?item.modifier:item.modifier.split('_')
......@@ -935,6 +940,7 @@ import ckeditor from '../../components/ckeditor'
item.ownerWorkYears=item.ownerWorkYears
item.modifyTime=item.modifyTime
item.srcSite=item.srcSite
item.hasForward=item.hasForward
item.optSource=item.optSource
item.STATES=false
item.isShow=false
......@@ -1268,6 +1274,7 @@ import ckeditor from '../../components/ckeditor'
this.formInline.UpdateVIEW=''
this.formInline.UpdateTIME=''
this.emailInline.copyname=''
this.uploadFileList=[]
this.SouSuo(this.pageT)
},
getEditorValue(value){
......@@ -1278,12 +1285,37 @@ import ckeditor from '../../components/ckeditor'
},
// 确认发送邮件
confireSendEmail(){
this.uploadFileList.map(item=>{
if(item.size/1024 > 10240){
console.log(item.size,67676767)
this.isLimitSize=true
}else{
this.isLimitSize=false
}
})
console.log(872343678,)
if(this.isLimitSize==true){
this.$Notice.error({
title: '提示',
desc: '单个文件不能大于10M'
});
// this.emailMOdal=false
// this.SouSuo(this.pageT)
// this.uploadFileList=[]
return
}
this.attachFileList=this.uploadFileList.length==0?'':this.uploadFileList
this.flowStatusTT=this.emailFlowStatus==''?'':'TO_SEE'
this.UpdateTIMETwo=this.formInline.UpdateTIME==''?'':this.formInline.UpdateTIME
if( this.temp=='TEMP_0001'){
var formData= new FormData()
formData.append('attachFileList',this.attachFileList)
if(this.attachFileList.length!==0){
this.attachFileList.map(item=>{
formData.append('attachFileList',item)
})
}else{
formData.append('attachFileList','')
}
formData.append('resumeId',this.emailId)
formData.append('templateCode',this.emailCode)
formData.append('subject',this.emailInline.theme)
......@@ -1296,10 +1328,7 @@ import ckeditor from '../../components/ckeditor'
formData.append('resumeInterviewVO.seeTime',moment( this.UpdateTIMETwo).format('YYYY/MM/DD HH:mm'))
formData.append(' flowStatus',this.flowStatusTT)
sendEmail(formData).then(res=>{
console.log(res,123456)
console.log(typeof(res.data.success,55555555))
if(res.data.success==true){
console.log(typeof(res.data.success,44444444))
this.$Notice.success({
title: '提示',
desc: '发送邮件成功'
......@@ -1308,7 +1337,6 @@ import ckeditor from '../../components/ckeditor'
this.SouSuo(this.pageT)
}
if(res.data.success==false){
console.log(typeof(res.data.success,6666666))
this.$Notice.error({
title: '提示',
desc: '发送邮件失败'
......@@ -1319,7 +1347,13 @@ import ckeditor from '../../components/ckeditor'
})
}else{
var formData= new FormData()
formData.append('attachFileList',this.attachFileList)
if(this.attachFileList.length!==0){
this.attachFileList.map(item=>{
formData.append('attachFileList',item)
})
}else{
formData.append('attachFileList','')
}
formData.append('resumeId',this.emailId)
formData.append('templateCode',this.emailCode)
formData.append('subject',this.emailInline.theme)
......@@ -1328,25 +1362,27 @@ import ckeditor from '../../components/ckeditor'
formData.append('emailContent',this.emailContent)
formData.append(' flowStatus',this.flowStatusTT)
sendEmail(formData).then(res=>{
console.log(res,123456)
console.log(typeof(res.data.success),8888888)
if(res.data.success==true){
this.$Notice.success({
title: '提示',
desc: '发送邮件成功'
})
this.emailModal=false
this.emailMOdal=false
this.SouSuo(this.pageT)
}
if(res.data.success==false){
console.log(typeof(res.data.success),88888)
this.$Notice.error({
title: '提示',
desc: '发送邮件失败'
});
this.emailModal=false
this.emailMOdal=false
this.SouSuo(this.pageT)
}
})
}
},
changenotice(a){
console.log(a,654321)
}
},
mounted(){
......
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