Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
center-qa
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
center-qa
Commits
566f885b
提交
566f885b
authored
3月 02, 2022
作者:
lihuihui
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
https://gitlab-pro.ezijing.com/ezijing-web/qbs
上级
ebc2c1db
0d78f912
显示空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
96 行增加
和
34 行删除
+96
-34
BaseInfo.vue
src/modules/exam/components/BaseInfo.vue
+9
-7
Finished.vue
src/modules/exam/components/Finished.vue
+1
-1
CreateStudent.vue
src/modules/exam/views/CreateStudent.vue
+3
-1
NewExam.vue
src/modules/exam/views/NewExam.vue
+5
-5
Detail.vue
src/modules/question/components/Detail.vue
+19
-5
importQuestion.vue
src/modules/question/components/importQuestion.vue
+10
-0
index.js
src/modules/question/index.js
+10
-0
List.vue
src/modules/question/views/List.vue
+39
-15
没有找到文件。
src/modules/exam/components/BaseInfo.vue
浏览文件 @
566f885b
...
...
@@ -128,16 +128,18 @@ export default {
this
.
$message
.
warning
(
'请选择考试时间'
)
return
}
const
startTime
=
new
Date
(
params
.
start_time
)
const
endTime
=
new
Date
(
params
.
end_time
)
if
((
endTime
-
startTime
)
/
86400000
>
40
)
{
this
.
$message
.
warning
(
'考试时间不能超过40天'
)
return
}
// const startTime = new Date(params.start_time)
// const endTime = new Date(params.end_time)
// const day = (endTime - startTime) / 86400000
// console.log(day)
// if ((endTime - startTime) / 86400000 >= 40) {
// this.$message.warning('考试时间不能超过40天')
// return
// }
this
.
$emit
(
'getBaseInfo'
,
params
)
this
.
$parent
.
$parent
.
nextStep
()
},
// 保存/更新基本信息
saveExamInfo
()
{
const
params
=
{
id
:
this
.
exam_id
,
...
...
src/modules/exam/components/Finished.vue
浏览文件 @
566f885b
<
template
>
<el-card>
<div
class=
"finished_title"
>
{{
params
.
name
}}
</div>
<div
class=
"login_time item"
>
登录时间段:
{{
params
.
start_time
}}
-
{{
params
.
start
_time
}}
</div>
<div
class=
"login_time item"
>
登录时间段:
{{
params
.
start_time
}}
-
{{
params
.
end
_time
}}
</div>
<div
class=
"check_exam item"
>
选择考试:
{{
checkedPapers
.
toString
()
}}
</div>
<div
class=
"exam_setting item"
>
考试配置:
<el-button
v-show=
"configs.enabled_ip_limit === true"
>
限定登录位置
</el-button>
...
...
src/modules/exam/views/CreateStudent.vue
浏览文件 @
566f885b
...
...
@@ -7,7 +7,9 @@
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item
@
click
.
native=
"dialogVisible = true"
>
考生导入
</el-dropdown-item>
<el-dropdown-item>
<a
href=
"https://webapp-pub.ezijing.com/qbs/student.xlsx"
download=
"student.xlsx"
<a
href=
"https://webapp-pub.ezijing.com/qbs/%E5%AD%A6%E5%91%98%E6%A8%A1%E6%9D%BF.xlsx"
download=
"学员模板.xlsx"
>
模版下载
</a
></el-dropdown-item
>
...
...
src/modules/exam/views/NewExam.vue
浏览文件 @
566f885b
...
...
@@ -7,17 +7,17 @@
<el-step
title=
"考试配置"
></el-step>
<el-step
title=
"考试配置"
></el-step>
</el-steps>
<base-info
data=
""
v-
if
=
"stepsIndex === 1"
@
getBaseInfo=
"getBaseInfo"
:isEdit=
"isEdit"
/>
<base-info
data=
""
v-
show
=
"stepsIndex === 1"
@
getBaseInfo=
"getBaseInfo"
:isEdit=
"isEdit"
/>
<check-paper
v-
if
=
"stepsIndex === 2"
v-
show
=
"stepsIndex === 2"
@
getCheckPaper=
"getCheckPaper"
@
getCheckPaperList=
"getCheckPaperList"
:isEdit=
"isEdit"
/>
<personal-info
v-
if
=
"stepsIndex === 3"
@
getInfo=
"getInfo"
:isEdit=
"isEdit"
/>
<exam-setting
v-
if
=
"stepsIndex === 4"
@
getExamConfig=
"getExamConfig"
:isEdit=
"isEdit"
/>
<personal-info
v-
show
=
"stepsIndex === 3"
@
getInfo=
"getInfo"
:isEdit=
"isEdit"
/>
<exam-setting
v-
show
=
"stepsIndex === 4"
@
getExamConfig=
"getExamConfig"
:isEdit=
"isEdit"
/>
<finished
v-
if
=
"stepsIndex === 5"
v-
show
=
"stepsIndex === 5"
:params=
"params"
:configs=
"configs"
:checkedPaper=
"checkedPaper"
...
...
src/modules/question/components/Detail.vue
浏览文件 @
566f885b
<
template
>
<div>
<!--
<el-form
:model=
"ruleForm"
:rules=
"rules"
ref=
"ruleForm"
label-width=
"100px"
class=
"demo-ruleForm"
>
-->
<el-form
:disabled=
"!!($route.query.type === 'view')"
:model=
"ruleForm"
:rules=
"rules"
ref=
"ruleForm"
label-width=
"100px"
class=
"demo-ruleForm"
>
<el-form
:disabled=
"!!($route.query.type === 'view')"
:model=
"ruleForm"
:rules=
"rules"
ref=
"ruleForm"
label-width=
"100px"
class=
"demo-ruleForm"
>
<el-form-item
label=
"题库范围"
prop=
"permission"
>
<el-radio
v-model=
"ruleForm.permission"
label=
"1"
>
我的题库
</el-radio>
<el-radio
v-model=
"ruleForm.permission"
label=
"2"
>
公共题库
</el-radio>
</el-form-item>
<el-form-item
label=
"题目类型"
prop=
"question_type"
>
<el-select
:disabled=
"!!($route.query.id)"
@
change=
"questionTypeChange"
v-model=
"ruleForm.question_type"
placeholder=
"请选择活题目类型"
>
<el-select
:disabled=
"!!$route.query.id"
@
change=
"questionTypeChange"
v-model=
"ruleForm.question_type"
placeholder=
"请选择活题目类型"
>
<el-option
v-for=
"(item, index) in qType"
:label=
"item.label"
:value=
"item.value"
:key=
"index"
></el-option>
</el-select>
</el-form-item>
...
...
@@ -55,7 +67,9 @@
</el-form-item>
<el-form-item>
<template
v-if=
"$route.query.id"
>
<el-button
v-if=
"$route.query.type == 'edit'"
type=
"primary"
@
click=
"submitForm('ruleForm')"
>
确认修改
</el-button>
<el-button
v-if=
"$route.query.type == 'edit'"
type=
"primary"
@
click=
"submitForm('ruleForm')"
>
确认修改
</el-button
>
</
template
>
<
template
v-else
>
<el-button
type=
"primary"
@
click=
"submitForm('ruleForm')"
>
立即创建
</el-button>
...
...
@@ -112,7 +126,7 @@ export default {
question_difficulty
:
[{
required
:
true
,
message
:
'请选择难度等级'
,
trigger
:
'change'
}],
question_title
:
[{
required
:
true
,
message
:
'请填写题目标题'
,
trigger
:
'blur'
}],
question_content
:
[{
required
:
true
,
message
:
'请填写题干内容'
,
trigger
:
'blur'
}],
question_analysis
:
[{
required
:
true
,
message
:
'请填写题干内容
'
,
trigger
:
'blur'
}],
question_analysis
:
[{
required
:
false
,
message
:
'请填写题目解析
'
,
trigger
:
'blur'
}],
question_category
:
[{
required
:
true
,
message
:
'请选择试题分类'
,
trigger
:
'change'
}],
knowledge_point
:
[{
required
:
true
,
message
:
'请输入题目知识点内容'
,
trigger
:
'blur'
}],
question_options
:
[{
required
:
true
,
message
:
' '
,
trigger
:
'blur'
}]
...
...
@@ -150,7 +164,7 @@ export default {
})
}
}
else
{
console
.
log
(
'error submit!!'
)
//
console.log('error submit!!')
return
false
}
})
...
...
src/modules/question/components/importQuestion.vue
浏览文件 @
566f885b
...
...
@@ -17,6 +17,16 @@
<div
class=
"el-upload__text"
>
将文件拖到此处,或
<em>
点击上传
</em></div>
</el-upload>
<div
style=
"text-align: center"
>
<a
href=
"https://webapp-pub.ezijing.com/qbs/%E8%AF%95%E9%A2%98%E6%A8%A1%E6%9D%BF.xlsx"
download=
"试题模板.xlsx"
style=
"color: #c01c40"
>
<i
class=
"el-icon-download"
></i>
试题模板.xlsx
</a
>
<!--
<a
href=
"https://webapp-pub.oss-cn-beijing.aliyuncs.com/qbs/question.xlsx"
:download=
"试题模版"
></a>
-->
</div>
<div
style=
"text-align: center; margin-top: 15px"
>
<el-button
size=
"mini"
@
click=
"cancel"
>
取消
</el-button>
<el-button
type=
"primary"
size=
"mini"
@
click=
"submitUpload"
style=
"margin-right: 5px"
>
确认提交
</el-button>
</div>
...
...
src/modules/question/index.js
浏览文件 @
566f885b
...
...
@@ -24,6 +24,16 @@ const routes = [
path
:
'classify'
,
component
:
()
=>
import
(
'./views/Classify.vue'
),
meta
:
{
title
:
'题库分类'
}
},
{
path
:
'questionDetail'
,
component
:
()
=>
import
(
'./views/Create.vue'
),
meta
:
{
title
:
'试题详情'
}
},
{
path
:
'editQuestion'
,
component
:
()
=>
import
(
'./views/Create.vue'
),
meta
:
{
title
:
'编辑试题'
}
}
]
}
...
...
src/modules/question/views/List.vue
浏览文件 @
566f885b
...
...
@@ -2,18 +2,31 @@
<app-card>
<app-list
v-bind=
"tableOptions"
ref=
"list"
@
selection-change=
"handleSelectionChange"
>
<template
v-slot:radio-filter=
"
{ params }">
<el-radio
@
change=
"refetchList"
v-model=
"params.permission"
:label=
1
>
我的题库
</el-radio>
<el-radio
@
change=
"refetchList"
v-model=
"params.permission"
:label=
2
>
公共题库
</el-radio>
<el-radio
@
change=
"refetchList"
v-model=
"params.permission"
:label=
"1"
>
我的题库
</el-radio>
<el-radio
@
change=
"refetchList"
v-model=
"params.permission"
:label=
"2"
>
公共题库
</el-radio>
</
template
>
<
template
v-slot:filter-category=
"{ params }"
>
<question-type-cascader
v-model=
"params.question_category"
@
change=
"refetchList"
></question-type-cascader>
</
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"
>
<el-button
type=
"primary"
icon=
"el-icon-plus"
@
click=
"$router.push({ path: '/question/create' })"
>
新建试题
</el-button
>
<el-button
type=
"primary"
icon=
"el-icon-plus"
@
click=
"importDialogVisible = true"
>
批量导入试题
</el-button>
<el-button
type=
"primary"
icon=
"el-icon-plus"
@
click=
"handleDelete()"
>
批量删除
</el-button>
<el-button
type=
"primary"
icon=
"el-icon-plus"
@
click=
"handleDelete()"
:disabled=
"this.deleteQuestions.length === 0"
>
批量删除
</el-button
>
</div>
<
template
v-slot:table-x=
"{ row }"
>
<el-button
type=
"text"
@
click=
"handleSettings(row)"
>
编辑
</el-button>
...
...
@@ -34,7 +47,7 @@ export default {
data
()
{
return
{
importDialogVisible
:
false
,
// 模板导入弹窗
deleteQuestions
:
[],
// 批量删除
deleteQuestions
:
[],
// 批量删除
,
treeDialogVisible
:
false
,
// tree弹窗
filterRadio
:
1
,
// 题库筛选
filterInput
:
''
,
// tree回显内容
...
...
@@ -133,21 +146,25 @@ export default {
},
columns
:
[
{
type
:
'selection'
,
minWidth
:
'50px'
,
fixed
:
'left'
},
{
label
:
'序号'
,
prop
:
'order'
},
{
label
:
'题目类型'
,
prop
:
'question_type'
},
{
label
:
'试题分类'
,
prop
:
'question_category.category_name'
},
{
label
:
'题目标题'
,
prop
:
'question_title'
},
{
label
:
'序号'
,
prop
:
'order'
,
width
:
50
},
{
label
:
'题目类型'
,
prop
:
'question_type'
,
width
:
80
},
{
label
:
'试题分类'
,
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
:
'question_difficulty'
},
{
label
:
'等级难度'
,
prop
:
'question_difficulty'
,
width
:
80
},
{
label
:
'更新人'
,
prop
:
'operator.nickname'
},
{
label
:
'更新时间'
,
prop
:
'updated_at'
},
{
label
:
'操作'
,
slots
:
'table-x'
,
align
:
'right'
}
{
label
:
'更新时间'
,
prop
:
'updated_at'
,
width
:
180
},
{
label
:
'操作'
,
slots
:
'table-x'
,
align
:
'right'
,
width
:
200
}
]
}
}
},
mounted
()
{
},
mounted
()
{},
methods
:
{
// 列表选择
handleSelectionChange
(
data
)
{
...
...
@@ -171,11 +188,11 @@ export default {
},
// 查看
handleView
(
row
)
{
this
.
$router
.
push
({
path
:
'/question/
create
'
,
query
:
{
id
:
row
.
id
,
type
:
'view'
}
})
this
.
$router
.
push
({
path
:
'/question/
questionDetail
'
,
query
:
{
id
:
row
.
id
,
type
:
'view'
}
})
},
// 编辑
handleSettings
(
row
)
{
this
.
$router
.
push
({
path
:
'/question/
create
'
,
query
:
{
id
:
row
.
id
,
type
:
'edit'
}
})
this
.
$router
.
push
({
path
:
'/question/
editQuestion
'
,
query
:
{
id
:
row
.
id
,
type
:
'edit'
}
})
},
radioChange
()
{
this
.
$refs
.
list
.
refetch
()
...
...
@@ -204,4 +221,11 @@ export default {
height
:
100%
;
}
}
.category_name
{
width
:
200px
;
text-align
:
center
;
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
</
style
>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论