chunk-52677c34.6023cc00.js 15 KB

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