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

no message

上级 635ea64f
......@@ -114,9 +114,9 @@
}
return {
isSelectCartoon: false,
followResourceId: '',
pushDay: '',
remindDay: '',
// followResourceId: '',
// pushDay: '',
// remindDay: '',
timeFormRules: {
timeNo: [{ required: true, message: '请添加随访时间', trigger: 'change' },{ validator: checkDay, trigger: 'blur' }],
timeUnit: [{ required: true, message: '请添加随访时间', trigger: 'change' }],
......
......@@ -80,7 +80,7 @@
},
data() {
return {
// timeIsRepeat: false, //验证时间是否重复
timeIsRepeat: false, //验证时间是否重复
valBegin: false,
saveValiedBegin: false,
isSelectCartoon: false,
......@@ -194,8 +194,10 @@
this.valBegin = false
// 校验通过了
if (obj.valid) {
console.log(this.checkTimeIsRepeat())
if(this.checkTimeIsRepeat()){
this.checkTimeIsRepeat()
if(this.timeIsRepeat){
this.$notify.success({
title: '时间节点重复',
message: '时间节点重复',
......@@ -251,7 +253,8 @@ console.log(this.checkTimeIsRepeat())
// 点击 新增时间节点
addNewNode() {
console.log('是否新增一个新的时间节点 ' + (this.activeTab == 'setNewRef'))
if(this.checkTimeIsRepeat()){
this.checkTimeIsRepeat()
if(this.timeIsRepeat){
this.$notify.success({
title: '时间节点重复',
message: '时间节点重复',
......@@ -272,19 +275,14 @@ console.log(this.checkTimeIsRepeat())
},
// 验证是否重复
checkTimeIsRepeat(){
let flag;
this.timeIsRepeat = false;
if(this.setTimeNodeList.length > 0){
this.setTimeNodeList.forEach(item=>{
if(item.timeNo == this.timeForm.timeNo){
flag = true;
}else{
flag = false;
this.timeIsRepeat = true;
}
})
}else{
flag = false;
}
return flag;
},
// 初始化新的表单
initNewForm(){
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册