Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica-annual-summary
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
com.pica.cloud.education.frontend
pica-annual-summary
提交
6899014f
提交
6899014f
编写于
9月 28, 2020
作者:
guangjun.yang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
统计功能
判断题 其它bug
上级
71a7cc32
变更
4
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
85 行增加
和
66 行删除
+85
-66
experience-dialog.vue
src/components/question/experience-dialog.vue
+23
-13
question-content.vue
src/components/question/question-content.vue
+3
-2
question-footer.vue
src/components/question/question-footer.vue
+10
-19
question-detail.vue
src/views/question-detail.vue
+49
-32
未找到文件。
src/components/question/experience-dialog.vue
浏览文件 @
6899014f
...
...
@@ -5,7 +5,7 @@
<article
class=
"content"
>
<img
class=
"img-tips"
src=
"../../images/question/note.png"
alt=
""
>
<p
class=
"tips"
>
您已完成本次免费练习体验
</p>
<p
class=
"status"
>
对
<span
class=
"cm rn"
>
{{
rightNum
}}
</span>
题,错
<span
class=
"cm en"
>
{{
errorNum
}}
</span>
题,正确率
<span
class=
"cm rate"
>
{{
rate
}}
%
</span></p>
<p
class=
"status"
>
对
<span
class=
"cm rn"
>
{{
statisConfig
.
rightNum
}}
</span>
题,错
<span
class=
"cm en"
>
{{
statisConfig
.
errorNum
}}
</span>
题,正确率
<span
class=
"cm rate"
>
{{
statisConfig
.
rate
}}
%
</span></p>
<p
class=
"guide-tips"
>
想体验完整题目,请先激活或购买题库
</p>
<div
class=
"btn-wrapper"
>
<span
class=
"plain"
@
click=
"activeCard"
>
去激活
</span>
...
...
@@ -20,22 +20,32 @@
<
script
>
export
default
{
props
:
{
statisConfig
:
{
type
:
Object
,
default
:
()
=>
{
return
{
rightNum
:
0
,
errorNum
:
0
,
rate
:
0
}
}
},
showDialog
:
{
type
:
Boolean
,
default
:
true
,
},
rightNum
:
{
type
:
Number
|
String
,
default
:
0
,
},
errorNum
:
{
type
:
Number
|
String
,
default
:
0
,
},
rate
:
{
type
:
Number
|
String
,
default
:
0
,
}
//
rightNum: {
//
type: Number | String,
//
default: 0,
//
},
//
errorNum: {
//
type: Number | String,
//
default: 0,
//
},
//
rate: {
//
type: Number | String,
//
default: 0,
//
}
},
methods
:
{
...
...
src/components/question/question-content.vue
浏览文件 @
6899014f
...
...
@@ -22,7 +22,7 @@
</article>
<article
class=
"title-wrapper"
>
<span
class=
"type"
:class=
"
{'multi': currentQuestion.typeId == 2}">
<span>
{{
currentQuestion
.
typeId
!=
2
?
"单选题"
:
"多选
题"
}}
</span>
<span>
{{
currentQuestion
.
typeId
==
1
?
"单选题"
:
currentQuestion
.
typeId
==
2
?
"多选题"
:
"判断
题"
}}
</span>
</span>
<span
class=
"content"
v-html=
"currentQuestion.question"
></span>
<!--
<img
src=
"https://files.yunqueyi.com/image/png/protal/project/20200702161856970.png"
/>
-->
...
...
@@ -58,7 +58,7 @@
<span class="content">查看病理,了解病史</span>
</div>-->
</article>
<article
class=
"c-btn-wrapper"
v-show=
"currentQuestion.typeId == 2
&& !currentQuestion.commitFlag"
@
click=
"commitAnswer
"
>
<article
class=
"c-btn-wrapper"
v-show=
"currentQuestion.typeId == 2
"
@
click=
"commitAnswer(true)
"
>
<van-button
size=
"large"
round
color=
"#449284"
>
确 认
</van-button>
</article>
<article
class=
"answer-wrapper"
v-show=
"currentQuestion.isAnalyzed"
>
...
...
@@ -141,6 +141,7 @@ export default {
// 提交答案
commitAnswer
(
isMulti
)
{
if
(
this
.
currentQuestion
.
commitFlag
)
return
;
let
params
=
{
commitKind
:
this
.
commonConfig
.
commitKind
,
// 答题来源 1:错题集 2:收藏 3:题库
directoryId
:
this
.
currentQuestion
.
directoryId
,
// 题库ID
...
...
src/components/question/question-footer.vue
浏览文件 @
6899014f
...
...
@@ -25,21 +25,13 @@ export default {
data
()
{
return
{
queryParams
:
{
// commitKind: 1, // 答题来源 1:错题集 2:收藏 3:题库
// directoryId: 0, // 题库ID,获取错题集或收藏时传0
// pageFlag: 0, // 翻页标记:0往前翻页 1往后翻页
// pageSize: 10, // 每页大小
// secondSubjectId: 0, // 二级学科分类ID:用于判断学科下目录免费题数
// titleNo: 0, // 起始或结束题目序号,首次进入页面时传0,系统自动定位到上次做的题
commitKind
:
3
,
// 答题来源 1:错题集 2:收藏 3:题库
directoryId
:
1748
,
// 题库ID,获取错题集或收藏时传0
pageFlag
:
0
,
// 翻页标记:0往前翻页 1往后翻页
pageSize
:
5
,
// 每页大小
secondSubjectId
:
106
,
// 二级学科分类ID:用于判断学科下目录免费题数
titleNo
:
0
,
// 起始或结束题目ID,首次进入页面时传0,系统自动定位到上次做的题
commitKind
:
3
,
// 答题来源 1:错题集 2:收藏 3:题库
directoryId
:
1748
,
// 题库ID,获取错题集或收藏时传0
pageFlag
:
0
,
// 翻页标记:0往前翻页 1往后翻页
pageSize
:
5
,
// 每页大小
secondSubjectId
:
106
,
// 二级学科分类ID:用于判断学科下目录免费题数
titleNo
:
0
,
// 起始或结束题目序号,首次进入页面时传0,系统自动定位到上次做的题
}
};
},
computed
:
{
...
...
@@ -53,9 +45,7 @@ export default {
},
methods
:
{
// 上一页 // 有可能要触发上分页(前端的个数只有一条)
// TODO
previous
()
{
// debugger
if
(
this
.
currentQuestion
.
titleNo
==
1
)
{
Toast
(
"已是第一题"
);
}
else
{
...
...
@@ -64,7 +54,7 @@ export default {
"SET_CURRENT_QUESTION"
,
this
.
questionList
[
cIndex
-
1
]
||
{
answerList
:
[]
}
);
console
.
log
(
this
.
currentQuestion
.
isAnalyzed
||
(
this
.
currentQuestion
.
commitFlag
==
2
)
);
console
.
log
(
cIndex
==
1
,
this
.
currentQuestion
.
titleNo
>
2
);
if
(
cIndex
==
1
&&
this
.
currentQuestion
.
titleNo
>
2
)
{
this
.
$emit
(
"pageQuestion"
,
0
,
this
.
questionList
[
0
].
titleNo
);
}
...
...
@@ -75,8 +65,8 @@ export default {
// TODO
next
()
{
// if (this.currentQuestion.titleNo == this.totalCount) {
if
(
this
.
currentQuestion
.
titleNo
==
this
.
questionList
.
length
)
{
// Toast("已是最后一题");
if
(
this
.
currentQuestion
.
titleNo
==
this
.
questionList
.
length
||
this
.
currentQuestion
.
titleNo
==
this
.
questionList
[
this
.
questionList
.
length
-
1
].
titleNo
)
{
this
.
$emit
(
"statistics"
);
}
else
{
let
cIndex
=
findQuestionIndexNo
(
this
.
questionList
,
'titleNo'
,
this
.
currentQuestion
.
titleNo
);
...
...
@@ -95,6 +85,7 @@ export default {
// 解析
toggleAnalysis
()
{
this
.
currentQuestion
.
isAnalyzed
=
true
;
this
.
$parent
.
refs
[
'questionContentRef'
]
&&
this
.
$parent
.
refs
[
'questionContentRef'
].
commitAnswer
(
this
.
currentQuestion
.
typeId
==
2
);
// this.$store.commit('SET_CURRENT_QUESTION', this.currentQuestion);
},
...
...
src/views/question-detail.vue
浏览文件 @
6899014f
...
...
@@ -6,13 +6,14 @@
:total=
"titleConfig.totalCount"
></question-header>
<article
class=
"body"
>
<question-content
v-show=
"questionList.length"
></question-content>
<question-content
ref=
"questionContentRef"
v-show=
"questionList.length"
></question-content>
<no-content
v-show=
"!questionList.length"
:listType=
"commitKind"
></no-content>
</article>
<!--
<free-tips
></free-tips>
-->
<question-footer
@
statistics=
"statistics"
@
pageQuestion=
"pageQuestion"
></question-footer>
<question-footer
v-show=
"questionList.length"
@
statistics=
"statistics"
@
pageQuestion=
"pageQuestion"
></question-footer>
<ExperienceDialog
:showDialog=
"experienceDialog"
:statisConfig=
"statisConfig"
@
activeCard=
"activeCard"
@
buyCard=
"buyCard"
@
close=
"experienceDialog = false"
...
...
@@ -95,14 +96,21 @@ export default {
titleNo
:
0
,
// 起始或结束题目ID,首次进入页面时传0,系统自动定位到上次做的题
pageFlag
:
0
,
// 翻页标记:0往前翻页 1往后翻页
pageSize
:
5
,
// 每页大小
},
statisConfig
:
{
rightNum
:
0
,
errorNum
:
0
,
rate
:
0
}
};
},
computed
:
{
...
mapGetters
([
"userInfo"
,
"questionList"
,
"currentQuestion"
,
"totalCount"
,
"commonConfig"
,
"titleConfig"
]),
needFixed
()
{
...
...
@@ -127,27 +135,15 @@ export default {
this
.
queryParams
.
directoryId
=
this
.
directoryId
;
this
.
queryParams
.
secondSubjectId
=
this
.
secondSubjectId
;
// queryParams: {
// commitKind: 3, // 答题来源 1:错题集 2:收藏 3:题库
// directoryId: 1748, // 题库ID,获取错题集或收藏时传0
// pageFlag: 0, // 翻页标记:0往前翻页 1往后翻页
// pageSize: 5, // 每页大小
// secondSubjectId: 106, // 二级学科分类ID:用于判断学科下目录免费题数
// titleNo: 0 // 起始或结束题目ID,首次进入页面时传0,系统自动定位到上次做的题
// }
window
.
__getUserInfoForQD
=
function
(
param
)
{
_this
.
token
=
param
.
userToken
;
_this
.
setUserInfo
(
param
);
_this
.
getPractiseTitles
(
true
);
// _this.checkToken();
_this
.
init
();
};
if
(
__isWeb
)
{
_this
.
getPractiseTitles
(
true
);
}
else
{
_this
.
init
();
// _this.getUserInfo();
}
else
{
this
.
getUserInfo
();
}
window
.
__refresh
=
function
()
{
...
...
@@ -177,8 +173,7 @@ export default {
goodsType
:
this
.
goodsType
,
commitKind
:
this
.
commitKind
// 答题来源 1:错题集 2:收藏 3:题库
});
this
.
getUserInfo
();
// this.getPractiseTitles();
this
.
getPractiseTitles
(
true
);
// this.preJumper();
},
...
...
@@ -191,13 +186,34 @@ export default {
// 统计当前信息
statistics
()
{
let
correctNum
=
0
,
errNum
=
0
,
// 如果是收费的题库(不是错题集或收载),并且没有绑定卡
console
.
log
(
this
.
commonConfig
.
freeFlag
,
this
.
commitKind
==
3
,
!
this
.
titleConfig
.
bindStatus
);
if
(
!
(
this
.
commonConfig
.
freeFlag
==
1
&&
this
.
commitKind
==
3
&&
!
this
.
titleConfig
.
bindStatus
))
{
Toast
(
"已是最后一题"
);
return
;
}
let
rightNum
=
0
,
errorNum
=
0
,
rate
=
0
;
this
.
questionList
.
forEach
(
item
=>
{
if
(
item
.
commitKind
)
{
if
(
item
.
commitFlag
)
{
if
(
item
.
myAnswer
==
item
.
answer
)
{
rightNum
++
;
}
else
{
errorNum
++
;
}
}
});
console
.
log
();
if
((
rightNum
+
errorNum
)
>
0
)
{
rate
=
(
rightNum
*
100
/
(
rightNum
+
errorNum
)).
toFixed
(
0
);
this
.
statisConfig
=
{
rightNum
,
errorNum
,
rate
}
}
this
.
experienceDialog
=
true
;
},
...
...
@@ -210,20 +226,21 @@ export default {
// 打开激活弹框
activeCard
()
{
this
.
experienceDialog
=
false
;
this
.
showChangeCard
=
true
;
this
.
checkTokenForNative
(()
=>
{
this
.
experienceDialog
=
false
;
this
.
showChangeCard
=
true
;
});
},
buyCard
()
{
!
__isWeb
&&
this
.
confirm
();
this
.
checkTokenForNative
(()
=>
{
this
.
confirm
();
});
},
// 跳转到原生的购买页面
confirm
()
{
// this.$sendBuriedData({
// component_tag: `882#88203`
// });
let
appVersion
=
this
.
userInfo
.
appVersion
||
""
;
let
appVersionNum
=
appVersion
.
split
(
"."
).
join
(
""
);
if
(
appVersionNum
<
344
)
{
...
...
@@ -256,7 +273,6 @@ export default {
seqNo
:
1
}
];
this
.
$refs
.
tcPlayerRef
&&
this
.
$refs
.
tcPlayerRef
.
pause
();
rocNative
.
dispatchEventByModuleCode
({
modeCode
:
"M200"
,
jsonString
:
paramList
...
...
@@ -292,13 +308,14 @@ export default {
// 分页获取题目(前、后翻页)
getPractiseTitles
(
isFirst
)
{
if
(
isFirst
)
{
this
.
$store
.
commit
(
"SET_QUESTION_LIST"
,
[]);
}
this
.
GET
(
`portal/titleTest/practise/titles`
,
this
.
queryParams
).
then
(
({
data
})
=>
{
this
.
currentTitleNo
=
data
.
currentTitleNo
;
data
.
isFirst
=
isFirst
;
this
.
handlerQuestionList
(
data
);
// this.handlerPractiseData(data.practiseTitleModelList);
console
.
log
(
data
);
}
);
},
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录