11<template >
22 <div class =" main" >
3+ <template >
4+ <el-backtop >
5+ <div style ="
6+ height : 100% ;
7+ width : 100% ;
8+ background-color : #64c8ff ;
9+ box-shadow : 0 0 6px rgba (0 ,0 ,0 , .12 );
10+ text-align : center ;
11+ line-height : 40px ;
12+ color : #1989fa ;
13+ border-radius : 30px ; "
14+ ><i class =" el-icon-top" ></i >
15+ </div >
16+ </el-backtop >
17+ </template >
318 <el-form ref =" form" label-width =" 80px"
419 style =" box-shadow : 0 2px 12px 0 rgba (0 , 0 , 0 , 0.1 ); padding-top : 10px ; padding-right : 20px ; padding-bottom : 3px " >
520 <el-form-item label =" 题目标签" >
2641 v-model =" sortValue"
2742 :options =" sortOptions"
2843 :props =" { expandTrigger: 'hover' }" ></el-cascader >
29- <el-button type =" primary" @click =" getProblemSet " style =" margin-left : 10px ; width : 120px "
44+ <el-button type =" primary" @click =" fetchProblemSet " style =" margin-left : 10px ; width : 120px "
3045 :loading =" loading" >拉取
3146 </el-button >
3247 </el-form-item >
7994 </el-table-column >
8095 </el-table >
8196 </template >
97+ <div style =" margin-top : 30px " >
98+ 第
99+ <el-input-number v-model =" page" :min =" 1" :max =" max_page" style =" margin-left : 15px ; margin-right : 15px "
100+ label =" 页" :disabled =" loading" ></el-input-number >
101+ / {{max_page}}
102+ 页
103+ <el-button type =" primary" style =" margin-left : 15px " icon =" el-icon-right" :loading =" loading" v-on:click =" getProblemSet" round ></el-button >
104+ </div >
82105 </div >
83106</template >
84107
@@ -164,11 +187,17 @@ export default {
164187 }]
165188 }
166189 ],
167- sortValue: [' 0' ]
190+ sortValue: [' 0' ],
191+ page: 1 ,
192+ max_page: 1
168193 }
169194 },
170195
171196 methods: {
197+ fetchProblemSet () {
198+ this .page = 1
199+ this .getProblemSet ()
200+ },
172201 getProblemSet () {
173202 this .notFetch = true
174203 this .loading = true
@@ -183,13 +212,15 @@ export default {
183212 args += ' ,' + this .score [0 ] + ' -' + this .score [1 ]
184213 else
185214 args += ' tags=' + this .score [0 ] + ' -' + this .score [1 ]
186- problemSet .getProblemSetList (args, (e , p ) => {
215+ problemSet .getProblemSetList (this . page , args, (e , p , m ) => {
187216 if (e) {
188217 console .log (p)
189218 this .$message .error (' 拉取失败' )
190219 } else {
191220 this .notFetch = false
192221 this .problems = p
222+ m = parseInt (m)
223+ this .max_page = m > this .page ? m : this .page
193224 }
194225 this .loading = false
195226 })
@@ -206,21 +237,22 @@ export default {
206237 clickProblem (index ) {
207238 console .log (this .problems [index].id )
208239 this .$emit (' proMessage' , {contest: this .problems [index].contest , id: this .problems [index].id , next: ' 5' })
209- }
240+ },
210241 }
211242}
212243 </script >
213244
214245<style scoped>
215- .el-select {
216- width : 100% ;
217- }
218-
219246.el-table .accept {
220247 background : #64ff64 ;
221248}
222249
223250.el-table .reject {
224251 background : #ff6464 ;
225252}
253+
254+ .el-table tbody tr :hover > td {
255+ background-color : #96ffff !important ;
256+ font-weight : bolder ;
257+ }
226258 </style >
0 commit comments