Browse Source

[新增]新增考官创建考题后查看

master
邵佳豪 4 years ago
parent
commit
7e3ca6438a
  1. 10
      src/app/examiner/create-test-score/create-test-score.component.html
  2. 3
      src/app/examiner/create-test-score/create-test-score.component.ts
  3. 2
      src/app/examiner/examiner-index/examiner-index.component.html
  4. 5
      src/app/examiner/examiner-index/examiner-index.component.ts

10
src/app/examiner/create-test-score/create-test-score.component.html

@ -264,7 +264,7 @@
</div>
</div>
<div class="fightdeploydiv" [hidden]="!(selectedTab == 2) ">
<div class="addPlan" (click)="addPlan()">
<div class="addPlan" (click)="addPlan()" *ngIf="!(pattern=='look')">
<mat-icon style="vertical-align: text-top">add_circle_outline</mat-icon>添加预案
</div>
<div class="planList" *ngIf="unitId[selectedUnitIndex]">
@ -276,7 +276,7 @@
<td>是否公开</td>
<td>编制级别</td>
<td>设置分数</td>
<td>操作</td>
<td *ngIf="!(pattern=='look')">操作</td>
</tr>
<tr *ngFor="let item of unitId[selectedUnitIndex].planList">
<td>{{item.title}}</td>
@ -287,8 +287,8 @@
<td>
<input (input)="planItemScore()" type="number" [(ngModel)]="item.score">
</td>
<td>
<span style="color: #07CDCF;" (click)="edit(item)">编辑</span>
<td *ngIf="!(pattern=='look')">
<span style="color: #07CDCF;" (click)="edit(item)" >编辑</span>
<span style="color: #FF8678;" (click)="deletePlan(item)">删除</span>
</td>
</tr>
@ -302,7 +302,7 @@
<div class="btn" (click)="goBack()">
上一步
</div>
<div class="btn" (click)="save()">
<div class="btn" (click)="save()" *ngIf="!(pattern=='look')">
完成
</div>
</div>

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

@ -27,12 +27,13 @@ export class CreateTestScoreComponent implements OnInit {
}, 0);
}
pattern:any = this.route.snapshot.queryParams.pattern || ''
ngOnInit(): void {
if(this.route.snapshot.queryParams.pattern && this.route.snapshot.queryParams.pattern == 'edit'){
if(this.route.snapshot.queryParams.pattern){
this.getSoloPaper()
}else{
this.unitId = JSON.parse(sessionStorage.getItem(sessionStorage.getItem('paperId')))

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

@ -85,7 +85,7 @@
<td [ngClass]="{'green': item.status == '1','red':item.status == '2'}">{{item.status=="2"?"已结束":item.status=="0"?"未开考":"开考中"}}</td>
<td>
<span style="color: #07CDCF;margin-right: 10px;cursor: pointer;" (click)="editPaper(item)">编辑</span>
<span style="color: #07CDCF;">详情</span>
<span style="color: #07CDCF;cursor: pointer;" (click)="lookPaper(item)">详情</span>
<span *ngIf="item.status=='0'" style="color: #FF8678;margin-left: 10px;cursor: pointer;" (click)="deleteExam(item.id)">删除</span>
</td>
</tr>

5
src/app/examiner/examiner-index/examiner-index.component.ts

@ -126,10 +126,13 @@ export class ExaminerIndexComponent implements OnInit {
//编辑试卷
editPaper(item){
// console.log(item)
sessionStorage.setItem("paperId",item.id)
this.router.navigateByUrl("/examiner/create-test-score?pattern=edit")
}
lookPaper(item){
sessionStorage.setItem("paperId",item.id)
this.router.navigateByUrl("/examiner/create-test-score?pattern=look")
}
//获得所有组织机构
getOrganizations(){
this.http.get('/api/Organizations').subscribe(

Loading…
Cancel
Save