(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-e777c4be"],{"1e82":function(e,t,s){"use strict";s.r(t);var r=function(){var e=this,t=e._self._c;return t("div",{staticClass:"box"},[t("el-card",{staticClass:"box-main"},[t("div",{staticClass:"box-form"},[t("el-form",{ref:"form",attrs:{model:e.form}},[t("el-row",{attrs:{gutter:20}},[t("el-col",{attrs:{span:8}},[t("el-form-item",{attrs:{label:"时间:","label-width":"100px"}},[t("el-select",{attrs:{placeholder:"请选择时间"},model:{value:e.form.time,callback:function(t){e.$set(e.form,"time",t)},expression:"form.time"}},[t("el-option",{attrs:{label:"近一年",value:1}}),t("el-option",{attrs:{label:"近三年",value:3}}),t("el-option",{attrs:{label:"近五年",value:5}}),t("el-option",{attrs:{label:"近十年",value:10}})],1)],1)],1),t("el-col",{attrs:{span:8}},[t("el-form-item",{attrs:{label:"数据类型:","label-width":"100px"}},[t("el-select",{attrs:{placeholder:"请选择数据类型"},model:{value:e.form.dataType,callback:function(t){e.$set(e.form,"dataType",t)},expression:"form.dataType"}},[t("el-option",{attrs:{label:"能碳趋势",value:"能碳趋势"}}),t("el-option",{attrs:{label:"碳排放强度",value:"碳排放强度"}}),t("el-option",{attrs:{label:"工业增加值",value:"工业增加值"}}),t("el-option",{attrs:{label:"工业废水产生量",value:"工业废水产生量"}}),t("el-option",{attrs:{label:"工业固废产生量",value:"工业固废产生量"}}),t("el-option",{attrs:{label:"工业重复用水",value:"工业重复用水"}}),t("el-option",{attrs:{label:"工业固体废物综合利用量",value:"工业固体废物综合利用量"}}),t("el-option",{attrs:{label:"企业产值",value:"企业产值"}})],1)],1)],1),t("el-col",{attrs:{span:8}},[t("el-form-item",{staticStyle:{"text-align":"center"}},[t("el-button",{attrs:{type:"primary"},on:{click:e.search}},[e._v("搜索")]),t("el-button",{on:{click:e.reset}},[e._v("清空")])],1)],1)],1),t("el-row",{attrs:{gutter:20}},[t("el-col",{attrs:{span:8}},[t("el-form-item",{attrs:{label:"企业:","label-width":"100px"}},[t("el-select",{attrs:{multiple:"","collapse-tags":"",placeholder:"请选择企业"},model:{value:e.form.enterprise,callback:function(t){e.$set(e.form,"enterprise",t)},expression:"form.enterprise"}},e._l(e.enterpriseOptions,(function(e){return t("el-option",{key:e.deptName,attrs:{label:e.deptName,value:e.deptName}})})),1)],1)],1)],1)],1)],1),t("div",{staticClass:"box-trend"},[t("div",{staticClass:"trendBox"},[t("div",{ref:"trendRef",staticClass:"trend"})])])])],1)},a=[],i=(s("fcd3"),s("9031"),s("c168")),n=s("2f3b"),l={components:{},computed:{},data(){return{colorArr:[],form:{enterprise:[],dataType:"能碳趋势",time:1},enterpriseOptions:[],loading:!1,page:{size:10,current:1,total:0},selectionList:[]}},mounted(){const e=[{id:"1762867586717028353",tenantId:"416380",parentId:"1762861991238668290",fullName:"陕西榆林能源集团山横煤电有限公司",deptName:"啸莱能源有限公司",ancestors:null,deptCategory:1,sort:null,remark:null,isDeleted:0},{id:"1762869596682031106",tenantId:"416380",parentId:"1762861991238668290",fullName:"陕西精益化工有限公司",deptName:"鹰电能源有限公司",ancestors:null,deptCategory:1,sort:null,remark:null,isDeleted:0},{id:"1762871099350159361",tenantId:"416380",parentId:"1762861991238668290",fullName:"榆能榆神热电有限公司",deptName:"圣莱能源有限公司",ancestors:null,deptCategory:1,sort:null,remark:null,isDeleted:0}];this.form.enterprise.push(e[0].deptName),this.enterpriseOptions=e,this.analyzeRequests(),this.opt([{year:"2024",enterpriseNameList:null,map:[{"啸莱能源有限公司":{energyConsumption:["0","325.0","10.0","122.0","0","210.0","11.0","0","0","0","0","0"],carbonEmissions:["0","11542.0","10.0","220.0","0","212.0","11.0","0","0","0","0","0"],carbonIntensity:["0","0.0748","1.0","0.0098","0","1.0547","1.0","0","0","0","0","0"],industryAdded:["0","125.0","10.0","354.0","0","110.0","11.0","0","0","0","0","0"],wasteWaterGeneration:["0","0","0","0","0","0","0","0","0","0","0","0"],industrialSolidWasteGenerationList:["0","0","0","0","0","0","0","0","0","0","0","0"],industrialRepeatedWaterConsumptionList:["0","0","0","0","0","0","0","0","0","0","0","0"],industrialSolidWasteUtilizationList:["0","0","0","0","0","0","0","0","0","0","0","0"],produceValueList:["0","0","0","0","0","0","0","0","0","0","0","0"]}}]}])},methods:{enterpriseList(){Object(n["api_selectEnterpriseAccount"])().then(e=>{e.data.data})},analyzeRequests(){},search(){this.analyzeRequests()},reset(){this.form={enterprise:[],dataType:"",time:1},this.enterpriseList()},generateMonths(e){const t=(new Date).getFullYear(),s=((new Date).getMonth(),t-e+1),r=t,a=[];for(let i=s;i<=r;i++)for(let e=1;e<=12;e++){const t=`${i}年${String(e).padStart(2,"0")}月`;a.push(t)}return a},getCcerPie(e){let t;"1"==this.form.time?t=this.generateMonths(1):"3"==this.form.time?t=this.generateMonths(3):"5"==this.form.time?t=this.generateMonths(5):"10"==this.form.time&&(t=this.generateMonths(10)),this.optionPie={tooltip:{trigger:"axis",axisPointer:{type:"cross",label:{backgroundColor:"#6a7985"}},formatter:function(e){for(var t,s=e[0].name+"
",r=0;r":e[r].seriesName.includes("碳排放")?t=" (tCO2)
":e[r].seriesName.includes("碳排放强度")?t=" (tCO2/万元)
":e[r].seriesName.includes("工业增加值")?t=" (tce/万元)
":e[r].seriesName.includes("工业废水产生量")||e[r].seriesName.includes("工业固废产生量")||e[r].seriesName.includes("工业重复用水")||e[r].seriesName.includes("工业固体废物综合利用量")?t=" (吨)
":e[r].seriesName.includes("企业产值")&&(t=" (万元)
"),s+='',s+=Number(e[r].value).toFixed(2)+t;return s}},xAxis:[{type:"category",boundaryGap:!1,data:t}],yAxis:[{type:"value",scale:!0}],grid:{top:"20%",left:"4%",right:"4%",bottom:"3%",containLabel:!0},legend:{left:"left",icon:"circle"},color:this.colorArr,series:this.series},this.referer(this.optionPie)},referer(e){var t=this.$echarts.init(this.$refs.trendRef);t.clear(),this.$nextTick(()=>{t.setOption(e),window.addEventListener("resize",()=>{t.resize()})})},opt(e){let t=[];const s={"能碳趋势":["energyConsumption","carbonEmissions"],"碳排放强度":["carbonIntensity"],"工业增加值":["industryAdded"],"工业废水产生量":["wasteWaterGeneration"],"工业固废产生量":["industrialSolidWasteGenerationList"],"工业重复用水":["industrialRepeatedWaterConsumptionList"],"工业固体废物综合利用量":["industrialSolidWasteUtilizationList"],"企业产值":["produceValueList"]};for(let r of e){let e=r.year,a=r.map[0];for(let r in a){let i=a[r];for(let a in i)s[this.form.dataType]&&s[this.form.dataType].includes(a)&&t.push({name:r,type:a,year:parseInt(e),data:i[a]})}}this.optTwo(t,this.form.time)},optTwo(e,t){const s=(e,t)=>{const s=[],a=(new Date).getFullYear(),i=a-t+1;e.forEach(e=>{const r=e.name+"-"+e.type,a=e.year-i;s[r]||(s[r]=Array(12*t).fill(0)),s[r].splice(12*a,12,...e.data)});const n=Object.keys(s).map(e=>{const[a,i]=e.split("-"),n=s[e].length===12*t?s[e]:[],l=r(i);return{name:a+" "+l,type:l,data:n,itemStyle:{borderColor:"#fff",borderWidth:5},type:"line",smooth:!0,showSymbol:!1,symbolSize:0}});return n},r=e=>"energyConsumption"===e?"能耗":"carbonEmissions"===e?"碳排放":"carbonIntensity"===e?"碳排放强度":"industryAdded"===e?"工业增加值":"wasteWaterGeneration"===e?"工业废水产生量":"industrialSolidWasteGenerationList"===e?"工业固废产生量":"industrialRepeatedWaterConsumptionList"===e?"工业重复用水":"industrialSolidWasteUtilizationList"===e?"工业固体废物综合利用量":"produceValueList"===e?"企业产值":e,a=s(e,t);this.series=a,this.getCcerPie()},getList(){this.form.enterprise[0];let e={enterpriseNameList:this.form.enterprise,year:this.form.time};Object(i["api_dataAnalysis"])(e).then(e=>{const t=e.data.data;this.opt(t)})}}},o=l,d=(s("aba2"),s("1805")),p=Object(d["a"])(o,r,a,!1,null,"1e53a240",null);t["default"]=p.exports},9031:function(e,t,s){"use strict";s.d(t,"a",(function(){return r})),s.d(t,"b",(function(){return a}));const r=()=>{const e=["#2474FF","#FFA200","#1C3FFF","#BD1CFF","#1CD4FF","#19C297","#EB5454","#19C25F","#24BDFF","#FF4D01","#EB5486","#19B4C2","#242BFF","#FFF701","#EB54B9","#1927C2","#6624FF","#34FF01","#A054EB"];return e},a=()=>{const e=["#19C297","#FFA200","#2474FF","#EB5454","#C7C7C7","#9F54EB","#42E5E3"];return e}},aba2:function(e,t,s){"use strict";s("f5c8")},f5c8:function(e,t,s){}}]);