Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
X
x-learn
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
x-learn
Commits
d9b23d95
提交
d9b23d95
authored
12月 03, 2021
作者:
lihuihui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update:详情
上级
8117a1fd
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
198 行增加
和
5 行删除
+198
-5
QuestionList.vue
src/components/data/QuestionList.vue
+10
-3
TopicDataInfo.vue
src/modules/teacher/data/exam/components/TopicDataInfo.vue
+75
-0
index.js
src/modules/teacher/data/exam/index.js
+2
-1
ClassDetail.vue
src/modules/teacher/data/exam/views/ClassDetail.vue
+1
-1
TopicData.vue
src/modules/teacher/data/exam/views/TopicData.vue
+110
-0
没有找到文件。
src/components/data/QuestionList.vue
浏览文件 @
d9b23d95
<
template
>
<
template
>
<div>
<div>
<div
class=
"exam-detail"
v-for=
"(data, index) in examData"
:key=
"index"
>
<
!--
<
div
class=
"exam-detail"
v-for=
"(data, index) in examData"
:key=
"index"
>
<div
class=
"title-type"
>
{{
questionTypeText
[
data
.
question_type
]
}}
</div>
<div
class=
"title-type"
>
{{
questionTypeText
[
data
.
question_type
]
}}
</div>
<template
v-for=
"pItem in data.list"
>
<template
v-for=
"pItem in data.list"
>
<question-list-item
<question-list-item
v-for=
"item in pItem"
v-for=
"item in pItem"
:data=
"
item
"
:data=
"
pItem[0]
"
:question=
"data"
:question=
"data"
:key=
"item.id"
:key=
"item.id"
></question-list-item>
></question-list-item>
</
template
>
</
template
>
</div>
-->
<div
class=
"exam-detail"
v-if=
"examData.length"
>
<!-- <div class="title-type">{{ questionTypeText[examData[0].question_type] }}</div> -->
<question-list-item
:data=
"examData[0].list[0][0]"
:question=
"examData[0]"
></question-list-item>
</div>
</div>
</div>
</div>
</template>
</template>
...
@@ -29,7 +36,7 @@ export default {
...
@@ -29,7 +36,7 @@ export default {
computed
:
{
computed
:
{
},
},
mounted
()
{
mounted
()
{
console
.
log
(
this
.
examData
,
'examData'
)
console
.
log
(
this
.
examData
.
length
,
'examData'
)
}
}
}
}
</
script
>
</
script
>
...
...
src/modules/teacher/data/exam/components/TopicDataInfo.vue
0 → 100644
浏览文件 @
d9b23d95
<
template
>
<el-card
class=
"box-card"
>
<img
class=
"bg"
src=
"https://webapp-pub.oss-cn-beijing.aliyuncs.com/x-learning/data/bgc1.png"
alt=
""
/>
<div
slot=
"header"
style=
"display: flex; align-items: center"
>
<h1
style=
"font-size: 16px"
>
<span
style=
"color: #c01540"
>
*
</span>
考试信息
</h1>
<img
class=
"logo"
src=
"https://webapp-pub.oss-cn-beijing.aliyuncs.com/x-learning/data/exam.png"
alt=
""
/>
</div>
<el-row
:gutter=
"20"
class=
"row-bg"
justify=
"space-around"
>
<el-col
:span=
"8"
>
<div
class=
"title"
>
本题分数
</div>
<div>
<span
class=
"num"
>
111
</span
>
</div>
</el-col>
<el-col
:span=
"8"
>
<div
class=
"title"
>
平均得分
</div>
<div>
<span
class=
"num"
>
111
</span>
</div>
</el-col>
<el-col
:span=
"8"
>
<div
class=
"title"
>
正确率
</div>
<div>
<span
class=
"num"
>
111
</span
><span
class=
"fen"
>
%
</span>
</div>
</el-col>
</el-row>
</el-card>
</
template
>
<
script
>
export
default
{
props
:
{
dataInfo
:
{
type
:
Object
,
default
:
()
=>
({})
}
}
}
</
script
>
<
style
scoped
>
.box-card
{
position
:
relative
;
}
.bg
{
width
:
137px
;
height
:
132px
;
position
:
absolute
;
right
:
0
;
bottom
:
0
;
}
.logo
{
width
:
16px
;
height
:
16px
;
margin-left
:
9px
;
}
.title
{
white-space
:
nowrap
;
font-size
:
16px
;
color
:
#909090
;
font-weight
:
400
;
}
.num
{
font-size
:
22px
;
color
:
#333
;
}
.fen
{
font-size
:
14px
;
color
:
#333
;
font-weight
:
300
;
}
</
style
>
src/modules/teacher/data/exam/index.js
浏览文件 @
d9b23d95
...
@@ -7,7 +7,8 @@ const routes = [
...
@@ -7,7 +7,8 @@ const routes = [
{
path
:
'/teacher/data/exam/class'
,
component
:
()
=>
import
(
'./views/ClassList.vue'
)
},
{
path
:
'/teacher/data/exam/class'
,
component
:
()
=>
import
(
'./views/ClassList.vue'
)
},
{
path
:
'/teacher/data/exam/PersonalList'
,
component
:
()
=>
import
(
'./views/PersonalList.vue'
)
},
{
path
:
'/teacher/data/exam/PersonalList'
,
component
:
()
=>
import
(
'./views/PersonalList.vue'
)
},
{
path
:
'/teacher/data/exam/classDetail'
,
component
:
()
=>
import
(
'./views/ClassDetail.vue'
)
},
{
path
:
'/teacher/data/exam/classDetail'
,
component
:
()
=>
import
(
'./views/ClassDetail.vue'
)
},
{
path
:
'/teacher/data/exam/examData'
,
component
:
()
=>
import
(
'./views/ExamData.vue'
)
}
{
path
:
'/teacher/data/exam/examData'
,
component
:
()
=>
import
(
'./views/ExamData.vue'
)
},
{
path
:
'/teacher/data/exam/examData/topicData'
,
component
:
()
=>
import
(
'./views/TopicData.vue'
)
}
]
]
}
}
]
]
...
...
src/modules/teacher/data/exam/views/ClassDetail.vue
浏览文件 @
d9b23d95
...
@@ -37,7 +37,7 @@ export default {
...
@@ -37,7 +37,7 @@ export default {
},
},
methods
:
{
methods
:
{
getTopic
()
{
getTopic
()
{
api
.
getReviewDetails
({
sheet_id
:
'68
56557207467589632
'
}).
then
(
response
=>
{
api
.
getReviewDetails
({
sheet_id
:
'68
69950724323672064
'
}).
then
(
response
=>
{
this
.
data
=
JSON
.
parse
(
response
.
data
).
sheet
this
.
data
=
JSON
.
parse
(
response
.
data
).
sheet
this
.
setExamData
()
this
.
setExamData
()
})
})
...
...
src/modules/teacher/data/exam/views/TopicData.vue
0 → 100644
浏览文件 @
d9b23d95
<
template
>
<div>
<question-list
class=
"exam"
:examData=
"examData"
v-if=
"examData.length"
></question-list>
<el-card>
<app-list
v-bind=
"tableOptions"
ref=
"list"
>
<!-- 操作 -->
<template
v-slot:table-operate=
"
{ row }">
<el-button
type=
"text"
size=
"mini"
@
click=
"toExamData(row)"
:disabled=
"row.join_num === 0"
>
考试数据
</el-button>
<el-button
type=
"text"
size=
"mini"
@
click=
"toClassData(row)"
:disabled=
"row.join_num === 0"
>
班级数据
</el-button>
</
template
>
</app-list>
</el-card>
<topic-data-info></topic-data-info>
</div>
</template>
<
script
>
import
*
as
api
from
'../api.js'
import
QuestionList
from
'@/components/data/QuestionList.vue'
import
TopicDataInfo
from
'../components/TopicDataInfo.vue'
export
default
{
components
:
{
QuestionList
,
TopicDataInfo
},
data
()
{
return
{
examData
:
[]
}
},
computed
:
{
// 列表配置
tableOptions
()
{
return
{
remote
:
{
httpRequest
:
api
.
getExamList
,
params
:
{
type
:
'examination'
,
course_id
:
''
,
examination_id
:
''
}
},
filters
:
[
// {
// type: 'select',
// prop: 'examination_id',
// placeholder: '考试名称',
// label: '考试名称',
// options: this.conditionList.examination_list,
// labelKey: 'paper_title',
// valueKey: 'id',
// filterable: true
// },
// {
// type: 'select',
// prop: 'course_id',
// placeholder: '所属课程',
// label: '所属课程',
// options: this.conditionList.course_list,
// labelKey: 'course_name',
// valueKey: 'id',
// filterable: true
// }
],
columns
:
[
{
label
:
'考试名称'
,
prop
:
'examination_name'
,
align
:
'center'
},
{
label
:
'所属课程'
,
prop
:
'course_name'
,
align
:
'center'
},
{
label
:
'参考人数'
,
prop
:
'join_num'
,
align
:
'center'
},
{
label
:
'参考率'
,
prop
:
'join_rate'
,
align
:
'center'
},
{
label
:
'平均得分'
,
prop
:
'average'
,
align
:
'center'
},
{
label
:
'最高分'
,
prop
:
'max'
,
align
:
'center'
},
{
label
:
'最低分'
,
prop
:
'min'
,
align
:
'center'
},
{
label
:
'题目总数'
,
prop
:
'question_num'
,
align
:
'center'
},
{
label
:
'及格率'
,
prop
:
'pass_rate'
,
align
:
'center'
},
{
label
:
'操作'
,
slots
:
'table-operate'
,
align
:
'center'
,
minWidth
:
150
}
]
}
}
},
mounted
()
{
this
.
getTopic
()
},
methods
:
{
getTopic
()
{
api
.
getReviewDetails
({
sheet_id
:
'6869950724323672064'
}).
then
(
response
=>
{
this
.
data
=
JSON
.
parse
(
response
.
data
).
sheet
this
.
setExamData
()
})
},
setExamData
()
{
// { list: ..., }
// {}.list[0][0] && userScoreData, userAnswerData
this
.
examData
=
this
.
data
.
questions
.
question_items
.
reduce
((
prev
,
cur
)
=>
{
const
qParentId
=
cur
.
question_item_id
const
list
=
cur
.
question_list
.
map
(
item
=>
{
return
item
.
map
(
cItem
=>
{
const
userScoreData
=
this
.
data
.
score_items
[
qParentId
][
cItem
.
id
]
let
userAnswerData
=
{}
if
(
this
.
data
.
answers
[
qParentId
])
{
userAnswerData
=
this
.
data
.
answers
[
qParentId
][
cItem
.
id
]
||
{}
}
return
{
...
cItem
,
userScoreData
,
userAnswerData
}
})
})
prev
.
push
({
...
cur
,
list
})
return
prev
},
[])
console
.
log
(
this
.
examData
,
'123'
)
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
</
style
>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论