chunk-390d4e2b.869c5079.js 15 KB

12
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-390d4e2b"],{1767:function(e,t,n){},2909:function(e,t,n){"use strict";function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function o(e){if(Array.isArray(e))return a(e)}n.d(t,"a",(function(){return l}));n("a4d3"),n("e01a"),n("d28b"),n("a630"),n("d3b7"),n("3ca3"),n("ddb0");function r(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}n("fb6a"),n("b0c0"),n("25f0");function c(e,t){if(e){if("string"===typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}function i(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function l(e){return o(e)||r(e)||c(e)||i()}},"4df4":function(e,t,n){"use strict";var a=n("0366"),o=n("7b0b"),r=n("9bdd"),c=n("e95a"),i=n("50c4"),l=n("8418"),s=n("35a1");e.exports=function(e){var t,n,d,u,m,b,f=o(e),p="function"==typeof this?this:Array,h=arguments.length,g=h>1?arguments[1]:void 0,y=void 0!==g,v=s(f),O=0;if(y&&(g=a(g,h>2?arguments[2]:void 0,2)),void 0==v||p==Array&&c(v))for(t=i(f.length),n=new p(t);t>O;O++)b=y?g(f[O],O):f[O],l(n,O,b);else for(u=v.call(f),m=u.next,n=new p;!(d=m.call(u)).done;O++)b=y?r(u,g,[d.value,O],!0):d.value,l(n,O,b);return n.length=O,n}},"6b71":function(e,t,n){"use strict";n("aca4")},"712d":function(e,t,n){"use strict";n("1767")},"9bdd":function(e,t,n){var a=n("825a"),o=n("2a62");e.exports=function(e,t,n,r){try{return r?t(a(n)[0],n[1]):t(n)}catch(c){throw o(e),c}}},a630:function(e,t,n){var a=n("23e7"),o=n("4df4"),r=n("1c7e"),c=!r((function(e){Array.from(e)}));a({target:"Array",stat:!0,forced:c},{from:o})},aca4:function(e,t,n){e.exports={menuBg:"#fff",menuText:"#162b64",menuActiveText:"#435ebe"}},cda6:function(e,t,n){"use strict";n.r(t);n("b0c0");var a=n("7a23"),o=function(e){return Object(a["pushScopeId"])("data-v-529a347c"),e=e(),Object(a["popScopeId"])(),e},r={class:"detail-content"},c=o((function(){return Object(a["createElementVNode"])("div",{class:"title"},"环境参数",-1)})),i={key:0,class:"container-text"},l={class:"chart-box"},s={key:1,class:"no-data",height:"100%",width:"100%"},d=["src"],u=o((function(){return Object(a["createElementVNode"])("span",null,"暂无数据",-1)})),m=["src"],b=o((function(){return Object(a["createElementVNode"])("span",null,"该空间数据未配置",-1)})),f={class:"detail-desc clearfix"},p={class:"detail-text"},h=o((function(){return Object(a["createElementVNode"])("span",{class:"circle"},null,-1)})),g={class:"tem-span"},y={class:"detail-bottom"},v={class:"text-img"},O=["src"];function w(e,t,n,o,w,j){var x=Object(a["resolveComponent"])("com-chart"),C=Object(a["resolveComponent"])("van-tab"),S=Object(a["resolveComponent"])("van-tabs"),k=Object(a["resolveComponent"])("van-loading");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",r,[c,Object(a["createVNode"])(S,{class:"my-tab",onChange:e.changeTab,active:e.active,"onUpdate:active":t[0]||(t[0]=function(t){return e.active=t})},{default:Object(a["withCtx"])((function(){return[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.titleList,(function(t,n){return Object(a["openBlock"])(),Object(a["createBlock"])(C,{title:t.name,name:t.funcid,key:t.id+""+n},{default:Object(a["withCtx"])((function(){return[t.options?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",i,[Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])("Tdb,RH"==t.funcid?"温湿度逐时分布":"浓度逐时分布"),1)])):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("div",l,[t.options?(Object(a["openBlock"])(),Object(a["createBlock"])(x,{key:0,options:t.options,id:t.funcid,height:"100%",width:"100%"},null,8,["options","id"])):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",s,[1===t.showNowData?(Object(a["openBlock"])(),Object(a["createElementBlock"])(a["Fragment"],{key:0},[Object(a["createElementVNode"])("img",{src:e.parseImgUrl("page-officehome","empty.png"),alt:""},null,8,d),u],64)):Object(a["createCommentVNode"])("",!0),2===t.showNowData?(Object(a["openBlock"])(),Object(a["createElementBlock"])(a["Fragment"],{key:1},[Object(a["createElementVNode"])("img",{src:e.parseImgUrl("page-officehome","empty.png"),alt:""},null,8,m),b],64)):Object(a["createCommentVNode"])("",!0)]))]),Object(a["createElementVNode"])("div",f,[Object(a["createElementVNode"])("div",p,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(t.text,(function(e,t){return Object(a["openBlock"])(),Object(a["createElementBlock"])("p",{key:t},[h,Object(a["createElementVNode"])("span",g,Object(a["toDisplayString"])(e),1)])})),128))])]),Object(a["createElementVNode"])("div",y,[Object(a["createElementVNode"])("p",null,Object(a["toDisplayString"])(t.level),1),Object(a["createElementVNode"])("div",v,[Object(a["createElementVNode"])("img",{src:t.img,alt:""},null,8,O)])])]})),_:2},1032,["title","name"])})),128))]})),_:1},8,["onChange","active"]),e.showLoading?(Object(a["openBlock"])(),Object(a["createBlock"])(k,{key:0,class:"temp-loading"})):Object(a["createCommentVNode"])("",!0)])}n("4de4"),n("d81d"),n("fb6a"),n("a9e3"),n("b680"),n("ac1f"),n("1276");var j=n("5530"),x=n("2909"),C=(n("96cf"),n("1da1")),S=n("3485"),k=n("313e"),E=n("459d"),I=n("d257"),A=(n("e7e5"),Object(a["defineComponent"])({props:{query:{type:Object,default:function(){}}},components:{ComChart:S["a"]},setup:function(e){var t=[{id:0,name:"CO₂",funcid:"CO2",unit:"ppm",text:["CO₂,一种无色无味气体","CO₂的标准为1000ppm","CO₂过高,影响人体呼吸系统","大脑易疲劳,工作效率降低","室内人员增多,新风量不足时","室内CO₂的浓度就会上升","宜开窗通风或增加送风量","来降低CO₂浓度"],level:"不同浓度下的人体感觉",img:Object(I["x"])("page-officehome","CO2.png"),showNowData:0,options:null},{id:1,name:"PM2.5",unit:"ug/m³",funcid:"PM2d5",options:null,text:["PM2.5,直径≤2.5微米的颗粒","PM2.5的平均值在0-35μg/m3","PM2.5浓度过高,影响人体","呼吸系统和心血管系统健康","应开启除尘净化设备"],level:"不同PM2.5浓度对应等级",img:Object(I["x"])("page-officehome","pm25.png"),showNowData:0},{id:2,name:"甲醛",unit:"mg/㎡",options:null,funcid:"HCHO",text:["甲醛(HCHO)是无色有刺激性有机气体。甲醛的主要危害表现为对皮肤和黏膜的刺激作用,室内甲醛浓度长期偏高会引发呼吸系统,消化系统或免疫系统疾病。","甲醛多来自于室内装饰材料,如家具,墙纸,油漆以及胶水、芳香剂等物质。","由于家具,胶水中的甲醛挥发是一个长期缓慢的过程,因此甲醛超标常表现为室内甲醛浓度长期处于较高的数值。","最为有效避免甲醛超标的方法是持续高效的通风,通过引入室外新鲜空气将室内甲醛浓度长期控制在低于有害标准的范围内。","由于甲醛传感器为电化学传感器,存在交叉干扰的特性,当室内出现无害的挥发性气体时也会导致测得的甲醛浓度短暂升高,如吸烟,使用香水,空气清新剂,喷洒酒精,甚至剥橘子皮溅出的汁液均可能在短时间内影响甲醛传感器的读数,在去除干扰源后,此种影响会在短时间内消除,可不必因此产生担忧。"],level:"不同阈值浓度对应标准",img:Object(I["x"])("page-officehome","methanal.png"),showNowData:0},{id:3,name:"温湿度",unit:"%",funcid:"Tdb,RH",options:null,text:["温度表示空气的冷热程度","夏季高温高湿会使人烦躁、疲倦","冬季湿度过高时,人体感觉越冷","冬季湿度低易引起呼吸道不适","室外温度较高时,宜遮阳关窗"],level:"",img:"",showNowData:0}],n={funcid:"",spaceId:""},o=[],r=Object(a["reactive"])({active:"",showLoading:!1,activeItem:o,titleList:t,query:e.query?e.query:n,parseImgUrl:I["x"],loadingStart:function(){r.showLoading=!0},loadinngEnd:function(){r.showLoading=!1},setActiveItem:function(){for(var e=0;e<r.titleList.length;e++)if(r.titleList[e].funcid==r.query.funcid){r.active=r.titleList[e].funcid,r.activeItem=r.titleList[e];break}},changeTab:function(){r.query.spaceId&&(r.query.funcid=r.active,r.setActiveItem(),r.queryAllData())},queryAllData:function(){if(r.activeItem.funcid){var e=r.activeItem.funcid;r.loadingStart(),"Tdb,RH"===e?r.formatTowOptions(e):r.formatOptios(e)}},getData:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t={spaceId:r.query.spaceId,funcid:e},n=Object(I["A"])(t);return Object(E["g"])(n).then((function(t){var n=t,a=n.propertyData,o=n.dayTarget,c=r.formatChartData(a,o,e),i=r.setMax(e,o);return"Tdb"===e||"RH"===e?c:{chartData:c,chartMax:i}})).catch((function(e){r.loadinngEnd()}))},formatChartData:function(e,t,n){if(!Array.isArray(e)||!Array.isArray(t))return[];var a=e&&e.slice(1)||[],o=[],r=function(e){return Number(e)},c={PM2d5:r,CO2:r,HCHO:function(e){return Number(Number(e).toFixed(2))},RH:r,Tdb:r};if(a&&a.length>0)for(var i=0;i<a.length;i++){var l=a[i];l[1]="-9999"==l[1]?null:c[n](l[1])}if(a.length&&t.length&&a.length===t.length)for(var s=0;s<t.length;s++){var d=t[s],u="";d.time&&(u=d.time.slice(0,2)+":"+d.time.slice(2,4));var m={time:u,sales:a[s][1]};o.push(m)}return o},checkIsData:function(e){var t=e.filter((function(e){return null===e}));return e.length!==t.length},formatOptios:function(e){return Object(C["a"])(regeneratorRuntime.mark((function t(){var n,a,o,c,i,l,s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return r.activeItem.options=null,t.next=3,r.getData(e);case 3:n=t.sent,a=n.chartData,o=n.chartMax,r.loadinngEnd(),c=a.map((function(e){return e.sales})),i=a.map((function(e){return e.time})),l=Math.max.apply(Math,Object(x["a"])(c)),i&&i.length?r.checkIsData(c)?(s={tooltip:{trigger:"axis"},grid:{top:25,left:10,right:20,bottom:20,containLabel:!0},xAxis:[{type:"category",boundaryGap:!1,axisLine:{lineStyle:{color:"#ECEFF4"}},axisLabel:{fontSize:12,interval:8,showMaxLabel:!0,color:"#C4C4C4"},data:i}],yAxis:[{name:"单位:(".concat(r.activeItem.unit,")"),type:"value",nameGap:12,nameTextStyle:{color:"#9FA9BC",padding:"PM2.5"==r.activeItem.name?[0,25,0,55]:[0,25,0,25]},axisTick:{show:!1},axisLine:{lineStyle:{color:"#ECEFF4"}},axisLabel:{fontSize:12,color:"#C4C4C4"},splitLine:{lineStyle:{type:"dashed",color:"#ECEFF4"}}}],series:[{markLine:l&&o&&l>=o?{symbol:"none",data:[{name:"均线",type:"max",yAxis:o,lineStyle:{normal:{color:"red",width:2,type:"solid"}}}],label:{normal:{show:!0,position:"middle",textStyle:{fontSize:12,fontWeight:600}}}}:{},name:r.activeItem.name,type:"line",smooth:!0,symbol:"circle",symbolSize:5,showSymbol:!1,areaStyle:{color:new k["a"].LinearGradient(0,1,0,0,[{offset:0,color:"rgba(79, 128, 255, 0.1)"},{offset:1,color:"rgba(79, 128, 255, 0.6)"}],!1),shadowColor:"rgba(79, 128, 255, 0.1)",shadowBlur:10},itemStyle:{color:"rgba(79, 128, 255, 1)",borderColor:"rgba(79, 128, 255, 1)",borderWidth:12},data:c}]},r.activeItem.options=s,r.activeItem.showNowData=0):(r.activeItem.options=null,r.activeItem.showNowData=1):(r.activeItem.options=null,r.activeItem.showNowData=2);case 11:case"end":return t.stop()}}),t)})))()},formatTowOptions:function(e){return Object(C["a"])(regeneratorRuntime.mark((function t(){var n,a,o,c,i,l,s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return r.activeItem.options=null,n=e.split(","),t.next=4,r.getData(n[0]);case 4:return a=t.sent,t.next=7,r.getData(n[1]);case 7:o=t.sent,r.loadinngEnd(),c=a.map((function(e){return e.time})),i=a.map((function(e){return e.sales})),l=o.map((function(e){return e.sales})),s={tooltip:{trigger:"axis"},legend:{icon:"circle",itemWidth:14,itemHeight:5,itemGap:20,data:["温度","湿度"],textStyle:{fontSize:12,color:"#C4C4C4"}},grid:{top:30,left:5,right:15,bottom:20,containLabel:!0},xAxis:[{type:"category",boundaryGap:!1,axisLine:{lineStyle:{color:"#ECEFF4"}},axisLabel:{fontSize:12,interval:8,showMaxLabel:!0,color:"#C4C4C4"},data:c}],yAxis:[{name:"单位:℃",type:"value",nameGap:12,nameTextStyle:{color:"#9FA9BC",padding:[0,25,0,15]},axisTick:{show:!1},axisLine:{lineStyle:{color:"#ECEFF4"}},axisLabel:{fontSize:12,color:"#C4C4C4"},splitLine:{lineStyle:{type:"dashed",color:"#ECEFF4"}}},{name:"单位:%",nameGap:12,nameTextStyle:{color:"#9FA9BC",padding:[0,0,0,10]},type:"value",axisTick:{show:!1},axisLine:{show:!1,lineStyle:{color:"#ECEFF4"}},axisLabel:{fontSize:12,color:"#C4C4C4"},splitLine:{show:!1}}],series:[{name:"温度",type:"line",smooth:!0,symbol:"circle",symbolSize:5,yAxisIndex:0,showSymbol:!1,lineStyle:{width:1},areaStyle:{color:new k["a"].LinearGradient(0,0,0,1,[{offset:0,color:"rgba(79, 128, 255, 0.165)"},{offset:.8,color:"rgba(79, 128, 255, 0)"}],!1),shadowColor:"rgba(79, 128, 255,0.1)",shadowBlur:10},itemStyle:{color:"rgba(79, 128, 255, 1)",borderColor:"rgba(79, 128, 255, 1)",borderWidth:12},data:i},{name:"湿度",type:"line",smooth:!0,symbol:"circle",symbolSize:5,showSymbol:!1,yAxisIndex:1,lineStyle:{width:1},areaStyle:{color:new k["a"].LinearGradient(0,0,0,1,[{offset:0,color:"rgba(137,189,27, 0.3)"},{offset:.8,color:"rgba(137,189,27, 0.165)"}],!1),shadowColor:"rgba(79, 128, 255,0.1)",shadowBlur:10},itemStyle:{color:"rgb(137,189,27)",borderColor:"rgba(137,189,2,1)",borderWidth:12},data:l}]},c&&c.length?r.checkIsData(i)||r.checkIsData(l)?(r.activeItem.options=s,r.activeItem.showNowData=0):(r.activeItem.options=null,r.activeItem.showNowData=1):(r.activeItem.options=null,r.activeItem.showNowData=2);case 14:case"end":return t.stop()}}),t)})))()},setMax:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0,n=0;switch(e){case"CO2":for(var a=0;a<t.length;a++)t[a].co2Max&&(n=t[a].co2Max);break;case"PM2d5":for(var o=0;o<t.length;o++)t[o].pm25Max&&(n=t[o].pm25Max);break;case"HCHO":for(var r=0;r<t.length;r++)t[r].hchoMax&&(n=t[r].hchoMax);break;case"RH":n=0;break;case"Tdb":n=0;break;default:break}return n}});return Object(a["watch"])(e,(function(e){r.query=JSON.parse(JSON.stringify(e.query)),r.setActiveItem(),r.queryAllData()}),{deep:!0,immediate:!0}),Object(a["onMounted"])((function(){})),Object(j["a"])({},Object(a["toRefs"])(r))}})),N=(n("712d"),n("6b71"),n("6b0d")),L=n.n(N);const D=L()(A,[["render",w],["__scopeId","data-v-529a347c"]]);t["default"]=D},fb6a:function(e,t,n){"use strict";var a=n("23e7"),o=n("861d"),r=n("e8b5"),c=n("23cb"),i=n("50c4"),l=n("fc6a"),s=n("8418"),d=n("b622"),u=n("1dde"),m=n("ae40"),b=u("slice"),f=m("slice",{ACCESSORS:!0,0:0,1:2}),p=d("species"),h=[].slice,g=Math.max;a({target:"Array",proto:!0,forced:!b||!f},{slice:function(e,t){var n,a,d,u=l(this),m=i(u.length),b=c(e,m),f=c(void 0===t?m:t,m);if(r(u)&&(n=u.constructor,"function"!=typeof n||n!==Array&&!r(n.prototype)?o(n)&&(n=n[p],null===n&&(n=void 0)):n=void 0,n===Array||void 0===n))return h.call(u,b,f);for(a=new(void 0===n?Array:n)(g(f-b,0)),d=0;b<f;b++,d++)b in u&&s(a,d,u[b]);return a.length=d,a}})}}]);
  2. //# sourceMappingURL=chunk-390d4e2b.869c5079.js.map