(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-8a62b508"],{"00fe":function(t,e,a){},"0b08":function(t,e,a){"use strict";var i=TypeError;t.exports=function(t,e){if(t{const t=["#2474FF","#FFA200","#1C3FFF","#BD1CFF","#1CD4FF","#19C297","#EB5454","#19C25F","#24BDFF","#FF4D01","#EB5486","#19B4C2","#242BFF","#FFF701","#EB54B9","#1927C2","#6624FF","#34FF01","#A054EB"];return t},s=()=>{const t=["#19C297","#FFA200","#2474FF","#EB5454","#C7C7C7","#9F54EB","#42E5E3"];return t}},"913f":function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t._self._c;return e("div",[e("el-card",[e("div",{staticClass:"box_mb"},[e("el-row",{attrs:{gutter:16}},[e("el-col",{attrs:{span:8}},[e("div",{staticClass:"box-top"},[e("div",{staticClass:"header-title"},[t._v("集团配额资产总量")]),e("div",{staticClass:"titledf"},[e("div",{staticClass:"box-bg"},[e("div",{staticClass:"box-df"},[e("span",{staticClass:"text_17"},[t._v(" "+t._s(t.chartData.quotaTotal>1e4?(t.chartData.quotaTotal/1e4).toFixed(2):t.chartData.quotaTotal))]),t.chartData.quotaTotal>1e4?e("span",{staticClass:"text_18"},[t._v("单位:万吨")]):e("span",{staticClass:"text_18"},[t._v("单位:吨")])])])])])]),e("el-col",{attrs:{span:8}},[e("div",{ref:"shureferer",staticClass:"box-top"})]),e("el-col",{attrs:{span:8}},[e("div",{staticClass:"box-top"},[e("div",{staticClass:"header-title"},[t._v("集团配额资产排名")]),e("div",{staticClass:"Proportion"},[e("vz-ranking",{staticStyle:{width:"100%","margin-top":"16px"},attrs:{arr:t.rankingArr,warn:t.maxValue,unit:"吨"}})],1)])])],1)],1),e("div",[e("avue-crud",{ref:"crud",attrs:{option:t.option,data:t.data},on:{"search-change":t.searchChange,"search-reset":t.searchReset,"selection-change":t.selectionChange,"current-change":t.currentChanges,"refresh-change":t.refreshChange,"size-change":t.sizeChange},scopedSlots:t._u([{key:"menu",fn:function({row:a}){return[e("el-button",{attrs:{type:"text",size:"small"},on:{click:function(e){return t.handleView(a)}}},[t._v("查 看")])]}},{key:"menuLeft",fn:function({row:a}){return[e("el-button",{attrs:{type:"primary",icon:"el-icon-upload2"},on:{click:function(e){return t.exportAll(a)}}},[t._v("导 出")])]}}])})],1)])],1)},s=[],r=(a("aada"),a("1287"),a("2fb4"),function(){var t=this,e=t._self._c;return e("div",{staticClass:"out"},[e("div",{staticClass:"outgress"},[e("div",{staticClass:"ossgress",style:{width:t.pie+"%",background:t.className}},[e("div",{staticClass:"drop"})]),0!==t.warn?e("div",{staticClass:"innergress",style:{"margin-left":t.warn+"%"}}):t._e()])])}),n=[],o={props:["pie","warn"],data(){return{}},computed:{className(){return this.piethis.warn?"linear-gradient(211deg, #F64646 0%, #FF7C7C 100%)":void 0}}},l=o,c=(a("f1a7"),a("1805")),d=Object(c["a"])(l,r,n,!1,null,"cbfa5444",null),u=d.exports,h=a("8579"),p=a("f0a4"),g=a("a982"),m=function(){var t=this,e=t._self._c;return e("div",[e("el-drawer",{staticClass:"el-dialog__wrapper avue-dialog avue-crud__dialog",attrs:{title:"详情",visible:t.dialogd,size:"80%","close-on-press-escape":!1,"destroy-on-close":"","append-to-body":"",wrapperClosable:!1},on:{"update:visible":function(e){t.dialogd=e}}},[e("avue-crud",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"crud",attrs:{option:t.option,data:t.data,page:t.page},on:{"update:page":function(e){t.page=e},"search-change":t.searchChange,"search-reset":t.searchReset,"selection-change":t.selectionChange,"current-change":t.currentChange,"size-change":t.sizeChange,"refresh-change":t.refreshChange},scopedSlots:t._u([{key:"id",fn:function({row:a}){return[e("el-button",{attrs:{type:"text",disabled:1==a.isFile},on:{click:function(e){return t.downLoad(a)}}},[t._v("下载")])]}}]),model:{value:t.form,callback:function(e){t.form=e},expression:"form"}}),e("div",{staticClass:"avue-dialog__footer"},[e("el-button",{attrs:{icon:"el-icon-circle-close"},on:{click:t.hadleClose}},[t._v("取 消")])],1)],1)],1)},f=[],v={data(){return{dialogd:!1,isSaving:!1,query:{enterpriseId:""},selectionList:[],option:{height:"auto",calcHeight:30,tip:!1,searchShow:!0,searchMenuSpan:6,align:"center",border:!0,delBtn:!1,addBtn:!1,editBtn:!1,view:!1,menu:!1,column:[{label:"年度",prop:"quotaYear",type:"year",valueFormat:"yyyy",search:!0,display:!1},{label:"配额数量(吨)",prop:"quotaNum",display:!1},{label:"配额类别",prop:"quotaType",search:!0,type:"select",dicUrl:"/api/blade-system/dict/dictionary?code=vztimes_quota",dicFormatter:t=>{var e;return null===(e=t.data)||void 0===e?void 0:e.filter(t=>"quota_year"!==t.dictKey)},props:{label:"dictValue",value:"dictKey"}},{label:"下载",prop:"id",slot:!0},{label:"交易时间",prop:"quotaDate",display:!1},{label:"备注",prop:"remark\t",display:!1}]},page:{size:10,current:1,total:0},data:[]}},computed:{...Object(p["b"])(["companyInfo"])},methods:{getList(t,e){let a={current:t.current,size:t.size};Object(h["getQuotaList"])(Object.assign(a,e)).then(t=>{const e=t.data.data;e?(this.page.total=e.total,this.data=e.records):(this.page.total=0,this.data=[]),this.loading=!1}).catch(t=>{})},currentChange(t){this.page.current=t,this.getList(this.page,this.query)},sizeChange(t){this.page.size=t,this.getList(this.page,this.query)},searchChange(t,e){this.page.current=1;let a={...t,enterpriseId:this.query.enterpriseId};this.getList(this.page,a),e()},searchReset(){this.getList(this.page,this.query)},selectionChange(t){this.selectionList=t.map(t=>t.id)},downLoad(t){let e=t.id;Object(g["getZipFile"])({id:e,responseType:"blob"}).then(t=>{if("text/xml"==t.data.type){const e=t.data,a=new Blob([e],{type:"application/zip;chartset=UTF-8"}),i=document.createElement("a"),s=window.URL.createObjectURL(a);i.href=s,i.download="绿电交易证明文件",document.body.appendChild(i),i.click(),document.body.removeChild(i),window.URL.revokeObjectURL(s)}else this.$message.error("未找到附件资源")})},handleOpen(t){t.enterpriseId?(this.query.enterpriseId=t.enterpriseId,this.getList(this.page,this.query)):this.data=[],this.dialogd=!0},hadleClose(){this.$confirm("是否关闭当前窗口?").then(t=>{this.dialogd=!1}).catch(t=>{})}}},b=v,y=Object(c["a"])(b,m,f,!1,null,"d5c8992c",null),C=y.exports,_=a("1192"),w=a("2c1b"),x=(a("9031"),a("2f3b")),q={components:{quotaView:C,vzStatistic:_["a"],vzProgress:u,vzRanking:w["a"]},computed:{...Object(p["b"])(["permission"])},data(){return{colorArr:[],rankingArr:[],maxValue:0,data:[{enterpriseName:"鹰电能源有限公司",enterpriseId:"1762869596682031106",industryName:"发电行业",quotaNum:"641.00",quotaDate:"2024-03-25"},{enterpriseName:"啸莱能源有限公司",enterpriseId:"1762867586717028353",industryName:"发电行业",quotaNum:"900122200.00",quotaDate:"2024-03-25"}],query:{year:(new Date).getFullYear()},selectionList:[],form:{},loading:!0,page:{size:10,current:1,total:0},optionPie:null,option:{height:"300",tip:!1,searchShow:!0,searchMenuSpan:6,align:"left",headerAlign:"left",border:!1,delBtn:!1,addBtn:!1,editBtn:!1,selection:!0,dialogClickModal:!0,column:[{label:"企业名称",prop:"enterpriseName",fixed:"left",width:200,search:!0,type:"select"},{label:"行业",prop:"industryName",search:!0,type:"select"},{label:"配额总量(吨)",prop:"quotaNum"},{label:"更新日期",prop:"quotaDate"}]},chartData:{chartList:[{name:"quota_sell",value:"229.00"},{name:"quota_for",value:"100.00"},{name:"quota_buy",value:"10229.00"}],rankList:[{enterpriseName:"山横煤电",enterpriseId:"1762867586717028353",industryName:"发电行业",quotaNum:"900122200.00",quotaDate:"2024-03-25"},{enterpriseName:"精益化工",enterpriseId:"1762869596682031106",industryName:"发电行业",quotaNum:"651.00",quotaDate:"2024-03-25"}],quotaTotal:"900122851.00"},typesList:[{id:"1607294764548354050",parentId:"1607294362578841602",code:"vztimes_quota",dictKey:"quota_year",dictValue:"国家分配配额",sort:1,remark:"add",isSealed:0,isDeleted:0,status:0,createTime:null,parentName:null,hasChildren:!1},{id:"1607294990063497217",parentId:"1607294362578841602",code:"vztimes_quota",dictKey:"quota_buy",dictValue:"配额-购入",sort:2,remark:"add",isSealed:0,isDeleted:0,status:0,createTime:null,parentName:null,hasChildren:!1},{id:"1607296088870481921",parentId:"1607294362578841602",code:"vztimes_quota",dictKey:"quota_cell",dictValue:"配额-注销",sort:3,remark:"sub",isSealed:0,isDeleted:0,status:0,createTime:null,parentName:null,hasChildren:!1},{id:"1607296451249958914",parentId:"1607294362578841602",code:"vztimes_quota",dictKey:"quota_for",dictValue:"配额-履约",sort:4,remark:"sub",isSealed:0,isDeleted:0,status:0,createTime:null,parentName:null,hasChildren:!1},{id:"1607296670935019521",parentId:"1607294362578841602",code:"vztimes_quota",dictKey:"quota_sell",dictValue:"配额-售出",sort:5,remark:"sub",isSealed:0,isDeleted:0,status:0,createTime:null,parentName:null,hasChildren:!1}]}},mounted(){this.init(),this.chartData.chartList=this.chartData.chartList.map(t=>{let e=this.typesList.find(e=>e.dictKey==t.name);return t.name=e.dictValue,t}),this.rankingArr=this.chartData.rankList.map(t=>(t.name=t.enterpriseName,t.value=t.quotaNum,t)),this.rankingArr.sort((t,e)=>e.quotaNum-t.quotaNum),this.maxValue=this.rankingArr[0].quotaNum},methods:{currentChanges(t){this.page.current=t,this.getList(this.page)},async init(){this.getQuotaPie()},async getSystemDict(){await Object(x["qrCode"])("vztimes_quota").then(t=>{this.typesList=t.data.data[0].children||[]})},async getCcerTrendChartData(t){await Object(h["getGroupTrendChart"])({year:t}).then(t=>{this.chartData=t.data.data,this.chartData.chartList=this.chartData.chartList.map(t=>{let e=this.typesList.find(e=>e.dictKey==t.name);return t.name=e.dictValue,t}),this.rankingArr=this.chartData.rankList.map(t=>(t.name=t.enterpriseName,t.value=t.quotaNum,t)),this.rankingArr.sort((t,e)=>e.quotaNum-t.quotaNum),this.maxValue=this.rankingArr[0].quotaNum})},getQuotaPie(){let t=this.chartData.chartList;console.log(t,"pieDatapieData"),this.optionPie={title:{text:"集团配额分布",subtext:"单位:吨",left:"left",top:"0",textStyle:{fontSize:16}},tooltip:{trigger:"item",formatter:function(t){var e=t.name+"
",a=t.color;return e+='',e+=t.value+" 吨",e+='
'+t.percent+"%",e}},grid:{top:"25%",right:"6%",left:"5%",bottom:"5%",containLabel:!0},legend:{right:"4%",top:"25%",orient:"vertical",itemWidth:8,itemHeight:8,itemGap:20,icon:"circle",formatter:function(e){let a=t,i=0,s=0;for(let t=0,n=a.length;t{t.setOption(this.optionPie),window.addEventListener("resize",()=>{t.resize()})})},exportAll(){if(this.selectionList.length>0){const t=this.$loading({lock:!0,text:"正在导出文件,请稍等。",spinner:"el-icon-loading",background:"rgba(0, 0, 0, 0.7)"});Object(h["getQuotaExport"])(this.selectionList).then(e=>{t.close();const a=e.data,i=new Blob([a],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),s="配额文件.xlsx";if("download"in document.createElement("a")){const t=document.createElement("a");t.download=s,t.style.display="none",t.href=URL.createObjectURL(i),document.body.appendChild(t),t.click(),URL.revokeObjectURL(t.href),document.body.removeChild(t)}else navigator.msSaveBlob(i,s)})}else this.$message.error("请选择导出的数据")},handleView(t){this.$refs.templateInfo.handleOpen(t)},searchReset(){this.getList(this.page)},searchChange(t,e){this.page.current=1,this.getList(this.page,t),e()},selectionChange(t){this.selectionList=t},selectionClear(){this.selectionList=[],this.$refs.crud.toggleSelection()},currentChange(t){this.page.current=t,this.getList(this.page)},sizeChange(t){this.page.size=t,this.getList(this.page)},refreshChange(){this.getList(this.page,this.query)},getList(t,e){this.loading=!0;let a={current:t.current,size:t.size};this.data=[],Object(h["getgroupPage"])(Object.assign(a,e)).then(t=>{const e=t.data.data;e?(this.page.total=e.total,this.data=e.records):(this.page.total=0,this.data=[]),this.loading=!1,this.selectionClear()}).catch(t=>{this.loading=!1})}}},L=q,k=(a("b4b3"),Object(c["a"])(L,i,s,!1,null,"cc8a756c",null));e["default"]=k.exports},aada:function(t,e,a){"use strict";var i=a("921c"),s=a("c6d5"),r=a("de6a"),n=a("0b08"),o=URLSearchParams,l=o.prototype,c=s(l.append),d=s(l["delete"]),u=s(l.forEach),h=s([].push),p=new o("a=1&a=2&b=3");p["delete"]("a",1),p["delete"]("b",void 0),p+""!=="a=2"&&i(l,"delete",(function(t){var e=arguments.length,a=e<2?void 0:arguments[1];if(e&&void 0===a)return d(this,t);var i=[];u(this,(function(t,e){h(i,{key:e,value:t})})),n(e,1);var s,o=r(t),l=r(a),p=0,g=0,m=!1,f=i.length;while(p