|
|
@ -20,7 +20,7 @@ |
|
|
|
</tr> |
|
|
|
</tr> |
|
|
|
</thead> |
|
|
|
</thead> |
|
|
|
<tbody> |
|
|
|
<tbody> |
|
|
|
<tr is="submission-item" v-bind:data="roughData" :config="displayConfig" :showRejudge="showRejudge"></tr> |
|
|
|
<tr is="submission-item" v-bind:data="roughData" :config="displayConfig" :show-rejudge="showRejudge"></tr> |
|
|
|
</tbody> |
|
|
|
</tbody> |
|
|
|
</table> |
|
|
|
</table> |
|
|
|
|
|
|
|
|
|
|
@ -39,7 +39,7 @@ |
|
|
|
<div class="four wide column"> |
|
|
|
<div class="four wide column"> |
|
|
|
<status-label :status="getSubtaskResult(subtask)"></status-label> |
|
|
|
<status-label :status="getSubtaskResult(subtask)"></status-label> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="three wide column">得分 |
|
|
|
<div class="three wide column" v-if="subtask.score != null">得分 |
|
|
|
<span style="font-weight: normal; ">{{ Math.trunc(subtask.score) }}</span> |
|
|
|
<span style="font-weight: normal; ">{{ Math.trunc(subtask.score) }}</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -221,13 +221,13 @@ if (token != null) { |
|
|
|
socket.on('connect', () => { |
|
|
|
socket.on('connect', () => { |
|
|
|
socket.on('start', () => { |
|
|
|
socket.on('start', () => { |
|
|
|
vueApp.roughData.running = true; |
|
|
|
vueApp.roughData.running = true; |
|
|
|
|
|
|
|
console.log("Judge start!"); |
|
|
|
vueApp.detailResult = {}; |
|
|
|
vueApp.detailResult = {}; |
|
|
|
}); |
|
|
|
}); |
|
|
|
socket.on('update', (p) => { |
|
|
|
socket.on('update', (p) => { |
|
|
|
console.log("Delta: " + JSON.stringify(p)); |
|
|
|
console.log("Delta: " + JSON.stringify(p)); |
|
|
|
if (p.from === currentVersion) { |
|
|
|
if (p.from === currentVersion) { |
|
|
|
currentVersion = p.to; |
|
|
|
currentVersion = p.to; |
|
|
|
console.log("Before patching: " + JSON.stringify(vueApp)); |
|
|
|
|
|
|
|
jsondiffpatch.patch(vueApp.detailResult, p.delta); |
|
|
|
jsondiffpatch.patch(vueApp.detailResult, p.delta); |
|
|
|
} else { // Some packets are dropped. Let's reset. |
|
|
|
} else { // Some packets are dropped. Let's reset. |
|
|
|
socket.close(); |
|
|
|
socket.close(); |
|
|
@ -235,13 +235,14 @@ if (token != null) { |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
socket.on('finish', (p) => { |
|
|
|
socket.on('finish', (p) => { |
|
|
|
console.log("Finish: " + JSON.stringify(p)); |
|
|
|
console.log("Judge finished"); |
|
|
|
vueApp.roughData.running = false; |
|
|
|
vueApp.roughData.running = false; |
|
|
|
vueApp.roughData.result = p.roughResult; |
|
|
|
vueApp.roughData.result = p.roughResult; |
|
|
|
vueApp.detailResult = p.result; |
|
|
|
vueApp.detailResult = p.result; |
|
|
|
socket.close(); |
|
|
|
socket.close(); |
|
|
|
}); |
|
|
|
}); |
|
|
|
socket.emit('join', token, (data) => { |
|
|
|
socket.emit('join', token, (data) => { |
|
|
|
|
|
|
|
console.log("join! " + JSON.stringify(data)); |
|
|
|
if (data && data.ok) { |
|
|
|
if (data && data.ok) { |
|
|
|
if (data.finished) { |
|
|
|
if (data.finished) { |
|
|
|
vueApp.roughData.result = data.roughResult; |
|
|
|
vueApp.roughData.result = data.roughResult; |
|
|
@ -252,7 +253,8 @@ if (token != null) { |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
if (data.running) { |
|
|
|
if (data.running) { |
|
|
|
vueApp.roughData.running = true; |
|
|
|
vueApp.roughData.running = true; |
|
|
|
vueApp.detailResult = data.current; |
|
|
|
vueApp.detailResult = data.current.content; |
|
|
|
|
|
|
|
currentVersion = data.current.version; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|