| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-c44a84d2"],{"6d49":function(t,e,a){"use strict";a.r(e);var r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"app-container"},[a("el-form",{ref:"queryForm",attrs:{model:t.queryParams,size:"small",inline:!0,"label-width":"auto"}},[a("el-form-item",{attrs:{label:this.$t("sbmc"),prop:"productName"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{"allow-create":"",filterable:!1},model:{value:t.queryParams.productId,callback:function(e){t.$set(t.queryParams,"productId",e)},expression:"queryParams.productId"}},t._l(t.productList,(function(t){return a("el-option",{key:t.productId,attrs:{label:t.productName,value:t.productId}})})),1)],1),a("el-form-item",{attrs:{label:this.$t("rq"),prop:"startDate"}},[a("el-date-picker",{attrs:{clearable:"",type:"date","value-format":"yyyy-MM-dd"},model:{value:t.queryParams.setDate,callback:function(e){t.$set(t.queryParams,"setDate",e)},expression:"queryParams.setDate"}})],1),a("el-form-item",{attrs:{label:this.$t("tdmc"),prop:"productChName"}},[a("el-input",{attrs:{clearable:""},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.handleQuery(e)}},model:{value:t.queryParams.productChName,callback:function(e){t.$set(t.queryParams,"productChName",e)},expression:"queryParams.productChName"}})],1),a("el-form-item",{attrs:{label:this.$t("tdh"),prop:"productChId"}},[a("el-input",{attrs:{clearable:""},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.handleQuery(e)}},model:{value:t.queryParams.productChId,callback:function(e){t.$set(t.queryParams,"productChId",e)},expression:"queryParams.productChId"}})],1),a("el-form-item",[a("el-button",{attrs:{type:"primary",icon:"el-icon-search",size:"mini"},on:{click:t.handleQuery}},[t._v(t._s(t.$t("ss")))]),a("el-button",{attrs:{type:"primary",icon:"el-icon-plus",size:"mini"},on:{click:t.handleAdd}},[t._v(t._s(t.$t("xz")))])],1)],1),a("el-row",[a("el-col",{attrs:{span:14}},[a("el-card",{staticStyle:{"min-height":"700px","border-radius":"15px"}},[a("el-calendar",{scopedSlots:t._u([{key:"dateCell",fn:function(e){e.date;var r=e.data;return[a("el-popover",{attrs:{placement:"top-start",width:"240",trigger:"hover"}},[a("p",{class:t.rqi.indexOf(r.day)>-1?"is-selected":"",attrs:{slot:"reference"},on:{click:function(e){return t.handleBianJi(r.day)}},slot:"reference"},[t._v(" "+t._s(r.day.split("-").slice(1).join("-"))+" "),a("br"),a("a",{staticStyle:{overflow:"hidden","text-overflow":"ellipsis",display:"-webkit-box","-webkit-box-orient":"vertical","-webkit-line-clamp":"2"}},[t._v(" "+t._s(t.rqi.indexOf(r.day)>-1?t.rqineirong[r.day].productChName+"("+t.rqineirong[r.day].setStatuss+")":""))])]),t.rqi.indexOf(r.day)>-1?[a("div",{staticClass:"top-title",staticStyle:{"border-bottom":"1px solid #eee"}},[t._v(" "+t._s(t.$t("szxxxx"))+" ")]),a("div",{staticClass:"center-content",staticStyle:{margin:"10px 0","font-size":"14px"}},[a("div",{staticClass:"center-content-one"},[t._v(t._s(t.$t("tdh"))+":"+t._s(t.rqineirong[r.day].productChIds))]),a("div",{staticClass:"center-content-one"},[t._v(t._s(t.$t("tdmc"))+":"+t._s(t.rqineirong[r.day].productChNames))]),a("div",{staticClass:"center-content-one"},[t._v(t._s(t.$t("szsj"))+":"+t._s(t.rqineirong[r.day].setTimes))]),a("div",{staticClass:"center-content-one"},[t._v(t._s(t.$t("szzt"))+":"+t._s(t.rqineirong[r.day].setStatuss))])])]:t._e()],2)]}}])})],1)],1),a("el-col",{attrs:{span:10}},[a("el-card",{staticStyle:{"min-height":"700px","border-radius":"15px","margin-left":"10px"}},[a("el-button",{staticStyle:{"background-color":"#656B8B"},attrs:{type:"primary",icon:"el-icon-delete",size:"mini"},on:{click:t.handleDelete}},[t._v(t._s(t.$t("sc")))]),a("el-table",{staticStyle:{"overflow-y":"auto"},attrs:{"min-height":"700px",data:t.dsList,"header-cell-style":{background:"#FFFFFF",color:"#000000"}},on:{"selection-change":t.handleSelectionChange}},[a("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),a("el-table-column",{attrs:{label:this.$t("sbmc"),prop:"productChName",width:"100"}}),t._e(),t._e(),a("el-table-column",{attrs:{label:this.$t("rq"),prop:"setDate",width:"100"}}),a("el-table-column",{attrs:{label:this.$t("szsj"),prop:"setTime",width:"100"}}),a("el-table-column",{attrs:{label:this.$t("zt"),prop:"setStatus",width:"60"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.getDity(e.row,"setStatus","1")))])]}}])}),a("el-table-column",{attrs:{label:this.$t("cf"),prop:"triggerStatus",width:"90"},scopedSlots:t._u([{key:"default",fn:function(e){return["1"==e.row.triggerStatus?a("span",{staticStyle:{color:"green"}},[t._v(t._s(t.getDity(e.row,"triggerStatus","1")))]):a("span",[t._v(t._s(t.getDity(e.row,"triggerStatus","1")))])]}}])})],1)],1)],1)],1),a("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}}},[a("el-form",{ref:"form",attrs:{model:t.form,rules:t.rules,"label-width":"auto"}},[a("el-form-item",{attrs:{label:this.$t("td"),prop:"productChId"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{multiple:""},model:{value:t.form.productChId,callback:function(e){t.$set(t.form,"productChId",e)},expression:"form.productChId"}},t._l(t.channelList,(function(t){return a("el-option",{key:t.productChId,attrs:{label:t.productChName,value:t.productChId}})})),1)],1),a("el-form-item",{attrs:{label:this.$t("zt"),prop:"setStatus"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{"allow-create":"",filterable:!1},model:{value:t.form.setStatus,callback:function(e){t.$set(t.form,"setStatus",e)},expression:"form.setStatus"}},t._l(t.productChStatuss,(function(e){return a("el-option",{key:e.id,attrs:{label:t.$t(e.name),value:e.id}})})),1)],1),a("el-form-item",{attrs:{label:this.$t("el.datepicker.startDate"),prop:"startDate"}},[a("el-date-picker",{attrs:{clearable:"",type:"date","value-format":"yyyy-MM-dd"},model:{value:t.form.startDate,callback:function(e){t.$set(t.form,"startDate",e)},expression:"form.startDate"}})],1),a("el-form-item",{attrs:{label:this.$t("el.datepicker.endDate"),prop:"endDate"}},[a("el-date-picker",{attrs:{clearable:"",type:"date","value-format":"yyyy-MM-dd"},model:{value:t.form.endDate,callback:function(e){t.$set(t.form,"endDate",e)},expression:"form.endDate"}})],1),a("el-form-item",{attrs:{label:this.$t("sj"),prop:"channelTime"}},[a("el-time-picker",{attrs:{clearable:"",type:"time","value-format":"HH:mm:ss"},model:{value:t.form.channelTime,callback:function(e){t.$set(t.form,"channelTime",e)},expression:"form.channelTime"}})],1)],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"primary"},on:{click:t.submitForm}},[t._v(t._s(t.$t("qd")))]),a("el-button",{on:{click:t.cancel}},[t._v(t._s(t.$t("qx")))])],1)],1)],1)},n=[],s=(a("c740"),a("d81d"),a("14d9"),a("fb6a"),a("b0c0"),a("8647")),i=a("7ba4"),o={name:"Online",data:function(){return{loading:!0,total:0,channelList:[],dsList:[],title:"",open:!1,form:{productChId:"",productChName:"",dateTime:""},channelLoadTypes:["空调","服务器","交换机","路由器","计算机","显示器","灯","其他"],queryParams:{productChName:"",productChId:"",productId:"",token:"",type:""},usertoken:"",rqineirong:{},rqi:[],show:!1,productChStatuss:[{id:"0",name:"duank"},{id:"1",name:"jt"}],triggerStatuss:[{id:"0",name:"wcf"},{id:"1",name:"ycf"}],ids:[],productList:[],productType:"",rules:{productChId:[{required:!0,message:this.$i18n.t("td")+" "+this.$i18n.t("bnwk"),trigger:"blur"}],setStatus:[{required:!0,message:this.$i18n.t("zt")+" "+this.$i18n.t("bnwk"),trigger:"blur"}],startDate:[{required:!0,message:this.$i18n.t("el.datepicker.startDate")+" "+this.$i18n.t("bnwk"),trigger:"blur"}],endDate:[{required:!0,message:this.$i18n.t("el.datepicker.endDate")+" "+this.$i18n.t("bnwk"),trigger:"blur"}],channelTime:[{required:!0,message:this.$i18n.t("sj")+" "+this.$i18n.t("bnwk"),trigger:"blur"}]}}},created:function(){this.usertoken=this.$store.state.user.usertoken,this.queryProductList()},methods:{queryProductList:function(){var t=this,e={};e.token=this.usertoken,e.type="listSbRestartQuery",Object(i["e"])(e).then((function(e){null!=e.data&&(t.productList=e.data,t.productType=t.productList[0].productType,t.queryParams.productId=t.productList[0].productId,t.handleQuery())})).catch((function(){}))},handleSelectionChange:function(t){this.ids=t.map((function(t){return t.idx})),this.single=1!=t.length,this.multiple=!t.length},showText:function(){this.show=!0},getChannelDsList:function(){var t=this;this.show=!0,this.queryParams.token=this.usertoken,this.queryParams.type="listDsQuery",Object(i["j"])(this.queryParams).then((function(e){null!=e.data&&(t.dsList=e.data,t.queryParams.type="listRlQuery",Object(i["j"])(t.queryParams).then((function(e){if(null!=e.data){var a=e.data;t.rqineirong={},t.rqi=[];for(var r=0;r<a.length;r++){var n={};for(var s in a[r]){var i=s.slice(0,13);t.rqi.push(a[r][s]),n[i]=a[r][s]}t.rqineirong[a[r].setDates]=n}}})))}))},queryChannelStatus:function(){var t=this;this.queryParams.token=this.usertoken,this.queryParams.type="listQuery",this.loading=!0,Object(i["c"])(this.queryParams).then((function(e){if(null!=e.data)if("3"==t.productType){for(var a,r=[],n=function(){a=e.data[s];var t={};t.productChId=a.productChId,t.productChName=a.productChName;var n=r.findIndex((function(e){return e.productChId==t.productChId}));if(-1!=n)return 1;r.push(t)},s=0;s<e.data.length;s++)n();t.channelList=r}else t.channelList=e.data})).catch((function(){})),this.loading=!1},handleBianJi:function(t){var e=new Date,a=new Date(t+" 23:59:59");a>=e&&(this.form.startDate=t,this.form.endDate=t,this.open=!0,this.title=this.$t("xz"),this.queryChannelStatus())},handleAdd:function(t){this.form.channelDate=t,this.open=!0,this.title=this.$t("xz"),this.queryChannelStatus()},handleQuery:function(){this.getChannelDsList()},resetQuery:function(){this.resetForm("queryForm"),this.handleQuery()},handleCommand:function(t,e){var a=this,r={};switch(r.token=this.usertoken,r.productChId=e.productChId,t){case"channelopen":r.type="open",this.$modal.confirm(this.$t("qrykqm")).then((function(){Object(i["c"])(r)})).then((function(){a.$modal.msgSuccess(a.$t("zxcg"))})).catch((function(){}));break;case"channelclose":r.type="close",this.$modal.confirm(this.$t("qrygbm")).then((function(){Object(i["c"])(r)})).then((function(){a.$modal.msgSuccess(a.$t("zxcg"))})).catch((function(){}));break;default:break}},submitForm:function(){var t=this;this.$refs["form"].validate((function(e){if(e){var a={};a.token=t.usertoken,a.type="dsSave",a.productChName=t.form.productChName,a.productChId=t.form.productChId,a.setStatus=t.form.setStatus,a.startDate=t.form.startDate,a.endDate=t.form.endDate,a.channelTime=t.form.channelTime;var r=new Date,n=new Date(t.form.startDate+" "+t.form.channelTime),s=new Date(t.form.endDate+" "+t.form.channelTime);if(n<r||s<r)return void t.$modal.msgWarning(t.$t("xzrqygq"));if(n>s)return void t.$modal.msgWarning(t.$t("xzrqygq1"));t.loading=!0;var o=t;t.$modal.confirm(t.$t("qdybcm")).then((function(){Object(i["j"])(a).then((function(t){o.$modal.msgSuccess(o.$t("zxcg")),o.handleQuery(),o.cancel()}))})).then((function(){})).catch((function(){}))}}))},cancel:function(){this.open=!1,this.form={productChId:void 0,startDate:void 0,endDate:void 0,channelTime:void 0,setStatus:void 0},this.resetForm("form")},handleDelete:function(t){var e=this,a={};a.token=this.usertoken,a.type="deleteDs",a.idx=t.idx||this.ids,null!=a.idx&&""!=a.idx?this.$modal.confirm(this.$t("qdyscm")).then((function(){return Object(i["j"])(a)})).then((function(){e.handleQuery(),e.$modal.msgSuccess(e.$t("sccg"))})).catch((function(){})):this.$modal.alertWarning(this.$t("qxcsc"))},getDity:function(t,e,a){var r="",n="",s=[];"productChStatus"==e?(s=this.productChStatuss,n=t.productChStatus):"setStatus"==e?(s=this.productChStatuss,n="0"==a?t:t.setStatus):"alarmStatus"==e?(s=this.alarmStatuss,n=t.alarmStatus):"connectionStatus"==e?(s=this.connectionStatuss,n=t.connectionStatus):"waterImmersionState"==e||"waterImmersionState"==e?(s=this.waterImmersionStates,n=t.waterImmersionState):"triggerStatus"==e&&(s=this.triggerStatuss,n=t.triggerStatus);for(var i=0;i<s.length;i++){var o=s[i];if(n==o.id)return r=o.name,this.$t(o.name)}return r},handleForceLogout:function(t){var e=this;this.$modal.confirm(this.$t("sfqztc")+t.userName+this.$t("yhm")).then((function(){return Object(s["a"])(t.tokenId)})).then((function(){e.getList(),e.$modal.msgSuccess(e.$t("qtcg"))})).catch((function(){}))}}},l=o,c=a("2877"),u=Object(c["a"])(l,r,n,!1,null,null,null);e["default"]=u.exports},8647:function(t,e,a){"use strict";a.d(e,"b",(function(){return n})),a.d(e,"a",(function(){return s}));var r=a("b775");function n(t){return Object(r["a"])({url:"/monitor/online/list",method:"get",params:t})}function s(t){return Object(r["a"])({url:"/monitor/online/"+t,method:"delete"})}}}]);
|