提交 ddb3a95e 编写于 作者: tao.wu's avatar tao.wu

no message

上级 fb2bbf36
......@@ -35,7 +35,7 @@
size="small"
placeholder="请输入"
:disabled="itemIsDisabled(itemTimeForm)"
@blur="timeNoBlur(itemTimeForm)"
@blur="timeNoBlur"
maxlength="2"
clearable />
</el-form-item>
......@@ -500,9 +500,11 @@
this.checkIsRepeat(timeNo);
},
// 检查是否重复
checkIsRepeat(val){
checkIsRepeat(val,lastIndex){
console.log(this.activeTab)
const inx = lastIndex ? lastIndex : this.activeTab;
for(let i=0;i<this.setTimeNodeList.length;i++){
if(this.activeTab!=i && val==this.setTimeNodeList[i].timeNo){
if(inx!=i && val==this.setTimeNodeList[i].timeNo){
this.isValied = false;
this.errMsg = '时间节点重复';
this.timeIsRepeat = true;
......@@ -510,7 +512,13 @@
message: this.errMsg,
type: 'error'
});
this.setTimeNodeList[this.activeTab].timeNo = '';
this.setTimeNodeList[inx].timeNo = '';
// if(lastIndex){
// this.setTimeNodeList[inx].timeNo = '';
// }else{
// this.setTimeNodeList[this.activeTab].timeNo = '';
// }
return;
}
this.isValied = true;
......@@ -534,9 +542,12 @@
},
// 时间失去焦点
timeNoBlur(itemTimeForm){
const lastIndex = this.activeTab;
console.log('blur之后=',this.activeTab)
const timeNo = this.setTimeNodeList[this.activeTab].timeNo;
setTimeout(()=>{
// 这里设置定时器是因为,如果填完时间,直接点击随访方式radio,会立即出发排序和重复事件
this.checkIsRepeat(itemTimeForm.timeNo);
this.checkIsRepeat(timeNo,lastIndex);
// // 新增成功之后
// this.setTimeNodeList = this.sortKey(this.setTimeNodeList,'timeNo');
},300)
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册