diff --git a/views/submission_content.ejs b/views/submission_content.ejs index fc4c0f4..59c8aa5 100644 --- a/views/submission_content.ejs +++ b/views/submission_content.ejs @@ -55,12 +55,12 @@ @@ -212,9 +212,10 @@ if (token != null) { vueApp.roughData.running = true; }); socket.on('update', (p) => { - console.log("Updating"); - console.log("Delta: " + JSON.stringify(p)); - jsondiffpatch.patch(vueApp.detailResult, p.delta); + // console.log("Delta: " + JSON.stringify(p)); + const current = JSON.parse(JSON.stringify(vueApp.detailResult)); + jsondiffpatch.patch(current, p.delta); + vueApp.detailResult = current; }); socket.on('finish', (p) => { vueApp.roughData.running = false; @@ -224,7 +225,7 @@ if (token != null) { socket.emit('join', token, (data) => { if (data && data.ok) { if (data.finished) { - vueApp.roughData = data.roughResult; + vueApp.roughData.result = data.roughResult; vueApp.detailData = data.result || { systemMessage: "系统出错,请刷新后重试。" };