Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wisdom-ces
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangqinghua
wisdom-ces
Commits
af1feb31
Commit
af1feb31
authored
Apr 15, 2019
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
倒计时时间的bug;
批阅试卷
parent
b55dd698
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
163 additions
and
80 deletions
+163
-80
learn-detail.html
src/pages/home/learn-manage/learn-detail/learn-detail.html
+1
-1
learn-detail.ts
src/pages/home/learn-manage/learn-detail/learn-detail.ts
+3
-1
learnManage.service.ts
src/pages/home/learn-manage/learnManage.service.ts
+12
-0
rank-list.html
src/pages/home/learn-manage/rank-list/rank-list.html
+5
-6
rank-list.scss
src/pages/home/learn-manage/rank-list/rank-list.scss
+5
-3
rank-list.ts
src/pages/home/learn-manage/rank-list/rank-list.ts
+20
-7
read-learn.html
src/pages/home/learn-manage/read-learn/read-learn.html
+1
-1
read-learn.ts
src/pages/home/learn-manage/read-learn/read-learn.ts
+109
-45
learn.service.ts
src/pages/home/learning/learn.service.ts
+0
-11
learning-do.ts
src/pages/home/learning/learning-do/learning-do.ts
+4
-1
learning-list.html
src/pages/home/learning/learning-list/learning-list.html
+3
-3
format-time.ts
src/pipes/format-time/format-time.ts
+0
-1
No files found.
src/pages/home/learn-manage/learn-detail/learn-detail.html
View file @
af1feb31
...
...
@@ -42,7 +42,7 @@
<p>
参与人员:
<span
class=
"color-666"
>
{{test?.testObject}}
</span></p>
<p>
时间限制:
<span
class=
"color-666"
>
{{test?.timeLimit | formatTime}}
</span></p>
<div
class=
"basic-question"
>
<div
class=
"question-left"
>
题数与分值
:
</div>
<div
class=
"question-left"
>
题数与分值
:
</div>
<div
class=
"question-right color-666"
>
<ng-container
*
ngFor=
"let item of test?.configs"
>
<p>
...
...
src/pages/home/learn-manage/learn-detail/learn-detail.ts
View file @
af1feb31
...
...
@@ -34,7 +34,9 @@ export class LearnDetailPage {
//批阅试卷
gotoRead
()
{
if
(
this
.
test
.
markNumber
>
0
){
this
.
navCtrl
.
push
(
'ReadLearnPage'
)
this
.
navCtrl
.
push
(
'ReadLearnPage'
,{
testId
:
this
.
testId
})
}
else
{
this
.
commonSer
.
toast
(
"当前试卷无问答题"
);
}
...
...
src/pages/home/learn-manage/learnManage.service.ts
View file @
af1feb31
...
...
@@ -14,7 +14,18 @@ export class LearnManageService{
return
this
.
http
.
post
(
AppGlobal
.
domain
+
'/wisdomgroup//modules/testManage/getLearnTestList'
,
this
.
commonSer
.
toFormData
(
data
))
}
//试卷列表
getDetail
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
AppGlobal
.
domain
+
'/wisdomgroup//modules/testManage/getDetail'
,
this
.
commonSer
.
toFormData
(
data
))
}
//待批阅列表
getMarkList
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
AppGlobal
.
domain
+
'/wisdomgroup/modules/testManage/getMarkList'
,
this
.
commonSer
.
toFormData
(
data
)
);
}
//提交批阅结果
submitMarkResult
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
AppGlobal
.
domain
+
'/wisdomgroup/modules/testManage/submitMarkResult'
,
data
);
}
}
\ No newline at end of file
src/pages/home/learn-manage/rank-list/rank-list.html
View file @
af1feb31
<!--排行榜-->
<ion-header>
<ion-navbar>
<ion-title>
排行榜
</ion-title>
</ion-navbar>
</ion-header>
...
...
@@ -16,7 +14,6 @@
refreshingSpinner=
"bubbles"
>
</ion-refresher-content>
</ion-refresher>
<ion-list>
<div
class=
"main-container"
>
<div
class=
"learn-item"
>
...
...
@@ -46,8 +43,10 @@
<!--<p class="tips">备注:分数相同的情况下,先交卷者排名在前</p>-->
<!--上滑加载数据-->
<ion-infinite-scroll
(
ionInfinite
)="
doInfinite
($
event
)"
>
<ion-infinite-scroll-content></ion-infinite-scroll-content>
<ion-infinite-scroll
threshold=
"100px"
(
ionInfinite
)="
doInfinite
($
event
)"
>
<ion-infinite-scroll-content
loadingSpinner=
"bubbles"
loadingText=
"加载更多..."
>
</ion-infinite-scroll-content>
</ion-infinite-scroll>
</ion-content>
src/pages/home/learn-manage/rank-list/rank-list.scss
View file @
af1feb31
page-rank-list
{
.top-container
{
background
:
linear-gradient
(
to
bottom
,
#89a2cd
0%
,
#ccd4e3
25%
,
#e6e8ed
100%
);
text-align
:
center
;
padding
:
1
.5rem
;
}
...
...
@@ -28,13 +30,13 @@ page-rank-list {
}
.span-rank
{
display
:
inline-block
;
width
:
1
.5
rem
;
height
:
1
.5
rem
;
width
:
2
rem
;
height
:
2
rem
;
background-color
:
#bfcbe0
;
border-radius
:
2px
;
color
:
#fff
;
font-size
:
1
.2rem
;
vertical-align
:
middle
;
line-height
:
1
.5
rem
;
line-height
:
2
rem
;
}
}
src/pages/home/learn-manage/rank-list/rank-list.ts
View file @
af1feb31
...
...
@@ -3,12 +3,6 @@ import {IonicPage, NavController, NavParams} from 'ionic-angular';
import
{
DatePipe
}
from
"@angular/common"
;
import
{
CommonService
}
from
"../../../../provide/common.service"
;
/**
* Generated class for the RankListPage page.
*
* See https://ionicframework.com/docs/components/#navigation for more info on
* Ionic pages and navigation.
*/
@
IonicPage
()
@
Component
({
...
...
@@ -98,7 +92,26 @@ export class RankListPage {
selectType
:
'1'
,
//全部状态
queryTime
:
nowDate
,
};
infiniteScroll
.
complete
();
setTimeout
(
()
=>
{
this
.
list
.
push
(
{
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'
},
)
if
(
this
.
list
.
length
>
100
){
infiniteScroll
.
enable
(
false
);
}
else
{
infiniteScroll
.
complete
();
}
},
1000
)
}
...
...
src/pages/home/learn-manage/read-learn/read-learn.html
View file @
af1feb31
...
...
@@ -45,7 +45,7 @@
</div>
<div
class=
"footer-subject"
>
<div
(
click
)="
prev
()"
class=
"prev"
>
上一题
</div>
<div
class=
"index"
>
1 / 10
</div>
<div
class=
"index"
>
{{index +1}} / {{list.length}}
</div>
<div
(
click
)="
next
()"
class=
"next"
>
下一题
</div>
</div>
<div
class=
"footer-submit"
>
...
...
src/pages/home/learn-manage/read-learn/read-learn.ts
View file @
af1feb31
import
{
Component
,
ViewChild
}
from
'@angular/core'
;
import
{
IonicPage
,
Navbar
,
NavController
,
NavParams
}
from
'ionic-angular'
;
import
{
IonicPage
,
Navbar
,
NavController
,
NavParams
,
Slides
}
from
'ionic-angular'
;
import
{
AppService
}
from
"../../../../service/http.service"
;
import
{
LearnManageService
}
from
"../learnManage.service"
;
import
{
message
}
from
"../../../../app/main"
;
import
{
CommonService
}
from
"../../../../provide/common.service"
;
@
IonicPage
()
@
Component
({
selector
:
'page-read-learn'
,
templateUrl
:
'read-learn.html'
,
selector
:
'page-read-learn'
,
templateUrl
:
'read-learn.html'
,
})
export
class
ReadLearnPage
{
@
ViewChild
(
Navbar
)
navbar
:
Navbar
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
)
{
}
ionViewDidLoad
()
{
this
.
navbar
.
backButtonClick
=
()
=>
{
this
.
appService
.
alert
(
"是否退出批阅?"
),()
=>
{
this
.
navCtrl
.
pop
()
@
ViewChild
(
Navbar
)
navbar
:
Navbar
;
@
ViewChild
(
Slides
)
slides
:
Slides
;
testId
;
pageNumber
=
1
;
pageSize
=
100
;
index
=
0
;
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
,
public
learnManSer
:
LearnManageService
,
public
commonSer
:
CommonService
)
{
}
ionViewDidLoad
()
{
this
.
testId
=
this
.
navParams
.
get
(
"testId"
);
const
data
=
{
testId
:
this
.
testId
,
pageNumber
:
this
.
pageNumber
,
pageSize
:
this
.
pageSize
};
this
.
learnManSer
.
getMarkList
(
data
).
subscribe
(
(
res
)
=>
{
}
)
this
.
navbar
.
backButtonClick
=
()
=>
{
this
.
appService
.
alert
(
"是否退出批阅,当前批阅不会保存?"
),
()
=>
{
this
.
navCtrl
.
pop
()
}
}
}
slideChanged
(){
this
.
index
=
this
.
slides
.
realIndex
;
}
//上一题
prev
()
{
if
(
this
.
index
==
0
)
{
this
.
commonSer
.
toast
(
'已经是第一份试卷了!'
)
}
else
{
this
.
index
-=
1
;
this
.
slides
.
slideTo
(
this
.
index
)
}
}
//下一题
next
()
{
if
(
this
.
index
==
this
.
list
.
length
-
1
)
{
this
.
commonSer
.
toast
(
'已经是最后一份试卷了!'
)
}
else
{
this
.
index
+=
1
;
this
.
slides
.
slideTo
(
this
.
index
)
}
}
}
//
select
(
test
,
boolean
){
test
.
checked
=
boolean
;
console
.
log
(
this
.
list
)
//
select
(
test
,
boolean
)
{
test
.
checked
=
boolean
;
console
.
log
(
this
.
list
)
}
//提交批阅结果
submit
(){
const
data
=
{
};
this
.
learnManSer
.
submitMarkResult
(
data
).
subscribe
(
(
res
)
=>
{
this
.
commonSer
.
toast
(
"批阅完成!"
)
this
.
navCtrl
.
pop
();
}
)
}
}
src/pages/home/learning/learn.service.ts
View file @
af1feb31
...
...
@@ -43,14 +43,4 @@ export class LearnService{
getTop5
(
data
):
Observable
<
any
>
{
return
this
.
http
.
get
(
AppGlobal
.
domain
+
'/wisdomgroup/modules/learnPcTest/top/'
+
data
);
}
//待批阅列表
getMarkList
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
AppGlobal
.
domain
+
'/wisdomgroup/modules/testManage/getMarkList'
,
data
);
}
//提交批阅结果
submitMarkResult
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
AppGlobal
.
domain
+
'/wisdomgroup/modules/testManage/submitMarkResult'
,
data
);
}
}
\ No newline at end of file
src/pages/home/learning/learning-do/learning-do.ts
View file @
af1feb31
...
...
@@ -78,13 +78,16 @@ export class LearningDoPage {
this
.
clock
=
window
.
setInterval
(()
=>
{
totalTime
--
;
this
.
useTime
++
;
let
hourse
=
(
Math
.
floor
(
totalTime
/
3600
)).
toString
();
hourse
=
(
hourse
.
length
>
1
?
hourse
:
'0'
+
hourse
);
let
minutes
=
Math
.
floor
(
totalTime
/
60
).
toString
();
let
minutes
=<
any
>
Math
.
floor
(
totalTime
/
60
).
toString
();
minutes
=
minutes
%
60
===
0
?
0
:
minutes
;
minutes
=
(
minutes
.
length
>
1
?
minutes
:
'0'
+
minutes
);
let
seconds
=
Math
.
floor
(
totalTime
%
60
).
toString
();
seconds
=
(
seconds
.
length
>
1
?
seconds
:
'0'
+
seconds
);
this
.
timeText
=
hourse
+
":"
+
minutes
+
":"
+
seconds
;
if
(
totalTime
<
0
)
{
this
.
useTime
=
this
.
totalTime
;
window
.
clearInterval
(
this
.
clock
)
...
...
src/pages/home/learning/learning-list/learning-list.html
View file @
af1feb31
...
...
@@ -176,8 +176,8 @@
</ng-container>
</ng-container>
<!--上滑加载数据-->
<
!--<ion-infinite-scroll (ionInfinite)="doInfinite($event)">--
>
<
!--<ion-infinite-scroll-content></ion-infinite-scroll-content>--
>
<
!--</ion-infinite-scroll>--
>
<
ion-infinite-scroll
(
ionInfinite
)="
doInfinite
($
event
)"
>
<
ion-infinite-scroll-content></ion-infinite-scroll-content
>
<
/ion-infinite-scroll
>
</ion-content>
src/pipes/format-time/format-time.ts
View file @
af1feb31
...
...
@@ -17,7 +17,6 @@ export class FormatTimePipe implements PipeTransform {
let
seconds
=
Math
.
floor
(
value
%
60
).
toString
();
seconds
=
(
seconds
.
length
>
1
?
seconds
:
'0'
+
seconds
);
const
timeText
=
hourse
+
":"
+
minutes
+
":"
+
seconds
;
console
.
log
(
timeText
)
return
timeText
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment