|
|
@ -336,14 +336,32 @@ if (token != null) { |
|
|
|
socket.on('finish', function (p) { |
|
|
|
socket.on('finish', function (p) { |
|
|
|
console.log("Judge finished"); |
|
|
|
console.log("Judge finished"); |
|
|
|
vueApp.roughData.running = false; |
|
|
|
vueApp.roughData.running = false; |
|
|
|
|
|
|
|
let max=0; |
|
|
|
|
|
|
|
if (p && p.result && p.result.judge) { |
|
|
|
|
|
|
|
p.result.judge.subtasks.forEach(function (item) { |
|
|
|
|
|
|
|
item.cases.forEach(function (one) { |
|
|
|
|
|
|
|
max = one.result.time |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
p.roughResult.maxItemTime = max; |
|
|
|
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, function (data) { |
|
|
|
socket.emit('join', token, function (data) { |
|
|
|
console.log("join! ", data); |
|
|
|
console.log("join! ", data); |
|
|
|
|
|
|
|
let max=0; |
|
|
|
|
|
|
|
if (data && data.result && data.result.judge) { |
|
|
|
|
|
|
|
data.result.judge.subtasks.forEach(function (item) { |
|
|
|
|
|
|
|
item.cases.forEach(function (one) { |
|
|
|
|
|
|
|
max = one.result.time |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
if (data && data.ok) { |
|
|
|
if (data && data.ok) { |
|
|
|
if (data.finished) { |
|
|
|
if (data.finished) { |
|
|
|
|
|
|
|
data.roughResult.maxItemTime = max; |
|
|
|
vueApp.roughData.result = data.roughResult; |
|
|
|
vueApp.roughData.result = data.roughResult; |
|
|
|
// if (!data.result) location.reload(true); |
|
|
|
// if (!data.result) location.reload(true); |
|
|
|
vueApp.detailResult = data.result; |
|
|
|
vueApp.detailResult = data.result; |
|
|
|