Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
center-qa
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
center-qa
Commits
c9583aa3
提交
c9583aa3
authored
2月 25, 2022
作者:
matian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
代码提交
上级
ef96bacc
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
69 行增加
和
13 行删除
+69
-13
api.js
src/modules/exam/api.js
+19
-0
BaseInfo.vue
src/modules/exam/components/BaseInfo.vue
+2
-0
CheckPaper.vue
src/modules/exam/components/CheckPaper.vue
+1
-1
Detail.vue
src/modules/exam/views/Detail.vue
+44
-10
axios.js
src/utils/axios.js
+2
-1
vite.config.js
vite.config.js
+1
-1
没有找到文件。
src/modules/exam/api.js
浏览文件 @
c9583aa3
...
@@ -40,3 +40,22 @@ export function addStudent(data) {
...
@@ -40,3 +40,22 @@ export function addStudent(data) {
export
function
updateExam
(
data
)
{
export
function
updateExam
(
data
)
{
return
httpRequest
.
post
(
'/api/exam/v1/exam/update'
,
data
)
return
httpRequest
.
post
(
'/api/exam/v1/exam/update'
,
data
)
}
}
/**
* 考试数据下载
*/
export
function
downloadExamData
(
params
)
{
return
httpRequest
.
get
(
'/api/exam/v1/exam/download-details'
,
{
params
,
responseType
:
'blob'
})
}
/**
* 删除考生
*/
export
function
deleteStudent
(
data
)
{
return
httpRequest
.
post
(
'/api/exam/v1/student/delete'
,
data
)
}
/**
* 发送成绩信息
*/
export
function
sendMessage
(
data
)
{
return
httpRequest
.
post
(
'/api/exam/v1/exam/send-msg'
,
data
)
}
src/modules/exam/components/BaseInfo.vue
浏览文件 @
c9583aa3
...
@@ -119,6 +119,8 @@ export default {
...
@@ -119,6 +119,8 @@ export default {
},
},
saveExamInfo
()
{
saveExamInfo
()
{
const
params
=
{
const
params
=
{
id
:
this
.
row
.
exam_id
,
type
:
'basic'
,
name
:
this
.
name
,
name
:
this
.
name
,
start_time
:
this
.
start_time
,
start_time
:
this
.
start_time
,
end_time
:
this
.
end_time
,
end_time
:
this
.
end_time
,
...
...
src/modules/exam/components/CheckPaper.vue
浏览文件 @
c9583aa3
...
@@ -78,7 +78,7 @@ export default {
...
@@ -78,7 +78,7 @@ export default {
this
.
$emit
(
'getCheckPaperList'
,
this
.
checkedArrs
)
this
.
$emit
(
'getCheckPaperList'
,
this
.
checkedArrs
)
},
},
saveExamInfo
()
{
saveExamInfo
()
{
const
params
=
{
exam_paper
:
this
.
q
.
toString
()
}
const
params
=
{
id
:
this
.
$route
.
query
.
id
,
type
:
'paper'
,
exam_paper
:
this
.
q
.
toString
()
}
updateExam
(
params
).
then
(
res
=>
{
updateExam
(
params
).
then
(
res
=>
{
history
.
go
(
-
1
)
history
.
go
(
-
1
)
})
})
...
...
src/modules/exam/views/Detail.vue
浏览文件 @
c9583aa3
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<app-card>
<app-card>
<app-list
v-bind=
"tableOptions"
ref=
"list"
@
selection-change=
"handleSelectionChange"
>
<app-list
v-bind=
"tableOptions"
ref=
"list"
@
selection-change=
"handleSelectionChange"
>
<div
style=
"margin-bottom: 30px"
>
<div
style=
"margin-bottom: 30px"
>
<el-dropdown
split-button
size=
"small"
style=
"margin-left: 10px; margin-right: 10px"
>
<el-dropdown
split-button
size=
"small"
style=
"margin-left: 10px; margin-right: 10px
; float: right
"
>
操作
操作
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item
@
click
.
native=
"editExamInfo"
>
考试信息编辑
</el-dropdown-item>
<el-dropdown-item
@
click
.
native=
"editExamInfo"
>
考试信息编辑
</el-dropdown-item>
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
</template>
</template>
<
script
>
<
script
>
import
{
getExamPaperDetail
}
from
'../api'
import
{
getExamPaperDetail
,
deleteStudent
,
downloadExamData
}
from
'../api'
const
stuStatus
=
[
const
stuStatus
=
[
{
id
:
'1'
,
name
:
'未开考'
},
{
id
:
'1'
,
name
:
'未开考'
},
{
id
:
'1'
,
name
:
'已登录'
},
{
id
:
'1'
,
name
:
'已登录'
},
...
@@ -48,10 +48,7 @@ export default {
...
@@ -48,10 +48,7 @@ export default {
remote
:
{
remote
:
{
httpRequest
:
getExamPaperDetail
,
httpRequest
:
getExamPaperDetail
,
params
:
{
params
:
{
id
:
this
.
row
.
exam_id
,
id
:
this
.
row
.
exam_id
school
:
''
,
relation_status
:
''
,
name
:
this
.
row
.
name
}
}
},
},
filters
:
[
filters
:
[
...
@@ -98,6 +95,7 @@ export default {
...
@@ -98,6 +95,7 @@ export default {
}
}
},
},
methods
:
{
methods
:
{
handleDetail
()
{},
handleSelectionChange
(
val
)
{
handleSelectionChange
(
val
)
{
this
.
multipleSelection
=
val
this
.
multipleSelection
=
val
},
},
...
@@ -109,22 +107,58 @@ export default {
...
@@ -109,22 +107,58 @@ export default {
query
:
{
id
:
this
.
row
.
exam_id
}
query
:
{
id
:
this
.
row
.
exam_id
}
})
})
},
},
// 考试信息编辑
editExamInfo
()
{
editExamInfo
()
{
this
.
$router
.
push
({
path
:
'baseInfo'
,
query
:
{
row
:
JSON
.
stringify
(
this
.
row
),
isEdit
:
'2'
}
})
this
.
$router
.
push
({
path
:
'baseInfo'
,
query
:
{
row
:
JSON
.
stringify
(
this
.
row
),
isEdit
:
'2'
}
})
},
},
// 考试试卷编辑
editExam
()
{
editExam
()
{
console
.
log
(
this
.
row
)
console
.
log
(
this
.
row
)
this
.
$router
.
push
({
path
:
'checkPaper'
,
query
:
{
papers
:
JSON
.
stringify
(
this
.
row
.
papers
),
isEdit
:
'2'
}
})
this
.
$router
.
push
({
path
:
'checkPaper'
,
query
:
{
papers
:
JSON
.
stringify
(
this
.
row
.
papers
),
isEdit
:
'2'
,
id
:
this
.
row
.
exam_id
}
})
},
},
// 删除考生
// 删除考生
delStudent
()
{},
delStudent
(
row
)
{
const
studentId
=
this
.
multipleSelection
.
map
(
item
=>
item
.
student_id
).
toString
()
const
studentIds
=
studentId
.
toString
()
deleteStudent
({
id
:
studentIds
}).
then
(
res
=>
{
this
.
$message
.
success
(
'删除成功'
)
})
this
.
$refs
.
list
.
refetch
()
},
// 导出明细
// 导出明细
exportDetail
()
{},
exportDetail
()
{
const
params
=
{
id
:
this
.
row
.
exam_id
,
name
:
''
,
relation_status
:
''
,
school
:
''
}
downloadExamData
(
params
).
then
(
r
=>
{
const
blob
=
new
Blob
([
r
],
{
type
:
'application/vnd.ms-excel'
})
console
.
log
(
blob
)
if
(
'download'
in
document
.
createElement
(
'a'
))
{
const
elink
=
document
.
createElement
(
'a'
)
elink
.
download
=
'学员数据.xlsx'
elink
.
style
.
display
=
'none'
elink
.
href
=
URL
.
createObjectURL
(
blob
)
document
.
body
.
appendChild
(
elink
)
elink
.
click
()
URL
.
revokeObjectURL
(
elink
.
href
)
document
.
body
.
removeChild
(
elink
)
}
})
},
// 转移考生
// 转移考生
transferStudent
()
{},
transferStudent
()
{},
// 发送成绩信息
// 发送成绩信息
sendMessage
()
{},
sendMessage
()
{},
editInfo
()
{}
// 信息采集编辑
editInfo
()
{},
// 考试配置编辑
editExamSetting
()
{}
}
}
}
}
</
script
>
</
script
>
src/utils/axios.js
浏览文件 @
c9583aa3
...
@@ -49,8 +49,9 @@ httpRequest.interceptors.request.use(
...
@@ -49,8 +49,9 @@ httpRequest.interceptors.request.use(
httpRequest
.
interceptors
.
response
.
use
(
httpRequest
.
interceptors
.
response
.
use
(
function
(
response
)
{
function
(
response
)
{
const
{
data
}
=
response
const
{
data
}
=
response
console
.
log
(
response
)
// 正常返回
// 正常返回
if
(
data
.
code
===
0
)
{
if
(
data
.
code
===
0
||
data
.
type
===
'application/vnd.ms-excel'
)
{
return
data
return
data
}
}
// 未登录
// 未登录
...
...
vite.config.js
浏览文件 @
c9583aa3
...
@@ -29,7 +29,7 @@ export default defineConfig(({ mode }) => {
...
@@ -29,7 +29,7 @@ export default defineConfig(({ mode }) => {
rewrite
:
path
=>
path
.
replace
(
/^
\/
api
\/
qbs/
,
''
)
rewrite
:
path
=>
path
.
replace
(
/^
\/
api
\/
qbs/
,
''
)
},
},
'/api/exam'
:
{
'/api/exam'
:
{
target
:
'http
s://x-exam-admin-api
.ezijing.com'
,
target
:
'http
://localhost-exam-admin
.ezijing.com'
,
changeOrigin
:
true
,
changeOrigin
:
true
,
rewrite
:
path
=>
path
.
replace
(
/^
\/
api
\/
exam/
,
''
)
rewrite
:
path
=>
path
.
replace
(
/^
\/
api
\/
exam/
,
''
)
},
},
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论