1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-21b1e0a4","chunk-681fe3f7","chunk-2d224e91"],{"0f35":function(e,t,r){"use strict";r("18c1")},1362:function(e,t,r){},"18c1":function(e,t,r){},7586:function(e,t,r){"use strict";r.r(t);var a=function(){var e=this,t=e.$createElement;e._self._c;return e._m(0)},i=[function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticStyle:{width:"100%",height:"100%"}},[r("div",{attrs:{id:"nwpcharts"}})])}],n=(r("a9e3"),r("14d9"),r("b0c0"),r("f42c")),o=r("313e"),l=r("e1c2"),s={mixins:[n["a"]],watch:{drawData:{handler:function(e,t){this.cName=e.cName,void 0==e.cName.ws10?(this.company="W/㎡",this.thFormat=[{key:"directRadiation",value:"直辐射"},{key:"diffuseRadiation",value:"散辐射"},{key:"swr",value:"总辐射"}]):this.thFormat=[{key:"ws10",value:this.cName.ws10},{key:"ws30",value:this.cName.ws30},{key:"ws50",value:this.cName.ws50},{key:"ws70",value:this.cName.ws70}],this.draw(e.times,e.datas)},deep:!0},resizeKey:function(e,t){null!=this.chart&&this.chart.resize()}},props:{drawData:{type:Object},resizeKey:{type:Number}},data:function(){return{lineColor:"",cName:{},chart:null,thFormat:[],company:"m/s",lineStyle:[{areaStyle:{normal:{color:new o["graphic"].LinearGradient(0,0,0,1,[{offset:0,color:"rgba(219,50,51,0.3)"},{offset:.8,color:"rgba(219, 50, 51, 0)"}],!1),shadowColor:"rgba(0, 0, 0, 0.1)",shadowBlur:10}},itemStyle:{normal:{borderColor:"rgba(219,50,51,0.2)",borderWidth:12}}},{areaStyle:{normal:{color:new o["graphic"].LinearGradient(0,0,0,1,[{offset:0,color:"rgba(219,196,50,0.3)"},{offset:.8,color:"rgba(219, 50, 51, 0)"}],!1),shadowColor:"rgba(0, 0, 0, 0.1)",shadowBlur:10}},itemStyle:{normal:{color:l["default"].ws30,borderColor:"rgba(219,196,50,0.2)",borderWidth:12}}},{areaStyle:{normal:{color:new o["graphic"].LinearGradient(0,0,0,1,[{offset:0,color:"rgba(101,219,50,0.3)"},{offset:.8,color:"rgba(219, 50, 51, 0)"}],!1),shadowColor:"rgba(0, 0, 0, 0.1)",shadowBlur:10}},itemStyle:{normal:{color:l["default"].ws50,borderColor:"rgba(101,219,50,0.2)",borderWidth:12}}},{areaStyle:{normal:{color:new o["graphic"].LinearGradient(0,0,0,1,[{offset:0,color:"rgba(50,219,171,0.3)"},{offset:.8,color:"rgba(219, 50, 51, 0)"}],!1),shadowColor:"rgba(0, 0, 0, 0.1)",shadowBlur:10}},itemStyle:{normal:{color:l["default"].ws70,borderColor:"rgba(50,219,171,0.2)",borderWidth:12}}},{areaStyle:{normal:{color:new o["graphic"].LinearGradient(0,0,0,1,[{offset:0,color:"rgba(50,118,219,0.3)"},{offset:.8,color:"rgba(219, 50, 51, 0)"}],!1),shadowColor:"rgba(0, 0, 0, 0.1)",shadowBlur:10}},itemStyle:{normal:{color:l["default"].ws80,borderColor:"rgba(50,118,219,0.2)",borderWidth:12}}},{areaStyle:{normal:{color:new o["graphic"].LinearGradient(0,0,0,1,[{offset:0,color:"rgba(140,50,219,0.3)"},{offset:.8,color:"rgba(219, 50, 51, 0)"}],!1),shadowColor:"rgba(0, 0, 0, 0.1)",shadowBlur:10}},itemStyle:{normal:{color:l["default"].ws90,borderColor:"rgba(140,50,219,0.2)",borderWidth:12}}},{areaStyle:{normal:{color:new o["graphic"].LinearGradient(0,0,0,1,[{offset:0,color:"rgba(202,50,219,0.3)"},{offset:.8,color:"rgba(219, 50, 51, 0)"}],!1),shadowColor:"rgba(0, 0, 0, 0.1)",shadowBlur:10}},itemStyle:{normal:{color:l["default"].ws100,borderColor:"rgba(202,50,219,0.2)",borderWidth:12}}},{areaStyle:{normal:{color:new o["graphic"].LinearGradient(0,0,0,1,[{offset:0,color:"rgba(50,199,219,0.3)"},{offset:.8,color:"rgba(219, 50, 51, 0)"}],!1),shadowColor:"rgba(0, 0, 0, 0.1)",shadowBlur:10}},itemStyle:{normal:{color:l["default"].ws110,borderColor:"rgba(50,199,219,0.2)",borderWidth:12}}},{areaStyle:{normal:{color:new o["graphic"].LinearGradient(0,0,0,1,[{offset:0,color:"rgba(219,143,50,0.3)"},{offset:.8,color:"rgba(219, 50, 51, 0)"}],!1),shadowColor:"rgba(0, 0, 0, 0.1)",shadowBlur:10}},itemStyle:{normal:{color:l["default"].ws120,borderColor:"rgba(219,143,50,0.2)",borderWidth:12}}}]}},mounted:function(){"blue"===localStorage.getItem("styleSwitch")?this.lineColor="white":this.lineColor="#3b3b3b"},beforeDestroy:function(){this.chart&&(this.chart.dispose(),this.chart=null)},methods:{draw:function(e,t){this.chart=o["init"](document.getElementById("nwpcharts"));var r={backgroundColor:"transparent",title:{top:20,text:"nwp信息",textStyle:{fontWeight:"normal",fontSize:16,color:this.lineColor},left:"1%"},tooltip:{trigger:"axis",axisPointer:{lineStyle:{color:"#57617B"}}},legend:{top:20,width:"70%",icon:"rect",itemWidth:14,itemHeight:5,itemGap:13,data:[],right:"4%",textStyle:{fontSize:12,color:this.lineColor},selected:{}},dataZoom:[{show:!0,realtime:!0,start:0,end:100,left:"15%",right:"15%",textStyle:{color:this.lineColor}},{type:"inside"}],grid:{top:100,left:"2%",right:"2%",bottom:"10%",containLabel:!0},xAxis:[{type:"category",boundaryGap:!1,axisLine:{lineStyle:{color:this.lineColor}},data:[]}],yAxis:[{type:"value",name:this.company,axisTick:{show:!1},axisLine:{lineStyle:{color:this.lineColor}},axisLabel:{margin:10,textStyle:{fontSize:14,color:this.lineColor},formatter:"{value}"},splitLine:{lineStyle:{color:"#57617B"}}}],series:[]};r.xAxis[0].data=e;var a=0;for(var i in t){for(var n="",l=0;l<this.thFormat.length;l++)i==this.thFormat[l].key&&(n=this.thFormat[l].value);r.legend.data.push(n),r.legend.selected[n]=!(a>5);var s={name:"",type:"line",smooth:!1,symbol:"circle",symbolSize:5,showSymbol:!1,lineStyle:{normal:{width:2}},itemStyle:{},data:[]};s.name=n,s.data=t[i],s.itemStyle=this.lineStyle[a].itemStyle,r.series.push(s),a++}this.chart.setOption(r,!0)}}},d=s,c=(r("d9cf"),r("2877")),m=Object(c["a"])(d,a,i,!1,null,"082edfa2",null);t["default"]=m.exports},d9cf:function(e,t,r){"use strict";r("1362")},e1c2:function(e,t,r){"use strict";r.r(t),t["default"]={sj:"#FF4136",dq:"#0066CC",cdq:"#FFD700",kygl:"#2ECC40",llgl:"#F012BE",cfgf:"#85144b",ybjf:"#39CCCC",kycfgf:"#921AFF",kyybjf:"#cf20e2",lljtfsf:"#4F9D9D",kyjtfsf:"#B87070",zfs:"#8A2BE2",sfs:"#FF8C00",zhfs:"#0000E3",xfs:"#73BF00",nwpfs:"#FF6666",nwpzhfs:"#6699FF",nwpsfs:"#FF95CA",lggdfs:"#FF95CA",ws10:"#8A2BE2",ws30:"#FF8C00",ws50:"#0000E3",ws60:"#85144b",ws70:"#A8FF24",ws80:"#FF6666",ws90:"#6699FF",ws100:"#FF95CA",ws110:"#FFBB77",ws120:"#98FB98",wsHubHeight:"#0066CC",nwp10:"#00FFFF",nwp30:"#2894FF",nwp50:"#9393FF",nwp70:"#FF44FF",nwp80:"#f1d4d4",nwp90:"#C07AB8",nwp100:"#4F9D9D",nwp170:"#B87070",line1:"#FFD700",line2:"#2ECC40",line3:"#F012BE",line4:"#85144b",line5:"#39CCCC",line6:"#8A2BE2",line7:"#FF8C00",line8:"#0000E3",line9:"#73BF00",line10:"#FF6666",line11:"#6699FF",line12:"#FF95CA",line13:"#98FB98",line14:"#0066CC",line15:"#FFBB77",line16:"#921AFF"}},f2fd:function(e,t,r){"use strict";r.r(t);var a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"app-container"},[r("el-row",{attrs:{gutter:24}},[r("el-col",{attrs:{span:24,xs:24}},[r("el-form",{ref:"queryForm",attrs:{size:"small",inline:!0,"label-width":"68px"}},[r("el-form-item",{attrs:{label:"起始时间",prop:"startTime"}},[r("el-date-picker",{attrs:{clearable:!1,type:"datetime","value-format":"timestamp",placeholder:"选择日期"},model:{value:e.startTime,callback:function(t){e.startTime=t},expression:"startTime"}})],1),r("el-form-item",{attrs:{label:"截止时间",prop:"endTime"}},[r("el-date-picker",{attrs:{clearable:!1,type:"datetime","value-format":"timestamp",placeholder:"选择日期"},model:{value:e.endTime,callback:function(t){e.endTime=t},expression:"endTime"}})],1),r("el-form-item",[r("el-button",{attrs:{type:"primary",icon:"el-icon-search",size:"mini"},on:{click:e.dateQuery}},[e._v("查询")])],1)],1)],1)],1),r("div",{staticClass:"content"},[r("el-tabs",{attrs:{type:"card"},on:{"tab-click":e.Byresize},model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},[r("el-tab-pane",{attrs:{label:"图表",name:"first"}},[r("chart",{attrs:{drawData:this.drawData,resizeKey:this.resizeKey}})],1),r("el-tab-pane",{attrs:{label:"表格",name:"second"}},[r("div",{staticClass:"tableContent"},[r("vxe-table",{ref:"fstRef",attrs:{id:"fstTable",border:"","export-config":"",beforeExportMethod:"","auto-resize":!0,"highlight-hover-row":"","max-height":"90%",align:"center",data:e.tableData}},[r("vxe-table-column",{attrs:{field:"preTime",title:"预测时间",formatter:e.dateFormat,width:"180","min-width":"150"}}),r("vxe-table-column",{attrs:{field:"t",title:"温度","min-width":"90"}}),r("vxe-table-column",{attrs:{field:"rh",title:"湿度","min-width":"90"}}),r("vxe-table-column",{attrs:{field:"swr",title:"总辐射","min-width":"90"}}),r("vxe-table-column",{attrs:{field:"directRadiation",title:"直辐射","min-width":"90"}}),r("vxe-table-column",{attrs:{field:"diffuseRadiation",title:"散辐射","min-width":"90"}}),r("vxe-table-column",{attrs:{field:"ws10",title:"10米风速","min-width":"90"}}),r("vxe-table-column",{attrs:{field:"ws30",title:"30米风速","min-width":"90"}}),r("vxe-table-column",{attrs:{field:"ws50",title:"50米风速","min-width":"90"}}),r("vxe-table-column",{attrs:{field:"ws70",title:"70米风速","min-width":"90"}}),r("vxe-table-column",{attrs:{field:"wd10",title:"10米风向","min-width":"90"}}),r("vxe-table-column",{attrs:{field:"wd30",title:"30米风向","min-width":"90"}}),r("vxe-table-column",{attrs:{field:"wd50",title:"50米风向","min-width":"90"}}),r("vxe-table-column",{attrs:{field:"wd70",title:"70米风向","min-width":"90"}})],1),r("vxe-pager",{directives:[{name:"show",rawName:"v-show",value:e.showTable,expression:"showTable"}],attrs:{perfect:"","current-page":e.currentPage,"page-size":e.pageSize,total:e.total,"page-sizes":[10,50,100],layouts:["PrevJump","PrevPage","JumpNumber","NextPage","NextJump","Sizes","FullJump","Total"]},on:{"update:currentPage":function(t){e.currentPage=t},"update:current-page":function(t){e.currentPage=t},"update:pageSize":function(t){e.pageSize=t},"update:page-size":function(t){e.pageSize=t},"page-change":e.handlePageChange}})],1)])],1)],1)],1)},i=[],n=r("c7eb"),o=r("1da1"),l=(r("b0c0"),r("7586")),s=r("f42c"),d=r("c1df"),c=r.n(d),m=r("2ef0"),h={name:"nwp",components:{Chart:l["default"]},mixins:[s["a"]],data:function(){return{showTable:!0,chart:null,queryStartTime:"",queryEndTime:"",startTime:new Date((new Date).toLocaleDateString()).getTime()+864e5,endTime:new Date((new Date).toLocaleDateString()).getTime()+3456e5-1,loading:!1,drawLoading:!0,tableLoading:!0,resizeKey:1,activeName:"first",drawData:{datas:[],times:[]},tableData:[],total:0,sortOrder:"asc",pageSize:10,currentPage:1,showToolBar:!1}},created:function(){},mounted:function(){this.queryStartTime=this.startTime,this.queryEndTime=this.endTime},methods:{getDraw:function(){var e=this;return Object(o["a"])(Object(n["a"])().mark((function t(){var r,a,i;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$axios.get("/sysPolicyController/getLicenseKey").then((function(e){r=e.data.sysTime,a=e.data.lk})).catch((function(e){}));case 2:return e.drawLoading=!0,i={startTime:e.queryStartTime,endTime:e.queryEndTime,sysTime:r,lk:a},t.next=6,e.$axios.get("/nwpController/getDraw",{params:i}).then((function(t){e.drawData=t.data})).catch((function(t){e.$message.error("查询实时Nwp echarts出错"+t)}));case 6:case"end":return t.stop()}}),t)})))()},getTable:function(){var e=this;return Object(o["a"])(Object(n["a"])().mark((function t(){var r,a,i;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$axios.get("/sysPolicyController/getLicenseKey").then((function(e){r=e.data.sysTime,a=e.data.lk})).catch((function(e){}));case 2:return i={currentPage:e.currentPage,pageSize:e.pageSize,startTime:e.queryStartTime,endTime:e.queryEndTime,sysTime:r,lk:a},t.next=5,e.$axios.get("/nwpController/getAll",{params:i}).then((function(t){if("0"==t.code)e.tableData=t.data.records,e.total=t.data.total,e.getDraw();else if("1"==t.code)return void e.$message.error(t.data)})).catch((function(e){}));case 5:case"end":return t.stop()}}),t)})))()},handlePageChange:function(e){var t=e.currentPage,r=e.pageSize;this.currentPage=t,this.pageSize=r,this.startTime=this.queryStartTime,this.endTime=this.queryEndTime,this.loading=!0,this.getTable()},dateFormat:function(e){var t=e.cellValue;e.row,e.column;return this.$XEUtils.toDateString(t,"yyyy-MM-dd HH:mm:ss")},enumToWord:function(e){var t=e.cellValue;e.row,e.column;return"E1"==t?"云端模型":"E2"==t?"物理模型":"E3"==t?"统计模型":"E4"==t?"补录数据":"E5"==t?"差值模型":void 0},dateMoment:function(e){var t=e.cellValue;e.row,e.column;return c()(t).format("YYYY-MM-DD HH:mm:ss")},sortChangeEvent:function(e){e.column,e.property;var t=e.order;null==t&&(t="asc"),this.currentPage=1,this.sortOrder=t,this.loading=!0,this.getTable()},checkColumnMethod:function(e){var t=e.column;return"preTime"!==t.property},dateQuery:Object(m["debounce"])((function(){if(this.loading=!0,this.endTime<=this.startTime)return this.$message.error("开始时间不能大于结束时间"),void(this.loading=!1);this.queryStartTime=this.startTime,this.queryEndTime=this.endTime,this.currentPage=1,this.pageSize=10,this.getTable()}),1e3),Byresize:function(e){"first"==e.name?(this.resizeKey++,this.showToolBar=!1):this.showToolBar=!0}}},u=h,f=(r("0f35"),r("2877")),w=Object(f["a"])(u,a,i,!1,null,"527a3f8c",null);t["default"]=w.exports},f42c:function(e,t,r){"use strict";var a=r("2ef0");t["a"]={data:function(){return{$_sidebarElm:null,$_itemElm1:null,$_itemElm2:null,$_itemElm3:null,$_itemElm4:null,$_windTowerItemElm1:null,$_windTowerItemElm2:null,$_windTowerItemElm3:null,$_tabsClass:null,$_resizeHandler:null}},mounted:function(){this.initListener()},activated:function(){this.$_resizeHandler||this.initListener(),this.resize()},beforeDestroy:function(){this.destroyListener()},deactivated:function(){this.destroyListener()},methods:{$_sidebarResizeHandler:function(e){"width"===e.propertyName&&this.$_resizeHandler()},initListener:function(){var e=this;this.$_resizeHandler=Object(a["debounce"])((function(){e.resize()}),100),window.addEventListener("resize",this.$_resizeHandler),this.$_sidebarElm=document.getElementsByClassName("sidebar-container")[0],this.$_itemElm1=document.getElementsByClassName("item")[0],this.$_itemElm2=document.getElementsByClassName("item")[1],this.$_itemElm3=document.getElementsByClassName("item")[2],this.$_windTowerItemElm1=document.getElementsByClassName("windTowerItem")[0],this.$_windTowerItemElm2=document.getElementsByClassName("windTowerItem")[1],this.$_windTowerItemElm3=document.getElementsByClassName("windTowerItem")[2],this.$_sidebarElm&&this.$_sidebarElm.addEventListener("transitionend",this.$_sidebarResizeHandler),this.$_itemElm1&&this.$_itemElm1.addEventListener("transitionend",this.$_sidebarResizeHandler),this.$_itemElm2&&this.$_itemElm2.addEventListener("transitionend",this.$_sidebarResizeHandler),this.$_itemElm3&&this.$_itemElm3.addEventListener("transitionend",this.$_sidebarResizeHandler),this.$_windTowerItemElm1&&this.$_windTowerItemElm1.addEventListener("transitionend",this.$_sidebarResizeHandler),this.$_windTowerItemElm2&&this.$_windTowerItemElm2.addEventListener("transitionend",this.$_sidebarResizeHandler),this.$_windTowerItemElm3&&this.$_windTowerItemElm3.addEventListener("transitionend",this.$_sidebarResizeHandler)},destroyListener:function(){window.removeEventListener("resize",this.$_resizeHandler),this.$_resizeHandler=null,this.$_sidebarElm&&this.$_sidebarElm.removeEventListener("transitionend",this.$_sidebarResizeHandler)},resize:function(){var e=this.chart;e&&e.resize()}}}}}]);
|