заменил ссылки для фронта на 192.168.0.169

This commit is contained in:
Georgy Shive 2025-05-12 00:18:42 +07:00
parent 7447674abe
commit b7be52c58e
4 changed files with 3 additions and 3 deletions

BIN
.DS_Store vendored

Binary file not shown.

BIN
frontend/.DS_Store vendored

Binary file not shown.

View File

@ -16,7 +16,7 @@ System.register("chunks:///_virtual/DescriptionManager.ts",["./rollupPluginModLo
System.register("chunks:///_virtual/equipmentListSwitch.ts",["./rollupPluginModLoBabelHelpers.js","cc"],(function(t){var i,e,n,o,s,r,a,u,l,c,p;return{setters:[function(t){i=t.applyDecoratedDescriptor,e=t.inheritsLoose,n=t.initializerDefineProperty,o=t.assertThisInitialized},function(t){s=t.cclegacy,r=t._decorator,a=t.Button,u=t.Node,l=t.Vec3,c=t.tween,p=t.Component}],execute:function(){var h,f,w,g,m,b,q,y,d,L,P;s._RF.push({},"41a9dZz2mVOFoYwOsk9H98q","equipmentListSwitch",void 0);var D=r.ccclass,v=r.property;t("equipmentListSwitch",(h=D("equipmentListSwitch"),f=v(a),w=v(u),g=v(u),h((q=i((b=function(t){function i(){for(var i,e=arguments.length,s=new Array(e),r=0;r<e;r++)s[r]=arguments[r];return i=t.call.apply(t,[this].concat(s))||this,n(i,"toggleButton",q,o(i)),n(i,"equipmentList",y,o(i)),n(i,"offsetX",d,o(i)),n(i,"animationDuration",L,o(i)),n(i,"arrow",P,o(i)),i.openPos=new l,i.closedPos=new l,i.isOnToggle=!1,i}e(i,t);var s=i.prototype;return s.onLoad=function(){var t;null==(t=this.toggleButton)||null==(t=t.node)||t.on("click",this.equipmentSwitch,this)},s.start=function(){this.openPos=this.equipmentList.getPosition().clone(),this.closedPos=new l(this.openPos.x-this.offsetX,this.openPos.y,this.openPos.z),this.equipmentList.setPosition(this.closedPos),this.arrow&&(this.arrow.angle=0)},s.stopTween=function(){c(this.equipmentList).stop(),this.arrow&&c(this.arrow).stop()},s.equipmentSwitch=function(){this.stopTween(),this.isOnToggle?(this.isOnToggle=!1,c(this.equipmentList).to(this.animationDuration,{position:this.closedPos}).start(),this.arrow&&c(this.arrow).to(this.animationDuration,{angle:0}).start()):(this.isOnToggle=!0,c(this.equipmentList).to(this.animationDuration,{position:this.openPos}).start(),this.arrow&&c(this.arrow).to(this.animationDuration,{angle:180}).start())},s.onDestroy=function(){var t;null==(t=this.toggleButton)||null==(t=t.node)||t.off("click",this.equipmentSwitch,this),this.stopTween()},i}(p)).prototype,"toggleButton",[f],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),y=i(b.prototype,"equipmentList",[w],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),d=i(b.prototype,"offsetX",[v],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 250}}),L=i(b.prototype,"animationDuration",[v],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return.3}}),P=i(b.prototype,"arrow",[g],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),m=b))||m));s._RF.pop()}}}));
System.register("chunks:///_virtual/EquipmentManager.ts",["./rollupPluginModLoBabelHelpers.js","cc"],(function(t){var e,n,r,i,a,s,o,c,u,l,p;return{setters:[function(t){e=t.applyDecoratedDescriptor,n=t.inheritsLoose,r=t.initializerDefineProperty,i=t.assertThisInitialized,a=t.createClass,s=t.asyncToGenerator,o=t.regeneratorRuntime},function(t){c=t.cclegacy,u=t._decorator,l=t.director,p=t.Component}],execute:function(){var d,h,f,v;c._RF.push({},"bdf50LzsO9GkrF5oSw4uDK/","EquipmentManager",void 0);var m=u.ccclass,y=u.property;t("EquipmentManager",m("EquipmentManager")(((v=function(t){function e(){for(var e,n=arguments.length,a=new Array(n),s=0;s<n;s++)a[s]=arguments[s];return e=t.call.apply(t,[this].concat(a))||this,r(e,"apiUrl",f,i(e)),e._dataList=[],e.totalCount=0,e._intervalId=null,e.initialDataPromise=void 0,e}n(e,t);var c=e.prototype;return c.onLoad=function(){var t=this;e.instance=this,l.addPersistRootNode(this.node),this.initialDataPromise=this.loadItems(),this._intervalId=window.setInterval((function(){t.loadItems()}),1e4)},c.loadItems=function(){var t=s(o().mark((function t(){var e,n;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,fetch(this.apiUrl);case 3:return e=t.sent,t.next=6,e.json();case 6:null!=(n=t.sent)&&n.items&&Array.isArray(n.items)?(this._dataList=n.items,this.totalCount=this._dataList.length,console.log("Данные оборудования обновлены:",this._dataList),this.node.emit("data-updated")):console.error("Некорректный формат данных",n),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(0),console.error("Ошибка при загрузке данных:",t.t0);case 13:case"end":return t.stop()}}),t,this,[[0,10]])})));return function(){return t.apply(this,arguments)}}(),c.getDataList=function(){var t=s(o().mark((function t(){return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this._dataList);case 1:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}(),c.onDestroy=function(){null!==this._intervalId&&(window.clearInterval(this._intervalId),this._intervalId=null)},a(e,[{key:"dataList",get:function(){return this._dataList}}]),e}(p)).instance=void 0,f=e((h=v).prototype,"apiUrl",[y],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return"http://192.168.0.219:3030/api/v2/sensors"}}),d=h))||d);c._RF.pop()}}}));
System.register("chunks:///_virtual/EquipmentManager.ts",["./rollupPluginModLoBabelHelpers.js","cc"],(function(t){var e,n,r,i,a,s,o,c,u,l,p;return{setters:[function(t){e=t.applyDecoratedDescriptor,n=t.inheritsLoose,r=t.initializerDefineProperty,i=t.assertThisInitialized,a=t.createClass,s=t.asyncToGenerator,o=t.regeneratorRuntime},function(t){c=t.cclegacy,u=t._decorator,l=t.director,p=t.Component}],execute:function(){var d,h,f,v;c._RF.push({},"bdf50LzsO9GkrF5oSw4uDK/","EquipmentManager",void 0);var m=u.ccclass,y=u.property;t("EquipmentManager",m("EquipmentManager")(((v=function(t){function e(){for(var e,n=arguments.length,a=new Array(n),s=0;s<n;s++)a[s]=arguments[s];return e=t.call.apply(t,[this].concat(a))||this,r(e,"apiUrl",f,i(e)),e._dataList=[],e.totalCount=0,e._intervalId=null,e.initialDataPromise=void 0,e}n(e,t);var c=e.prototype;return c.onLoad=function(){var t=this;e.instance=this,l.addPersistRootNode(this.node),this.initialDataPromise=this.loadItems(),this._intervalId=window.setInterval((function(){t.loadItems()}),1e4)},c.loadItems=function(){var t=s(o().mark((function t(){var e,n;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,fetch(this.apiUrl);case 3:return e=t.sent,t.next=6,e.json();case 6:null!=(n=t.sent)&&n.items&&Array.isArray(n.items)?(this._dataList=n.items,this.totalCount=this._dataList.length,console.log("Данные оборудования обновлены:",this._dataList),this.node.emit("data-updated")):console.error("Некорректный формат данных",n),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(0),console.error("Ошибка при загрузке данных:",t.t0);case 13:case"end":return t.stop()}}),t,this,[[0,10]])})));return function(){return t.apply(this,arguments)}}(),c.getDataList=function(){var t=s(o().mark((function t(){return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this._dataList);case 1:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}(),c.onDestroy=function(){null!==this._intervalId&&(window.clearInterval(this._intervalId),this._intervalId=null)},a(e,[{key:"dataList",get:function(){return this._dataList}}]),e}(p)).instance=void 0,f=e((h=v).prototype,"apiUrl",[y],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return"http://192.168.0.169:3030/api/v2/sensors"}}),d=h))||d);c._RF.pop()}}}));
System.register("chunks:///_virtual/ErrorButtonStatus.ts",["./rollupPluginModLoBabelHelpers.js","cc","./ErrorManager.ts","./ErrorItemData.ts"],(function(t){var r,e,n,i,o,a,u,s,l,c,p,b,f,m;return{setters:[function(t){r=t.applyDecoratedDescriptor,e=t.inheritsLoose,n=t.initializerDefineProperty,i=t.assertThisInitialized},function(t){o=t.cclegacy,a=t._decorator,u=t.Sprite,s=t.Button,l=t.Label,c=t.Node,p=t.Color,b=t.Component},function(t){f=t.ErrorManager},function(t){m=t.ErrorItemData}],execute:function(){var d,h,g,y,v,E,w,S,L,z,B;o._RF.push({},"af3d5cvwX9AKr0RbFp1/e0G","ErrorButtonStatus",void 0);var D=a.ccclass,C=a.property;t("ErrorButtonStatus",(d=D("ErrorButtonStatus"),h=C(u),g=C(s),y=C(l),v=C(c),d((S=r((w=function(t){function r(){for(var r,e=arguments.length,o=new Array(e),a=0;a<e;a++)o[a]=arguments[a];return r=t.call.apply(t,[this].concat(o))||this,n(r,"sprite",S,i(r)),n(r,"button",L,i(r)),n(r,"label",z,i(r)),n(r,"equipmentList",B,i(r)),r}e(r,t);var o=r.prototype;return o.start=function(){f.instance.node.on("errors-updated",this.updateStatus,this),this.updateStatus()},o.updateStatus=function(){var t=f.instance.getErrorList(),r=Object.keys(t.apiErrors).reduce((function(r,e){return r+t.apiErrors[e].map((function(t){var r=new m;return r.sensorName=e,r.alarmCode=t.alarmCode,r.description=t.description,r.timestamp=t.timestamp,r})).length}),0);r>0?(this.sprite.color=new p(255,0,0),this.button.interactable=!0,this.label.string="Аварий: "+r):(this.sprite.color=new p(128,128,128,0),this.button.interactable=!1,this.label.string="",this.equipmentList.active=!1)},r}(b)).prototype,"sprite",[h],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),L=r(w.prototype,"button",[g],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),z=r(w.prototype,"label",[y],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),B=r(w.prototype,"equipmentList",[v],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),E=w))||E));o._RF.pop()}}}));
@ -30,7 +30,7 @@ System.register("chunks:///_virtual/ErrorLazyLoadList.ts",["./rollupPluginModLoB
System.register("chunks:///_virtual/ErrorManager.ts",["./rollupPluginModLoBabelHelpers.js","cc","./EquipmentManager.ts","./ErrorsStore.ts"],(function(r){var t,e,n,o,i,s,a,u,c,l,d,h,f,p;return{setters:[function(r){t=r.applyDecoratedDescriptor,e=r.inheritsLoose,n=r.initializerDefineProperty,o=r.assertThisInitialized,i=r.asyncToGenerator,s=r.regeneratorRuntime},function(r){a=r.cclegacy,u=r._decorator,c=r.Node,l=r.AudioSource,d=r.director,h=r.Component},function(r){f=r.EquipmentManager},function(r){p=r.ErrorsStore}],execute:function(){var E,g,m,b,v,A,y,S;a._RF.push({},"e1d6eobzoNDs75XDl50wZhA","ErrorManager",void 0);var I=u.ccclass,k=u.property;r("ErrorManager",(E=I("ErrorManager"),g=k(c),m=k(l),E(((S=function(r){function t(){for(var t,e=arguments.length,i=new Array(e),s=0;s<e;s++)i[s]=arguments[s];return t=r.call.apply(r,[this].concat(i))||this,n(t,"errorListNode",A,o(t)),n(t,"audioSource",y,o(t)),t.soundEnabled=!0,t.currentErrors=[],t.errorItems=[],t.disabledAlerts=[],t.errorsStore=p.getInstance(),t}e(t,r);var a=t.prototype;return a.onLoad=function(){t.instance=this,d.addPersistRootNode(this.node),this.node.on("touchstart",this.disableSoundAlert,this)},a.start=function(){var r;null==(r=f.instance)||null==(r=r.node)||r.on("data-updated",this.checkErrors,this),this.schedule(this.checkErrors,5),this.schedule(this.fetchApiErrors,10)},a.onDestroy=function(){var r;this.node.off("touchstart",this.disableSoundAlert,this),null==(r=f.instance)||null==(r=r.node)||r.off("data-updated",this.checkErrors,this),this.unscheduleAllCallbacks()},a.getErrorList=function(){return{equipmentErrors:this.errorItems,apiErrors:this.errorsStore.getApiErrors()}},a.checkErrors=function(){var r,t,e=this,n=null!=(r=null==(t=f.instance)?void 0:t.dataList)?r:[],o=!1,i=[].concat(this.currentErrors);this.currentErrors=this.currentErrors.filter((function(r){return n.some((function(t){return t.tag===r&&2===t.value}))})),i.length!==this.currentErrors.length&&(this.errorItems=this.errorItems.filter((function(r){return n.some((function(t){return t.tag===r.tag&&2===t.value}))})),o=!0),n.forEach((function(r){var t;2===r.value&&-1===e.currentErrors.indexOf(r.tag)&&(e.currentErrors.push(r.tag),e.errorItems.push(r),e.addErrorToUI(r),o=!0,e.soundEnabled&&-1===e.disabledAlerts.indexOf(r.tag)&&(null==(t=e.audioSource)||t.play()))})),o&&this.node.emit("errors-updated"),this.fetchApiErrors()},a.fetchApiErrors=function(){var r=i(s().mark((function r(){return s().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,this.errorsStore.fetchApiErrors();case 3:this.node.emit("errors-updated"),r.next=9;break;case 6:r.prev=6,r.t0=r.catch(0),console.error("ErrorManager.fetchApiErrors:",r.t0);case 9:case"end":return r.stop()}}),r,this,[[0,6]])})));return function(){return r.apply(this,arguments)}}(),a.addErrorToUI=function(r){},a.disableSoundAlert=function(){this.soundEnabled=!1},a.disableAlertForError=function(r){-1===this.disabledAlerts.indexOf(r)&&this.disabledAlerts.push(r)},a.confirmError=function(r){this.currentErrors=this.currentErrors.filter((function(t){return t!==r})),this.errorItems=this.errorItems.filter((function(t){return t.tag!==r})),this.node.emit("errors-updated")},t}(h)).instance=void 0,A=t((v=S).prototype,"errorListNode",[g],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),y=t(v.prototype,"audioSource",[m],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),b=v))||b));a._RF.pop()}}}));
System.register("chunks:///_virtual/ErrorsStore.ts",["./rollupPluginModLoBabelHelpers.js","cc"],(function(r){var e,t,n;return{setters:[function(r){e=r.asyncToGenerator,t=r.regeneratorRuntime},function(r){n=r.cclegacy}],execute:function(){n._RF.push({},"c223eUBBj5G06wOn++quNUD","ErrorsStore",void 0),r("ErrorsStore",function(){function r(){this.apiErrors={}}r.getInstance=function(){return r._instance||(r._instance=new r),r._instance};var n=r.prototype;return n.fetchApiErrors=function(){var r=e(t().mark((function r(){var e,n;return t().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,fetch("http://192.168.0.219:3030/api/v2/errors");case 3:if((e=r.sent).ok){r.next=7;break}return console.error("ErrorsStore: ошибка при получении ошибок, статус:",e.status),r.abrupt("return");case 7:return r.next=9,e.json();case 9:n=r.sent,this.apiErrors=n,r.next=16;break;case 13:r.prev=13,r.t0=r.catch(0),console.error("ErrorsStore: ошибка запроса ошибок с API:",r.t0);case 16:case"end":return r.stop()}}),r,this,[[0,13]])})));return function(){return r.apply(this,arguments)}}(),n.getApiErrors=function(){return this.apiErrors},r}())._instance=null,n._RF.pop()}}}));
System.register("chunks:///_virtual/ErrorsStore.ts",["./rollupPluginModLoBabelHelpers.js","cc"],(function(r){var e,t,n;return{setters:[function(r){e=r.asyncToGenerator,t=r.regeneratorRuntime},function(r){n=r.cclegacy}],execute:function(){n._RF.push({},"c223eUBBj5G06wOn++quNUD","ErrorsStore",void 0),r("ErrorsStore",function(){function r(){this.apiErrors={}}r.getInstance=function(){return r._instance||(r._instance=new r),r._instance};var n=r.prototype;return n.fetchApiErrors=function(){var r=e(t().mark((function r(){var e,n;return t().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,fetch("http://192.168.0.169:3030/api/v2/errors");case 3:if((e=r.sent).ok){r.next=7;break}return console.error("ErrorsStore: ошибка при получении ошибок, статус:",e.status),r.abrupt("return");case 7:return r.next=9,e.json();case 9:n=r.sent,this.apiErrors=n,r.next=16;break;case 13:r.prev=13,r.t0=r.catch(0),console.error("ErrorsStore: ошибка запроса ошибок с API:",r.t0);case 16:case"end":return r.stop()}}),r,this,[[0,13]])})));return function(){return r.apply(this,arguments)}}(),n.getApiErrors=function(){return this.apiErrors},r}())._instance=null,n._RF.pop()}}}));
System.register("chunks:///_virtual/FirstPersonController.ts",["./rollupPluginModLoBabelHelpers.js","cc"],(function(e){var t,o,i,n,s,r,l,a,u,h,c,p,_,d;return{setters:[function(e){t=e.applyDecoratedDescriptor,o=e.inheritsLoose,i=e.initializerDefineProperty,n=e.assertThisInitialized},function(e){s=e.cclegacy,r=e._decorator,l=e.Node,a=e.Vec3,u=e.input,h=e.Input,c=e.KeyCode,p=e.Quat,_=e.NodeSpace,d=e.Component}],execute:function(){var m,v,E,f,y,S,M,D,b,g;s._RF.push({},"5d80eQJlnxA9ooItxxIqddm","FirstPersonController",void 0);var w=r.ccclass,K=r.property;e("FirstPersonController",(m=w("FirstPersonController"),v=K({type:l}),m((y=t((f=function(e){function t(){for(var t,o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return t=e.call.apply(e,[this].concat(s))||this,i(t,"camera",y,n(t)),i(t,"moveSpeed",S,n(t)),i(t,"lookSpeed",M,n(t)),i(t,"speedStep",D,n(t)),i(t,"minSpeed",b,n(t)),i(t,"maxSpeed",g,n(t)),t._moveDirection=new a,t._eulerAngles=new a,t._isLeftMousePressed=!1,t._lastEmittedPosition=new a,t}o(t,e);var s=t.prototype;return s.onLoad=function(){u.on(h.EventType.KEY_DOWN,this._onKeyDown,this),u.on(h.EventType.KEY_UP,this._onKeyUp,this),u.on(h.EventType.MOUSE_DOWN,this._onMouseDown,this),u.on(h.EventType.MOUSE_UP,this._onMouseUp,this),u.on(h.EventType.MOUSE_MOVE,this._onMouseMove,this),u.on(h.EventType.MOUSE_WHEEL,this._onMouseWheel,this),this._eulerAngles=this.node.eulerAngles.clone(),this._lastEmittedPosition=this.node.getPosition().clone()},s.onDestroy=function(){null==u||u.off(h.EventType.KEY_DOWN,this._onKeyDown,this),null==u||u.off(h.EventType.KEY_UP,this._onKeyUp,this),null==u||u.off(h.EventType.MOUSE_DOWN,this._onMouseDown,this),null==u||u.off(h.EventType.MOUSE_UP,this._onMouseUp,this),null==u||u.off(h.EventType.MOUSE_MOVE,this._onMouseMove,this),null==u||u.off(h.EventType.MOUSE_WHEEL,this._onMouseWheel,this)},s._onKeyDown=function(e){switch(e.keyCode){case c.KEY_W:this._moveDirection.z=1;break;case c.KEY_S:this._moveDirection.z=-1;break;case c.KEY_A:this._moveDirection.x=-1;break;case c.KEY_D:this._moveDirection.x=1;break;case c.KEY_Q:this._moveDirection.y=-1;break;case c.KEY_E:this._moveDirection.y=1}},s._onKeyUp=function(e){switch(e.keyCode){case c.KEY_W:case c.KEY_S:this._moveDirection.z=0;break;case c.KEY_A:case c.KEY_D:this._moveDirection.x=0;break;case c.KEY_Q:case c.KEY_E:this._moveDirection.y=0}},s._onMouseDown=function(e){0===e.getButton()&&(this._isLeftMousePressed=!0)},s._onMouseUp=function(e){0===e.getButton()&&(this._isLeftMousePressed=!1)},s._onMouseMove=function(e){var t;if(this._isLeftMousePressed){this._eulerAngles.y-=e.movementX*this.lookSpeed,this._eulerAngles.x-=e.movementY*this.lookSpeed,this._eulerAngles.x=Math.max(-89,Math.min(89,this._eulerAngles.x));var o=p.fromEuler(new p,this._eulerAngles.x,this._eulerAngles.y,0);this.node.setRotation(o),null==(t=this.camera)||t.setRotation(p.IDENTITY)}},s._onMouseWheel=function(e){e.getScrollY()>0?this.moveSpeed=Math.min(this.moveSpeed+this.speedStep,this.maxSpeed):e.getScrollY()<0&&(this.moveSpeed=Math.max(this.moveSpeed-this.speedStep,this.minSpeed)),console.log("Current move speed: "+this.moveSpeed)},s.update=function(e){var t=a.transformQuat(new a,a.FORWARD,this.node.worldRotation),o=a.transformQuat(new a,a.RIGHT,this.node.worldRotation),i=new a;a.scaleAndAdd(i,i,t,this._moveDirection.z*this.moveSpeed*e),a.scaleAndAdd(i,i,o,this._moveDirection.x*this.moveSpeed*e),a.scaleAndAdd(i,i,a.UP,this._moveDirection.y*this.moveSpeed*e),this.node.translate(i,_.WORLD);var n=this.node.getPosition();a.distance(n,this._lastEmittedPosition)>.1&&(this.node.emit("moved"),this._lastEmittedPosition=n.clone())},t}(d)).prototype,"camera",[v],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),S=t(f.prototype,"moveSpeed",[K],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 5}}),M=t(f.prototype,"lookSpeed",[K],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return.1}}),D=t(f.prototype,"speedStep",[K],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),b=t(f.prototype,"minSpeed",[K],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),g=t(f.prototype,"maxSpeed",[K],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 20}}),E=f))||E));s._RF.pop()}}}));
@ -64,7 +64,7 @@ System.register("chunks:///_virtual/SensorDescriptionField.ts",["cc"],(function(
System.register("chunks:///_virtual/SensorDetailManager.ts",["./rollupPluginModLoBabelHelpers.js","cc","./SensorDetailStore.ts","./ErrorLazyLoadList.ts"],(function(e){var n,t,s,o,i,r;return{setters:[function(e){n=e.inheritsLoose},function(e){t=e.cclegacy,s=e._decorator,o=e.Component},function(e){i=e.SensorDetailStore},function(e){r=e.ErrorLazyLoadList}],execute:function(){var a;t._RF.push({},"a0091NqlExPUrb+f5xP0/Gf","SensorDetailManager",void 0);var l=s.ccclass;e("SensorDetailManager",l("SensorDetailManager")(a=function(e){function t(){for(var n,t=arguments.length,s=new Array(t),o=0;o<t;o++)s[o]=arguments[o];return(n=e.call.apply(e,[this].concat(s))||this).currentSensorName="",n}n(t,e);var s=t.prototype;return s.onLoad=function(){var e,n=null==(e=this.node.scene)?void 0:e.getChildByName("EquipmentManager");null==n||n.on("showSensorDetails",this.onShowSensorDetails,this)},s.onDestroy=function(){var e,n=null==(e=this.node.scene)?void 0:e.getChildByName("EquipmentManager");null==n||n.off("showSensorDetails",this.onShowSensorDetails,this),this.unscheduleAllCallbacks()},s.onShowSensorDetails=function(e){var n;this.currentSensorName===e&&"details"===(null==(n=r.instance)?void 0:n.mode)||(this.currentSensorName=e,this.unschedule(this.updateSensorDetails),i.getInstance().fetchSensorDetails(e).then((function(e){e&&r.instance&&r.instance.showSensorDetails(e)})).catch(console.error),this.node.active&&this.schedule(this.updateSensorDetails,5),this.node.active=!0)},s.onEnable=function(){this.currentSensorName&&(this.unschedule(this.updateSensorDetails),this.schedule(this.updateSensorDetails,5))},s.onDisable=function(){this.unschedule(this.updateSensorDetails)},s.updateSensorDetails=function(){this.currentSensorName&&i.getInstance().fetchSensorDetails(this.currentSensorName).then((function(e){var n;e&&"details"===(null==(n=r.instance)?void 0:n.mode)&&r.instance.showSensorDetails(e)})).catch(console.error)},t}(o))||a);t._RF.pop()}}}));
System.register("chunks:///_virtual/SensorDetailStore.ts",["./rollupPluginModLoBabelHelpers.js","cc"],(function(e){var r,t,n,s,o,a;return{setters:[function(e){r=e.inheritsLoose,t=e.asyncToGenerator,n=e.regeneratorRuntime},function(e){s=e.cclegacy,o=e._decorator,a=e.Component}],execute:function(){var i,c;s._RF.push({},"0b4098z0xFHGY/qLrEzsi+7","SensorDetailStore",void 0);var u=o.ccclass;e("SensorDetailStore",u("SensorDetailStore")(((c=function(e){function s(){for(var r,t=arguments.length,n=new Array(t),s=0;s<t;s++)n[s]=arguments[s];return(r=e.call.apply(e,[this].concat(n))||this).currentSensorName="",r.currentDetails=null,r}r(s,e),s.getInstance=function(){return s._instance||(s._instance=new s),s._instance};var o=s.prototype;return o.onLoad=function(){s._instance=this},o.fetchSensorDetails=function(){var e=t(n().mark((function e(r){var t,s,o;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r){e.next=2;break}return e.abrupt("return",null);case 2:return this.currentSensorName=r,e.prev=3,e.next=6,fetch("http://192.168.0.219:3030/api/v2/sensor-details",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sensorName:r})});case 6:if((t=e.sent).ok){e.next=10;break}return console.error("[SensorDetailStore] Ошибка ответа от сервера: "+t.status),e.abrupt("return",null);case 10:return e.next=12,t.json();case 12:if(!((s=e.sent)&&s.description&&s.description.fields)){e.next=19;break}return o={sensorName:s.name,fields:s.description.fields},this.currentDetails=o,e.abrupt("return",o);case 19:return console.error("[SensorDetailStore] Неверный формат данных:",s),e.abrupt("return",null);case 21:e.next=27;break;case 23:return e.prev=23,e.t0=e.catch(3),console.error("[SensorDetailStore] Не удалось загрузить данные датчика:",e.t0),e.abrupt("return",null);case 27:case"end":return e.stop()}}),e,this,[[3,23]])})));return function(r){return e.apply(this,arguments)}}(),o.getCurrentDetails=function(){return this.currentDetails},s}(a))._instance=null,i=c))||i);s._RF.pop()}}}));
System.register("chunks:///_virtual/SensorDetailStore.ts",["./rollupPluginModLoBabelHelpers.js","cc"],(function(e){var r,t,n,s,o,a;return{setters:[function(e){r=e.inheritsLoose,t=e.asyncToGenerator,n=e.regeneratorRuntime},function(e){s=e.cclegacy,o=e._decorator,a=e.Component}],execute:function(){var i,c;s._RF.push({},"0b4098z0xFHGY/qLrEzsi+7","SensorDetailStore",void 0);var u=o.ccclass;e("SensorDetailStore",u("SensorDetailStore")(((c=function(e){function s(){for(var r,t=arguments.length,n=new Array(t),s=0;s<t;s++)n[s]=arguments[s];return(r=e.call.apply(e,[this].concat(n))||this).currentSensorName="",r.currentDetails=null,r}r(s,e),s.getInstance=function(){return s._instance||(s._instance=new s),s._instance};var o=s.prototype;return o.onLoad=function(){s._instance=this},o.fetchSensorDetails=function(){var e=t(n().mark((function e(r){var t,s,o;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r){e.next=2;break}return e.abrupt("return",null);case 2:return this.currentSensorName=r,e.prev=3,e.next=6,fetch("http://192.168.0.169:3030/api/v2/sensor-details",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sensorName:r})});case 6:if((t=e.sent).ok){e.next=10;break}return console.error("[SensorDetailStore] Ошибка ответа от сервера: "+t.status),e.abrupt("return",null);case 10:return e.next=12,t.json();case 12:if(!((s=e.sent)&&s.description&&s.description.fields)){e.next=19;break}return o={sensorName:s.name,fields:s.description.fields},this.currentDetails=o,e.abrupt("return",o);case 19:return console.error("[SensorDetailStore] Неверный формат данных:",s),e.abrupt("return",null);case 21:e.next=27;break;case 23:return e.prev=23,e.t0=e.catch(3),console.error("[SensorDetailStore] Не удалось загрузить данные датчика:",e.t0),e.abrupt("return",null);case 27:case"end":return e.stop()}}),e,this,[[3,23]])})));return function(r){return e.apply(this,arguments)}}(),o.getCurrentDetails=function(){return this.currentDetails},s}(a))._instance=null,i=c))||i);s._RF.pop()}}}));
System.register("chunks:///_virtual/SensorFieldItem.ts",["./rollupPluginModLoBabelHelpers.js","cc"],(function(e){var i,t,n,r,a,l,o,u,s;return{setters:[function(e){i=e.applyDecoratedDescriptor,t=e.inheritsLoose,n=e.initializerDefineProperty,r=e.assertThisInitialized},function(e){a=e.cclegacy,l=e._decorator,o=e.Label,u=e.Node,s=e.Component}],execute:function(){var c,p,b,h,d,f,L,m,v,y,g,w,z,C,I;a._RF.push({},"c1a39jwEUpIVIaHl1hL0Vwq","SensorFieldItem",void 0);var F=l.ccclass,S=l.property;e("SensorFieldItem",(c=F("SensorFieldItem"),p=S(o),b=S(o),h=S(o),d=S(o),f=S({type:u}),L=S({type:u}),c((y=i((v=function(e){function i(){for(var i,t=arguments.length,a=new Array(t),l=0;l<t;l++)a[l]=arguments[l];return i=e.call.apply(e,[this].concat(a))||this,n(i,"nameLabel",y,r(i)),n(i,"valueLabel",g,r(i)),n(i,"unitLabel",w,r(i)),n(i,"descriptionLabel",z,r(i)),n(i,"descriptionContainer",C,r(i)),n(i,"Morph",I,r(i)),i}t(i,e);var a=i.prototype;return a.onLoad=function(){this.descriptionContainer&&(this.descriptionContainer.active=!1)},a.setData=function(e){var i,t;this.nameLabel&&(this.nameLabel.string=e.name),this.valueLabel&&(this.valueLabel.string=String(e.value)),this.unitLabel&&(this.unitLabel.string=null!=(i=e.unit)?i:"????");var n=!(null==(t=e.description)||!t.trim());this.descriptionLabel&&(this.descriptionLabel.string=n?e.description:""),this.descriptionContainer&&(this.descriptionContainer.active=n),this.Morph&&(this.Morph.active=n)},i}(s)).prototype,"nameLabel",[p],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),g=i(v.prototype,"valueLabel",[b],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),w=i(v.prototype,"unitLabel",[h],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),z=i(v.prototype,"descriptionLabel",[d],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),C=i(v.prototype,"descriptionContainer",[f],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),I=i(v.prototype,"Morph",[L],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),m=v))||m));a._RF.pop()}}}));

Binary file not shown.