Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
center-qa
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
center-qa
Commits
34690d24
提交
34690d24
authored
4月 24, 2022
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: 优化考试页面
上级
0d3e3613
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
62 行增加
和
17 行删除
+62
-17
AppList.vue
src/components/base/AppList.vue
+27
-7
Main.vue
src/components/layout/Main.vue
+1
-1
QuestionItem.vue
src/modules/exam/components/QuestionItem.vue
+6
-0
Detail.vue
src/modules/exam/views/Detail.vue
+12
-1
importQuestion.vue
src/modules/question/components/importQuestion.vue
+16
-8
没有找到文件。
src/components/base/AppList.vue
浏览文件 @
34690d24
...
@@ -102,7 +102,8 @@ export default {
...
@@ -102,7 +102,8 @@ export default {
hasPagination
:
{
type
:
Boolean
,
default
:
true
},
hasPagination
:
{
type
:
Boolean
,
default
:
true
},
// 每页多少条数据
// 每页多少条数据
limit
:
{
type
:
Number
,
default
:
10
},
limit
:
{
type
:
Number
,
default
:
10
},
pagationLayout
:
{
type
:
String
,
default
:
'total, prev, pager, next, sizes, jumper'
}
pagationLayout
:
{
type
:
String
,
default
:
'total, prev, pager, next, sizes, jumper'
},
isFilterChangeRoute
:
{
type
:
Boolean
,
default
:
false
}
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -124,6 +125,16 @@ export default {
...
@@ -124,6 +125,16 @@ export default {
handler
(
data
)
{
handler
(
data
)
{
this
.
dataList
=
data
this
.
dataList
=
data
}
}
},
$route
:
{
immediate
:
true
,
handler
(
route
)
{
if
(
this
.
isFilterChangeRoute
)
{
this
.
params
=
Object
.
assign
({},
this
.
remote
.
params
,
route
.
query
)
this
.
page
.
currentPage
=
parseInt
(
route
.
query
.
page
)
||
1
this
.
page
.
size
=
parseInt
(
route
.
query
[
'per-page'
])
||
this
.
limit
}
}
}
}
},
},
computed
:
{
computed
:
{
...
@@ -132,7 +143,11 @@ export default {
...
@@ -132,7 +143,11 @@ export default {
}
}
},
},
methods
:
{
methods
:
{
fetchList
(
isReset
)
{
updateRoute
(
params
)
{
const
query
=
Object
.
assign
({},
this
.
$route
.
query
,
params
)
this
.
$router
.
push
({
path
:
this
.
$route
.
path
,
query
})
},
fetchList
(
isReset
,
isInit
)
{
/**
/**
* @param function httpRequest api接口
* @param function httpRequest api接口
* @param function beforeRequest 接口请求之前
* @param function beforeRequest 接口请求之前
...
@@ -154,10 +169,14 @@ export default {
...
@@ -154,10 +169,14 @@ export default {
if
(
beforeRequest
)
{
if
(
beforeRequest
)
{
params
=
beforeRequest
(
params
,
isReset
)
params
=
beforeRequest
(
params
,
isReset
)
}
}
for
(
const
key
in
params
)
{
// for (const key in params) {
if
(
params
[
key
]
===
''
||
params
[
key
]
===
undefined
||
params
[
key
]
===
null
)
{
// if (params[key] === '' || params[key] === undefined || params[key] === null) {
delete
params
[
key
]
// delete params[key]
}
// }
// }
if
(
this
.
isFilterChangeRoute
&&
!
isInit
)
{
this
.
updateRoute
(
params
)
return
}
}
this
.
loading
=
true
this
.
loading
=
true
httpRequest
(
params
)
httpRequest
(
params
)
...
@@ -181,6 +200,7 @@ export default {
...
@@ -181,6 +200,7 @@ export default {
},
},
// 重置
// 重置
reset
()
{
reset
()
{
this
.
params
=
this
.
remote
.
params
||
{}
// 清空筛选条件
// 清空筛选条件
this
.
$refs
.
filterForm
&&
this
.
$refs
.
filterForm
.
resetFields
()
this
.
$refs
.
filterForm
&&
this
.
$refs
.
filterForm
.
resetFields
()
// 初始化页码
// 初始化页码
...
@@ -203,7 +223,7 @@ export default {
...
@@ -203,7 +223,7 @@ export default {
}
}
},
},
beforeMount
()
{
beforeMount
()
{
this
.
fetchList
()
this
.
fetchList
(
false
,
true
)
}
}
}
}
</
script
>
</
script
>
...
...
src/components/layout/Main.vue
浏览文件 @
34690d24
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<app-breadcrumb
v-if=
"hasBreadcrumb"
></app-breadcrumb>
<app-breadcrumb
v-if=
"hasBreadcrumb"
></app-breadcrumb>
</div>
</div>
<div
class=
"app-main-container"
>
<div
class=
"app-main-container"
>
<router-view></router-view>
<router-view
:key=
"$route.fullPath"
></router-view>
</div>
</div>
</div>
</div>
</section>
</section>
...
...
src/modules/exam/components/QuestionItem.vue
浏览文件 @
34690d24
...
@@ -74,6 +74,7 @@ export default {
...
@@ -74,6 +74,7 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
bc
:
null
,
questionData
:
{},
questionData
:
{},
showComment
:
false
,
showComment
:
false
,
comment
:
''
comment
:
''
...
@@ -98,6 +99,9 @@ export default {
...
@@ -98,6 +99,9 @@ export default {
this
.
questionData
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
question
.
item
))
this
.
questionData
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
question
.
item
))
// if (this.questionType === 3) console.log(this.questionData)
// if (this.questionType === 3) console.log(this.questionData)
},
},
destroyed
()
{
this
.
bc
&&
this
.
bc
.
close
()
},
methods
:
{
methods
:
{
fetchComment
()
{
fetchComment
()
{
const
params
=
{
const
params
=
{
...
@@ -113,6 +117,8 @@ export default {
...
@@ -113,6 +117,8 @@ export default {
}
else
{
}
else
{
this
.
$message
.
success
(
'提交点评失败'
)
this
.
$message
.
success
(
'提交点评失败'
)
}
}
this
.
bc
=
new
BroadcastChannel
(
'exam'
)
this
.
bc
.
postMessage
({
action
:
'refetch'
})
})
})
}
}
}
}
...
...
src/modules/exam/views/Detail.vue
浏览文件 @
34690d24
...
@@ -102,12 +102,14 @@ export default {
...
@@ -102,12 +102,14 @@ export default {
multipleSelection
:
[],
// 选择项
multipleSelection
:
[],
// 选择项
dialogVisible
:
false
,
dialogVisible
:
false
,
transferList
:
[],
transferList
:
[],
transfer_exam_id
:
''
transfer_exam_id
:
''
,
bc
:
null
}
}
},
},
computed
:
{
computed
:
{
tableOptions
()
{
tableOptions
()
{
return
{
return
{
isFilterChangeRoute
:
true
,
remote
:
{
remote
:
{
httpRequest
:
getExamPaperDetail
,
httpRequest
:
getExamPaperDetail
,
params
:
{
params
:
{
...
@@ -288,6 +290,15 @@ export default {
...
@@ -288,6 +290,15 @@ export default {
mounted
()
{
mounted
()
{
// 获取转移列表
// 获取转移列表
this
.
getTransferList
()
this
.
getTransferList
()
this
.
bc
=
new
BroadcastChannel
(
'exam'
)
this
.
bc
.
onmessage
=
({
data
})
=>
{
if
(
data
.
action
===
'refetch'
)
{
this
.
$refs
.
list
.
refetch
()
}
}
},
destroyed
()
{
this
.
bc
&&
this
.
bc
.
close
()
}
}
}
}
</
script
>
</
script
>
src/modules/question/components/importQuestion.vue
浏览文件 @
34690d24
...
@@ -28,7 +28,9 @@
...
@@ -28,7 +28,9 @@
</div>
</div>
<div
style=
"text-align: center; margin-top: 15px"
>
<div
style=
"text-align: center; margin-top: 15px"
>
<el-button
size=
"mini"
@
click=
"cancel"
>
取消
</el-button>
<el-button
size=
"mini"
@
click=
"cancel"
>
取消
</el-button>
<el-button
type=
"primary"
size=
"mini"
@
click=
"submitUpload"
style=
"margin-right: 5px"
>
确认提交
</el-button>
<el-button
type=
"primary"
size=
"mini"
:disabled=
"submitLoading"
@
click=
"submitUpload"
style=
"margin-right: 5px"
>
确认提交
</el-button
>
</div>
</div>
</el-dialog>
</el-dialog>
</
template
>
</
template
>
...
@@ -45,7 +47,8 @@ export default {
...
@@ -45,7 +47,8 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
fileList
:
[]
fileList
:
[],
submitLoading
:
false
}
}
},
},
computed
:
{
computed
:
{
...
@@ -64,12 +67,17 @@ export default {
...
@@ -64,12 +67,17 @@ export default {
}
}
},
},
fetchFileUpload
(
data
)
{
fetchFileUpload
(
data
)
{
importQuestion
(
this
.
activeProject
.
tag
,
{
file
:
data
.
file
,
exam_id
:
this
.
id
}).
then
(
res
=>
{
this
.
submitLoading
=
true
if
(
res
.
code
===
0
)
{
importQuestion
(
this
.
activeProject
.
tag
,
{
file
:
data
.
file
,
exam_id
:
this
.
id
})
this
.
$message
.
success
(
'导入数据成功'
)
.
then
(
res
=>
{
history
.
go
(
0
)
if
(
res
.
code
===
0
)
{
}
this
.
$message
.
success
(
'导入数据成功'
)
})
history
.
go
(
0
)
}
})
.
finally
(()
=>
{
this
.
submitLoading
=
false
})
},
},
submitUpload
()
{
submitUpload
()
{
this
.
$refs
.
upload
.
submit
()
this
.
$refs
.
upload
.
submit
()
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论