ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

我的笔记

2020-12-15 15:03:22  阅读:195  来源: 互联网

标签:leaveDate form resetFields refs 笔记 ruleForm cond


//新开窗口下载
openwin(url) {
var a = document.createElement("a");
a.setAttribute("href", url);
a.setAttribute("target", "_blank");
a.setAttribute("id", "openwin");
document.body.appendChild(a);
a.click();
},

// 导出人员信息
exportInfo(){
let ids = this.selectedChangeData
const loading = this.$loading({
lock: true,
text: '拼命加载中',
spinner: 'el-icon-loading',
customClass: 'el-icon-loadings'
});
exportEmps(ids).then(res => {
let url = res.data.data
this.openwin(url)
}, this.err).finally(() => loading.close())
},


时间组件为空的一些判断
<el-date-picker v-model="cond.leaveDateReal"
value-format="yyyy-MM-dd" format="yyyy-MM-dd"
type="date" @change="changeDateTime"
placeholder="请选择实际离职日期">

</el-date-picker>
changeDateTime(value){
if (value == null) value = ''
},
this.cond.leaveDate == '1970-01-01'||this.cond.leaveDate== 'NaN-NaN-NaN'||this.cond.leaveDate== 'NaNNaNNaN'||!this.cond.leaveDate||this.cond.leaveDate==NaN||this.cond.leaveDate==null


this.$forceUpdate()
新增 清空校验
this.$nextTick(()=>{
// this.$refs[form].clearValidate();
this.$refs.form.resetFields();//等弹窗里的form表单的dom渲染完在执行this.$refs.staffForm.resetFields(),去除验证
});

修改时 清空校验显示数据
this.$nextTick(()=>{
// this.$refs[form].clearValidate();
this.$refs.form.resetFields();//等弹窗里的form表单的dom渲染完在执行this.$refs.staffForm.resetFields(),去除验证
});

this.$nextTick(()=>{
this.$refs.ruleForm.resetFields();
});
this.$nextTick(function(){
this.dialogVisible = true
this.Id = true
this.ruleForm.ID = r.tenantId
this.ruleForm.name = r.tenantName
this.ruleForm.imageUrl = r.logoUrl
let time1 = this.time(r.effectStartTime)
let time2 = null
if(r.effectEndTime){
time2 = this.time(r.effectEndTime)
}else{
time2 = ''
}
this.ruleForm.date1 = time1
this.ruleForm.date2 = time2
})
this.a this.a.b this.a.b='aaa'
this.$set(this.groupsTenan,?'group'+item,?res.data.data.list)

标签:leaveDate,form,resetFields,refs,笔记,ruleForm,cond
来源: https://www.cnblogs.com/dreammiao/p/14138620.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有