1010 Fold
1111 <i class =" el-icon-arrow-left" ></i >
1212 </div >
13- <div style =" display : flex ;" >
13+ <div class =" flex-header" >
14+ <el-tag v-if =" hidden" type =" warning" id =" hidden-problem" effect =" dark" >Hidden</el-tag >
1415 <h1 id =" title" class =" header" >#{{pid}}. {{ title }}</h1 >
1516 </div >
1617 <MarkdownContainer v-if =" description" :content =" description" :allowHTML =" this.allowHTML" />
1920 <div id =" tools" >
2021 <el-row >
2122 <el-col >
22- <div >Tool Bar</div >
23+ <div >< i class = " el-icon-s-tools " /> Tool Bar</div >
2324 <el-menu default-active =" 3" >
2425 <el-menu-item index =" 3" @click =" $router.push('/problem/' + $route.params.id +'/submit');" >
25- <span slot =" title" > Submit</span >
26+ <span slot =" title" class = " text-bold " >< i class = " el-icon-upload2 " /> Submit</span >
2627 </el-menu-item >
2728 <el-submenu index =" 0" >
28- <template slot="title">Statistics</template >
29- <el-menu-item index =" 0-0" >
30- Submissions
31- </el-menu-item >
32- <el-menu-item index =" 0-1" >
33- Statistics
34- </el-menu-item >
29+ <template slot="title"><div class =" text-bold" ><i class =" el-icon-pie-chart" /> Statistics</div ></template >
30+ <el-menu-item index =" 0-0" >Submissions</el-menu-item >
31+ <el-menu-item index =" 0-1" >Statistics</el-menu-item >
3532 </el-submenu >
3633 <el-submenu index =" 1" >
37- <template slot="title">Discuss</template >
38- <el-menu-item index =" 1-0" >
39- Discussions
40- </el-menu-item >
41- <el-menu-item index =" 1-1" >
42- Solutions
43- </el-menu-item >
34+ <template slot="title"><div class =" text-bold" ><i class =" el-icon-chat-line-round" /> Discuss</div ></template >
35+ <el-menu-item index =" 1-0" >Discussions</el-menu-item >
36+ <el-menu-item index =" 1-1" >Solutions</el-menu-item >
4437 </el-submenu >
4538 <el-submenu index =" 2" >
46- <template slot="title">Edit</template >
39+ <template slot="title">< div class = " text-bold " >< i class = " el-icon-edit " /> Edit</ div > </template >
4740 <el-menu-item index =" 2-0" @click =" $router.push('/problem/' + $route.params.id +'/edit');" >
4841 Edit
4942 </el-menu-item >
50- <el-menu-item index =" 2-1" >
51- Delete
52- </el-menu-item >
53- <el-menu-item index =" 2-2" >
54- Settings
55- </el-menu-item >
43+ <el-menu-item index =" 2-1" >Delete</el-menu-item >
44+ <el-menu-item index =" 2-2" >Settings</el-menu-item >
5645 </el-submenu >
5746 </el-menu >
47+ <el-button @click =" $router.push('/problem/list');" >Back</el-button >
5848 </el-col >
5949 </el-row >
6050 </div >
51+ <div id =" info" >
52+ <el-card shadow =" never" >
53+ <div ><i class =" el-icon-info" /> Information </div >
54+ <el-divider class =" divider" >Name</el-divider >
55+ <div class =" tool-content" >{{title}}</div >
56+ <el-divider class =" divider" >PID</el-divider >
57+ <div class =" tool-content" >#{{pid}}</div >
58+ </el-card >
59+ <el-card shadow =" never" class =" margin-top" >
60+ <div ><i class =" el-icon-menu" /> Limitation </div >
61+ <el-divider class =" divider" >Time</el-divider >
62+ <div class =" tool-content" >{{time}} MS</div >
63+ <el-divider class =" divider" >Memery</el-divider >
64+ <div class =" tool-content" >{{memery}} MB</div >
65+ </el-card >
66+ </div >
6167 </div >
6268 </div >
6369 </div >
@@ -72,26 +78,30 @@ export default {
7278 data () {
7379 return {
7480 description: null ,
75- title: null ,
81+ title: ' - ' ,
7682 pid: this .$route .params .id ,
7783 allowHTML: false ,
78- isWider: false
84+ isWider: false ,
85+ enable: true ,
86+ hidden: false ,
87+ time: ' -' ,
88+ memery: ' -'
7989 };
8090 },
8191 methods: {
8292 loadproblem () {
8393 this .$axios
84- .get (apiurl (' /problem/content' ), {
85- params: {
86- pid: this .$route .params .id
87- }
88- })
94+ .get (apiurl (' /problem/' + String (this .$route .params .id )))
8995 .then (res => {
90- let data = res .data ;
96+ let data = res .data .res ;
97+ console .log (data);
9198 this .title = data .title ;
9299 this .pid = data .pid ;
93100 this .allowHTML = data .allow_html ;
94101 this .description = data .description ;
102+ this .memery = data .memory_limit / 1000 ;
103+ this .time = data .time_limit ;
104+ this .hidden = ! data .enabled ;
95105 })
96106 .catch (err => {
97107 if (err .request .status === 404 ) {
@@ -117,6 +127,19 @@ export default {
117127 </script >
118128
119129<style scoped>
130+ #hidden-problem {
131+ margin : 30px 0 ;
132+ margin-right : 10px ;
133+ }
134+
135+ .flex-header {
136+ display : flex ;
137+ }
138+
139+ .margin-top {
140+ margin-top : 20px ;
141+ }
142+
120143@media only screen and (max-width : 700px ) {
121144 #pannel {
122145 z-index : 1000 ;
@@ -160,6 +183,7 @@ export default {
160183}
161184
162185#tools {
186+ width : 200px ;
163187 padding : 20px ;
164188 border : 1px solid #e4e7ed ;
165189}
@@ -171,4 +195,16 @@ export default {
171195#full-screen-button :hover {
172196 cursor : pointer ;
173197}
198+
199+ #info {
200+ margin-top : 20px ;
201+ }
202+
203+ .divider {
204+ margin : 20px 0 ;
205+ }
206+
207+ .tool-content {
208+ color : #606266 ;
209+ }
174210 </style >
0 commit comments