fix(测试跟踪): 修复测试评审的截止时间可以早于当前时间的问题
This commit is contained in:
parent
6cf026addc
commit
045f0fd180
|
@ -173,8 +173,9 @@ export default {
|
||||||
this.$warning(this.$t('test_track.plan.input_plan_name'));
|
this.$warning(this.$t('test_track.plan.input_plan_name'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (this.operationType === 'save') {
|
|
||||||
this.compareTime(new Date().getTime(), this.form.endTime);
|
if (!this.compareTime(new Date().getTime(), this.form.endTime)) {
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.operationType === 'edit') {
|
if (this.operationType === 'edit') {
|
||||||
|
@ -254,14 +255,17 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
endTimeChange(value) {
|
endTimeChange(value) {
|
||||||
this.form.endTime = this.form.endTime.getTime();
|
if (value) {
|
||||||
this.compareTime(new Date().getTime(), value.getTime());
|
this.form.endTime = this.form.endTime.getTime();
|
||||||
|
this.compareTime(new Date().getTime(), value.getTime());
|
||||||
|
}
|
||||||
},
|
},
|
||||||
compareTime(ts1, ts2) {
|
compareTime(ts1, ts2) {
|
||||||
if (ts1 > ts2) {
|
if (ts1 > ts2) {
|
||||||
this.form.endTime = '';
|
|
||||||
this.$warning("截止时间不能早于当前时间!");
|
this.$warning("截止时间不能早于当前时间!");
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue