Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica-professional-exam
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Culm
pica-professional-exam
提交
e0dac24d
提交
e0dac24d
编写于
10月 09, 2020
作者:
guangjun.yang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
解析相关问题
上级
7375f299
变更
6
展开全部
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
37 行增加
和
480 行删除
+37
-480
question-content.vue
src/components/question/question-content.vue
+27
-14
question-footer.vue
src/components/question/question-footer.vue
+8
-4
no-analysis.png
src/images/question/no-analysis.png
+0
-0
question copy 2.js
src/store/modules/question copy 2.js
+0
-135
question copy.js
src/store/modules/question copy.js
+0
-326
question-detail.vue
src/views/question-detail.vue
+2
-1
未找到文件。
src/components/question/question-content.vue
浏览文件 @
e0dac24d
...
...
@@ -51,19 +51,6 @@
:class=
"{'select': item.isCorrect, 'error': item.isSelected && !item.isCorrect}"
>
{{currentQuestion.unionType == 2 ? getOrderVac(index) : item.text}}
</span>
</div>
<!-- <div class="item">
<img src="../../images/question/error.png" alt="">
<span class="content">积极采取救治措施</span>
</div>
<div class="item">
<img src="../../images/question/correct.png" alt="">
<span class="content select">向上级医师报告</span>
</div>
<div class="item">
<span class="option">D</span>
<span class="content">查看病理,了解病史</span>
</div>-->
</article>
<article
class=
"c-btn-wrapper"
...
...
@@ -77,7 +64,11 @@
</article>
<article
class=
"analysis-wrapper"
v-show=
"currentQuestion.isAnalyzed"
>
<span
class=
"title"
>
解析
</span>
<div
class=
"content"
v-html=
"currentQuestion.intro"
></div>
<div
v-if=
"currentQuestion.intro"
class=
"content"
v-html=
"currentQuestion.intro"
></div>
<div
class=
"no-intro"
v-else
>
<img
src=
"../../images/question/no-analysis.png"
alt
/>
<span
class=
"text"
>
暂无相关解析
</span>
</div>
</article>
</section>
</template>
...
...
@@ -105,6 +96,12 @@ export default {
"userInfo"
])
},
// watch: {
// "currentQuestion.isAnalyzed"(newVal) {
// console.log('watch isAnalyzed', newVal);
// window.scrollTo(0, 2000);
// }
// },
data
()
{
return
{};
},
...
...
@@ -327,6 +324,22 @@ export default {
width: 100% !important;
}
}
.no-intro {
display: flex;
flex-direction: column;
align-items: center;
padding: 60px 0 120px;
img {
width: 100px;
height: 100px;
}
.text {
height: 12px;
line-height: 12px;
font-size: 12px;
color: #999999;
}
}
}
}
</
style
>
\ No newline at end of file
src/components/question/question-footer.vue
浏览文件 @
e0dac24d
...
...
@@ -91,6 +91,10 @@ export default {
this
.
currentQuestion
.
isAnalyzed
=
true
;
if
(
!
this
.
currentQuestion
.
commitFlag
)
{
this
.
commitAnswer
();
}
else
{
setTimeout
(()
=>
{
this
.
$emit
(
"scrollTop"
);
},
200
);
}
// this.$store.commit('SET_CURRENT_QUESTION', this.currentQuestion);
},
...
...
@@ -98,7 +102,6 @@ export default {
// 收藏/不收藏
toggleCollect
()
{
this
.
favor
(
this
.
currentQuestion
);
this
.
$emit
(
"scrollTop"
);
// this.$store.commit('SET_CURRENT_QUESTION', this.currentQuestion);
},
...
...
@@ -146,8 +149,6 @@ export default {
setEntry
:
true
,
token
:
this
.
userInfo
.
userToken
,
};
// 计算是否答对了题目(只有多选题,才做相应处理)
// if (this.currentQuestion.typeId == 2) {
let
isRight
=
this
.
currentQuestion
.
myAnswer
==
this
.
currentQuestion
.
answer
;
if
(
isRight
)
{
this
.
currentQuestion
.
commitFlag
=
1
;
...
...
@@ -155,7 +156,10 @@ export default {
this
.
currentQuestion
.
commitFlag
=
2
;
}
this
.
currentQuestion
.
isAnalyzed
=
true
;
// }
// this.$forceUpdate();
setTimeout
(()
=>
{
this
.
$emit
(
"scrollTop"
);
},
200
);
this
.
POST
(
`onlineexam/practise/commit`
,
params
).
then
(({
data
})
=>
{
console
.
log
(
'in commitAnswer res'
,
data
);
// if(data.resultType == 1) {
...
...
src/images/question/no-analysis.png
0 → 100755
浏览文件 @
e0dac24d
2.0 KB
src/store/modules/question copy 2.js
已删除
100644 → 0
浏览文件 @
7375f299
// import fetch from '@/utils/fetch';
// import { getBaseUrl } from '@/utils/index'
// import { setCookie, getCookie, delCookie } from '@/utils/index';
// import { envConfig } from '@/utils/env-config';
import
{
findQuestionIndexNo
}
from
"@/utils"
;
const
question
=
{
state
:
{
currentTitle
:
"题库"
,
questionList
:
[],
currentQuestion
:
{
isAnalyzed
:
false
,
options
:
[
// 从options加工出来
{
isCorrect
:
false
,
isSelected
:
true
,
text
:
"进行分析评估"
,
},
{
isCorrect
:
false
,
isSelected
:
false
,
text
:
"进行分析评估"
,
},
{
isCorrect
:
true
,
isSelected
:
true
,
text
:
"进行分析评估"
,
},
{
isCorrect
:
false
,
isSelected
:
false
,
text
:
"进行分析评估"
,
},
],
titleId
:
1
,
titleNo
:
1
,
// 题序,从1开始
typeId
:
1
,
// 题目类型ID 1-单选,2-多选,3-判断
unionId
:
""
,
// 联合类型题目,分组唯一标识
unionType
:
1
,
// 0普通题型 1-共用题干; 2-共用选项
unionQuestion
:
""
,
// 共用题干
question
:
'题干内容<img src="https://files.yunqueyi.com/image/png/protal/project/20200702161856970.png" />'
,
// 题干内容
config
:
""
,
// 选项
answer
:
""
,
// 正确答案
intro
:
""
,
// 题目解析
score
:
0
,
// 题目分值
myAnswer
:
""
,
// 我的答案
commitFlag
:
0
,
// 0还未做 1做对了 2做错了
favorFlag
:
0
,
// 0未收藏 1已收藏
pictureFlag
:
""
,
// 0没有图 1有图
questionStreamType
:
""
,
// 题干内流媒体类型:0-文本,1-图片,2-视频,3-音频
directoryId
:
0
,
// 题库ID
paperId
:
""
,
// 试卷ID
paperIndex
:
""
,
// 试卷索引
},
commonConfig
:
{
// 0: 免费; 1: 收费; 没有绑卡且是收费题库(bindStatus == 0 && freeFlag == 1)可以走免费体验流程
freeFlag
:
0
,
directoryId
:
""
,
secondSubjectId
:
0
,
cardType
:
3
,
goodsType
:
3
,
commitKind
:
1
,
// 答题来源 1:错题集 2:收藏 3:题库
},
titleConfig
:
{
bindStatus
:
0
,
// 绑卡状态:0未绑卡 1已绑卡
commitKind
:
1
,
// 答题来源 1:错题集 2:收藏 3:题库
currentTitleNo
:
0
,
// 定位答题题目id
resultId
:
0
,
// 刷题库轮次ID
totalCount
:
0
,
// 题目总数
}
},
mutations
:
{
SET_COMMON_CONIFG
:
(
state
,
payload
)
=>
{
state
.
commonConfig
=
payload
;
},
SET_TITLE_CONIFG
:
(
state
,
payload
)
=>
{
state
.
titleConfig
=
payload
;
},
SET_COMMIT_KIND
:
(
state
,
payload
)
=>
{
state
.
titleConfig
.
commitKind
=
payload
;
},
SET_FREE_FLAG
:
(
state
,
payload
)
=>
{
state
.
titleConfig
.
freeFlag
=
payload
;
},
SET_TOTAL_COUNT
:
(
state
,
payload
)
=>
{
state
.
titleConfig
.
totalCount
=
payload
;
},
SET_QUESTION_LIST
:
(
state
,
payload
)
=>
{
state
.
questionList
=
payload
;
},
SET_CURRENT_QUESTION
:
(
state
,
payload
)
=>
{
state
.
currentQuestion
=
payload
;
},
},
actions
:
{
// 处理返回的数据
handlerQuestionList
({
commit
,
state
},
rezultData
)
{
// debugger
let
questionList
=
rezultData
.
practiseTitleModelList
;
let
handlerList
=
[],
question
,
option
,
optionList
=
[],
myAnswer
=
""
,
answer
=
""
;
questionList
.
forEach
(
(
item
,
index
)
=>
{
question
=
JSON
.
parse
(
JSON
.
stringify
(
item
));
question
.
isAnalyzed
=
false
;
option
=
{};
optionList
=
[];
question
.
options
.
forEach
(
(
text
,
i
)
=>
{
option
.
isCorrect
=
false
;
option
.
isSelected
=
false
;
option
.
text
=
text
;
optionList
.
push
(
JSON
.
parse
(
JSON
.
stringify
(
option
)));
});
question
.
options
=
optionList
;
console
.
log
(
'handlerList'
,
index
);
handlerList
.
push
(
question
);
});
console
.
log
(
'in handlerList'
,
handlerList
);
let
cIndex
=
findQuestionIndexNo
(
handlerList
,
'titleNo'
,
rezultData
.
currentTitleNo
||
1
);
commit
(
"SET_CURRENT_QUESTION"
,
handlerList
[
cIndex
]);
commit
(
"SET_QUESTION_LIST"
,
handlerList
);
let
titleConfig
=
{
bindStatus
:
rezultData
.
bindStatus
,
// 绑卡状态:0未绑卡 1已绑卡
commitKind
:
rezultData
.
commitKind
,
// 答题来源 1:错题集 2:收藏 3:题库
currentTitleNo
:
rezultData
.
currentTitleNo
,
// 定位答题题目id
resultId
:
rezultData
.
resultId
,
// 刷题库轮次ID
totalCount
:
rezultData
.
totalCount
,
// 题目总数
}
commit
(
"SET_TITLE_CONIFG"
,
titleConfig
);
},
},
}
export
default
question
;
src/store/modules/question copy.js
已删除
100644 → 0
浏览文件 @
7375f299
此差异已折叠。
点击以展开。
src/views/question-detail.vue
浏览文件 @
e0dac24d
...
...
@@ -474,7 +474,8 @@ export default {
// 滚动到最上面
scrollTop
()
{
console
.
log
(
"in scrollTop"
);
window
.
scrollTo
(
0
,
2000
);
}
}
};
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录