// 输送线当前运行状态对象 function StaTask(staData, object) { let that = this; that.no = 0; that.run = false; that.loaded = 0; that.inlet = -1; that.outlet = -1; let init = function () { that.no = staData.no; that.inlet = staData.inlet; that.outlet = staData.outlet; } init(); that.modify = function (staData) { if (that.run || that.no === 0) { console.error(staData.no + "号输送线更新失败"); return; } if (that.loaded === 0 && staData.loaded === 1) { // 无货 ===>> 有货 // 1.入库第一站 【新增】 if (that.inlet === 1) { // 2.来自其他站点的货物 【移动】 } else { } } if (that.loaded === 1 && staData.loaded === 0) { // 有货 ===>> 无货 // 1.出库最后一站 【移除】 if (that.outlet === 1) { } } // 实时更新 that.loaded = staData.loaded; that.run = true; } that.change = function () { } } export {StaTask}