Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
center-resource
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
center-resource
Commits
39721f96
提交
39721f96
authored
7月 29, 2022
作者:
matian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
updates
上级
c9388c46
全部展开
显示空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
85 行增加
和
75 行删除
+85
-75
menus.ts
src/assets/menus.ts
+1
-1
api.ts
src/modules/teach/exam/api.ts
+14
-0
PaperQuestion.vue
src/modules/teach/exam/components/PaperQuestion.vue
+12
-30
QuestionItem.vue
src/modules/teach/exam/components/QuestionItem.vue
+28
-43
type.ts
src/modules/teach/exam/type.ts
+29
-0
StudentList.vue
src/modules/teach/exam/views/StudentList.vue
+1
-1
View.vue
src/modules/teach/exam/views/View.vue
+0
-0
没有找到文件。
src/assets/menus.ts
浏览文件 @
39721f96
...
...
@@ -190,7 +190,7 @@ export const menus: IMenuItem[] = [
tag
:
'v1-backend-lecturer-list'
,
icon
:
DataAnalysis
,
name
:
'数据画像与分析'
,
path
:
''
path
:
'
http://114.242.229.132:18080/bi/?proc=1&action=viewer&hback=true&isInPreview=true&db=!7d2b!!8346!!6559!!80b2!e-SaaS!2f!!8d44!!6e90!!6570!!636e!!753b!!50cf!.db&platform=PC&browserType=chrome
'
}
]
}
...
...
src/modules/teach/exam/api.ts
浏览文件 @
39721f96
...
...
@@ -20,6 +20,20 @@ export function getPaperStuList(params?: {
})
{
return
httpRequest
.
get
(
'/api/resource/v1/teaching/paper/list'
,
{
params
})
}
// 获取学员详情
export
function
getPaperStuDetail
(
params
?:
{
id
:
string
})
{
return
httpRequest
.
get
(
'/api/resource/v1/teaching/paper/view'
,
{
params
})
}
// 评分
export
function
updateComment
(
params
?:
{
id
:
string
index
:
string
child_index
?:
string
user_score
:
string
reviews
:
string
})
{
return
httpRequest
.
get
(
'/api/resource/v1/teaching/paper/update '
,
{
params
})
}
// /**
// * 获取试卷详情
// */
...
...
src/modules/teach/exam/components/PaperQuestion.vue
浏览文件 @
39721f96
<
script
lang=
"ts"
setup
>
import
type
{
IQuestionList
}
from
'../type'
import
QuestionItem
from
'./QuestionItem.vue'
const
props
=
defineProps
({
options
:
{
type
:
Object
},
question_item_id
:
{
type
:
String
}
})
const
questionItem
=
computed
(()
=>
{
return
props
.
options
?.
item
})
const
sheet_id
=
computed
(()
=>
{
return
props
.
options
?.
sheet_id
})
const
questionType
=
computed
(()
=>
{
return
props
.
options
?.
item
.
question_item_type
})
interface
Props
{
everyQuestion
:
any
questionList
:
IQuestionList
[]
}
const
props
=
defineProps
<
Props
>
()
</
script
>
<
template
>
<el-card
class=
"container"
>
<template
#
header
>
<span>
{{
questionItem
.
question_item_title
}}
</span>
<span>
{{
everyQuestion
?.
question_content
}}
</span>
</
template
>
<div
class=
"content"
>
<
template
v-for=
"item in
questionItem.question_l
ist"
>
<div
class=
"sub-content"
v-if=
"item
.group_id
"
:key=
"item.id"
>
<
template
v-for=
"item in
props.questionL
ist"
>
<div
class=
"sub-content"
v-if=
"item
?.children
"
:key=
"item.id"
>
<div
class=
"title"
v-html=
"item.common_content"
></div>
<div
class=
"sub-container"
>
<QuestionItem
v-for=
"subItem in item.list"
:key=
"subItem.id"
:question=
"
{ item: subItem, question_item_id, questionType, sheet_id }"
:question_item_id="question_item_id"
/>
<QuestionItem
v-for=
"subItem in item.children"
:key=
"subItem.id"
:question=
"subItem"
/>
</div>
</div>
<div
v-else
:key=
"item.id"
>
<QuestionItem
:question=
"
{ item, question_item_id, questionType, sheet_id }"
:question_item_id="question_item_id"
/>
<QuestionItem
:question=
"item"
/>
</div>
</
template
>
</div>
...
...
src/modules/teach/exam/components/QuestionItem.vue
浏览文件 @
39721f96
<
script
lang=
"ts"
setup
>
// import { ElMessage } from 'element-plus'
// import { submitPaper } from '../api.js'
const
bc
:
any
=
ref
(
null
)
import
{
updateComment
}
from
'../api'
const
showComment
=
ref
(
false
)
const
props
=
defineProps
({
question
:
{
...
...
@@ -15,60 +12,48 @@ const props = defineProps({
type
:
String
}
})
const
questionData
=
JSON
.
parse
(
JSON
.
stringify
(
props
.
question
.
item
))
const
questionData
=
Object
.
assign
({},
props
.
question
)
const
questionType
=
computed
(()
=>
{
// 1单选,2多选,3简答,5案例题, 6判断, 7实操,8情景
const
type
=
questionData
.
type
||
props
.
question
.
questionType
||
1
return
parseInt
(
type
)
if
(
props
.
question
.
child_question_type
)
{
return
parseInt
(
props
.
question
.
child_question_type
)
}
else
{
return
parseInt
(
props
.
question
.
questionType
)
}
})
// const sheet_id = computed(() => {
// return props.question.sheet_id
// })
onUnmounted
(()
=>
{
bc
.
value
&&
bc
.
value
.
close
()
})
const
fetchComment
=
()
=>
{
console
.
log
(
'0000'
)
// const params: any = {
// sheet_id: sheet_id,
// question_item_id: props.question_item_id,
// question_id: questionData.value.id,
// score: questionData.value.get_score,
// comment: questionData.value.comment
// }
// submitPaper(params).then((res: any) => {
// if (res.success) {
// ElMessage.success('提交点评成功')
// } else {
// ElMessage.success('提交点评失败')
// }
// bc.value = new BroadcastChannel('exam')
// bc.value.postMessage({ action: 'refetch' })
// })
const
params
=
{
id
:
''
,
index
:
''
,
child_index
:
''
,
user_score
:
''
,
reviews
:
''
}
updateComment
(
params
).
then
(()
=>
{
console
.
log
(
'000'
)
})
}
</
script
>
<
template
>
<div
class=
"question-item"
>
<div
class=
"question-item-title"
v-html=
"
questionData.
content"
></div>
<div
class=
"question-item-title"
v-html=
"
props.question.question_
content"
></div>
<template
v-if=
"questionType === 1 || questionType === 6"
>
<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"
>
<el-radio-group
v-model=
"questionData.user_answer"
:disabled=
"true"
class=
"question-item-content"
>
<div
class=
"question-item-option"
v-for=
"subItem in
props.question.question_
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.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.
question_
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
.
user_answer
[
0
]
||
''
}}
</div>
-->
<div
class=
"SAQ"
>
{{
questionData
.
user_answer
||
''
}}
</div>
<div
style=
"text-align: right"
>
<el-button
type=
"primary"
...
...
@@ -81,14 +66,14 @@ const fetchComment = () => {
</div>
<div
class=
"comment"
v-show=
"showComment"
>
<div
class=
"comment-top"
>
<p>
本题
{{
questionData
.
score
}}
分
</p>
<p>
本题
{{
props
.
question
.
score
}}
分
</p>
<div
class=
"get-score"
>
学生得分:
<el-input-number
:disabled=
"questionData.checked_flag"
v-model=
"questionData.
get
_score"
v-model=
"questionData.
user
_score"
controls-position=
"right"
:min=
"0"
:max=
"
questionData
.score"
:max=
"
props.question
.score"
size=
"small"
></el-input-number>
</div>
...
...
@@ -96,18 +81,18 @@ const fetchComment = () => {
<el-input
type=
"textarea"
placeholder=
"请输入评语"
v-model=
"questionData.
comment
"
v-model=
"questionData.
reviews
"
rows=
"3"
:disabled=
"questionData.checked_flag"
/>
<div
style=
"text-align: center; padding-top: 10px"
>
<el-button
type=
"primary"
size=
"small"
@
click=
"fetchComment"
:disabled=
"
questionData
.checked_flag"
<el-button
type=
"primary"
size=
"small"
@
click=
"fetchComment"
:disabled=
"
props.question
.checked_flag"
>
提交点评
</el-button
>
</div>
</div>
</
template
>
<div
class=
"question-item-score"
>
得分:{{
questionData.get
_score }}分
</div>
<div
class=
"question-item-score"
>
得分:{{
props.question.user
_score }}分
</div>
</div>
</template>
...
...
src/modules/teach/exam/type.ts
0 → 100644
浏览文件 @
39721f96
interface
IQuestionptions
{
option
:
string
checked_option
:
string
checked
:
boolean
id
:
string
user_checked
:
boolean
}
export
interface
IQuestionList
{
id
:
string
project_prefix
:
string
permission
:
number
question_type
:
number
question_title
:
string
question_content
:
string
common_content
:
string
question_options
:
IQuestionptions
[]
question_analysis
:
string
question_difficulty
:
number
status
:
number
group_id
:
string
question_order
:
number
question_tag
:
string
is_parent
:
number
child_question_type
:
number
score
:
number
children
?:
IQuestionList
[]
}
\ No newline at end of file
src/modules/teach/exam/views/StudentList.vue
浏览文件 @
39721f96
...
...
@@ -65,7 +65,7 @@ const listOptions = $computed(() => {
}
})
const
handleCheckPaper
=
(
row
:
any
)
=>
{
router
.
push
({
path
:
'/teach/view'
,
query
:
{
eid
:
row
.
exam_id
,
sid
:
row
.
student_
id
}
})
router
.
push
({
path
:
'/teach/view'
,
query
:
{
id
:
row
.
id
}
})
}
onMounted
(()
=>
{
checkPermission
(
'v1-teaching-paper-search-list'
)
&&
handleGetClassList
()
...
...
src/modules/teach/exam/views/View.vue
浏览文件 @
39721f96
差异被折叠。
点击展开。
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论