| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-e6cc3930"],{2035:function(t,e,o){},"5b1f":function(t,e,o){"use strict";o("2035")},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:{label:this.$t("sbmc"),prop:"productName"}}),t._e(),o("el-table-column",{attrs:{label:this.$t("sbbh"),prop:"productNumber"}}),o("el-table-column",{attrs:{label:this.$t("sblx"),prop:"productType","show-overflow-tooltip":!0}}),o("el-table-column",{attrs:{label:this.$t("bbh"),prop:"productVersion","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[o("el-button",{attrs:{size:"mini",type:"text",icon:"el-icon-setting"},on:{click:function(o){return t.handleImport(e.row)}}},[t._v(t._s(t.$t("gjsj")))])]}}])})],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)],1)},r=[],i=o("8647"),s=o("7ba4"),a={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"}}},created:function(){console.log(window.location.origin),this.usertoken=this.$store.state.user.usertoken,this.queryProductList(),this.handleQuery()},methods:{queryProductList:function(){var t=this,e={};e.token=this.usertoken,e.type="listSbWhQuery",Object(s["e"])(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){alert(22),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.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>"+t.msg+"</div>","导入结果",{dangerouslyUseHTMLString:!0}),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(s["e"])(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(s["e"])(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()},handleUpdate:function(t){this.form=t,this.open=!0,this.title=this.$t("gjsj")},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(s["j"])(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(i["a"])(t.tokenId)})).then((function(){e.getList(),e.$modal.msgSuccess(e.$t("qtcg"))})).catch((function(){}))}}},l=a,u=(o("5b1f"),o("2877")),c=Object(u["a"])(l,n,r,!1,null,null,null);e["default"]=c.exports},8647:function(t,e,o){"use strict";o.d(e,"b",(function(){return r})),o.d(e,"a",(function(){return i}));var n=o("b775");function r(t){return Object(n["a"])({url:"/monitor/online/list",method:"get",params:t})}function i(t){return Object(n["a"])({url:"/monitor/online/"+t,method:"delete"})}}}]);
|