Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
center-qa
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
center-qa
Commits
5cd51775
提交
5cd51775
authored
3月 08, 2022
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
bug fixes
上级
5b56bd37
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
43 行增加
和
27 行删除
+43
-27
QuestionItem.vue
src/modules/exam/components/QuestionItem.vue
+3
-3
MarkingPaper.vue
src/modules/exam/views/MarkingPaper.vue
+4
-0
QuestionSelect.vue
src/modules/paper/components/QuestionSelect.vue
+8
-1
List.vue
src/modules/paper/views/List.vue
+8
-1
AddChidren.vue
src/modules/question/components/AddChidren.vue
+5
-3
List.vue
src/modules/question/views/List.vue
+15
-19
没有找到文件。
src/modules/exam/components/QuestionItem.vue
浏览文件 @
5cd51775
...
@@ -2,21 +2,21 @@
...
@@ -2,21 +2,21 @@
<div
class=
"question-item"
>
<div
class=
"question-item"
>
<div
class=
"question-item-title"
v-html=
"questionData.content"
></div>
<div
class=
"question-item-title"
v-html=
"questionData.content"
></div>
<template
v-if=
"questionType === 1 || questionType === 6"
>
<template
v-if=
"questionType === 1 || questionType === 6"
>
<el-radio-group
v-model=
"questionData.answer[0]"
:disabled=
"true"
class=
"question-item-content"
>
<el-radio-group
v-model=
"questionData.
user_
answer[0]"
:disabled=
"true"
class=
"question-item-content"
>
<div
class=
"question-item-option"
v-for=
"subItem in questionData.options"
:key=
"subItem.id"
>
<div
class=
"question-item-option"
v-for=
"subItem in questionData.options"
:key=
"subItem.id"
>
<el-radio
:label=
"subItem.id"
>
{{
subItem
.
option
}}
</el-radio>
<el-radio
:label=
"subItem.id"
>
{{
subItem
.
option
}}
</el-radio>
</div>
</div>
</el-radio-group>
</el-radio-group>
</
template
>
</
template
>
<
template
v-if=
"questionType === 2"
>
<
template
v-if=
"questionType === 2"
>
<el-checkbox-group
v-model=
"questionData.answer"
:disabled=
"true"
class=
"question-item-content"
>
<el-checkbox-group
v-model=
"questionData.
user_
answer"
:disabled=
"true"
class=
"question-item-content"
>
<div
class=
"question-item-option"
v-for=
"subItem in questionData.options"
:key=
"subItem.id"
>
<div
class=
"question-item-option"
v-for=
"subItem in questionData.options"
:key=
"subItem.id"
>
<el-checkbox
:label=
"subItem.id"
>
{{
subItem
.
option
}}
</el-checkbox>
<el-checkbox
:label=
"subItem.id"
>
{{
subItem
.
option
}}
</el-checkbox>
</div>
</div>
</el-checkbox-group>
</el-checkbox-group>
</
template
>
</
template
>
<
template
v-if=
"questionType === 3"
>
<
template
v-if=
"questionType === 3"
>
<div
class=
"SAQ"
>
{{
questionData
.
answer
||
''
}}
</div>
<div
class=
"SAQ"
>
{{
questionData
.
user_answer
[
0
]
||
''
}}
</div>
<div
style=
"text-align: right"
>
<div
style=
"text-align: right"
>
<el-button
type=
"primary"
size=
"mini"
plain
@
click=
"showComment = !showComment"
>
点击评分
</el-button>
<el-button
type=
"primary"
size=
"mini"
plain
@
click=
"showComment = !showComment"
>
点击评分
</el-button>
</div>
</div>
...
...
src/modules/exam/views/MarkingPaper.vue
浏览文件 @
5cd51775
...
@@ -329,6 +329,8 @@ export default {
...
@@ -329,6 +329,8 @@ export default {
this
.
questionList
=
this
.
questionData
.
questions
.
question_items
this
.
questionList
=
this
.
questionData
.
questions
.
question_items
this
.
questionList
.
forEach
(
item
=>
{
this
.
questionList
.
forEach
(
item
=>
{
const
score
=
this
.
questionData
.
score_item
[
item
.
question_item_id
]
const
score
=
this
.
questionData
.
score_item
[
item
.
question_item_id
]
// 用户答案
const
answer
=
this
.
questionData
.
answers
[
item
.
question_item_id
]
item
.
question_list
.
forEach
(
subItem
=>
{
item
.
question_list
.
forEach
(
subItem
=>
{
if
(
subItem
.
group_id
)
{
if
(
subItem
.
group_id
)
{
subItem
.
list
.
forEach
(
it
=>
{
subItem
.
list
.
forEach
(
it
=>
{
...
@@ -338,6 +340,7 @@ export default {
...
@@ -338,6 +340,7 @@ export default {
if
(
obj
.
comment
)
it
.
comment
=
obj
.
comment
if
(
obj
.
comment
)
it
.
comment
=
obj
.
comment
if
(
it
.
answer
)
it
.
answer
=
JSON
.
parse
(
it
.
answer
)
if
(
it
.
answer
)
it
.
answer
=
JSON
.
parse
(
it
.
answer
)
if
(
it
.
options
)
it
.
options
=
JSON
.
parse
(
it
.
options
)
if
(
it
.
options
)
it
.
options
=
JSON
.
parse
(
it
.
options
)
it
.
user_answer
=
answer
[
it
.
id
]?.
answer
||
[]
})
})
}
else
{
}
else
{
const
obj
=
score
[
subItem
.
id
]
const
obj
=
score
[
subItem
.
id
]
...
@@ -346,6 +349,7 @@ export default {
...
@@ -346,6 +349,7 @@ export default {
if
(
obj
.
comment
)
subItem
.
comment
=
obj
.
comment
if
(
obj
.
comment
)
subItem
.
comment
=
obj
.
comment
if
(
subItem
.
answer
)
subItem
.
answer
=
JSON
.
parse
(
subItem
.
answer
)
if
(
subItem
.
answer
)
subItem
.
answer
=
JSON
.
parse
(
subItem
.
answer
)
if
(
subItem
.
options
)
subItem
.
options
=
JSON
.
parse
(
subItem
.
options
)
if
(
subItem
.
options
)
subItem
.
options
=
JSON
.
parse
(
subItem
.
options
)
subItem
.
user_answer
=
answer
[
subItem
.
id
]?.
answer
||
[]
}
}
})
})
})
})
...
...
src/modules/paper/components/QuestionSelect.vue
浏览文件 @
5cd51775
...
@@ -117,7 +117,14 @@ export default {
...
@@ -117,7 +117,14 @@ export default {
return
map
[
row
.
question_difficulty
]
||
row
.
question_difficulty
return
map
[
row
.
question_difficulty
]
||
row
.
question_difficulty
}
}
},
},
{
label
:
'更新人'
,
prop
:
'operator.realname'
}
{
label
:
'更新人'
,
prop
:
'operator.realname'
,
computed
({
row
})
{
const
user
=
row
.
operator
return
user
.
realname
||
user
.
nickname
||
user
.
username
}
}
]
]
}
}
}
}
...
...
src/modules/paper/views/List.vue
浏览文件 @
5cd51775
...
@@ -103,7 +103,14 @@ export default {
...
@@ -103,7 +103,14 @@ export default {
{
label
:
'试卷名称'
,
prop
:
'paper_title'
,
minWidth
:
200
},
{
label
:
'试卷名称'
,
prop
:
'paper_title'
,
minWidth
:
200
},
{
label
:
'总分'
,
prop
:
'paper_total_score'
},
{
label
:
'总分'
,
prop
:
'paper_total_score'
},
{
label
:
'及格分数'
,
prop
:
'pass_score'
},
{
label
:
'及格分数'
,
prop
:
'pass_score'
},
{
label
:
'更新人'
,
prop
:
'operator.realname'
},
{
label
:
'更新人'
,
prop
:
'operator.realname'
,
computed
({
row
})
{
const
user
=
row
.
operator
return
user
.
realname
||
user
.
nickname
||
user
.
username
}
},
{
label
:
'更新时间'
,
prop
:
'updated_at'
},
{
label
:
'更新时间'
,
prop
:
'updated_at'
},
{
label
:
'操作'
,
slots
:
'table-x'
,
align
:
'right'
,
width
:
150
}
{
label
:
'操作'
,
slots
:
'table-x'
,
align
:
'right'
,
width
:
150
}
]
]
...
...
src/modules/question/components/AddChidren.vue
浏览文件 @
5cd51775
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
<el-radio
v-model=
"source"
label=
"2"
>
新建子题目
</el-radio>
<el-radio
v-model=
"source"
label=
"2"
>
新建子题目
</el-radio>
</div>
</div>
<div
class=
"radio-tips"
v-if=
"source === '1'"
>
<div
class=
"radio-tips"
v-if=
"source === '1'"
>
子题目来自于已有题库,您可以从系统的题库中选择题目,组合成
情景
题的子题目
子题目来自于已有题库,您可以从系统的题库中选择题目,组合成
该大
题的子题目
</div>
</div>
<template
v-if=
"source == 1"
>
<template
v-if=
"source == 1"
>
<div
class=
"radio-box"
>
<div
class=
"radio-box"
>
...
@@ -168,7 +168,8 @@ export default {
...
@@ -168,7 +168,8 @@ export default {
methods
:
{
methods
:
{
// 列表checked点击 重整数据:组合成与题对应的数据
// 列表checked点击 重整数据:组合成与题对应的数据
handleSelectionChange
(
data
)
{
handleSelectionChange
(
data
)
{
this
.
checkedList
=
data
.
reduce
((
a
,
b
)
=>
{
this
.
checkedList
=
data
.
reduce
((
a
,
b
)
=>
{
const
data
=
{}
const
data
=
{}
data
.
question_title
=
b
.
question_title
data
.
question_title
=
b
.
question_title
data
.
child_question_type
=
b
.
question_type
||
1
data
.
child_question_type
=
b
.
question_type
||
1
...
@@ -178,7 +179,8 @@ export default {
...
@@ -178,7 +179,8 @@ export default {
if
(
this
.
type
!==
3
)
data
.
question_options
=
b
.
question_options
if
(
this
.
type
!==
3
)
data
.
question_options
=
b
.
question_options
a
.
push
(
data
)
a
.
push
(
data
)
return
a
return
a
},
[]).
sort
((
a
,
b
)
=>
a
.
order
-
b
.
order
)
},
[])
.
sort
((
a
,
b
)
=>
a
.
order
-
b
.
order
)
console
.
log
(
this
.
checkedList
,
'123'
)
console
.
log
(
this
.
checkedList
,
'123'
)
},
},
// 筛选更新列表
// 筛选更新列表
...
...
src/modules/question/views/List.vue
浏览文件 @
5cd51775
...
@@ -9,12 +9,6 @@
...
@@ -9,12 +9,6 @@
<template
v-slot:filter-category=
"
{ params }">
<template
v-slot:filter-category=
"
{ params }">
<question-type-cascader
v-model=
"params.question_category"
@
change=
"refetchList"
></question-type-cascader>
<question-type-cascader
v-model=
"params.question_category"
@
change=
"refetchList"
></question-type-cascader>
</
template
>
</
template
>
<
template
v-slot:category_name=
"{ row }"
>
<p
class=
"category_name"
>
{{
row
.
question_category
.
name
}}
</p>
</
template
>
<
template
v-slot:question_title=
"{ row }"
>
<p
class=
"category_name"
>
{{
row
.
question_title
}}
</p>
</
template
>
<div
class=
"operate-btn"
>
<div
class=
"operate-btn"
>
<el-button
type=
"primary"
icon=
"el-icon-plus"
@
click=
"$router.push({ path: '/question/create' })"
<el-button
type=
"primary"
icon=
"el-icon-plus"
@
click=
"$router.push({ path: '/question/create' })"
...
@@ -139,28 +133,30 @@ export default {
...
@@ -139,28 +133,30 @@ export default {
b
.
order
=
index
+
1
b
.
order
=
index
+
1
b
.
question_type
=
questionType
[
b
.
question_type
]
b
.
question_type
=
questionType
[
b
.
question_type
]
b
.
question_difficulty
=
questionDifficulty
[
b
.
question_difficulty
]
b
.
question_difficulty
=
questionDifficulty
[
b
.
question_difficulty
]
b
.
opeName
=
b
.
operator
.
realname
||
b
.
operator
.
nickname
b
.
opeName
=
b
.
operator
.
realname
||
b
.
operator
.
nickname
||
b
.
operator
.
username
a
.
push
(
b
)
a
.
push
(
b
)
return
a
return
a
},
[])
},
[])
}
}
},
},
columns
:
[
columns
:
[
{
type
:
'selection'
,
minWidth
:
'50px'
,
fixed
:
'left'
},
{
type
:
'selection'
,
fixed
:
'left'
},
{
label
:
'序号'
,
prop
:
'order'
,
width
:
50
},
{
label
:
'序号'
,
type
:
'index'
},
{
label
:
'题目类型'
,
prop
:
'question_type'
,
width
:
80
},
{
label
:
'题目类型'
,
prop
:
'question_type'
,
width
:
100
},
{
{
label
:
'试题分类'
,
prop
:
'question_category.name'
,
minWidth
:
200
},
label
:
'试题分类'
,
{
label
:
'题目标题'
,
prop
:
'question_title'
,
minWidth
:
200
},
prop
:
'question_category.category_name'
,
slots
:
'category_name'
,
width
:
200
},
{
label
:
'题目标题'
,
prop
:
'question_title'
,
width
:
200
,
slots
:
'question_title'
},
// { label: '知识点', prop: 'knowledge_point.title' },
// { label: '知识点', prop: 'knowledge_point.title' },
{
label
:
'等级难度'
,
prop
:
'question_difficulty'
,
width
:
80
},
{
label
:
'等级难度'
,
prop
:
'question_difficulty'
,
width
:
80
},
{
label
:
'更新人'
,
prop
:
'opeName'
},
{
label
:
'更新人'
,
prop
:
'operator.realname'
,
computed
({
row
})
{
const
user
=
row
.
operator
return
user
.
realname
||
user
.
nickname
||
user
.
username
}
},
{
label
:
'更新时间'
,
prop
:
'updated_at'
,
width
:
180
},
{
label
:
'更新时间'
,
prop
:
'updated_at'
,
width
:
180
},
{
label
:
'操作'
,
slots
:
'table-x'
,
align
:
'right'
,
width
:
20
0
}
{
label
:
'操作'
,
slots
:
'table-x'
,
align
:
'right'
,
width
:
15
0
}
]
]
}
}
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论