mirror of
https://github.com/QingdaoU/OnlineJudgeFE.git
synced 2024-12-29 16:01:51 +00:00
support filter by problemId or displayId in adding problems to contest
This commit is contained in:
parent
f2fb19b032
commit
45df89ca6f
@ -11,9 +11,9 @@ export const m = {
|
||||
Problem_List: '问题列表',
|
||||
Create_Problem: '增加题目',
|
||||
Export_Import_Problem: '导入导出题目',
|
||||
Contest: '测试&练习',
|
||||
Contest_List: '测试列表',
|
||||
Create_Contest: '创建测试',
|
||||
Contest: '比赛&练习',
|
||||
Contest_List: '比赛列表',
|
||||
Create_Contest: '创建比赛',
|
||||
// User.vue
|
||||
User_User: '用户',
|
||||
Import_User: '导入用户',
|
||||
|
@ -1,5 +1,10 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-input
|
||||
v-model="keyword"
|
||||
placeholder="Keywords"
|
||||
prefix-icon="el-icon-search">
|
||||
</el-input>
|
||||
<el-table :data="problems" v-loading="loading">
|
||||
<el-table-column
|
||||
label="ID"
|
||||
@ -49,7 +54,8 @@
|
||||
total: 0,
|
||||
loading: false,
|
||||
problems: [],
|
||||
contest: {}
|
||||
contest: {},
|
||||
keyword: ''
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
@ -63,6 +69,7 @@
|
||||
getPublicProblem (page) {
|
||||
this.loading = true
|
||||
let params = {
|
||||
keyword: this.keyword,
|
||||
offset: (page - 1) * this.limit,
|
||||
limit: this.limit,
|
||||
rule_type: this.contest.rule_type
|
||||
@ -83,10 +90,16 @@
|
||||
}
|
||||
api.addProblemFromPublic(data).then(() => {
|
||||
this.$emit('on-change')
|
||||
}, () => {})
|
||||
}, () => {
|
||||
})
|
||||
}, () => {
|
||||
})
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'keyword' () {
|
||||
this.getPublicProblem(this.page)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user