(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5326cdac"],{"7b35":function(t,e,i){},8647:function(t,e,i){"use strict";i.d(e,"b",(function(){return o})),i.d(e,"a",(function(){return n}));var a=i("b775");function o(t){return Object(a["a"])({url:"/monitor/online/list",method:"get",params:t})}function n(t){return Object(a["a"])({url:"/monitor/online/"+t,method:"delete"})}},"8bb5":function(t,e,i){"use strict";i.r(e);var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"app-container"},[i("el-form",{ref:"queryForm",attrs:{model:t.queryParams,size:"small",inline:!0,"label-width":"auto"}},[i("el-form-item",{staticStyle:{width:"400px"},attrs:{label:this.$t("kzbgj"),prop:"fileName"}},[i("el-input",{staticStyle:{width:"300px"},attrs:{readonly:!0,disabled:!0},model:{value:t.fileName,callback:function(e){t.fileName=e},expression:"fileName"}})],1),i("el-form-item",[i("el-button",{staticStyle:{"border-radius":"10px","background-color":"#0E35FF","margin-left":"10px"},attrs:{type:"primary","min-width":t.getStringWidth(t.$t("gjxz"))},on:{click:t.handleImport}},[t._v(t._s(t.$t("gjxz")))]),i("el-button",{staticStyle:{"border-radius":"10px","background-color":"#0E35FF","margin-left":"10px"},attrs:{type:"primary","min-width":t.getStringWidth(t.$t("plsj"))},on:{click:t.handleUpdateAll}},[t._v(t._s(t.$t("plsj")))])],1)],1),i("el-card",{staticStyle:{"min-height":"700px","border-radius":"15px"}},[i("el-table",{ref:"multipleTable",attrs:{"max-height":"700",data:t.channelList,"header-cell-style":{background:"#FFFFFF",color:"#000000"}},on:{"selection-change":t.handleSelectionChange}},[i("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),i("el-table-column",{attrs:{align:"center",label:this.$t("sbmc"),prop:"productName"}}),i("el-table-column",{attrs:{align:"center",label:"产品ID",prop:"productId"}}),i("el-table-column",{attrs:{align:"center",label:this.$t("kzbh"),prop:"productNumber"}}),i("el-table-column",{attrs:{align:"center",label:this.$t("tdsl"),prop:"productChNumber","show-overflow-tooltip":!0}}),i("el-table-column",{attrs:{align:"center",label:this.$t("gjbbh"),prop:"productVersion","show-overflow-tooltip":!0}}),i("el-table-column",{attrs:{align:"center",label:this.$t("sjrq"),prop:"upgradeDate","show-overflow-tooltip":!0}}),i("el-table-column",{attrs:{align:"center",label:this.$t("dqzt"),prop:"status","show-overflow-tooltip":!0},scopedSlots:t._u([{key:"default",fn:function(e){return["0"==e.row.status?i("span",{staticStyle:{color:"red"}},[t._v(t._s(t.getDity(e.row,"status")))]):"1"==e.row.status?i("span",{staticStyle:{color:"green"}},[t._v(t._s(t.getDity(e.row,"status")))]):i("span",{staticStyle:{color:"#FFD966"}},[t._v(t._s(t.getDity(e.row,"status")))])]}}])}),i("el-table-column",{attrs:{label:this.$t("cz"),align:"center","class-name":"smfirmwareDateall-padding fixed-width"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("el-button",{attrs:{size:"mini",type:"text"},on:{click:function(i){return t.handleUpdate(e.row)}}},[t._v(t._s(t.$t("sej")))])]}}])})],1)],1),i("el-dialog",{attrs:{title:t.upload.title,visible:t.upload.open,width:"400px","close-on-click-modal":!1,"close-on-press-escape":!1,"append-to-body":""},on:{"update:visible":function(e){return t.$set(t.upload,"open",e)}}},[i("el-form",{ref:"form",staticClass:"left-align-form",attrs:{model:t.form,"label-width":"auto"}},[i("el-form-item",{staticStyle:{display:"none"},attrs:{label:"设备id:",prop:"productId"}},[i("el-input",{attrs:{readonly:!0,disabled:!0},model:{value:t.form.productId,callback:function(e){t.$set(t.form,"productId",e)},expression:"form.productId"}})],1)],1),i("el-upload",{ref:"upload",attrs:{limit:1,action:t.upload.url+"?productId="+this.productId+"&type=importData&token="+this.usertoken,accept:".bin, .hex",disabled:t.upload.isUploading,"on-change":t.beforeUpload,"on-progress":t.handleFileUploadProgress,"on-success":t.handleFileSuccess,"auto-upload":!1,drag:""}},[i("i",{staticClass:"el-icon-upload"}),i("div",{staticClass:"el-upload__text"},[t._v(t._s(t.$t("drts"))),i("em",[t._v(t._s(t.$t("djsc")))])]),i("div",{staticClass:"el-upload__tip text-center",attrs:{slot:"tip"},slot:"tip"},[i("span",[t._v(t._s(t.$t("jyxdr"))+"bin、hex"+t._s(t.$t("gswj"))+"。")])])]),i("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{attrs:{type:"primary"},on:{click:t.submitFileForm}},[t._v(t._s(t.$t("qd")))]),i("el-button",{on:{click:t.cancel}},[t._v(t._s(t.$t("qx")))])],1)],1),i("el-dialog",{staticClass:"dialogClass",staticStyle:{"overflow-y":"auto"},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}}},[i("el-col",{staticStyle:{height:"500px","overflow-y":"auto"}},[i("el-card",[i("el-collapse",{attrs:{accordion:""},model:{value:t.activeNames,callback:function(e){t.activeNames=e},expression:"activeNames"}},t._l(t.hisData,(function(e,a){return i("el-collapse-item",{attrs:{name:a,title:e.productVersion+" - "+e.versionDate}},[i("li",[t._v(t._s(e.updateContent))])])})),1)],1)],1)],1)],1)},o=[],n=(i("a15b"),i("d81d"),i("b0c0"),i("8647")),l=i("7ba4"),s={name:"Online",data:function(){return{loading:!0,total:0,channelList:[],title:"",open:!1,sortnoOpen:!1,form:{},sortnoForm:{},modes:["开启","关闭"],queryParams:{productName:"",productNumber:"",token:"",type:""},usertoken:"",tableData:[],tableProps:[{prop:"sortno",isShow:!0,label:"序号",width:"55",minWidth:"100",align:"center",type:"index"},{prop:"productChId",isShow:!0,label:"通道号",width:"150",minWidth:"100",align:"center",type:"index"},{prop:"productChName",isShow:!0,label:"通道名称",width:"",minWidth:"100",align:"center"},{prop:"status",isShow:!0,label:"状态",width:"",minWidth:"100",align:"center"}],productList:[],upload:{open:!1,title:"",isUploading:!1,url:window.location.origin+"/pdu/controlBoardUpgradeUpload"},productChTypes:[{id:"1",name:"sblx1"},{id:"2",name:"sblx2"},{id:"3",name:"sblx3"},{id:"4",name:"sblx4"},{id:"5",name:"sblx5"}],statuss:[{id:"0",name:"lix"},{id:"1",name:"zx"},{id:"2",name:"sjz"}],hisData:[],activeNames:[],productId:"",file:null,fileName:"",validate:""}},mounted:function(){this.$bus.$on("CONTROL_BOARD_UPGRADE",this.onSocketMessageToUpgrade)},created:function(){console.log(window.location.origin),this.usertoken=this.$store.state.user.usertoken,this.handleQuery()},methods:{onSocketMessageToUpgrade:function(t){if(t.success){var e=t.data.data;null!=t.data&&""!=e&&null!=e&&(this.channelList=e)}},handleSelectionChange:function(t){var e=t.map((function(t){return t.productId}));this.productId=e.join(",")},getStringWidth:function(t){var e="14px Arial",i=document.createElement("canvas"),a=i.getContext("2d");a.font=e;var o=a.measureText(t);return o.width+40},getDity:function(t,e){var i="",a="",o=[];"status"==e&&(o=this.statuss,a=t.status);for(var n=0;n