(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5d23b120"],{1971:function(t,e,n){"use strict";n("1dc9")},"1dc9":function(t,e,n){},"456d":function(t,e,n){var i=n("4bf8"),a=n("0d58");n("5eda")("keys",(function(){return function(t){return a(i(t))}}))},"475d":function(t,e,n){"use strict";n("c1ab")},"5eda":function(t,e,n){var i=n("5ca1"),a=n("8378"),s=n("79e5");t.exports=function(t,e){var n=(a.Object||{})[t]||Object[t],o={};o[t]=e(n),i(i.S+i.F*s((function(){n(1)})),"Object",o)}},"5ee8":function(t,e,n){"use strict";var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"chartOfContributionRate",attrs:{id:"chartOfContributionRate"}})},a=[],s=(n("7f7f"),n("ac6a"),n("456d"),n("313e")),o={props:{contributionRateData:{type:Object,default:function(){}}},data:function(){return{kindArray:[]}},computed:{},created:function(){},mounted:function(){this.initCharts()},watch:{contributionRateData:function(t,e){this.initCharts()}},methods:{initCharts:function(){var t=this,e=this.contributionRateData.time;delete this.contributionRateData.time;var n=Object.keys(this.contributionRateData),i=n.indexOf("本市"),a=n.splice(i,1)[0];n.push(a);var o={},r=document.getElementById("chartOfContributionRate"),c=s["init"](r),l=[];o.config={rotate:0,align:"center",verticalAlign:"middle",position:"top",distance:15,onChange:function(){var t={rotate:o.config.rotate,align:o.config.align,verticalAlign:o.config.verticalAlign,position:o.config.position,distance:o.config.distance};c.setOption({series:[{label:t},{label:t},{label:t},{label:t}]})}};var u={show:!0,rotate:o.config.rotate,align:o.config.align,verticalAlign:o.config.verticalAlign,position:o.config.position,distance:o.config.distance,color:"gray",formatter:function(t){return t.data.name?t.data.value+"("+t.data.name+")":t.data.value},fontSize:12,rich:{name:{}}};n.forEach((function(e){if(e in t.contributionRateData){var n={name:e,type:"bar",barGap:0,label:u,emphasis:{focus:"series"},data:t.contributionRateData[e].data};l.push(n)}}));var d={tooltip:{trigger:"axis",formatter:function(t){for(var e=t[0].axisValue+"</br>",n=0;n<t.length;n++)e=e+'<span style="background-color: '.concat(t[n].color,'; width: 14px; height: 12px;display: inline-block;margin-right: 4px;border-radius: 4px"></span>')+t[n].seriesName+": "+(null===t[n].value?"-":t[n].value)+"</br>";return e},backgroundColor:"rgba(255,255,255,1)",color:"gray",borderWidth:"1",borderColor:"#d9d9d9",textStyle:{color:"#808080"},axisPointer:{type:"shadow",lineStyle:{color:"rgba(128, 128, 128, .6)"}}},legend:{data:n},toolbox:{show:!0,orient:"vertical",left:"right",top:"top",feature:{saveAsImage:{show:!0}}},xAxis:[{type:"category",axisTick:{show:!1},data:e}],yAxis:[{type:"value"}],dataZoom:[{type:"inside"}],series:l};d&&c.setOption(d)}}},r=o,c=(n("475d"),n("2877")),l=Object(c["a"])(r,i,a,!1,null,null,null);e["a"]=l.exports},7672:function(t,e,n){"use strict";var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("el-container",{staticClass:"contribution_container"},[n("el-aside",{staticStyle:{"background-color":"#EEF1F6","overflow-y":"hidden"},attrs:{width:"300px"}},[t._t("industry"),t._v(" "),t._t("regional"),t._v(" "),n("el-card",{staticClass:"industry",staticStyle:{position:"absolute",left:"10px",bottom:"0px",height:"calc(100% - 350px)","background-color":"#EEF1F6"}},[n("div",{staticClass:"industry_header"},[n("p",{staticStyle:{margin:"0",display:"inline-block","line-height":"49px","font-weight":"500","font-size":"16px"}},[t._v("设备列表")])]),t._v(" "),n("el-scrollbar",{staticClass:"deviceInfo"},t._l(t.selectedDevice,(function(e){return n("span",{key:e.mac,staticClass:"deviceItem",on:{click:function(n){return t.showDevice(e)}}},[t._v(t._s(e.name))])})),0)],1)],2),t._v(" "),n("el-main",{staticStyle:{padding:"0",height:"100%"}},[n("div",{staticStyle:{width:"100%",height:"100%",position:"relative"}},[t._t("industryMap"),t._v(" "),t._t("regionalMap"),t._v(" "),n("div",{attrs:{id:"container"}})],2)])],1)},a=[];n("ac6a"),n("7f7f"),n("c5f6");function s(t,e){var n=52.35987755982988,i=t-.0065,a=e-.006,s=Math.sqrt(i*i+a*a)-2e-5*Math.sin(a*n),o=Math.atan2(a,i)-3e-6*Math.cos(i*n),r=s*Math.cos(o),c=s*Math.sin(o);return[c,r]}var o={props:{selectedDevice:{type:Array,default:function(){return[]}}},data:function(){return{map:null,infoWindow:null,markers:[]}},watch:{selectedDevice:{immediate:!0,handler:function(t,e){this.$emit("sendData",{map:this.map,markers:this.markers,infoWindow:this.infoWindow})}}},created:function(){},mounted:function(){var t=this;this.$nextTick((function(){t.initMap()}))},methods:{initMap:function(){var t=this,e=new AMap.Map("container",{resizeEnable:!0,rotateEnable:!0,pitchEnable:!0,zoom:14,pitch:80,expandZoomRange:!0,zooms:[3,20],center:[120.9781494,31.4265156]});this.map=e,this.map.on("click",(function(){null!==t.infoWindow&&t.infoWindow.close()}))},showDevice:function(t){var e=s(Number(t.longitude),Number(t.latitude)),n=new AMap.LngLat(e[1],e[0]);this.map.setCenter([e[1],e[0]]),this.map.setZoom(20);var i=t.professions.map((function(t){return t.dataValue})),a='<div style="padding: 12px 0 2px 0;font-size: 14px">\n <span style="">设备:</span><span style=""> '.concat(t.name,'</span><br/>\n <span style="">行业:</span><span style=""> ').concat(i.join(","),'</span><br/>\n <span style="">区域:</span><span style=""> ').concat(t.town.townName,"</span>\n </div>"),o=new AMap.InfoWindow({position:n,offset:new AMap.Pixel(14,-30),content:a});o.open(this.map,n),this.infoWindow=o,this.$emit("sendData",{map:this.map,markers:this.markers,infoWindow:this.infoWindow})},addMarker:function(t){var e=this;this.markers=[],t.forEach((function(t){var i=s(Number(t.longitude),Number(t.latitude)),a=new AMap.LngLat(i[1],i[0]),o=new AMap.Marker({position:a,icon:n("fb93"),extData:{device:t}}),r=t.professions.map((function(t){return t.dataValue})),c='<div style="padding: 12px 0 2px 0;font-size: 14px">\n <span style="">设备:</span><span style=""> '.concat(t.name,'</span><br/>\n <span style="">行业:</span><span style=""> ').concat(r.join(","),'</span><br/>\n <span style="">区域:</span><span style=""> ').concat(t.town.townName,"</span>\n </div>"),l=new AMap.InfoWindow({position:a,offset:new AMap.Pixel(14,-30),content:c});o.on("click",(function(){l.open(e.map,o.getPosition()),e.infoWindow=l,e.$emit("sendData",{map:e.map,markers:e.markers,infoWindow:e.infoWindow})})),e.markers.push(o)})),this.map.add(this.markers)},govMt:function(){var t=this;this.$request({url:"govMonitorPoint/getGovMonitorPointsByOrganizationId",method:"get",params:{organizationId:this.$store.state.orgId}}).then((function(e){if(0===e.code&&e.data.length>0&&e.data.length>0){e.data.forEach((function(e){var i=s(Number(e.longitude),Number(e.latitude)),a=new AMap.LngLat(i[1],i[0]),o=new AMap.Marker({position:a,offset:new AMap.Pixel(-26,-24),icon:n("96d4")}),r='<div style="padding: 12px 0 2px 0;font-size: 14px">\n <span style="">站点名:</span><span style=""> '.concat(e.name,"</span><br/>\n </div>"),c=new AMap.InfoWindow({position:a,offset:new AMap.Pixel(-2,-16),content:r});o.on("click",(function(){c.open(t.map,o.getPosition()),t.infoWindow=c}));new AMap.Circle({radiu:5e3,center:a,strokeColor:"red",strokeWeight:2,strokeStyle:"solid",fillColor:"#fff",fillOpacity:0,map:t.map});o.setMap(t.map)}));var i=s(Number(e.data[0].longitude),Number(e.data[0].latitude));t.map.setCenter([i[1],i[0]])}}))}},beforeDestroy:function(){this.map=null}},r=o,c=(n("c1b9"),n("2877")),l=Object(c["a"])(r,i,a,!1,null,null,null);e["a"]=l.exports},"96d4":function(t,e,n){t.exports=n.p+"static/img/gk.b6147806.png"},aa77:function(t,e,n){var i=n("5ca1"),a=n("be13"),s=n("79e5"),o=n("fdef"),r="["+o+"]",c="
",l=RegExp("^"+r+r+"*"),u=RegExp(r+r+"*$"),d=function(t,e,n){var a={},r=s((function(){return!!o[t]()||c[t]()!=c})),l=a[t]=r?e(h):o[t];n&&(a[n]=l),i(i.P+i.F*r,"String",a)},h=d.trim=function(t,e){return t=String(a(t)),1&e&&(t=t.replace(l,"")),2&e&&(t=t.replace(u,"")),t};t.exports=d},c1ab:function(t,e,n){},c1b9:function(t,e,n){"use strict";n("d835")},c5f6:function(t,e,n){"use strict";var i=n("7726"),a=n("69a8"),s=n("2d95"),o=n("5dbc"),r=n("6a99"),c=n("79e5"),l=n("9093").f,u=n("11e9").f,d=n("86cc").f,h=n("aa77").trim,p="Number",f=i[p],g=f,m=f.prototype,y=s(n("2aeb")(m))==p,b="trim"in String.prototype,v=function(t){var e=r(t,!1);if("string"==typeof e&&e.length>2){e=b?e.trim():h(e,3);var n,i,a,s=e.charCodeAt(0);if(43===s||45===s){if(n=e.charCodeAt(2),88===n||120===n)return NaN}else if(48===s){switch(e.charCodeAt(1)){case 66:case 98:i=2,a=49;break;case 79:case 111:i=8,a=55;break;default:return+e}for(var o,c=e.slice(2),l=0,u=c.length;l<u;l++)if(o=c.charCodeAt(l),o<48||o>a)return NaN;return parseInt(c,i)}}return+e};if(!f(" 0o1")||!f("0b1")||f("+0x1")){f=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof f&&(y?c((function(){m.valueOf.call(n)})):s(n)!=p)?o(new g(v(e)),n,f):v(e)};for(var k,A=n("9e1e")?l(g):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),w=0;A.length>w;w++)a(g,k=A[w])&&!a(f,k)&&d(f,k,u(g,k));f.prototype=m,m.constructor=f,n("2aba")(i,p,f)}},c80c:function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"contributionRate_body"},[n("ContributionRate",{ref:"contributionRate",attrs:{"selected-device":t.selectedDevices},on:{sendData:t.getData}},[n("template",{slot:"industry"},[n("el-card",{staticClass:"industry",staticStyle:{height:"320px"}},[n("div",{staticClass:"industry_header"},[n("p",{staticStyle:{margin:"0",display:"inline-block","line-height":"49px","font-weight":"500","font-size":"16px"}},[t._v("行业类型: ")]),t._v(" "),n("el-checkbox",{attrs:{indeterminate:t.isIndeterminate},on:{change:t.handleCheckAllChange},model:{value:t.checkAll,callback:function(e){t.checkAll=e},expression:"checkAll"}},[t._v("全选")])],1),t._v(" "),n("div",{staticClass:"checkboxs"},[n("el-checkbox-group",{on:{change:t.handlecheckedindustriesChange},model:{value:t.checkedindustries,callback:function(e){t.checkedindustries=e},expression:"checkedindustries"}},t._l(t.industries,(function(e,i){return n("el-checkbox",{key:i,attrs:{label:e}},[t._v(t._s(e))])})),1)],1)])],1),t._v(" "),n("template",{slot:"industryMap"},[n("span",{staticClass:"contributionRateAnalysis",on:{click:function(e){return t.showContributionRateAnalysis()}}},[t._v("行业贡献率分析")]),t._v(" "),n("el-dialog",{attrs:{title:"行业贡献率分析",visible:t.dialogVisible,width:"60%","close-on-click-modal":!1},on:{"update:visible":function(e){t.dialogVisible=e}}},[n("div",[n("div",{staticClass:"selectInput"},[n("el-select",{staticStyle:{"margin-left":"20px"},attrs:{multiple:"","collapse-tags":"",placeholder:"请选择行业"},on:{change:t.querySensorData},model:{value:t.contributionRateAnalysis.industryValue,callback:function(e){t.$set(t.contributionRateAnalysis,"industryValue",e)},expression:"contributionRateAnalysis.industryValue"}},t._l(t.contributionRateAnalysis.profession,(function(t){return n("el-option",{key:t.dataKey,attrs:{label:t.dataValue,value:t.dataKey}})})),1),t._v(" "),n("el-date-picker",{key:t.contributionRateAnalysis.dateType,ref:"picker",class:{activeDateType:"date"===t.contributionRateAnalysis.dateType},attrs:{align:"right",type:t.contributionRateAnalysis.dateType,placeholder:"选择日期","picker-options":t.contributionRateAnalysis.pickerOptions},model:{value:t.contributionRateAnalysis.dateTime,callback:function(e){t.$set(t.contributionRateAnalysis,"dateTime",e)},expression:"contributionRateAnalysis.dateTime"}}),t._v(" "),n("el-select",{attrs:{filterable:"",placeholder:"请选择因子"},model:{value:t.contributionRateAnalysis.selectSensor,callback:function(e){t.$set(t.contributionRateAnalysis,"selectSensor",e)},expression:"contributionRateAnalysis.selectSensor"}},t._l(t.contributionRateAnalysis.sensors,(function(t){return n("el-option",{key:t.sensorCode,attrs:{label:t.sensorName,value:t.sensorCode}})})),1),t._v(" "),n("el-button",{attrs:{type:"primary",icon:"el-icon-search"},on:{click:t.queryData}},[t._v("查询")])],1)]),t._v(" "),t.chartsFlag?n("contribution-rate-charts",{attrs:{contributionRateData:t.contributionRateAnalysis.datas}}):n("el-empty",{attrs:{description:"请选择并查询"}})],1)],1)],2)],1)},a=[],s=(n("ac6a"),n("456d"),n("7672")),o=n("5ee8"),r={components:{ContributionRate:s["a"],ContributionRateCharts:o["a"]},data:function(){var t=this;return{checkAll:!0,checkedindustries:[],industries:{},isIndeterminate:!1,devices:[],marks:[],map:null,infoWindow:null,selectedDevices:[],dialogVisible:!1,chartsFlag:!1,contributionRateAnalysis:{profession:[],industryValue:[],dateTime:"",dateType:"date",pickerOptions:{disabledDate:function(t){return t.getTime()>Date.now()},shortcuts:[{text:"年",onClick:function(e){t.changeType("year")}},{text:"月",onClick:function(e){t.changeType("month")}},{text:"日",onClick:function(e){t.changeType("date")}}]},selectSensor:"",sensors:[],datas:{}}}},watch:{dialogVisible:function(t,e){if(!t){var n=this;this.contributionRateAnalysis={profession:[],industryValue:[],dateTime:"",dateType:"date",pickerOptions:{disabledDate:function(t){return t.getTime()>Date.now()},shortcuts:[{text:"年",onClick:function(t){n.changeType("year")}},{text:"月",onClick:function(t){n.changeType("month")}},{text:"日",onClick:function(t){n.changeType("date")}}]},selectSensor:"",sensors:[],datas:[]},this.chartsFlag=!1}}},created:function(){},mounted:function(){this.$refs.contributionRate.govMt(),this.getIndustryData(),this.getDeviceData()},methods:{getData:function(t){this.map=t.map,this.marks=t.markers,this.infoWindow=t.infoWindow},handleCheckAllChange:function(t){var e=this;if(t){var n=Object.keys(this.industries).map((function(t){return e.industries[t]}));this.checkedindustries=n,this.selectedDevices=this.devices,0!==this.$refs.contributionRate.markers.length&&this.map.remove(this.$refs.contributionRate.markers),this.$refs.contributionRate.addMarker(this.selectedDevices)}else this.checkedindustries=[],this.selectedDevices=[],0!==this.$refs.contributionRate.markers.length&&this.map.remove(this.$refs.contributionRate.markers),null!==this.infoWindow&&this.infoWindow.close();this.isIndeterminate=!1},handlecheckedindustriesChange:function(t){var e=t.length;this.checkAll=e===Object.keys(this.industries).length,this.isIndeterminate=e>0&&e<Object.keys(this.industries).length,this.selectedDevices=this.devices.filter((function(e){for(var n=Object.keys(e.professions).map((function(t){return e.professions[t].dataValue})),i=0;i<t.length;i++)if(-1!==n.indexOf(t[i]))return e})),0!==this.marks.length?(this.map.remove(this.marks),this.$refs.contributionRate.addMarker(this.selectedDevices)):this.$refs.contributionRate.addMarker(this.selectedDevices),null!==this.infoWindow&&this.infoWindow.close()},getIndustryData:function(){var t=this;this.$request({url:"/sysDict/getSysDictDataByDictType",method:"get",params:{type:"profession"}}).then((function(e){if(0===e.code){t.industries=e.data;var n=Object.keys(t.industries).map((function(e){return t.industries[e]}));t.checkedindustries=n}else t.$message.warning(e.message)}))},getDeviceData:function(){var t=this;this.$request({url:"/organization/getDevicesByOrganizationId",method:"get",params:{organizationId:this.$store.state.orgId}}).then((function(e){0===e.code?(t.devices=e.data,t.selectedDevices=t.devices,0!==t.$refs.contributionRate.markers.length&&t.map.remove(t.$refs.contributionRate.markers),t.$refs.contributionRate.addMarker(t.selectedDevices)):t.$message.warning(e.message)}))},showContributionRateAnalysis:function(){var t=this;this.dialogVisible=!0,this.$request({url:"profession/getProfessionsByOrganizationId",method:"get",params:{organizationId:this.$store.state.orgId}}).then((function(e){0===e.code&&(t.contributionRateAnalysis.profession=e.data)}))},queryData:function(){var t=this;if(0!==this.contributionRateAnalysis.industryValue.length)if(""!==this.contributionRateAnalysis.dateTime)if(""!==this.contributionRateAnalysis.selectSensor){var e=this.contributionRateAnalysis.industryValue.join(","),n=new Date(this.contributionRateAnalysis.dateTime),i="";i="year"===this.contributionRateAnalysis.dateType?n.getFullYear():"month"===this.contributionRateAnalysis.dateType?n.getFullYear()+"-"+(n.getMonth()+1<10?"0"+(n.getMonth()+1):n.getMonth()+1):n.getFullYear()+"-"+(n.getMonth()+1<10?"0"+(n.getMonth()+1):n.getMonth()+1)+"-"+(n.getDate()<10?"0"+n.getDate():n.getDate()),this.$request({url:"profession/professionContribution",method:"get",params:{organizationId:this.$store.state.orgId,professions:e,type:"date"===this.contributionRateAnalysis.dateType?"day":this.contributionRateAnalysis.dateType,time:i,sensorCode:this.contributionRateAnalysis.selectSensor}}).then((function(e){0===e.code?(t.contributionRateAnalysis.datas=e.data,t.chartsFlag=!0):t.chartsFlag=!1}))}else this.$message.warning("请选择因子");else this.$message.warning("请选择日期");else this.$message.warning("请选择行业")},changeType:function(t){var e=this;this.contributionRateAnalysis.dateType=t,this.contributionRateAnalysis.dateTime="",this.$nextTick((function(){e.$refs.picker.focus(),setTimeout((function(){var t=document.getElementsByClassName("el-picker-panel__shortcut");"year"===e.contributionRateAnalysis.dateType?t[0].style.color="#409EFF":"month"===e.contributionRateAnalysis.dateType?t[1].style.color="#409EFF":t[2].style.color="#409EFF"}))}))},querySensorData:function(){var t=this;this.$request({url:"profession/getSensorByProfessions",method:"get",params:{organizationId:this.$store.state.orgId,professions:this.contributionRateAnalysis.industryValue.join(",")}}).then((function(e){0===e.code&&(t.contributionRateAnalysis.sensors=e.data)}))}}},c=r,l=(n("1971"),n("2877")),u=Object(l["a"])(c,i,a,!1,null,null,null);e["default"]=u.exports},d835:function(t,e,n){},fb93:function(t,e,n){t.exports=n.p+"static/img/ico1.390f6315.png"},fdef:function(t,e){t.exports="\t\n\v\f\r \u2028\u2029\ufeff"}}]);
|