Browse Source

[修改]完成弹窗试卷类型不能为空

master
chenjingyu 4 years ago
parent
commit
f5e31aaf85
  1. 44
      src/app/examiner/create-test-score/create-test-score.component.ts
  2. 4
      src/app/examiner/create-test-score/finishDialog.html
  3. 2
      src/app/examiner/examiner-index/examiner-index.component.html
  4. 3
      src/app/examiner/examiner-index/examiner-index.component.scss
  5. 10
      src/app/examiner/examiner-new-one/examiner-new-one.component.scss

44
src/app/examiner/create-test-score/create-test-score.component.ts

@ -1121,26 +1121,16 @@ export class FinishDialog{
ngOnInit(): void { ngOnInit(): void {
} }
startTime:string startTime:string//考试开始时间
endTime: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 { onNoClick(): void {
//this.dialogRef.close(); //this.dialogRef.close();
console.log(this.examType)
const config = new MatSnackBarConfig(); const config = new MatSnackBarConfig();
if(this.startTime!=undefined&&this.endTime!=undefined){ if(this.startTime!=undefined&&this.endTime!=undefined&&this.examType!=undefined){
if(this.startTime>this.endTime){ if(this.startTime>this.endTime){
this.snackBar.open('开始时间不能大于结束时间','确定',config); this.snackBar.open('开始时间不能大于结束时间','确定',config);
} }
@ -1165,10 +1155,30 @@ export class FinishDialog{
} }
} }
else{ 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 { onChange(result: Date[]): void {
console.log('onChange: ', result); console.log('onChange: ', result);
} }

4
src/app/examiner/create-test-score/finishDialog.html

@ -4,12 +4,12 @@
* @Author: sueRimn * @Author: sueRimn
* @Date: 2020-12-13 10:57:48 * @Date: 2020-12-13 10:57:48
* @LastEditors: sueRimn * @LastEditors: sueRimn
* @LastEditTime: 2020-12-14 10:23:32 * @LastEditTime: 2020-12-14 14:08:52
--> -->
<div class="box"> <div class="box">
<div class="diaone"> <div class="diaone">
<div><label>请填写试卷类型:</label></div> <div><label>请填写试卷类型:</label></div>
<div><input placeholder="请填写"></div> <div><input placeholder="请填写" [(ngModel)]="examType"></div>
</div> </div>
<div class="diatwo"> <div class="diatwo">
<div class="starttime"> <div class="starttime">

2
src/app/examiner/examiner-index/examiner-index.component.html

@ -4,7 +4,7 @@
* @Author: sueRimn * @Author: sueRimn
* @Date: 2020-12-11 09:06:03 * @Date: 2020-12-11 09:06:03
* @LastEditors: sueRimn * @LastEditors: sueRimn
* @LastEditTime: 2020-12-11 16:47:41 * @LastEditTime: 2020-12-14 14:22:11
--> -->
<div class="content"> <div class="content">
<div class="header"> <div class="header">

3
src/app/examiner/examiner-index/examiner-index.component.scss

@ -11,6 +11,7 @@ table {
height: 100%; height: 100%;
overflow: hidden; overflow: hidden;
background: #F2F5F6; background: #F2F5F6;
overflow-y: auto;
} }
.header { .header {
width: 100%; width: 100%;
@ -57,7 +58,7 @@ table {
} //queryBox } //queryBox
} }
.centertable{ .centertable{
width: 1632px; width: 95%;
margin-right: 40px; margin-right: 40px;
margin-left: 40px; margin-left: 40px;
background-color: #FFFFFF; background-color: #FFFFFF;

10
src/app/examiner/examiner-new-one/examiner-new-one.component.scss

@ -13,14 +13,16 @@ table {
overflow: hidden; overflow: hidden;
background: #F2F5F6; background: #F2F5F6;
display: flex; display: flex;
overflow-y: auto;
.contentLeft{ .contentLeft{
width: 1270px; width: 80%;
height: 850px; height: 94%;
margin: 20px 20px 10px 50px; margin: 20px 20px 10px 50px;
background-color: #FFFFFF; background-color: #FFFFFF;
border-radius: 16px ; border-radius: 16px ;
.contenttable{ .contenttable{
width: 1200px; width: 95%;
height: 80%;
//margin-right: 40px; //margin-right: 40px;
margin-left: 30px; margin-left: 30px;
//background-color: none; //background-color: none;
@ -48,7 +50,7 @@ table {
.contentRight{ .contentRight{
width: 320px; width: 320px;
height: 850px; height: 94%;
margin: 20px 20px 10px 10px; margin: 20px 20px 10px 10px;
background-color: #FFFFFF; background-color: #FFFFFF;
border-radius: 16px ; border-radius: 16px ;

Loading…
Cancel
Save