chunk-8388ba00.8c6b8947.js 16 KB

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