Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
center-qa
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
center-qa
Commits
c8c0fca7
提交
c8c0fca7
authored
2月 24, 2022
作者:
matian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat:考试中心部分接口对接
上级
afbb2d97
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
501 行增加
和
134 行删除
+501
-134
api.js
src/modules/exam/api.js
+24
-2
BaseInfo.vue
src/modules/exam/components/BaseInfo.vue
+92
-23
CheckPaper.vue
src/modules/exam/components/CheckPaper.vue
+69
-24
ExamSetting.vue
src/modules/exam/components/ExamSetting.vue
+69
-43
Finished.vue
src/modules/exam/components/Finished.vue
+63
-10
PersonalInfo.vue
src/modules/exam/components/PersonalInfo.vue
+98
-9
Detail.vue
src/modules/exam/views/Detail.vue
+22
-5
List.vue
src/modules/exam/views/List.vue
+19
-5
NewExam.vue
src/modules/exam/views/NewExam.vue
+45
-13
没有找到文件。
src/modules/exam/api.js
浏览文件 @
c8c0fca7
import
httpRequest
from
'@/utils/axios'
/**
* 获取
知识点/标签
* 获取
考试列表
*/
export
function
getExamList
(
params
)
{
return
httpRequest
.
get
(
'/exam/v1/exam/index'
,
{
params
})
return
httpRequest
.
get
(
'/api/exam/v1/exam/index'
,
{
params
})
}
// 创建考试
export
function
createExamList
(
data
)
{
return
httpRequest
.
post
(
'/api/exam/v1/exam/create'
,
data
)
}
/**
* 获取考卷列表
*/
export
function
getExamPaperList
(
params
)
{
return
httpRequest
.
get
(
'/api/exam/v1/exam/search-paper'
,
{
params
})
}
/**
* 删除考试
*/
export
function
delExamPaper
(
data
)
{
return
httpRequest
.
post
(
'/api/exam/v1/exam/delete'
,
data
)
}
/**
* 查看考试详情
*/
export
function
getExamPaperDetail
(
params
)
{
return
httpRequest
.
get
(
'/api/exam/v1/exam/view'
,
{
params
})
}
src/modules/exam/components/BaseInfo.vue
浏览文件 @
c8c0fca7
<
template
>
<el-card
class=
"baseInfo_content"
>
<el-row
:span=
"24"
>
考试名称:
<el-input
v-model=
"
exam_name"
placeholder=
"请输入考试名称"
style=
"width: 20
0px"
></el-input>
考试名称:
<el-input
v-model=
"
name"
placeholder=
"请输入考试名称"
style=
"width: 200px; margin-left: 2
0px"
></el-input>
</el-row>
<el-row
:span=
"24"
style=
"margin-top: 20px
"
>
考试时间:
<el-time-picker
is-range
<el-row
:span=
"24"
class=
"row_margin
"
>
考试时间:
<el-date-picker
v-model=
"exam_time"
type=
"datetimerange"
range-separator=
"至"
start-placeholder=
"开始
时间
"
end-placeholder=
"结束
时间
"
placeholder=
"选择时间范围
"
start-placeholder=
"开始
日期
"
end-placeholder=
"结束
日期
"
value-format=
"yyyy-MM-dd hh:mm:ss
"
>
</el-
tim
e-picker>
</el-
dat
e-picker>
</el-row>
<el-row
:span=
"24"
style=
"margin-top: 20px
"
>
<el-
radio>
提前登录
</el-radio
>
开考前
<el-input
v-model=
"
form.first_time"
style=
"width: 100px
"
></el-input
<el-row
:span=
"24"
class=
"row_margin
"
>
<el-
checkbox
v-model=
"config.enabled_before"
>
提前登录
</el-checkbox
>
开考前
<el-input
v-model=
"
config.before_login"
class=
"input_time
"
></el-input
>
分钟,考生可以登录系统,确认信息。(开考最多60分钟提前登录)
</el-row>
<el-row
:span=
"24"
style=
"margin-top: 20px
"
>
<el-
radio>
限制结束
</el-radio
>
<el-input
v-model=
"
form.last_time"
style=
"width: 100px"
>
开考后
</el-input
<el-row
:span=
"24"
class=
"row_margin
"
>
<el-
checkbox
v-model=
"config.$emitenabled_after"
>
限制结束
</el-checkbox
>
开考后
<el-input
v-model=
"
config.after_login"
class=
"input_time"
>
</el-input
>
分钟,不允许考生入场,考中退出的考生不受此影响。
</el-row>
<el-row
:span=
"24"
style=
"margin-top: 20px"
>
欢迎语:
<v-editor></v-editor>
</el-row>
<el-row
:span=
"24"
class=
"row_margin"
>
<div
class=
"label_left"
>
提前登录语:
</div>
<v-editor
v-model=
"config.waiting_message"
class=
"editor"
></v-editor>
</el-row>
<el-row
:span=
"24"
class=
"row_margin"
>
<div
class=
"label_left"
>
欢迎语:
</div>
<v-editor
v-model=
"config.welcome_message"
class=
"editor"
></v-editor>
</el-row>
<el-row
:span=
"24"
class=
"btn_next row_margin"
>
<el-button
type=
"primary"
disabled
>
上一步
</el-button>
<el-button
type=
"primary"
@
click=
"nextStep"
>
下一步
</el-button>
</el-row>
</el-card>
</
template
>
<
script
>
// import { createExamList } from '../api'
import
VEditor
from
'@/components/tinymce/Index.vue'
export
default
{
components
:
{
VEditor
},
data
()
{
return
{
exam_time
:
[],
labelPosition
:
'left'
,
form
:
{
exam_name
:
''
,
exam_time
:
[],
last_time
:
''
,
welcome
:
''
name
:
''
,
config
:
{
enabled_before
:
false
,
enabled_after
:
false
,
before_login
:
''
,
after_login
:
''
,
welcome_message
:
''
,
waiting_message
:
''
}
}
},
computed
:
{
start_time
()
{
return
this
.
exam_time
[
0
]
},
end_time
()
{
return
this
.
exam_time
[
1
]
}
},
methods
:
{
nextStep
()
{
const
params
=
{
name
:
this
.
name
,
start_time
:
this
.
start_time
,
end_time
:
this
.
end_time
,
config
:
{
enabled_before
:
this
.
config
.
enabled_before
,
before_login
:
this
.
config
.
before_login
,
enabled_after
:
this
.
config
.
enabled_after
,
after_login
:
this
.
config
.
after_login
,
welcome_message
:
this
.
config
.
welcome_message
,
waiting_message
:
this
.
config
.
waiting_message
}
}
if
(
params
.
name
===
''
)
{
this
.
$message
.
warning
(
'请输入考试名称'
)
return
}
else
if
(
params
.
start_time
===
''
||
params
.
end_time
===
''
)
{
this
.
$message
.
warning
(
'请选择考试时间'
)
return
}
// console.log(params)
this
.
$emit
(
'getBaseInfo'
,
params
)
this
.
$parent
.
$parent
.
nextStep
()
}
}
}
</
script
>
...
...
@@ -50,8 +103,24 @@ export default {
<
style
lang=
"scss"
scoped
>
.baseInfo_content
{
display
:
flex
;
justify-content
:
flex-start
;
align-items
:
flex-start
;
justify-content
:
center
;
align-items
:
center
;
flex-direction
:
column
;
}
.btn_next
{
margin-top
:
20px
;
text-align
:
right
;
}
.input_time
{
width
:
100px
;
margin-left
:
10px
;
margin-right
:
10px
;
}
.row_margin
{
margin-top
:
20px
;
padding-bottom
:
20px
;
}
.label_left
{
margin-bottom
:
20px
;
}
</
style
>
src/modules/exam/components/CheckPaper.vue
浏览文件 @
c8c0fca7
...
...
@@ -2,42 +2,87 @@
<el-card>
<el-transfer
filterable
:filter-method=
"filterMethod
"
filter-placeholder=
"请输入城市拼音
"
v-model=
"value
"
:
data=
"data
"
filter-placeholder=
"请输入关键词搜索
"
v-model=
"q
"
:data=
"ExamParerList
"
:
filterMethod=
"filterMethod
"
>
</el-transfer>
<el-card
style=
"margin-top: 20px"
>
<div>
考生的试卷会从以上已选的试卷中随机抽取
</div>
<div>
考试开始两个小时前,可以对试卷进行替换
</div>
</el-card>
<el-row
style=
"margin-top: 20px"
>
<div
class=
"paper_desc"
>
考生的试卷会从以上已选的试卷中随机抽取
</div>
<div
class=
"paper_desc"
>
考试开始两个小时前,可以对试卷进行替换
</div>
</el-row>
<el-row
class=
"btn_next"
>
<el-button
type=
"primary"
@
click=
"lastStep"
>
上一步
</el-button>
<el-button
type=
"primary"
@
click=
"nextStep"
>
下一步
</el-button>
</el-row>
</el-card>
</
template
>
<
script
>
import
{
getExamPaperList
}
from
'../api'
export
default
{
data
()
{
const
generateData
=
_
=>
{
const
data
=
[]
const
cities
=
[
'上海'
,
'北京'
,
'广州'
,
'深圳'
,
'南京'
,
'西安'
,
'成都'
]
const
pinyin
=
[
'shanghai'
,
'beijing'
,
'guangzhou'
,
'shenzhen'
,
'nanjing'
,
'xian'
,
'chengdu'
]
cities
.
forEach
((
city
,
index
)
=>
{
data
.
push
({
label
:
city
,
key
:
index
,
pinyin
:
pinyin
[
index
]
})
})
return
data
}
return
{
data
:
generateData
()
,
value
:
[],
ExamParerList
:
[]
,
q
:
[],
filterMethod
(
query
,
item
)
{
return
item
.
pinyin
.
indexOf
(
query
)
>
-
1
return
item
.
label
.
indexOf
(
query
)
>
-
1
||
item
.
key
.
indexOf
(
query
)
>
-
1
},
checkedArrs
:
[]
}
},
methods
:
{
getExamParerList
()
{
const
params
=
{
q
:
''
}
getExamPaperList
(
params
).
then
(
res
=>
{
// this.ExamParerList = res.data.list
// console.log(res.data.list)
this
.
ExamParerList
=
res
.
data
.
list
.
reduce
((
a
,
b
)
=>
{
this
.
ExamParerList
.
push
({
label
:
b
.
paper_title
,
key
:
b
.
id
})
return
this
.
ExamParerList
},
[])
})
},
lastStep
()
{
this
.
$parent
.
$parent
.
lastStep
()
},
nextStep
()
{
if
(
!
this
.
q
.
length
)
{
this
.
$message
.
warning
(
'请必须选择试卷才能进行下一步操作'
)
return
}
this
.
$parent
.
$parent
.
nextStep
()
console
.
log
(
this
.
q
)
for
(
let
i
=
0
;
i
<
this
.
q
.
length
;
i
++
)
{
const
listArray
=
[]
for
(
let
j
=
0
;
j
<
this
.
ExamParerList
.
length
;
j
++
)
{
if
(
this
.
q
[
i
]
===
this
.
ExamParerList
[
j
].
key
)
{
console
.
log
(
this
.
ExamParerList
[
j
])
listArray
.
push
(
this
.
ExamParerList
[
j
])
}
}
this
.
checkedArrs
=
listArray
}
// console.log(this.checkedArrs)
const
qs
=
this
.
q
.
toString
()
this
.
$emit
(
'getCheckPaper'
,
qs
)
this
.
$emit
(
'getCheckPaperList'
,
this
.
checkedArrs
)
}
},
mounted
()
{
this
.
getExamParerList
()
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.btn_next
{
text-align
:
right
;
margin-top
:
20px
;
}
.paper_desc
{
font-size
:
16px
;
color
:
#c01c40
;
}
</
style
>
src/modules/exam/components/ExamSetting.vue
浏览文件 @
c8c0fca7
<
template
>
<
el-form
:model=
"form"
label-width=
"80px"
:label-position=
"labelPosition"
>
<
div
>
<el-card>
<el-form-item
label=
"开考前:"
prop=
"exam_before"
>
<el-checkbox>
限定登录位置
</el-checkbox>
<div>
您可以根据IP地址限制考生登录位置,只允许给定IP地址的考生登录考试。
<br
/>
如允许多个IP地址,请用英文逗号隔开。您当前所在网络的IP地址是:172.20.1.1
</div>
</el-form-item>
<el-form-item>
<el-checkbox>
限定登录位置
</el-checkbox>
</el-form-item>
<el-row
:span=
"24"
>
开考前:
<el-checkbox
v-model=
"config.enabled_ip_limit"
style=
"margin-left: 20px"
>
限定登录位置
</el-checkbox
>
<span>
<span
style=
"margin-top: 20px"
>
您可以根据IP地址限制考生登录位置,只允许给定IP地址的考生登录考试。
<el-input
v-model=
"config.ip_limits"
placeholder=
"如允许多个IP地址,请用逗号隔开"
style=
"width: 230px"
></el-input>
您当前所在网络的IP地址是:172.20.1.1
</span
>
</span>
</el-row>
<el-row
:span=
"24"
style=
"margin-left: 72px"
>
<el-checkbox
v-model=
"config.enabled_promise"
>
考试承诺书
</el-checkbox>
<span>
考生在登录考试后,需同意以下内容方可进入考试。
</span>
<v-editor
v-model=
"config.promise_message"
v-if=
"config.enabled_promise === true"
></v-editor>
</el-row>
</el-card>
<el-card>
<el-form-item
label=
"考试中:"
prop=
"exam_before"
>
<el-checkbox>
锁定考试
</el-checkbox>
<el-form>
<el-form-item>
记录考生登录考试次数,只允许登录
<el-input
style=
"width: 100px"
></el-input>
次
<div>
当登录考试次数超过限定次数,系统会阻止考生登录考试
</div>
</el-form-item>
<el-form-item>
<el-checkbox>
网页考试
</el-checkbox>
记录考生离开考试页面次数,每超过
<el-input
style=
"width: 100px"
></el-input>
秒计为离开1次,只允许离开
<el-input
style=
"width: 100px"
></el-input
>
次
<div>
当登录考试次数超过限定次数,系统会阻止考生登录考试
</div>
</el-form-item>
</el-form>
</el-form-item>
<el-form-item>
<el-checkbox>
答题水印
</el-checkbox>
<div>
<el-card
style=
"margin-top: 30px"
>
<el-row>
考试中:
<el-checkbox
v-model=
"config.enabled_lock"
style=
"margin-left: 20px"
>
锁定考试
</el-checkbox>
<div
style=
"margin-left: 120px"
>
记录考生登录考试次数,只允许登录
<el-input
style=
"width: 100px"
v-model=
"config.max_login_times"
></el-input>
次
<div>
当登录考试次数超过限定次数,系统会阻止考生登录考试
</div>
<el-checkbox
v-model=
"config.enabled_web_login"
>
网页考试
</el-checkbox>
记录考生离开考试页面次数,每超过
<el-input
v-model=
"config.leave_interval"
style=
"width: 100px"
></el-input
>
秒计为离开1次,只允许离开
<el-input
style=
"width: 100px"
v-model=
"config.max_leave_times"
></el-input>
次
<div>
当登录考试次数超过限定次数,系统会阻止考生登录考试
</div>
</div>
</el-row>
<el-row
style=
"margin-left: 73px"
>
<el-checkbox
v-model=
"config.enabled_watermark"
>
答题水印
</el-checkbox>
<div
style=
"margin-left: 50px"
>
考生作答页面,使用场次唯一编号和考生准考证号作为背景水印。
<br
/>
考生作答过程中截屏或者偷录考试内容,可凭此水印追溯到录屏信息。
</div>
</el-form-item>
<el-form-item
label=
"参加考试"
>
<el-transfer></el-transfer>
</el-form-item>
</el-row>
<el-row
:span=
"24"
class=
"btn_next"
>
<el-button
type=
"primary"
@
click=
"lastStep"
>
上一步
</el-button>
<el-button
type=
"primary"
@
click=
"nextStep"
>
下一步
</el-button>
</el-row>
</el-card>
</
el-form
>
</
div
>
</
template
>
<
script
>
import
VEditor
from
'@/components/tinymce/Index.vue'
export
default
{
components
:
{
VEditor
},
data
()
{
return
{
labelPosition
:
'left'
,
form
:
{
exam_before
:
''
,
exam_process
:
''
,
last_time
:
''
,
welcome
:
''
config
:
{
enabled_ip_limit
:
false
,
ip_limits
:
''
,
enabled_promise
:
false
,
enabled_lock
:
false
,
max_login_times
:
''
,
enabled_web_login
:
''
,
leave_interval
:
''
,
max_leave_times
:
''
,
enabled_watermark
:
false
,
promise_message
:
''
}
}
},
methods
:
{
lastStep
()
{
this
.
$parent
.
$parent
.
lastStep
()
},
nextStep
()
{
this
.
$parent
.
$parent
.
nextStep
()
this
.
$emit
(
'getExamConfig'
,
this
.
config
)
}
}
}
</
script
>
<
style
></
style
>
<
style
lang=
"scss"
scoped
>
.btn_next
{
text-align
:
right
;
margin-top
:
20px
;
}
</
style
>
src/modules/exam/components/Finished.vue
浏览文件 @
c8c0fca7
<
template
>
<el-card>
<div
class=
"finished_title"
>
测试考试
</div>
<div
class=
"login_time item"
>
登录时间段:
2022-02-23 00:00:00 - 2022-2-24 00:00:00
</div>
<div
class=
"check_exam item"
>
选择考试:
xxx
</div>
<div
class=
"finished_title"
>
{{
params
.
name
}}
</div>
<div
class=
"login_time item"
>
登录时间段:
{{
params
.
start_time
}}
-
{{
params
.
start_time
}}
</div>
<div
class=
"check_exam item"
>
选择考试:
{{
checkedPapers
.
toString
()
}}
</div>
<div
class=
"exam_setting item"
>
考试配置:
<el-button>
默认按钮
</el-button>
<el-button
type=
"primary"
>
主要按钮
</el-button>
<el-button
type=
"success"
>
成功按钮
</el-button>
<el-button
type=
"info"
>
信息按钮
</el-button>
<el-button
type=
"warning"
>
警告按钮
</el-button>
<el-button
type=
"danger"
>
危险按钮
</el-button>
考试配置:
<el-button
v-show=
"configs.enabled_ip_limit === true"
>
限定登录位置
</el-button>
<el-button
type=
"primary"
v-show=
"configs.enabled_promise === true"
>
考试承诺书
</el-button>
<el-button
type=
"success"
v-show=
"configs.enabled_lock === true"
>
锁定考试
</el-button>
<el-button
type=
"info"
v-show=
"configs.enabled_watermark === true"
>
答题水印
</el-button>
</div>
<el-row
class=
"btn_next"
>
<el-button
type=
"primary"
@
click=
"lastStep"
>
上一步
</el-button>
<el-button
type=
"primary"
@
click=
"finished"
>
完成
</el-button>
</el-row>
</el-card>
</
template
>
<
script
>
export
default
{}
import
{
createExamList
}
from
'../api'
export
default
{
props
:
{
params
:
{
config
:
{}
},
config
:
{
info
:
{}
},
examPaper
:
{
type
:
String
},
configs
:
{},
checkedPaper
:
{
type
:
Array
}
},
computed
:
{
checkedPapers
()
{
const
a
=
this
.
checkedPaper
.
map
(
item
=>
{
return
item
.
label
})
.
join
(
','
)
.
split
(
','
)
return
a
}
},
mounted
()
{
console
.
log
(
this
.
params
,
'params'
)
},
methods
:
{
lastStep
()
{
this
.
$parent
.
$parent
.
lastStep
()
},
finished
()
{
const
params
=
{
name
:
this
.
params
.
name
,
start_time
:
this
.
params
.
start_time
,
end_time
:
this
.
params
.
end_time
,
exam_paper
:
this
.
examPaper
,
config
:
Object
.
assign
(
this
.
config
,
this
.
configs
,
this
.
params
.
config
)
}
createExamList
(
params
).
then
(
res
=>
{
this
.
$message
.
success
(
'创建成功'
)
this
.
$router
.
push
(
'list'
)
})
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
...
...
@@ -28,4 +77,8 @@ export default {}
.item
{
margin-top
:
30px
;
}
.btn_next
{
text-align
:
right
;
margin-top
:
20px
;
}
</
style
>
src/modules/exam/components/PersonalInfo.vue
浏览文件 @
c8c0fca7
...
...
@@ -11,9 +11,13 @@
<el-switch
v-model=
"row.isRequired"
active-color=
"#13ce66"
inactive-color=
"#ff4949"
>
</el-switch>
</
template
>
<
template
v-slot:weight=
"{ row }"
>
<el-input
v-model=
"row.
weigh
t"
active-color=
"#13ce66"
inactive-color=
"#ff4949"
>
</el-input>
<el-input
v-model=
"row.
sor
t"
active-color=
"#13ce66"
inactive-color=
"#ff4949"
>
</el-input>
</
template
>
</app-list>
<el-row
class=
"btn_next"
>
<el-button
type=
"primary"
@
click=
"lastStep"
>
上一步
</el-button>
<el-button
type=
"primary"
@
click=
"nextStep"
>
下一步
</el-button>
</el-row>
</app-card>
</template>
...
...
@@ -32,22 +36,107 @@ export default {
columns
:
[
{
label
:
'已选信息'
,
prop
:
'isCheckedInfo'
},
{
label
:
'允许编辑'
,
prop
:
'
isE
dit'
,
slots
:
'isEdit'
},
{
label
:
'考生可见'
,
prop
:
'
isV
isible'
,
slots
:
'isVisible'
},
{
label
:
'必填'
,
prop
:
'
isR
equired'
,
slots
:
'isRequired'
},
{
label
:
'权重'
,
prop
:
'
weigh
t'
,
slots
:
'weight'
}
{
label
:
'允许编辑'
,
prop
:
'
enabled_e
dit'
,
slots
:
'isEdit'
},
{
label
:
'考生可见'
,
prop
:
'
enabled_v
isible'
,
slots
:
'isVisible'
},
{
label
:
'必填'
,
prop
:
'
r
equired'
,
slots
:
'isRequired'
},
{
label
:
'权重'
,
prop
:
'
sor
t'
,
slots
:
'weight'
}
],
data
:
[
{
isCheckedInfo
:
'姓名'
,
isEdit
:
true
,
isVisible
:
true
,
isRequired
:
true
,
weight
:
'1'
enabled_edit
:
false
,
enabled_visible
:
false
,
required
:
false
,
sort
:
0
},
{
isCheckedInfo
:
'性别'
,
isEdit
:
false
,
isVisible
:
false
,
isRequired
:
false
,
sort
:
0
},
{
isCheckedInfo
:
'身份证号'
,
enabled_edit
:
false
,
enabled_visible
:
false
,
required
:
false
,
sort
:
0
},
{
isCheckedInfo
:
'年龄'
,
ienabled_edit
:
false
,
enabled_visible
:
false
,
required
:
false
,
sort
:
0
},
{
isCheckedInfo
:
'所学专业'
,
enabled_edit
:
false
,
enabled_visible
:
false
,
required
:
false
,
sort
:
0
},
{
isCheckedInfo
:
'所在学校'
,
enabled_edit
:
false
,
enabled_visible
:
false
,
required
:
false
,
sort
:
0
},
{
isCheckedInfo
:
'邮箱'
,
enabled_edit
:
false
,
enabled_visible
:
false
,
required
:
false
,
sort
:
0
},
{
isCheckedInfo
:
'学历'
,
isEdit
:
false
,
isVisible
:
false
,
isRequired
:
false
,
sort
:
0
},
{
isCheckedInfo
:
'手机号'
,
enabled_edit
:
false
,
enabled_visible
:
false
,
required
:
false
,
sort
:
0
}
]
}
}
},
methods
:
{
nextStep
()
{
this
.
$parent
.
$parent
.
nextStep
()
},
lastStep
()
{
this
.
$parent
.
$parent
.
lastStep
()
}
},
mounted
()
{
console
.
log
(
this
.
tableOptions
.
data
)
const
info
=
{}
info
.
name
=
this
.
tableOptions
.
data
[
0
]
info
.
gender
=
this
.
tableOptions
.
data
[
1
]
info
.
id_number
=
this
.
tableOptions
.
data
[
2
]
info
.
age
=
this
.
tableOptions
.
data
[
3
]
info
.
major
=
this
.
tableOptions
.
data
[
4
]
info
.
school
=
this
.
tableOptions
.
data
[
5
]
info
.
email
=
this
.
tableOptions
.
data
[
6
]
info
.
educational_background
=
this
.
tableOptions
.
data
[
7
]
info
.
mobile
=
this
.
tableOptions
.
data
[
8
]
this
.
$emit
(
'getInfo'
,
info
)
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.btn_next
{
text-align
:
right
;
margin-top
:
20px
;
}
</
style
>
src/modules/exam/views/Detail.vue
浏览文件 @
c8c0fca7
...
...
@@ -22,6 +22,7 @@
</template>
<
script
>
import
{
getExamPaperDetail
}
from
'../api'
export
default
{
data
()
{
return
{
...
...
@@ -32,7 +33,15 @@ export default {
computed
:
{
tableOptions
()
{
return
{
// remote: { httpRequest: getAppList },
remote
:
{
httpRequest
:
getExamPaperDetail
,
params
:
{
id
:
this
.
row
.
exam_id
,
school
:
''
,
relation_status
:
''
,
name
:
''
}
},
filters
:
[
{
type
:
'input'
,
...
...
@@ -58,10 +67,15 @@ export default {
],
columns
:
[
{
type
:
'selection'
,
minWidth
:
'50px'
,
fixed
:
'left'
},
{
type
:
'index'
,
label
:
'序号'
,
minWidth
:
'50px'
,
fixed
:
'left'
},
{
label
:
'姓名'
,
prop
:
'stu_name'
},
{
label
:
'学校'
,
prop
:
'stu_school'
},
{
label
:
'考生状态'
,
prop
:
'stu_status'
}
{
label
:
'考生状态'
,
prop
:
'name'
},
{
label
:
'准考证号'
,
prop
:
'examinee_number'
},
{
label
:
'身份证号'
,
prop
:
'id_number'
},
{
label
:
'电话'
,
prop
:
'mobile'
},
{
label
:
'考生姓名'
,
prop
:
'name'
},
{
label
:
'学校'
,
prop
:
'school'
},
{
label
:
'参考时间'
,
prop
:
'exam_begin_time'
},
{
label
:
'考中异常'
,
prop
:
'exam_error'
},
{
label
:
'成绩'
,
prop
:
'sheet.score'
}
],
data
:
[
{
...
...
@@ -71,6 +85,9 @@ export default {
}
]
}
},
row
()
{
return
this
.
$route
.
query
.
row
}
},
methods
:
{
...
...
src/modules/exam/views/List.vue
浏览文件 @
c8c0fca7
...
...
@@ -13,7 +13,7 @@
</template>
<
script
>
import
{
getExamList
}
from
'../api'
import
{
getExamList
,
delExamPaper
}
from
'../api'
export
default
{
data
()
{
return
{
...
...
@@ -50,10 +50,16 @@ export default {
{
label
:
'考试ID'
,
prop
:
'exam_id'
},
{
label
:
'考试名称'
,
prop
:
'name'
},
{
label
:
'考试试卷'
,
prop
:
'papers'
},
{
label
:
'考试时间'
,
prop
:
'exam_time'
},
{
label
:
'考试时间'
,
prop
:
'exam_time'
,
computed
({
row
})
{
return
row
.
start_time
+
'-'
+
row
.
end_time
}
},
{
label
:
'应考人数'
,
prop
:
'exam_all'
},
{
label
:
'完成人数'
,
prop
:
'exam_complete'
},
{
label
:
'在线人数'
,
prop
:
'
online_num
'
},
{
label
:
'在线人数'
,
prop
:
'
exam_online
'
},
{
label
:
'考试状态'
,
prop
:
'status_text'
},
{
label
:
'操作'
,
slots
:
'table-x'
,
align
:
'right'
,
width
:
150
}
]
...
...
@@ -90,12 +96,20 @@ export default {
// 查看详情
handleDetail
(
row
)
{
this
.
$router
.
push
({
path
:
'examDetail'
path
:
'examDetail'
,
query
:
{
row
:
row
}
})
},
// 单个删除
handleDelete
(
row
)
{
// this.$refs.list.refetch()
console
.
log
(
row
)
const
params
=
{
id
:
row
.
exam_id
}
delExamPaper
(
params
).
then
(
res
=>
{
this
.
$message
.
success
(
'删除考试成功'
)
})
this
.
$refs
.
list
.
refetch
()
}
}
}
...
...
src/modules/exam/views/NewExam.vue
浏览文件 @
c8c0fca7
...
...
@@ -7,17 +7,18 @@
<el-step
title=
"考试配置"
></el-step>
<el-step
title=
"考试配置"
></el-step>
</el-steps>
<base-info
v-if=
"stepsIndex === 0"
/>
<check-paper
v-if=
"stepsIndex === 1"
/>
<personal-info
v-if=
"stepsIndex === 2"
/>
<exam-setting
v-if=
"stepsIndex === 3"
/>
<finished
v-if=
"stepsIndex === 4"
/>
<div
style=
"float: right"
>
<el-button
type=
"primary"
v-if=
"stepsIndex != 0"
@
click=
"lastStep"
>
上一步
</el-button>
<el-button
v-if=
"stepsIndex !== 4"
type=
"primary"
@
click=
"nextStep"
>
下一步
</el-button>
<el-button
type=
"primary"
v-if=
"stepsIndex == 4"
>
完成
</el-button>
</div>
<base-info
v-if=
"stepsIndex === 1"
@
getBaseInfo=
"getBaseInfo"
/>
<check-paper
v-if=
"stepsIndex === 2"
@
getCheckPaper=
"getCheckPaper"
@
getCheckPaperList=
"getCheckPaperList"
/>
<personal-info
v-if=
"stepsIndex === 3"
@
getInfo=
"getInfo"
/>
<exam-setting
v-if=
"stepsIndex === 4"
@
getExamConfig=
"getExamConfig"
/>
<finished
v-if=
"stepsIndex === 5"
:params=
"params"
:configs=
"configs"
:checkedPaper=
"checkedPaper"
:config=
"config"
:examPaper=
"exam_paper"
/>
</app-card>
</
template
>
...
...
@@ -37,11 +38,42 @@ export default {
},
data
()
{
return
{
stepsIndex
:
0
// tabActive: 'baseInfo'
stepsIndex
:
1
,
config
:
{
info
:
{}
},
configs
:
{},
params
:
{},
exam_paper
:
''
,
checkedPaper
:
[]
}
},
methods
:
{
// 获取子组件传过来的页面基本信息
getBaseInfo
(
val
)
{
this
.
params
=
val
console
.
log
(
val
,
'123'
)
},
// 试卷id
getCheckPaper
(
val
)
{
// console.log(val)
this
.
exam_paper
=
val
},
// 选择的试卷
getCheckPaperList
(
val
)
{
console
.
log
(
val
)
this
.
checkedPaper
=
val
},
// @ts-nocheck个人信息
getInfo
(
val
)
{
this
.
config
.
info
=
val
// console.log(this.config.info)
},
// 考试配置
getExamConfig
(
val
)
{
this
.
configs
=
val
},
nextStep
()
{
this
.
stepsIndex
++
},
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论