Commit 047691c2 authored by FE-安焕焕's avatar FE-安焕焕 👣

样式

parent 5f06733b
......@@ -451,7 +451,7 @@ import {mapState} from 'vuex'
if (!value)this.$Notice.warning({title: '提示',desc: '请输入您要通知的面试官'})
callback()
}
const emailValidata = (rule, value, callback) => {
const emailValidata = (rule, value, callback) => {
let field = rule.field
let reg = rule.pattern
switch(field){
......@@ -2182,12 +2182,11 @@ background:rgba(241,241,241,1);
width: 2.5%;
}
input {
font-size: 15px !important;
cursor: pointer;
width: 1.5em;
height: 1.5em;
line-height: 1.5e;
vertical-align: -4px;
width: 1.2em;
height: 1.2em;
line-height: 1.2em;
vertical-align: -3px;
}
.transmit{
position: absolute;
......
......@@ -302,22 +302,22 @@
<div class="emailModal-title">
<div class="emailModalTitle-left">
<p>
<Form :label-width="70" :model="emailInline" label-position="left" style="margin-left:5%" ref="emailInline" :rules="ruleInline" class="emailForm">
<Form :label-width="70" :model="emailInline" label-position="left" style="margin-left:5%" ref="emailInline" :rules="emailruleInline" class="emailForm">
<FormItem label="选择模板" style="margin-top:20px" prop='moo'>
<Select style="width:95%" @on-change='getEmailContentValue' v-model="emailInline.moo" >
<Option v-for="(item,index) in emailInline.modalArr" :key="index" :value="item.templateCode">{{item.templateName}}</Option>
</Select><br>
<!-- <span v-show="emailMassage==true">你尚未选择简历,请先选择简历</span> -->
</FormItem>
<FormItem label="收件人" style="margin-top:20px" :show-massage='false'>
<Input style="width:95%" v-model="emailInline.receiveEmail" @on-blur='receiveEmail'/>
<span style="position: absolute;left:0;top:30px;color:gray;font-size:12px;">输入多个邮箱地址以英文”;“分隔</span>
<FormItem label="收件人" style="margin-top:20px" prop='receiveEmail'>
<Input style="width:95%" v-model="emailInline.receiveEmail" @on-focus='getfocus("emailInline","receiveEmail")'/>
<span style="position: absolute;left:0;top:30px;color:gray;font-size:12px;" v-show='!tip'>{{tipInfo}}</span>
</FormItem>
<FormItem label="抄送" style="margin-top:20px">
<Input style="width:95%" v-model="emailInline.copyname" @on-blur='copyname'/>
<FormItem label="抄送" style="margin-top:20px" prop='copyname'>
<Input style="width:95%" v-model="emailInline.copyname" @on-focus='getfocus("emailInline","copyname")'/>
</FormItem>
<FormItem label="主题" style="margin-top:20px">
<Input style="width:95%" v-model="emailInline.theme" @on-blur='theme'/>
<FormItem label="主题" style="margin-top:20px" prop='theme'>
<Input style="width:95%" v-model="emailInline.theme" @on-focus='getfocus("emailInline","theme")'/>
</FormItem>
</Form>
</p>
......@@ -326,13 +326,13 @@
<h3 style="text-align:center;margin-top:20px">请输入约面信息</h3>
<Form :label-width="85" ref="formInline" :rules="ruleInline" :model="formInline" style="margin-top:35px" label-position="left" class="emailForm">
<FormItem label="邀约人" style="margin-top:20px" prop="UpdateOWER">
<Input v-model="formInline.UpdateOWER" style="width:100%" :maxlength="5" @on-blur='UpdateOWER'/>
<Input v-model="formInline.UpdateOWER" style="width:100%" :maxlength="5" @on-focus='getfocus("formInline", "UpdateOWER")'/>
</FormItem>
<FormItem label="面试时间" style="margin-top:20px" prop="UpdateTIME">
<DatePicker type="datetime" style="width:100%" v-model="formInline.UpdateTIME" format="yyyy-MM-dd HH:mm" @on-change="changeTime" :options="options3" :editable='false' @on-blur='UpdateTIME'></DatePicker>
<DatePicker type="datetime" style="width:100%" v-model="formInline.UpdateTIME" format="yyyy-MM-dd HH:mm" @on-change="changeTime" :options="options3" :editable='false' @on-open-change='getfocus("formInline", "UpdateTIME")'></DatePicker>
</FormItem>
<FormItem label="面试官" style="margin-top:20px" prop='UpdateVIEW'>
<Input v-model="formInline.UpdateVIEW" style="width:100%" :maxlength="5" @on-blur='UpdateVIEW'/>
<Input v-model="formInline.UpdateVIEW" style="width:100%" :maxlength="5" @on-focus='getfocus("formInline", "UpdateVIEW")'/>
</FormItem>
</Form>
</div>
......@@ -359,8 +359,8 @@
</div>
<div slot='footer' style="text-align:center;position: relative;" class="Ubt">
<Button type='primary' @click='emailModalPush'>取消</Button>
<Button type='primary' @click='modal10=true' v-show="this.isShowAll==false" :disabled="!isDisable">发送</Button>
<Button type='primary' @click='modal10=true' v-show="this.isShowAll==true" :disabled="!isDisable">添加并发送</Button>
<Button type='primary' @click='submit' v-show="this.isShowAll==false">发送</Button>
<Button type='primary' @click='submit' v-show="this.isShowAll==true">添加并发送</Button>
<Checkbox v-model="formInline.sendWeixin" class='wechat'><span>微信通知面试官</span></Checkbox>
</div>
</Modal>
......@@ -425,6 +425,7 @@ import {mapState} from 'vuex'
import localStorage from '../../service/localstorage.service'
export default {
data(){
const emailRule = /^((([a-z0-9_\.-]+)@([\da-z\.-]+)\.([a-z\.]{2,6}\;))*(([a-z0-9_\.-]+)@([\da-z\.-]+)\.([a-z\.]{2,6})))$/
const validator = (rule, value, callback) => {
if (!value)this.$Notice.warning({title: '提示',desc: '请输入您要通知的面试官'})
callback()
......@@ -440,18 +441,96 @@ export default {
callback ()
}
}
const emailValidata = (rule, value, callback) => {
let field = rule.field
let reg = rule.pattern
switch(field){
case 'receiveEmail':
if (!value) {
this.tip = true
this.isDisable=false
callback(new Error('收件人不能为空'))
}
else if (rule.pattern&&!rule.pattern.test(value)) {
this.tip = true
this.isDisable=false
callback(new Error('请输入正确收件人地址'))
}else {
this.tip = false
this.isDisable=true
callback()
}
break;
case 'theme':
if (!value) {
this.isDisable=false
callback(new Error('主题能为空'))
} else {
this.isDisable=true
callback()
}
break;
case 'copyname':
if (value&&reg&&!reg.test(value)) {
this.isDisable=false
callback(new Error('请输入正确抄送地址'))
} else {
this.isDisable=true
callback()
}
break;
case 'UpdateOWER':
if (!value) {
this.isDisable=false
callback(new Error('邀约人不能为空'))
} else {
this.isDisable=true
callback()
}
break;
case 'UpdateTIME':
if (!value) {
this.isDisable=false
callback(new Error('面试时间不能为空'))
} else {
this.isDisable=true
callback()
}
break;
case 'UpdateVIEW':
if (!value) {
this.isDisable=false
callback(new Error('面试官不能为空'))
} else {
this.isDisable=true
callback()
}
break;
default:
callback()
break;
}
}
return {
interviewee: [],
tip: false,
tipInfo: '输入多个邮箱地址以英文”;“分隔',
ruleInline: {
UpdateOWER: [
{ required: true, message: '邀约人不能为空', trigger: 'blur' }
],
UpdateTIME: [
{ required: true, message: '面试时间不能为空', trigger: 'date' }
],
UpdateVIEW: [
{ required: true,message: '面试官不能为空', trigger: 'blur' }
]
UpdateOWER: [
{ required: true, message: '邀约人不能为空', trigger: 'blur', validator: emailValidata}
],
UpdateTIME: [
{ required: true, message: '面试时间不能为空', trigger: 'change', type:'date', validator: emailValidata}
],
UpdateVIEW: [
{ required: true,message: '面试官不能为空', trigger: 'blur', validator: emailValidata}
]
},
emailruleInline: {
receiveEmail: [{required: true, trigger: 'blur', pattern: emailRule, validator: emailValidata}],
theme: [{required: true, trigger: 'blur',message: '主题不能为空', validator: emailValidata}],
copyname: [{required: false, trigger: 'blur', pattern: emailRule, validator: emailValidata, empty: true}]
},
formInline:{
UpdateOWER:'',
......@@ -1276,6 +1355,8 @@ export default {
return
}
this.emailInline.modalArr=[]
this.$refs.emailInline.resetFields()
this.$refs.formInline.resetFields()
this.emailMOdal=true
getEmailMoo().then(res=>{
this.emailInline.modalArr=res.data.body
......@@ -1772,7 +1853,6 @@ export default {
return
}
})
console.log(this.interviewee)
if (!flag) {
this.interviewee.push(data)
}
......@@ -1785,6 +1865,46 @@ export default {
this.ajaxData.map(item => {
item.STATES = false
})
},
getfocus(form, name){
let vm = this;
let value = this[form][name]
if(name == 'receiveEmail') {
this.tip&&this.$refs[form].fields.forEach(function (e) {
if (e.prop == name) {
e.resetField()
vm[form][name] = value
vm.tip = false
}
})
} else {
this.$refs[form].fields.forEach(function (e) {
if (e.prop == name) {
e.resetField()
vm[form][name] = value
}
})
}
},
submit() {
console.log('++++')
let flag = false
this.$refs.emailInline.validate(val => {
if (!val) {
flag = true
return
}
})
this.$refs.formInline.validate(val => {
if (!val) {
flag = true
return
}
})
if (!flag){
this.modal10=true
}
}
},
watch: {
......@@ -1854,7 +1974,7 @@ export default {
}
},
deep: true
},
}
},
mounted(){
......@@ -2069,11 +2189,10 @@ select{
}
input {
cursor: pointer;
font-size: 15px !important;
cursor: pointer;
width: 1.5em;
height: 1.5em;
line-height: 1.5em;
width: 1.2em;
height: 1.2em;
line-height: 1.2em;
vertical-align: -4px;
}
.transmit{
......
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