(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0ac086"],{"188a":function(e,t,a){"use strict";a.r(t);var o=function(){var e=this,t=e._self._c;return t("basic-container",[t("avue-crud",{ref:"crud",attrs:{option:e.option,data:e.data,page:e.page},on:{"update:page":function(t){e.page=t},"search-change":e.searchChange,"search-reset":e.searchReset,"current-change":e.currentChange,"size-change":e.sizeChange,"refresh-change":e.refreshChange},scopedSlots:e._u([{key:"menu",fn:function({row:a}){return[t("el-button",{attrs:{type:"text",size:"small",icon:"el-icon-view"},on:{click:function(t){return e.handleView(a)}}},[e._v("查 看")]),t("el-button",{attrs:{type:"text",size:"small",icon:"el-icon-edit"},on:{click:function(t){return e.handleEdit(a)}}},[e._v("编 辑")]),t("el-button",{attrs:{type:"text",size:"small",icon:"el-icon-download"},on:{click:function(t){return e.handleDownload(a)}}},[e._v("下 载")]),t("el-button",{attrs:{type:"text",size:"small",icon:"el-icon-delete"},on:{click:function(t){return e.handleDelete(a)}}},[e._v("删 除")])]}}])},[t("template",{slot:"menuLeft"},[t("el-button",{attrs:{type:"primary",size:"small",icon:"el-icon-plus"},on:{click:e.handleAdd}},[e._v("新 增 ")])],1)],2),t("cus-drawe",{attrs:{size:"35%",title:e.title,visible:e.visible,buttons:e.buttonsList},on:{handleBeforeClose:e.handleBeforeClose,buttonClick:e.buttonsClick}},[t("el-form",{ref:"ruleForm",staticClass:"demo-ruleForm",attrs:{model:e.ruleForm,rules:e.rules,"label-width":"120px",disabled:e.view}},[t("el-row",[t("el-col",{attrs:{span:24}},[t("el-form-item",{attrs:{label:"方法学名称:",prop:"methodologyName"}},[t("el-input",{attrs:{clearable:""},model:{value:e.ruleForm.methodologyName,callback:function(t){e.$set(e.ruleForm,"methodologyName",t)},expression:"ruleForm.methodologyName"}})],1)],1),t("el-col",{attrs:{span:24}},[t("el-form-item",{attrs:{label:"方法学版本:",prop:"methodologyVersion"}},[t("el-input",{attrs:{clearable:""},model:{value:e.ruleForm.methodologyVersion,callback:function(t){e.$set(e.ruleForm,"methodologyVersion",t)},expression:"ruleForm.methodologyVersion"}})],1)],1),t("el-col",{attrs:{span:24}},[t("el-form-item",{attrs:{label:"发布部门:",prop:"methodologyDept"}},[t("el-input",{attrs:{clearable:""},model:{value:e.ruleForm.methodologyDept,callback:function(t){e.$set(e.ruleForm,"methodologyDept",t)},expression:"ruleForm.methodologyDept"}})],1)],1)],1),t("el-col",{attrs:{span:24}},[t("el-form-item",{attrs:{label:"适用条件:",prop:"applicableConditions"}},[t("el-input",{attrs:{type:"textarea",clearable:""},model:{value:e.ruleForm.applicableConditions,callback:function(t){e.$set(e.ruleForm,"applicableConditions",t)},expression:"ruleForm.applicableConditions"}})],1)],1),t("el-col",{attrs:{span:24}},[t("el-form-item",{attrs:{label:"日期:",prop:"methodologyDate"}},[t("el-date-picker",{staticStyle:{width:"100%"},attrs:{clearable:"",format:"yyyy-MM-dd","value-format":"yyyy-MM-dd",type:"date",placeholder:"请选择日期"},model:{value:e.ruleForm.methodologyDate,callback:function(t){e.$set(e.ruleForm,"methodologyDate",t)},expression:"ruleForm.methodologyDate"}})],1)],1),t("el-col",{attrs:{span:24}},[t("el-form-item",{attrs:{label:"证明文件:",prop:"attachList"}},[t("vzUpLoad",{ref:"upload",attrs:{files:e.ruleForm.attachList},on:{change:e.changeFile,removeFile:e.removeFile}})],1)],1)],1)],1)],1)},l=[],i=(a("fcd3"),a("aada"),a("1287"),a("2fb4"),a("6fbe")),r=a("f0a4"),n=a("0e0b"),s=a("a982"),d=a("af95"),u={data(){return{ruleForm:{attachList:[],methodologyName:"",methodologyVersion:"",methodologyDept:"",applicableConditions:"",methodologyDate:""},view:!1,title:"",query:{},buttonsList:[],loading:!0,visible:!1,isEdit:!1,filteredArray:[],page:{size:10,current:1,total:0},option:{height:"auto",calcHeight:30,tip:!1,searchShow:!0,searchMenuSpan:6,border:!1,index:!1,viewBtn:!1,editBtn:!1,addBtn:!1,delBtn:!1,menuWidth:260,column:[{label:"方法学名称",prop:"methodologyName",search:!0,searchLabelWidth:100},{label:"方法学版本",prop:"methodologyVersion",search:!0,searchLabelWidth:100},{label:"适用条件",prop:"applicableConditions"},{label:"发布部门",prop:"methodologyDept"},{label:"日期",prop:"methodologyDate"}]},data:[{id:"1769986636495400962",createUser:"1762881630190538753",createDept:"1762867586717028353",createTime:"2024-03-19 15:17:54",updateUser:"1762881283053162498",updateTime:"2024-03-29 18:13:41",status:1,isDeleted:0,tenantId:"416380",methodologyName:"并网光热发电",methodologyVersion:"CCER—01—001—V01",methodologyDept:"生态环境部",applicableConditions:"本文件适用于独立的并网光热发电项目,或者“光热",methodologyDate:"2024-03-19",projectStatus:null,attachList:[{id:"1769986629549633538",createUser:"1762881630190538753",createDept:"1762867586717028353",createTime:"2024-03-19 15:17:52",updateUser:"1762881283053162498",updateTime:"2024-03-29 18:13:41",status:1,isDeleted:0,tenantId:"416380",target:null,orgId:"1769986636495400962",title:"upload/20240319151751836/截屏2024-01-29 16.55.49.png",introduction:"截屏2024-01-29 16.55.49.png",attachUrl:"/bucket2/upload/20240319151751836/截屏2024-01-29 16.55.49.png",bucketName:"bucket2",type:"png",domainUrl:"bucket2",name:"截屏2024-01-29 16.55.49.png",originalName:"截屏2024-01-29 16.55.49.png",extension:"png",attachSize:"1545236",industryId:null,industryName:null,year:null,month:null,dataSource:null,carbonFootprintId:null}]},{id:"1773601063656357889",createUser:"1762881283053162498",createDept:"1762861991238668290",createTime:"2024-03-29 14:40:20",updateUser:"1762881283053162498",updateTime:"2024-03-29 18:13:51",status:1,isDeleted:0,tenantId:"416380",methodologyName:"方法学一",methodologyVersion:"CCER—01—001—V02",methodologyDept:"生态环境部",applicableConditions:"本文件适用于独立的并网光热发电项目,或者光热",methodologyDate:"2024-03-27",projectStatus:null,attachList:[{id:"1773601056475709442",createUser:"1762881283053162498",createDept:"1762861991238668290",createTime:"2024-03-29 14:40:18",updateUser:"1762881283053162498",updateTime:"2024-03-29 18:13:51",status:1,isDeleted:0,tenantId:"416380",target:null,orgId:"1773601063656357889",title:"upload/20240329144018415/img2.png",introduction:"img2.png",attachUrl:"/bucket2/upload/20240329144018415/img2.png",bucketName:"bucket2",type:"png",domainUrl:"bucket2",name:"img2.png",originalName:"img2.png",extension:"png",attachSize:"58734",industryId:null,industryName:null,year:null,month:null,dataSource:null,carbonFootprintId:null},{id:"1773654786332131329",createUser:"1762881283053162498",createDept:"1762861991238668290",createTime:"2024-03-29 18:13:49",updateUser:"1762881283053162498",updateTime:"2024-03-29 18:13:51",status:1,isDeleted:0,tenantId:"416380",target:null,orgId:"1773601063656357889",title:"upload/20240329181348604/1708596498165.jpg",introduction:"1708596498165.jpg",attachUrl:"/bucket2/upload/20240329181348604/1708596498165.jpg",bucketName:"bucket2",type:"jpg",domainUrl:"bucket2",name:"1708596498165.jpg",originalName:"1708596498165.jpg",extension:"jpg",attachSize:"401963",industryId:null,industryName:null,year:null,month:null,dataSource:null,carbonFootprintId:null}]},{id:"1773601063656357889",createUser:"1762881283053162498",createDept:"1762861991238668290",createTime:"2024-03-29 14:40:20",updateUser:"1762881283053162498",updateTime:"2024-03-29 18:13:51",status:1,isDeleted:0,tenantId:"416380",methodologyName:"方法学二",methodologyVersion:"CCER—01—001—V02",methodologyDept:"生态环境部",applicableConditions:"本文件适用于独立的并网光热发电项目,或者光热",methodologyDate:"2024-03-27",projectStatus:null,attachList:[{id:"1773601056475709442",createUser:"1762881283053162498",createDept:"1762861991238668290",createTime:"2024-03-29 14:40:18",updateUser:"1762881283053162498",updateTime:"2024-03-29 18:13:51",status:1,isDeleted:0,tenantId:"416380",target:null,orgId:"1773601063656357889",title:"upload/20240329144018415/img2.png",introduction:"img2.png",attachUrl:"/bucket2/upload/20240329144018415/img2.png",bucketName:"bucket2",type:"png",domainUrl:"bucket2",name:"img2.png",originalName:"img2.png",extension:"png",attachSize:"58734",industryId:null,industryName:null,year:null,month:null,dataSource:null,carbonFootprintId:null},{id:"1773654786332131329",createUser:"1762881283053162498",createDept:"1762861991238668290",createTime:"2024-03-29 18:13:49",updateUser:"1762881283053162498",updateTime:"2024-03-29 18:13:51",status:1,isDeleted:0,tenantId:"416380",target:null,orgId:"1773601063656357889",title:"upload/20240329181348604/1708596498165.jpg",introduction:"1708596498165.jpg",attachUrl:"/bucket2/upload/20240329181348604/1708596498165.jpg",bucketName:"bucket2",type:"jpg",domainUrl:"bucket2",name:"1708596498165.jpg",originalName:"1708596498165.jpg",extension:"jpg",attachSize:"401963",industryId:null,industryName:null,year:null,month:null,dataSource:null,carbonFootprintId:null}]},{id:"1773601063656357889",createUser:"1762881283053162498",createDept:"1762861991238668290",createTime:"2024-03-29 14:40:20",updateUser:"1762881283053162498",updateTime:"2024-03-29 18:13:51",status:1,isDeleted:0,tenantId:"416380",methodologyName:"方法学三",methodologyVersion:"CCER—01—001—V02",methodologyDept:"生态环境部",applicableConditions:"本文件适用于独立的并网光热发电项目,或者光热",methodologyDate:"2024-03-27",projectStatus:null,attachList:[{id:"1773601056475709442",createUser:"1762881283053162498",createDept:"1762861991238668290",createTime:"2024-03-29 14:40:18",updateUser:"1762881283053162498",updateTime:"2024-03-29 18:13:51",status:1,isDeleted:0,tenantId:"416380",target:null,orgId:"1773601063656357889",title:"upload/20240329144018415/img2.png",introduction:"img2.png",attachUrl:"/bucket2/upload/20240329144018415/img2.png",bucketName:"bucket2",type:"png",domainUrl:"bucket2",name:"img2.png",originalName:"img2.png",extension:"png",attachSize:"58734",industryId:null,industryName:null,year:null,month:null,dataSource:null,carbonFootprintId:null},{id:"1773654786332131329",createUser:"1762881283053162498",createDept:"1762861991238668290",createTime:"2024-03-29 18:13:49",updateUser:"1762881283053162498",updateTime:"2024-03-29 18:13:51",status:1,isDeleted:0,tenantId:"416380",target:null,orgId:"1773601063656357889",title:"upload/20240329181348604/1708596498165.jpg",introduction:"1708596498165.jpg",attachUrl:"/bucket2/upload/20240329181348604/1708596498165.jpg",bucketName:"bucket2",type:"jpg",domainUrl:"bucket2",name:"1708596498165.jpg",originalName:"1708596498165.jpg",extension:"jpg",attachSize:"401963",industryId:null,industryName:null,year:null,month:null,dataSource:null,carbonFootprintId:null}]}],rules:{methodologyName:[{required:!0,message:"请输入方法学名称",trigger:"blur"}],methodologyVersion:[{required:!0,message:"请输入方法学版本",trigger:"blur"}],methodologyDept:[{required:!0,message:"请输入发布部门",trigger:"blur"}],applicableConditions:[{required:!0,message:"请输入适用条件",trigger:"blur"}],methodologyDate:[{required:!0,message:"请输入日期",trigger:"change"}],attachList:[{required:!0,message:"请上传证明文件",trigger:"change"}]}}},components:{vzUpLoad:d["a"]},computed:{...Object(r["b"])(["permission"])},methods:{searchReset(){this.query={},this.onLoad(this.page)},searchChange(e,t){this.query=e,this.page.current=1,this.onLoad(this.page,e),t()},handleBeforeClose(){this.$refs["ruleForm"].resetFields(),this.visible=!1,this.ruleForm.attachList=[],this.ruleForm.methodologyName="",this.ruleForm.methodologyVersion="",this.ruleForm.methodologyDept="",this.ruleForm.applicableConditions="",this.ruleForm.methodologyDate="",this.onLoad()},removeFile(e){this.filteredArray.push({id:e.id});let t=[];t=this.ruleForm.attachList.filter(t=>t.id!==e.id),this.ruleForm.attachList.splice(0,this.ruleForm.attachList.length,...t)},changeFile(e){this.$refs.ruleForm.validateField("attachList ")},handleAdd(){this.buttonsList=Object(n["a"])("add"),this.title="新增方法学",this.isEdit=!1,this.visible=!0,this.view=!1},handleEdit(e){this.isEdit=!0,this.view=!1,this.ruleForm=Object(n["b"])(e),this.buttonsList=Object(n["a"])("edit"),this.title="编辑方法学",this.visible=!0},handleView(e){this.isEdit=!1,this.view=!0,this.ruleForm=e,this.buttonsList=Object(n["a"])("view"),this.title="查看方法学",this.visible=!0},handleDownload(e){let t=e.id;Object(s["getZipFile"])({id:t,responseType:"blob"}).then(e=>{if("text/xml"==e.data.type){const t=e.data,a=new Blob([t],{type:"application/zip;chartset=UTF-8"}),o=document.createElement("a"),l=window.URL.createObjectURL(a);o.href=l,o.download="证明材料",document.body.appendChild(o),o.click(),document.body.removeChild(o),window.URL.revokeObjectURL(l)}else this.$message({message:"未找到附件资源",type:"error"})})},handleDelete(e){this.$confirm("确定将选择数据删除?",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(async()=>{let t=e.id;Object(i["removeInternalAudit"])(t).then(()=>{this.onLoad(),this.$message({type:"success",message:"删除成功"})})})},buttonsClick(e){"save"===e?(this.ruleForm.attachList.forEach(e=>{delete e.status}),console.log(this.ruleForm),this.$refs["ruleForm"].validate(async e=>{if(e){const{data:e}=await Object(i["submitInternalAudit"])(this.ruleForm);200===e.code&&(this.onLoad(),this.$message.success(e.msg),this.handleBeforeClose())}})):"cancel"==e&&(console.log("111"),this.handleBeforeClose())},currentChange(e){this.page.current=e},sizeChange(e){this.page.size=e},refreshChange(){this.onLoad(this.page,this.query)},onLoad(e,t={}){this.loading=!0,t={size:this.page.size,current:this.page.current},Object(i["getInternalAudit"])(Object.assign(t,this.query)).then(e=>{const t=e.data.data;t?(this.page.total=t.total,this.data=t.records):(this.data=[],this.page.total=0),this.loading=!1})}}},c=u,p=a("1805"),m=Object(p["a"])(c,o,l,!1,null,null,null);t["default"]=m.exports}}]);