v1.0.175: compareCard отдельно от diffCard — группы не исчезают при сравнении

This commit is contained in:
2026-06-24 17:39:19 +04:00
parent 475d0b8dc7
commit f205f0f547
2 changed files with 18 additions and 9 deletions
+10 -9
View File
@@ -376,16 +376,16 @@ window.runCompareForGroup = async function(gi) {
btn.innerHTML = '<span class="spinner"></span> Сравнение...';
stepActive('stepCompare');
var diffCard = document.getElementById('diffCard');
var diffBody = document.getElementById('diffBody');
var diffStatus = document.getElementById('diffStatus');
diffCard.style.display = 'block';
diffBody.innerHTML = '';
diffStatus.textContent = '⏳ 0.0с';
var compareCard = document.getElementById('compareCard');
var compareBody = document.getElementById('compareBody');
var compareStatus = document.getElementById('compareStatus');
compareCard.style.display = 'block';
compareBody.innerHTML = '';
compareStatus.textContent = '⏳ 0.0с';
var start = Date.now();
var timer = setInterval(function() {
diffStatus.textContent = '⏳ ' + ((Date.now() - start) / 1000).toFixed(1) + 'с';
compareStatus.textContent = '⏳ ' + ((Date.now() - start) / 1000).toFixed(1) + 'с';
}, 200);
var es = new EventSource(VM_API + '/process-v2?contract_id=' + cid);
@@ -430,12 +430,13 @@ window.runCompareForGroup = async function(gi) {
}
else if (d.type === 'done') {
clearInterval(timer); es.close();
diffStatus.textContent = '✓ ' + d.total_time_s + 'с';
compareStatus.textContent = '✓ ' + d.total_time_s + 'с';
btn.innerHTML = '✓ Готово'; btn.disabled = false;
stepDone('stepCompare');
}
else if (d.type === 'error') {
clearInterval(timer); es.close();
diffBody.innerHTML += '<div style="color:var(--destructive);">✗ ' + d.message + '</div>';
compareBody.innerHTML += '<div style="color:var(--destructive);">✗ ' + d.message + '</div>';
btn.innerHTML = '✗'; btn.disabled = false;
}
};