| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-9555f466"],{8470:function(t,e,o){"use strict";o.r(e);var n=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":"auto"}},[o("el-form-item",{attrs:{label:this.$t("sbmc"),prop:"productName"}},[o("el-select",{staticStyle:{width:"100%"},attrs:{clearable:""},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.handleQuery}},[t._v(t._s(t.$t("ss")))])],1)],1),o("el-card",{staticStyle:{"min-height":"700px","border-radius":"15px"}},[o("el-table",{attrs:{"max-height":"700",data:t.channelList,"header-cell-style":{background:"#FFFFFF",color:"#000000"}}},[o("el-table-column",{attrs:{align:"center",label:this.$t("sbmc"),prop:"productName"}}),t._e(),o("el-table-column",{attrs:{align:"center",label:this.$t("sbbh"),prop:"productNumber"}}),o("el-table-column",{attrs:{align:"center",label:this.$t("sblx"),prop:"productTypeName","show-overflow-tooltip":!0}}),o("el-table-column",{attrs:{align:"center",label:this.$t("gjbbh"),prop:"productVersion","show-overflow-tooltip":!0}}),o("el-table-column",{attrs:{align:"center",label:this.$t("gjrq"),prop:"firmwareDate","show-overflow-tooltip":!0}}),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[t.$store.state.user.urseRoles.includes("1")?o("el-button",{attrs:{size:"mini",type:"text"},on:{click:function(o){return t.handleImport(e.row)}}},[t._v(t._s(t.$t("gjsj")))]):t._e(),o("el-button",{attrs:{size:"mini",type:"text"},on:{click:function(o){return t.handleHis(e.row)}}},[t._v(t._s(t.$t("bbls")))])]}}])})],1)],1),o("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)}}},[o("el-form",{ref:"form",staticClass:"left-align-form",attrs:{model:t.form,"label-width":"auto"}},[o("el-form-item",{staticStyle:{display:"none"},attrs:{label:"设备id:",prop:"productId"}},[o("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),o("el-form-item",{staticStyle:{display:"none"},attrs:{label:this.$t("sbbh"),prop:"productNumber"}},[o("el-input",{attrs:{readonly:!0,disabled:!0},model:{value:t.form.productNumber,callback:function(e){t.$set(t.form,"productNumber",e)},expression:"form.productNumber"}})],1),o("el-form-item",{attrs:{label:this.$t("bbh"),prop:"productVersion"}},[o("el-input",{model:{value:t.form.productVersion,callback:function(e){t.$set(t.form,"productVersion",e)},expression:"form.productVersion"}})],1)],1),o("el-upload",{ref:"upload",attrs:{limit:1,action:t.upload.url+"?productNumber="+t.form.productNumber+"&productVersion="+t.form.productVersion+"&uploadType=gjsj&type=importData&token="+this.usertoken,disabled:t.upload.isUploading,"on-progress":t.handleFileUploadProgress,"on-success":t.handleFileSuccess,"auto-upload":!1,drag:""}},[o("i",{staticClass:"el-icon-upload"}),o("div",{staticClass:"el-upload__text"},[t._v(t._s(t.$t("drts"))),o("em",[t._v(t._s(t.$t("djsc")))])]),o("div",{staticClass:"el-upload__tip text-center",attrs:{slot:"tip"},slot:"tip"},[o("span",[t._v(t._s(t.$t("bcts")))])])]),o("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[o("el-button",{attrs:{type:"primary"},on:{click:t.submitFileForm}},[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",{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}}},[o("el-col",{staticStyle:{height:"500px","overflow-y":"auto"}},[o("el-card",[o("el-collapse",{attrs:{accordion:""},model:{value:t.activeNames,callback:function(e){t.activeNames=e},expression:"activeNames"}},t._l(t.hisData,(function(e,n){return o("el-collapse-item",{attrs:{name:n,title:e.productVersion+" - "+e.versionDate}},[o("li",{staticStyle:{"white-space":"pre-line"}},[t._v(t._s(e.updateContent))])])})),1)],1)],1)],1)],1)},i=[],a=(o("14d9"),o("b0c0"),o("ac1f"),o("5319"),o("8647")),r=o("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/equipmentMintenanceUpload"},productChTypes:[{id:"1",name:"sblx1"},{id:"2",name:"sblx2"},{id:"3",name:"sblx3"},{id:"4",name:"sblx4"},{id:"5",name:"sblx5"}],hisData:[],activeNames:[]}},created:function(){console.log(window.location.origin),this.usertoken=this.$store.state.user.usertoken,this.queryProductList(),this.handleQuery()},methods:{getDity:function(t,e){var o="",n="",i=[];"productType"==e&&(i=this.productChTypes,n=t.productType);for(var a=0;a<i.length;a++){var r=i[a];if(n==r.id)return o=r.name,this.$t(r.name)}return o},queryProductList:function(){var t=this,e={};e.token=this.usertoken,e.type="listSbWhQuery",Object(r["f"])(e).then((function(e){t.productList=e.data})).catch((function(){}))},handleImport:function(t){this.upload.title=this.$t("gjsj"),this.upload.open=!0,this.form=t},beforeUpload:function(t){null==t&&this.$modal.msgSuccess(this.$t("zxcg"))},handleFileUploadProgress:function(t,e,o){this.upload.isUploading=!0},handleFileSuccess:function(t,e,o){this.upload.open=!1,this.upload.isUploading=!1,this.$refs.upload.clearFiles(),this.$modal.alert(t.msg),this.handleQuery()},submitFileForm:function(){this.$refs.upload.submit()},handleAdd:function(){this.sortnoOpen=!0},handleCommand:function(t,e){var o={};switch(o.token=this.usertoken,o.productId=e.productId,o.productNumber=e.productNumber,t){case"channelopen":o.type="sBRestart",this.$modal.confirm(this.$t("qdycqm")).then((function(){Object(r["f"])(o)})).then((function(){})).catch((function(){}));break;default:break}},queryChannelStatus:function(){var t=this;this.queryParams.token=this.usertoken,this.queryParams.type="listSbWhQuery",this.loading=!0,Object(r["f"])(this.queryParams).then((function(e){t.channelList=e.data})).catch((function(){})),this.loading=!1},handleQuery:function(){this.queryChannelStatus()},resetQuery:function(){this.resetForm("queryForm"),this.handleQuery()},handleHis:function(t){var e=this;this.form=t;var o={};o.token=this.usertoken,o.type="listRtHisQuery",o.productId=t.productId,this.loading=!0,Object(r["f"])(o).then((function(t){if(null!=t.data){for(var o=[],n=0;n<t.data.length;n++){var i=t.data[n];i.updateContent=i.updateContent.replace(/<br>/g,"\n"),o.push(i)}e.hisData=o}})).catch((function(){})),this.loading=!1,this.open=!0,this.title=this.$t("bbls"),this.activeNames=[0]},submitForm:function(){var t=this;this.$refs["form"].validate((function(e){if(e){var o={};o.token=t.usertoken,o.type="sXTimeSave",o.productChName=t.form.productChName,o.productChId=t.form.productChId,o.firingInterval=t.form.firingInterval,o.closeInterval=t.form.closeInterval,o.productId=t.form.productId,t.loading=!0,t.$modal.confirm(t.$t("qdybcm")).then((function(){var t=this;Object(r["k"])(o).then((function(e){t.open=!1,t.queryChannelStatus()}))})).then((function(){t.open=!1})).catch((function(){}))}}))},cancel:function(){this.upload.open=!1,this.handleQuery()},handleForceLogout:function(t){var e=this;this.$modal.confirm(this.$t("sfqztc")+t.userName+this.$t("yhm")).then((function(){return Object(a["a"])(t.tokenId)})).then((function(){e.getList(),e.$modal.msgSuccess(e.$t("qtcg"))})).catch((function(){}))}}},l=s,c=(o("dac6"),o("2877")),u=Object(c["a"])(l,n,i,!1,null,null,null);e["default"]=u.exports},8647:function(t,e,o){"use strict";o.d(e,"b",(function(){return i})),o.d(e,"a",(function(){return a}));var n=o("b775");function i(t){return Object(n["a"])({url:"/monitor/online/list",method:"get",params:t})}function a(t){return Object(n["a"])({url:"/monitor/online/"+t,method:"delete"})}},a4cc:function(t,e,o){},dac6:function(t,e,o){"use strict";o("a4cc")}}]);
|