Browse Source

UI optimize

pull/6/head
Menci 8 years ago
parent
commit
9a498b45e4
  1. 42
      views/problem_data.ejs

42
views/problem_data.ejs

@ -21,30 +21,28 @@ let subtaskType = {
<% } else { %>
<p>评测方式:文本比较</p>
<% } %>
<table class="ui very basic table">
<thead>
<tr>
<th>输入文件</th>
<th>输出文件</th>
</tr>
</thead>
<table class="ui celled table">
<tbody>
<% let i = 0; %>
<% for (let subtask of list) { %>
<% if (list.length !== 1) { %>
<tr>
<td colspan='2'><h4 style="margin-bottom: 5px; "><strong>子任务 <%= ++i %></strong></h4><%= subtaskType[subtask.type] %>,总分值 <%= subtask.score %></td>
</tr>
<% let i = 0; %>
<% for (let subtask of list) { %>
<% if (list.length !== 1) { %>
<tr>
<td style="background-color: #F9FAFB" colspan="2"><h4 style="margin-bottom: 3px; ">子任务 <%= ++i %></h4><span style="font-weight: normal; "><%= subtaskType[subtask.type] %>,总分值 <%= subtask.score %></span></th>
</tr>
<% } else { %>
<tr>
<td style="background-color: #F9FAFB" colspan="2"><h4 style="margin-bottom: 3px; ">单个子任务</h4><span style="font-weight: normal; "><%= subtaskType[subtask.type] %></span></th>
</tr>
<% } %>
<% for (let testcase of subtask.cases) { %>
<tr>
<td><%= testcase.input %></td>
<td><%= testcase.output %></td>
</tr>
<% } %>
<% } %>
<% for (let testcase of subtask.cases) { %>
<tr>
<td><%= testcase.input %></td>
<td><%= testcase.output %></td>
</tr>
<% } %>
<% } %>
</tbody>
</table>
</table>
<% } catch (e) { %>
<h3>数据包错误:<%= e %></h3>
<% } %>
@ -118,7 +116,7 @@ let subtaskType = {
</div>
<% } %>
<div class="field">
<label for="testdata">测试数据</label>
<label for="testdata">更新测试数据</label>
<input type="file" id="testdata" name="testdata">
</div>
<button type="submit" class="ui button">提交</button>

Loading…
Cancel
Save