1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1636810d"],{"0f36":function(t,a,e){t.exports=e.p+"static/img/hor_big_bg.d716cdc0.png"},"3eec":function(t,a,e){t.exports=e.p+"static/img/jiaquan.c034aaff.png"},4038:function(t,a,e){t.exports=e.p+"static/img/wendu.867faec9.png"},"4a22":function(t,a,e){t.exports=e.p+"static/img/co2.d1e1e870.png"},5311:function(t,a,e){"use strict";var s=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"floorSpace"},[e("div",{staticClass:"leftChange"},[e("div",{staticClass:"allIndicator"},t._l(t.allIndicator,(function(a,s){return e("div",{staticClass:"eachItem ",class:{select:a.id==t.selIndicator.id},on:{click:function(a){return t.clickIndicator(s)}}},[e("div",{staticClass:"title"},[t._v(t._s(a.name))]),e("div",{directives:[{name:"show",rawName:"v-show",value:a.id==t.selIndicator.id,expression:"item.id==selIndicator.id"}],staticClass:"textCont"},[t._v(t._s(t.totalAvgValues)+t._s(t.selIndicator.unit)),e("br"),e("span",{staticClass:"name"},[t._v("平均"+t._s(t.selIndicator.name))])]),e("img",{directives:[{name:"show",rawName:"v-show",value:a.id==t.selIndicator.id,expression:"item.id==selIndicator.id"}],staticClass:"img",attrs:{src:t.selIndicator.img}})])})),0)]),e("div",{staticClass:"floorWrap"},t._l(t.showFloors,(function(a,s){return e("div",{key:s,staticClass:"floor-item"},[e("div",{staticClass:"floor-num"},[e("span",[t._v(t._s(a.localName))])]),e("div",{staticClass:"floor-space"},t._l(a.dataSpaces,(function(s,n){return e("div",{key:n,staticClass:"space-box",style:{width:a.spacewidth+"%"}},[e("div",{staticClass:"space-name",style:{backgroundColor:t.selectColor(s.avgValues,t.selIndicatorId,!0)}},[t._v(t._s(s.localName))])])})),0)])})),0)])},n=[],i=(e("a9e3"),e("4de4"),e("fb6a"),e("d81d"),e("99af"),e("b680"),e("c7cd"),e("159b"),e("b0c0"),e("c1df")),o=e.n(i),c=e("5e54"),r={name:"FloorSpace",data:function(){return{selIndicator:{},selIndicatorId:"",nowIndicatorIndex:null,allIndicator:[{id:"temp",code:"Tdb",name:"温度",img:e("4038"),unit:"℃",fixed:1},{id:"humidity",code:"RH",name:"湿度",img:e("d7c9"),unit:"%",fixed:0},{id:"co2",code:"CO2",name:"CO₂",img:e("4a22"),unit:"ppm",fixed:0},{id:"methanal",code:"HCHO",name:"甲醛",img:e("3eec"),unit:"mg/m³",fixed:2},{id:"pm25",code:"PM2d5",name:"PM2.5",img:e("b9dd"),unit:"ug/m³",fixed:0}],allFloor:[],firstPageParams:[],secondPageParams:[],nowPage:1,pageNum:0,showFloors:[],totalAvgValues:null}},props:{showPing:{type:Number,default:function(){return 0}}},watch:{showPing:function(t,a){2==t&&(this.nowPage=1,this.queryFs())}},mounted:function(){},destroyed:function(){console.log("horfloorspace---destroyed")},methods:{selectColor:c["a"],clickIndicator:function(t){this.nowIndicatorIndex=t},getTimeFloorParam:function(){var t=this,a=1==this.nowPage?this.firstPageParams:this.secondPageParams,e=this;this.queryParam(a).then((function(){setTimeout((function(){if(e.nowIndicatorIndex=e.nowIndicatorIndex+1,5==e.nowIndicatorIndex){if(e.pageNum==e.nowPage)return e.nowIndicatorIndex=0,void e.$emit("donetowpage");2==e.pageNum&&1==e.nowPage&&(e.nowPage=2,e.nowIndicatorIndex=0)}t.getTimeFloorParam()}),2e3)}))},queryFs:function(){var t=this;this.$axios.post(this.$api.queryFs,{criteria:{projectId:"Pj1101020002"},size:14,page:1,orders:[{column:"floorSequenceId",asc:!0}]}).then((function(a){var e=a.data.content||[];e=e.filter((function(t){return t.spaceNum>0})),t.allFloor=e;var s,n,i=e.length;i<=7?(s=i,n=0,t.pageNum=1):(s=Math.ceil(i/2),n=Math.floor(i/2),t.pageNum=2);var o=t.floorHandle(s),c=t.floorHandle(n),r=e.slice(0,s),l=e.slice(s);t.firstPageParams=r.map((function(t){var a={};return a.id=t.id,a.projectId="Pj1101020002",a.spaceNum=o,a})),t.secondPageParams=l.map((function(t){var a={};return a.id=t.id,a.projectId="Pj1101020002",a.spaceNum=c,a})),t.nowIndicatorIndex=0,t.getTimeFloorParam()})).catch((function(t){}))},queryParam:function(t){var a=this,e=o()(),s=o()().subtract(30,"minutes"),n=s.format("YYYYMMDDHHmmss"),i=e.format("YYYYMMDDHHmmss"),c=this.nowIndicatorIndex;this.selIndicator=this.allIndicator[c];var r=this.selIndicator.code;return this.$axios.post("".concat(this.$api.queryParam,"?endTime=").concat(i,"&startTime=").concat(n,"¶m=").concat(r),t).then((function(t){var e=t.data.data.floors||[];a.totalAvgValues=t.data.data.avgValues||null,a.totalAvgValues&&(a.totalAvgValues=a.totalAvgValues.toFixed(a.selIndicator.fixed)),e.forEach((function(t){var s=a.allFloor.filter((function(a){return a.id==t.id})),n=s[0]||{};t.name=n.name,t.localId=n.localId,t.localName=n.localName;var i=t.dataSpaces.length,o=a.spaceHandle(i,e.length);t.spacewidth=100/o})),a.showFloors=e,a.selIndicatorId=a.selIndicator.id})).catch((function(t){}))},spaceHandle:function(t,a){var e=t;if(1==a)t>2&&t<=24?e=t/2:t>24&&t<=36?e=Math.ceil(t/3):t>36&&t<=48?e=Math.ceil(t/4):t>48&&t<=60&&(e=Math.ceil(t/5));else{var s=Math.ceil(t/16);e=Math.ceil(t/s)}return e},floorHandle:function(t){var a=1;switch(t){case 1:a=60;break;case 2:a=48;break;case 3:case 4:a=32;break;case 5:case 6:case 7:a=16;break}return a}}},l=r,d=(e("fe12"),e("2877")),u=Object(d["a"])(l,s,n,!1,null,"69661f85",null);a["a"]=u.exports},5982:function(t,a,e){},"63c2":function(t,a,e){"use strict";e.r(a);var s=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"horizontalScreen"},[e("div",{staticClass:"bg"},[e("img",{attrs:{src:t.bgImg}})]),e("div",{staticClass:"container"},[e("div",{staticClass:"hor-head"},[e("pageHead")],1),e("div",{directives:[{name:"show",rawName:"v-show",value:1==t.nowPage,expression:"nowPage == 1"}],staticClass:"hor-nowData-content firstScreen flexBetween"},[e("div",{staticClass:"content-left"},[e("NowData",{attrs:{screenType:"hor"}}),e("div",{staticClass:"content-left-cont flexBetween"},[e("div",{staticClass:"bottom-left"},[e("HorAirSwitch")],1),e("div",{ref:"bottomright",staticClass:"bottom-right"},[e("TemChart",{attrs:{screenType:"hor",showPing:t.nowPage}})],1)])],1),e("div",{staticClass:"content-right"},[e("LastMonth",{attrs:{screenType:"hor"}})],1)]),e("div",{directives:[{name:"show",rawName:"v-show",value:2==t.nowPage,expression:"nowPage == 2"}],staticClass:"hor-nowData-content"},[e("horFloorSpace",{attrs:{showPing:t.nowPage},on:{donetowpage:t.doneTowPage}})],1),e("div",{directives:[{name:"show",rawName:"v-show",value:3==t.nowPage,expression:"nowPage == 3"}],staticClass:"hor-nowData-content secondScreen"},[e("div",{staticClass:"flexBetween"},[e("div",{staticClass:"left horizontalClass"},[t._m(0),e("div",{staticClass:"subhead-title"},[t._v("低能耗亲自然")]),e("div",{staticClass:"left-content"},[e("div",{staticClass:"left-bg lastbg"},[e("img",{attrs:{src:t.lastMonthTotal}})]),e("div",{staticClass:"left-text"},[e("div",{staticClass:"left-content-first"},[t._v("比基准能耗")]),e("div",{staticClass:"left-content-next"},[t._v(" 节能"),e("span",{staticClass:"next-num"},[t._v(t._s(t.lastAllEnergy.energyCompare)+"%")])]),e("div",{staticClass:"left-content-first blue"},[t._v(" 总能耗"+t._s(t.lastAllEnergy.energyTotal)+"KWh ")])])])]),e("div",{staticClass:"right "},[e("lastSaveEnergy",{attrs:{screenType:"hor"}})],1)]),e("div",{staticClass:"chart-box "},[e("lastEnergyChart",{attrs:{screenType:"hor",showPing:t.nowPage}})],1)])])])},n=[function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"head-title"},[e("span",[t._v("上月总能耗")])])}],i=e("5530"),o=(e("a9e3"),e("b680"),e("0f36")),c=e.n(o),r=e("3cda"),l=e("031b"),d=e("6c53"),u=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"airSwitch horizontalClass"},[t._m(0),e("div",{staticClass:"air-status",class:{close:!t.airStatus}},[e("span",[t._v(t._s(t.airStatus?"空调已开启":"空调已关闭"))])]),e("div",{staticClass:"air-bg"},[e("img",{attrs:{src:[t.airStatus?t.img.openImg:t.img.closeImg]}})]),e("div",{staticClass:"air-rate"},[e("span",[t._v("空调开启率")]),e("span",{staticClass:"air-rate-value"},[t._v(t._s(t.airValue)+"%")])])])},m=[function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"head-title"},[e("span",[t._v("空调实时开关")])])}],f=e("2505"),g=e.n(f),h=e("64f6"),v=e.n(h),p=e("2f62"),w={name:"AirSwitch",props:{},data:function(){return{img:{openImg:g.a,closeImg:v.a}}},computed:Object(i["a"])({},Object(p["c"])({airValue:function(t){var a=t.airCondition.openRate,e=a?Number((100*a).toFixed(0)):a;return e},airStatus:function(t){JSON.parse(JSON.stringify(t));var a=t.airCondition.openRate,e=!!a;return e}})),watch:{airStatus:function(t,a){}}},C=w,I=(e("b57f"),e("2877")),P=Object(I["a"])(C,u,m,!1,null,"371b780b",null),b=P.exports,x=e("3156"),_=e("6c6f"),y=e("b3e6"),S=e("5311"),N={components:{pageHead:r["a"],NowData:l["a"],HorAirSwitch:b,LastMonth:d["a"],lastSaveEnergy:x["a"],TemChart:_["a"],lastEnergyChart:y["a"],horFloorSpace:S["a"]},data:function(){return{bgImg:c.a,lastMonthTotal:e("f92d"),nowPage:null,horiInterval:null}},mounted:function(){this.nowPage=1,this.timePageShow()},methods:{doneTowPage:function(){this.nowPage=3,this.timePageShow()},timePageShow:function(){var t=this,a=setTimeout((function(){t.nowPage=t.nowPage+1,4==t.nowPage&&(t.nowPage=1),2!=t.nowPage?t.timePageShow():clearTimeout(a)}),6e3)}},destroyed:function(){},computed:Object(i["a"])({},Object(p["c"])({lastAllEnergy:function(t){var a=JSON.parse(JSON.stringify(t.lastAllEnergy));return a.energyCompare=Number((100*a.energyCompare).toFixed(0)),a}}))},T=N,F=(e("bf11"),Object(I["a"])(T,s,n,!1,null,"0ceb2d5a",null));a["default"]=F.exports},b57f:function(t,a,e){"use strict";e("5982")},b919:function(t,a,e){},b9dd:function(t,a,e){t.exports=e.p+"static/img/pm25.0ee7d1d0.png"},bf11:function(t,a,e){"use strict";e("de86")},d7c9:function(t,a,e){t.exports=e.p+"static/img/shidu.62e5bc4c.png"},de86:function(t,a,e){},f92d:function(t,a,e){t.exports=e.p+"static/img/hor_lastMonthTotal.a895b905.png"},fe12:function(t,a,e){"use strict";e("b919")}}]);
|