chunk-15d017e6.8551a04a.js 37 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-15d017e6"],{"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(),t._e(),t._e(),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),o("el-dialog",{attrs:{title:t.title,visible:t.open,width:t.dialogwidth,"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:"110px"},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:"110px"},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:"110px"},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:"110px"},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:"110px"},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),o("el-dialog",{attrs:{title:t.title1,visible:t.open1,width:t.dialogwidth,"close-on-click-modal":!1,"close-on-press-escape":!1,"append-to-body":""},on:{"update:visible":function(e){t.open1=e}}},[o("el-form",{ref:"form1",attrs:{model:t.form1,"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("td"),prop:"productChIds"}},[o("el-select",{staticStyle:{width:"100%"},attrs:{clearable:"",multiple:""},model:{value:t.form1.productChIds,callback:function(e){t.$set(t.form1,"productChIds",e)},expression:"form1.productChIds"}},[o("el-option",{attrs:{label:t.$t("qxuan"),value:t.$t("qxuan")},nativeOn:{click:function(e){return t.selectAll3()}}}),t._l(t.channelList,(function(t){return o("el-option",{key:t.productChId,attrs:{label:t.productChName,value:t.productChId}})}))],2)],1)],1),o("el-col",[o("el-form-item",{attrs:{label:this.$t("dlsxz")+"(A)",prop:"currentUpperValue"}},[o("el-input",{staticStyle:{width:"110px"},on:{blur:function(e){return t.blurRowPrice1("dlsxz")}},model:{value:t.form1.currentUpperValue,callback:function(e){t.$set(t.form1,"currentUpperValue",e)},expression:"form1.currentUpperValue"}}),o("el-select",{staticStyle:{width:"180px"},attrs:{"allow-create":"",clearable:"",filterable:""},model:{value:t.form1.currentUpperAction,callback:function(e){t.$set(t.form1,"currentUpperAction",e)},expression:"form1.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:"110px"},on:{blur:function(e){return t.blurRowPrice1("dysxz")}},model:{value:t.form1.voltageUpperValue,callback:function(e){t.$set(t.form1,"voltageUpperValue",e)},expression:"form1.voltageUpperValue"}}),o("el-select",{staticStyle:{width:"180px"},attrs:{"allow-create":"",clearable:"",filterable:""},model:{value:t.form1.voltageUpperAction,callback:function(e){t.$set(t.form1,"voltageUpperAction",e)},expression:"form1.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:"110px"},on:{blur:function(e){return t.blurRowPrice1("dyxxz")}},model:{value:t.form1.voltageDownValue,callback:function(e){t.$set(t.form1,"voltageDownValue",e)},expression:"form1.voltageDownValue"}}),o("el-select",{staticStyle:{width:"180px"},attrs:{"allow-create":"",clearable:"",filterable:""},model:{value:t.form1.voltageDownAction,callback:function(e){t.$set(t.form1,"voltageDownAction",e)},expression:"form1.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:"110px"},on:{blur:function(e){return t.blurRowPrice1("glsxz")}},model:{value:t.form1.powerUpperValue,callback:function(e){t.$set(t.form1,"powerUpperValue",e)},expression:"form1.powerUpperValue"}}),o("el-select",{staticStyle:{width:"180px"},attrs:{"allow-create":"",clearable:"",filterable:""},model:{value:t.form1.powerUpperAction,callback:function(e){t.$set(t.form1,"powerUpperAction",e)},expression:"form1.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:"110px"},on:{blur:function(e){return t.blurRowPrice1("hdlsxz")}},model:{value:t.form1.alarmContentUpperValue,callback:function(e){t.$set(t.form1,"alarmContentUpperValue",e)},expression:"form1.alarmContentUpperValue"}}),o("el-select",{staticStyle:{width:"180px"},attrs:{"allow-create":"",clearable:"",filterable:""},model:{value:t.form1.alarmContentUpperAction,callback:function(e){t.$set(t.form1,"alarmContentUpperAction",e)},expression:"form1.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.submitForm1}},[t._v(t._s(t.$t("qd")))]),o("el-button",{on:{click:t.cancel1}},[t._v(t._s(t.$t("qx")))])],1)],1),o("el-dialog",{attrs:{title:t.sensorStatusTitle,visible:t.sensorStatusOpen,width:t.dialogwidth,"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:"110px"},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:""},on:{change:t.handleSelectChange1},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),o("el-select",{staticStyle:{width:"180px"},attrs:{disabled:t.disabled1,clearable:"",multiple:""},model:{value:t.sensorStatusForm.thresholdUpperChanel,callback:function(e){t.$set(t.sensorStatusForm,"thresholdUpperChanel",e)},expression:"sensorStatusForm.thresholdUpperChanel"}},[o("el-option",{attrs:{label:t.$t("qxuan"),value:t.$t("qxuan")},nativeOn:{click:function(e){return t.selectAll()}}}),t._l(t.channelList,(function(t){return o("el-option",{key:t.productChId,attrs:{label:t.productChName,value:t.productChId}})}))],2)],1)],1),o("el-col",[o("el-form-item",{attrs:{label:this.$t("zxz"),prop:"thresholdDownValue"}},[o("el-input",{staticStyle:{width:"110px"},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:""},on:{change:t.handleSelectChange2},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),o("el-select",{staticStyle:{width:"180px"},attrs:{disabled:t.disabled2,clearable:"",multiple:""},model:{value:t.sensorStatusForm.thresholdDownChanel,callback:function(e){t.$set(t.sensorStatusForm,"thresholdDownChanel",e)},expression:"sensorStatusForm.thresholdDownChanel"}},[o("el-option",{attrs:{label:t.$t("qxuan"),value:t.$t("qxuan")},nativeOn:{click:function(e){return t.selectAll2()}}}),t._l(t.channelList,(function(t){return o("el-option",{key:t.productChId,attrs:{label:t.productChName,value:t.productChId}})}))],2)],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"),l=(o("a15b"),o("d81d"),o("14d9"),o("b0c0"),o("e9c4"),o("a9e3"),o("b64b"),o("d3b7"),o("ac1f"),o("00b4"),o("7ba4")),a=o("852e"),i=o.n(a),u={name:"Online",data:function(){var t;return t={loading:!0,total:0,dateRange:[],powerThresholdList:[],sensorThresholdList:[],title:"",title1:""},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),"open1",!1),"form",{}),"form1",{}),"channelLoadTypes",["空调","服务器","交换机","路由器","计算机","显示器","灯","其他"]),"queryParams",{startTime:"",pageNum:1,pageSize:10,endTime:"",productChName:"",productChId:"",token:"",type:""}),"usertoken",""),"tabName","tab1"),"sensorStatusForm",{}),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,"sensorStatusOpen",!1),"sensorStatusTitle",""),"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",""),"cookieslanguage",""),Object(n["a"])(Object(n["a"])(Object(n["a"])(Object(n["a"])(t,"dialogwidth","710px"),"channelList",[]),"disabled1",!1),"disabled2",!1)},mounted:function(){this.$bus.$on("CHANNEL_STATUS_MONITORING",this.onSocketMessageToChannel)},created:function(){this.usertoken=this.$store.state.user.usertoken,this.queryDeviceList(),this.handleQuery(),this.cookieslanguage=i.a.get("flowinnIotLanguage"),"zh-CN"==this.cookieslanguage&&(this.dialogwidth="600px")},methods:{onSocketMessageToChannel:function(t){if(t.success){var e=t.data,o=this.powerThresholdList;if(null!=t.data&&""!=e&&null!=e&&null!=o&&o.length>0){for(var r=0;r<e.length;r++)for(var s=e.data[r],n=0;n<o.length;n++){var l=o[r];if(s.productChId==l.productChId){l.productChStatus=s.productChStatus;break}}this.powerThresholdList=o}}},handleSelectChange1:function(t){this.disabled1="2"==t},handleSelectChange2:function(t){this.disabled2="2"==t},selectAll:function(){var t=this;this.sensorStatusForm.thresholdUpperChanel.length<this.channelList.length?(this.sensorStatusForm.thresholdUpperChanel=[],this.channelList.map((function(e){t.sensorStatusForm.thresholdUpperChanel.push(e.productChId)}))):this.sensorStatusForm.thresholdUpperChanel=[]},selectAll2:function(){var t=this;this.sensorStatusForm.thresholdDownChanel.length<this.channelList.length?(this.sensorStatusForm.thresholdDownChanel=[],this.channelList.map((function(e){t.sensorStatusForm.thresholdDownChanel.push(e.productChId)}))):this.sensorStatusForm.thresholdDownChanel=[]},selectAll3:function(){var t=this;this.form1.productChIds.length<this.channelList.length?(this.form1.productChIds=[],this.channelList.map((function(e){t.form1.productChIds.push(e.productChId)}))):this.form1.productChIds=[]},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(l["e"])(e).then((function(e){null!=e.data?t.productType=e.data[0].productType:t.productType="3";var o={type:"listQuery"};o.token=t.usertoken,o.productId=t.queryParams.productId,Object(l["c"])(o).then((function(e){if(null!=e.data){for(var o,r=[],s=function(){o=e.data[n];var t={};t.productChId=o.productChId,t.productChName=o.productChName;var s=r.some((function(e){return e.productChId===t.productChId}));s||r.push(t)},n=0;n<e.data.length;n++)s();t.channelList=r}})).catch((function(){}))})).catch((function(){})),this.loading=!1},blurRowPrice1:function(t){var e=/^\d+(\.\d+)?$/;if("dysxz"==t){if(!e.test(this.form1.voltageUpperValue))return void(this.form1.voltageUpperValue=null);this.form1.voltageUpperValue>99999&&(this.form1.voltageUpperValue=99999);var o=this.form1.voltageUpperValue,r=this.form1.voltageDownValue;Number(o)<Number(r)&&(this.$modal.msgWarning(this.$t("zxzpd1")),this.form1.voltageUpperValue=null)}else if("dyxxz"==t){if(!e.test(this.form1.voltageDownValue))return void(this.form1.voltageDownValue=null);this.form1.voltageDownValue>99999&&(this.form1.voltageDownValue=99999);var s=this.form1.voltageUpperValue,n=this.form1.voltageDownValue;Number(s)<Number(n)&&(this.$modal.msgWarning(this.$t("zxzpd2")),this.form1.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 l=this.sensorStatusForm.thresholdDownValue,a=this.sensorStatusForm.thresholdUpperValue;Number(a)<Number(l)&&(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);l=this.sensorStatusForm.thresholdDownValue,a=this.sensorStatusForm.thresholdUpperValue;Number(a)<Number(l)&&(this.$modal.msgWarning(this.$t("zxzpd4")),this.sensorStatusForm.thresholdUpperValue=null)}else if("dlsxz"==t){if(!e.test(this.form1.currentUpperValue))return void(this.form1.currentUpperValue=null);if(this.form1.currentUpperValue>99999)return void(this.form1.currentUpperValue=99999)}else if("glsxz"==t){if(!e.test(this.form1.powerUpperValue))return void(this.form1.powerUpperValue=null);if(this.form1.powerUpperValue>99999)return void(this.form1.powerUpperValue=99999)}else if("hdlsxz"==t){if(!e.test(this.form1.alarmContentUpperValue))return void(this.form1.alarmContentUpperValue=null);if(this.form1.alarmContentUpperValue>99999)return void(this.form1.alarmContentUpperValue=99999)}},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 l=this.sensorStatusForm.thresholdDownValue,a=this.sensorStatusForm.thresholdUpperValue;Number(a)<Number(l)&&(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);l=this.sensorStatusForm.thresholdDownValue,a=this.sensorStatusForm.thresholdUpperValue;Number(a)<Number(l)&&(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 l=s[n];if(r==l.id)return o=l.name,this.$t(l.name)}return o},handleUpdate:function(t){this.form=t,this.open=!0,this.title=this.$t("pz")},handleUpdate1:function(t){this.form1={};var e=this.channelList.map((function(t){return t.productChId}));this.$set(this.form1,"productChIds",e),this.open1=!0,this.title1=this.$t("pz")},sensorStatusUpdate:function(t){this.sensorStatusForm=JSON.parse(JSON.stringify(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))}null!=this.sensorStatusForm.thresholdUpperChanel&&void 0!=this.sensorStatusForm.thresholdUpperChanel&&(this.sensorStatusForm.thresholdUpperChanel=this.sensorStatusForm.thresholdUpperChanel.split(",")),null!=this.sensorStatusForm.thresholdDownChanel&&void 0!=this.sensorStatusForm.thresholdDownChanel&&(this.sensorStatusForm.thresholdDownChanel=this.sensorStatusForm.thresholdDownChanel.split(",")),this.handleSelectChange1(this.sensorStatusForm.thresholdUpperAction),this.handleSelectChange2(this.sensorStatusForm.thresholdDownAction),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(l["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(l["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(l["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(l["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(l["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(l["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(l["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(l["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(),l=t.getSeconds()<10?"0"+t.getSeconds():t.getSeconds();return e+"-"+o+"-"+r+" "+s+":"+n+":"+l},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(l["a"])(this.queryParams).then((function(e){t.powerThresholdList=e.data})).catch((function(){}))):"tab2"==this.tabName&&(this.queryParams.type="sensorThresholdList",Object(l["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(l["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()},submitForm1:function(){var t=this;this.$refs["form1"].validate((function(e){if(e){var o={};if(o.token=t.usertoken,o.type="batchSave",null==t.form1.productChIds||void 0==t.form1.productChIds||""==t.form1.productChIds)return void t.$modal.msgWarning(t.$t("td")+" "+t.$i18n.t("bnwk"));o.productChIds=t.form1.productChIds.join(","),o.productId=t.form1.productId,o.currentUpperValue=t.form1.currentUpperValue,o.voltageUpperValue=t.form1.voltageUpperValue,o.voltageDownValue=t.form1.voltageDownValue,o.powerUpperValue=t.form1.powerUpperValue,o.alarmContentUpperValue=t.form1.alarmContentUpperValue,o.currentUpperAction=t.form1.currentUpperAction,o.voltageUpperAction=t.form1.voltageUpperAction,o.voltageDownAction=t.form1.voltageDownAction,o.powerUpperAction=t.form1.powerUpperAction,o.alarmContentUpperAction=t.form1.alarmContentUpperAction;var r=t;t.loading=!0,t.$modal.confirm(t.$t("qdybcm")).then((function(){Object(l["a"])(o).then((function(t){r.$modal.msgSuccess(r.$t("zxcg")),r.open1=!1,r.handleQuery()}))})).then((function(){})).catch((function(){}))}})),this.handleQuery()},cancel1:function(){this.open1=!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,null!=t.sensorStatusForm.thresholdUpperChanel&&t.sensorStatusForm.thresholdUpperChanel.length>0&&(o.thresholdUpperChanel=t.sensorStatusForm.thresholdUpperChanel.join(",")),null!=t.sensorStatusForm.thresholdDownChanel&&t.sensorStatusForm.thresholdDownChanel.length>0&&(o.thresholdDownChanel=t.sensorStatusForm.thresholdDownChanel.join(",")),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(l["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(){}))}}},c=u,p=(o("976a"),o("2877")),h=Object(p["a"])(c,r,s,!1,null,null,null);e["default"]=h.exports},6170:function(t,e,o){},"976a":function(t,e,o){"use strict";o("6170")}}]);