1 line
13 KiB
JavaScript
1 line
13 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-fc6258c6","chunk-130d547d"],{"1ee9":function(t,e,n){"use strict";n("ab2c")},6378:function(t,e,n){"use strict";n("64bc")},"64bc":function(t,e,n){},"7f97":function(t,e,n){"use strict";n.r(e);var o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"app-container"},[n("el-row",{attrs:{gutter:10}},[n("el-form",{ref:"dataForm",attrs:{model:t.dataForm,rules:t.rules,size:"medium","label-position":"left"}},[n("el-col",{attrs:{span:4}},[n("el-form-item",{attrs:{label:"communication状态",prop:"communicationState",required:""}},[n("span",{class:0===t.dataForm.communicationState?"waring":"normal"},[t._v(t._s(0===t.dataForm.communicationState?"off":"on"))]),t._v(" "),n("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(e){return t.switchChange()}}},[t._v("控制")])],1)],1),t._v(" "),t._e(),t._v(" "),n("el-col",{attrs:{span:8}},[n("el-form-item",{attrs:{label:"controllerState",prop:"controllerState"}},[n("el-select",{attrs:{placeholder:"请选择下拉选择",clearable:""},on:{change:t.controllerStateChange},model:{value:t.dataForm.controllerState,callback:function(e){t.$set(t.dataForm,"controllerState",e)},expression:"dataForm.controllerState"}},t._l(t.controllerStateArr,(function(t,e){return n("el-option",{key:e,attrs:{label:t.label,value:t.value}})})),1),t._v(" "),n("span",{class:"offline"===t.controllerInfo?"waring":"normal"},[t._v(t._s(t.controllerInfo))])],1)],1)],1),t._v(" "),n("el-col",{attrs:{span:3,offset:2}},[n("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.sendSecsGemSetting()}}},[t._v("Setting")])],1),t._v(" "),n("el-col",{attrs:{span:3}},[n("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.sendAlarmReport()}}},[t._v("AlarmReport")])],1),t._v(" "),t._e()],1)],1)},r=[],s=n("a3e3"),a=n.n(s),c=n("9474"),i=n.n(c),l=n("981b"),u={name:"Aspc",components:{},filters:{statusFilter:function(t){var e={published:"success",draft:"info",deleted:"danger"};return e[t]}},data:function(){return{dataForm:{communicationState:0,eqpState:void 0,controllerState:void 0},controllerStatus:"",eqpStatus:"",communicationStatus:"",communicationShow:!1,eqpStatusShow:!1,controllerStatusShow:!1,controllerInfo:"",rules:{},eqpStateArr:[{label:"local",value:4},{label:"remote",value:5}],controllerStateArr:[{label:"offline",value:1},{label:"local",value:2},{label:"remote",value:3}],websock:"",url:"",wbData:{}}},created:function(){var t=this;this.getState(),this.url="a.wms.picaiba.com",this.initWebSocket(),Object(l["getCommunicationState"])().then((function(e){t.dataForm.communicationState=e.data.communicationState}))},destroyed:function(){this.websock&&this.websock.close()},methods:{switchChange:function(){var t=this;this.communicationShow=!1;var e=this.dataForm.communicationState?0:1;Object(l["DisableEnableCommunication"])(e).then((function(e){t.$message({message:t.$t("module.basicData.visual.success"),type:"success",duration:1500})}))},eqpStateChange:function(){var t=this;this.eqpStatusShow=!1,Object(l["sendEqpState"])(this.dataForm.eqpState).then((function(e){t.$message({message:t.$t("module.basicData.visual.success"),type:"success",duration:1500})}))},controllerStateChange:function(){var t=this;this.controllerStatusShow=!1,Object(l["sendControllerState"])(this.dataForm.controllerState).then((function(e){t.$message({message:t.$t("module.basicData.visual.success"),type:"success",duration:1500})}))},getState:function(){var t=this;Object(l["getcontrollerState"])().then((function(e){1===e.data.controllerState?(t.dataForm.controllerState=1,t.controllerInfo="offline"):4===e.data.eqpState?(t.dataForm.controllerState=2,t.controllerInfo="local"):5===e.data.eqpState&&(t.dataForm.controllerState=3,t.controllerInfo="remote"),t.dataForm.eqpState=e.data.eqpState}))},sendReportLinkedEventAndVid:function(){var t=this;Object(l["sendReportLinkedEventAndVid"])().then((function(e){t.$message({message:t.$t("module.basicData.visual.success"),type:"success",duration:1500})}))},sendSecsGemSetting:function(){var t=this;Object(l["sendSecsGemSetting"])().then((function(e){t.$message({message:t.$t("module.basicData.visual.success"),type:"success",duration:1500})}))},sendAlarmReport:function(){var t=this;Object(l["sendAlarmReport"])().then((function(e){t.$message({message:t.$t("module.basicData.visual.success"),type:"success",duration:1500})}))},initWebSocket:function(){var t,e=a()(t="ws://".concat(this.url,"/opcua/websocket/")).call(t,Math.round(100*Math.random()));this.websock=new WebSocket(e),this.websock.onmessage=this.websocketonmessage,this.websock.onopen=this.websocketonopen,this.websock.onerror=this.websocketonerror,this.websock.onclose=this.websocketclose},websocketonopen:function(){console.log("websocketonopen")},websocketonerror:function(){this.initWebSocket()},websocketonmessage:function(t){this.wbData=JSON.parse(t.data),console.log(this.wbData),this.wbData.controllerState?(this.controllerStatus=this.wbData.vidResult,"1"===this.wbData.controllerState?(this.dataForm.controllerState=1,this.controllerInfo="offline"):"4"===this.wbData.eqpState?(this.dataForm.controllerState=2,this.controllerInfo="local"):"5"===this.wbData.eqpState&&(this.dataForm.controllerState=3,this.controllerInfo="remote"),this.controllerStatusShow=!0):this.wbData.eqpState?(this.eqpStatus=this.wbData.eqpResult,this.dataForm.eqpState=i()(this.wbData.eqpState),this.eqpStatusShow=!0):(this.communicationStatus=this.wbData.communicationResult,this.dataForm.communicationState=i()(this.wbData.connectState),this.communicationShow=!0)},websocketsend:function(t){this.websock.send(t)},websocketclose:function(t){console.log("断开连接",t),this.initWebSocket()}}},d=u,p=(n("1ee9"),n("2877")),m=Object(p["a"])(d,o,r,!1,null,"3a23e516",null);e["default"]=m.exports},"981b":function(t,e,n){"use strict";n.r(e),n.d(e,"AlarmCleared",(function(){return r})),n.d(e,"AlarmDetected",(function(){return s})),n.d(e,"CompleteProcessFlow",(function(){return a})),n.d(e,"ControlStateLocal",(function(){return c})),n.d(e,"ControlStateRemote",(function(){return i})),n.d(e,"E10StateChanged",(function(){return l})),n.d(e,"EmptyCassettereport",(function(){return u})),n.d(e,"EquipmentOffline",(function(){return d})),n.d(e,"MaintenancePlan",(function(){return p})),n.d(e,"MaintenanceRecord",(function(){return m})),n.d(e,"MaterialReceived",(function(){return f})),n.d(e,"MaterialRemoved",(function(){return h})),n.d(e,"OKsubstratereport",(function(){return b})),n.d(e,"PowerConsumption",(function(){return S})),n.d(e,"ProcessingCompleted",(function(){return v})),n.d(e,"ProcessingStarted",(function(){return g})),n.d(e,"ProcessingStopped",(function(){return w})),n.d(e,"QCPChange",(function(){return C})),n.d(e,"RepairRecord",(function(){return O})),n.d(e,"Scrapsubstratereport",(function(){return E})),n.d(e,"ShuttleMovementFinished",(function(){return I})),n.d(e,"ShuttleMovementStart",(function(){return j})),n.d(e,"SpoolTransmitFailure",(function(){return L})),n.d(e,"SpoolingActivated",(function(){return k})),n.d(e,"SpoolingDeactivated",(function(){return F})),n.d(e,"DisableEnableCommunication",(function(){return R})),n.d(e,"getCommunicationState",(function(){return D})),n.d(e,"getcontrollerState",(function(){return q})),n.d(e,"sendControllerState",(function(){return _})),n.d(e,"sendEqpState",(function(){return A})),n.d(e,"sendReportLinkedEventAndVid",(function(){return y})),n.d(e,"sendSecsGemSetting",(function(){return P})),n.d(e,"sendAlarmReport",(function(){return M}));var o=n("b775");function r(){return Object(o["a"])({url:"/cigs-00a/IL1testcontroller/post/sendAlarmClearedEvent",method:"post"})}function s(){return Object(o["a"])({url:"/cigs-00a/IL1testcontroller/post/sendAlarmDetectedEvent",method:"post"})}function a(){return Object(o["a"])({url:"/cigs-00a/IL1testcontroller/post/sendCompleteProcessFlowEvent",method:"post"})}function c(){return Object(o["a"])({url:"/cigs-00a/IL1testcontroller/post/sendControlStateLocalEvent",method:"post"})}function i(){return Object(o["a"])({url:"/cigs-00a/IL1testcontroller/post/sendControlStateRemoteEvent",method:"post"})}function l(){return Object(o["a"])({url:"/cigs-00a/IL1testcontroller/post/sendE10StateChangedEvent",method:"post"})}function u(){return Object(o["a"])({url:"/cigs-00a/IL1testcontroller/post/sendEmptyCassettereportEvent",method:"post"})}function d(){return Object(o["a"])({url:"/cigs-00a/IL1testcontroller/post/sendEquipmentOfflineEvent",method:"post"})}function p(){return Object(o["a"])({url:"/cigs-00a/IL1testcontroller/post/sendMaintenancePlanEvent",method:"post"})}function m(){return Object(o["a"])({url:"/cigs-00a/IL1testcontroller/post/sendMaintenanceRecordEvent",method:"post"})}function f(){return Object(o["a"])({url:"/cigs-00a/IL1testcontroller/post/sendMaterialReceivedEvent",method:"post"})}function h(){return Object(o["a"])({url:"/cigs-00a/IL1testcontroller/post/sendMaterialRemovedEvent",method:"post"})}function b(){return Object(o["a"])({url:"/cigs-00a/IL1testcontroller/post/sendOKsubstratereportEvent",method:"post"})}function S(){return Object(o["a"])({url:"/cigs-00a/IL1testcontroller/post/sendPowerConsumptionEvent",method:"post"})}function v(){return Object(o["a"])({url:"/cigs-00a/IL1testcontroller/post/sendProcessingCompletedEvent",method:"post"})}function g(){return Object(o["a"])({url:"/cigs-00a/IL1testcontroller/post/sendProcessingStartedEvent",method:"post"})}function w(){return Object(o["a"])({url:"/cigs-00a/IL1testcontroller/post/sendProcessingStoppedEvent",method:"post"})}function C(){return Object(o["a"])({url:"/cigs-00a/IL1testcontroller/post/sendQCPChangeEvent",method:"post"})}function O(){return Object(o["a"])({url:"/cigs-00a/IL1testcontroller/post/sendRepairRecordEvent",method:"post"})}function E(){return Object(o["a"])({url:"/cigs-00a/IL1testcontroller/post/sendScrapsubstratereportEvent",method:"post"})}function I(){return Object(o["a"])({url:"/cigs-00a/IL1testcontroller/post/sendShuttleMovementFinishedEvent",method:"post"})}function j(){return Object(o["a"])({url:"/cigs-00a/IL1testcontroller/post/sendShuttleMovementStartEvent",method:"post"})}function L(){return Object(o["a"])({url:"/cigs-00a/IL1testcontroller/post/sendSpoolTransmitFailureEvent",method:"post"})}function k(){return Object(o["a"])({url:"/cigs-00a/IL1testcontroller/post/sendSpoolingActivatedEvent",method:"post"})}function F(){return Object(o["a"])({url:"/cigs-00a/IL1testcontroller/post/sendSpoolingDeactivatedEvent",method:"post"})}function R(t){return Object(o["a"])({url:"/cigs-00a/IL1testcontroller/post/sendDisableEnableCommunication",method:"post",headers:{"Content-Type":"text/plain"},data:t})}function D(){return Object(o["a"])({url:"/cigs-00a/IL1testcontroller/post/communicationState/get",method:"post"})}function q(){return Object(o["a"])({url:"/cigs-00a/IL1testcontroller/post/controllerState/get",method:"post"})}function _(t){return Object(o["a"])({url:"/cigs-00a/IL1testcontroller/post/sendControllerState",method:"post",headers:{"Content-Type":"text/plain"},data:t})}function A(t){return Object(o["a"])({url:"/cigs-00a/IL1testcontroller/post/sendEqpState",method:"post",headers:{"Content-Type":"text/plain"},data:t})}function y(){return Object(o["a"])({url:"/cigs-00a/IL1testcontroller/post/sendReportLinkedEventAndVid",method:"post"})}function P(){return Object(o["a"])({url:"/cigs-00a/IL1testcontroller/post/sendSecsGemSetting",method:"post"})}function M(){return Object(o["a"])({url:"/cigs-00a/IL1testcontroller/post/sendAlarmReport",method:"post"})}},ab2c:function(t,e,n){},e08f:function(t,e,n){"use strict";n.r(e);var o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",{staticClass:"btn-container"},t._l(t.btnList,(function(e,o){return n("div",{key:o,staticClass:"btndiv"},[n("el-card",{staticClass:"box-card",nativeOn:{click:function(n){return t.sendInfo(e)}}},[t._v(t._s(e))])],1)})),0),t._v(" "),n("spc-control")],1)},r=[],s=(n("7f7f"),n("981b")),a=n("7f97"),c={name:"Aspc",components:{spcControl:a["default"]},filters:{statusFilter:function(t){var e={published:"success",draft:"info",deleted:"danger"};return e[t]}},data:function(){return{btnList:["EquipmentOffline","ControlStateLocal","ControlStateRemote","AlarmDetected","AlarmCleared","ProcessingStarted","ProcessingCompleted","ProcessingStopped","MaterialReceived","MaterialRemoved","E10StateChanged","CompleteProcessFlow","MaintenancePlan","MaintenanceRecord","RepairRecord","ShuttleMovementStart","ShuttleMovementFinished","QCPChange","PowerConsumption","OKsubstratereport","Scrapsubstratereport","EmptyCassettereport"]}},created:function(){},methods:{sendInfo:function(t){var e=this;s[t]().then((function(t){e.$message({message:e.$t("module.basicData.visual.success"),type:"success",duration:1500})}))}}},i=c,l=(n("6378"),n("2877")),u=Object(l["a"])(i,o,r,!1,null,"2e322fe2",null);e["default"]=u.exports}}]); |