#
mrzhssss
2022-12-01 ec962e2bc42942186a944aa97dbb2c7babadfdd7
src/main/webapp/views/console.html
@@ -556,12 +556,10 @@
            headers: {'token': localStorage.getItem('token')},
            method: 'POST',
            success: function (res) {
                console.log(res);
                if (res.code === 200) {
                    var sites = res.data;
                    for (var i = 0; i < sites.length; i++) {
                        var siteEl = $("#site-" + sites[i].siteId);
                        console.log(sites[i].siteId)
                        siteEl.attr("class", "site " + sites[i].siteStatus);
                        // siteEl.attr("class", "site site-auto-run-id");
                        if (sites[i].workNo != null && sites[i].workNo > 0) {
@@ -571,7 +569,6 @@
                        }
                        if (sites[i].siteId === '16' || sites[i].siteId === '016') {
                            carAnimate(Number(sites[i].siteId), Number(sites[i].nearbySta));
                        }
                    }
@@ -595,6 +592,7 @@
                if (res.code === 200) {
                    var crns = res.data;
                    for (var i = 0; i < crns.length; i++) {
                        var crnEl = $("#crn-" + crns[i].crnId);
                        crnEl.attr("class", "machine " + crns[i].crnStatus);
                        var unit = 0;//($('.item').eq(0).width() + 13) / 2;
@@ -606,13 +604,13 @@
                        // crns[i].bay = 15;
                        var offSet = 0;
                        unit = 60;
                        unit = 31;
                        offSet = 325;
                        if(crns[i].bay === 1){
                            crnEl.animate({left: offSet + 'px'}, 1000);
                        } else {
                            crnEl.animate({left: (offSet - unit + (crns[i].bay * unit)) + 'px'}, 1000);
                        }
@@ -706,34 +704,34 @@
        if (id === 16 || id === '16' || id === '016') {
            switch (target) {
                case 1:
                    targetTop += 827;
                    targetTop += 619;
                    break;
                case 2:
                    targetTop += 765;
                    targetTop += 571;
                    break;
                case 3:
                    targetTop += 651;
                    break;
                case 4:
                    targetTop += 589;
                    break;
                case 5:
                    targetTop += 505;
                    break;
                case 4:
                    targetTop += 457;
                    break;
                case 5:
                    targetTop += 391;
                    break;
                case 6:
                    targetTop += 443;
                    targetTop += 344;
                    break;
                case 7:
                    targetTop += 362;
                    targetTop += 278;
                    break;
                case 8:
                    targetTop += 297;
                    targetTop += 228;
                    break;
                case 9:
                    targetTop += 243;
                    targetTop += 183;
                    break;
                case 10:
                    targetTop += 129;
                case 15:
                    targetTop += 95;
                    break;
                default:
                    return;