1 line
11 KiB
JavaScript
1 line
11 KiB
JavaScript
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-130d547d"],{"1ee9":function(t,e,n){"use strict";n("ab2c")},"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.
|