| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-8ee038ba"],{"36de":function(t,e,s){"use strict";s.r(e);var n=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"app-container"},[s("el-row",[s("el-col",{staticClass:"card-box",attrs:{span:24}},[s("el-card",[s("div",{attrs:{slot:"header"},slot:"header"},[s("span",{staticStyle:{"font-size":"20px","font-weight":"bold"}},[t._v(t._s(t.$t("jcxx")))]),s("span",{staticStyle:{"margin-left":"60px"}},[s("el-button",{attrs:{type:"primary"},nativeOn:{click:function(e){return e.preventDefault(),t.queryInfo(e)}}},[t._v(" "+t._s(t.$t("cx")))])],1)]),s("div",{staticClass:"el-table el-table--enable-row-hover el-table--medium"},[s("el-row",{attrs:{span:24}},[s("el-col",{attrs:{span:4}},[s("div",{staticClass:"row-item"},[s("div",{staticClass:"row-item-title"},[t._v("PDU"+t._s(t.$t("xh"))+": ")]),s("div",{staticClass:"row-item-content"},[t._v(t._s(t.totalInfo.productType))])])]),s("el-col",{attrs:{span:4}},[s("div",{staticClass:"row-item"},[s("div",{staticClass:"row-item-title"},[t._v(t._s(t.$t("bh"))+": ")]),s("div",{staticClass:"row-item-content"},[t._v(t._s(t.totalInfo.productNumber))])])]),s("el-col",{attrs:{span:4}},[s("div",{staticClass:"row-item"},[s("div",{staticClass:"row-item-title"},[t._v(t._s(t.$t("lx"))+": ")]),s("div",{staticClass:"row-item-content"},[t._v(t._s(t.totalInfo.productPwrType))])])]),s("el-col",{attrs:{span:4}},[s("div",{staticClass:"row-item"},[s("div",{staticClass:"row-item-title"},[t._v(t._s(t.$t("bbh"))+":")]),s("div",{staticClass:"row-item-content"},[t._v(t._s(t.totalInfo.productVersion))])])]),s("el-col",{attrs:{span:4}},[s("div",{staticClass:"row-item"},[s("div",{staticClass:"row-item-title"},[t._v(t._s(t.$t("zkb"))+"CPU: ")]),s("div",{staticClass:"row-item-content"},[t._v(t._s(t.totalInfo.productConsumption))])])]),s("el-col",{attrs:{span:4}},[s("div",{staticClass:"row-item"},[s("div",{staticClass:"row-item-title"},[t._v(t._s(t.$t("nc"))+": ")]),s("div",{staticClass:"row-item-content"},[t._v(t._s(t.totalInfo.productMemory))])])]),s("el-col",{attrs:{span:4}},[s("div",{staticClass:"row-item"},[s("div",{staticClass:"row-item-title"},[t._v(t._s(t.$t("cpzyl"))+": ")]),s("div",{staticClass:"row-item-content"},[t._v(t._s(t.totalInfo.occupancyRate))])])]),s("el-col",{attrs:{span:4}},[s("div",{staticClass:"row-item"},[s("div",{staticClass:"row-item-title"},[t._v("IP"+t._s(t.$t("dz"))+": ")]),s("div",{staticClass:"row-item-content"},[t._v(t._s(t.totalInfo.productAddr))])])]),s("el-col",{attrs:{span:4}},[s("div",{staticClass:"row-item"},[s("div",{staticClass:"row-item-title"},[t._v("RS485"+t._s(t.$t("jl"))+t._s(t.$t("sbsl"))+": ")]),s("div",{staticClass:"row-item-content"},[t._v(t._s(t.totalInfo.productCount))])])])],1)],1)])],1),s("el-col",{staticClass:"card-box",attrs:{span:12}},[s("el-card",[s("div",{attrs:{slot:"header"},slot:"header"},[s("span",{staticStyle:{"font-size":"20px","font-weight":"bold"}},[t._v(t._s(t.$t("ztjkzt")))]),s("span",{staticStyle:{"margin-left":"60px"}},[s("el-button",{attrs:{type:"primary"},nativeOn:{click:function(e){return e.preventDefault(),t.queryTotalStatus(e)}}},[t._v(" "+t._s(t.$t("cx")))])],1)]),s("div",{staticClass:"el-table el-table--enable-row-hover el-table--medium"},[s("el-row",{attrs:{span:24}},[s("el-col",{attrs:{span:4}},[s("div",{staticClass:"row-item"},[s("div",{staticClass:"row-item-title"},[t._v(t._s(t.$t("zdy"))+"(V): ")]),s("div",{staticClass:"row-item-content"},[t._v(t._s(t.totalStatus.productVoltage))])])]),s("el-col",{attrs:{span:4}},[s("div",{staticClass:"row-item"},[s("div",{staticClass:"row-item-title"},[t._v(t._s(t.$t("zdl"))+"(A): ")]),s("div",{staticClass:"row-item-content"},[t._v(t._s(t.totalStatus.productCurrent))])])]),s("el-col",{attrs:{span:4}},[s("div",{staticClass:"row-item"},[s("div",{staticClass:"row-item-title"},[t._v(t._s(t.$t("zgl"))+"(W): ")]),s("div",{staticClass:"row-item-content"},[t._v(t._s(t.totalStatus.productPower))])])]),s("el-col",{attrs:{span:4}},[s("div",{staticClass:"row-item"},[s("div",{staticClass:"row-item-title"},[t._v(t._s(t.$t("pl"))+":")]),s("div",{staticClass:"row-item-content"},[t._v(t._s(t.totalStatus.productPowerFreq))])])]),s("el-col",{attrs:{span:4}},[s("div",{staticClass:"row-item"},[s("div",{staticClass:"row-item-title"},[t._v(t._s(t.$t("zhdl"))+"(kWh): ")]),s("div",{staticClass:"row-item-content"},[t._v(t._s(t.totalStatus.productConsumption))])])]),s("el-col",{attrs:{span:4}},[s("div",{staticClass:"row-item"},[s("div",{staticClass:"row-item-title"},[t._v(t._s(t.$t("glys"))+": ")]),s("div",{staticClass:"row-item-content"},[t._v(t._s(t.totalStatus.productPowerFactor))])])])],1)],1)])],1),s("el-col",{staticClass:"card-box",attrs:{span:12}},[s("el-card",[s("div",{attrs:{slot:"header"},slot:"header"},[s("span",{staticStyle:{"font-size":"20px","font-weight":"bold"}},[t._v(t._s(t.$t("tdjkzt")))]),s("span",{staticStyle:{"margin-left":"60px"}},[s("el-button",{attrs:{type:"primary"},nativeOn:{click:function(e){return e.preventDefault(),t.queryChannelStatus(e)}}},[t._v(" "+t._s(t.$t("cx")))])],1)]),s("el-table",{attrs:{"max-height":"220",data:t.channelList}},[s("el-table-column",{attrs:{label:this.$t("tdmc"),prop:"productChName"}}),s("el-table-column",{attrs:{label:this.$t("tdh"),prop:"productChId","show-overflow-tooltip":!0,width:"140"}}),s("el-table-column",{attrs:{label:this.$t("dy")+"(V)",prop:"productChVoltage","show-overflow-tooltip":!0,width:"110"}}),s("el-table-column",{attrs:{label:this.$t("dl")+"(A)",prop:"productChCurrent",width:"110"}}),s("el-table-column",{attrs:{label:this.$t("gl")+"(W)",prop:"productChPower",align:"center",width:"100"}}),s("el-table-column",{attrs:{label:this.$t("pl"),align:"center",prop:"productChPowerFreq",width:"180"}}),s("el-table-column",{attrs:{label:this.$t("hdl")+"(kWh)",align:"center",prop:"productChConsumption",width:"130"}}),s("el-table-column",{attrs:{label:this.$t("glys"),align:"center",prop:"productChPowerFactor",width:"180"}}),s("el-table-column",{attrs:{label:this.$t("zt"),align:"center",prop:"productChStatus",width:"100"}})],1)],1)],1),s("el-col",{staticClass:"card-box",attrs:{span:24}},[s("el-card",[s("div",{attrs:{slot:"header"},slot:"header"},[s("span",{staticStyle:{"font-size":"20px","font-weight":"bold"}},[t._v(t._s(t.$t("cgqztjk")))]),s("span",{staticStyle:{"margin-left":"60px"}},[s("el-button",{attrs:{type:"primary"},nativeOn:{click:function(e){return e.preventDefault(),t.querySensorStatusMonitoring(e)}}},[t._v(" "+t._s(t.$t("cx")))])],1)]),s("div",{staticClass:"el-table el-table--enable-row-hover el-table--medium"},[s("el-tabs",{attrs:{value:"0"},on:{"tab-click":t.handleClick}},t._l(t.sensorStatusTabs,(function(e){return s("el-tab-pane",{key:e.id,attrs:{label:t.$t(e.name),name:e.id}},[s("el-table",{attrs:{"max-height":"220",data:t.sensorStatusList}},[s("el-table-column",{attrs:{label:t.$t("cgqxh"),prop:"sensorId","show-overflow-tooltip":!0}}),s("el-table-column",{attrs:{label:t.$t("cgqmc"),prop:"sensorName","show-overflow-tooltip":!0}}),s("el-table-column",{attrs:{label:t.$t("lx"),prop:"sensorType",width:"100"}}),s("el-table-column",{attrs:{label:"COM"+t.$t("kh"),prop:"comSlogan",width:"100"}}),s("el-table-column",{attrs:{label:t.$t("dz"),prop:"sensorAddr",align:"center"}}),s("el-table-column",{attrs:{label:t.$t("btl"),align:"center",prop:"sensorBaud",width:"100"}}),s("el-table-column",{attrs:{label:t.$t("ljzt"),align:"center",prop:"connectionStatus",width:"130"},scopedSlots:t._u([{key:"default",fn:function(e){return[s("span",[t._v(t._s(t.getDity(e.row,"connectionStatus")))])]}}],null,!0)}),"0"===e.id?s("el-table-column",{attrs:{label:t.$t("wdz")+"(℃)",align:"center",prop:"temperatureValue",width:"130"}}):t._e(),"0"===e.id?s("el-table-column",{attrs:{label:t.$t("sdz")+"(%)",align:"center",prop:"humidityValue",width:"130"}}):t._e(),"1"===e.id?s("el-table-column",{attrs:{label:t.$t("bjzt"),align:"center",prop:"alarmStatus",width:"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[s("span",[t._v(t._s(t.getDity(e.row,"alarmStatus")))])]}}],null,!0)}):t._e(),"2"===e.id?s("el-table-column",{attrs:{label:t.$t("sqrzt"),align:"center",prop:"waterImmersionState",width:"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[s("span",[t._v(t._s(t.getDity(e.row,"waterImmersionState")))])]}}],null,!0)}):t._e(),"3"===e.id?s("el-table-column",{attrs:{label:t.$t("mjsfzt"),align:"center",prop:"accessControlStatus",width:"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[s("span",[t._v(t._s(t.getDity(e.row,"accessControlStatus")))])]}}],null,!0)}):t._e(),"4"===e.id?s("el-table-column",{attrs:{label:t.$t("qtld"),align:"center",prop:"gasConcentration",width:"100"}}):t._e(),"5"===e.id?s("el-table-column",{attrs:{label:t.$t("qlz")+"(m/s)",align:"center",prop:"airflowValue",width:"100"}}):t._e(),"5"===e.id?s("el-table-column",{attrs:{label:t.$t("qyz")+"(MPa)",align:"center",prop:"airPressureValue",width:"100"}}):t._e()],1)],1)})),1)],1)])],1)],1)],1)},a=[],o=(s("4de4"),s("b0c0"),s("d3b7"),s("7ba4")),i=(s("b48e"),{name:"Server",data:function(){return{server:[],totalInfo:{},totalStatus:{},channelList:[],title:"",sensorStatusTitle:"",open:!1,usertoken:"",form:{},sensorStatusForm:{},activeName:"0",sensorStatusTabs:[{id:"0",name:"wsdcgq"},{id:"1",name:"ywcgq"},{id:"2",name:"sqcgq"},{id:"3",name:"mjcgq"},{id:"4",name:"qtcgq"},{id:"5",name:"qyqlcgq"},{id:"6",name:"ktcgq"}],waterImmersionStates:[{id:"0",name:"qr"},{id:"1",name:"wqr"}],accessControlStatuss:[{id:"0",name:"sb"},{id:"1",name:"sf"}],alarmStatuss:[{id:"0",name:"bj"},{id:"1",name:"wbj"}],connectionStatuss:[{id:"0",name:"zx"},{id:"1",name:"lix"}],sensorStatusOpen:!1,sensorStatusList:[],sensorStatusALLList:[]}},mounted:function(){this.$bus.$on("OVERALL_STATUS_MONITORING",this.onSocketMessageToOverall),this.$bus.$on("CHANNEL_STATUS_MONITORING",this.onSocketMessageToChannel),this.$bus.$on("SENSOR_STATUS_MONITORING",this.onSocketMessageToSensor)},created:function(){this.usertoken=this.$store.state.user.usertoken,this.queryInfo()},methods:{onSocketMessageToOverall:function(t){t.success&&this.queryTotalStatus()},onSocketMessageToChannel:function(t){t.success&&this.queryChannelStatus()},onSocketMessageToSensor:function(t){t.success&&this.querySensorStatusMonitoring()},getDity:function(t,e){var s="",n="",a=[];"accessControlStatus"==e?(a=this.accessControlStatuss,n=t.accessControlStatus):"alarmStatus"==e?(a=this.alarmStatuss,n=t.alarmStatus):"connectionStatus"==e?(a=this.connectionStatuss,n=t.connectionStatus):("waterImmersionState"==e||"waterImmersionState"==e)&&(a=this.waterImmersionStates,n=t.waterImmersionState);for(var o=0;o<a.length;o++){var i=a[o];if(n==i.id)return s=i.name,this.$t(i.name)}return s},dataRefreh:function(){var t=this;setInterval((function(){t.queryTotalStatus(),t.queryChannelStatus(),t.querySensorStatusMonitoring()}),2e3)},sensorStatusAdd:function(){this.sensorStatusForm={},this.sensorStatusOpen=!0,this.sensorStatusTitle=this.$t("xz")},querySensorStatusMonitoring:function(){var t=this,e={};e.token=this.usertoken,e.type="listQuery",Object(o["j"])(e).then((function(e){t.sensorStatusList=t.filterList(e.data,t.activeName),t.sensorStatusALLList=e.data})).catch((function(){}))},filterList:function(t,e){return t.filter((function(t){return t.sensorType===e}))},sensorStatusDelete:function(t){var e=this,s={};s.token=this.usertoken,s.sensorId=t.sensorId,s.type="delete",this.$modal.confirm(this.$t("qdyscm")).then((function(){Object(o["j"])(s)})).then((function(){e.$modal.msgSuccess(e.$t("zxcg")),e.querySensorStatusMonitoring()})).catch((function(){}))},issueInstructionsReset:function(t){var e=this,s={};s.token=this.usertoken,s.sensorId=t.sensorId,s.type="reset",this.$modal.confirm(this.$t("qryfwm")).then((function(){Object(o["j"])(s)})).then((function(){e.$modal.msgSuccess(e.$t("zxcg")),e.querySensorStatusMonitoring()})).catch((function(){}))},issueInstructionsRelease:function(t){var e=this,s={};s.token=this.usertoken,s.sensorId=t.sensorId,s.type="release",this.$modal.confirm(this.$t("qrysfm")).then((function(){Object(o["j"])(s)})).then((function(){e.querySensorStatusMonitoring(),e.$modal.msgSuccess(e.$t("zxcg"))})).catch((function(){}))},sensorStatusUpdate:function(t){this.sensorStatusForm=t,this.sensorStatusOpen=!0,this.sensorStatusTitle=this.$t("pz")},sensorStatusHandleCommand:function(t,e){var s=this,n={};switch(n.token=this.usertoken,n.sensorId=e.sensorId,t){case"sensorStatusopen":n.type="open",this.$modal.confirm(this.$t("qrykqm")).then((function(){Object(o["j"])(n)})).then((function(){s.$modal.msgSuccess(s.$t("zxcg")),s.querySensorStatusMonitoring()})).catch((function(){}));break;case"sensorStatusclose":n.type="close",this.$modal.confirm(this.$t("qrygbm")).then((function(){Object(o["j"])(n)})).then((function(){s.$modal.msgSuccess(s.$t("zxcg")),s.querySensorStatusMonitoring()})).catch((function(){}));break;default:break}},sensorStatusSubmitForm:function(){var t=this;this.$refs["sensorStatusForm"].validate((function(e){if(e){var s={};s.token=t.usertoken,s.sensorType=t.sensorStatusForm.sensorType,s.sensorId=t.sensorStatusForm.sensorId,s.sensorName=t.sensorStatusForm.sensorName,s.comSlogan=t.sensorStatusForm.comSlogan,s.sensorAddr=t.sensorStatusForm.sensorAddr,s.sensorBaud=t.sensorStatusForm.sensorBaud,s.connectionStatus=t.sensorStatusForm.connectionStatus,void 0!=t.sensorStatusForm.sensorId&&""!=t.sensorStatusForm.sensorId?(t.loading=!0,s.type="update",Object(o["j"])(s).then((function(e){t.$modal.msgSuccess(t.$t("xgcg")),t.sensorStatusOpen=!1,t.querySensorStatusMonitoring(),t.loading=!1}))):(t.loading=!0,s.type="add",Object(o["j"])(s).then((function(e){t.$modal.msgSuccess(t.$t("xzcg")),t.sensorStatusOpen=!1,t.querySensorStatusMonitoring(),t.loading=!1})))}}))},sensorStatusCancel:function(){this.sensorStatusOpen=!1},handleClick:function(t,e){this.activeName=t.name,this.querySensorStatusMonitoring()},getList:function(){var t=this;Object(o["g"])().then((function(e){t.server=e.data}))},submitForm:function(){var t=this;this.$refs["form"].validate((function(e){if(e){var s={};s.token=t.usertoken,s.type="save",s.productChName=t.form.productChName,s.productChId=t.form.productChId,s.ChannelLoadType=t.form.ChannelLoadType,t.loading=!0,Object(o["c"])(s).then((function(e){t.open=!1,t.queryChannelStatus()}))}}))},cancel:function(){this.open=!1},handleUpdate:function(t){this.form=t,this.open=!0,this.title=this.$t("xg")},queryChannelStatus:function(){var t=this,e={};e.token=this.usertoken,e.type="listQuery",this.loading=!0,Object(o["c"])(e).then((function(e){t.channelList=e.data})).catch((function(){})),this.loading=!1},handleCommand:function(t,e){var s=this,n={};switch(n.token=this.usertoken,n.productChId=e.productChId,t){case"channelopen":n.type="open",this.$modal.confirm(this.$t("qrykqm")).then((function(){Object(o["c"])(n)})).then((function(){s.$modal.msgSuccess(s.$t("zxcg"))})).catch((function(){}));break;case"channelclose":n.type="close",this.$modal.confirm(this.$t("qrygbm")).then((function(){Object(o["c"])(n)})).then((function(){s.$modal.msgSuccess(s.$t("zxcg"))})).catch((function(){}));break;default:break}},queryInfo:function(){var t=this,e={};e.token=this.usertoken,e.type="listInfoQuery",Object(o["i"])(e).then((function(e){t.totalInfo=e.data[0]}))},queryTotalStatus:function(){var t=this,e={};e.token=this.usertoken,e.type="listQuery",Object(o["i"])(e).then((function(e){t.totalStatus=e.data[0]}))},totalopen:function(){var t=this,e={};e.token=this.usertoken,e.type="open",this.$modal.confirm(this.$t("qrykqm")).then((function(){Object(o["i"])(e)})).then((function(){t.$modal.msgSuccess(t.$t("zxcg")),t.queryTotalStatus(),t.queryChannelStatus(),t.querySensorStatusMonitoring()})).catch((function(){}))},runJob:function(){alert("222")},totalclose:function(){var t=this,e={};e.token=this.usertoken,e.type="close",this.$modal.confirm(this.$t("qrykqm")).then((function(){Object(o["i"])(e)})).then((function(){t.$modal.msgSuccess(t.$t("zxcg")),t.queryTotalStatus(),t.queryChannelStatus(),t.querySensorStatusMonitoring()})).catch((function(){}))},openLoading:function(){this.$modal.loading(this.$t("zzjzqsh"))}}}),r=i,l=(s("839e"),s("2877")),c=Object(l["a"])(r,n,a,!1,null,"2963234f",null);e["default"]=c.exports},"839e":function(t,e,s){"use strict";s("c4e9")},c4e9:function(t,e,s){}}]);
|