Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
center-qa
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
center-qa
Commits
cbc9a7bb
提交
cbc9a7bb
authored
2月 28, 2022
作者:
lihuihui
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
https://gitlab-pro.ezijing.com/ezijing-web/qbs
上级
82ecb589
cb86b7b9
显示空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
695 行增加
和
72 行删除
+695
-72
api.js
src/modules/exam/api.js
+12
-0
BaseInfo.vue
src/modules/exam/components/BaseInfo.vue
+22
-13
CheckPaper.vue
src/modules/exam/components/CheckPaper.vue
+13
-9
ExamSetting.vue
src/modules/exam/components/ExamSetting.vue
+4
-8
PaperQuestion.vue
src/modules/exam/components/PaperQuestion.vue
+81
-0
PersonalInfo.vue
src/modules/exam/components/PersonalInfo.vue
+3
-3
QuestionItem.vue
src/modules/exam/components/QuestionItem.vue
+145
-0
index.js
src/modules/exam/index.js
+5
-0
Detail.vue
src/modules/exam/views/Detail.vue
+52
-37
List.vue
src/modules/exam/views/List.vue
+1
-1
MarkingPaper.vue
src/modules/exam/views/MarkingPaper.vue
+355
-0
vite.config.js
vite.config.js
+2
-1
没有找到文件。
src/modules/exam/api.js
浏览文件 @
cbc9a7bb
...
...
@@ -85,3 +85,15 @@ export function importStudent(data) {
withCredentials
:
true
})
}
/**
* 获取试卷详情
*/
export
function
getPaperDetails
(
params
)
{
return
httpRequest
.
get
(
'/api/exam/v1/exam/sheet-detail'
,
{
params
})
}
/**
* 批改试卷
*/
export
function
submitPaper
(
data
)
{
return
httpRequest
.
post
(
'/api/exam/v1/exam/submit-sheet'
,
data
)
}
src/modules/exam/components/BaseInfo.vue
浏览文件 @
cbc9a7bb
...
...
@@ -50,7 +50,7 @@
</
template
>
<
script
>
import
{
updateExam
}
from
'../api'
import
{
updateExam
,
getExamPaperDetail
}
from
'../api'
import
VEditor
from
'@/components/tinymce/Index.vue'
export
default
{
components
:
{
VEditor
},
...
...
@@ -81,23 +81,32 @@ export default {
end_time
()
{
return
this
.
exam_time
[
1
]
},
row
()
{
return
JSON
.
parse
(
this
.
$route
.
query
.
row
)
exam_id
()
{
return
this
.
$route
.
query
.
exam_id
}
},
mounted
()
{
if
(
this
.
$route
.
query
.
isEdit
===
'2'
&&
this
.
row
)
{
this
.
exam_time
=
[
this
.
row
.
start_time
,
this
.
row
.
end_time
]
this
.
name
=
this
.
row
.
name
this
.
config
.
enabled_before
=
this
.
row
.
config
.
enabled_before
this
.
config
.
enabled_after
=
this
.
row
.
config
.
enabled_after
this
.
config
.
before_login
=
this
.
row
.
config
.
before_login
this
.
config
.
after_login
=
this
.
row
.
config
.
after_login
this
.
config
.
welcome_message
=
this
.
row
.
config
.
welcome_message
this
.
config
.
waiting_message
=
this
.
row
.
config
.
waiting_message
if
(
this
.
$route
.
query
.
isEdit
===
'2'
&&
this
.
exam_id
)
{
this
.
getDetailInfo
()
}
},
methods
:
{
getDetailInfo
()
{
getExamPaperDetail
({
id
:
this
.
exam_id
}).
then
(
res
=>
{
console
.
log
(
res
)
const
detailList
=
res
.
data
.
exam_info
// this.exam_time = [detailList.start_time, detailList.end_time]
this
.
name
=
detailList
.
name
const
config
=
JSON
.
parse
(
detailList
.
config
)
this
.
config
.
enabled_before
=
config
.
enabled_before
this
.
config
.
enabled_after
=
config
.
enabled_after
this
.
config
.
before_login
=
config
.
before_login
this
.
config
.
after_login
=
config
.
after_login
this
.
config
.
welcome_message
=
config
.
welcome_message
this
.
config
.
waiting_message
=
config
.
waiting_message
})
},
// 下一步
nextStep
()
{
const
params
=
{
name
:
this
.
name
,
...
...
@@ -124,7 +133,7 @@ export default {
},
saveExamInfo
()
{
const
params
=
{
id
:
this
.
row
.
exam_id
,
id
:
this
.
exam_id
,
type
:
'basic'
,
name
:
this
.
name
,
start_time
:
this
.
start_time
,
...
...
src/modules/exam/components/CheckPaper.vue
浏览文件 @
cbc9a7bb
...
...
@@ -26,7 +26,7 @@
</
template
>
<
script
>
import
{
getExamPaperList
,
updateExam
}
from
'../api'
import
{
getExamPaperList
,
updateExam
,
getExamPaperDetail
}
from
'../api'
export
default
{
data
()
{
return
{
...
...
@@ -54,7 +54,10 @@ export default {
this
.
ExamParerList
.
push
({
label
:
b
.
paper_title
,
key
:
b
.
id
})
return
this
.
ExamParerList
},
[])
this
.
getCheckedExam
()
// this.getCheckedExam()
if
(
this
.
$route
.
query
.
exam_id
&&
this
.
$route
.
query
.
isEdit
===
'2'
)
{
this
.
getDetailInfo
()
// 获取详情
}
})
},
lastStep
()
{
...
...
@@ -80,23 +83,24 @@ export default {
this
.
$emit
(
'getCheckPaperList'
,
this
.
checkedArrs
)
},
saveExamInfo
()
{
const
params
=
{
id
:
this
.
$route
.
query
.
id
,
type
:
'paper'
,
exam_paper
:
this
.
q
.
toString
()
}
const
params
=
{
id
:
this
.
$route
.
query
.
exam_
id
,
type
:
'paper'
,
exam_paper
:
this
.
q
.
toString
()
}
updateExam
(
params
).
then
(
res
=>
{
history
.
go
(
-
1
)
})
},
getCheckedExam
()
{
if
(
this
.
$route
.
query
.
papers
)
{
const
papers
=
JSON
.
parse
(
this
.
$route
.
query
.
papers
)
getDetailInfo
()
{
getExamPaperDetail
({
id
:
this
.
$route
.
query
.
exam_id
}).
then
(
res
=>
{
const
parperList
=
res
.
data
.
exam_info
.
paper_list
console
.
log
(
parperList
)
const
arr
=
[]
pa
pers
.
forEach
(
element
=>
{
pa
rperList
.
forEach
(
element
=>
{
const
findItem
=
this
.
ExamParerList
.
find
(
item
=>
{
return
item
.
label
===
element
return
item
.
label
===
element
.
paper_title
}).
key
findItem
&&
arr
.
push
(
findItem
)
})
this
.
q
=
arr
}
}
)
}
},
mounted
()
{
...
...
src/modules/exam/components/ExamSetting.vue
浏览文件 @
cbc9a7bb
...
...
@@ -95,11 +95,7 @@ export default {
}
}
},
computed
:
{
row
()
{
return
JSON
.
parse
(
this
.
$route
.
query
.
row
)
}
},
methods
:
{
lastStep
()
{
this
.
$parent
.
$parent
.
lastStep
()
...
...
@@ -110,7 +106,7 @@ export default {
},
saveExamInfo
()
{
const
params
=
{
id
:
JSON
.
parse
(
this
.
$route
.
query
.
row
)
.
exam_id
,
id
:
this
.
$route
.
query
.
exam_id
,
type
:
'config'
,
config
:
{
enabled_ip_limit
:
this
.
config
.
enabled_ip_limit
,
...
...
@@ -131,7 +127,7 @@ export default {
},
getDetail
()
{
const
params
=
{
id
:
JSON
.
parse
(
this
.
$route
.
query
.
row
)
.
exam_id
id
:
this
.
$route
.
query
.
exam_id
}
getExamPaperDetail
(
params
).
then
(
res
=>
{
const
config
=
JSON
.
parse
(
res
.
data
.
exam_info
.
config
)
...
...
@@ -149,7 +145,7 @@ export default {
}
},
mounted
()
{
if
(
this
.
$route
.
query
.
isEdit
===
'2'
&&
JSON
.
parse
(
this
.
$route
.
query
.
row
)
)
{
if
(
this
.
$route
.
query
.
isEdit
===
'2'
&&
this
.
$route
.
query
.
exam_id
)
{
this
.
getDetail
()
}
}
...
...
src/modules/exam/components/PaperQuestion.vue
0 → 100644
浏览文件 @
cbc9a7bb
<
template
>
<el-card
class=
"container"
>
<div
slot=
"header"
class=
"clearfix"
>
<span>
{{
options
.
question_item_title
}}
</span>
</div>
<div
class=
"content"
>
<template
v-for=
"item in options.question_list"
>
<div
class=
"sub-content"
v-if=
"item.group_id"
:key=
"item.id"
>
<div
class=
"title"
v-html=
"item.common_content"
></div>
<div
class=
"sub-container"
>
<question-item
v-for=
"subItem in item.list"
:key=
"subItem.id"
:question=
"
{item: subItem, question_item_id, questionType}" :question_item_id="question_item_id" />
</div>
</div>
<question-item
v-else
:question=
"
{item, question_item_id, questionType}" :question_item_id="question_item_id" :key="item.id" />
</
template
>
</div>
</el-card>
</template>
<
script
>
import
QuestionItem
from
'./QuestionItem.vue'
export
default
{
props
:
{
options
:
{
type
:
Object
,
default
()
{
return
{}
}
},
question_item_id
:
{
type
:
String
}
},
components
:
{
QuestionItem
},
data
()
{
return
{}
},
computed
:
{
questionType
()
{
return
this
.
options
.
question_item_type
},
// 选项类型
questionTypeText
()
{
const
map
=
{
1
:
'单选题'
,
2
:
'多选题'
,
3
:
'问答题'
,
5
:
'案例题'
,
6
:
'判断题'
,
7
:
'实操题'
,
8
:
'情景题'
}
return
map
[
this
.
questionType
]
}
},
created
()
{
// console.log(this.options)
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.container
{
background
:
#fff
;
border
:
1px
solid
#f3f3f3
;
margin-bottom
:
20px
;
border-radius
:
6px
;
::v-deep
.el-card__body
{
padding
:
10px
20px
;
}
.content
{
// border:1px solid #f3f3f3;
padding
:
10px
;
.title
{
line-height
:
40px
;
font-size
:
16px
;
}
.sub-container
{
border
:
1px
solid
#e3e3e3
;
padding
:
15px
15px
0
;
border-radius
:
4px
;
}
.sub-content
{
margin-bottom
:
20px
;
}
.question-item
:last-child
{
border
:none
;
}
}
}
</
style
>
src/modules/exam/components/PersonalInfo.vue
浏览文件 @
cbc9a7bb
...
...
@@ -135,7 +135,7 @@ export default {
},
getDetail
()
{
const
params
=
{
id
:
JSON
.
parse
(
this
.
$route
.
query
.
row
)
.
exam_id
id
:
this
.
$route
.
query
.
exam_id
}
getExamPaperDetail
(
params
).
then
(
res
=>
{
const
list
=
JSON
.
parse
(
res
.
data
.
exam_info
.
config
).
info
...
...
@@ -148,7 +148,7 @@ export default {
},
saveExamInfo
()
{
const
params
=
{
id
:
JSON
.
parse
(
this
.
$route
.
query
.
row
)
.
exam_id
,
id
:
this
.
$route
.
query
.
exam_id
,
type
:
'student'
,
config
:
{
info
:
{
...
...
@@ -170,7 +170,7 @@ export default {
}
},
mounted
()
{
if
(
this
.
$route
.
query
.
isEdit
===
'2'
)
{
if
(
this
.
$route
.
query
.
isEdit
===
'2'
&&
this
.
$route
.
query
.
exam_id
)
{
this
.
getDetail
()
}
}
...
...
src/modules/exam/components/QuestionItem.vue
0 → 100644
浏览文件 @
cbc9a7bb
<
template
>
<div
class=
"question-item"
>
<div
class=
"question-item-title"
v-html=
"questionData.content"
></div>
<template
v-if=
"questionType === 1 || questionType === 6"
>
<el-radio-group
v-model=
"questionData.answer[0]"
:disabled=
"true"
class=
"question-item-content"
>
<div
class=
"question-item-option"
v-for=
"subItem in questionData.options"
:key=
"subItem.id"
>
<el-radio
:label=
"subItem.id"
>
{{
subItem
.
option
}}
</el-radio>
</div>
</el-radio-group>
</
template
>
<
template
v-if=
"questionType === 2"
>
<el-checkbox-group
v-model=
"questionData.answer"
:disabled=
"true"
class=
"question-item-content"
>
<div
class=
"question-item-option"
v-for=
"subItem in questionData.options"
:key=
"subItem.id"
>
<el-checkbox
:label=
"subItem.id"
>
{{
subItem
.
option
}}
</el-checkbox>
</div>
</el-checkbox-group>
</
template
>
<
template
v-if=
"questionType === 3"
>
<div
class=
"SAQ"
>
{{
questionData
.
answer
||
''
}}
</div>
<div
style=
"text-align:right;"
>
<el-button
type=
"primary"
size=
"mini"
plain
@
click=
"showComment = !showComment"
>
点击评分
</el-button>
</div>
<div
class=
"comment"
v-show=
"showComment"
>
<div
class=
"comment-top"
>
<p>
本题
{{
questionData
.
score
}}
分
</p>
<div
class=
"get-score"
>
学生得分:
<el-input-number
v-model=
"questionData.get_score"
controls-position=
"right"
:min=
"0"
:max=
"questionData.score"
size=
"mini"
></el-input-number>
</div>
</div>
<el-input
type=
"textarea"
placeholder=
"请输入评语"
v-model=
"comment"
rows=
"3"
/>
<div
style=
"text-align:center;padding-top:10px;"
>
<el-button
type=
"primary"
size=
"mini"
@
click=
"handleComment"
>
提交点评
</el-button>
</div>
</div>
</
template
>
<div
class=
"question-item-score"
>
得分:{{questionData.get_score}}分
</div>
</div>
</template>
<
script
>
import
{
submitPaper
}
from
'../api.js'
export
default
{
props
:
{
question
:
{
type
:
Object
,
default
()
{
return
{}
}
},
question_item_id
:
{
type
:
String
}
},
data
()
{
return
{
questionData
:
{},
showComment
:
false
,
comment
:
''
}
},
computed
:
{
questionType
()
{
// 1单选,2多选,3简答,5案例题, 6判断, 7实操,8情景
const
type
=
this
.
questionData
.
type
||
this
.
question
.
questionType
||
1
return
parseInt
(
type
)
},
eid
()
{
return
this
.
$route
.
query
.
eid
}
// // 选项类型
// questionTypeText() {
// const map = { 1: '单选题', 2: '多选题', 3: '问答题', 5: '案例题', 6: '判断题', 7: '实操题', 8: '情景题' }
// return map[this.questionType]
// }
},
created
()
{
this
.
questionData
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
question
.
item
))
console
.
log
(
this
.
question
)
},
methods
:
{
handleComment
()
{
console
.
log
(
this
.
question_item_id
)
console
.
log
(
this
.
questionData
)
this
.
fetchComment
()
},
fetchComment
()
{
const
params
=
{
sheet_id
:
this
.
eid
,
question_item_id
:
this
.
question_item_id
,
question_id
:
this
.
questionData
.
id
,
score
:
this
.
questionData
.
get_score
,
comment
:
this
.
comment
}
submitPaper
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
$message
.
success
(
'提交点评成功'
)
}
else
{
this
.
$message
.
success
(
'提交点评失败'
)
}
})
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.question-item
{
font-size
:
14px
;
color
:
#454545
;
border-bottom
:
1px
solid
#f3f3f3
;
margin-bottom
:
10px
;
.question-item-content
{
padding-left
:
10px
;
.question-item-option
{
padding-top
:
10px
;
}
}
.SAQ
{
min-height
:
60px
;
font-size
:
14px
;
line-height
:
24px
;
color
:
#888
;
border
:
1px
solid
#eee
;
background
:
#f3f3f3
;
margin
:
10px
0
;
border-radius
:
6px
;
}
.comment
{
border
:
1px
solid
rgba
(
192
,
28
,
64
,
.3
);
border-radius
:
4px
;
padding
:
10px
;
margin-top
:
15px
;
background
:
#f9f9f9
;
.comment-top
{
display
:
flex
;
margin-bottom
:
10px
;
p
{
flex
:
1
;
}
}
}
.question-item-score
{
color
:
#777
;
padding
:
10px
0
;
}
}
</
style
>
src/modules/exam/index.js
浏览文件 @
cbc9a7bb
...
...
@@ -25,6 +25,11 @@ const routes = [
component
:
()
=>
import
(
'./views/Detail.vue'
),
meta
:
{
title
:
'考试详情'
}
},
{
path
:
'markingPaper'
,
component
:
()
=>
import
(
'./views/MarkingPaper.vue'
),
meta
:
{
title
:
'批阅试卷'
}
},
{
path
:
'createStudent'
,
component
:
()
=>
import
(
'./views/CreateStudent.vue'
),
...
...
src/modules/exam/views/Detail.vue
浏览文件 @
cbc9a7bb
...
...
@@ -13,9 +13,7 @@
<el-dropdown-item
@
click
.
native=
"dialogVisible = true"
:disabled=
"this.multipleSelection.length === 0"
>
转移考生
</el-dropdown-item
>
<el-dropdown-item
@
click
.
native=
"exportDetail"
:disabled=
"this.multipleSelection.length === 0"
>
导出明细
</el-dropdown-item
>
<el-dropdown-item
@
click
.
native=
"exportDetail"
>
导出明细
</el-dropdown-item>
<el-dropdown-item
@
click
.
native=
"delStudent"
:disabled=
"this.multipleSelection.length === 0"
>
删除考生
</el-dropdown-item
>
...
...
@@ -59,15 +57,15 @@ import {
getTranserList
,
transferStudent
}
from
'../api'
const
stuStatus
=
[
{
id
:
'1'
,
name
:
'未开考'
},
{
id
:
'2'
,
name
:
'已登录'
},
{
id
:
'3'
,
name
:
'考试中'
},
{
id
:
'4'
,
name
:
'已中断'
},
{
id
:
'5'
,
name
:
'已提交'
},
{
id
:
'6'
,
name
:
'已完成'
},
{
id
:
'7'
,
name
:
'待批阅'
}
]
//
const stuStatus = [
//
{ id: '1', name: '未开考' },
//
{ id: '2', name: '已登录' },
//
{ id: '3', name: '考试中' },
//
{ id: '4', name: '已中断' },
//
{ id: '5', name: '已提交' },
//
{ id: '6', name: '已完成' },
//
{ id: '7', name: '待批阅' }
//
]
export
default
{
data
()
{
return
{
...
...
@@ -84,7 +82,7 @@ export default {
remote
:
{
httpRequest
:
getExamPaperDetail
,
params
:
{
id
:
this
.
row
.
exam_id
id
:
this
.
exam_id
}
},
filters
:
[
...
...
@@ -99,20 +97,32 @@ export default {
type
:
'input'
,
prop
:
'school'
,
label
:
'学校'
},
{
type
:
'select'
,
prop
:
'relation_status'
,
placeholder
:
'请选择考生状态'
,
options
:
stuStatus
,
labelKey
:
'name'
,
valueKey
:
'id'
,
label
:
'考生状态'
}
// {
// type: 'select',
// prop: 'relation_status',
// placeholder: '请选择考生状态',
// options: stuStatus,
// labelKey: 'name',
// valueKey: 'id',
// label: '考生状态'
// }
],
columns
:
[
{
type
:
'selection'
,
minWidth
:
'50px'
,
fixed
:
'left'
},
{
label
:
'考生状态'
,
prop
:
'exam_status'
},
{
label
:
'试卷状态'
,
prop
:
'sheet.status'
,
computed
({
row
})
{
if
(
row
.
sheet
.
status
===
0
)
{
return
'未提交'
}
else
if
(
row
.
sheet
.
status
===
1
)
{
return
'待批阅'
}
else
if
(
row
.
sheet
.
status
===
2
)
{
return
'已批改'
}
}
},
{
label
:
'准考证号'
,
prop
:
'examinee_number'
},
{
label
:
'身份证号'
,
prop
:
'id_number'
},
{
label
:
'电话'
,
prop
:
'mobile'
},
...
...
@@ -125,12 +135,18 @@ export default {
]
}
},
row
()
{
return
JSON
.
parse
(
this
.
$route
.
query
.
row
)
exam_id
()
{
return
this
.
$route
.
query
.
exam_id
}
},
methods
:
{
handleDetail
()
{},
handleDetail
(
row
)
{
console
.
log
(
row
)
this
.
$router
.
push
({
path
:
'markingPaper'
,
query
:
{
eid
:
this
.
exam_id
,
sid
:
row
.
student_id
}
})
},
// 获取选中项
handleSelectionChange
(
val
)
{
this
.
multipleSelection
=
val
...
...
@@ -138,7 +154,7 @@ export default {
// 复制考试地址
copyExamUrl
()
{
const
copyDom
=
document
.
querySelector
(
'#copyInput'
)
copyDom
.
value
=
window
.
location
.
origin
+
'/login/'
+
this
.
row
.
exam_id
copyDom
.
value
=
window
.
location
.
origin
+
'/login/'
+
this
.
exam_id
copyDom
.
select
()
// 选择对象
document
.
execCommand
(
'Copy'
)
this
.
$message
({
...
...
@@ -150,19 +166,18 @@ export default {
handleAddStudent
()
{
this
.
$router
.
push
({
path
:
'createStudent'
,
query
:
{
id
:
this
.
row
.
exam_id
}
query
:
{
id
:
this
.
exam_id
}
})
},
// 考试信息编辑
editExamInfo
()
{
this
.
$router
.
push
({
path
:
'baseInfo'
,
query
:
{
row
:
JSON
.
stringify
(
this
.
row
)
,
isEdit
:
'2'
}
})
this
.
$router
.
push
({
path
:
'baseInfo'
,
query
:
{
exam_id
:
this
.
exam_id
,
isEdit
:
'2'
}
})
},
// 考试试卷编辑
editExam
()
{
console
.
log
(
this
.
row
)
this
.
$router
.
push
({
path
:
'checkPaper'
,
query
:
{
papers
:
JSON
.
stringify
(
this
.
row
.
papers
),
isEdit
:
'2'
,
id
:
this
.
row
.
exam_id
}
query
:
{
exam_id
:
this
.
exam_id
,
isEdit
:
'2'
}
})
},
// 信息采集编辑
...
...
@@ -170,7 +185,7 @@ export default {
this
.
$router
.
push
({
path
:
'personalInfo'
,
query
:
{
row
:
JSON
.
stringify
(
this
.
row
)
,
exam_id
:
this
.
exam_id
,
isEdit
:
'2'
}
})
...
...
@@ -180,7 +195,7 @@ export default {
this
.
$router
.
push
({
path
:
'examSetting'
,
query
:
{
row
:
JSON
.
stringify
(
this
.
row
)
,
exam_id
:
this
.
exam_id
,
isEdit
:
'2'
}
})
...
...
@@ -196,7 +211,7 @@ export default {
// 导出明细
exportDetail
()
{
const
params
=
{
id
:
this
.
row
.
exam_id
,
id
:
this
.
exam_id
,
name
:
''
,
relation_status
:
''
,
school
:
''
...
...
@@ -221,7 +236,7 @@ export default {
confirmButtonText
:
'确定'
}).
then
(()
=>
{
const
studentId
=
this
.
multipleSelection
.
map
(
item
=>
item
.
student_id
).
toString
()
const
params
=
{
exam_id
:
this
.
row
.
exam_id
,
students_id
:
studentId
}
const
params
=
{
exam_id
:
this
.
exam_id
,
students_id
:
studentId
}
sendMessage
(
params
).
then
(
res
=>
{
this
.
$message
.
success
(
'信息发送成功'
)
})
...
...
@@ -229,7 +244,7 @@ export default {
},
// 获取转移考生列表
getTransferList
()
{
getTranserList
({
exam_id
:
this
.
row
.
exam_id
}).
then
(
res
=>
{
getTranserList
({
exam_id
:
this
.
exam_id
}).
then
(
res
=>
{
this
.
transferList
=
res
.
data
.
list
})
},
...
...
@@ -237,7 +252,7 @@ export default {
transferStudent
()
{
const
params
=
{
transfer_exam_id
:
this
.
transfer_exam_id
,
exam_id
:
this
.
row
.
exam_id
,
exam_id
:
this
.
exam_id
,
student_ids
:
this
.
multipleSelection
.
map
(
item
=>
item
.
student_id
).
toString
()
}
transferStudent
(
params
).
then
(
res
=>
{
...
...
src/modules/exam/views/List.vue
浏览文件 @
cbc9a7bb
...
...
@@ -95,7 +95,7 @@ export default {
this
.
$router
.
push
({
path
:
'examDetail'
,
query
:
{
row
:
JSON
.
stringify
(
row
)
exam_id
:
row
.
exam_id
}
})
},
...
...
src/modules/exam/views/MarkingPaper.vue
0 → 100644
浏览文件 @
cbc9a7bb
<
template
>
<div>
<template
v-for=
"item in questionList"
>
<paper-question
:options=
"item"
:question_item_id=
"item.question_item_id"
:key=
"item.question_item_id"
/>
</
template
>
</div>
</template>
<
script
>
import
{
getPaperDetails
}
from
'../api.js'
import
PaperQuestion
from
'../components/PaperQuestion.vue'
export
default
{
// props: { id: { type: String } },
components
:
{
PaperQuestion
},
data
()
{
return
{
questionData
:
{},
// questionData: {
// sheet_id: '6861980331549917184',
// student_id: '6861979726374764544',
// exam_id: '6861979663460204544',
// paper_id: '6859369609758244864',
// questions: {
// paper_id: '6859369609758244864',
// total_question_count: 14,
// total_score: 100,
// question_items: [
// {
// question_item_id: '6859397281477558272',
// question_item_title: '案例题1',
// question_item_type: '5',
// question_list: [
// {
// common_content: '
<
p
>
(示例)这个是案例题的公共题干
111111
<
/p>'
,
// group_id: '6852817215452872713',
// list: [
// {
// id: '6852817215452872719',
// content: '
<
p
>
这个是案例题的题干
001111111111111
<
/p>'
,
// options: '[]',
// answer: '[]',
// type: 3,
// question_order: '10',
// score: 22,
// q_order: 1
// },
// {
// id: '6852817215452872724',
// content: '
<
p
>
这个是案例题的题干
002
<
/p>'
,
// options:
// '[{"id":"6858588277927051264","option":"E(true)"},{"id":"6852817215452872723","option":"D选项"},{"id":"6852817215452872720","option":"A选项"},{"id":"6852817215452872721","option":"B选项"}]',
// answer: '["6852817215452872720","6858588277927051264"]',
// type: 2,
// question_order: '20',
// score: 18,
// q_order: 2
// }
// ]
// },
// {
// common_content: '历史案例题1',
// group_id: '6856826400016433179',
// list: [
// {
// id: '6856826400016433180',
// content: '(问答)扁鹊本名叫什么?',
// options: '[]',
// answer: null,
// type: 3,
// question_order: '1',
// score: 1,
// q_order: 3
// },
// {
// id: '6856826400016433185',
// content: '(单选)北京猿人属于()?',
// options:
// '[{"id":"6856826400016433183","option":"尼格罗人种"},{"id":"6856826400016433184","option":"澳大利亚人种"},{"id":"6856826400016433182","option":"蒙古人种1"},{"id":"6856826400016433181","option":"欧罗巴人种"}]',
// answer: '["6856826400016433182"]',
// type: 1,
// question_order: '2',
// score: 1,
// q_order: 4
// },
// {
// id: '6856826400016433190',
// content: '(单选)佛教从()从印度传入中国。',
// options:
// '[{"id":"6856826400016433187","option":"西汉末年到东汉初期"},{"id":"6856826400016433188","option":"东汉末期"},{"id":"6856826400016433186","option":"西汉初年"},{"id":"6856826400016433189","option":"隋朝初期"}]',
// answer: '["6856826400016433187"]',
// type: 1,
// question_order: '3',
// score: 1,
// q_order: 5
// },
// {
// id: '6856826400016433195',
// content: '(多选)帝国主义列强对中国进行经济侵略的方式是()。',
// options:
// '[{"id":"6856826400016433194","option":"操纵中国的经济命脉1"},{"id":"6856826400016433192","option":"剥夺中国的关税自主权1"},{"id":"6856826400016433191","option":"控制中国的通商口岸1"},{"id":"6856826400016433193","option":"实行商品倾销和资本输出1"}]',
// answer: '["6856826400016433191","6856826400016433192","6856826400016433193","6856826400016433194"]',
// type: 2,
// question_order: '4',
// score: 1,
// q_order: 6
// },
// {
// id: '6856826400016433198',
// content: '(判断)秦汉时期,金是王朝礼法的象征。',
// options:
// '[{"id":"6856826400016433196","option":"错误"},{"id":"6856826400016433197","option":"正确"}]',
// answer: '["6856826400016433196"]',
// type: 6,
// question_order: '5',
// score: 1,
// q_order: 7
// }
// ]
// }
// ]
// },
// {
// question_item_id: '6859397358354956288',
// question_item_title: '案例题2',
// question_item_type: '5',
// question_list: [
// {
// common_content: '历史案例题1',
// group_id: '6856826400016433179',
// list: [
// {
// id: '6856826400016433180',
// content: '(问答)扁鹊本名叫什么?',
// options: '[]',
// answer: null,
// type: 3,
// question_order: '1',
// score: 19,
// q_order: 8
// },
// {
// id: '6856826400016433185',
// content: '(单选)北京猿人属于()?',
// options:
// '[{"id":"6856826400016433181","option":"欧罗巴人种"},{"id":"6856826400016433182","option":"蒙古人种1"},{"id":"6856826400016433183","option":"尼格罗人种"},{"id":"6856826400016433184","option":"澳大利亚人种"}]',
// answer: '["6856826400016433182"]',
// type: 1,
// question_order: '2',
// score: 9,
// q_order: 9
// },
// {
// id: '6856826400016433190',
// content: '(单选)佛教从()从印度传入中国。',
// options:
// '[{"id":"6856826400016433186","option":"西汉初年"},{"id":"6856826400016433187","option":"西汉末年到东汉初期"},{"id":"6856826400016433188","option":"东汉末期"},{"id":"6856826400016433189","option":"隋朝初期"}]',
// answer: '["6856826400016433187"]',
// type: 1,
// question_order: '3',
// score: 5,
// q_order: 10
// },
// {
// id: '6856826400016433195',
// content: '(多选)帝国主义列强对中国进行经济侵略的方式是()。',
// options:
// '[{"id":"6856826400016433191","option":"控制中国的通商口岸1"},{"id":"6856826400016433192","option":"剥夺中国的关税自主权1"},{"id":"6856826400016433193","option":"实行商品倾销和资本输出1"},{"id":"6856826400016433194","option":"操纵中国的经济命脉1"}]',
// answer: '["6856826400016433191","6856826400016433192","6856826400016433193","6856826400016433194"]',
// type: 2,
// question_order: '4',
// score: 11,
// q_order: 11
// },
// {
// id: '6856826400016433198',
// content: '(判断)秦汉时期,金是王朝礼法的象征。',
// options:
// '[{"id":"6856826400016433196","option":"错误"},{"id":"6856826400016433197","option":"正确"}]',
// answer: '["6856826400016433196"]',
// type: 6,
// question_order: '5',
// score: 1,
// q_order: 12
// }
// ]
// }
// ]
// },
// {
// question_item_id: '6860831598460272640',
// question_item_title: '单选题',
// question_item_type: '1',
// question_list: [
// {
// id: '6860750544940564490',
// content: '(示例)这个是单选题的题干002 张传梁211014',
// options:
// '[{"id":"6860750544940564488","option":"C选项"},{"id":"6860750544940564489","option":"D选项"},{"id":"6860750544940564486","option":"A选项"},{"id":"6860750544940564487","option":"B选项11"}]',
// answer: '["6860750544940564487"]',
// score: 4,
// q_order: 13
// },
// {
// id: '6860750544940564485',
// content: '(示例)这个是单选题的题干001 张传梁211014',
// options:
// '[{"id":"6860750544940564484","option":"E选项"},{"id":"6860750544940564480","option":"A选项11"},{"id":"6860750544940564482","option":"C选项"},{"id":"6860750544940564483","option":"D选项"},{"id":"6860750544940564481","option":"B选项"}]',
// answer: '["6860750544940564480"]',
// score: 6,
// q_order: 14
// }
// ]
// }
// ]
// },
// answers: {
// '6859397281477558272': {
// '6852817215452872724': {
// answer: ['6858588277927051264'],
// sign: false
// },
// '6852817215452872719': {
// answer: ['sdf'],
// sign: false
// }
// }
// },
// status: 1,
// score: '21.00',
// score_item: {
// '6859397281477558272': {
// '6852817215452872719': {
// score: 21,
// checked_flag: true,
// comment: '111'
// },
// '6852817215452872724': {
// score: 0,
// checked_flag: true
// },
// '6856826400016433180': {
// score: 0,
// checked_flag: false
// },
// '6856826400016433185': {
// score: 0,
// checked_flag: true
// },
// '6856826400016433190': {
// score: 0,
// checked_flag: true
// },
// '6856826400016433195': {
// score: 0,
// checked_flag: true
// },
// '6856826400016433198': {
// score: 0,
// checked_flag: true
// }
// },
// '6859397358354956288': {
// '6856826400016433180': {
// score: 0,
// checked_flag: false
// },
// '6856826400016433185': {
// score: 0,
// checked_flag: true
// },
// '6856826400016433190': {
// score: 0,
// checked_flag: true
// },
// '6856826400016433195': {
// score: 0,
// checked_flag: true
// },
// '6856826400016433198': {
// score: 0,
// checked_flag: true
// }
// },
// '6860831598460272640': {
// '6860750544940564490': {
// score: 0,
// checked_flag: true
// },
// '6860750544940564485': {
// score: 0,
// checked_flag: true
// }
// }
// },
// commit_time: '2021-11-04 18:59:14',
// checker_id: '6592683672086773760',
// checked_time: '2021-11-04 19:00:22',
// created_time: '2021-11-04 19:00:00',
// updated_time: '2021-11-04 19:00:22',
// status_text: '已提交'
// },
questionList
:
[]
}
},
computed
:
{
eid
()
{
return
this
.
$route
.
query
.
eid
},
sid
()
{
return
this
.
$route
.
query
.
sid
}
},
beforeMount
()
{
this
.
getDetail
()
// this.assembleData()
},
methods
:
{
// 获取试卷详情
getDetail
()
{
getPaperDetails
({
exam_id
:
this
.
eid
,
student_id
:
this
.
sid
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
console
.
log
(
res
.
data
)
this
.
questionData
=
res
.
data
.
sheet
this
.
assembleData
()
}
})
},
assembleData
()
{
this
.
questionList
=
this
.
questionData
.
questions
.
question_items
this
.
questionList
.
forEach
(
item
=>
{
const
score
=
this
.
questionData
.
score_item
[
item
.
question_item_id
]
item
.
question_list
.
forEach
(
subItem
=>
{
if
(
subItem
.
group_id
)
{
subItem
.
list
.
forEach
(
it
=>
{
const
obj
=
score
[
it
.
id
]
it
.
get_score
=
0
it
.
get_score
=
obj
.
score
if
(
it
.
answer
)
it
.
answer
=
JSON
.
parse
(
it
.
answer
)
if
(
it
.
options
)
it
.
options
=
JSON
.
parse
(
it
.
options
)
})
}
else
{
const
obj
=
score
[
subItem
.
id
]
subItem
.
get_score
=
0
subItem
.
get_score
=
obj
.
score
if
(
subItem
.
answer
)
subItem
.
answer
=
JSON
.
parse
(
subItem
.
answer
)
if
(
subItem
.
options
)
subItem
.
options
=
JSON
.
parse
(
subItem
.
options
)
}
})
})
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
></
style
>
vite.config.js
浏览文件 @
cbc9a7bb
...
...
@@ -29,7 +29,8 @@ export default defineConfig(({ mode }) => {
rewrite
:
path
=>
path
.
replace
(
/^
\/
api
\/
qbs/
,
''
)
},
'/api/exam'
:
{
target
:
'https://x-exam-admin-api.ezijing.com'
,
// target: 'https://x-exam-admin-api.ezijing.com',
target
:
'http://localhost-exam-admin.ezijing.com'
,
changeOrigin
:
true
,
rewrite
:
path
=>
path
.
replace
(
/^
\/
api
\/
exam/
,
''
)
},
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论