(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-c605e0d4"],{"0b08":function(e,t,a){"use strict";var s=TypeError;e.exports=function(e,t){if(ee.form.name=e.validForbid(t,50)},model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1)],1),t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"核算行业:",prop:"type"}},[t("el-select",{staticStyle:{width:"100%"},attrs:{clearable:"",placeholder:"请选择核算行业"},on:{change:e.typeChange},model:{value:e.form.type,callback:function(t){e.$set(e.form,"type",t)},expression:"form.type"}},e._l(e.types,(function(e){return t("el-option",{key:e.id,attrs:{label:e.name,value:e.code}})})),1)],1)],1),t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"核算策略:",prop:"strategy"}},[t("el-select",{staticStyle:{width:"100%"},attrs:{clearable:"",placeholder:"请选择核算策略"},model:{value:e.form.strategy,callback:function(t){e.$set(e.form,"strategy",t)},expression:"form.strategy"}},e._l(e.options,(function(e){return t("el-option",{key:e.dictKey,attrs:{label:e.dictValue,value:e.dictKey}})})),1)],1)],1),t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"状态:",prop:"status"}},[t("el-radio-group",{model:{value:e.form.status,callback:function(t){e.$set(e.form,"status",t)},expression:"form.status"}},[t("el-radio",{attrs:{label:1}},[e._v("启 用")]),t("el-radio",{attrs:{label:0}},[e._v("禁 用")])],1)],1)],1)],1),t("el-row",{attrs:{gutter:10}},[t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"核算年度:",prop:"formYear"}},[t("el-date-picker",{staticStyle:{width:"100%"},attrs:{clearable:"",format:"yyyy","value-format":"yyyy","picker-options":e.pickerOptions,type:"year",placeholder:"请选择核算年度"},model:{value:e.form.formYear,callback:function(t){e.$set(e.form,"formYear",t)},expression:"form.formYear"}})],1)],1)],1),t("el-card",[t("div",{attrs:{slot:"header"},slot:"header"},[e._v("核算范围")]),t("div",[t("el-checkbox-group",{model:{value:e.checkListA,callback:function(t){e.checkListA=t},expression:"checkListA"}},e._l(e.checkList,(function(a){return t("el-checkbox",{key:a.id,attrs:{checked:"",disabled:"",label:a.code}},[e._v(e._s(a.name+"["+a.scope+"]"))])})),1)],1)])],1),t("div",{staticClass:"avue-dialog__footer"},[t("el-button",{attrs:{icon:"el-icon-circle-plus-outline",type:"primary"},on:{click:e.save}},[e._v("生成模板")]),t("el-button",{attrs:{icon:"el-icon-circle-close"},on:{click:e.hadleClose}},[e._v("取 消")])],1)],1)],1)},p=[],d=a("e14d"),m=a("2c14"),u={components:{template:C},data(){return{form:{status:1},pickerOptions:{disabledDate:e=>e.getTime()>Date.now()},checkListA:[],checkListB:[],checkListC:[],checkList:[],activeName:"first",options:null,dialogd:!1,datatime:null,types:[],scopeA:null,scopeB:null,scopeC:null,titleText:"",info:{},rules:{name:[{required:!0,message:"请输入模板名称",trigger:"blur"}],type:[{required:!0,message:"请选择核算行业",trigger:"change"}],strategy:[{required:!0,message:"请选择核算策略",trigger:"change"}],status:[{required:!0,message:"请选择状态",trigger:"change"}],formYear:[{required:!0,message:"请选择核算年度",trigger:"change"}]}}},created(){this.init()},computed:{...Object(l["b"])(["companyInfo"])},methods:{init(){this.getList(),this.getTreeList()},getList(){let e="vztimes_strategy";Object(d["getList"])(e).then(e=>{this.options=e.data.data[0].children})},getTreeList(){Object(m["getParentList"])({parentId:0}).then(e=>{this.types=e.data.data.records})},handleOpen(e){this.form={status:1},console.log(e),this.form.companyId=this.companyInfo.tenantId,1==e.titleText&&(this.titleText="新增模板"),2==e.titleText&&(this.titleText="编辑模板"),e.id&&(this.form=e,this.form.type=e.typeCode,this.form.formYear=e.formYear.toString(),this.typeChange(e.typeCode)),this.dialogd=!0},hadleClose(){this.$confirm("是否关闭当前窗口?").then(e=>{this.dialogd=!1}).catch(e=>{})},typeChange(e){console.log(e);let t={ancestors_like:e+","};this.checkList=[],Object(m["getChildList"])(t).then(e=>{this.checkList=e.data.data})},fileMsgListCom(e){return e.forEach(e=>{filter})},save(){this.$refs.form.validate((e,t)=>{e&&(this.types.forEach(e=>{e.code==this.form.type&&(this.form.type=e.id)}),Object(r["saveTemplent"])(this.form).then(e=>{this.$message.success("提交成功"),this.dialogd=!1,this.form={},this.$emit("change")}))})}}},f=u,h=a("1805"),b=Object(h["a"])(f,c,p,!1,null,"0770770a",null),y=b.exports,g={components:{templateInfo:y},computed:{...Object(l["b"])(["permission"])},data(){return{form:{},query:{},page:{size:10,current:1,total:0},selectionList:[],option:{calcHeight:30,tip:!1,searchShow:!0,searchMenuSpan:6,align:"center",border:!0,index:!0,delBtn:!1,addBtn:!1,editBtn:!1,menu:!0,menuAlign:"left",menuHeaderAlign:"left",selection:!0,dialogClickModal:!0,column:[{label:"模板名称",prop:"name",search:!0},{label:"核算行业",prop:"type",search:!0,type:"select",dicUrl:"/api/vz/factor/type/tree",props:{label:"name",value:"id"}},{label:"核算策略",prop:"strategy"},{label:"核算年度",prop:"formYear"},{label:"创建时间",prop:"createTime",type:"datetime",format:"yyyy-MM-dd",valueFormat:"yyyy-MM-dd"},{label:"状态",prop:"status",type:"select",dicData:[{label:"禁用",value:0},{label:"启用",value:1}]}]},data:[]}},created(){this.getList()},methods:{handleAdd(){let e={titleText:1};this.$refs.templateInfo.handleOpen(e)},handleDelete(e){this.$confirm("确定将选择数据删除?",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{let t=e.id;Object(r["remove"])(t).then(e=>{this.getList(),this.$message({type:"success",message:"删除成功"})})})},async handleEdit(e){let t={planYear:e.formYear};const{data:a}=await getPlanYear(t),s=a.data;e.titleText=2,s?this.$message({type:"warning",message:"请先删除当年排放计划"}):this.$refs.templateInfo.handleOpen(e)},searchReset(){this.getList()},searchChange(e,t){this.page.current=1,this.getList(e),t()},selectionChange(e){this.selectionList=e},selectionClear(){this.selectionList=[],this.$refs.crud.toggleSelection()},currentChange(e){this.page.current=e,this.getList()},sizeChange(e){this.page.size=e,this.getList()},refreshChange(){this.onLoad(this.page,this.query)},getList(e){let t={current:this.page.current,size:this.page.size};Object(r["getList"])(Object.assign(t,e)).then(e=>{const t=e.data.data;this.page.total=t.total,t.records.forEach(e=>{e.datatime=e.startDate+"——"+e.endDate}),this.data=t.records,this.selectionClear()})}}},v=g,w=Object(h["a"])(v,o,n,!1,null,null,null),C=w.exports,L=function(){var e=this,t=e._self._c;return t("div",{staticClass:"upload"},[t("el-upload",{key:e.filePath,staticClass:"upload-demo",attrs:{accept:".xls, .xlsx, .doc, .docx, .ppt, .pptx, .vsd, .pdf, .png, .jpg",drag:e.isDrag,headers:e.headers,action:e.action,"before-upload":e.beforeUploadFile,"on-preview":e.handlePreview,"on-remove":e.handleRemove,"show-file-list":e.showFileList,"file-list":e.fileList,"on-success":e.handleAvatarSuccess,"list-type":e.listType,limit:e.limit,"on-exceed":e.handleExceed}},[e.isDrag?e._e():t("el-button",{attrs:{type:"primary",icon:"el-icon-upload2"}},[e._v("上传")]),e.isDrag?t("i",{staticClass:"el-icon-upload"}):e._e()],1)],1)},F=[],k=a("2f3b"),_=a("0a5a"),E={name:"upload",props:{listType:{type:String,default:"text"},isDrag:{type:Boolean,default:!1},showFileList:{type:Boolean,default:!0},filePath:{type:String,default:""},isAddFile:{type:Boolean,default:!0},files:{type:Array,default:()=>[]},limit:{type:Number,default:5}},watch:{files:{immediate:!0,handler(e,t){e&&e!=t&&(this.fileList=e)}}},model:{prop:"filePath",event:"change"},data(){return{headers:{bucket:"information","Blade-Auth":"bearer "+Object(_["getToken"])()},action:"/api/blade-resource/oss/endpoint/put-file-type",extensionList:["doc","docx","ppt","pptx","xls","xlsx","vsd","pdf","png","jpg"],fileList:[],ids:"",attachUrl:""}},methods:{handleExceed(e,t){this.$message.warning(`当前限制选择 ${this.limit} 个文件,本次选择了 ${e.length} 个文件,共选择了 ${e.length+t.length} 个文件`)},beforeUploadFile(e){const t=e.size/1024/1024<10;if(!t)return this.$message.error("上传文件大小不能超过10M!"),!1;let a=e.name.substr(e.name.lastIndexOf(".")+1,e.name.length);return this.extensionList.indexOf(a)<0&&"text"==this.listType?(this.$message.warning(this.extensionList.toString()),!1):t},handleRemove(e,t){this.$emit("removeFile",e)},async getFileList(){if(0!=this.ids.length){var e={id:this.ids.toString()};await Object(k["getFileDetail"])(e).then(e=>{const{data:t}=e;"200"==t.code&&(this.attachUrl=t.data.attachUrl)})}},async handlePreview(e){this.ids=e.id,await this.getFileList(),window.open(this.attachUrl)},handleAvatarSuccess(e,t){const{data:a}=e;let s={name:a.originalName,attachUrl:a.link,id:a.attachId,url:a.link};this.fileList.push(s),this.addFile(this.fileList)},async download(e){this.ids=e.id,await this.getFileList(),window.open(this.attachUrl)},addFile(e){this.$emit("change",e)}}},x=E,W=(a("c40f"),Object(h["a"])(x,L,F,!1,null,"417470ae",null)),B=W.exports,S=a("882a"),$={components:{Template:C,vzUpLoad:B},props:{isExamine:{type:Boolean,default:!0},detailId:{type:String,default:""}},data(){return{activeName:"jc",emissionForm:{dataBase:{enterpriseName:"",year:"",month:"",industry:"",includeCarbonClassification:"",includeCarbonMarkets:"",energyConsumption:"",industrialWastewaterGeneration:"",industrialSolidWasteGeneration:"",industrialRepeatedWaterConsumption:"",industrialSolidWasteUtilization:"",totalIndustrialWaterConsumption:"",greenWaterConsumption:"",blueWaterConsumption:"",greyWaterConsumption:"",produceValue:"",carbonEmissions:"",remark:""},carbonDataEntityList:[{certifiedEmissionsReductionType:"",certifiedEmissionsReductionQuantity:"",carbonEmissionsList:[],certifiedEmissionsReductionQuantityList:[]}],baseReneWableEnergyEntities:[{renewableEnergyType:"",renewableEnergyUsage:"",renewableEnergyUsageList:[]}]},emissionFormtwo:{powerDataEntity:{plantUnitTotalEmission:"",fossilFuelsTotalEmission:"",purchaseElectricityUsage:"",purchaseElectricityEmission:""},powerCarbonGenerationEntities:[{unitName:"",unitEmissions:"",powerGeneration:"",powerSupply:"",heatingLoad:"",heatingRatio:"",powerCoalConsumption:"",heatingCoalConsumption:"",operationHours:"",loadOutputCoefficient:"",electricityCarbonIntensity:"",heatingCarbonEmission:"",powerGenerationList:[],heatingLoadList:[],operationHoursList:[],powerSupplyList:[]}],powerFossilFuelDataEntities:[{typesOfFossilFuels:"",fossilFuelUsage:"",fossilFuelEmissions:"",fossilFuelUsageList:[],fossilFuelEmissionsList:[]}]},form:{checkStatus:"YTG",checkExplain:"审核通过,无意见"},rules:{checkExplain:[{required:!0,message:"请输入审核意见",trigger:"blur"}]},fileLists:[],fileList:{carbonEmissionsList:[],certifiedEmissionsReductionQuantityList:[],energyConsumptionList:[],industrialWastewaterGenerationList:[],industrialSolidWasteGenerationList:[],industrialRepeatedWaterConsumptionList:[],industrialSolidWasteUtilizationList:[],totalIndustrialWaterConsumptionList:[],greenWaterConsumptionList:[],blueWaterConsumptionList:[],greyWaterConsumptionList:[],renewableEnergyUsageList:[],produceValueList:[],powerGenerationList:[],powerSupplyList:[],heatingLoadList:[],operationHoursList:[],fossilFuelUsageList:[],fossilFuelEmissionsList:[],purchaseElectricityUsageList:[],emissionsPurchasingElectricityList:[]},filteredArray:[],visibleData:{},renewableEnergyTypeList:[],typesOfFossilFuelsList:[]}},computed:{...Object(l["b"])(["companyInfo"])},watch:{"form.checkStatus"(e){this.form.checkExplain="YTG"==e?"审核通过,无意见":"审核不通过"}},created(){this.init()},methods:{async init(){await this.getSystemDict(),this.detailDataManage(this.detailId)},getSystemDict(){Object(k["qrCode"])("NYLX").then(e=>{const t=e.data.data[0].children.filter(e=>"NYLXDL"!==e.dictKey);this.typesOfFossilFuelsList=t||[]}),Object(k["qrCode"])("KZSNYSYLX").then(e=>{this.renewableEnergyTypeList=e.data.data[0].children||[]})},handleClick(){},handleChange(){},detailDataManage(e){Object(S["detailDataManage"])(e).then(e=>{if(200===e.data.code){const t=e.data.data;this.fileLists=t.attachesList,this.emissionForm.dataBase=t.dataBaseVo.dataBase,this.emissionForm.carbonDataEntityList=t.dataBaseVo.carbonDataEntityList,this.emissionForm.baseReneWableEnergyEntities=t.dataBaseVo.baseReneWableEnergyEntities.map(e=>{let t=this.renewableEnergyTypeList.find(t=>t.dictKey==e.renewableEnergyType);return e.renewableEnergyType=t.dictValue,e}),this.emissionFormtwo.powerDataEntity=t.powerDataInfoVo.powerDataEntity,this.emissionFormtwo.powerCarbonGenerationEntities=t.powerDataInfoVo.powerCarbonGenerationEntities,this.emissionFormtwo.powerFossilFuelDataEntities=t.powerDataInfoVo.powerFossilFuelDataEntities.map(e=>{let t=this.typesOfFossilFuelsList.find(t=>t.dictKey==e.typesOfFossilFuels);return e.typesOfFossilFuels=t.dictValue,e}),this.getFileList()}})},getFileList(){this.fileLists.forEach(e=>{const t=e.dataSource+"List";this.fileList[t].push(e)})},download(e){let t={id:this.detailId,property:e||""};Object(S["udownloadDataReview"])(t).then(e=>{const t=e.data,a=new Blob([t],{type:"application/zip;chartset=UTF-8"}),s=document.createElement("a"),i=window.URL.createObjectURL(a);s.href=i,s.download="相关文件",document.body.appendChild(s),s.click(),document.body.removeChild(s),window.URL.revokeObjectURL(i)})},formInfo(){return{checkStatus:"YTG",checkExplain:"审核通过,无意见"}},handleCancel(){this.formInfo()},handletExamine(e){this.$refs.formex.validate((e,t)=>{if(e){let e={id:this.detailId,dataStatus:this.form.checkStatus,remark:this.form.checkExplain};Object(S["updateDataReview"])(e).then(e=>{200===e.data.code&&(this.$message.success("审核成功"),this.$emit("colose"))})}})}}},U=$,T=(a("a43a"),Object(h["a"])(U,s,i,!1,null,"1d412174",null));t["a"]=T.exports},a43a:function(e,t,a){"use strict";a("f5ae")},aada:function(e,t,a){"use strict";var s=a("921c"),i=a("c6d5"),l=a("de6a"),o=a("0b08"),n=URLSearchParams,r=n.prototype,c=i(r.append),p=i(r["delete"]),d=i(r.forEach),m=i([].push),u=new n("a=1&a=2&b=3");u["delete"]("a",1),u["delete"]("b",void 0),u+""!=="a=2"&&s(r,"delete",(function(e){var t=arguments.length,a=t<2?void 0:arguments[1];if(t&&void 0===a)return p(this,e);var s=[];d(this,(function(e,t){m(s,{key:t,value:e})})),o(t,1);var i,n=l(e),r=l(a),u=0,f=0,h=!1,b=s.length;while(u