|
|
|
@ -1150,29 +1150,16 @@ export class FinishDialog{
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
startTime:string |
|
|
|
|
endTime:string |
|
|
|
|
startTime:string//考试开始时间
|
|
|
|
|
endTime:string//考试结束时间
|
|
|
|
|
examType:string//考试类型
|
|
|
|
|
|
|
|
|
|
date=null |
|
|
|
|
timeDefaultValue = setHours(new Date(), 0); |
|
|
|
|
disabledDateTime: DisabledTimeFn = () => { |
|
|
|
|
var second=[] |
|
|
|
|
for(var i=1;i<60;i++){ |
|
|
|
|
second.push(i) |
|
|
|
|
} |
|
|
|
|
return { |
|
|
|
|
nzDisabledHours: () => [], |
|
|
|
|
nzDisabledMinutes: () => [], |
|
|
|
|
nzDisabledSeconds: () => second |
|
|
|
|
}; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
//确定
|
|
|
|
|
//弹窗确定点击事件
|
|
|
|
|
onNoClick(): void { |
|
|
|
|
//this.dialogRef.close();
|
|
|
|
|
console.log(this.examType) |
|
|
|
|
const config = new MatSnackBarConfig(); |
|
|
|
|
config.verticalPosition = 'top'; |
|
|
|
|
config.duration = 3000 |
|
|
|
|
if(this.startTime!=undefined&&this.endTime!=undefined){ |
|
|
|
|
if(this.startTime!=undefined&&this.endTime!=undefined&&this.examType!=undefined){ |
|
|
|
|
if(this.startTime>this.endTime){ |
|
|
|
|
this.snackBar.open('开始时间不能大于结束时间','确定',config); |
|
|
|
|
} |
|
|
|
@ -1212,10 +1199,30 @@ export class FinishDialog{
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
else{ |
|
|
|
|
this.snackBar.open('请输入开始或结束时间','确定',config); |
|
|
|
|
if(this.startTime==undefined) |
|
|
|
|
this.snackBar.open('请输入开始时间','确定',config); |
|
|
|
|
else if(this.endTime==undefined) |
|
|
|
|
this.snackBar.open('请输入结束时间','确定',config); |
|
|
|
|
else if(this.examType==undefined) |
|
|
|
|
this.snackBar.open('请输入试卷类型','确定',config); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//ngzerro组件
|
|
|
|
|
timeDefaultValue = setHours(new Date(), 0); |
|
|
|
|
disabledDateTime: DisabledTimeFn = () => { |
|
|
|
|
var second=[] |
|
|
|
|
for(var i=1;i<60;i++){ |
|
|
|
|
second.push(i) |
|
|
|
|
} |
|
|
|
|
return { |
|
|
|
|
nzDisabledHours: () => [], |
|
|
|
|
nzDisabledMinutes: () => [], |
|
|
|
|
nzDisabledSeconds: () => second |
|
|
|
|
}; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
onChange(result: Date[]): void { |
|
|
|
|
console.log('onChange: ', result); |
|
|
|
|
} |
|
|
|
|