chunk-b5174be2.82ae1c17.js 8.0 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-b5174be2"],{"40b8":function(t,e,n){},"4eac":function(t,e,n){"use strict";n("d368")},"79a6":function(t,e,n){"use strict";n.r(e);var s=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticStyle:{width:"100%"}},[t._v(" 3323232 "),n("div",{ref:"sbCgqRefGl",staticStyle:{height:"310px",width:"100%","min-width":"600px"}})])},o=[],a=(n("4de4"),n("14d9"),n("b0c0"),n("d3b7"),n("7ba4")),i=n("313e"),r={name:"Server",data:function(){return{server:[],totalStatus:{},channelList:[],title:"",total:0,sensorStatusTitle:"",open:!1,data:{},form:{},sensorStatusForm:{},channelLoadTypes:["空调","服务器","交换机","路由器","计算机","显示器","灯","其他"],activeName:"0",sensorStatusOpen:!1,sensorStatusList:[],sensorStatusALLList:[],queryParams:{startTime:"",endTime:"",sensorType:"",token:"",type:""},tabParams:{sensorName:""},usertoken:"",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"}],waterImmersionStates:[{id:"0",name:"qr"},{id:"1",name:"wqr"}],accessControlStatuss:[{id:"0",name:"sb"},{id:"1",name:"sf"}],alarmStatuss:[{id:"0",name:"bj"},{id:"1",name:"wbj"}],connectionStatuss:[{id:"0",name:"zx"},{id:"1",name:"lix"}]}},props:["msg"],mounted:function(){this.data=this.msg,console.log("______>"),console.log(this.data)},created:function(){},methods:{querySensorStatusMonitoring:function(){var t=this;this.queryParams.token=this.usertoken,this.queryParams.type="listHisQuery",this.queryParams.sensorType=this.activeName,Object(a["j"])(this.queryParams).then((function(e){if(t.sensorStatusList=e.data,"0"==t.activeName||"4"==t.activeName||"5"==t.activeName)for(var n=0;n<1;n++){for(var s=t.sensorStatusList[n],o=s.typeData,a=[],i=[],r=0;r<o.length;r++){var c=o[r],u={},h={};h.name=c.typeName,h.icon="circle",i.push(h),u.name=c.typeName,u.smooth=!0,u.showSymbol=!1,u.type="line",u.data=c.ydata,u.color="#09BC3C",a.push(u)}var m=s.xAxis,l="";t.echartCgq(i,m,a,l,n)}t.sensorStatusALLList=e.data,t.total=t.sensorStatusList.length})).catch((function(){}))},echartCgq:function(t,e,n,s,o){var a={tooltip:{trigger:"axis"},legend:{data:t},xAxis:{name:"T",type:"category",boundaryGap:!1,data:e},yAxis:{name:s,type:"value",splitLine:{lineStyle:{type:"dashed",color:"#ddd",width:1,dashPattern:[4,4]}},axisLabel:{formatter:"{value}"}},series:n};console.log("执行图片渲染"),i["init"](this.$refs.sbCgqRefGl).setOption(a),console.log("执行图片渲染chengg ")},getDity:function(t,e){var n="",s="",o=[];"accessControlStatus"==e?(o=this.accessControlStatuss,s=t.accessControlStatus):"alarmStatus"==e?(o=this.alarmStatuss,s=t.alarmStatus):"connectionStatus"==e?(o=this.connectionStatuss,s=t.connectionStatus):("waterImmersionState"==e||"waterImmersionState"==e)&&(o=this.waterImmersionStates,s=t.waterImmersionState);for(var a=0;a<o.length;a++){var i=o[a];if(s==i.id)return n=i.name,this.$t(i.name)}return n},getNowDateTime:function(t){var e=t.getFullYear(),n=t.getMonth()+1<10?"0"+(t.getMonth()+1):t.getMonth()+1,s=t.getDate()<10?"0"+t.getDate():t.getDate(),o=t.getHours()<10?"0"+t.getHours():t.getHours(),a=t.getMinutes()<10?"0"+t.getMinutes():t.getMinutes(),i=t.getSeconds()<10?"0"+t.getSeconds():t.getSeconds();return e+"-"+n+"-"+s+" "+o+":"+a+":"+i},handleQuery:function(){this.querySensorStatusMonitoring()},resetQuery:function(){this.queryParams.endTime="",this.queryParams.startTime="",this.queryParams.sensorName="",this.handleQuery()},filterList:function(t,e){return t.filter((function(t){return t.sensorType===e}))},sensorStatusDelete:function(t){var e=this,n={};n.token=this.usertoken,n.sensorId=t.sensorId,n.type="delete",this.$modal.confirm(this.$t("qdyscm")).then((function(){Object(a["j"])(n)})).then((function(){e.$modal.msgSuccess(e.$t("zxcg")),e.querySensorStatusMonitoring()})).catch((function(){}))},issueInstructionsReset:function(t){var e=this,n={};n.token=this.usertoken,n.sensorId=t.sensorId,n.type="reset",this.$modal.confirm(this.$t("qryfwm")).then((function(){Object(a["j"])(n)})).then((function(){e.$modal.msgSuccess(e.$t("zxcg")),e.querySensorStatusMonitoring()})).catch((function(){}))},issueInstructionsRelease:function(t){var e=this,n={};n.token=this.usertoken,n.sensorId=t.sensorId,n.type="release",this.$modal.confirm(this.$t("qrysfm")).then((function(){Object(a["j"])(n)})).then((function(){e.querySensorStatusMonitoring(),e.$modal.msgSuccess(e.$t("zxcg"))})).catch((function(){}))},sensorStatusUpdate:function(t){this.sensorStatusForm=t,this.sensorStatusOpen=!0,this.sensorStatusTitle=this.$t("pz")},sensorStatusHandleCommand:function(t,e){var n=this,s={};switch(s.token=this.usertoken,s.sensorId=e.sensorId,t){case"sensorStatusopen":s.type="open",this.$modal.confirm(this.$t("qrykqm")).then((function(){Object(a["j"])(s)})).then((function(){n.$modal.msgSuccess(n.$t("zxcg")),n.querySensorStatusMonitoring()})).catch((function(){}));break;case"sensorStatusclose":s.type="close",this.$modal.confirm(this.$t("qrygbm")).then((function(){Object(a["j"])(s)})).then((function(){n.$modal.msgSuccess(n.$t("zxcg")),n.querySensorStatusMonitoring()})).catch((function(){}));break;default:break}},sensorStatusSubmitForm:function(){var t=this;this.$refs["sensorStatusForm"].validate((function(e){if(e){var n={};n.token=t.usertoken,n.sensorType=t.sensorStatusForm.sensorType,n.sensorId=t.sensorStatusForm.sensorId,n.sensorName=t.sensorStatusForm.sensorName,n.comSlogan=t.sensorStatusForm.comSlogan,n.sensorAddr=t.sensorStatusForm.sensorAddr,n.sensorBaud=t.sensorStatusForm.sensorBaud,n.connectionStatus=t.sensorStatusForm.connectionStatus,void 0!=t.sensorStatusForm.sensorId&&""!=t.sensorStatusForm.sensorId?(t.loading=!0,n.type="update",Object(a["j"])(n).then((function(e){t.$modal.msgSuccess(t.$t("xgcg")),t.sensorStatusOpen=!1,t.querySensorStatusMonitoring(),t.loading=!1}))):(t.loading=!0,n.type="add",Object(a["j"])(n).then((function(e){t.$modal.msgSuccess(t.$t("xzcg")),t.sensorStatusOpen=!1,t.querySensorStatusMonitoring(),t.loading=!1})))}}))},sensorStatusCancel:function(){this.sensorStatusOpen=!1},handleClick:function(t,e){this.activeName=t.name,this.querySensorStatusMonitoring()},getList:function(){var t=this;getServer().then((function(e){t.server=e.data}))},cancel:function(){this.open=!1},queryChannelStatus:function(){var t=this,e={};e.token=this.usertoken,e.type="listQuery",this.loading=!0,channelStatusMonitoring(e).then((function(e){t.channelList=e.data})).catch((function(){})),this.loading=!1},handleCommand:function(t,e){var n=this,s={};switch(s.token=this.usertoken,s.productChId=e.productChId,t){case"channelopen":s.type="open",this.$modal.confirm(this.$t("qrykqm")).then((function(){channelStatusMonitoring(s)})).then((function(){n.$modal.msgSuccess(n.$t("zxcg"))})).catch((function(){}));break;case"channelclose":s.type="close",this.$modal.confirm(this.$t("qrygbm")).then((function(){channelStatusMonitoring(s)})).then((function(){n.$modal.msgSuccess(n.$t("zxcg"))})).catch((function(){}));break;default:break}},queryTotalStatus:function(){var t=this,e={};e.token=this.usertoken,e.type="listQuery",overallStatusMonitoring(e).then((function(e){t.totalStatus=e.data[0]}))},totalopen:function(){var t=this,e={};e.token=this.usertoken,e.type="open",this.$modal.confirm(this.$t("qrykqm")).then((function(){overallStatusMonitoring(e)})).then((function(){t.$modal.msgSuccess(t.$t("zxcg")),t.queryTotalStatus(),t.queryChannelStatus(),t.querySensorStatusMonitoring()})).catch((function(){}))},runJob:function(){alert("222")},totalclose:function(){var t=this,e={};e.token=this.usertoken,e.type="close",this.$modal.confirm(this.$t("qrykqm")).then((function(){overallStatusMonitoring(e)})).then((function(){t.$modal.msgSuccess(t.$t("zxcg")),t.queryTotalStatus(),t.queryChannelStatus(),t.querySensorStatusMonitoring()})).catch((function(){}))},openLoading:function(){this.$modal.loading(this.$t("zzjzqsh"))}}},c=r,u=(n("4eac"),n("c964"),n("2877")),h=Object(u["a"])(c,s,o,!1,null,"8896c27e",null);e["default"]=h.exports},c964:function(t,e,n){"use strict";n("40b8")},d368:function(t,e,n){}}]);