Commit a6ebcbfc authored by wangqinghua's avatar wangqinghua

样式修复

parent af1feb31
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
"proxies": [ "proxies": [
{ {
"path": "/wisdomgroup", "path": "/wisdomgroup",
"proxyUrl": "http://180.168.156.212:2931/wisdomgroup" "proxyUrl": "http://101.89.112.92:80/wisdomgroup"
} }
] ]
} }
\ No newline at end of file
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
</div> </div>
</div> </div>
<div class="content-button padding-15-0"> <div class="content-button padding-15-0">
<span>参与人员:{{item.testStatus}}</span> <span>参与人员:{{item.testObject}}</span>
<span *ngIf="item.testStatus == 1" float-right class="look">发布</span> <span *ngIf="item.testStatus == 1" float-right class="look">发布</span>
<span *ngIf="item.testStatus != 1" float-right class="join">查看</span> <span *ngIf="item.testStatus != 1" float-right class="join">查看</span>
</div> </div>
...@@ -64,9 +64,7 @@ ...@@ -64,9 +64,7 @@
</div> </div>
</div> </div>
<div class="content-button padding-15-0"> <div class="content-button padding-15-0">
<span>参与人员:</span> <span>参与人员:{{item.testObject}}</span>
<span *ngIf="item.groupName">{{item.groupName}}</span>
<span *ngIf="!item.groupName">全体人员</span>
<span float-right class="look">查看</span> <span float-right class="look">查看</span>
</div> </div>
</div> </div>
...@@ -96,9 +94,7 @@ ...@@ -96,9 +94,7 @@
</div> </div>
</div> </div>
<div class="content-button padding-15-0"> <div class="content-button padding-15-0">
<span>参与人员:</span> <span>参与人员:{{item.testObject}}</span>
<span *ngIf="item.groupName">{{item.groupName}}</span>
<span *ngIf="!item.groupName">全体人员</span>
<span float-right class="look">查看</span> <span float-right class="look">查看</span>
</div> </div>
</div> </div>
...@@ -128,9 +124,7 @@ ...@@ -128,9 +124,7 @@
</div> </div>
</div> </div>
<div class="content-button padding-15-0"> <div class="content-button padding-15-0">
<span>参与人员:</span> <span>参与人员:{{item.testObject}}</span>
<span *ngIf="item.groupName">{{item.groupName}}</span>
<span *ngIf="!item.groupName">全体人员</span>
<span float-right class="look">查看</span> <span float-right class="look">查看</span>
</div> </div>
</div> </div>
......
...@@ -28,4 +28,9 @@ export class LearnManageService{ ...@@ -28,4 +28,9 @@ export class LearnManageService{
submitMarkResult(data): Observable<any>{ submitMarkResult(data): Observable<any>{
return this.http.post(AppGlobal.domain+'/wisdomgroup/modules/testManage/submitMarkResult' , data); return this.http.post(AppGlobal.domain+'/wisdomgroup/modules/testManage/submitMarkResult' , data);
} }
//获取测试结果(按分数由高到低排序)
getRankList(data): Observable<any>{
return this.http.post(AppGlobal.domain+'/wisdomgroup/modules/testManage/getRankList' , this.commonSer.toFormData(data) );
}
} }
\ No newline at end of file
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
refreshingSpinner="bubbles"> refreshingSpinner="bubbles">
</ion-refresher-content> </ion-refresher-content>
</ion-refresher> </ion-refresher>
<ion-list> <ion-list style="height: 100%">
<div class="main-container"> <div class="main-container">
<div class="learn-item"> <div class="learn-item">
<div class="top-container"> <div class="top-container">
......
page-rank-list { page-rank-list {
.main-container{
height: 100%;
}
.learn-item{
height: 100%;
}
.top-container{ .top-container{
background: linear-gradient(to bottom,#89a2cd 0%,#ccd4e3 25%,#e6e8ed 100%);
text-align: center; text-align: center;
padding: 1.5rem; padding: 1.5rem;
background: linear-gradient(to bottom,#89a2cd 0%,#ccd4e3 25%,#e6e8ed 100%);
min-height: 100%;
}
.grid{
} }
.top-row{ .top-row{
color: #577ab9; color: #577ab9;
......
...@@ -2,6 +2,7 @@ import {Component} from '@angular/core'; ...@@ -2,6 +2,7 @@ import {Component} from '@angular/core';
import {IonicPage, NavController, NavParams} from 'ionic-angular'; import {IonicPage, NavController, NavParams} from 'ionic-angular';
import {DatePipe} from "@angular/common"; import {DatePipe} from "@angular/common";
import {CommonService} from "../../../../provide/common.service"; import {CommonService} from "../../../../provide/common.service";
import {LearnManageService} from "../learnManage.service";
@IonicPage() @IonicPage()
...@@ -14,55 +15,24 @@ export class RankListPage { ...@@ -14,55 +15,24 @@ export class RankListPage {
testId; testId;
pageNumber = 1; pageNumber = 1;
pageSize = 25; pageSize = 25;
list = [ list = [];
{username: '1', score: '100'},
{username: '2', score: '100'},
{username: '3', score: '100'},
{username: '4', score: '100'},
{username: '5', score: '100'},
{username: '6', score: '100'},
{username: '7', score: '100'},
{username: '7', score: '100'},
{username: '7', score: '100'},
{username: '7', score: '100'},
{username: '7', score: '100'},
{username: '7', score: '100'},
{username: '7', score: '100'},
{username: '7', score: '100'},
{username: '7', score: '100'},
{username: '7', score: '100'},
{username: '7', score: '100'},
{username: '7', score: '100'},
{username: '7', score: '100'},
{username: '7', score: '100'},
{username: '7', score: '100'},
{username: '7', score: '100'},
{username: '7', score: '100'},
{username: '7', score: '100'},
{username: '7', score: '100'},
{username: '7', score: '100'},
{username: '7', score: '100'},
{username: '7', score: '100'},
{username: '7', score: '100'},
{username: '7', score: '100'},
{username: '7', score: '100'},
{username: '7', score: '100'},
{username: '7', score: '100'},
{username: '7', score: '100'},
{username: '7', score: '100'},
{username: '7', score: '100'},
{username: '7', score: '100'},
{username: '7', score: '100'},
{username: '7', score: '100'},
{username: '7', score: '100'},
];
constructor(public navCtrl: NavController, public navParams: NavParams, constructor(public navCtrl: NavController, public navParams: NavParams,public learnManSer:LearnManageService,
public datePipe:DatePipe,public commonSer:CommonService) { public datePipe:DatePipe,public commonSer:CommonService) {
} }
ionViewDidLoad() { ionViewDidLoad() {
this.testId = this.navParams.get('testId'); this.testId = this.navParams.get('testId');
const data = {
testId:this.testId,
pageNumber: this.pageNumber,
pageSize: this.pageSize,
};
this.learnManSer.getRankList(data).subscribe(
(res)=>{
this.list = res.data.list;
}
)
} }
// 下拉 // 下拉
...@@ -73,7 +43,6 @@ export class RankListPage { ...@@ -73,7 +43,6 @@ export class RankListPage {
const data = { const data = {
pageNumber: this.pageNumber, pageNumber: this.pageNumber,
pageSize: this.pageSize, pageSize: this.pageSize,
selectType: '1', //全部状态
queryTime: nowDate, queryTime: nowDate,
}; };
......
...@@ -14,26 +14,26 @@ ...@@ -14,26 +14,26 @@
<ion-slide *ngFor="let item of list;"> <ion-slide *ngFor="let item of list;">
<div class="learn-item"> <div class="learn-item">
<div class="item-container"> <div class="item-container">
<ng-container *ngFor="let test of item.test;let i = index;"> <ng-container *ngFor="let test of item.vos;let i = index;">
<div class="test"> <div class="test">
<div class="item-title"> <div class="item-title">
<p>Q{{i +1}}(问答){{test.title}}</p> <p>Q{{i +1}}(问答){{test.questionContent}}</p>
</div> </div>
<div class="item-content"> <div class="item-content">
<div class="padding-0-30"> <div class="padding-0-30">
<div class="content-textarea"> <div class="content-textarea">
{{test.content}} {{test.answer}}
</div> </div>
</div> </div>
</div> </div>
<div class="test-judge flex"> <div class="test-judge flex">
<div class="flex-1"></div> <div class="flex-1"></div>
<div class="flex-1"></div> <div class="flex-1"></div>
<div class="flex-1 text-center" (click)="select(test,true)"> <div class="flex-1 text-center" (click)="select(test,1)">
<span [ngClass]="{'check': test.checked == true }" class="right">正确</span> <span [ngClass]="{'check': test.result == 1 }" class="right">正确</span>
</div> </div>
<div class="flex-1 text-center" (click)="select(test,false)"> <div class="flex-1 text-center" (click)="select(test,0)">
<span [ngClass]="{'check': test.checked == false }" class="error">错误</span> <span [ngClass]="{'check': test.result == 0 }" class="error">错误</span>
</div> </div>
</div> </div>
</div> </div>
...@@ -44,9 +44,9 @@ ...@@ -44,9 +44,9 @@
</ion-slides> </ion-slides>
</div> </div>
<div class="footer-subject"> <div class="footer-subject">
<div (click)="prev()" class="prev">上一</div> <div (click)="prev()" class="prev">上一</div>
<div class="index">{{index +1}} / {{list.length}}</div> <div class="index">{{index +1}} / {{list.length}}</div>
<div (click)="next()" class="next">下一</div> <div (click)="next()" class="next">下一</div>
</div> </div>
<div class="footer-submit"> <div class="footer-submit">
<div class="submit" (click)="submit()"> <div class="submit" (click)="submit()">
......
...@@ -2,7 +2,6 @@ import {Component, ViewChild} from '@angular/core'; ...@@ -2,7 +2,6 @@ import {Component, ViewChild} from '@angular/core';
import {IonicPage, Navbar, NavController, NavParams, Slides} from 'ionic-angular'; import {IonicPage, Navbar, NavController, NavParams, Slides} from 'ionic-angular';
import {AppService} from "../../../../service/http.service"; import {AppService} from "../../../../service/http.service";
import {LearnManageService} from "../learnManage.service"; import {LearnManageService} from "../learnManage.service";
import {message} from "../../../../app/main";
import {CommonService} from "../../../../provide/common.service"; import {CommonService} from "../../../../provide/common.service";
@IonicPage() @IonicPage()
...@@ -18,40 +17,7 @@ export class ReadLearnPage { ...@@ -18,40 +17,7 @@ export class ReadLearnPage {
pageNumber = 1; pageNumber = 1;
pageSize = 100; pageSize = 100;
index = 0; index = 0;
list = [ list = [];
{
name: '杨阳洋1', test: [
{title: "看云识天气的解释1", content: "蚂蚁上树蚂蚁上树蚂蚁上树"},
{title: "看云识天气的解释2", content: "蚂蚁上树蚂蚁上树蚂蚁上树"},
{title: "看云识天气的解释3", content: "蚂蚁上树蚂蚁上树蚂蚁上树"},
{title: "看云识天气的解释4", content: "蚂蚁上树蚂蚁上树蚂蚁上树"},
{title: "看云识天气的解释5", content: "蚂蚁上树蚂蚁上树蚂蚁上树"},
{title: "看云识天气的解释5", content: "蚂蚁上树蚂蚁上树蚂蚁上树"},
{title: "看云识天气的解释5", content: "蚂蚁上树蚂蚁上树蚂蚁上树"},
{title: "看云识天气的解释5", content: "蚂蚁上树蚂蚁上树蚂蚁上树"},
{title: "看云识天气的解释5", content: "蚂蚁上树蚂蚁上树蚂蚁上树"},
{title: "看云识天气的解释5", content: "蚂蚁上树蚂蚁上树蚂蚁上树"},
]
},
{
name: '杨阳洋1', test: [
{title: "看云识天气的解释1", content: "蚂蚁上树蚂蚁上树蚂蚁上树"},
{title: "看云识天气的解释2", content: "蚂蚁上树蚂蚁上树蚂蚁上树"},
{title: "看云识天气的解释3", content: "蚂蚁上树蚂蚁上树蚂蚁上树"},
{title: "看云识天气的解释4", content: "蚂蚁上树蚂蚁上树蚂蚁上树"},
{title: "看云识天气的解释5", content: "蚂蚁上树蚂蚁上树蚂蚁上树"},
]
},
{
name: '杨阳洋1', test: [
{title: "看云识天气的解释1", content: "蚂蚁上树蚂蚁上树蚂蚁上树"},
{title: "看云识天气的解释2", content: "蚂蚁上树蚂蚁上树蚂蚁上树"},
{title: "看云识天气的解释3", content: "蚂蚁上树蚂蚁上树蚂蚁上树"},
{title: "看云识天气的解释4", content: "蚂蚁上树蚂蚁上树蚂蚁上树"},
{title: "看云识天气的解释5", content: "蚂蚁上树蚂蚁上树蚂蚁上树"},
]
},
]
constructor(public navCtrl: NavController, public navParams: NavParams, public appService: AppService, constructor(public navCtrl: NavController, public navParams: NavParams, public appService: AppService,
public learnManSer: LearnManageService,public commonSer:CommonService) { public learnManSer: LearnManageService,public commonSer:CommonService) {
...@@ -66,13 +32,13 @@ export class ReadLearnPage { ...@@ -66,13 +32,13 @@ export class ReadLearnPage {
}; };
this.learnManSer.getMarkList(data).subscribe( this.learnManSer.getMarkList(data).subscribe(
(res)=>{ (res)=>{
this.list = res.data;
} }
) )
this.navbar.backButtonClick = () => { this.navbar.backButtonClick = () => {
this.appService.alert("是否退出批阅,当前批阅不会保存?"), () => { this.commonSer.alert("是否退出批阅,当前批阅不会保存?",()=>{
this.navCtrl.pop() this.navCtrl.pop()
} })
} }
} }
...@@ -103,20 +69,48 @@ export class ReadLearnPage { ...@@ -103,20 +69,48 @@ export class ReadLearnPage {
// //
select(test, boolean) { select(test, boolean) {
test.checked = boolean; test.result = boolean;
console.log(this.list)
} }
//提交批阅结果 //提交批阅结果
submit(){ submit(){
const data = { if(!this.check()){
return false;
}; }
this.learnManSer.submitMarkResult(data).subscribe( let arr = [];
this.list.forEach(l=>{
l.vos.forEach(v=>{
arr.push({
recordId:v.recordId,
result:v.result,
answerId:v.answerId,
questionId:v.questionId,
score:v.score,
})
})
})
this.learnManSer.submitMarkResult(arr).subscribe(
(res)=>{ (res)=>{
this.commonSer.toast("批阅完成!") this.commonSer.toast("批阅完成!")
this.navCtrl.pop(); this.navCtrl.pop();
} }
) )
} }
check(){
let num = 0;
this.list.forEach(l=>{
l.vos.forEach(v=>{
if(v.result != 0 && v.result != 1){
num ++;
}
})
})
if(num > 0){
this.commonSer.toast("有试卷的题目未批阅!")
return false;
}else{
return true;
}
}
} }
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
</p> </p>
</div> </div>
<div class="item-content"> <div class="item-content">
<div class="padding-0-20"> <div class="padding-20-20">
<!--单选题--> <!--单选题-->
<ng-container *ngIf="item.questionType == 1"> <ng-container *ngIf="item.questionType == 1">
<ng-container *ngFor=" let option1 of item.options;let optIndex = index;"> <ng-container *ngFor=" let option1 of item.options;let optIndex = index;">
......
...@@ -17,6 +17,7 @@ page-learning-do { ...@@ -17,6 +17,7 @@ page-learning-do {
top: 0; top: 0;
left: 0; left: 0;
z-index: 2; z-index: 2;
padding-bottom: 1rem;
} }
ion-slides{ ion-slides{
height: calc(100% - 4rem); height: calc(100% - 4rem);
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
<span *ngIf="item.questionType == 1 || item.questionType == 2 || item.questionType == 4" class="margin-left-20">您的答案:{{item.myAnswer}}</span> <span *ngIf="item.questionType == 1 || item.questionType == 2 || item.questionType == 4" class="margin-left-20">您的答案:{{item.myAnswer}}</span>
</div> </div>
<div class="item-content"> <div class="item-content">
<div class="padding-0-30"> <div class="padding-20-30">
<!--单选题--> <!--单选题-->
<ng-container *ngIf="item.questionType == 1"> <ng-container *ngIf="item.questionType == 1">
<ng-container *ngFor=" let option1 of item.options;let optIndex = index;"> <ng-container *ngFor=" let option1 of item.options;let optIndex = index;">
......
...@@ -27,6 +27,7 @@ page-review-learn { ...@@ -27,6 +27,7 @@ page-review-learn {
top: 0; top: 0;
left: 0; left: 0;
z-index: 2; z-index: 2;
padding-bottom: 1rem;
} }
.learn-title { .learn-title {
background-color: rgba(18, 28, 52, 0.34); background-color: rgba(18, 28, 52, 0.34);
......
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