chunk-69b51528.d00a2cff.js 19 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-69b51528"],{1054:function(t,e,o){"use strict";o.r(e);var r=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"app-container"},[o("el-form",{ref:"queryForm",attrs:{model:t.queryParams,size:"small",inline:!0,"label-width":"110px"}},[o("el-form-item",{attrs:{label:this.$t("sbmc"),prop:"productName"}},[o("el-select",{staticStyle:{width:"100%"},attrs:{"allow-create":"",filterable:""},model:{value:t.queryParams.productId,callback:function(e){t.$set(t.queryParams,"productId",e)},expression:"queryParams.productId"}},t._l(t.productList,(function(t){return o("el-option",{key:t.productId,attrs:{label:t.productName,value:t.productId}})})),1)],1),o("el-form-item",[o("el-button",{attrs:{type:"primary",icon:"el-icon-search",size:"mini"},on:{click:t.queryChannelStatus11}},[t._v(t._s(t.$t("ss")))])],1),o("el-form-item",{staticStyle:{position:"absolute",right:"0%","margin-right":"5%"}},[o("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(e){return t.handleZtCommand("open",t.queryParams.productId)}}},[t._v(t._s(t.$t("zk")))]),o("el-button",{staticStyle:{"background-color":"#656B8B"},attrs:{type:"primary",size:"mini"},on:{click:function(e){return t.handleZtCommand("close",t.queryParams.productId)}}},[t._v(t._s(t.$t("zg")))])],1)],1),"3"===this.productType?o("el-card",{staticStyle:{"min-height":"700px","border-radius":"15px"}},[o("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{"overflow-y":"auto"},attrs:{"min-height":"700px","max-height":"700px",data:t.channelList,"span-method":t.objectSpanMethod,"header-cell-style":{background:"#FFFFFF",color:"#000000"}}},[o("el-table-column",{attrs:{fixed:"",label:this.$t("sbmc"),width:"120",prop:"productName"}}),t._e(),t._e(),o("el-table-column",{attrs:{fixed:"",label:this.$t("tdmc"),width:"120",prop:"productChName"}}),o("el-table-column",{attrs:{fixed:"",label:this.$t("tdh"),width:"130",prop:"productChId","show-overflow-tooltip":!0}}),o("el-table-column",{attrs:{label:this.$t("sxxx"),width:"130",prop:"productPhOrder","show-overflow-tooltip":!0},scopedSlots:t._u([{key:"default",fn:function(e){return["1"==e.row.outputStatus?o("span",{staticStyle:{color:"green"}},[t._v(t._s(t.getDity(e.row,"productPhOrders")))]):o("span",{staticStyle:{color:"red"}},[t._v(t._s(t.getDity(e.row,"productPhOrders")))])]}}],null,!1,2745642062)}),o("el-table-column",{attrs:{label:this.$t("sxxdy")+"(V)",width:"150",prop:"productPhOrderDy","show-overflow-tooltip":!0}}),o("el-table-column",{attrs:{label:this.$t("sxxdl")+"(A)",width:"150",prop:"productPhOrderDl","show-overflow-tooltip":!0}}),o("el-table-column",{attrs:{label:this.$t("sxxgl")+"(W)",width:"140",prop:"productPhOrderGl","show-overflow-tooltip":!0}}),o("el-table-column",{attrs:{label:this.$t("sxxhdl")+"(Kwh)",width:"240",prop:"productPhOrderHdl","show-overflow-tooltip":!0}}),o("el-table-column",{attrs:{label:this.$t("gl")+"(W)",width:"120",prop:"productChPower","show-overflow-tooltip":!0,align:"center"}}),"1"!=this.productType?o("el-table-column",{attrs:{label:this.$t("pl"),width:"130",align:"center",prop:"productChPowerFreq","show-overflow-tooltip":!0}}):t._e(),o("el-table-column",{attrs:{label:this.$t("hdl")+"(Kwh)",width:"200",align:"center",prop:"productChConsumption","show-overflow-tooltip":!0}}),"1"!=this.productType?o("el-table-column",{attrs:{label:this.$t("glys"),width:"130",align:"center",prop:"productChPowerFactor","show-overflow-tooltip":!0}}):t._e(),o("el-table-column",{attrs:{label:this.$t("kqys")+"(S)",width:"140",sortable:"",prop:"firingInterval",align:"center","show-overflow-tooltip":!0}}),o("el-table-column",{attrs:{label:this.$t("gbys")+"(S)",width:"140",sortable:"",align:"center",prop:"closeInterval","show-overflow-tooltip":!0}}),o("el-table-column",{attrs:{fixed:"right",label:this.$t("zt"),align:"center",prop:"productChStatus"},scopedSlots:t._u([{key:"default",fn:function(e){return["0"==e.row.productChStatus?o("span",{staticStyle:{color:"red"}},[t._v(t._s(t.getDity(e.row,"productChStatus")))]):o("span",{staticStyle:{color:"green"}},[t._v(t._s(t.getDity(e.row,"productChStatus")))])]}}],null,!1,1956020816)}),o("el-table-column",{attrs:{fixed:"right",label:this.$t("cz"),align:"center",width:"100","class-name":"small-padding fixed-width"},scopedSlots:t._u([{key:"default",fn:function(e){return["0"==e.row.productChStatus?o("el-button",{attrs:{size:"mini",type:"text",icon:"el-icon-refresh"},on:{click:function(o){return t.handleCommand("channelopen",e.row)}}},[t._v(t._s(t.$t("dk")))]):t._e(),"1"==e.row.productChStatus?o("el-button",{attrs:{size:"mini",type:"text",icon:"el-icon-refresh"},on:{click:function(o){return t.handleCommand("channelclose",e.row)}}},[t._v(t._s(t.$t("gb")))]):t._e()]}}],null,!1,2394380253)}),o("el-table-column",{attrs:{fixed:"right",label:this.$t("sclx"),width:"140",align:"center",prop:"outputType","show-overflow-tooltip":!0},scopedSlots:t._u([{key:"default",fn:function(e){return["1"==e.row.outputType?o("span",{staticStyle:{color:"red",cursor:"pointer"},on:{click:function(o){return t.onclickOutType(e.row,e.$index)}}},[t._v(t._s(t.getDity(e.row,"outputTypes")))]):o("span",{staticStyle:{color:"#5C92B7",cursor:"pointer"},on:{click:function(o){return t.onclickOutType(e.row,e.$index)}}},[t._v(t._s(t.getDity(e.row,"outputTypes")))])]}}],null,!1,924070322)}),o("el-table-column",{attrs:{fixed:"right",label:this.$t("pz"),align:"center",width:"100","class-name":"small-padding fixed-width"},scopedSlots:t._u([{key:"default",fn:function(e){return[o("el-button",{attrs:{size:"mini",type:"text",icon:"el-icon-edit"},on:{click:function(o){return t.handleUpdate(e.row)}}},[t._v(t._s(t.$t("xg")))])]}}],null,!1,2814199834)})],1)],1):t._e(),"4"!=this.productType&&"3"!=this.productType?o("el-card",{staticStyle:{"min-height":"700px","border-radius":"15px"}},[o("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{"overflow-y":"auto"},attrs:{"min-height":"700px","max-height":"700px",data:t.channelList,"header-cell-style":{background:"#FFFFFF",color:"#000000"}}},[o("el-table-column",{attrs:{fixed:"",label:this.$t("sbmc"),width:"100",prop:"productName"}}),t._e(),t._e(),o("el-table-column",{attrs:{fixed:"",label:this.$t("tdmc"),width:"120",prop:"productChName"}}),o("el-table-column",{attrs:{fixed:"",label:this.$t("tdh"),width:"130",prop:"productChId","show-overflow-tooltip":!0}}),"3"==this.productType?o("el-table-column",{attrs:{label:this.$t("sxxx"),prop:"productPhOrder","show-overflow-tooltip":!0},scopedSlots:t._u([{key:"default",fn:function(e){return[o("span",[t._v(t._s(t.getDity(e.row,"productPhOrders")))])]}}],null,!1,1350926589)}):t._e(),"3"==this.productType?o("el-table-column",{attrs:{label:this.$t("sxx")+this.$t("dy")+"(V)",width:"100",prop:"productPhOrderDy","show-overflow-tooltip":!0}}):t._e(),"3"==this.productType?o("el-table-column",{attrs:{label:this.$t("sxx")+this.$t("dl")+"(A)",width:"100",prop:"productPhOrderDl","show-overflow-tooltip":!0}}):t._e(),"3"==this.productType?o("el-table-column",{attrs:{label:this.$t("sxx")+this.$t("gl")+"(W)",width:"100",prop:"productPhOrderGl","show-overflow-tooltip":!0}}):t._e(),"3"==this.productType?o("el-table-column",{attrs:{label:this.$t("sxx")+this.$t("hdl")+"(Kwh)",width:"130",prop:"productPhOrderHdl","show-overflow-tooltip":!0}}):t._e(),o("el-table-column",{attrs:{label:this.$t("dy")+"(V)",width:"120",prop:"productChVoltage","show-overflow-tooltip":!0}}),o("el-table-column",{attrs:{label:this.$t("dl")+"(A)",width:"120",prop:"productChCurrent","show-overflow-tooltip":!0}}),o("el-table-column",{attrs:{label:this.$t("gl")+"(W)",width:"120",prop:"productChPower","show-overflow-tooltip":!0,align:"center"}}),"1"!=this.productType?o("el-table-column",{attrs:{label:this.$t("pl"),align:"center",prop:"productChPowerFreq","show-overflow-tooltip":!0}}):t._e(),o("el-table-column",{attrs:{label:this.$t("hdl")+"(Kwh)",width:"220",align:"center",prop:"productChConsumption","show-overflow-tooltip":!0}}),"1"!=this.productType?o("el-table-column",{attrs:{label:this.$t("glys"),align:"center",prop:"productChPowerFactor","show-overflow-tooltip":!0}}):t._e(),o("el-table-column",{attrs:{label:this.$t("kqys")+"(S)",width:"140",sortable:"",prop:"firingInterval",align:"center","show-overflow-tooltip":!0}}),o("el-table-column",{attrs:{label:this.$t("gbys")+"(S)",width:"140",sortable:"",align:"center",prop:"closeInterval","show-overflow-tooltip":!0}}),o("el-table-column",{attrs:{fixed:"right",label:this.$t("zt"),align:"center",prop:"productChStatus"},scopedSlots:t._u([{key:"default",fn:function(e){return["0"==e.row.productChStatus?o("span",{staticStyle:{color:"red"}},[t._v(t._s(t.getDity(e.row,"productChStatus")))]):o("span",{staticStyle:{color:"green"}},[t._v(t._s(t.getDity(e.row,"productChStatus")))])]}}],null,!1,1956020816)}),o("el-table-column",{attrs:{fixed:"right",label:this.$t("cz"),align:"center",width:"100","class-name":"small-padding fixed-width"},scopedSlots:t._u([{key:"default",fn:function(e){return["0"==e.row.productChStatus?o("el-button",{attrs:{size:"mini",type:"text",icon:"el-icon-refresh"},on:{click:function(o){return t.handleCommand("channelopen",e.row)}}},[t._v(t._s(t.$t("dk")))]):t._e(),"1"==e.row.productChStatus?o("el-button",{attrs:{size:"mini",type:"text",icon:"el-icon-refresh"},on:{click:function(o){return t.handleCommand("channelclose",e.row)}}},[t._v(t._s(t.$t("gb")))]):t._e()]}}],null,!1,2394380253)}),o("el-table-column",{attrs:{fixed:"right",label:this.$t("pz"),align:"center",width:"100","class-name":"small-padding fixed-width"},scopedSlots:t._u([{key:"default",fn:function(e){return[o("el-button",{attrs:{size:"mini",type:"text",icon:"el-icon-edit"},on:{click:function(o){return t.handleUpdate(e.row)}}},[t._v(t._s(t.$t("xg")))])]}}],null,!1,2814199834)})],1)],1):t._e(),o("el-dialog",{attrs:{title:t.title,visible:t.open,width:"500px","close-on-click-modal":!1,"close-on-press-escape":!1,"append-to-body":""},on:{"update:visible":function(e){t.open=e}}},[o("el-form",{ref:"form",attrs:{model:t.form,"label-width":"150px"}},[o("el-form-item",{attrs:{label:this.$t("tdh"),prop:"productChId"}},[o("el-input",{attrs:{readonly:!0,disabled:!0},model:{value:t.form.productChId,callback:function(e){t.$set(t.form,"productChId",e)},expression:"form.productChId"}})],1),o("el-form-item",{attrs:{label:this.$t("tdmc"),prop:"productChName"}},[o("el-input",{model:{value:t.form.productChName,callback:function(e){t.$set(t.form,"productChName",e)},expression:"form.productChName"}})],1),"4"==this.productType?o("el-form-item",{attrs:{label:this.$t("sxxx")}},[o("el-select",{staticStyle:{width:"100%"},attrs:{"allow-create":"",clearable:"",filterable:""},model:{value:t.form.productPhOrder,callback:function(e){t.$set(t.form,"productPhOrder",e)},expression:"form.productPhOrder"}},t._l(t.productPhOrders,(function(e){return o("el-option",{key:e.id,attrs:{label:t.$t(e.name),value:e.id}})})),1)],1):t._e(),o("el-form-item",{attrs:{label:this.$t("tdfzlx")}},[o("el-select",{staticStyle:{width:"100%"},attrs:{"allow-create":"",clearable:"",filterable:""},model:{value:t.form.ChannelLoadType,callback:function(e){t.$set(t.form,"ChannelLoadType",e)},expression:"form.ChannelLoadType"}},t._l(t.channelLoadTypes,(function(e){return o("el-option",{key:e,attrs:{label:t.$t(e),value:e}})})),1)],1)],1),o("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[o("el-button",{attrs:{type:"primary"},on:{click:t.submitForm}},[t._v(t._s(t.$t("qd")))]),o("el-button",{on:{click:t.cancel}},[t._v(t._s(t.$t("qx")))])],1)],1),o("el-dialog",{attrs:{title:t.outTitle,visible:t.outOpen,width:"500px","close-on-click-modal":!1,"close-on-press-escape":!1,"append-to-body":""},on:{"update:visible":function(e){t.outOpen=e}}},[o("el-form",{ref:"outForm",attrs:{model:t.outForm,"label-width":"150px"}},[t._e(),t._e(),o("el-form-item",{attrs:{label:this.$t("sclx")}},[o("el-select",{staticStyle:{width:"100%"},attrs:{"allow-create":"",filterable:""},on:{change:t.handleSelectChange2},model:{value:t.outForm.outputType,callback:function(e){t.$set(t.outForm,"outputType",e)},expression:"outForm.outputType"}},t._l(t.outputTypes,(function(e){return o("el-option",{key:e.id,attrs:{label:t.$t(e.name),value:e.id}})})),1)],1),o("el-form-item",{attrs:{label:this.$t("sxxx")}},[o("el-select",{staticStyle:{width:"100%"},attrs:{disabled:t.disabled2,"allow-create":"",filterable:""},model:{value:t.outForm.productPhOrder,callback:function(e){t.$set(t.outForm,"productPhOrder",e)},expression:"outForm.productPhOrder"}},t._l(t.productPhOrders,(function(e){return o("el-option",{key:e.id,attrs:{label:t.$t(e.name),value:e.id}})})),1)],1)],1),o("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[o("el-button",{attrs:{type:"primary"},on:{click:t.submitForm1}},[t._v(t._s(t.$t("qd")))]),o("el-button",{on:{click:t.cancel1}},[t._v(t._s(t.$t("qx")))])],1)],1)],1)},l=[],n=(o("b0c0"),o("e9c4"),o("b64b"),o("8647")),a=o("7ba4"),i={name:"Online",data:function(){return{loading:!0,total:0,productList:[],channelList:[],title:"",open:!1,outTitle:"",outOpen:!1,form:{},outForm:{},channelLoadTypes:["kt","fwq","jhj","lyq","jsj","xsq","d","qt"],queryParams:{productChName:"",productId:"",productName:"",token:"",type:""},usertoken:"",productChStatuss:[{id:"0",name:"duank"},{id:"1",name:"jt"}],productPhOrders:[{id:"L1",name:"sxax"},{id:"L2",name:"sxbx"},{id:"L3",name:"sxcx"}],outputTypes:[{id:"1",name:"sx"},{id:"2",name:"dx"}],outputStatus:[{id:"1",name:"sc"},{id:"2",name:"bsc"}],productType:"",disabled2:!1}},mounted:function(){this.$bus.$on("CHANNEL_STATUS_MONITORING",this.onSocketMessageToChannel)},created:function(){this.usertoken=this.$store.state.user.usertoken,this.queryProductList()},methods:{handleSelectChange2:function(t){this.disabled2="1"==t},onclickOutType:function(t,e){this.outForm=JSON.parse(JSON.stringify(t)),this.outTitle=this.$t("pz"),"1"==t.outputType?this.disabled2=!0:this.disabled2=!1;var o="";if("2"==t.outputType){for(var r=e;r<e+2;r++){var l=this.channelList[r];if("1"==l.outputStatus){o=l.productPhOrder;break}}this.outForm.productPhOrder=o}this.outOpen=!0},objectSpanMethod:function(t){t.row,t.column;var e=t.rowIndex,o=t.columnIndex;if(0===o||1===o||2===o||8===o||9===o||10===o||11===o||12===o||13===o||14===o||15===o||16===o||17===o||18===o||19===o)return e%3===0?{rowspan:3,colspan:1}:{rowspan:0,colspan:0}},queryProductList:function(){var t=this,e={};e.token=this.usertoken,e.type="listSbRestartQuery",Object(a["e"])(e).then((function(e){t.productList=e.data,t.queryParams.productId=t.productList[0].productId,t.productType=t.productList[0].productType,t.handleQuery()})).catch((function(){}))},onSocketMessageToChannel:function(t){if(t.success){var e=t.data.data;null!=t.data&&""!=e&&null!=e&&(this.channelList=e)}},getDity:function(t,e){var o="",r="",l=[];"productChStatus"==e?(l=this.productChStatuss,r=t.productChStatus):"alarmStatus"==e?(l=this.alarmStatuss,r=t.alarmStatus):"connectionStatus"==e?(l=this.connectionStatuss,r=t.connectionStatus):"waterImmersionState"==e||"waterImmersionState"==e?(l=this.waterImmersionStates,r=t.waterImmersionState):"productPhOrders"==e?(l=this.productPhOrders,r=t.productPhOrder):"outputTypes"==e&&(l=this.outputTypes,r=t.outputType);for(var n=0;n<l.length;n++){var a=l[n];if(r==a.id)return o=a.name,this.$t(a.name)}return o},dataRefreh:function(){var t=this;setInterval((function(){t.queryChannelStatus()}),1e3)},queryChannelStatus:function(){var t=this;this.queryParams.token=this.usertoken,this.queryParams.type="listQuery",this.loading=!0;for(var e=0;e<this.productList.length;e++)this.queryParams.productId==this.productList[e].productId&&(this.productType=this.productList[e].productType);Object(a["c"])(this.queryParams).then((function(e){null!=e.data&&(t.channelList=e.data)})).catch((function(){})),this.loading=!1},queryChannelStatus11:function(){var t=this;this.queryParams.token=this.usertoken,this.queryParams.type="resetChannel",this.loading=!0;for(var e=0;e<this.productList.length;e++)this.queryParams.productId==this.productList[e].productId&&(this.productType=this.productList[e].productType);Object(a["c"])(this.queryParams).then((function(e){t.channelList=e.data})).catch((function(){})),this.loading=!1},handleUpdate:function(t){this.form=t,this.open=!0,this.title=this.$t("xg")},handleQuery:function(){this.queryChannelStatus()},resetQuery:function(){this.resetForm("queryForm"),this.handleQuery()},handleCommand:function(t,e){var o=this,r={};switch(r.token=this.usertoken,r.productChId=e.productChId,t){case"channelopen":r.type="open",this.$modal.confirm(this.$t("qrykqm")).then((function(){Object(a["c"])(r)})).then((function(){o.$modal.msgSuccess(o.$t("zxcg")),o.handleQuery()})).catch((function(){}));break;case"channelclose":r.type="close",this.$modal.confirm(this.$t("qrygbm")).then((function(){Object(a["c"])(r)})).then((function(){o.$modal.msgSuccess(o.$t("zxcg")),o.handleQuery()})).catch((function(){}));break;default:break}},submitForm:function(){var t=this;this.$refs["form"].validate((function(e){if(e){var o={};o.token=t.usertoken,o.type="save",o.productChName=t.form.productChName,o.productChId=t.form.productChId,o.productPhOrder=t.form.productPhOrder,o.ChannelLoadType=t.$t(t.form.ChannelLoadType),t.loading=!0,Object(a["c"])(o).then((function(e){t.open=!1,t.$modal.msgSuccess(t.$t("zxcg")),t.handleQuery()}))}}))},submitForm1:function(){var t=this;this.$refs["outForm"].validate((function(e){if(e){var o={};o.token=t.usertoken,o.type="threeTypeSave",o.productChName=t.outForm.productChName,o.productChId=t.outForm.productChId,o.productPhOrder=t.outForm.productPhOrder,o.outputType=t.outForm.outputType,t.loading=!0;var r=t;t.$modal.confirm(t.$t("qdybcm")).then((function(){Object(a["c"])(o).then((function(t){r.outOpen=!1,r.$modal.msgSuccess(r.$t("zxcg")),r.handleQuery()}))})).then((function(){})).catch((function(){}))}}))},cancel:function(){this.open=!1},cancel1:function(){this.outOpen=!1,this.handleQuery()},handleZtCommand:function(t,e){var o=this,r={};if(r.token=this.usertoken,r.productChId=e,""!=e)switch(t){case"open":r.type="open",this.$modal.confirm(this.$t("qrykqm2")).then((function(){Object(a["h"])(r)})).then((function(){o.$modal.msgSuccess(o.$t("zxcg")),o.handleQuery()})).catch((function(){}));break;case"close":r.type="close",this.$modal.confirm(this.$t("qrygbm2")).then((function(){Object(a["h"])(r)})).then((function(){o.$modal.msgSuccess(o.$t("zxcg")),o.handleQuery()})).catch((function(){}));break;default:break}else this.$modal.msgWarning(this.$t("qxz")+this.$t("shib"))},handleForceLogout:function(t){var e=this;this.$modal.confirm(this.$t("sfqztc")+t.userName+this.$t("yhm")).then((function(){return Object(n["a"])(t.tokenId)})).then((function(){e.getList(),e.$modal.msgSuccess(e.$t("qtcg"))})).catch((function(){}))}}},s=i,c=o("2877"),u=Object(c["a"])(s,r,l,!1,null,null,null);e["default"]=u.exports},8647:function(t,e,o){"use strict";o.d(e,"b",(function(){return l})),o.d(e,"a",(function(){return n}));var r=o("b775");function l(t){return Object(r["a"])({url:"/monitor/online/list",method:"get",params:t})}function n(t){return Object(r["a"])({url:"/monitor/online/"+t,method:"delete"})}}}]);