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

Loading…
Cancel
Save