Commit 9b1507d4 authored by wangqinghua's avatar wangqinghua

结果页面

parent cf0b4e52
<?xml version='1.0' encoding='utf-8'?>
<widget id="io.ionic.smart19.starter.test" version="4.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<widget id="io.ionic.smart19.starter.test" version="4.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>党建云平台(测试)</name>
<description>An awesome Ionic/Cordova app.</description>
<author email="hi@ionicframework" href="http://ionicframework.com/">Ionic Framework Team</author>
......
......@@ -7,7 +7,7 @@
"proxies": [
{
"path": "/wisdomgroup",
"proxyUrl": "http://10.10.202.3:8080/wisdomgroup"
"proxyUrl": "http://180.168.156.212:2931/wisdomgroup"
}
]
}
\ No newline at end of file
......@@ -61,7 +61,7 @@
<ng-container *ngIf="item.questionType == 4">
<p>
<label>
<input [(ngModel)]="item.answer" [name]="item.questionQueId" value="A type="radio">
<input [(ngModel)]="item.answer" [name]="item.questionQueId" value="A" type="radio">
<span class=" selectIndex">A</span>&nbsp;&nbsp;
</label>
......
......@@ -6,6 +6,7 @@ import {LearningResultPage} from "../learning-result/learning-result";
import {LearnService} from "../learn.service";
import {DatePipe} from "@angular/common";
import {CommonService} from "../../../../service/common.service";
import {ReviewResultPage} from "../review-result/review-result";
@IonicPage()
@Component({
......@@ -65,7 +66,7 @@ export class LearningDoPage {
let totalTime = this.totalTime;
this.clock = window.setInterval(() => {
totalTime--;
this.useTime ++;
this.useTime++;
let hourse = (Math.floor(totalTime / 3600)).toString();
hourse = (hourse.length > 1 ? hourse : '0' + hourse);
let minutes = Math.floor(totalTime / 60).toString();
......@@ -141,14 +142,7 @@ export class LearningDoPage {
})
}
submit(){
if(this.type == 'reset'){
this.navCtrl.push("LearningResultPage",{
testId:this.testId,
title:this.title
});
}else{
submit() {
const data = {
listMap: this.list.map(e => {
if (e.answer.length > 1) {
......@@ -167,13 +161,20 @@ export class LearningDoPage {
this.learnSer.submitPaper(data).subscribe(
(res) => {
this.commonSer.toast("提交成功");
this.navCtrl.push("LearningResultPage",{
testId:this.testId,
title:this.title
if(this.type == 'reset') {
this.navCtrl.push("ReviewResultPage", {
result: res.data,
title: this.title
})
}else{
this.navCtrl.push("LearningResultPage", {
testId: this.testId,
title: this.title
})
}
)
}
)
}
}
......@@ -10,6 +10,6 @@
<ion-content>
<p class="explain margin-top-100">本次答题共计{{item?.questionCount}}题,满分{{item?.fullMarks}}分</p>
<p class="explain margin-top-20">时间:{{item?.timeLimit | formatTime}}</p>
<p class="explain margin-top-20">分数超过{{item?.fullMarks}}分合格</p>
<p class="explain margin-top-20">分数超过{{item?.score}}分通过</p>
<button class="submit-btn submit" (click)="goToDO()">开始答题</button>
</ion-content>
......@@ -18,7 +18,8 @@ export class LearningExplainPage {
questionCount: 0,
fullMarks: 0,
timeLimit: 0,
testId:null
testId:null,
score:0,
}; //测试对象
constructor(public navCtrl: NavController, public navParams: NavParams,
public learnSer: LearnService,public commonSer:CommonService) {
......@@ -34,7 +35,7 @@ export class LearningExplainPage {
this.learnSer.startTest(data).subscribe(
(res) => {
this.item = res.data;
this.item.fullMarks = Math.floor(this.item.fullMarks *0.6);
this.item.score = Math.floor(this.item.fullMarks *0.6);
}
)
}
......
......@@ -65,8 +65,7 @@
</div>
<div class="content-button padding-15-0">
<span>参与人员:</span>
<span *ngIf="item.groupName">{{item.groupName}}</span>
<span *ngIf="!item.groupName">全体人员</span>
<span *ngIf="item.testObject">{{item.testObject}}</span>
<span float-right class="join">测试</span>
</div>
</div>
......@@ -97,8 +96,7 @@
</div>
<div class="content-button padding-15-0">
<span>参与人员:</span>
<span *ngIf="item.groupName">{{item.groupName}}</span>
<span *ngIf="!item.groupName">全体人员</span>
<span *ngIf="item.testObject">{{item.testObject}}</span>
<span float-right class="look">查看</span>
</div>
</div>
......
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