Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
X
x-learn
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
x-learn
Commits
1c3cfa6b
提交
1c3cfa6b
authored
12月 08, 2021
作者:
lihuihui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update
上级
a50ef44a
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
1 行增加
和
539 行删除
+1
-539
ExamInfo.vue
src/components/data/detail/ExamInfo.vue
+0
-36
QuestionDetails.vue
src/components/data/detail/QuestionDetails.vue
+0
-211
QuestionList.vue
src/components/data/detail/QuestionList.vue
+0
-44
QuestionListItem.vue
src/components/data/detail/QuestionListItem.vue
+0
-247
TopicData.vue
src/modules/teacher/data/exam/views/TopicData.vue
+1
-1
没有找到文件。
src/components/data/detail/ExamInfo.vue
deleted
100644 → 0
浏览文件 @
a50ef44a
<
template
>
<div
class=
"info-box"
>
<div
class=
"li"
v-for=
"(item, index) in data"
:key=
"index"
>
<div
class=
"th"
>
{{
item
.
title
}}
</div>
<div
class=
"td"
>
{{
item
.
value
}}
</div>
</div>
</div>
</
template
>
<
script
>
export
default
{
props
:
{
data
:
{
type
:
Array
,
default
:
()
=>
[]
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.info-box
{
display
:
flex
;
margin-bottom
:
20px
;
.li
{
flex
:
1
;
.th
{
text-align
:
center
;
color
:
#909399
;
font-size
:
16px
;
font-weight
:
bold
;
}
.td
{
text-align
:
center
;
line-height
:
30px
;
}
}
}
</
style
>
src/components/data/detail/QuestionDetails.vue
deleted
100644 → 0
浏览文件 @
a50ef44a
<
template
>
<div
class=
"question-list-item"
>
<div
class=
"question-list-public__title"
v-html=
"data.common_content"
v-if=
"data.common_content"
></div>
<div
class=
"question-list-item-hd"
>
<div
class=
"question-list-item-hd__title"
v-html=
"data.title"
></div>
</div>
<div
class=
"question-list-item-bd"
>
<!-- 单选 -->
<template
v-if=
"[1, 6].includes(questionType)"
>
<el-radio-group
v-model=
"data.answer[0]"
:disabled=
"disabled"
@
change=
"handleChange"
>
<div
class=
"question-option-item"
v-for=
"item in currentOptions"
:key=
"item.id"
>
<el-radio
:label=
"item.id"
>
<div
class=
"question-option-item__text"
v-html=
"item.option"
></div>
</el-radio>
</div>
</el-radio-group>
</
template
>
<!-- 多选 -->
<
template
v-if=
"questionType === 2"
>
<el-checkbox-group
v-model=
"data.answer"
:disabled=
"disabled"
@
change=
"handleChange"
>
<div
class=
"question-option-item"
v-for=
"item in currentOptions"
:key=
"item.id"
>
<el-checkbox
:label=
"item.id"
>
<div
class=
"question-option-item__text"
v-html=
"item.option"
></div>
</el-checkbox>
</div>
</el-checkbox-group>
</
template
>
</div>
<!-- 简答题 -->
<
template
v-if=
"questionType === 3"
>
<el-input
type=
"textarea"
v-model=
"data.answer[0]"
placeholder=
"请输入答案内容"
:autosize=
"
{ minRows: 4, maxRows: 6 }"
:disabled="disabled"
@blur="handleChange"
:maxlength="100"
:show-word-limit="true"
>
</el-input>
</
template
>
<!-- <div class="question-list-item-score">得分:{{ data.score }}</div> -->
<div
class=
"question-list-item-ft"
v-if=
"data.analysis"
>
<h3
class=
"question-list-item-ft__title"
>
答案解析
</h3>
<
template
v-if=
"questionType !== 3"
>
<div
class=
"answer-item"
>
<div
class=
"answer-item-label"
>
正确答案:
</div>
<div
class=
"answer-item-content"
>
{{
data
.
analysis
}}
</div>
</div>
</
template
>
<
template
v-else
>
<div
class=
"answer-item"
v-if=
"data.comment"
>
<div
class=
"answer-item-label"
>
老师点评:
</div>
<div
class=
"answer-item-content"
>
{{
data
.
comment
}}
</div>
</div>
</
template
>
</div>
<div
class=
"answer-item"
v-if=
"hasResult && data.question_analysis"
>
<div
class=
"answer-item-label"
>
解析:
</div>
<div
class=
"answer-item-content"
v-html=
"data.question_analysis"
></div>
</div>
</div>
</template>
<
script
>
export
default
{
props
:
{
data
:
{
type
:
Object
,
default
:
()
=>
({})
},
// 小题
question
:
{
type
:
Object
,
default
:
()
=>
({})
},
// 大题
disabled
:
{
type
:
Boolean
,
default
:
true
},
hasResult
:
{
type
:
Boolean
,
default
:
false
}
},
data
()
{
return
{}
},
mounted
()
{
},
computed
:
{
questionType
()
{
// (1:单选题,2:多选题,3:问答题,5:案例题,6:判断题,7:实操题,8:情景题)
const
questionType
=
parseInt
(
this
.
data
.
type
)
return
questionType
},
// 26个英文字母
A_Z
()
{
const
result
=
[]
for
(
let
i
=
0
;
i
<
26
;
i
++
)
{
result
.
push
(
String
.
fromCharCode
(
65
+
i
))
}
return
result
},
// 处理后的options数据
currentOptions
()
{
if
(
!
this
.
data
.
options
)
{
return
[]
}
return
this
.
data
.
options
.
map
((
item
,
index
)
=>
{
// 英文字母 + 名称
item
.
abc
=
this
.
A_Z
[
index
]
return
item
})
}
},
methods
:
{
handleChange
()
{
this
.
$emit
(
'change'
,
this
.
data
)
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.question-list-public__title
{
font-size
:
20px
;
font-weight
:
bold
;
color
:
#222
;
line-height
:
25px
;
}
.question-list-item
{
margin-bottom
:
20px
;
padding
:
20px
;
border-radius
:
5px
;
box-shadow
:
0
2px
12px
0
rgb
(
0
0
0
/
10%
);
background
:
#fff
;
margin-top
:
20px
;
}
.question-list-item-hd
{
display
:
flex
;
}
.question-list-item-hd__num
{
font-size
:
32px
;
font-weight
:
bold
;
color
:
#222
;
line-height
:
45px
;
margin-top
:
5px
;
}
.question-list-item-hd__title
{
margin-left
:
5px
;
padding-top
:
10px
;
font-size
:
16px
;
font-weight
:
bold
;
color
:
#222
;
line-height
:
25px
;
}
.question-list-item-hd__score
{
margin-left
:
auto
;
padding-top
:
10px
;
font-size
:
16px
;
// font-weight: bold;
color
:
#222
;
line-height
:
25px
;
white-space
:nowrap
;
padding-left
:
30px
;
}
.question-option-item
{
margin-top
:
20px
;
::v-deep
.el-radio
,
::v-deep
.el-checkbox
{
display
:
flex
;
align-items
:
center
;
}
}
.question-option-item__text
{
display
:
inline-block
;
font-size
:
18px
;
color
:
#222
;
}
::v-deep
.el-radio__inner
,
::v-deep
.el-checkbox__inner
{
width
:
18px
;
height
:
18px
;
}
::v-deep
.el-checkbox__inner
::after
{
width
:
4px
;
height
:
9px
;
left
:
6px
;
}
.question-list-item-ft
{
margin-top
:
20px
;
}
.question-list-item-ft__title
{
font-size
:
18px
;
font-weight
:
bold
;
color
:
#222
;
line-height
:
25px
;
}
.answer-item
{
margin-top
:
10px
;
margin-left
:
28px
;
display
:
flex
;
font-size
:
18px
;
color
:
#222
;
line-height
:
25px
;
}
.answer-item-label
{
white-space
:
nowrap
;
}
.answer-item-content
{
flex
:
1
;
overflow
:
hidden
;
}
.question-list-item-score
{
margin-left
:
auto
;
padding-top
:
10px
;
font-size
:
16px
;
color
:
#222
;
line-height
:
25px
;
white-space
:
nowrap
;
}
</
style
>
src/components/data/detail/QuestionList.vue
deleted
100644 → 0
浏览文件 @
a50ef44a
<
template
>
<div>
<div
class=
"exam-detail"
v-for=
"(data, index) in examData"
:key=
"index"
>
<div
class=
"title-type"
>
{{
questionTypeText
[
data
.
question_type
]
}}
</div>
<template
v-for=
"pItem in data.list"
>
<question-list-item
v-for=
"item in pItem"
:data=
"pItem[0]"
:question=
"data"
:key=
"item.id"
></question-list-item>
</
template
>
</div>
</div>
</template>
<
script
>
import
QuestionListItem
from
'./QuestionListItem.vue'
export
default
{
components
:
{
QuestionListItem
},
props
:
{
examData
:
{
type
:
Array
,
default
:
()
=>
[]
}
},
data
()
{
return
{
questionTypeText
:
{
1
:
'单选题'
,
2
:
'多选题'
,
3
:
'问答题'
,
5
:
'案例题'
,
6
:
'判断题'
,
7
:
'实操题'
,
8
:
'情景题'
}
}
},
computed
:
{
},
mounted
()
{
console
.
log
(
this
.
examData
.
length
,
'examData'
)
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.exam-detail
{
.title-type
{
font-size
:
16px
;
color
:
#c01540
;
}
}
</
style
>
src/components/data/detail/QuestionListItem.vue
deleted
100644 → 0
浏览文件 @
a50ef44a
<
template
>
<div
class=
"question-list-item"
>
<div
class=
"question-list-public__title"
v-html=
"data.common_content"
v-if=
"data.common_content"
></div>
<div
class=
"question-list-item-hd"
>
<div
class=
"question-list-item-hd__title"
v-html=
"data.question_content"
></div>
<div
class=
"question-list-item-hd__score"
>
本题分数:
{{
data
.
score
}}
</div>
</div>
<div
class=
"question-list-item-bd"
>
<!-- 单选 -->
<template
v-if=
"[1, 6].includes(questionType)"
>
<el-radio-group
v-model=
"data.userAnswerData.answer[0]"
:disabled=
"disabled"
@
change=
"handleChange"
>
<div
class=
"question-option-item"
v-for=
"item in currentOptions"
:key=
"item.id"
>
<el-radio
:label=
"item.id"
>
<div
class=
"question-option-item__text"
v-html=
"item.abc_option"
></div>
</el-radio>
</div>
</el-radio-group>
</
template
>
<!-- 多选 -->
<
template
v-if=
"questionType === 2"
>
<el-checkbox-group
v-model=
"data.userAnswerData.answer"
:disabled=
"disabled"
@
change=
"handleChange"
>
<div
class=
"question-option-item"
v-for=
"item in currentOptions"
:key=
"item.id"
>
<el-checkbox
:label=
"item.id"
>
<div
class=
"question-option-item__text"
v-html=
"item.abc_option"
></div>
</el-checkbox>
</div>
</el-checkbox-group>
</
template
>
</div>
<!-- 简答题 -->
<
template
v-if=
"questionType === 3"
>
<el-input
type=
"textarea"
v-model=
"data.userAnswerData.answer[0]"
placeholder=
"请输入答案内容"
:autosize=
"
{ minRows: 4, maxRows: 6 }"
:disabled="disabled"
@blur="handleChange"
:maxlength="100"
:show-word-limit="true"
>
</el-input>
</
template
>
<div
class=
"question-list-item-score"
>
得分:{{ data.userScoreData.score }}
</div>
<!-- <div class="question-list-item-ft" v-if="hasResult">
<h3 class="question-list-item-ft__title">答案解析</h3>
<template v-if="questionType !== 3">
<div class="answer-item">
<div class="answer-item-label">正确答案:</div>
<div class="answer-item-content">{{ correctAnswerText }}</div>
</div>
<div class="answer-item">
<div class="answer-item-label">您的答案:</div>
<div class="answer-item-content">{{ submitAnswerText }}</div>
</div>
</template>
<template v-else>
<div class="answer-item" v-if="data.comment">
<div class="answer-item-label">老师点评:</div>
<div class="answer-item-content">{{ data.comment }}</div>
</div>
</template>
</div> -->
<div
class=
"answer-item"
v-if=
"hasResult && data.question_analysis"
>
<div
class=
"answer-item-label"
>
解析:
</div>
<div
class=
"answer-item-content"
v-html=
"data.question_analysis"
></div>
</div>
</div>
</template>
<
script
>
export
default
{
props
:
{
data
:
{
type
:
Object
,
default
:
()
=>
({})
},
// 小题
question
:
{
type
:
Object
,
default
:
()
=>
({})
},
// 大题
disabled
:
{
type
:
Boolean
,
default
:
true
},
hasResult
:
{
type
:
Boolean
,
default
:
false
}
},
data
()
{
return
{}
},
computed
:
{
questionType
()
{
// (1:单选题,2:多选题,3:问答题,5:案例题,6:判断题,7:实操题,8:情景题)
const
questionType
=
parseInt
(
this
.
question
.
question_type
)
const
{
answer_count
:
answerCount
=
0
}
=
this
.
data
if
([
5
,
7
,
8
].
includes
(
questionType
))
{
if
(
answerCount
>=
2
)
{
return
2
}
return
answerCount
||
3
}
else
{
return
questionType
}
},
// 26个英文字母
A_Z
()
{
const
result
=
[]
for
(
let
i
=
0
;
i
<
26
;
i
++
)
{
result
.
push
(
String
.
fromCharCode
(
65
+
i
))
}
return
result
},
// 处理后的options数据
currentOptions
()
{
if
(
!
this
.
data
.
question_options
)
{
return
[]
}
return
this
.
data
.
question_options
.
map
((
item
,
index
)
=>
{
// 英文字母 + 名称
item
.
abc
=
this
.
A_Z
[
index
]
item
.
abc_option
=
`
${
this
.
A_Z
[
index
]}
.
${
item
.
option
}
`
// 提交时的选中状态
item
.
checked
=
this
.
data
.
userAnswerData
.
answer
.
includes
(
item
.
id
)
// 处理正确的选中状态
const
hasChecked
=
Object
.
prototype
.
hasOwnProperty
.
call
(
item
,
'isRight'
)
const
rightAnswer
=
this
.
data
.
question_answer
||
[]
if
(
!
hasChecked
&&
rightAnswer
)
{
item
.
isRight
=
Array
.
isArray
(
rightAnswer
)
?
rightAnswer
.
includes
(
item
.
id
)
:
rightAnswer
===
item
.
id
}
return
item
})
},
// 正确答案显示的英文字母
correctAnswerText
()
{
const
result
=
this
.
currentOptions
.
reduce
((
result
,
item
)
=>
{
item
.
isRight
&&
result
.
push
(
item
.
abc
)
return
result
},
[])
return
result
.
join
(
'、'
)
},
// // 提交答案显示的英文字母
submitAnswerText
()
{
const
result
=
this
.
currentOptions
.
reduce
((
result
,
item
)
=>
{
item
.
checked
&&
result
.
push
(
item
.
abc
)
return
result
},
[])
return
result
.
join
(
'、'
)
}
},
methods
:
{
handleChange
()
{
this
.
$emit
(
'change'
,
this
.
data
)
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.question-list-public__title
{
font-size
:
20px
;
font-weight
:
bold
;
color
:
#222
;
line-height
:
25px
;
}
.question-list-item
{
margin-bottom
:
20px
;
padding
:
20px
;
border-radius
:
5px
;
box-shadow
:
0
2px
12px
0
rgb
(
0
0
0
/
10%
);
background
:
#fff
;
margin-top
:
20px
;
}
.question-list-item-hd
{
display
:
flex
;
}
.question-list-item-hd__num
{
font-size
:
32px
;
font-weight
:
bold
;
color
:
#222
;
line-height
:
45px
;
margin-top
:
5px
;
}
.question-list-item-hd__title
{
margin-left
:
5px
;
padding-top
:
10px
;
font-size
:
16px
;
font-weight
:
bold
;
color
:
#222
;
line-height
:
25px
;
}
.question-list-item-hd__score
{
margin-left
:
auto
;
padding-top
:
10px
;
font-size
:
16px
;
// font-weight: bold;
color
:
#222
;
line-height
:
25px
;
white-space
:
nowrap
;
padding-left
:
30px
;
}
.question-option-item
{
margin-top
:
20px
;
::v-deep
.el-radio
,
::v-deep
.el-checkbox
{
display
:
flex
;
align-items
:
center
;
}
}
.question-option-item__text
{
display
:
inline-block
;
font-size
:
18px
;
color
:
#222
;
}
::v-deep
.el-radio__inner
,
::v-deep
.el-checkbox__inner
{
width
:
18px
;
height
:
18px
;
}
::v-deep
.el-checkbox__inner
::after
{
width
:
4px
;
height
:
9px
;
left
:
6px
;
}
.question-list-item-ft
{
margin-top
:
20px
;
}
.question-list-item-ft__title
{
font-size
:
18px
;
font-weight
:
bold
;
color
:
#222
;
line-height
:
25px
;
}
.answer-item
{
margin-top
:
10px
;
margin-left
:
28px
;
display
:
flex
;
font-size
:
18px
;
color
:
#222
;
line-height
:
25px
;
}
.answer-item-label
{
white-space
:
nowrap
;
}
.answer-item-content
{
flex
:
1
;
overflow
:
hidden
;
}
.question-list-item-score
{
margin-left
:
auto
;
padding-top
:
10px
;
font-size
:
16px
;
color
:
#222
;
line-height
:
25px
;
white-space
:
nowrap
;
}
</
style
>
src/modules/teacher/data/exam/views/TopicData.vue
浏览文件 @
1c3cfa6b
...
...
@@ -63,7 +63,7 @@ export default {
methods
:
{
getTopic
()
{
const
query
=
this
.
$route
.
query
const
params
=
{
type
:
'examination'
,
course_id
:
query
.
course_id
,
examination_id
:
query
.
examination_id
,
chapter_id
:
query
.
chapter_id
,
question_id
:
query
.
question_id
}
const
params
=
{
type
:
query
.
type
,
course_id
:
query
.
course_id
,
examination_id
:
query
.
examination_id
,
chapter_id
:
query
.
chapter_id
,
question_id
:
query
.
question_id
}
api
.
getQuestionsDetails
(
params
).
then
(
response
=>
{
const
data
=
response
.
data
data
.
options
.
map
((
item
,
index
)
=>
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论