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

no message

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