app.20804333.js 17.4 KB
(function(t){function e(e){for(var n,s,o=e[0],l=e[1],c=e[2],d=0,f=[];d<o.length;d++)s=o[d],Object.prototype.hasOwnProperty.call(i,s)&&i[s]&&f.push(i[s][0]),i[s]=0;for(n in l)Object.prototype.hasOwnProperty.call(l,n)&&(t[n]=l[n]);u&&u(e);while(f.length)f.shift()();return r.push.apply(r,c||[]),a()}function a(){for(var t,e=0;e<r.length;e++){for(var a=r[e],n=!0,o=1;o<a.length;o++){var l=a[o];0!==i[l]&&(n=!1)}n&&(r.splice(e--,1),t=s(s.s=a[0]))}return t}var n={},i={app:0},r=[];function s(e){if(n[e])return n[e].exports;var a=n[e]={i:e,l:!1,exports:{}};return t[e].call(a.exports,a,a.exports,s),a.l=!0,a.exports}s.m=t,s.c=n,s.d=function(t,e,a){s.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:a})},s.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},s.t=function(t,e){if(1&e&&(t=s(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var a=Object.create(null);if(s.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)s.d(a,n,function(e){return t[e]}.bind(null,n));return a},s.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return s.d(e,"a",e),e},s.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},s.p="/";var o=window["webpackJsonp"]=window["webpackJsonp"]||[],l=o.push.bind(o);o.push=e,o=o.slice();for(var c=0;c<o.length;c++)e(o[c]);var u=l;r.push([0,"chunk-vendors"]),a()})({0:function(t,e,a){t.exports=a("56d7")},"0901":function(t,e,a){},"1d25":function(t,e,a){},"1ee8":function(t,e,a){"use strict";a("afe0")},3147:function(t,e,a){},49420:function(t,e){var a=16;function n(){var t=document.documentElement.clientWidth/1920;document.documentElement.style.fontSize=a*Math.min(t,2)+"px"}n(),window.onresize=function(){n()}},"4eb0":function(t,e,a){"use strict";a("83de")},"56d7":function(t,e,a){"use strict";a.r(e);a("e623"),a("e379"),a("5dc8"),a("37e1");var n=a("2b0e"),i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{attrs:{id:"app"}},[a("router-view")],1)},r=[],s=(a("e9c4"),{created:function(){console.log(this.$route.query);var t=JSON.stringify(this.$route.query.gid);localStorage.setItem("gid",t)}}),o=s,l=(a("5c0b"),a("2877")),c=Object(l["a"])(o,i,r,!1,null,null,null),u=c.exports,d=a("8c4f"),f=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("Moment"),a("HeaderIndex"),a("twoModule"),a("leftIndex"),a("Middle"),a("rightIndex"),a("boxBg")],1)},v=[],m=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"headerIndex"},[a("div",{staticClass:"bg_img"},[a("span",[t._v(t._s(t.name))])])])},h=[],_=(a("b0c0"),a("bc3a")),p=a.n(_);function b(t){var e=p.a.create({baseURL:"https://www.ynzhsk.cn/api/",timeout:5e3});return p.a.defaults.withCredentials=!0,e.interceptors.request.use((function(t){return t}),(function(t){console.log(t)})),e.interceptors.response.use((function(t){return t.data}),(function(t){console.log(t),console.log("请求出问题了")})),e(t)}function g(){var t=JSON.parse(localStorage.getItem("gid"));return t}function y(t){return b({url:"safeoperation/inspection/Reservoirname?id="+t})}var x={name:"HeaderIndex",data:function(){return{name:""}},created:function(){var t=this;console.log(this.$route.query),y(this.$route.query.gid).then((function(e){console.log(e.data.name),t.name=e.data.name+"雨情实时监测平台",console.log(e)}))}},C=x,w=(a("fb88"),Object(l["a"])(C,m,h,!1,null,"c0d44826",null)),D=w.exports,S=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"left_box"},[a("leftStatistical"),a("leftRanking")],1)},O=[],$=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"statistical_box"},[t._m(0),a("div",{staticClass:"charts-data"},[a("div",{staticClass:"rain-time-report"},[a("ul",[a("li",[a("span",{staticClass:"rain-title"},[t._v("降水量日报")]),a("span",{staticClass:"rain-number"},[t._v(" "+t._s(t.data.rain_day||0)+" ")]),a("span",{staticClass:"unit"},[t._v("mm")])]),a("li",[a("span",{staticClass:"rain-title"},[t._v("降水量旬报")]),a("span",{staticClass:"rain-number"},[t._v(" "+t._s(t.data.rain_10_day||0)+" ")]),a("span",{staticClass:"unit"},[t._v("mm")])]),a("li",[a("span",{staticClass:"rain-title"},[t._v("降水量月报")]),a("span",{staticClass:"rain-number"},[t._v(" "+t._s(t.data.rain_1_mth||0)+" ")]),a("span",{staticClass:"unit"},[t._v("mm")])])])]),a("div",{ref:"rain-charts",attrs:{id:"rain-charts"}},[t._v(" ")])])])},R=[function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"title"},[a("div",{staticClass:"rain-title"},[t._v("降水量统计")]),a("div",{staticClass:"left-block"})])}];a("d81d");function j(){return b({url:"Resvranindate/resvRainNewList?rid="+g()})}function E(){return b({url:"Resvranindate/resvRain7DayCt?rid="+g()})}var M=a("313e"),I=a.n(M),L={name:"leftStatistical",data:function(){return{data:[],rainChart:null}},created:function(){},methods:{getData:function(){var t=this;E().then((function(e){1===e.code&&(t.data=e.data)}))},initCharts:function(){var t=this;this.rainChart=M["init"](document.getElementById("rain-charts"),{width:"100%"}),setTimeout((function(){window.onresize=function(){t.rainChart.resize({width:"auto",heigth:"auto"})}}),1e3)}},watch:{data:function(t,e){var a,n=(null===(a=this.data)||void 0===a?void 0:a.rainList)||[],i=n.map((function(t){return t.total_rainfall})),r={grid:{left:"0%",top:"15%",bottom:"20%",right:"0%"},tooltip:{trigger:"axis",renderMode:"html",backgroundColor:"rgba(255,255,255,0.7)",borderColor:"#333",borderWidth:0,padding:5,textStyle:{color:"#333",fontStyle:"normal",fontWeight:"normal",fontFamily:"sans-serif",fontSize:12},extraCssText:"box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);",confine:!1},xAxis:{data:n.map((function(t){return t.dayTime})),axisLabel:{color:"#fff",fontStyle:"italic",fontWeight:"lighter"},axisLine:{show:!1},axisTick:{show:!1}},yAxis:{show:!1,axisLine:{show:!1}},series:[{type:"bar",name:"降水量",barMaxWidth:13,data:i,label:{show:!0,formatter:function(t){return 0!==t.data?t.data:""},position:"top",color:"white",textBorderWidth:0},itemStyle:{color:new M["graphic"].LinearGradient(0,0,0,1,[{offset:.2,color:"#FABE54"},{offset:1,color:"#4584DB"}])}},{type:"line",name:"line",smooth:!0,data:i,axisPointer:{show:!1},itemStyle:{color:"rgba(90, 163, 237, 1)"}}]};this.rainChart.setOption(r)}},mounted:function(){this.getData(),this.initCharts()},unmounted:function(){this.rainChar&&!this.rainChart.isDisposed()&&this.rainChart.dispose()}},T=L,k=(a("a0ef"),Object(l["a"])(T,$,R,!1,null,"6b5e9737",null)),A=k.exports,H=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"ranking"},[t._v(" 实时报告 "),a("el-table",{ref:"table",attrs:{data:t.listData,height:"90%","header-cell-class-name":"head-table"}},[a("el-table-column",{attrs:{prop:"name",label:"水库名称"}}),a("el-table-column",{attrs:{prop:"water_level",label:"库水位"}}),a("el-table-column",{attrs:{prop:"total_rainfall",label:"降水量"}}),a("el-table-column",{attrs:{width:"120%",prop:"createtime",label:"采集时间"}})],1)],1)},W=[],P={name:"leftRanking",intervalId:0,data:function(){return{listData:[],loading:!1}},methods:{getData:function(){var t=this;j().then((function(e){1===e.code&&(t.listData=e.data)}))},tableScroll:function(){var t=this,e=this.$refs.table,a=e.bodyWrapper;this.intervalId=setInterval((function(){a.scrollTop+=1,a.clientHeight+a.scrollTop+1>a.scrollHeight&&(a.scrollTop=0,t.loading||(t.loading=!0,t.getData()))}),50);var n=this;window.onresize=function(){return function(){window.screenHeight=document.body.clientHeight,n.clientHeight=window.screenHeight}()}},clearScroll:function(){this.loading=!1,this.intervalId&&clearInterval(this.intervalId)}},mounted:function(){this.getData(),this.tableScroll()},beforeUpdate:function(){this.clearScroll()},updated:function(){this.tableScroll()},unmounted:function(){this.clearScroll()}},z=P,q=(a("f019"),Object(l["a"])(z,H,W,!1,null,"dfb619d6",null)),B=q.exports,F={components:{leftStatistical:A,leftRanking:B},data:function(){return{}},created:function(){console.log(this.$route.query);var t=JSON.stringify(this.$route.query.gid);localStorage.setItem("gid",t)},methods:{}},J=F,N=(a("5793"),Object(l["a"])(J,S,O,!1,null,"58a37ebc",null)),G=N.exports,U=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"right_box"},[a("Trend"),a("AnalysisThe")],1)},Y=[],V=function(){var t=this,e=t.$createElement;t._self._c;return t._m(0)},K=[function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"trend_box"},[a("div",{staticClass:"trend_title"},[t._v(" 库容跟随水位趋势图 ")]),a("div",{staticClass:"tag"}),a("div",{staticStyle:{width:"100%",height:"100%"},attrs:{id:"myChart"}})])}];function Q(){return console.log(g()),b({url:"Resvranindate/resvRainLvList?rid="+g()})}function X(){return b({url:"Resvranindate/resvRainInfo?rid="+g()})}function Z(){return b({url:"Resvranindate/topCount?rid="+g()})}var tt={name:"hello",data:function(){return{msg:"Welcome to Your Vue.js App",myechars:null,chartsData:null}},created:function(){},mounted:function(){var t=this;setTimeout((function(){Q().then((function(e){t.chartsData=e.data,console.log(t.chartsData),t.drawLine()}))}),200)},methods:{drawLine:function(){this.myechars=this.$echarts.init(document.getElementById("myChart")),this.myechars.setOption({type:"category",title:{text:""},tooltip:{show:!0,trigger:"axis",axisPointer:{type:"line",axis:"auto",snap:!0},renderMode:"html",backgroundColor:"rgba(255,255,255,0.7)",borderColor:"#333",borderWidth:0,padding:5,textStyle:{color:"#333",fontStyle:"normal",fontWeight:"normal",fontFamily:"sans-serif",fontSize:12},extraCssText:"box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);",confine:!1,formatter:function(t){return"时间:"+t[0].name+"<br />水位:"+t[0].data+"m<br />库容量:"+t[1].data+"万立方米"}},grid:{left:0,right:0},xAxis:{data:this.chartsData.timelist,boundaryGap:["20%","20%"],axisLabel:{show:!0,color:"rgba(255, 255, 255, 1)"}},yAxis:[{type:"value",show:!1,min:function(t){return t.min}},{type:"value",show:!1,min:function(t){return t.min}}],series:[{itemStyle:{color:"rgba(49, 227, 128, 1)"},areaStyle:{color:"rgba(255, 255, 255, .1)"},data:this.chartsData.lvList,type:"line",smooth:!0,symbol:"none"},{itemStyle:{color:"rgba(90, 163, 237, 1)"},areaStyle:{color:"rgba(255, 255, 255, .1)"},yAxisIndex:1,data:this.chartsData.rlList,type:"line",smooth:!0,symbol:"none"}]})}}},et=tt,at=(a("db34"),Object(l["a"])(et,V,K,!1,null,"51f0d675",null)),nt=at.exports,it=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"analysis_box"},[a("div",[a("div",{staticClass:"analysis_title"},[t._v(" 水情分析 ")]),a("div",{staticClass:"analysis_partition"},[a("div",{staticClass:"partition_box"},[a("div",[t._m(0),a("div",{staticClass:"value"},[t._v(t._s(t.Rainfall.max_rain))])])]),a("div",{staticClass:"partition_box"},[a("div",[t._m(1),a("div",{staticClass:"value"},[t._v(t._s(t.Rainfall.min_rain))])])]),a("div",{staticClass:"partition_box"},[a("div",[t._m(2),a("div",{staticClass:"value"},[t._v(t._s(t.Rainfall.max_rain_10))])])]),a("div",{staticClass:"partition_box"},[a("div",[t._m(3),a("div",{staticClass:"value"},[t._v(t._s(t.Rainfall.min_rain_10))])])])])])])},rt=[function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"pi_bond"},[a("div",[t._v("近12小时")]),a("div",[t._v("降水量最大值")])])},function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"pi_bond"},[a("div",[t._v("近12小时")]),a("div",[t._v("降水量最小值")])])},function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"pi_bond"},[a("div",[t._v("近10天")]),a("div",[t._v("降水量最大值")])])},function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"pi_bond"},[a("div",[t._v("近10天")]),a("div",[t._v("降水量最小值")])])}],st={name:"AnalysisThe",data:function(){return{Rainfall:{max_rain:0,min_rain:0,max_rain_10:6.54,min_rain_10:0}}},created:function(){var t=this;X().then((function(e){console.log(e),t.Rainfall=e.data}))}},ot=st,lt=(a("1ee8"),Object(l["a"])(ot,it,rt,!1,null,"1ad73082",null)),ct=lt.exports,ut={components:{Trend:nt,AnalysisThe:ct},data:function(){return{}},methods:{}},dt=ut,ft=(a("e1fb"),Object(l["a"])(dt,U,Y,!1,null,"2cc37f4e",null)),vt=ft.exports,mt=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"bg_box"})},ht=[],_t={data:function(){return{}},methods:{}},pt=_t,bt=(a("4eb0"),Object(l["a"])(pt,mt,ht,!1,null,"058a936a",null)),gt=bt.exports,yt=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"two_box"},[a("twoLeft",{attrs:{allD:t.allData}}),a("middleModule",{attrs:{allD:t.allData}})],1)},xt=[],Ct=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"two_left_box"},[a("div",{staticClass:"main_box"},[a("div",{staticClass:"title"},[a("span",{staticClass:"cumulative"},[t._v("累计降水量")]),a("span",{staticClass:"today"},[t._v("今日降水量")]),a("span",{staticClass:"mm_data"},[t._v(t._s(t.allD.dayRain)+"mm")])]),a("div",{staticClass:"main_body"},[t._v(" "+t._s(t.allD.rainAll)+" ")])])])},wt=[],Dt={name:"twoLeft",data:function(){return{dataa:{}}},props:{allD:{type:Object,default:function(){return{rainAll:1370.4,dayRain:0,nowRain:0,nowLevel:1321.96,krong:"105"}}}}},St=Dt,Ot=(a("a9ef"),Object(l["a"])(St,Ct,wt,!1,null,"5af4fc89",null)),$t=Ot.exports,Rt=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"middle_box"},[a("div",{staticClass:"three_box"},[a("div",{staticClass:"detailed_msg"},[a("div",[a("div",{staticClass:"detailed_data"},[t._v(" "+t._s(t.allD.dayRain)+" "),a("span",[t._v("mm")])]),a("div",{staticClass:"detailed_title"},[t._v(" 当前降水量 ")])])]),a("div",{staticClass:"detailed_msg"},[a("div",[a("div",{staticClass:"detailed_data"},[t._v(" "+t._s(t.allD.nowLevel)+" "),a("span",[t._v("mm")])]),a("div",{staticClass:"detailed_title"},[t._v(" 当前水位 ")])])]),a("div",{staticClass:"detailed_msg"},[a("div",[a("div",{staticClass:"detailed_data"},[t._v(" "+t._s(t.allD.krong)+" "),a("span",[t._v("万/m³")])]),a("div",{staticClass:"detailed_title"},[t._v(" 库容量 ")])])])])])},jt=[],Et={name:"middleModule",props:{allD:{type:Object,default:function(){return{rainAll:1370.4,dayRain:0,nowRain:0,nowLevel:1321.96,krong:"105"}}}}},Mt=Et,It=(a("c707"),Object(l["a"])(Mt,Rt,jt,!1,null,"390fdf5c",null)),Lt=It.exports,Tt={name:"twoModule",components:{twoLeft:$t,middleModule:Lt},data:function(){return{allData:{rainAll:1370.4,dayRain:0,nowRain:0,nowLevel:1321.96,krong:"105"}}},created:function(){var t=this;Z().then((function(e){console.log(e),t.allData=e.data}))}},kt=Tt,At=(a("e0ba"),Object(l["a"])(kt,yt,xt,!1,null,"0eb013d9",null)),Ht=At.exports,Wt=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"middle_box"})},Pt=[],zt={name:"Middle"},qt=zt,Bt=(a("a572"),Object(l["a"])(qt,Wt,Pt,!1,null,"1f4e70f4",null)),Ft=Bt.exports,Jt=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"date_box"},[a("div",{staticClass:"moment"},[a("div"),a("span",[t._v(t._s(t.dateFormat(t.newDate)))])])])},Nt=[],Gt={name:"Moment",data:function(){return{newDate:new Date,date:"1999.12.28",moment:"",timer:null}},mounted:function(){var t=this;this.timer=setInterval((function(){t.newDate=(new Date).toLocaleString()}))},beforeDestroy:function(){this.timer&&clearInterval(this.timer)},methods:{dateFormat:function(){var t=new Date,e=t.getFullYear(),a=t.getMonth()+1<10?"0"+(t.getMonth()+1):t.getMonth()+1,n=t.getDate()<10?"0"+t.getDate():t.getDate(),i=t.getHours()<10?"0"+t.getHours():t.getHours(),r=t.getMinutes()<10?"0"+t.getMinutes():t.getMinutes(),s=t.getSeconds()<10?"0"+t.getSeconds():t.getSeconds();t.getDay();return e+"年"+a+"月"+n+"日 "+i+":"+r+":"+s+" "}}},Ut=Gt,Yt=(a("765e"),Object(l["a"])(Ut,Jt,Nt,!1,null,"7fd319be",null)),Vt=Yt.exports,Kt={name:"home",components:{HeaderIndex:D,leftIndex:G,rightIndex:vt,boxBg:gt,twoModule:Ht,Middle:Ft,Moment:Vt}},Qt=Kt,Xt=Object(l["a"])(Qt,f,v,!1,null,"7230e672",null),Zt=Xt.exports;n["default"].use(d["a"]);var te=[{path:"/",name:"首页",redirect:"/home"},{path:"/home",name:"home",component:Zt}],ee=new d["a"]({mode:"history",base:"/",routes:te}),ae=ee,ne=a("2f62");n["default"].use(ne["a"]);var ie=new ne["a"].Store({state:{},mutations:{},actions:{},modules:{}}),re=(a("918d"),a("49420"),a("5c96")),se=a.n(re);a("0fae");n["default"].prototype.$echarts=I.a,n["default"].use(se.a),n["default"].config.productionTip=!1,new n["default"]({router:ae,store:ie,render:function(t){return t(u)}}).$mount("#app")},5793:function(t,e,a){"use strict";a("0901")},"5b68":function(t,e,a){},"5c0b":function(t,e,a){"use strict";a("9c0c")},"648e":function(t,e,a){},"765e":function(t,e,a){"use strict";a("daf2")},"7f86":function(t,e,a){},"83de":function(t,e,a){},"918d":function(t,e,a){},"9c0c":function(t,e,a){},a0ef:function(t,e,a){"use strict";a("3147")},a572:function(t,e,a){"use strict";a("e632")},a9ef:function(t,e,a){"use strict";a("af26")},af26:function(t,e,a){},afe0:function(t,e,a){},b19e:function(t,e,a){},c707:function(t,e,a){"use strict";a("5b68")},daf2:function(t,e,a){},db34:function(t,e,a){"use strict";a("f7c6")},e0ba:function(t,e,a){"use strict";a("b19e")},e1fb:function(t,e,a){"use strict";a("648e")},e632:function(t,e,a){},f019:function(t,e,a){"use strict";a("7f86")},f7c6:function(t,e,a){},fb88:function(t,e,a){"use strict";a("1d25")}});
//# sourceMappingURL=app.20804333.js.map