1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-16a6d18c"],{"0a05":function(e,t,a){},2382:function(e,t,a){a("910d")},"910d":function(e,t,a){var o=a("23e7"),n=a("c65b"),i=a("59ed"),l=a("825a"),c=a("46c4"),r=a("c5cc"),s=a("9bdd"),d=(a=a("c430"),r((function(){for(var e,t=this.iterator,a=this.predicate,o=this.next;;){if(e=l(n(o,t)),this.done=!!e.done)return;if(s(t,a,[e=e.value,this.counter++],!0))return e}})));o({target:"Iterator",proto:!0,real:!0,forced:a},{filter:function(e){return l(this),i(e),new d(c(this),{predicate:e})}})},cda6:function(e,t,a){a.r(t);var o=a("7a23");let n={class:"detail-content"},i={key:0,class:"container-text"},l={class:"chart-box"},c={key:1,class:"no-data",height:"100%",width:"100%"},r=["src"],s=["src"],d={class:"detail-desc clearfix"},m={class:"detail-text"},b={class:"tem-span"},p={class:"detail-bottom"},h={class:"text-img"},g=["src"];a("14d9"),a("0643"),a("2382"),a("a573");var u=a("3485"),f=a("313e"),y=a("459d"),O=a("d257"),v=(u=Object(o.defineComponent)({props:{query:{type:Object,default:()=>{}}},components:{ComChart:u.a},setup(e){var t=[{id:0,name:"CO₂",funcid:"CO2",unit:"ppm",text:["CO₂,一种无色无味气体","CO₂的标准为1000ppm","CO₂过高,影响人体呼吸系统","大脑易疲劳,工作效率降低","室内人员增多,新风量不足时","室内CO₂的浓度就会上升","宜开窗通风或增加送风量","来降低CO₂浓度"],level:"不同浓度下的人体感觉",img:Object(O.z)("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(O.z)("page-officehome","pm25.png"),showNowData:0},{id:2,name:"甲醛",unit:"mg/㎡",options:null,funcid:"HCHO",text:["甲醛(HCHO)是无色有刺激性有机气体。甲醛的主要危害表现为对皮肤和黏膜的刺激作用,室内甲醛浓度长期偏高会引发呼吸系统,消化系统或免疫系统疾病。","甲醛多来自于室内装饰材料,如家具,墙纸,油漆以及胶水、芳香剂等物质。","由于家具,胶水中的甲醛挥发是一个长期缓慢的过程,因此甲醛超标常表现为室内甲醛浓度长期处于较高的数值。","最为有效避免甲醛超标的方法是持续高效的通风,通过引入室外新鲜空气将室内甲醛浓度长期控制在低于有害标准的范围内。","由于甲醛传感器为电化学传感器,存在交叉干扰的特性,当室内出现无害的挥发性气体时也会导致测得的甲醛浓度短暂升高,如吸烟,使用香水,空气清新剂,喷洒酒精,甚至剥橘子皮溅出的汁液均可能在短时间内影响甲醛传感器的读数,在去除干扰源后,此种影响会在短时间内消除,可不必因此产生担忧。"],level:"不同阈值浓度对应标准",img:Object(O.z)("page-officehome","methanal.png"),showNowData:0},{id:3,name:"温湿度",unit:"%",funcid:"Tdb,RH",options:null,text:["温度表示空气的冷热程度","夏季高温高湿会使人烦躁、疲倦","冬季湿度过高时,人体感觉越冷","冬季湿度低易引起呼吸道不适","室外温度较高时,宜遮阳关窗"],level:"",img:"",showNowData:0}];let a=Object(o.reactive)({active:"",showLoading:!1,activeItem:[],titleList:t,query:e.query||{funcid:"",spaceId:""},parseImgUrl:O.z,loadingStart(){a.showLoading=!0},loadinngEnd(){a.showLoading=!1},setActiveItem(){for(let e=0;e<a.titleList.length;e++)if(a.titleList[e].funcid==a.query.funcid){a.active=a.titleList[e].funcid,a.activeItem=a.titleList[e];break}},changeTab(){a.query.spaceId&&(a.query.funcid=a.active,a.setActiveItem(),a.queryAllData())},queryAllData(){var e;a.activeItem.funcid&&(e=a.activeItem.funcid,a.loadingStart(),"Tdb,RH"===e?a.formatTowOptions(e):a.formatOptios(e))},getData(e=""){var t={spaceId:a.query.spaceId,funcid:e};t=Object(O.C)(t);return Object(y.f)(t).then(t=>{var{propertyData:t,dayTarget:o}=t,o=(t=a.formatChartData(t,o,e),a.setMax(e,o));return"Tdb"===e||"RH"===e?t:{chartData:t,chartMax:o}}).catch(e=>{a.loadinngEnd()})},formatChartData(e,t,a){if(!Array.isArray(e)||!Array.isArray(t))return[];var o=e&&e.slice(1)||[],n=[],i=(e=e=>Number(e),{PM2d5:e,CO2:e,HCHO:function(e){return Number(Number(e).toFixed(2))},RH:e,Tdb:e});if(o&&0<o.length)for(let r=0;r<o.length;r++){var l=o[r];l[1]="-9999"==l[1]?null:i[a](l[1])}if(o.length&&t.length&&o.length===t.length)for(let r=0;r<t.length;r++){var c=t[r];let e="";c={time:e=c.time?c.time.slice(0,2)+":"+c.time.slice(2,4):e,sales:o[r][1]},n.push(c)}return n},checkIsData(e){var t=e.filter(e=>null===e);return e.length!==t.length},async formatOptios(e){a.activeItem.options=null;var{chartData:e,chartMax:t}=await a.getData(e),o=(a.loadinngEnd(),e.map(e=>e.sales)),n=(e=e.map(e=>e.time),Math.max(...o));e&&e.length?a.checkIsData(o)?(e={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:e}],yAxis:[{name:`单位:(${a.activeItem.unit})`,type:"value",nameGap:12,nameTextStyle:{color:"#9FA9BC",padding:"PM2.5"==a.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:n&&t&&t<=n?{symbol:"none",data:[{name:"均线",type:"max",yAxis:t,lineStyle:{normal:{color:"red",width:2,type:"solid"}}}],label:{normal:{show:!0,position:"middle",textStyle:{fontSize:12,fontWeight:600}}}}:{},name:a.activeItem.name,type:"line",smooth:!0,symbol:"circle",symbolSize:5,showSymbol:!1,areaStyle:{color:new f.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:o}]},a.activeItem.options=e,a.activeItem.showNowData=0):(a.activeItem.options=null,a.activeItem.showNowData=1):(a.activeItem.options=null,a.activeItem.showNowData=2)},async formatTowOptions(e){a.activeItem.options=null;e=e.split(",");var t=await a.getData(e[0]),o=(e=await a.getData(e[1]),a.loadinngEnd(),t.map(e=>e.time)),n=(t=t.map(e=>e.sales),e=e.map(e=>e.sales),{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:o}],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 f.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:t},{name:"湿度",type:"line",smooth:!0,symbol:"circle",symbolSize:5,showSymbol:!1,yAxisIndex:1,lineStyle:{width:1},areaStyle:{color:new f.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:e}]});o&&o.length?a.checkIsData(t)||a.checkIsData(e)?(a.activeItem.options=n,a.activeItem.showNowData=0):(a.activeItem.options=null,a.activeItem.showNowData=1):(a.activeItem.options=null,a.activeItem.showNowData=2)},setMax(e="",t){let a=0;switch(e){case"CO2":for(let e=0;e<t.length;e++)t[e].co2Max&&(a=t[e].co2Max);break;case"PM2d5":for(let e=0;e<t.length;e++)t[e].pm25Max&&(a=t[e].pm25Max);break;case"HCHO":for(let e=0;e<t.length;e++)t[e].hchoMax&&(a=t[e].hchoMax);break;case"RH":case"Tdb":a=0}return a}});return Object(o.watch)(e,e=>{a.query=JSON.parse(JSON.stringify(e.query)),a.setActiveItem(),a.queryAllData()},{deep:!0,immediate:!0}),Object(o.onMounted)(()=>{}),{...Object(o.toRefs)(a)}}}),a("de6f"),a("dae7"),a("6b0d"));a=a.n(v);t.default=a()(u,[["render",function(e,t,a,u,f,y){let O=Object(o.resolveComponent)("com-chart"),v=Object(o.resolveComponent)("van-tab");var w=Object(o.resolveComponent)("van-tabs"),C=Object(o.resolveComponent)("van-loading");return Object(o.openBlock)(),Object(o.createElementBlock)("div",n,[t[4]||(t[4]=Object(o.createElementVNode)("div",{class:"title"},"环境参数",-1)),Object(o.createVNode)(w,{class:"my-tab",onChange:e.changeTab,active:e.active,"onUpdate:active":t[0]||(t[0]=t=>e.active=t)},{default:Object(o.withCtx)(()=>[(Object(o.openBlock)(!0),Object(o.createElementBlock)(o.Fragment,null,Object(o.renderList)(e.titleList,(a,n)=>(Object(o.openBlock)(),Object(o.createBlock)(v,{title:a.name,name:a.funcid,key:a.id+""+n},{default:Object(o.withCtx)(()=>[a.options?(Object(o.openBlock)(),Object(o.createElementBlock)("div",i,[Object(o.createElementVNode)("span",null,Object(o.toDisplayString)("Tdb,RH"==a.funcid?"温湿度逐时分布":"浓度逐时分布"),1)])):Object(o.createCommentVNode)("",!0),Object(o.createElementVNode)("div",l,[a.options?(Object(o.openBlock)(),Object(o.createBlock)(O,{key:0,options:a.options,id:a.funcid,height:"100%",width:"100%"},null,8,["options","id"])):(Object(o.openBlock)(),Object(o.createElementBlock)("div",c,[1===a.showNowData?(Object(o.openBlock)(),Object(o.createElementBlock)(o.Fragment,{key:0},[Object(o.createElementVNode)("img",{src:e.parseImgUrl("page-officehome","empty.png"),alt:""},null,8,r),t[1]||(t[1]=Object(o.createElementVNode)("span",null,"暂无数据",-1))],64)):Object(o.createCommentVNode)("",!0),2===a.showNowData?(Object(o.openBlock)(),Object(o.createElementBlock)(o.Fragment,{key:1},[Object(o.createElementVNode)("img",{src:e.parseImgUrl("page-officehome","empty.png"),alt:""},null,8,s),t[2]||(t[2]=Object(o.createElementVNode)("span",null,"该空间数据未配置",-1))],64)):Object(o.createCommentVNode)("",!0)]))]),Object(o.createElementVNode)("div",d,[Object(o.createElementVNode)("div",m,[(Object(o.openBlock)(!0),Object(o.createElementBlock)(o.Fragment,null,Object(o.renderList)(a.text,(e,a)=>(Object(o.openBlock)(),Object(o.createElementBlock)("p",{key:a},[t[3]||(t[3]=Object(o.createElementVNode)("span",{class:"circle"},null,-1)),Object(o.createElementVNode)("span",b,Object(o.toDisplayString)(e),1)]))),128))])]),Object(o.createElementVNode)("div",p,[Object(o.createElementVNode)("p",null,Object(o.toDisplayString)(a.level),1),Object(o.createElementVNode)("div",h,[Object(o.createElementVNode)("img",{src:a.img,alt:""},null,8,g)])])]),_:2},1032,["title","name"]))),128))]),_:1},8,["onChange","active"]),e.showLoading?(Object(o.openBlock)(),Object(o.createBlock)(C,{key:0,class:"temp-loading"})):Object(o.createCommentVNode)("",!0)])}],["__scopeId","data-v-24a1fe60"]])},dae7:function(e,t,a){a("e9c8")},de6f:function(e,t,a){a("0a05")},e9c8:function(e,t,a){e.exports={menuBg:"#fff",menuText:"#162b64",menuActiveText:"#435ebe"}}}]);
|