|
|
|
@ -1,6 +1,15 @@
|
|
|
|
|
<% this.title = '提交记录' %> |
|
|
|
|
<% include header %> |
|
|
|
|
<% include util %> |
|
|
|
|
<style> |
|
|
|
|
.label{ |
|
|
|
|
font-size: 1.2em; |
|
|
|
|
margin-right: 1px; |
|
|
|
|
} |
|
|
|
|
.padding{ |
|
|
|
|
overflow-x: auto; |
|
|
|
|
} |
|
|
|
|
</style> |
|
|
|
|
<script src="<%- lib('textfit/2.3.1/textFit.min.js') %>"></script> |
|
|
|
|
<div class="padding"> |
|
|
|
|
<% if (displayConfig.inContest) { %> |
|
|
|
@ -17,10 +26,10 @@
|
|
|
|
|
<form action="<%= syzoj.utils.makeUrl(displayConfig.inContest ? ['contest', contest.id, 'submissions'] : ['submissions']) %>" class="ui mini form" method="get" role="form" id="form"> |
|
|
|
|
<input type="hidden" name="contest" value="<%= form.contest %>" /> |
|
|
|
|
<div class="inline fields" style="margin-bottom: 25px; white-space: nowrap; "> |
|
|
|
|
<label style="font-size: 1.2em; margin-right: 1px; ">题目:</label> |
|
|
|
|
<label class="label">题目:</label> |
|
|
|
|
<div class="field"><input name="problem_id" style="width: 50px; " type="text" value="<%= form.problem_id %>"></div> |
|
|
|
|
<% if (displayConfig.showOthers) { %> |
|
|
|
|
<label style="font-size: 1.2em; margin-right: 1px; ">提交者:</label> |
|
|
|
|
<label class="label">提交者:</label> |
|
|
|
|
<div class="field"><input name="submitter" style="width: 100px; " type="text" value="<%= form.submitter %>"></div> |
|
|
|
|
<% } %> |
|
|
|
|
<% if (displayConfig.showScore) { %> |
|
|
|
@ -29,7 +38,7 @@
|
|
|
|
|
<label style="font-size: 1.2em; margin-right: 7px; ">~</label> |
|
|
|
|
<div class="field"><input name="max_score" style="width: 45px; " type="text" value="<%= form.max_score || 100 %>"></div> |
|
|
|
|
<% } %> |
|
|
|
|
<label style="font-size: 1.2em; margin-right: 1px; ">语言:</label> |
|
|
|
|
<label class="label">语言:</label> |
|
|
|
|
<div class="field"> |
|
|
|
|
<div class="ui fluid selection dropdown" id="select_language" style="width: 110px; "> |
|
|
|
|
<input type="hidden" name="language" value="<%= form.language %>"> |
|
|
|
@ -46,7 +55,7 @@
|
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<% if (displayConfig.showResult) { %> |
|
|
|
|
<label style="font-size: 1.2em; margin-right: 1px; ">状态:</label> |
|
|
|
|
<label class="label">状态:</label> |
|
|
|
|
<div class="field"> |
|
|
|
|
<div class="ui fluid selection dropdown" id="select_status" style="width: 210px; "> |
|
|
|
|
<input type="hidden" name="status" value="<%= form.status %>"> |
|
|
|
@ -62,29 +71,45 @@
|
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<% } %> |
|
|
|
|
<button class="ui labeled icon mini button" type="submit"> |
|
|
|
|
<i class="search icon"></i> |
|
|
|
|
查询 |
|
|
|
|
</button> |
|
|
|
|
<% if (user && displayConfig.showOthers) { %> |
|
|
|
|
<a class="ui mini labeled icon blue button" style="margin-left: auto; " id="my_submit"> |
|
|
|
|
<i class="user icon"></i> |
|
|
|
|
我的提交 |
|
|
|
|
</a> |
|
|
|
|
<script> |
|
|
|
|
$(function () { |
|
|
|
|
$('#my_submit').click(function () { |
|
|
|
|
$('[name=submitter]').val(<%- serializejs(user.username) %>); |
|
|
|
|
$('#form').submit(); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
</script> |
|
|
|
|
<% } %> |
|
|
|
|
<label class="label">代码是否分享:</label> |
|
|
|
|
<div class="field"> |
|
|
|
|
<div class="ui fluid selection dropdown" id="select_share" style="width: 110px; "> |
|
|
|
|
<input type="hidden" name="isshare" value="<%= form.isshare %>"> |
|
|
|
|
<i class="dropdown icon"></i> |
|
|
|
|
<div class="default text"></div> |
|
|
|
|
<div class="menu"> |
|
|
|
|
<div class="item" data-value=""><b>不限</b></div> |
|
|
|
|
<div class="item" data-value="1"><b>是</b></div> |
|
|
|
|
<div class="item" data-value="0"><b>否</b></div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="inline fields"> |
|
|
|
|
<button class="ui labeled icon mini button" type="submit"> |
|
|
|
|
<i class="search icon"></i> |
|
|
|
|
查询 |
|
|
|
|
</button> |
|
|
|
|
<% if (user && displayConfig.showOthers) { %> |
|
|
|
|
<a class="ui mini labeled icon blue button" id="my_submit"> |
|
|
|
|
<i class="user icon"></i> |
|
|
|
|
我的提交 |
|
|
|
|
</a> |
|
|
|
|
<script> |
|
|
|
|
$(function () { |
|
|
|
|
$('#my_submit').click(function () { |
|
|
|
|
$('[name=submitter]').val(<%- serializejs(user.username) %>); |
|
|
|
|
$('#form').submit(); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
</script> |
|
|
|
|
<% } %> |
|
|
|
|
</div> |
|
|
|
|
</form> |
|
|
|
|
<table id="vueAppFuckSafari" class="ui very basic center aligned table" style="white-space: nowrap; " id="table"> |
|
|
|
|
<thead> |
|
|
|
|
<tr> |
|
|
|
|
<th>是否已经分享</th> |
|
|
|
|
<th>编号</th> |
|
|
|
|
<th>题目</th> |
|
|
|
|
<th>状态</th> |
|
|
|
@ -133,11 +158,14 @@
|
|
|
|
|
$(function () { |
|
|
|
|
$('#select_language').dropdown(); |
|
|
|
|
$('#select_status').dropdown(); |
|
|
|
|
$('#select_share').dropdown(); |
|
|
|
|
}); |
|
|
|
|
const itemList = <%- serializejs(items) %>; |
|
|
|
|
const socketUrl = "/rough"; |
|
|
|
|
const displayConfig = <%- serializejs(displayConfig) %>; |
|
|
|
|
|
|
|
|
|
console.log(itemList); |
|
|
|
|
|
|
|
|
|
const vueApp = new Vue({ |
|
|
|
|
el: '#vueAppFuckSafari', |
|
|
|
|
data: { |
|
|
|
|