whychw
2021-05-24 8e85954e958bcb1bba811884dbc9cde65e94aa04
1
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6344e58e"],{"0acc":function(t,a,e){},"344a":function(t,a,e){"use strict";e.r(a);var i,s,o,l,n=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"page_watercooling flex_column posA_full"},[e("div",{staticClass:"page_title"},[t._v("1号水冷装置运行界面")]),e("div",{staticClass:"btns-group"},[e("div",{staticClass:"btn",on:{click:function(a){return t.toWater(2)}}},[t._v("切换到2号水冷装置")]),e("div",{staticClass:"btn",on:{click:function(a){return t.toWater(3)}}},[t._v("切换到3号水冷装置")]),e("div",{staticClass:"btn",on:{click:t.exportData}},[t._v("数据导出")]),e("div",{staticClass:"btn btn-toggle",on:{click:t.changeStatus}},[t._v(t._s(t.showTable?"显示运行图":"显示表格"))])]),e("div",{staticClass:"page_content",class:{turn_end:t.showTable}},[e("div",{staticClass:"wraper"},[e("div",{ref:"container",staticClass:"canvas_container border-angle"},[e("canvas",{ref:"can",attrs:{id:"can",width:"1800",height:"700"}}),e("canvas",{ref:"can1",staticClass:"can1",attrs:{id:"can1",width:"1800",height:"700"}}),e("canvas",{ref:"can2",staticClass:"can1",attrs:{id:"can2",width:"1800",height:"700"}}),t._l(t.loads,(function(a,i){return e("science-box",{key:"load_"+i,staticClass:"panel_info",class:{highlight:a.data.FValue>.1},attrs:{"no-header":"",cssWidth:a.position.width,cssHeight:a.position.height,top:a.position.top,left:a.position.left}},[e("div",{staticClass:"posA_full _main"},[e("div",{staticClass:"title"},[t._v(t._s(a.data.title))]),e("div",{staticClass:"content"},[e("div",{staticClass:"row"},[e("label",[t._v(t._s(a.data.TLabel))]),e("el-input",{staticClass:"input transparent",attrs:{disabled:"",size:"mini",type:"text"},model:{value:a.data.TValue,callback:function(e){t.$set(a.data,"TValue",e)},expression:"load.data.TValue"}})],1),e("div",{staticClass:"row"},[e("label",[t._v(t._s(a.data.PLabel))]),e("el-input",{staticClass:"input transparent",attrs:{disabled:"",size:"mini",type:"text"},model:{value:a.data.PValue,callback:function(e){t.$set(a.data,"PValue",e)},expression:"load.data.PValue"}})],1),e("div",{staticClass:"row"},[e("label",[t._v(t._s(a.data.FLabel))]),e("el-input",{staticClass:"input transparent",attrs:{disabled:"",size:"mini",type:"text"},model:{value:a.data.FValue,callback:function(e){t.$set(a.data,"FValue",e)},expression:"load.data.FValue"}})],1)])])])})),t._l(t.inputList,(function(a,i){return e("science-box",{key:"input_"+i,staticClass:"panel_input",attrs:{"no-header":"",cssWidth:a.position.width,cssHeight:a.position.height,top:a.position.top,left:a.position.left}},[e("div",{staticClass:"input-title",attrs:{slot:"title"},slot:"title"},[e("div",[t._v(t._s(a.title))])]),e("el-input",{staticClass:"input transparent",class:{alarm:a.alarm},attrs:{disabled:"",type:"text"},model:{value:a.value,callback:function(e){t.$set(a,"value",e)},expression:"item.value"}})],1)})),e("div",{staticClass:"panel_label",style:t.getStyle(t.panelList[0].position)},[e("div",{staticClass:"inner flexR_center"},[e("span",{staticClass:"indicator",class:{status_off:!t.G_status.H02,status_normal:t.G_status.H02}}),t._v(" H02")])]),e("div",{staticClass:"panel_label",style:t.getStyle(t.panelList[1].position)},[e("div",{staticClass:"inner flexR_center"},[e("span",{staticClass:"indicator",class:{status_off:!t.G_status.H01,status_normal:t.G_status.H01}}),t._v(" H01")])]),t._l(t.panelList.slice(2),(function(a,i){return e("div",{key:"label_"+i,staticClass:"panel_label",style:t.getStyle(a.position)},[e("div",{staticClass:"inner"},[t._v(t._s(a.txt))])])})),e("div",{staticClass:"run_info flexR_center",style:t.getStyle(t.run_info)},[t._v("运行状态: "),e("div",{class:["indicator",{status_normal:t.G_status.Water_system_function,status_off:!t.G_status.Water_system_function}]})]),e("div",{staticClass:"rotate_motor",style:t.getStyle(t.rotate_motor)},[e("div",{staticClass:"motor",class:{motor_run:t.G_status.p01}})])],2)]),e("div",{staticClass:"wraper"},[e("div",{staticClass:"tab_table posA_full"},[e("el-tabs",{staticClass:"inner",attrs:{type:"border-card"}},[e("el-tab-pane",{attrs:{label:"实时数据"}},[e("assemble-table",{attrs:{data:t.tlist.rtData,len:4}})],1),e("el-tab-pane",{attrs:{label:"支路数据"}},[e("assemble-table",{attrs:{data:t.tlist.branchData,len:4}})],1),e("el-tab-pane",{attrs:{label:"状态数据"}},[e("assemble-table",{attrs:{data:t.tlist.stateData,len:4}})],1),e("el-tab-pane",{attrs:{label:"故障数据"}},[e("assemble-table",{attrs:{data:t.tlist.alarmData,len:4}})],1)],1)],1)])]),e("el-dialog",{attrs:{title:"数据导出",visible:t.exportDialogVisible,width:"400px"},on:{"update:visible":function(a){t.exportDialogVisible=a}}},[e("label",{staticClass:"pr_o6em"},[t._v("选择日期")]),e("el-date-picker",{attrs:{"value-format":"yyyy-MM-dd",type:"date",size:"small","picker-options":t.pickerOptions,placeholder:"选择日期"},model:{value:t.export_date,callback:function(a){t.export_date=a},expression:"export_date"}}),e("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:function(a){t.exportDialogVisible=!1}}},[t._v("关 闭")]),e("el-button",{attrs:{type:"primary"},on:{click:t.exportCsv}},[t._v("导 出")])],1)],1),e("progress-load",{attrs:{show:t.progress.show,percentage:t.progress.value,text:t.progress.text}})],1)},r=[],h=(e("4160"),e("a9e3"),e("b680"),e("b64b"),e("ac1f"),e("5319"),e("159b"),e("2348")),p=e("960b"),u=e("535f"),c=e("aab4"),d=e("f600"),_=e("2cd1"),f=1,g=5003,b={name:"WaterCooling_1",components:{ScienceBox:h["a"],AssembleTable:c["a"],ProgressLoad:_["a"]},data:function(){return{progress:{show:!1,value:0,text:""},exportDialogVisible:!1,export_date:(new Date).format("yyyy-MM-dd"),pickerOptions:{disabledDate:function(t){return t&&t.valueOf()>Date.now().valueOf()||t.valueOf()<Date.now().valueOf()-2592e6}},tlist:{rtData:[],branchData:[],stateData:[],alarmData:[]},showTable:!1,timer:new this.$common.Timeout,flag:!1,G_status:{v017:!1,Water_system_function:!1,H01:!1,H02:!1,p01:!1,p11:!1,p12:!1,p13:!1,v501:!1,v502:!1,v504:!1},loads:[{position:{left:0,right:0,top:0,bottom:0,width:0,height:0},data:{title:"7#支路",TLabel:"TT09(℃)",PLabel:"PT08(bar)",FLabel:"FIT08(T/h)",TValue:0,PValue:0,FValue:0}},{position:{left:0,right:0,top:0,bottom:0,width:0,height:0},data:{title:"4#支路",TLabel:"TT05(℃)",PLabel:"PT05(bar)",FLabel:"FIT05(T/h)",TValue:0,PValue:0,FValue:0}},{position:{left:0,right:0,top:0,bottom:0,width:0,height:0},data:{title:"1#支路",TLabel:"TT02(℃)",PLabel:"PT02(bar)",FLabel:"FIT02(T/h)",TValue:0,PValue:0,FValue:0}},{position:{left:0,right:0,top:0,bottom:0,width:0,height:0},data:{title:"8#支路",TLabel:"TT10(℃)",PLabel:"PT09(bar)",FLabel:"FIT09(T/h)",TValue:0,PValue:0,FValue:0}},{position:{left:0,right:0,top:0,bottom:0,width:0,height:0},data:{title:"5#支路",TLabel:"TT06(℃)",PLabel:"PT06(bar)",FLabel:"FIT06(T/h)",TValue:0,PValue:0,FValue:0}},{position:{left:0,right:0,top:0,bottom:0,width:0,height:0},data:{title:"2#支路",TLabel:"TT03(℃)",PLabel:"PT03(bar)",FLabel:"FIT03(T/h)",TValue:0,PValue:0,FValue:0}},{position:{left:0,right:0,top:0,bottom:0,width:0,height:0},data:{title:"9#支路",TLabel:"TT11(℃)",PLabel:"PT10(bar)",FLabel:"FIT10(T/h)",TValue:0,PValue:0,FValue:0}},{position:{left:0,right:0,top:0,bottom:0,width:0,height:0},data:{title:"6#支路",TLabel:"TT07(℃)",PLabel:"PT07(bar)",FLabel:"FIT07(T/h)",TValue:0,PValue:0,FValue:0}},{position:{left:0,right:0,top:0,bottom:0,width:0,height:0},data:{title:"3#支路",TLabel:"TT04(℃)",PLabel:"PT04(bar)",FLabel:"FIT04(T/h)",TValue:0,PValue:0,FValue:0}}],run_info:{left:0,right:0,top:0,bottom:0,width:0,height:0},rotate_motor:{left:0,right:0,top:0,bottom:0,width:0,height:0},inputList:[{title:"TT08(℃)",position:{left:0,right:0,top:0,bottom:0,width:0,height:0},value:0,alarm:!1},{title:"PT01(bar)",position:{left:0,right:0,top:0,bottom:0,width:0,height:0},value:0,alarm:!1},{title:"FIT01(T/h)",position:{left:0,right:0,top:0,bottom:0,width:0,height:0},value:0,alarm:!1},{title:"QIT01(μS/cm)",position:{left:0,right:0,top:0,bottom:0,width:0,height:0},value:0,alarm:!1},{title:"TT01(℃)",position:{left:0,right:0,top:0,bottom:0,width:0,height:0},value:0,alarm:!1},{title:"PT11(bar)",position:{left:0,right:0,top:0,bottom:0,width:0,height:0},value:0,alarm:!1},{title:"TRT01_T(℃)",position:{left:0,right:0,top:0,bottom:0,width:0,height:0},value:0,alarm:!1},{title:"TRT01_R(%)",position:{left:0,right:0,top:0,bottom:0,width:0,height:0},value:0,alarm:!1}],panelList:[{txt:"",position:{left:0,right:0,top:0,bottom:0,width:0,height:0}},{txt:"",position:{left:0,right:0,top:0,bottom:0,width:0,height:0}},{txt:"P13",position:{left:0,right:0,top:0,bottom:0,width:0,height:0}},{txt:"V501",position:{left:0,right:0,top:0,bottom:0,width:0,height:0}},{txt:"V502",position:{left:0,right:0,top:0,bottom:0,width:0,height:0}},{txt:"V017",position:{left:0,right:0,top:0,bottom:0,width:0,height:0}},{txt:"P01",position:{left:0,right:0,top:0,bottom:0,width:0,height:0}},{txt:"V002",position:{left:0,right:0,top:0,bottom:0,width:0,height:0}},{txt:"V504",position:{left:0,right:0,top:0,bottom:0,width:0,height:0}},{txt:"E02",position:{left:0,right:0,top:0,bottom:0,width:0,height:0}},{txt:"v018",position:{left:0,right:0,top:0,bottom:0,width:0,height:0}},{txt:"P11",position:{left:0,right:0,top:0,bottom:0,width:0,height:0}},{txt:"P12",position:{left:0,right:0,top:0,bottom:0,width:0,height:0}},{txt:"冷凝水",position:{left:0,right:0,top:0,bottom:0,width:0,height:0}}]}},methods:{go:function(t){this.$router.push({path:t})},toWater:function(t){this.$router.push({path:"/watercooling/index/"+t})},start:function(){},stop:function(){},changeStatus:function(){this.showTable=!this.showTable},setLoad:function(){for(var t=this.$refs.container,a=t.offsetWidth,e=t.offsetHeight,s=0;s<9;s++)this.loads[s].position=this.$common.transSize(a,e,1800,700,i.getInfo("rect_"+s))},setInput:function(){for(var t=this.$refs.container,a=t.offsetWidth,e=t.offsetHeight,s=0;s<8;s++)this.inputList[s].position=this.$common.transSize(a,e,1800,700,i.getInfo("rect_input_"+s))},setPanelPos:function(){for(var t=this.$refs.container,a=t.offsetWidth,e=t.offsetHeight,s=0;s<14;s++)this.panelList[s].position=this.$common.transSize(a,e,1800,700,i.getInfo("rect_panel_"+s))},getStyle:function(t){return{left:t.left+"px",top:t.top+"px",width:t.width+"px",height:t.height+"px"}},getPos:function(){this.setLoad(),this.setInput(),this.setPanelPos(),this.getRunInfoPos(),this.getMotorPos()},getRunInfoPos:function(){var t=this.$refs.container,a=t.offsetWidth,e=t.offsetHeight;this.run_info=this.$common.transSize(a,e,1800,700,i.getInfo("rect_title_0"))},getMotorPos:function(){var t=this.$refs.container,a=t.offsetWidth,e=t.offsetHeight;this.rotate_motor=this.$common.transSize(a,e,1800,700,i.getInfo("rect_motor_0"))},getDate:function(){var t=this,a=[];return this.$api.water.getDate({water_id:g}).then((function(e){if(e=JSON.parse(e.data.result),e.code){var i=e.data[0],s=d["a"].type3.rtData;t.inputList[2].value=i.cooling_flow/100,t.inputList[3].value=i.Cooling_ser,t.inputList[4].value=i.supply_tmp,t.inputList[1].value=i.Supply_pre,t.inputList[0].value=i.back_tem,t.inputList[5].value=i.Buffer_tank_pre,t.inputList[6].value=i.Tem_chamber,t.inputList[7].value=i.Humidity_chamber,Object.keys(i).forEach((function(t){"num"!=t&&"water_id"!=t&&a.push({text:s[t],key:t,val:i[t]})})),t.tlist.rtData=a}}))},getInfo:function(){var t=this,a=[];return this.$api.water.getInfo({water_id:g}).then((function(e){if(e=JSON.parse(e.data.result),e.code){var i=e.data[0],s=d["a"].type3.branchData;t.loads[0].data.TValue=i.Branch_tmp_7,t.loads[0].data.PValue=i.Branch_pre_7,t.loads[0].data.FValue=i.Branch_flow_7,t.loads[1].data.TValue=i.Branch_tmp_4,t.loads[1].data.PValue=i.Branch_pre_4,t.loads[1].data.FValue=i.Branch_flow_4,t.loads[2].data.TValue=i.Branch_tmp_1,t.loads[2].data.PValue=i.Branch_pre_1,t.loads[2].data.FValue=i.Branch_flow_1,t.loads[3].data.TValue=i.Branch_tmp_8,t.loads[3].data.PValue=i.Branch_pre_8,t.loads[3].data.FValue=i.Branch_flow_8,t.loads[4].data.TValue=i.Branch_tmp_5,t.loads[4].data.PValue=i.Branch_pre_5,t.loads[4].data.FValue=i.Branch_flow_5,t.loads[5].data.TValue=i.Branch_tmp_2,t.loads[5].data.PValue=i.Branch_pre_2,t.loads[5].data.FValue=i.Branch_flow_2,t.loads[6].data.TValue=i.Branch_tmp_9,t.loads[6].data.PValue=i.Branch_pre_9,t.loads[6].data.FValue=i.Branch_flow_9,t.loads[7].data.TValue=i.Branch_tmp_6,t.loads[7].data.PValue=i.Branch_pre_6,t.loads[7].data.FValue=i.Branch_flow_6,t.loads[8].data.TValue=i.Branch_tmp_3,t.loads[8].data.PValue=i.Branch_pre_3,t.loads[8].data.FValue=i.Branch_flow_3,Object.keys(i).forEach((function(t){"num"!=t&&"water_id"!=t&&a.push({text:s[t],key:t,val:i[t]})})),t.tlist.branchData=a}}))},getStatus:function(){var t=this,a=[];return this.$api.water.getStatus({water_id:g}).then((function(e){if(e=JSON.parse(e.data.result),e.code){var i=e.data[0],s=d["a"].type3.stateData;t.G_status.v017=i.Solenoid_openflag,t.G_status.v018=i.Solenoid_openflag,t.G_status.v504=i.Solenoid_openflag,t.G_status.v501=i.Solenoid_openflag,t.G_status.v502=i.Solenoid_openflag,t.G_status.noName=i.Solenoid_openflag,t.G_status.Water_system_function=i.Water_system_function,t.G_status.H01=i.H01_electric_heater,t.G_status.H02=i.H02_electric_heater,t.G_status.p01=i.P01_main_pump,t.G_status.p11=i.P11_replenish_pump,t.G_status.p12=i.P12_pretest_pump,t.G_status.p13=i.P13_replenish_pump,Object.keys(i).forEach((function(t){"num"!=t&&"water_id"!=t&&a.push({text:s[t],key:t,val:i[t]})})),t.tlist.stateData=a}}))},getAlarm:function(){var t=this,a=[];return this.$api.water.getAlarm({water_id:g}).then((function(e){if(e=JSON.parse(e.data.result),e.code){var i=e.data;if(!i.length)return!1;for(var s=0,o=i.length;s<o;s++)a.push({text:i[s]["alarm_name"],key:"",val:"告警"});t.tlist.alarmData=a}}))},loop:function(){var t=this;this.timer.start((function(){t.$axios.all([t.getDate(),t.getInfo(),t.getStatus(),t.getAlarm()]).then((function(){u["a"].update1(s,t.G_status,o),t.timer.open()})).catch((function(a){console.error(a),t.timer.open()}))}),1e3)},exportData:function(){this.exportDialogVisible=!0},getProgress:function(){var t=this;this.exportDialogVisible=!1,this.$api.common.getProgress().then((function(a){a=JSON.parse(a.data.result);var e=a.data[0]?Number(a.data[0].toFixed(0)):0;t.progress.value=e,t.progress.text=0==e?"数据加载中...":"文件下载中...",a.data<100&&t.progress.show?setTimeout(t.getProgress,50):t.progress.value=100}))},exportCsv:function(){var t=this,a={dev_name:"1号水冷装置",dev_id:g,export_num:5,table_name:this.export_date.replace(/-/g,"_"),record_time:this.export_date+" 00:00:00"};this.progress.show=!0,this.$api.common.clearProgress().then((function(){t.getProgress(),t.$api.common.download(a).then((function(a){if(a=JSON.parse(a.data.result),1==a.code){t.progress.show=!1,t.progress.value=0;var e=a.data[0],i=document.createElement("a");i.href=encodeURI(t.$config.url+"tomcat7_csv/"+e.fileName),i.download=e.fileName,document.body.appendChild(i),i.click(),document.body.removeChild(i),setTimeout((function(){t.progress.show=!1,t.progress.value=0}),1e3)}else t.progress.show=!1,t.progress.value=0,t.$layer.msg("生成文件失败!")})).catch((function(a){t.progress.show=!1,t.progress.value=0,t.$layer.msg("生成文件失败!"),console.warn(a)}))}))}},mounted:function(){var t=this;this.$refs.container;i=new p["a"]("can"),s=new p["a"]("can1"),o=new p["a"]("can2"),u["a"].main(i,f),this.getPos(),this.loop(),l=function(){t.getPos()},window.addEventListener("resize",l)},destroyed:function(){window.removeEventListener("resize",l),this.timer.stop(),u["a"].stop(1)}},m=b,v=(e("c4f3"),e("2877")),w=Object(v["a"])(m,n,r,!1,null,"6ad4edcf",null);a["default"]=w.exports},c4f3:function(t,a,e){"use strict";var i=e("0acc"),s=e.n(i);s.a}}]);