File tree Expand file tree Collapse file tree 1 file changed +24
-9
lines changed
Expand file tree Collapse file tree 1 file changed +24
-9
lines changed Original file line number Diff line number Diff line change 1515</template >
1616
1717<script >
18+ import sfconfig from ' ./../../sfconfig' ;
1819import apiurl from ' ./../../apiurl' ;
1920import AjaxTable from ' ./../lib/AjaxTable.vue' ;
2021import ProblemTitleLink from ' ./../problem/ProblemTitleLink.vue' ;
22+ import UserNameLink from ' ./../user/UserNameLink.vue' ;
2123
2224export default {
2325 name: ' StatusList' ,
@@ -35,34 +37,42 @@ export default {
3537 }, {
3638 name: ' problem' ,
3739 label: ' Problem' ,
40+ align: ' center' ,
41+ sortable: false
42+ }, {
43+ name: ' state' ,
44+ label: ' Status' ,
45+ align: ' center' ,
3846 sortable: false
3947 }, {
4048 name: ' score' ,
4149 label: ' Score' ,
4250 width: ' 120' ,
4351 align: ' center' ,
4452 sortable: true
45- }, {
46- name: ' state' ,
47- label: ' Status' ,
48- width: ' 120' ,
49- align: ' center' ,
50- sortable: false
5153 }, {
5254 name: ' time' ,
5355 label: ' Time' ,
56+ width: ' 120' ,
57+ align: ' center' ,
5458 sortable: false
5559 }, {
5660 name: ' memory' ,
5761 label: ' Memory' ,
62+ width: ' 120' ,
63+ align: ' center' ,
5864 sortable: false
5965 }, {
6066 name: ' lang' ,
6167 label: ' Language' ,
68+ width: ' 120' ,
69+ align: ' center' ,
6270 sortable: false
6371 }, {
6472 name: ' owner' ,
6573 label: ' Author' ,
74+ width: ' 120' ,
75+ align: ' center' ,
6676 sortable: false
6777 }],
6878 data_count: 10
@@ -90,11 +100,16 @@ export default {
90100 } else {
91101 color += ' color-regular-text' ;
92102 }
93-
94103 x .problem = (< ProblemTitleLink pid= {x .problem }>< / ProblemTitleLink> );
95-
96104 x .score = (< div class = {color + ' text-extra-bold' }> {x .score >= 0 ? x .score : ' -' }< / div> );
97-
105+ x .lang = sfconfig .langTable [x .lang ].label ;
106+ let t = sfconfig .stateTable .filter (id => {
107+ return id .value === String (x .state );
108+ })[0 ];
109+ x .state = (< div style= {' color: ' + t .color + ' ;' }> {t .label }< / div> );
110+ x .time = x .time + ' ms' ;
111+ x .memory = x .memory + ' KB' ;
112+ x .owner = (< UserNameLink userid= {x .owner }>< / UserNameLink> );
98113 return x;
99114 },
100115 },
You can’t perform that action at this time.
0 commit comments