Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
publich5
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
注册表
注册表
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
xuyanwei
publich5
Commits
63f7149d
提交
63f7149d
authored
6月 12, 2020
作者:
zhengyadong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
查看解析
上级
e91dcbbb
全部展开
显示空白字符变更
内嵌
并排
正在显示
14 个修改的文件
包含
155 行增加
和
31 行删除
+155
-31
detail.js
src/api/detail.js
+8
-0
moon.js
src/api/moon.js
+20
-0
false-result.png
src/assets/img/practice/false-result.png
+0
-0
right-result.png
src/assets/img/practice/right-result.png
+0
-0
answer.vue
src/components/practice/answer.vue
+41
-1
pMultiple.vue
src/components/practice/pMultiple.vue
+5
-2
index.js
src/router/index.js
+19
-8
index.vue
src/views/collection/index.vue
+2
-2
index.vue
src/views/moonMatch/index.vue
+5
-2
match.vue
src/views/moonMatch/match.vue
+41
-8
viewMatch.vue
src/views/moonMatch/viewMatch.vue
+0
-0
viewMatchReport.vue
src/views/moonMatch/viewMatchReport.vue
+10
-4
practice.vue
src/views/weekPractice/practice.vue
+2
-2
index.vue
src/views/wrongBook/index.vue
+2
-2
没有找到文件。
src/api/detail.js
浏览文件 @
63f7149d
...
...
@@ -8,3 +8,11 @@ export function getWeekDetailAPI(params){
params
})
}
// 收藏详情
export
function
getCollDetailAPI
(
params
){
return
request
({
url
:
`
${
requestPath
.
resource
}
/collection/page`
,
method
:
'get'
,
params
})
}
src/api/moon.js
浏览文件 @
63f7149d
...
...
@@ -19,6 +19,15 @@ export function getMatchDetailAPI(params){
})
}
// 继续答题
export
function
getMatchConDetailAPI
(
params
){
return
request
({
url
:
`
${
requestPath
.
resource
}
/record/test-paper`
,
method
:
'get'
,
params
})
}
// // 保存周周练
// export function saveWeekAPI(data){
// return request({
...
...
@@ -47,4 +56,15 @@ export function createRecordAPI(data){
}
// 查看解析
export
function
getMatchViewAPI
(
params
){
return
request
({
url
:
`
${
requestPath
.
resource
}
/record/get/question-statistics`
,
method
:
'get'
,
params
})
}
src/assets/img/practice/false-result.png
0 → 100644
浏览文件 @
63f7149d
636 Bytes
src/assets/img/practice/right-result.png
0 → 100644
浏览文件 @
63f7149d
700 Bytes
src/components/practice/answer.vue
浏览文件 @
63f7149d
<
template
>
<div
class=
"type-answer"
>
<div
class=
"right-answer"
>
正确答案:
{{
answer
.
replace
(
','
,
''
)
}}
</div>
<div
class=
"right-answer"
>
<div
class=
"answer-result false"
v-if=
"showAns&&!ansStatus"
>
<img
src=
"@/assets/img/practice/false-result.png"
alt=
""
>
回答错误
</div>
<div
class=
"answer-result right"
v-if=
"showAns&&ansStatus"
>
<img
src=
"@/assets/img/practice/right-result.png"
alt=
""
>
回答正确
</div>
正确答案:
{{
answer
.
replace
(
/,/g
,
''
)
}}
</div>
<div
class=
"answer-analysis"
>
<span
class=
"analysis-t"
>
解析:
</span>
<span
v-html=
"analysis"
></span>
...
...
@@ -20,6 +28,14 @@ export default {
type
:
String
,
default
:
""
},
showAns
:{
type
:
Boolean
,
default
:
false
},
ansStatus
:{
type
:
Boolean
,
default
:
false
}
},
data
()
{
return
{};
...
...
@@ -43,9 +59,33 @@ export default {
padding: .15rem .12rem;
border-radius: .02rem;
.right-answer{
display: flex;
color: #333333;
font-weight: Bold;
font-size: .15rem;
.answer-result{
margin-right: .2rem;
font-weight: Bold;
display: flex;
align-items: center;
img{
margin-right: .07rem;
}
}
.right{
color: #24C17D;
img{
height: .13rem;
width: .13rem;
}
}
.false{
color: #FA6E51;
img{
height: .12rem;
width: .12rem;
}
}
}
.answer-analysis{
margin-top: .1rem;
...
...
src/components/practice/pMultiple.vue
浏览文件 @
63f7149d
...
...
@@ -96,14 +96,17 @@ export default {
choiseSelect
(
name
){
console
.
log
(
this
.
activeName
,
222
);
if
(
!
Array
.
isArray
(
this
.
activeName
))
this
.
activeName
=
[]
if
(
!
Array
.
isArray
(
this
.
activeName
)){
this
.
activeName
=
this
.
activeName
.
replace
(
/,/g
,
''
).
split
(
''
)
}
if
(
this
.
showButton
!==
'curent'
)
return
if
(
this
.
activeName
.
indexOf
(
name
)
!=
-
1
){
this
.
activeName
.
splice
(
this
.
activeName
.
indexOf
(
name
),
1
)
}
else
{
this
.
activeName
.
push
(
name
)
}
this
.
$emit
(
'changeSelect'
,
this
.
activeName
)
let
result
=
this
.
activeName
.
join
(
''
).
replace
(
/,/g
,
''
)
this
.
$emit
(
'changeSelect'
,
result
)
}
},
}
...
...
src/router/index.js
浏览文件 @
63f7149d
...
...
@@ -102,7 +102,7 @@ let router = new Router({
title
:
"错题详情"
,
isLogin
:
true
},
component
:
()
=>
import
(
'@/views/
wrongBook/detail
.vue'
),
component
:
()
=>
import
(
'@/views/
moonMatch/viewMatch
.vue'
),
},
{
path
:
'/myCollection'
,
...
...
@@ -114,6 +114,15 @@ let router = new Router({
component
:
()
=>
import
(
'@/views/collection/index.vue'
),
},
{
path
:
'/myCollectionDetail'
,
name
:
'myCollectionDetail'
,
meta
:
{
title
:
"试题详情"
,
isLogin
:
true
},
component
:
()
=>
import
(
'@/views/moonMatch/viewMatch.vue'
),
},
{
path
:
'/myCourseware'
,
name
:
'myCourseware'
,
meta
:
{
...
...
@@ -133,7 +142,6 @@ let router = new Router({
{
path
:
'/weekPractice'
,
name
:
'weekPractice'
,
/*meta:'周周练',*/
meta
:
{
title
:
"周周练"
,
isLogin
:
true
...
...
@@ -143,7 +151,6 @@ let router = new Router({
{
path
:
'/practice'
,
name
:
'practice'
,
/*meta:'周周练试卷',*/
meta
:
{
title
:
"周周练试卷"
,
isLogin
:
true
...
...
@@ -153,7 +160,6 @@ let router = new Router({
{
path
:
'/viewPracticeReport'
,
name
:
'viewPracticeReport'
,
/*meta:'答题报告',*/
meta
:
{
title
:
"答题报告"
,
isLogin
:
true
...
...
@@ -163,7 +169,6 @@ let router = new Router({
{
path
:
'/moonMatch'
,
name
:
'moonMatch'
,
/*meta:'月月赛',*/
meta
:
{
title
:
"月月赛"
,
isLogin
:
true
...
...
@@ -173,7 +178,6 @@ let router = new Router({
{
path
:
'/match'
,
name
:
'match'
,
/*meta:'月月赛试卷',*/
meta
:
{
title
:
"月月赛试卷"
,
isLogin
:
true
...
...
@@ -181,9 +185,17 @@ let router = new Router({
component
:
()
=>
import
(
'@/views/moonMatch/match.vue'
),
},
{
path
:
'/viewMatch'
,
name
:
'viewMatch'
,
meta
:
{
title
:
"查看解析"
,
isLogin
:
true
},
component
:
()
=>
import
(
'@/views/moonMatch/viewMatch.vue'
),
},
{
path
:
'/viewMatchReport'
,
name
:
'viewMatchReport'
,
/*meta:'答题报告',*/
meta
:
{
title
:
"答题报告"
,
isLogin
:
true
...
...
@@ -194,7 +206,6 @@ let router = new Router({
{
path
:
'/answerRecord'
,
name
:
'answerRecord'
,
/*meta:'答题记录',*/
meta
:
{
title
:
"答题记录"
,
isLogin
:
true
...
...
src/views/collection/index.vue
浏览文件 @
63f7149d
...
...
@@ -67,8 +67,8 @@
},
toView
(
item
){
console
.
log
(
item
,
1
);
Toast
.
fail
(
'功能开发中'
)
// this.$router.push({name:'myWrongDetail',query:{code:item.code
}})
//
Toast.fail('功能开发中')
this
.
$router
.
push
({
name
:
'myCollectionDetail'
,
query
:{
id
:
item
.
code
,
type
:
'coll'
}})
}
},
...
...
src/views/moonMatch/index.vue
浏览文件 @
63f7149d
...
...
@@ -10,7 +10,7 @@
<span
v-if=
"item.beginTime"
>
{{
item
.
beginTime
}}
-
{{
item
.
endTime
}}
</span>
</div>
<div
class=
"item-btn"
>
<span
v-if=
"item.examStatus === '3'||item.examStatus === '-2'"
>
查看解析
</span>
<span
v-if=
"item.examStatus === '3'||item.examStatus === '-2'"
@
click=
"view(item)"
>
查看解析
</span>
<span
:class=
"statusObj[item.examStatus]&&statusObj[item.examStatus].class"
@
click=
"linkTo(item)"
>
{{
statusObj
[
item
.
examStatus
].
label
}}
</span>
</div>
</div>
...
...
@@ -80,13 +80,16 @@ export default {
}
})
},
view
(
item
){
this
.
$router
.
push
({
name
:
'viewMatch'
,
query
:{
id
:
item
.
id
,
type
:
'match'
}})
},
linkTo
(
item
){
//答题状态 0未开始 1开始答题 2继续答题 3重新答题 -1已过期(无答题记录) -2(有答题记录)
let
begin
=
()
=>
{
this
.
$router
.
push
({
name
:
'match'
,
query
:{
id
:
item
.
id
,
title
:
item
.
name
}})
}
let
conti
=
()
=>
{
this
.
$router
.
push
({
name
:
'match'
,
query
:{
id
:
item
.
id
,
title
:
item
.
name
}})
this
.
$router
.
push
({
name
:
'match'
,
query
:{
id
:
item
.
id
,
title
:
item
.
name
,
type
:
'continue'
}})
}
let
again
=
()
=>
{
this
.
$router
.
push
({
name
:
'match'
,
query
:{
id
:
item
.
id
,
title
:
item
.
name
}})
...
...
src/views/moonMatch/match.vue
浏览文件 @
63f7149d
...
...
@@ -131,7 +131,7 @@ import pMultiple from "@/components/practice/pMultiple.vue"; // 多选
import
completion
from
"@/components/practice/completion.vue"
;
// 填空
import
textCase
from
"@/components/practice/textCase.vue"
;
// 填空
import
{
getTimer
}
from
"@/utils/function.js"
import
{
getMatchDetailAPI
,
createPaperAPI
,
createRecordAPI
}
from
'@/api/moon'
import
{
getMatchDetailAPI
,
createPaperAPI
,
createRecordAPI
,
getMatchConDetailAPI
}
from
'@/api/moon'
export
default
{
beforeRouteLeave
(
to
,
from
,
next
)
{
...
...
@@ -178,6 +178,9 @@ export default {
id
:
1
,
type
:
0
,
//1 周周练 2 月月赛
},
conQuery
:{
coverId
:
null
},
id
:
0
,
currentObj
:{},
currentIndex
:
0
,
...
...
@@ -246,13 +249,17 @@ export default {
};
},
created
()
{
this
.
id
=
this
.
$route
.
query
.
id
this
.
topTitle
=
this
.
$route
.
query
.
title
let
query
=
this
.
$route
.
query
if
(
query
.
id
){
this
.
id
=
query
.
id
this
.
topTitle
=
query
.
title
this
.
listQuery
.
id
=
this
.
id
this
.
conQuery
.
coverId
=
this
.
id
this
.
createPaper
.
coverId
=
this
.
id
this
.
createPaper
.
begintime
=
getTimer
()
this
.
createRecord
.
coverId
=
this
.
id
this
.
getDetail
()
this
.
getDetail
(
query
.
type
||
''
)
}
},
mounted
(){
...
...
@@ -274,8 +281,14 @@ export default {
this
.
isShow
=
false
this
.
$router
.
push
({
name
:
'moonMatch'
})
},
getDetail
(){
getMatchDetailAPI
(
this
.
listQuery
).
then
(
res
=>
{
getDetail
(
type
){
let
API
if
(
type
==
'continue'
){
API
=
getMatchConDetailAPI
(
this
.
conQuery
)
}
else
{
API
=
getMatchDetailAPI
(
this
.
listQuery
)
}
API
.
then
(
res
=>
{
if
(
res
.
data
.
code
==
0
){
if
(
res
.
data
.
data
.
length
===
0
)
return
this
.
list
=
res
.
data
.
data
...
...
@@ -287,14 +300,35 @@ export default {
this
.
currentChildrenIndex
=
0
this
.
currentChildrenObj
=
this
.
childrenList
[
0
]
}
if
(
type
==
'continue'
){
this
.
resetList
(
this
.
list
)
this
.
currentIndex
=
-
1
this
.
nextQues
()
}
else
{
this
.
_createPaper
(
'0'
)
}
this
.
totalNum
=
this
.
_filterNum
(
this
.
list
)
}
else
{
}
})
},
// 继续答题初始化用户答案数据
resetList
(
list
){
// this.answerRecordList
list
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
questionType
==
'5'
||
item
.
questionType
==
'6'
){
item
.
children
.
forEach
((
el
,
ind
)
=>
{
this
.
_saveAnswer
(
'answer'
,
el
.
stuanswer
||
''
,
index
,
this
.
answerRecordList
,
ind
)
})
}
else
{
this
.
_saveAnswer
(
'answer'
,
item
.
stuanswer
||
''
,
index
,
this
.
answerRecordList
)
}
})
console
.
log
(
this
.
answerRecordList
,
'this.answerRecordList'
);
//
},
_filterNum
(
list
){
let
num
=
0
...
...
@@ -363,7 +397,6 @@ export default {
// children:[]
}
}
},
// 创建试卷
async
_createPaper
(
status
){
...
...
src/views/moonMatch/viewMatch.vue
0 → 100644
浏览文件 @
63f7149d
差异被折叠。
点击展开。
src/views/moonMatch/viewMatchReport.vue
浏览文件 @
63f7149d
...
...
@@ -15,7 +15,7 @@
<div
class=
"report-statistics"
>
<div
class=
"statistics-detail"
>
<div
class=
"time-wrap-top"
>
<span
class=
"item-top"
>
{{
detail
.
begintim
&&
detail
.
begintime
.
substring
(
2
,
10
).
replace
(
/-/g
,
'.'
)
}}
</span>
<span
class=
"item-top"
>
{{
detail
.
begintim
e
&&
detail
.
begintime
.
substring
(
2
,
10
).
replace
(
/-/g
,
'.'
)
}}
</span>
<span
class=
"item-top"
>
{{
detail
.
updateTime
&&
detail
.
updateTime
.
substring
(
2
,
10
).
replace
(
/-/g
,
'.'
)
}}
</span>
<span
class=
"item-top"
></span>
</div>
...
...
@@ -46,7 +46,7 @@
</div>
</div>
<div
class=
"footer-but"
>
<span
class=
"footer-back"
@
click=
"
backTo"
>
返回
</span>
<span
class=
"footer-back"
@
click=
"
view"
>
查看解析
</span>
<span
class=
"footer-again"
@
click=
"doAgain"
>
再练一次
</span>
</div>
</div>
...
...
@@ -96,10 +96,16 @@ export default {
})
},
backTo
()
{
this
.
$router
.
push
({
name
:
'weekPractice'
})
this
.
$router
.
push
({
name
:
'moonMatch'
})
},
view
(){
this
.
$router
.
push
({
name
:
'viewMatch'
,
query
:{
title
:
this
.
title
,
id
:
this
.
id
}})
},
doAgain
()
{
this
.
$router
.
push
({
name
:
'
practice
'
,
query
:{
this
.
$router
.
push
({
name
:
'
match
'
,
query
:{
title
:
this
.
title
,
id
:
this
.
id
}})
...
...
src/views/weekPractice/practice.vue
浏览文件 @
63f7149d
...
...
@@ -221,8 +221,8 @@ export default {
if
(
res
.
data
.
code
==
0
){
this
.
list
=
res
.
data
.
data
if
(
this
.
list
.
length
===
0
)
return
this
.
currentIndex
=
4
// 当前选中索引值
this
.
currentObj
=
this
.
list
[
3
]
// 当前选中题目
this
.
currentIndex
=
1
// 当前选中索引值
this
.
currentObj
=
this
.
list
[
0
]
// 当前选中题目
this
.
rightAns
=
this
.
currentObj
.
rightanswer
// 当前正确答案
this
.
colQuery
.
goodsId
=
this
.
currentObj
.
questionid
this
.
getColStatus
()
...
...
src/views/wrongBook/index.vue
浏览文件 @
63f7149d
...
...
@@ -69,8 +69,8 @@
},
toView
(
item
){
console
.
log
(
item
,
1
);
Toast
.
fail
(
'功能开发中'
)
// this.$router.push({name:'myWrongDetail',query:{code:item.code
}})
//
Toast.fail('功能开发中')
this
.
$router
.
push
({
name
:
'myWrongDetail'
,
query
:{
id
:
item
.
code
,
type
:
'wrong'
}})
}
},
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论