Commit 85b576e6 authored by linzhiguo's avatar linzhiguo

+ 每道题限时

+ 最多16道题
parent c5220242
<div class="model-content"> <div class="model-content">
<nz-divider nzText="主题" nzOrientation="center"></nz-divider> <nz-divider nzText="主题" nzOrientation="left"></nz-divider>
<div nz-row style="width: 800;"> <div nz-row style="width: 800;">
<div style="display: flex; margin-bottom: 10px;"> <div style="display: flex; margin-bottom: 10px;">
<div style="flex:1;margin-left: 10px;"> <div style="flex:1;margin-left: 10px;">
标题 标题
</div> </div>
<div style="flex:5"> <div style="flex:5">
<input type="text" nz-input placeholder="" [(ngModel)]="item.title" (blur)="saveItem()"/> <input type="text" nz-input placeholder="" [(ngModel)]="item.title" (blur)="saveItem()" style="width: 160px;"/>
</div> </div>
</div> </div>
...@@ -22,16 +22,16 @@ ...@@ -22,16 +22,16 @@
<div style="display: flex; margin-bottom: 10px;"> <div style="display: flex; margin-bottom: 10px;">
<div style="flex:1; margin-left: 10px;"> <div style="flex:1; margin-left: 10px;">
时间 每道题限时(整数)
</div> </div>
<div style="flex:5"> <div style="flex:5">
<input type="text" nz-input placeholder="" [(ngModel)]="item.time" (blur)="saveItem()"/> <input type="text" nz-input placeholder="" [(ngModel)]="item.time" (blur)="saveItem()" style="width: 160px;"/> s
</div> </div>
</div> </div>
</div> </div>
<nz-divider nzOrientation="left"></nz-divider> <nz-divider nzText="题目列表(最多16道题)" nzOrientation="left"></nz-divider>
<div class="card-config"> <div class="card-config">
<div *ngFor="let data of item.mouses; let i = index" class="card-item" style="padding: 0.5vw;" > <div *ngFor="let data of item.mouses; let i = index" class="card-item" style="padding: 0.5vw;" >
<div class="card-item-content border"> <div class="card-item-content border">
...@@ -78,11 +78,14 @@ ...@@ -78,11 +78,14 @@
</div> </div>
</div> </div>
</div> </div>
<div class="card-item" style="padding: 0.5vw;" >
<button nz-button nzType="primary" class="add-btn" (click)="addRat()"> <div *ngIf="item.mouses.length < 16">
<i nz-icon nzType="plus-circle" nzTheme="outline"></i> <div class="card-item" style="padding: 0.5vw;" >
新建题目 <button nz-button nzType="primary" class="add-btn" (click)="addRat()">
</button> <i nz-icon nzType="plus-circle" nzTheme="outline"></i>
新建题目
</button>
</div>
</div> </div>
......
...@@ -28,7 +28,8 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy { ...@@ -28,7 +28,8 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
//this.item = new Course(); //this.item = new Course();
this.item = new WL01(); this.item = new WL01();
this.item.time = 3;
this.item.mouses = new Array<Rat>();
// 获取存储的数据 // 获取存储的数据
(<any>window).courseware.getData((data) => { (<any>window).courseware.getData((data) => {
...@@ -56,6 +57,8 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy { ...@@ -56,6 +57,8 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
init() { init() {
if(!this.item){ if(!this.item){
this.item = new WL01(); this.item = new WL01();
this.item.time = 3;
this.item.mouses = new Array<Rat>();
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment