chunk-5caa2fca.f00afcf7.js 25 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5caa2fca"],{"40f8":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-col",{staticClass:"card-box",attrs:{span:24}},[o("el-tabs",{attrs:{type:"card"},on:{"tab-click":t.handleClick},model:{value:t.tabName,callback:function(e){t.tabName=e},expression:"tabName"}},[o("el-tab-pane",{attrs:{label:this.$t("dylztyz"),name:"tab1"}},[o("el-card",{staticStyle:{"border-radius":"15px"}},[o("el-table",{attrs:{height:"600",data:t.powerThresholdList,"header-cell-style":{background:"#FFFFFF",color:"#000000"}}},[o("el-table-column",{attrs:{label:this.$t("dylx"),prop:"dyType","show-overflow-tooltip":!0},scopedSlots:t._u([{key:"default",fn:function(e){return[o("span",[t._v(t._s(t.getDity(e.row,"dyType")))])]}}])}),o("el-table-column",{attrs:{label:this.$t("mc"),prop:"productChName","min-width":t.getStringWidth(t.$t("mc"))}}),o("el-table-column",{attrs:{label:this.$t("bh"),prop:"productChId","show-overflow-tooltip":!0,"min-width":t.getStringWidth(t.$t("bh"))}}),t._e(),t._e(),t._e(),t._e(),t._e(),t._e(),o("el-table-column",{attrs:{label:this.$t("dlsxz")+"(A)","min-width":t.getStringWidth(t.$t("dlsxz")),prop:"currentUpperValue","show-overflow-tooltip":!0},scopedSlots:t._u([{key:"default",fn:function(e){return[o("span",{staticStyle:{color:"red"}},[t._v(t._s(e.row.currentUpperValue))])]}}])}),o("el-table-column",{attrs:{label:this.$t("dyasxxxz"),prop:"thresholdValue","min-width":t.getStringWidth(t.$t("dyasxxxz"))},scopedSlots:t._u([{key:"default",fn:function(e){return[o("span",[t._v(t._s(t.$t("zdz"))+":"),o("a",{staticStyle:{color:"red"}},[t._v(t._s(e.row.voltageUpperValue))]),t._v(" / "+t._s(t.$t("zxz"))+":"),o("a",{staticStyle:{color:"green"}},[t._v(t._s(e.row.voltageDownValue))])])]}}])}),o("el-table-column",{attrs:{label:this.$t("glsxz")+"(P)","min-width":t.getStringWidth(t.$t("glsxz")),prop:"powerUpperValue","show-overflow-tooltip":!0},scopedSlots:t._u([{key:"default",fn:function(e){return[o("span",{staticStyle:{color:"red"}},[t._v(t._s(e.row.powerUpperValue))])]}}])}),o("el-table-column",{attrs:{label:this.$t("hdlsxz")+"(kWh)",prop:"alarmContentUpperValue","min-width":t.getStringWidth(t.$t("hdlsxz")),"show-overflow-tooltip":!0},scopedSlots:t._u([{key:"default",fn:function(e){return[o("span",{staticStyle:{color:"red"}},[t._v(t._s(e.row.alarmContentUpperValue))])]}}])}),o("el-table-column",{attrs:{label:this.$t("zt"),prop:"productChStatus","min-width":t.getStringWidth(t.$t("zt")),"show-overflow-tooltip":!0},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")))])]}}])}),o("el-table-column",{attrs:{label:this.$t("cz"),align:"center","class-name":"small-padding fixed-width"},scopedSlots:t._u([{key:"default",fn:function(e){return[o("el-button",{attrs:{size:"mini",type:"text"},on:{click:function(o){return t.handleUpdate(e.row)}}},[t._v(t._s(t.$t("pz")))]),"0"==e.row.dyType?o("el-dropdown",{staticStyle:{"margin-left":"10px"},attrs:{size:"mini"},on:{command:function(o){return t.handleAllCommand(o,e.row)}}},[o("el-button",{staticStyle:{"margin-left":"10px"},attrs:{icon:"el-icon-d-arrow-right",size:"mini",type:"text"}},[t._v(t._s(t.$t("gd")))]),o("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[o("el-dropdown-item",{staticStyle:{"margin-left":"10px"},attrs:{command:"channelopen"}},[t._v(t._s(t.$t("dk")))]),o("el-dropdown-item",{staticStyle:{"margin-left":"10px"},attrs:{command:"channelclose"}},[t._v(t._s(t.$t("gb")))])],1)],1):t._e(),"0"==e.row.productChStatus&&"1"==e.row.dyType?o("el-button",{attrs:{size:"mini",type:"text"},on:{click:function(o){return t.handleCommand("channelopen",e.row)}}},[t._v(t._s(t.$t("dk")))]):t._e(),"1"==e.row.productChStatus&&"1"==e.row.dyType?o("el-button",{attrs:{size:"mini",type:"text"},on:{click:function(o){return t.handleCommand("channelclose",e.row)}}},[t._v(t._s(t.$t("gb")))]):t._e()]}}])})],1)],1)],1),o("el-tab-pane",{attrs:{label:this.$t("cgqlyz"),name:"tab2"}},[o("el-card",{staticStyle:{"border-radius":"15px"}},[o("el-table",{attrs:{height:"600",data:t.sensorThresholdList,"header-cell-style":{background:"#FFFFFF",color:"#000000"}}},[t._e(),o("el-table-column",{attrs:{label:this.$t("cgqxh"),prop:"sensorId","show-overflow-tooltip":!0,"min-width":t.getStringWidth(t.$t("mc"))}}),o("el-table-column",{attrs:{label:this.$t("cgqmc"),prop:"sensorName","show-overflow-tooltip":!0}}),t._e(),t._e(),o("el-table-column",{attrs:{label:t.$t("cgq")+" "+t.$t("lx"),prop:"sensorType",width:"140","show-overflow-tooltip":!0},scopedSlots:t._u([{key:"default",fn:function(e){return[o("span",[t._v(t._s(t.getDity(e.row,"sensorType")))])]}}])}),o("el-table-column",{attrs:{label:t.$t("yz")+" "+t.$t("lx"),prop:"thresholdType","min-width":t.getStringWidth(t.$t("mc"))}}),o("el-table-column",{attrs:{label:this.$t("ljzt"),align:"center",prop:"connectionStatus"},scopedSlots:t._u([{key:"default",fn:function(e){return["1"==e.row.connectionStatus?o("span",{staticStyle:{color:"red"}},[t._v(t._s(t.getDity(e.row,"connectionStatus")))]):o("span",{staticStyle:{color:"green"}},[t._v(t._s(t.getDity(e.row,"connectionStatus")))])]}}])}),o("el-table-column",{attrs:{label:this.$t("sznr"),align:"center",prop:"thresholdValue"},scopedSlots:t._u([{key:"default",fn:function(e){return[o("span",[t._v(t._s(t.$t("zdz"))+":"),o("a",{staticStyle:{color:"red"}},[t._v(t._s(e.row.thresholdUpperValue))]),t._v(" / "+t._s(t.$t("zxz"))+":"),o("a",{staticStyle:{color:"green"}},[t._v(t._s(e.row.thresholdDownValue))])])]}}])}),o("el-table-column",{attrs:{label:this.$t("dw"),align:"center",prop:"unit"}}),o("el-table-column",{attrs:{label:this.$t("cz"),align:"center","min-width":t.getStringWidth(t.$t("mc")),"class-name":"small-padding fixed-width"},scopedSlots:t._u([{key:"default",fn:function(e){return["0"==e.row.sensorType||"4"==e.row.sensorType||"5"==e.row.sensorType?o("el-button",{attrs:{size:"mini",type:"text",icon:"el-icon-edit"},on:{click:function(o){return t.sensorStatusUpdate(e.row)}}},[t._v(t._s(t.$t("pz")))]):t._e(),"1"==e.row.sensorType?o("el-button",{attrs:{size:"mini",type:"text",icon:"el-icon-refresh"},on:{click:function(o){return t.issueInstructionsReset(e.row)}}},[t._v(t._s(t.$t("fw")))]):t._e(),"3"==e.row.sensorType?o("el-button",{attrs:{size:"mini",type:"text",icon:"el-icon-refresh"},on:{click:function(o){return t.issueInstructionsRelease(e.row)}}},[t._v(t._s(t.$t("sf")))]):t._e(),"6"==e.row.sensorType&&"0"==e.row.connectionStatus?o("el-button",{attrs:{size:"mini",type:"text",icon:"el-icon-refresh"},on:{click:function(o){return t.sensorStatusHandleCommand("sensorStatusclose",e.row)}}},[t._v(t._s(t.$t("gb")))]):t._e(),"6"==e.row.sensorType&&"1"==e.row.connectionStatus?o("el-button",{attrs:{size:"mini",type:"text",icon:"el-icon-refresh"},on:{click:function(o){return t.sensorStatusHandleCommand("sensorStatusopen",e.row)}}},[t._v(t._s(t.$t("kq")))]):t._e()]}}])})],1)],1)],1)],1)],1),"3"!=t.productType?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":"auto"}},[o("el-row",{attrs:{span:22}},[o("el-col",[t._e(),t._e()],1),o("el-col",[o("el-form-item",{attrs:{label:this.$t("mc"),prop:"productChName"}},[o("el-input",{attrs:{disabled:!0,readonly:!0},model:{value:t.form.productChName,callback:function(e){t.$set(t.form,"productChName",e)},expression:"form.productChName"}})],1)],1),o("el-col",[t._e()],1),o("el-col",[o("el-form-item",{attrs:{label:this.$t("dlsxz")+"(A)",prop:"currentUpperValue"}},[o("el-input",{staticStyle:{width:"140px"},on:{blur:function(e){return t.blurRowPrice("dlsxz")}},model:{value:t.form.currentUpperValue,callback:function(e){t.$set(t.form,"currentUpperValue",e)},expression:"form.currentUpperValue"}}),o("el-select",{staticStyle:{width:"180px"},attrs:{"allow-create":"",clearable:"",filterable:""},model:{value:t.form.currentUpperAction,callback:function(e){t.$set(t.form,"currentUpperAction",e)},expression:"form.currentUpperAction"}},t._l(t.dzs,(function(e){return o("el-option",{key:e.id,attrs:{label:t.$t(e.name),value:e.id}})})),1)],1)],1),o("el-col",[o("el-form-item",{attrs:{label:this.$t("dysxz")+"(V)",prop:"voltageUpperValue"}},[o("el-input",{staticStyle:{width:"140px"},on:{blur:function(e){return t.blurRowPrice("dysxz")}},model:{value:t.form.voltageUpperValue,callback:function(e){t.$set(t.form,"voltageUpperValue",e)},expression:"form.voltageUpperValue"}}),o("el-select",{staticStyle:{width:"180px"},attrs:{"allow-create":"",clearable:"",filterable:""},model:{value:t.form.voltageUpperAction,callback:function(e){t.$set(t.form,"voltageUpperAction",e)},expression:"form.voltageUpperAction"}},t._l(t.dzs,(function(e){return o("el-option",{key:e.id,attrs:{label:t.$t(e.name),value:e.id}})})),1)],1)],1),o("el-col",[o("el-form-item",{attrs:{label:this.$t("dyxxz")+"(V)",prop:"voltageDownValue"}},[o("el-input",{staticStyle:{width:"140px"},on:{blur:function(e){return t.blurRowPrice("dyxxz")}},model:{value:t.form.voltageDownValue,callback:function(e){t.$set(t.form,"voltageDownValue",e)},expression:"form.voltageDownValue"}}),o("el-select",{staticStyle:{width:"180px"},attrs:{"allow-create":"",clearable:"",filterable:""},model:{value:t.form.voltageDownAction,callback:function(e){t.$set(t.form,"voltageDownAction",e)},expression:"form.voltageDownAction"}},t._l(t.dzs,(function(e){return o("el-option",{key:e.id,attrs:{label:t.$t(e.name),value:e.id}})})),1)],1)],1),o("el-col",[o("el-form-item",{attrs:{label:this.$t("glsxz")+"(W)",prop:"powerUpperValue"}},[o("el-input",{staticStyle:{width:"140px"},on:{blur:function(e){return t.blurRowPrice("glsxz")}},model:{value:t.form.powerUpperValue,callback:function(e){t.$set(t.form,"powerUpperValue",e)},expression:"form.powerUpperValue"}}),o("el-select",{staticStyle:{width:"180px"},attrs:{"allow-create":"",clearable:"",filterable:""},model:{value:t.form.powerUpperAction,callback:function(e){t.$set(t.form,"powerUpperAction",e)},expression:"form.powerUpperAction"}},t._l(t.dzs,(function(e){return o("el-option",{key:e.id,attrs:{label:t.$t(e.name),value:e.id}})})),1)],1)],1),o("el-col",[o("el-form-item",{attrs:{label:this.$t("hdlsxz")+"(Kwh)",prop:"alarmContentUpperValue"}},[o("el-input",{staticStyle:{width:"140px"},on:{blur:function(e){return t.blurRowPrice("hdlsxz")}},model:{value:t.form.alarmContentUpperValue,callback:function(e){t.$set(t.form,"alarmContentUpperValue",e)},expression:"form.alarmContentUpperValue"}}),o("el-select",{staticStyle:{width:"180px"},attrs:{"allow-create":"",clearable:"",filterable:""},model:{value:t.form.alarmContentUpperAction,callback:function(e){t.$set(t.form,"alarmContentUpperAction",e)},expression:"form.alarmContentUpperAction"}},t._l(t.dzs,(function(e){return o("el-option",{key:e.id,attrs:{label:t.$t(e.name),value:e.id}})})),1)],1)],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):t._e(),o("el-dialog",{attrs:{title:t.sensorStatusTitle,visible:t.sensorStatusOpen,width:"450px","append-to-body":""},on:{"update:visible":function(e){t.sensorStatusOpen=e}}},[o("el-form",{ref:"sensorStatusForm",attrs:{model:t.sensorStatusForm,"label-width":"auto"}},[o("el-row",{attrs:{span:22}},[o("el-col",[t._e(),t._e()],1),o("el-col",[o("el-form-item",{attrs:{label:this.$t("mc"),prop:"sensorName"}},[o("el-input",{attrs:{readonly:!0,disabled:!0},model:{value:t.sensorStatusForm.sensorName,callback:function(e){t.$set(t.sensorStatusForm,"sensorName",e)},expression:"sensorStatusForm.sensorName"}})],1)],1),o("el-col",[t._e()],1),o("el-col",[o("el-form-item",{attrs:{label:this.$t("cgq")+this.$t("lx"),prop:"sensorTypeName"}},[o("el-input",{attrs:{readonly:!0,disabled:!0},model:{value:t.sensorStatusForm.sensorTypeName,callback:function(e){t.$set(t.sensorStatusForm,"sensorTypeName",e)},expression:"sensorStatusForm.sensorTypeName"}})],1)],1),o("el-col",[o("el-form-item",{attrs:{label:t.$t("yz")+t.$t("lx"),prop:"thresholdType"}},[o("el-input",{attrs:{readonly:!0,disabled:!0},model:{value:t.sensorStatusForm.thresholdType,callback:function(e){t.$set(t.sensorStatusForm,"thresholdType",e)},expression:"sensorStatusForm.thresholdType"}})],1)],1),o("el-col",[o("el-form-item",{attrs:{label:this.$t("dw"),prop:"unit"}},[o("el-input",{attrs:{readonly:!0,disabled:!0},model:{value:t.sensorStatusForm.unit,callback:function(e){t.$set(t.sensorStatusForm,"unit",e)},expression:"sensorStatusForm.unit"}})],1)],1),o("el-col",[o("el-form-item",{attrs:{label:this.$t("zdz"),prop:"thresholdUpperValue"}},[o("el-input",{staticStyle:{width:"140px"},on:{blur:function(e){return t.blurRowPrice("zdz")}},model:{value:t.sensorStatusForm.thresholdUpperValue,callback:function(e){t.$set(t.sensorStatusForm,"thresholdUpperValue",e)},expression:"sensorStatusForm.thresholdUpperValue"}}),o("el-select",{staticStyle:{width:"180px"},attrs:{"allow-create":"",clearable:"",filterable:""},model:{value:t.sensorStatusForm.thresholdUpperAction,callback:function(e){t.$set(t.sensorStatusForm,"thresholdUpperAction",e)},expression:"sensorStatusForm.thresholdUpperAction"}},t._l(t.dzs,(function(e){return o("el-option",{key:e.id,attrs:{label:t.$t(e.name),value:e.id}})})),1)],1)],1),o("el-col",[o("el-form-item",{attrs:{label:this.$t("zxz"),prop:"thresholdDownValue"}},[o("el-input",{staticStyle:{width:"140px"},on:{blur:function(e){return t.blurRowPrice("zxz")}},model:{value:t.sensorStatusForm.thresholdDownValue,callback:function(e){t.$set(t.sensorStatusForm,"thresholdDownValue",e)},expression:"sensorStatusForm.thresholdDownValue"}}),o("el-select",{staticStyle:{width:"180px"},attrs:{"allow-create":"",clearable:"",filterable:""},model:{value:t.sensorStatusForm.thresholdDownAction,callback:function(e){t.$set(t.sensorStatusForm,"thresholdDownAction",e)},expression:"sensorStatusForm.thresholdDownAction"}},t._l(t.dzs,(function(e){return o("el-option",{key:e.id,attrs:{label:t.$t(e.name),value:e.id}})})),1)],1)],1)],1)],1),o("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[o("el-button",{attrs:{type:"primary"},on:{click:t.sensorStatusSubmitForm}},[t._v(t._s(t.$t("qd")))]),o("el-button",{on:{click:t.sensorStatusCancel}},[t._v(t._s(t.$t("qx")))])],1)],1)],1)},s=[],n=o("ade3"),a=(o("b0c0"),o("a9e3"),o("ac1f"),o("00b4"),o("7ba4")),l={name:"Online",data:function(){var t;return t={loading:!0,total:0,dateRange:[],powerThresholdList:[],sensorThresholdList:[],title:""},Object(n["a"])(Object(n["a"])(Object(n["a"])(Object(n["a"])(Object(n["a"])(Object(n["a"])(Object(n["a"])(Object(n["a"])(Object(n["a"])(Object(n["a"])(t,"total",0),"open",!1),"form",{}),"channelLoadTypes",["空调","服务器","交换机","路由器","计算机","显示器","灯","其他"]),"queryParams",{startTime:"",pageNum:1,pageSize:10,endTime:"",productChName:"",productChId:"",token:"",type:""}),"usertoken",""),"tabName","tab1"),"sensorStatusForm",{}),"sensorStatusOpen",!1),"sensorStatusTitle",""),Object(n["a"])(Object(n["a"])(Object(n["a"])(Object(n["a"])(Object(n["a"])(Object(n["a"])(Object(n["a"])(t,"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"}]),"dyTypes",[{id:"0",name:"shib"},{id:"1",name:"td"}]),"connectionStatuss",[{id:"0",name:"zx"},{id:"1",name:"lix"}]),"productChStatuss",[{id:"0",name:"duank"},{id:"1",name:"jt"}]),"dzs",[{id:"1",name:"gbtd"},{id:"2",name:"jbj"}]),"minValue",0),"productType","")},created:function(){this.usertoken=this.$store.state.user.usertoken,this.queryDeviceList(),this.handleQuery()},methods:{getStringWidth:function(t){var e="14px Arial",o=document.createElement("canvas"),r=o.getContext("2d");r.font=e;var s=r.measureText(t);return s.width+40},queryDeviceList:function(){var t=this,e={};e.token=this.usertoken,e.type="listSbRestartQuery",this.loading=!0,Object(a["e"])(e).then((function(e){null!=e.data?t.productType=e.data[0].productType:t.productType="3"})).catch((function(){})),this.loading=!1},blurRowPrice:function(t){var e=/^\d+(\.\d+)?$/;if("dysxz"==t){if(!e.test(this.form.voltageUpperValue))return void(this.form.voltageUpperValue=null);this.form.voltageUpperValue>99999&&(this.form.voltageUpperValue=99999);var o=this.form.voltageUpperValue,r=this.form.voltageDownValue;Number(o)<Number(r)&&(this.$modal.msgWarning(this.$t("zxzpd1")),this.form.voltageUpperValue=null)}else if("dyxxz"==t){if(!e.test(this.form.voltageDownValue))return void(this.form.voltageDownValue=null);this.form.voltageDownValue>99999&&(this.form.voltageDownValue=99999);var s=this.form.voltageUpperValue,n=this.form.voltageDownValue;Number(s)<Number(n)&&(this.$modal.msgWarning(this.$t("zxzpd2")),this.form.voltageDownValue=null)}else if("zxz"==t){if(!e.test(this.sensorStatusForm.thresholdDownValue))return void(this.sensorStatusForm.thresholdDownValue=null);this.sensorStatusForm.thresholdDownValue>99999&&(this.sensorStatusForm.thresholdDownValue=99999);var a=this.sensorStatusForm.thresholdDownValue,l=this.sensorStatusForm.thresholdUpperValue;Number(l)<Number(a)&&(this.$modal.msgWarning(this.$t("zxzpd3")),this.sensorStatusForm.thresholdDownValue=null)}else if("zdz"==t){if(!e.test(this.sensorStatusForm.thresholdUpperValue))return void(this.sensorStatusForm.thresholdUpperValue=null);this.sensorStatusForm.thresholdUpperValue>99999&&(this.sensorStatusForm.thresholdUpperValue=99999);a=this.sensorStatusForm.thresholdDownValue,l=this.sensorStatusForm.thresholdUpperValue;Number(l)<Number(a)&&(this.$modal.msgWarning(this.$t("zxzpd4")),this.sensorStatusForm.thresholdUpperValue=null)}else if("dlsxz"==t){if(!e.test(this.form.currentUpperValue))return void(this.form.currentUpperValue=null);if(this.form.currentUpperValue>99999)return void(this.form.currentUpperValue=99999)}else if("glsxz"==t){if(!e.test(this.form.powerUpperValue))return void(this.form.powerUpperValue=null);if(this.form.powerUpperValue>99999)return void(this.form.powerUpperValue=99999)}else if("hdlsxz"==t){if(!e.test(this.form.alarmContentUpperValue))return void(this.form.alarmContentUpperValue=null);if(this.form.alarmContentUpperValue>99999)return void(this.form.alarmContentUpperValue=99999)}},getDity:function(t,e){var o="",r="",s=[];"productChStatus"==e?(s=this.productChStatuss,r=t.productChStatus):"accessControlStatus"==e?(s=this.accessControlStatuss,r=t.accessControlStatus):"alarmStatus"==e?(s=this.alarmStatuss,r=t.alarmStatus):"connectionStatus"==e?(s=this.connectionStatuss,r=t.connectionStatus):"waterImmersionState"==e||"waterImmersionState"==e?(s=this.waterImmersionStates,r=t.waterImmersionState):"sensorType"==e?(s=this.sensorStatusTabs,r=t.sensorType):"dyType"==e&&(s=this.dyTypes,r=t.dyType);for(var n=0;n<s.length;n++){var a=s[n];if(r==a.id)return o=a.name,this.$t(a.name)}return o},handleUpdate:function(t){this.form=t,this.open=!0,this.title=this.$t("pz")},sensorStatusUpdate:function(t){this.sensorStatusForm=t;for(var e=0;e<this.sensorStatusTabs.length;e++){var o=this.sensorStatusTabs[e];t.sensorType==o.id&&(this.sensorStatusForm.sensorTypeName=this.$t(o.name))}this.sensorStatusOpen=!0,this.sensorStatusTitle=this.$t("pz")},issueInstructionsReset:function(t){var e=this,o={token:""};o.sensorId=t.sensorId,o.productId=t.productId,o.type="reset",this.$modal.confirm(this.$t("qryfwm")).then((function(){Object(a["i"])(o)})).then((function(){e.$modal.msgSuccess(e.$t("zxcg")),e.handleQuery()})).catch((function(){}))},issueInstructionsRelease:function(t){var e=this,o={token:""};o.sensorId=t.sensorId,o.productId=t.productId,o.type="release",this.$modal.confirm(this.$t("qrysfm")).then((function(){Object(a["i"])(o)})).then((function(){e.handleQuery(),e.$modal.msgSuccess(e.$t("zxcg"))})).catch((function(){}))},sensorStatusHandleCommand:function(t,e){var o=this,r={token:""};switch(r.sensorId=e.sensorId,r.productId=e.productId,t){case"sensorStatusopen":r.type="open",this.$modal.confirm(this.$t("qrykqm")).then((function(){Object(a["i"])(r)})).then((function(){o.$modal.msgSuccess(o.$t("zxcg")),o.handleQuery()})).catch((function(){}));break;case"sensorStatusclose":r.type="close",this.$modal.confirm(this.$t("qrygbm")).then((function(){Object(a["i"])(r)})).then((function(){o.$modal.msgSuccess(o.$t("zxcg")),o.handleQuery()})).catch((function(){}));break;default:break}},handleAllCommand:function(t,e){var o=this,r={};switch(r.token=this.usertoken,r.productChId=e.productChId,r.productId=e.productId,t){case"channelopen":r.type="open",this.$modal.confirm(this.$t("qrykqm")).then((function(){Object(a["h"])(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["h"])(r)})).then((function(){o.$modal.msgSuccess(o.$t("zxcg")),o.handleQuery()})).catch((function(){}));break;default:break}},handleCommand:function(t,e){var o=this,r={};switch(r.token=this.usertoken,r.productChId=e.productChId,r.productId=e.productId,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"))})).catch((function(){}));break;default:break}},getNowDateTime:function(t){var e=t.getFullYear(),o=t.getMonth()+1<10?"0"+(t.getMonth()+1):t.getMonth()+1,r=t.getDate()<10?"0"+t.getDate():t.getDate(),s=t.getHours()<10?"0"+t.getHours():t.getHours(),n=t.getMinutes()<10?"0"+t.getMinutes():t.getMinutes(),a=t.getSeconds()<10?"0"+t.getSeconds():t.getSeconds();return e+"-"+o+"-"+r+" "+s+":"+n+":"+a},handleClick:function(t,e){this.tabName=t.name,this.handleQuery()},queryChannelStatus:function(){var t=this;this.loading=!0,this.queryParams.token=this.usertoken,"tab1"==this.tabName?(this.queryParams.type="powerThresholdList",Object(a["a"])(this.queryParams).then((function(e){t.powerThresholdList=e.data})).catch((function(){}))):"tab2"==this.tabName&&(this.queryParams.type="sensorThresholdList",Object(a["a"])(this.queryParams).then((function(e){t.sensorThresholdList=e.data})).catch((function(){}))),this.loading=!1},handleQuery:function(){this.queryChannelStatus()},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.productId=t.form.productId,o.currentUpperValue=t.form.currentUpperValue,o.voltageUpperValue=t.form.voltageUpperValue,o.voltageDownValue=t.form.voltageDownValue,o.powerUpperValue=t.form.powerUpperValue,o.alarmContentUpperValue=t.form.alarmContentUpperValue,o.currentUpperAction=t.form.currentUpperAction,o.voltageUpperAction=t.form.voltageUpperAction,o.voltageDownAction=t.form.voltageDownAction,o.powerUpperAction=t.form.powerUpperAction,o.alarmContentUpperAction=t.form.alarmContentUpperAction;var r=t;t.loading=!0,t.$modal.confirm(t.$t("qdybcm")).then((function(){Object(a["a"])(o).then((function(t){r.open=!1,r.$modal.msgSuccess(r.$t("zxcg")),r.handleQuery()}))})).then((function(){t.open=!1})).catch((function(){}))}})),this.handleQuery()},cancel:function(){this.open=!1,this.queryChannelStatus()},sensorStatusSubmitForm:function(){var t=this;this.$refs["sensorStatusForm"].validate((function(e){if(e){var o={};if(o.token=t.usertoken,o.sensorType=t.sensorStatusForm.sensorType,o.thresholdType=t.sensorStatusForm.thresholdType,o.sensorId=t.sensorStatusForm.sensorId,o.sensorName=t.sensorStatusForm.sensorName,o.comSlogan=t.sensorStatusForm.comSlogan,o.thresholdUpperValue=t.sensorStatusForm.thresholdUpperValue+"",o.thresholdDownValue=t.sensorStatusForm.thresholdDownValue+"",o.thresholdUpperAction=t.sensorStatusForm.thresholdUpperAction,o.thresholdDownAction=t.sensorStatusForm.thresholdDownAction,o.connectionStatus=t.sensorStatusForm.connectionStatus,void 0!=t.sensorStatusForm.sensorId&&""!=t.sensorStatusForm.sensorId){t.loading=!0,o.type="update",o.productId=t.sensorStatusForm.productId;var r=t;t.$modal.confirm(t.$t("qdybcm")).then((function(){Object(a["a"])(o).then((function(t){r.loading=!1,r.sensorStatusOpen=!1,r.$modal.msgSuccess(r.$t("zxcg")),r.handleQuery()}))})).then((function(){})).catch((function(){}))}}}))},sensorStatusCancel:function(){this.sensorStatusOpen=!1,this.queryChannelStatus()},handleForceLogout:function(t){var e=this;this.$modal.confirm(this.$t("sfqztc")+t.userName+this.$t("yhm")).then((function(){return forceLogout(t.tokenId)})).then((function(){e.getList(),e.$modal.msgSuccess(e.$t("qtcg"))})).catch((function(){}))}}},i=l,u=(o("7f3f"),o("2877")),c=Object(u["a"])(i,r,s,!1,null,null,null);e["default"]=c.exports},4149:function(t,e,o){},"7f3f":function(t,e,o){"use strict";o("4149")}}]);