(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2ccc3357"],{"0e23":function(t,e,a){"use strict";a("8b85")},1946:function(t,e,a){},"1cdc":function(t,e,a){},"1f03":function(t,e,a){"use strict";var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"upload"},[e("el-upload",{staticClass:"avatar-uploader",attrs:{accept:".png,.jpg",headers:t.headers,action:t.action,"show-file-list":!1,"before-upload":t.beforeUploadFile,"on-success":t.handleAvatarSuccess}},[t.isShowImg?e("img",{staticClass:"avatar",attrs:{src:t.imageUrl}}):t._e(),t.isShowImg?t._e():e("i",{staticClass:"el-icon-plus avatar-uploader-icon avatar"}),t.showTip?e("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[t._v(" 单文件不超过10M,允许上传png/jpg ")]):t._e()])],1)},r=[],s=a("0a5a"),o={name:"upload",props:{imgUrl:{type:String},showTip:{type:Boolean,default:!0}},watch:{imgUrl:{immediate:!0,handler(t,e){console.log("vz-upload-img:url ",t),t&&t!=e&&(this.imageUrl=t)}}},computed:{isShowImg(){return this.imageUrl&&this.imageUrl.length}},data(){return{headers:{bucket:"information","Blade-Auth":"bearer "+Object(s["getToken"])()},action:"/api/blade-resource/oss/endpoint/put-file-type",imageUrl:null,fileList:[],datas:[{thumbUrl:"https://img.alicdn.com/tfs/TB1uevcCrj1gK0jSZFuXXcrHpXa-1880-640.jpg",url:"https://img.alicdn.com/tfs/TB1uevcCrj1gK0jSZFuXXcrHpXa-1880-640.jpg"},{thumbUrl:"https://img.alicdn.com/tfs/TB1v28TC8v0gK0jSZKbXXbK2FXa-1880-640.jpg",url:"https://www.w3school.com.cn/i/movie.ogg"}]}},methods:{openBigImg(t=0){this.$ImagePreview(this.datas,t,{closeOnClickModal:!0,click:(t,e)=>{this.$message.success("点击事件",e)},beforeClose:()=>{this.$message.success("关闭回调")}})},beforeUploadFile(t){const e=t.size/1024/1024<10;return e?this.fileList.length>=5?(this.$message.error("上传文件不超过5个!"),!1):e:(this.$message.error("上传文件大小不能超过10M!"),!1)},handleAvatarSuccess(t,e){const{data:a}=t;this.imageUrl=a.link,this.$emit("change",this.imageUrl)}}},l=o,c=(a("545a"),a("1805")),n=Object(c["a"])(l,i,r,!1,null,"53aab7be",null);e["a"]=n.exports},"216e":function(t,e,a){"use strict";a("c94c")},"249b":function(t,e,a){},"2c09":function(t,e,a){"use strict";a("a5b1")},"2c89":function(t,e,a){"use strict";a("8d3b")},"2ea8":function(t,e,a){},3092:function(t,e,a){"use strict";a("c837")},"30a4":function(t,e,a){"use strict";a("1cdc")},"35fd":function(t,e,a){"use strict";var i=function(){var t=this,e=t._self._c;return e("div",[e("el-dialog",{staticClass:"aboutDialog",staticStyle:{overflow:"auto"},attrs:{visible:t.isShow,fullscreen:t.isFullscreen,"append-to-body":"",width:t.width,top:t.top,center:t.btnIsCenter},on:{"update:visible":function(e){t.isShow=e},close:t.close,"before-close":t.beforeClose}},[e("div",{attrs:{slot:"title"},slot:"title"},[e("span",[t._v(t._s(t.title))])]),t._t("default"),t.dialogBtns.cancelShow&&t.showBtn||t.dialogBtns.submitShow&&t.showBtn?e("div",{attrs:{slot:"footer"},slot:"footer"},[e("el-button",{directives:[{name:"show",rawName:"v-show",value:t.dialogBtns.submitShow,expression:"dialogBtns.submitShow"}],attrs:{loading:t.submitLoading,size:"mini",type:"primary"},on:{click:t.handleSubmit}},[t._v(t._s(t.dialogBtns.submitText))]),e("el-button",{directives:[{name:"show",rawName:"v-show",value:t.dialogBtns.cancelShow,expression:"dialogBtns.cancelShow"}],attrs:{size:"mini"},on:{click:t.closeDiolog}},[t._v(t._s(t.dialogBtns.cancelText))])],1):t._e()],2)],1)},r=[],s={props:{submitLoading:{type:Boolean,default:!1},lockScroll:{type:Boolean,default:!0},appendToBody:{type:Boolean,default:!1},isFullscreen:{type:Boolean,default:!1},modal:{type:Boolean,default:!0},showBtn:{type:Boolean,default:!0},isShow:{type:Boolean,default:!1,required:!0},title:{type:String,default:""},width:{type:String,default:"60%"},height:{type:String},top:{type:String,default:"15vh"},showBtnGroup:{type:Boolean,default:!1},buttons:{type:Array,default:()=>[]},btnIsCenter:{type:Boolean,default:!1},dialogBtns:{type:Object,default:()=>({cancelText:"取 消",cancelShow:!0,submitText:"确 定",submitShow:!0})}},methods:{close(){this.closeDiolog()},beforeClose(t){this.$confirm("确认关闭?").then(e=>{t(),this.$emit("beforeClose")}).catch(t=>{})},closeDiolog(){this.$emit("handleClose")},handleSubmit(){this.$emit("handleSubmit")}}},o=s,l=(a("a2c4"),a("30a4"),a("1805")),c=Object(l["a"])(o,i,r,!1,null,"500051b5",null);e["a"]=c.exports},"39cc":function(t,e,a){},5057:function(t,e,a){"use strict";a("2ea8")},"545a":function(t,e,a){"use strict";a("5d85")},"5d3d":function(t,e,a){},"5d68":function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t._self._c;return e("basic-container",[e("avue-crud",{ref:"crud",attrs:{option:t.option,"table-loading":t.loading,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:"menu",fn:function({row:a}){return[e("el-button",{attrs:{type:"text",size:"small",icon:"el-icon-view"},on:{click:function(e){return t.viewData(a)}}},[t._v("查看")]),e("el-button",{attrs:{type:"text",size:"small",icon:"el-icon-setting"},on:{click:function(e){return t.configurations(a)}}},[t._v("配置")]),e("el-button",{attrs:{type:"text",size:"small",icon:"el-icon-delete"},on:{click:function(e){return t.handleDelete(a)}}},[t._v("删 除")]),e("el-button",{attrs:{type:"text",size:"small",disabled:!a.label},on:{click:function(e){return t.handleQRCode(a)}}},[e("span",{staticClass:"icon vztimes vzstanbiaoqian",staticStyle:{"font-size":"12px"}}),t._v(" 产品碳标签 ")])]}}])},[e("template",{slot:"menuLeft"},[e("el-button",{attrs:{type:"primary",size:"small",icon:"el-icon-plus"},on:{click:t.addFrintModal}},[t._v("新增")])],1)],2),e("cus-drawe",{attrs:{visible:t.showFrintModal,buttons:[{type:"primary",icon:"el-icon-circle-plus-outline",label:"保存",btnName:"save"},{type:"",icon:"el-icon-circle-close",label:"取消",btnName:"cancel"}],title:t.title,size:"50%"},on:{handleBeforeClose:function(e){return t.closeFrintModal()},buttonClick:t.submitFrintData}},[e("el-form",{ref:"ruleForm",attrs:{"label-width":"120px",model:t.ruleForm,rules:t.rules}},[e("el-row",[e("el-col",{attrs:{span:12}},[e("el-form-item",{attrs:{label:"碳足迹名称:",prop:"productCarbonFootprintName"}},[e("el-input",{attrs:{clearable:""},model:{value:t.ruleForm.productCarbonFootprintName,callback:function(e){t.$set(t.ruleForm,"productCarbonFootprintName",e)},expression:"ruleForm.productCarbonFootprintName"}})],1)],1),e("el-col",{attrs:{span:12}},[e("el-form-item",{attrs:{label:"认证标准:",prop:"approvalStandards"}},[e("el-select",{attrs:{clearable:"",placeholder:"请选择"},model:{value:t.ruleForm.approvalStandards,callback:function(e){t.$set(t.ruleForm,"approvalStandards",e)},expression:"ruleForm.approvalStandards"}},t._l(t.approvalStandardsList,(function(t){return e("el-option",{key:t.id,attrs:{label:t.dictValue,value:t.dictKey}})})),1)],1)],1),e("el-col",{attrs:{span:12}},[e("el-form-item",{attrs:{label:"选择产品:",prop:"productName"}},[e("el-select",{attrs:{placeholder:"请选择"},on:{change:t.changeProduct},model:{value:t.ruleForm.productName,callback:function(e){t.$set(t.ruleForm,"productName",e)},expression:"ruleForm.productName"}},t._l(t.productList,(function(t){return e("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})})),1)],1)],1),e("el-col",{attrs:{span:12}},[e("el-form-item",{attrs:{label:"选择模型:",prop:"modalName"}},[e("el-select",{attrs:{placeholder:"请选择"},on:{change:t.changeModal},model:{value:t.ruleForm.modalName,callback:function(e){t.$set(t.ruleForm,"modalName",e)},expression:"ruleForm.modalName"}},t._l(t.productModalList,(function(t){return e("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})})),1)],1)],1)],1)],1),t.productObject.name?e("el-card",[e("product-base-data",{attrs:{productModalObject:t.productObject}})],1):t._e(),t.productModalObject.name?e("el-card",{staticStyle:{"margin-top":"10px"}},[e("el-descriptions",{attrs:{title:"模型信息"}},[e("el-descriptions-item",{attrs:{label:"模型名称"}},[t._v(" "+t._s(t.productModalObject.name)+" ")]),e("el-descriptions-item",{attrs:{label:"生命周期"}},[t._v(" "+t._s(t.productModalObject.lifecycle)+" ")]),e("el-descriptions-item",{attrs:{label:"模型编码"}},[t._v(" "+t._s(t.productModalObject.code)+" ")])],1)],1):t._e()],1),e("cus-drawe",{staticClass:"drawe",attrs:{visible:t.showProductModal,buttons:[],size:"80%",title:t.draweTitle},on:{handleBeforeClose:t.handleBeforeClose}},[e("el-form",{attrs:{"label-width":"120px",model:t.ruleForm,rules:t.rules}},[e("el-row",[e("el-col",{attrs:{span:8}},[e("el-form-item",{attrs:{required:"",label:"模型名称:",prop:"name"}},[e("el-input",{attrs:{disabled:"",placeholder:"请输入内容"},model:{value:t.ruleForm.name,callback:function(e){t.$set(t.ruleForm,"name",e)},expression:"ruleForm.name"}})],1)],1),e("el-col",{attrs:{span:8}},[e("el-form-item",{attrs:{required:"",label:"生命周期边界:",prop:"lifecycle"}},[e("el-select",{attrs:{disabled:"",placeholder:"请选择"},model:{value:t.ruleForm.lifecycle,callback:function(e){t.$set(t.ruleForm,"lifecycle",e)},expression:"ruleForm.lifecycle"}},t._l(t.lifeCycleList,(function(t){return e("el-option",{key:t.id,attrs:{label:t.dictValue,value:t.dictValue}})})),1)],1)],1),e("el-col",{attrs:{span:8}},[e("el-form-item",{attrs:{required:"",label:"编码:",prop:"code"}},[e("el-input",{attrs:{disabled:""},model:{value:t.ruleForm.code,callback:function(e){t.$set(t.ruleForm,"code",e)},expression:"ruleForm.code"}})],1)],1)],1)],1),e("el-steps",{attrs:{status:"wait",active:t.active,"finish-status":"success"}},t._l(t.stepList,(function(t,a){return e("el-step",{key:a,attrs:{title:t}})})),1),t.productObject.name&&0==t.active?e("product-base-data",{attrs:{viewData:t.isViewData,productModalObject:t.productObject,showBtn:!0},on:{toggleStepBack:t.toggleStepBack,toggleStepNext:t.toggleStepNext}}):t._e(),1==t.active?e("product-source-material",{attrs:{rowData:t.rowData,active:t.active,viewData:t.isViewData},on:{toggleStepBack:t.toggleStepBack,toggleStepNext:t.toggleStepNext}}):t._e(),2==t.active?e("poduct-produce",{attrs:{viewData:t.isViewData,wrapActive:t.active,rowData:t.rowData},on:{toggleStepBack:t.toggleStepBack,toggleStepNext:t.toggleStepNext}}):t._e(),3==t.active?e("product-packaging",{attrs:{rowData:t.rowData,active:t.active,viewData:t.isViewData},on:{toggleStepBack:t.toggleStepBack,toggleStepNext:t.toggleStepNext}}):t._e(),4==t.active?e("product-distribution-wrap",{attrs:{viewData:t.isViewData,rowData:t.rowData,active:t.active},on:{toggleStepBack:t.toggleStepBack,toggleStepNext:t.toggleStepNext,ClosePopup:function(e){t.showProductModal=!1}}}):t._e(),5==t.active?e("product-use-address",{attrs:{viewData:t.isViewData,rowData:t.rowData,active:t.active},on:{toggleStepBack:t.toggleStepBack,toggleStepNext:t.toggleStepNext}}):t._e(),6==t.active?e("product-dispose",{attrs:{viewData:t.isViewData,rowData:t.rowData,active:t.active},on:{toggleStepBack:t.toggleStepBack,toggleStepNext:t.toggleStepNext,ClosePopup:t.ClosePopup}}):t._e()],1),e("el-dialog",{attrs:{title:"扫码查看",modal:!1,visible:t.qrcodeVisible,width:"623px"},on:{"update:visible":function(e){t.qrcodeVisible=e}}},[e("div",{ref:"captureArea",staticClass:"vzQrCodeBox"},[e("div",[e("div",{staticClass:"df"},[e("el-image",{staticClass:"vzQrCode",staticStyle:{width:"168px",height:"168px","border-radius":"6px !important"},attrs:{src:t.qrCodeSrc,"preview-src-list":[t.qrCodeSrc]}}),e("div",{staticClass:"ml32"},[e("h3",[t._v(t._s(t.name))]),e("div",{staticClass:"footprint"},[e("div",{staticClass:"footprintTitle"},[t._v("产品碳足迹")]),e("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:t.count+" "+t.productDetail.unit+"/ kgCO2eq",placement:"top"}},[e("div",{staticClass:"footprintValue"},[t._v(" "+t._s(t.count)+" "+t._s(t.productDetail.unit)+"/ kgCO2eq ")])])],1),e("div",{staticClass:"footprint"},[e("div",{staticClass:"footprintTitle"},[t._v("产品碳足迹")]),e("div",{staticClass:"footprintValue"},[t._v(t._s(t.lifecycle))])])])],1),e("div",{staticClass:"vzQrCodeTxt"},[t._v(" 您可通过微信/移动端浏览器扫一扫查看数据,或保存二维码图片分享至移动端查看 ")])])]),e("div",{staticClass:"vzQrCodeRight"},[e("div",{staticClass:"vzQrCodecon"},[e("el-button",{on:{click:function(e){return t.qrcodeVisibleShow()}}},[t._v("返回")]),e("el-button",{staticStyle:{"background-color":"#19c297 !important",color:"#fff"},on:{click:t.saveImg}},[t._v("保存图片")])],1)])])],1)},r=[],s=a("24cc"),o=a.n(s),l=a("e14d"),c=a("c54a");const n={energyConsumption:"",factorId:"",productDaysOfStorage:"",productVolume:"",energyConsumptionUnit:""},d={height:"640px",align:"center",menuWidth:380,border:!0,index:!0,searchMenuSpan:6,addBtn:!1,delBtn:!1,menu:!0,editBtn:!1,height:"auto",column:[{label:"碳足迹名称",prop:"productCarbonFootprintName"},{label:"认证标准",prop:"approvalStandards"},{label:"产品名称",prop:"name",search:!0},{label:"生命周期边界",prop:"lifecycle"},{label:"关联模型",prop:"modalName"},{label:"产品批次",prop:"batchNumber"},{label:"数据统计周期",prop:"productDate"},{label:"创建日期",prop:"createTime",valueFormat:"yyyy-MM-dd"}]},u=["产品信息","原材料获取","产品生产","产品包装","产品分销","产品使用","产品处置"],p=["产品信息","原材料获取","产品生产","产品包装","产品分销"],m={type:"",isTransport:"",name:"",batchNumber:"",count:"",unit:"",manufacturer:"",manufacturerAddress:"",specification:"",modelNumber:"",dataSource:"",dataExplain:"",roughWeight:"",factorId2:"",vehicle:"",origin:"",destination:"",haulDistance:""},h={name:[{required:!0,message:"请输入名称",trigger:"blur"},{validator:c["k"],trigger:"blur"}],factorName:[{required:!0,message:"请选择因子",trigger:"change"}],type:[{required:!0,message:"请选择类型",trigger:"change"}],batchNumber:[{required:!0,message:"请输入批次",trigger:"blur"}],count:[{required:!0,message:"请输入数量",trigger:"change"},{validator:c["b"],trigger:"change"}],unit:[{required:!0,message:"请选择单位",trigger:"change"}],manufacturer:[{required:!0,message:"请输入生产商名称",trigger:"change"},{validator:c["k"],trigger:"blur"}],manufacturerAddress:[{required:!0,message:"请输入生产商地址",trigger:"change"},{validator:c["k"],trigger:"blur"}],specification:[{required:!0,message:"请输入规格",trigger:"change"},{validator:c["k"],trigger:"blur"}],modelNumber:[{required:!0,message:"请输入型号",trigger:"change"},{validator:c["k"],trigger:"blur"}],dataSource:[{required:!0,message:"请选择数据来源",trigger:"change"}],dataExplain:[{required:!0,message:"请填写数据说明",trigger:"change"},{validator:c["k"],trigger:"change"}],roughWeight:[{required:!0,message:"请输入运输毛重",trigger:"blur"},{validator:c["b"],trigger:"blur"}],vehicle:[{required:!0,message:"请输入交通工具",trigger:"blur"}],trFactorName:[{required:!0,message:"请选择交通因子",trigger:"blur"}],origin:[{required:!0,message:"请输入始发地",trigger:"blur"},{validator:c["k"],trigger:"blur"}],destination:[{required:!0,message:"请输入目的地",trigger:"blur"},{validator:c["k"],trigger:"blur"}],haulDistance:[{required:!0,message:"请输入距离",trigger:"blur"},{validator:c["b"],trigger:"blur"}]},g=(c["k"],c["k"],c["k"],{placeOfDispatch:"",productWeight:"",count:"",factorId:"",placeOfReceipt:"",haulDistance:"",factorEmission:"",countUnit:"",productWeightUnit:"",attachList:[]}),f={placeOfDispatch:[{required:!0,message:"请输入发货地",trigger:"blur"},{validator:c["k"],trigger:"blur"}],vehicle:[{required:!0,message:"请输入交通工具",trigger:"blur"}],productWeight:[{required:!0,message:"请输入产品重量",trigger:"blur"},{validator:c["f"],trigger:"blur"}],count:[{required:!0,message:"请输入产品数量",trigger:"blur"},{validator:c["b"],trigger:"blur"}],factorName:[{required:!0,message:"请选择交通因子",trigger:"change"}],placeOfReceipt:[{required:!0,message:"请选择收货地",trigger:"change"},{validator:c["k"],trigger:"blur"}],haulDistance:[{required:!0,message:"请输入运输距离",trigger:"blur"},{validator:c["b"],trigger:"blur"}]},b={energyConsumption:[{required:!0,message:"请输入能耗",trigger:"blur"},{validator:c["b"],trigger:"blur"}],factorName:[{required:!0,message:"能耗方式",trigger:"change"}],productDaysOfStorage:[{required:!0,message:"请输入存放天数",trigger:"blur"},{validator:c["b"],trigger:"blur"}],productVolume:[{required:!0,message:"请输入产品体积",trigger:"blur"},{validator:c["b"],trigger:"blur"}],storageVolume:[{required:!0,message:"请输入存储体积",trigger:"blur"},{validator:c["b"],trigger:"blur"}]};var v=a("2040"),y=a("d2e1"),F=function(){var t=this,e=t._self._c;return e("div",{staticClass:"box"},[e("el-container",[e("el-aside",{staticClass:"aside",attrs:{width:"200px",height:"100%"}},[e("div",{staticClass:"imgbox"},[e("img",{staticClass:"img",attrs:{src:t.object.productPicture}})])]),e("el-main",{staticClass:"main"},[e("el-descriptions",{attrs:{column:"2"}},[e("el-descriptions-item",{attrs:{label:"产品名称"}},[e("span",[t._v(t._s(t.object.name))])]),e("el-descriptions-item",{attrs:{label:"产品编码"}},[e("span",[t._v(t._s(t.object.code))])]),e("el-descriptions-item",{attrs:{label:"产品数量"}},[e("span",[t._v(t._s(t.object.count))])]),e("el-descriptions-item",{attrs:{label:"生产企业名称"}},[e("span",[t._v(t._s(t.object.manufacturingEnterprise))])]),e("el-descriptions-item",{attrs:{label:"单位"}},[e("span",[t._v(t._s(t.object.unit))])]),e("el-descriptions-item",{attrs:{label:"产品批次号"}},[e("span",[t._v(t._s(t.object.batchNumber))])]),e("el-descriptions-item",{attrs:{label:"单位产品质量"}},[e("span",[t._v(t._s(t.object.unitMass))])]),e("el-descriptions-item",{attrs:{label:"生产企业"}},[e("span",[t._v(t._s(t.object.manufacturingEnterprise))])]),e("el-descriptions-item",{attrs:{label:"生产时间"}},[e("span",[t._v(t._s(t.object.productDate))])]),e("br")],1),e("div",{staticClass:"illustrate"},[t._v(" 产品说明: "),e("span",{staticClass:"explain"},[t._v(" "+t._s(t.object.explain))])])],1)],1),t.showBtn?e("div",{staticClass:"btns"},[e("el-button",{attrs:{disabled:"",type:"primary"}},[t._v("上一步")]),e("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.toggleStep("next")}}},[t._v("下一步")]),6==t.active?e("el-button",{attrs:{type:"primary"},on:{click:t.submit}},[t._v("提交")]):t._e()],1):t._e()],1)},D=[],w=a("1f03"),L={components:{vzUploadImg:w["a"]},props:{productModalObject:Object,showBtn:{type:Boolean,default:!1}},data(){return{object:{}}},watch:{productModalObject:{immediate:!0,handler(t){this.object=t}}},methods:{toggleStep(){this.$emit("toggleStepNext")}}},S=L,I=(a("86e2"),a("1805")),x=Object(I["a"])(S,F,D,!1,null,"a8e0c81c",null),k=x.exports,E=function(){var t=this,e=t._self._c;return e("div",{staticClass:"product-produce"},[e("el-steps-define",{attrs:{space:120}},t._l(t.stepList,(function(a,i){return e("el-step-child",{key:a.id,attrs:{value:a.processVal,leftList:a.leftList,rightList:a.rightList,viewData:t.viewData,currentStep:a},on:{handleLeftClick:function(e){return t.carbonInput(a,i)},handleRightClick:function(e){return t.carbonOutput(a,i)},rightTagClick:t.rightTagClick,leftTagClick:t.leftTagClick,rightHandleClose:t.rightHandleClose,leftHandleClose:t.leftHandleClose}})})),1),e("div",{staticClass:"btns"},[e("el-button",{attrs:{type:"primary"},on:{click:t.toggleStepBack}},[t._v("上一步")]),e("el-button",{attrs:{type:"primary"},on:{click:t.toggleStepNext}},[t._v("下一步")])],1),e("cus-drawe",{attrs:{visible:t.showModal,showModal:!1,buttons:t.buttons,title:t.title,size:"60%"},on:{handleBeforeClose:t.handleBeforeClose,buttonClick:t.submitData}},[e("materials-form",{ref:"materials",attrs:{active:t.wrapActive,isViewData:t.viewData},on:{changeFileList:t.changeFileList,changeSelect:t.changeSelect}})],1)],1)},C=[],_=(a("fcd3"),function(){var t=this,e=t._self._c;return e("div",[e("el-form",{ref:"ruleForm",attrs:{"label-width":"120px",model:t.ruleForm,rules:t.rules,disabled:t.isViewData}},[e("el-row",[e("el-row",[e("el-col",{attrs:{span:8}},[e("el-form-item",{attrs:{label:"类型:",prop:"type"}},[e("el-select",{attrs:{clearable:"",placeholder:"请选择"},model:{value:t.ruleForm.type,callback:function(e){t.$set(t.ruleForm,"type",e)},expression:"ruleForm.type"}},t._l(t.typeList,(function(t){return e("el-option",{key:t.id,attrs:{label:t.dictValue,value:t.dictKey}})})),1)],1)],1),e("el-col",{attrs:{span:8}},[e("el-form-item",{attrs:{label:"名称:",prop:"name"}},[e("el-input",{attrs:{clearable:""},model:{value:t.ruleForm.name,callback:function(e){t.$set(t.ruleForm,"name",e)},expression:"ruleForm.name"}})],1)],1),e("el-col",{attrs:{span:8}},[e("el-form-item",{attrs:{label:"批次:",prop:"batchNumber"}},[e("el-input",{attrs:{clearable:""},model:{value:t.ruleForm.batchNumber,callback:function(e){t.$set(t.ruleForm,"batchNumber",e)},expression:"ruleForm.batchNumber"}})],1)],1),e("el-col",{attrs:{span:8}},[e("el-form-item",{attrs:{label:"数量:",prop:"count"}},[e("el-input",{attrs:{clearable:""},model:{value:t.ruleForm.count,callback:function(e){t.$set(t.ruleForm,"count",e)},expression:"ruleForm.count"}})],1)],1),e("el-col",{attrs:{span:8}},[e("el-form-item",{attrs:{label:"单位:",prop:"unit"}},[e("el-cascader",{attrs:{clearable:"","show-all-levels":!1,options:t.cascaderDatas},model:{value:t.ruleForm.unit,callback:function(e){t.$set(t.ruleForm,"unit",e)},expression:"ruleForm.unit"}})],1)],1),2!=t.active?e("el-col",{attrs:{span:8}},[e("el-form-item",{attrs:{label:"生产商:",prop:"manufacturer"}},[e("el-input",{attrs:{clearable:""},model:{value:t.ruleForm.manufacturer,callback:function(e){t.$set(t.ruleForm,"manufacturer",e)},expression:"ruleForm.manufacturer"}})],1)],1):t._e(),2!=t.active?e("el-col",{attrs:{span:8}},[e("el-form-item",{attrs:{label:"生产商地址:",prop:"manufacturerAddress"}},[e("el-input",{attrs:{clearable:""},model:{value:t.ruleForm.manufacturerAddress,callback:function(e){t.$set(t.ruleForm,"manufacturerAddress",e)},expression:"ruleForm.manufacturerAddress"}})],1)],1):t._e(),e("el-col",{attrs:{span:8}},[e("el-form-item",{attrs:{label:"型号:",prop:"modelNumber"}},[e("el-input",{attrs:{clearable:""},model:{value:t.ruleForm.modelNumber,callback:function(e){t.$set(t.ruleForm,"modelNumber",e)},expression:"ruleForm.modelNumber"}})],1)],1),e("el-col",{attrs:{span:8}},[e("el-form-item",{attrs:{label:"数据来源:",prop:"dataSource"}},[e("el-select",{attrs:{clearable:"",placeholder:"请选择"},model:{value:t.ruleForm.dataSource,callback:function(e){t.$set(t.ruleForm,"dataSource",e)},expression:"ruleForm.dataSource"}},t._l(t.dataSourceList,(function(t){return e("el-option",{key:t.id,attrs:{label:t.dictValue,value:t.dictKey}})})),1)],1)],1)],1),e("el-row",[t.hideFactor?e("el-col",{attrs:{span:22}},[e("el-form-item",{attrs:{label:"因子选择:",prop:"factorName"}},[e("el-input",{attrs:{readonly:"",disabled:""},model:{value:t.ruleForm.factorName,callback:function(e){t.$set(t.ruleForm,"factorName",e)},expression:"ruleForm.factorName"}}),e("el-button",{staticStyle:{"margin-left":"10px"},attrs:{type:"primary"},on:{click:t.addFactor}},[t._v("选择")])],1)],1):t._e()],1),e("el-row",[e("el-col",{attrs:{span:24}},[e("el-form-item",{attrs:{label:"数据说明:",prop:"dataExplain"}},[e("el-input",{attrs:{clearable:"",type:"textarea"},model:{value:t.ruleForm.dataExplain,callback:function(e){t.$set(t.ruleForm,"dataExplain",e)},expression:"ruleForm.dataExplain"}})],1)],1),e("el-col",{attrs:{span:24}},[e("el-form-item",{attrs:{label:"附件:"}},[e("vzUpLoad",{ref:"upload",attrs:{files:t.fileList},on:{change:t.changeFile,removeFile:t.removeFile}})],1)],1)],1)],1),e("el-row",{staticStyle:{"margin-bottom":"20px"}},[e("span",{staticClass:"text"},[t._v("运输信息:")]),e("el-radio-group",{model:{value:t.ruleForm.isTransport,callback:function(e){t.$set(t.ruleForm,"isTransport",e)},expression:"ruleForm.isTransport"}},[e("el-radio",{attrs:{label:"0"}},[t._v("需要运输")]),e("el-radio",{attrs:{label:"1"}},[t._v("不需要运输")])],1)],1),"0"==t.ruleForm.isTransport?e("el-row",["0"==t.ruleForm.isTransport?e("el-col",{attrs:{span:8}},[e("el-form-item",{attrs:{label:"始发地:",prop:"origin"}},[e("el-input",{model:{value:t.ruleForm.origin,callback:function(e){t.$set(t.ruleForm,"origin",e)},expression:"ruleForm.origin"}})],1)],1):t._e(),"0"==t.ruleForm.isTransport?e("el-col",{attrs:{span:8}},[e("el-form-item",{attrs:{label:"目的地:",prop:"destination"}},[e("el-input",{model:{value:t.ruleForm.destination,callback:function(e){t.$set(t.ruleForm,"destination",e)},expression:"ruleForm.destination"}})],1)],1):t._e(),e("el-col",{attrs:{span:8}},[e("el-form-item",{attrs:{label:"运输毛重:",prop:"roughWeight"}},[e("el-input",{model:{value:t.ruleForm.roughWeight,callback:function(e){t.$set(t.ruleForm,"roughWeight",e)},expression:"ruleForm.roughWeight"}},[e("template",{slot:"append"},[t._v("kg")])],2)],1)],1),e("el-col",{attrs:{span:8}},[e("el-form-item",{attrs:{label:"运输距离:",prop:"haulDistance"}},[e("el-input",{model:{value:t.ruleForm.haulDistance,callback:function(e){t.$set(t.ruleForm,"haulDistance",e)},expression:"ruleForm.haulDistance"}},[e("template",{slot:"append"},[t._v("km")])],2)],1)],1),e("el-col",{attrs:{span:8}},[e("el-form-item",{attrs:{label:"交通工具:",prop:"vehicle"}},[e("el-select",{attrs:{placeholder:"请选择"},model:{value:t.ruleForm.vehicle,callback:function(e){t.$set(t.ruleForm,"vehicle",e)},expression:"ruleForm.vehicle"}},t._l(t.vehicleDatas,(function(t){return e("el-option",{key:t.dictKey,attrs:{label:t.dictValue,value:t.dictValue}})})),1)],1)],1),e("el-col",{attrs:{span:7}},[e("el-form-item",{attrs:{label:"交通因子:",prop:"trFactorName"}},[e("el-input",{attrs:{disabled:"",clearable:"",value:t.ruleForm.trFactorName}}),e("el-button",{staticStyle:{"margin-left":"5px"},attrs:{type:"primary"},on:{click:t.addFactor2}},[t._v("选择")])],1)],1)],1):t._e()],1),e("cus-dialog",{attrs:{showBtn:!1,isShow:t.showFactor,title:"选择因子"},on:{handleClose:e=>t.showFactor=!1}},[e("el-form",{attrs:{"label-width":"120px"}},[e("el-row",{attrs:{gutter:24}},[e("el-col",{attrs:{span:8}},[e("el-form-item",{attrs:{label:"因子名称:"}},[e("el-input",{attrs:{placeholder:"请输入内容"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.search.apply(null,arguments)}},model:{value:t.factorSearchData.name,callback:function(e){t.$set(t.factorSearchData,"name",e)},expression:"factorSearchData.name"}})],1)],1),e("el-col",{attrs:{span:8}},[e("el-form-item",{attrs:{label:"因子类型:"}},[e("el-select",{attrs:{placeholder:"请选择"},on:{change:t.changeLifeCycle},model:{value:t.factorSearchData.type,callback:function(e){t.$set(t.factorSearchData,"type",e)},expression:"factorSearchData.type"}},t._l(t.factorTypeList,(function(t){return e("el-option",{key:t.id,attrs:{label:t.dictValue,value:t.dictValue}})})),1)],1)],1),e("el-col",{attrs:{span:8}},[e("el-button",{staticStyle:{"margin-left":"12px"},attrs:{type:"primary"},on:{click:t.search}},[t._v("搜 索")]),e("el-button",{on:{click:t.resetSearch}},[t._v("重 置")])],1)],1)],1),e("el-table",{attrs:{size:"mini",data:t.factorList,stripe:"","show-overflow-tooltip":"","header-cell-style":{background:"#f5f6fa",color:"#606266",padding:"10px"}}},[e("el-table-column",{attrs:{label:"#"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-radio",{staticClass:"radio",attrs:{label:a.$index},on:{change:t.changeSelect},model:{value:t.select,callback:function(e){t.select=e},expression:"select"}},[t._v(" ")])]}}])}),e("el-table-column",{attrs:{prop:"name",label:"因子名称"}}),e("el-table-column",{attrs:{prop:"type",label:"因子类型"}}),e("el-table-column",{attrs:{prop:"factorEmissions",label:"因子排放值"}}),e("el-table-column",{attrs:{prop:"factorEmissionsUnit",label:"因子单位"}}),e("el-table-column",{attrs:{prop:"dataDate",label:"数据时间"}}),e("el-table-column",{attrs:{prop:"area",label:"适用地区"}}),e("el-table-column",{attrs:{fixed:"right",label:"操作",width:"100"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-button",{attrs:{type:"text",size:"small"},on:{click:function(e){return t.handleClick(a.row)}}},[t._v("详情")])]}}])})],1),e("div",{staticClass:"pagination"},[e("el-pagination",{attrs:{background:"",total:t.factorPage.total,"page-sizes":[10,20,30,40],"page-size":10,layout:"total, sizes, prev, pager, next, jumper"},on:{"size-change":t.sizeChange,"current-change":t.currentChange}})],1)],1)],1)}),O=[],T=a("35fd"),U=a("af95"),N=a("323a"),$={props:{ruleForm:{type:Object,default:()=>({isTransport:"1"})},hideFactor:{type:Boolean,default:!0},isViewData:{type:Boolean},active:{type:Number},tabId:String,fileId:{type:String}},components:{cusDialog:T["a"],vzUpLoad:U["a"]},watch:{ruleForm:{immediate:!0,handler(t,e){t.id&&this.getFileListFn({orgId:t.id})}}},data(){return{vehicleDatas:[],total:"",isTopSelect:!1,rules:h,typeList:[],cascaderDatas:[],factorTypeList:[],dataSourceList:[],factorList:[],showFactor:!1,factorSearchData:{name:"",type:""},factorPage:v["m"],select:"",valid:!1,fileList:[],filteredArray:[]}},created(){this.getRawMaterialType(),this.getUnitDict(),this.getDataSource(),this.getFactorList(),this.getFactorType(),this.getTraffic()},methods:{getTraffic(){Object(l["getList"])("traffic").then(t=>{console.log(t),200==t.data.code&&(this.vehicleDatas=t.data.data[0].children)})},handleClick(t){const e=this.$router.resolve({path:"/factorDetail",query:{id:t.id}});window.open(e.href,"_black")},changeFile(t){this.$emit("changeFileList",{fileList:t,tabId:this.tabId,ruleFormData:this.ruleForm})},removeFile(t){const e=this.fileList.findIndex(e=>e.id==t.id);this.fileList.splice(e,1),this.$emit("changeFileList",{fileList:this.fileList,tabId:this.tabId,ruleFormData:this.ruleForm})},async getFileListFn(t){let{data:e}=await Object(N["getFileList"])(t);e.data.records.forEach(t=>{t.name=t.introduction}),this.fileList=e.data.records},validateFn(){this.$refs.ruleForm.validate(t=>{this.valid=t})},search(){this.factorPage.currentPage=1,this.getFactorListPage()},resetSearch(){this.factorPage.currentPage=1,this.factorSearchData={},this.getFactorListPage()},sizeChange(t){this.factorPage.pageSize=t,this.getFactorListPage()},currentChange(t){this.factorPage.currentPage=t,this.getFactorListPage()},addFactor2(){this.select="",this.isTopSelect=0,this.showFactor=!0,this.factorSearchData.name=this.ruleForm.vehicle,this.getFactorListPage()},addFactor(){this.select="",this.isTopSelect=1,this.showFactor=!0,this.factorSearchData.name=this.ruleForm.name,this.getFactorListPage()},async getFactorType(){const{data:t}=await Object(l["getList"])("FACTOR_TYPE");200===t.code&&t.data.length&&(this.factorTypeList=t.data[0].children)},async getFactorListPage(){const t={current:this.factorPage.currentPage,size:this.factorPage.size},{data:e}=await Object(y["api_getFactorListPage"])(Object.assign(t,this.factorSearchData));200===e.code&&(this.factorList=e.data.records,this.factorPage.total=e.data.total)},changeSelect(t){1==this.isTopSelect?(console.log(this.factorList[t]),this.ruleForm.factorId=this.factorList[t].id,this.ruleForm.factorName=this.factorList[t].name,this.ruleForm.factorEmission=this.factorList[t].factorEmissions,this.ruleForm.factorUnit=this.factorList[t].factorEmissionsUnit):(this.ruleForm.factorId2=this.factorList[t].id,this.ruleForm.factorEmission2=this.factorList[t].factorEmissions,this.ruleForm.trFactorName=this.factorList[t].name,this.ruleForm.factorUnit=this.factorList[t].factorEmissionsUnit),this.showFactor=!1},async getDictData(t){const{data:e}=await Object(l["getList"])(t);return e.data.length?e.data[0].children:[]},async getUnitDict(){let{data:t}=await Object(l["getList"])("UNIT"),e=t.data.find(t=>"UNIT"==t.code);this.cascaderDatas=Object(v["j"])(e.children)},async getRawMaterialType(){this.typeList=await this.getDictData("MATERIAL_TYPE")},async getDataSource(){this.dataSourceList=await this.getDictData("DATA_SOURCE")},async getFactorList(){this.factorList=await this.getDictData("VZ_FACTOR")}}},j=$,M=(a("f249"),Object(I["a"])(j,_,O,!1,null,"48efcc9e",null)),P=M.exports,V=function(){var t=this,e=t._self._c;return e("div",{staticClass:"el-steps",class:[!t.simple&&"el-steps--"+t.direction,t.simple&&"el-steps--simple"]},[t._t("default")],2)},B=[],A=a("5923");let z=t=>{var e={};return t&&"[object Function]"===e.toString.call(t)};"object"===typeof Int8Array||!A["default"].prototype.$isServer&&"function"===typeof document.childNodes||(z=function(t){return"function"===typeof t||!1});Object.prototype.hasOwnProperty;var q={mounted(){},methods:{getMigratingConfig(){return{props:{},events:{}}}}},R=function(){var t=this,e=t._self._c;return e("div",{staticClass:"el-step",class:[!t.isSimple&&"is-"+t.$parent.direction,t.isSimple&&"is-simple",t.isLast&&!t.space&&!t.isCenter&&"is-flex",t.isCenter&&!t.isVertical&&!t.isSimple&&"is-center"],style:t.style},[e("div",{staticClass:"content"},[e("div",{staticClass:"content-left"},[0==t.viewData?e("el-button",{attrs:{type:"text",icon:"el-icon-plus"},on:{click:function(e){return t.handleLeftClick(t.i)}}},[t._v("添加碳输入")]):t._e(),1==t.viewData?e("div",{staticClass:"view_title"},[t._v("查看碳输出")]):t._e(),t._l(t.leftList,(function(a,i){return e("el-tag",{key:i,attrs:{closable:0==t.viewData,effect:"plain"},on:{click:function(e){return t.leftTagClick(a)},close:function(e){return t.leftHandleClose(a,t.index)}}},[t._v(t._s(a.name))])}))],2),e("div",{staticClass:"content-center"},[e("span",[t._v(t._s(t.value))])]),e("div",{staticClass:"content-right"},[0==t.viewData?e("el-button",{attrs:{type:"text",icon:"el-icon-plus"},on:{click:t.handleRightClick}},[t._v("添加碳输出")]):t._e(),1==t.viewData?e("div",{staticClass:"view_title"},[t._v("查看碳输出")]):t._e(),t._l(t.rightList,(function(a,i){return e("el-tag",{key:i,attrs:{effect:"plain",closable:0==t.viewData},on:{click:function(e){return t.rightTagClick(a)},close:function(e){return t.rightHandleClose(a,t.index)}}},[t._v(t._s(a.name))])}))],2)]),e("div",{staticClass:"el-step__main"},[e("div",{ref:"title",staticClass:"el-step__title",class:["is-"+t.currentStatus]},[t._t("title",(function(){return[t._v(t._s(t.title))]}))],2),t.isSimple?e("div",{staticClass:"el-step__arrow"}):e("div",{staticClass:"el-step__description",class:["is-"+t.currentStatus]},[t._t("description",(function(){return[t._v(t._s(t.description))]}))],2)])])},W=[],H={name:"ElStep",props:{title:String,icon:String,description:String,status:String,value:String,leftList:Array,rightList:Array,leftName:String,rightName:String,viewData:Boolean,currentStep:Object},data(){return{index:-1,lineStyle:{},internalStatus:""}},beforeCreate(){this.$parent.steps.push(this)},beforeDestroy(){const t=this.$parent.steps,e=t.indexOf(this);e>=0&&t.splice(e,1)},computed:{currentStatus(){return this.status||this.internalStatus},prevStatus(){const t=this.$parent.steps[this.index-1];return t?t.currentStatus:"wait"},isCenter(){return this.$parent.alignCenter},isVertical(){return"vertical"===this.$parent.direction},isSimple(){return this.$parent.simple},isLast(){const t=this.$parent;return t.steps[t.steps.length-1]===this},stepsCount(){return this.$parent.steps.length},space(){const{isSimple:t,$parent:{space:e}}=this;return t?"":e},style:function(){const t={},e=this.$parent,a=e.steps.length,i="number"===typeof this.space?this.space+"px":this.space?this.space:100/(a-(this.isCenter?0:1))+"%";return t.flexBasis=i,this.isVertical||(this.isLast?t.maxWidth=100/this.stepsCount+"%":t.marginRight=-this.$parent.stepOffset+"px"),t}},methods:{handleLeftClick(t){this.$emit("handleLeftClick",t)},rightTagClick(t){t.currentStepId=this.currentStep.id,this.$emit("rightTagClick",t,this.viewData)},leftTagClick(t){t.currentStepId=this.currentStep.id,this.$emit("leftTagClick",t,this.viewData)},rightHandleClose(t,e){let a={data:t,index:e};this.$emit("rightHandleClose",a)},leftHandleClose(t,e){let a={data:t,index:e};this.$emit("leftHandleClose",a)},handleRightClick(){this.$emit("handleRightClick")},updateStatus(t){const e=this.$parent.$children[this.index-1];t>this.index?this.internalStatus=this.$parent.finishStatus:t===this.index&&"error"!==this.prevStatus?this.internalStatus=this.$parent.processStatus:this.internalStatus="wait",e&&e.calcProgress(this.internalStatus)},calcProgress(t){let e=100;const a={};a.transitionDelay=150*this.index+"ms",t===this.$parent.processStatus?(this.currentStatus,e=0):"wait"===t&&(e=0,a.transitionDelay=-150*this.index+"ms"),a.borderWidth=e&&!this.isSimple?"1px":0,"vertical"===this.$parent.direction?a.height=e+"%":a.width=e+"%",this.lineStyle=a}},mounted(){const t=this.$watch("index",()=>{this.$watch("$parent.active",this.updateStatus,{immediate:!0}),this.$watch("$parent.processStatus",()=>{const t=this.$parent.active;this.updateStatus(t)},{immediate:!0}),t()})}},K=H,X=(a("dadd"),Object(I["a"])(K,R,W,!1,null,"cf655c8e",null)),Z=X.exports,Q={name:"ElSteps",components:{StepChild:Z},mixins:[q],props:{space:{type:[Number,String],default:120},active:Number,direction:{type:String,default:"vertical"},alignCenter:Boolean,simple:Boolean,finishStatus:{type:String,default:"finish"},processStatus:{type:String,default:"process"}},data(){return{steps:[],stepOffset:0}},methods:{getMigratingConfig(){return{props:{center:"center is removed."}}}},watch:{active(t,e){this.$emit("change",t,e)},steps(t){t.forEach((t,e)=>{t.index=e})}}},G=Q,Y=Object(I["a"])(G,V,B,!1,null,null,null),J=Y.exports,tt=a("0e0b"),et={props:{rowData:{type:Object,default:()=>{}},wrapActive:Number,viewData:Boolean},components:{materialsForm:P,elStepsDefine:J,elStepChild:Z},data(){return{inputRowData:{},outputRowData:{},active:0,showModal:!1,title:"",carbonInputList:[],carbonOutputList:[],stepList:[],factorList:[],currentStatus:"",fileListp:[],filteredArrayp:[],buttons:[{type:"",icon:"el-icon-circle-close",label:"取消",btnName:"cancel"},{type:"primary",icon:"el-icon-circle-plus-outline",label:"保存",btnName:"save"}]}},watch:{wrapActive(t){2===t&&this.getProductionProcessesList()}},async created(){2==this.wrapActive&&this.getProductionProcessesList();const{data:t}=await Object(y["api_getFactorListPage"])();this.factorList=t.data.records,this.viewData&&(this.buttons=[{type:"",icon:"el-icon-circle-close",label:"取消",btnName:"cancel"}])},methods:{changeFileList(t){this.stepList.find(e=>e.id==t.ruleFormData.currentStepId);const e=this.stepList.findIndex(e=>e.id==t.ruleFormData.currentStepId),a="input"==t.ruleFormData.currentStatus?"leftList":"rightList",i=this.stepList[e][a].findIndex(e=>e.id==t.ruleFormData.id),r=t.fileList.map(t=>({name:t.name,id:t.id,url:t.url,dataSource:"产品生产",target:"报告文件",carbonFootprintId:this.rowData.id}));this.$set(this.stepList[e][a][i],"attachList",r)},getDetail(){Object(y["api_getStep2InputDetail"])(),Object(y["api_getStep2OutputDetail"])()},toggleStepBack(){this.$emit("toggleStepBack")},async toggleStepNext(){if(this.viewData)this.$emit("toggleStepNext");else{const t=[],e=[];if(this.stepList.forEach(a=>{a.leftList.forEach(e=>{t.push({carbonFootprintId:this.rowData.id,count:e.count,dataExplain:e.dataExplain,dataSource:e.dataSource,id:e.id?e.id:null,factorId:e.factorId,factorEmission:e.factorEmission,isTransport:e.isTransport,modelNumber:e.modelNumber,type:e.type,unit:Object(v["h"])(e.unit),factorUnit:e.factorUnit,batchNumber:e.batchNumber,name:e.name,processId:e.processId,transportInformationEntity:{carbonFootprintId:this.rowData.id,id:e.transportId||null,destination:e.destination,haulDistance:e.haulDistance,origin:e.origin,vehicle:e.vehicle,roughWeight:e.roughWeight,factorEmission:e.factorEmission2,factorId:e.factorId2,transportType:"产品生产输入",productProducts:"产品生产制造"}})}),a.rightList.forEach(t=>{e.push({attachList:[],carbonFootprintId:this.rowData.id,id:t.id?t.id:null,count:t.count,dataExplain:t.dataExplain,dataSource:t.dataSource,factorId:t.factorId,factorEmission:t.factorEmission,unit:Object(v["h"])(t.unit),factorUnit:t.factorUnit,isTransport:t.isTransport,modelNumber:t.modelNumber,type:t.type,batchNumber:t.batchNumber,name:t.name,processId:t.processId,transportInformationEntity:{carbonFootprintId:this.rowData.id,id:t.transportId||null,destination:t.destination,haulDistance:t.haulDistance,origin:t.origin,vehicle:t.vehicle,roughWeight:t.roughWeight,factorId:t.factorId2,factorEmission:t.factorEmission2,transportType:"产品生产输出",productProducts:"产品生产制造"}})})}),t.forEach(t=>{1==t.isTransport&&delete t.transportInformationEntity}),e.forEach(t=>{1==t.isTransport&&delete t.transportInformationEntity}),t.length||e.length){let a;t.length&&(a=await Object(y["api_saveFootpintInputStep2"])(t)),e.length&&(a=await Object(y["api_saveFootpintOutputStep2"])(e)),200===a.data.code&&this.$emit("toggleStepNext")}}},async getProductionProcessesList(){const{data:t}=await Object(y["api_getAction1Detail"])({model_id:this.rowData.productModelId}),e=t.data.map(t=>({...t,leftList:[],rightList:[]}));let a=e.map(t=>t.id);a=a.join(",");let i={ids:a,carbonFootprintId:this.rowData.id};const{data:{data:r}}=await Object(y["api_getStep2InputDetail"])(i),{data:{data:s}}=await Object(y["api_getStep2OutputDetail"])(i);e.forEach(t=>{r.forEach(e=>{t.id==e.processId&&t.leftList.push(e)}),s.forEach(e=>{t.id==e.processId&&t.rightList.push(e)})}),this.stepList=e},carbonOutput(t,e){t.index=e,t.editId=this.generateUUID(),this.outputRowData=t,this.currentStatus="output",this.title=`添加${t.processVal}碳输出`,this.showModal=!0},carbonInput(t,e){t.index=e,t.editId=this.generateUUID(),this.currentStatus="input",this.inputRowData=t,this.title=`添加${t.processVal}碳输入`,this.showModal=!0},generateUUID(){let t=(new Date).getTime(),e="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const a=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?a:3&a|8).toString(16)});return e},async submitData(t){if("save"===t){const t=[],e=[];this.$refs.materials.$children[0].validate(a=>{if(a)if("input"==this.currentStatus){let e;if(this.inputRowData.index>=0)e=this.inputRowData.index;else{let t=this.stepList.find(t=>t.id==this.$refs.materials.ruleForm.processId);e=t.processSoft-1}if(this.$refs.materials.ruleForm.id)this.stepList[e].leftList=this.stepList[e].leftList.map(t=>(t.id==this.$refs.materials.ruleForm.id&&(this.$refs.materials.ruleForm.attachList=t.attachList,t=this.$refs.materials.ruleForm),t));else{let t=this.stepList[e].leftList.findIndex(t=>t.editId==this.inputRowData.editId);"-1"!=t?this.$set(this.stepList[e].leftList,t,this.$refs.materials.ruleForm):this.stepList[e].leftList.push({...this.$refs.materials.ruleForm,processId:this.inputRowData.id?this.inputRowData.id:this.$refs.materials.ruleForm.processId,editId:this.generateUUID()})}let a=this.stepList[e].leftList.find(t=>t.id==this.$refs.materials.ruleForm.id);t.push({attachList:a.attachList,carbonFootprintId:this.rowData.id,count:a.count,dataExplain:a.dataExplain,dataSource:a.dataSource,id:a.id?a.id:null,factorId:a.factorId,factorEmission:a.factorEmission,isTransport:a.isTransport,modelNumber:a.modelNumber,type:a.type,unit:Object(v["h"])(a.unit),factorUnit:a.factorUnit,batchNumber:a.batchNumber,name:a.name,processId:a.processId,transportInformationEntity:{carbonFootprintId:this.rowData.id,id:a.transportId||null,destination:a.destination,haulDistance:a.haulDistance,origin:a.origin,vehicle:a.vehicle,roughWeight:a.roughWeight,factorEmission:a.factorEmission2,factorId:a.factorId2,transportType:"产品生产输入",productProducts:"产品生产制造"}}),t.forEach(t=>{1==t.isTransport&&delete t.transportInformationEntity})}else{let t;if(this.outputRowData.index>=0)t=this.outputRowData.index;else{let e=this.stepList.find(t=>t.id==this.$refs.materials.ruleForm.processId);t=e.processSoft-1}if(this.$refs.materials.ruleForm.id)this.stepList[t].rightList=this.stepList[t].rightList.map(t=>(console.log(t,this.$refs.materials.ruleForm),t.id==this.$refs.materials.ruleForm.id&&(this.$refs.materials.ruleForm.attachList=t.attachList,t=this.$refs.materials.ruleForm),t));else{let e=this.stepList[t].rightList.findIndex(t=>t.editId==this.outputRowData.editId);"-1"!=e?this.$set(this.stepList[t].rightList,e,this.$refs.materials.ruleForm):this.stepList[t].rightList.push({...this.$refs.materials.ruleForm,processId:this.outputRowData.id?this.outputRowData.id:this.$refs.materials.ruleForm.processId,editId:this.generateUUID()})}let a=this.stepList[t].rightList.find(t=>t.id==this.$refs.materials.ruleForm.id);e.push({attachList:a.attachList,carbonFootprintId:this.rowData.id,count:a.count,dataExplain:a.dataExplain,dataSource:a.dataSource,id:a.id?a.id:null,factorId:a.factorId,factorEmission:a.factorEmission,isTransport:a.isTransport,modelNumber:a.modelNumber,type:a.type,unit:Object(v["h"])(a.unit),factorUnit:a.factorUnit,batchNumber:a.batchNumber,name:a.name,processId:a.processId,transportInformationEntity:{carbonFootprintId:this.rowData.id,id:a.transportId||null,destination:a.destination,haulDistance:a.haulDistance,origin:a.origin,vehicle:a.vehicle,roughWeight:a.roughWeight,factorEmission:a.factorEmission2,factorId:a.factorId2,transportType:"产品生产输入",productProducts:"产品生产制造"}}),e.forEach(t=>{1==t.isTransport&&delete t.transportInformationEntity})}}),console.log(t,e),(t.length||e.length)&&(t.length&&(console.log("11111"),Object(y["api_saveFootpintInputStep2"])(t).then(t=>{console.log(t,"res"),200==t.data.code&&(this.handleBeforeClose(),this.getProductionProcessesList())}).catch(t=>{this.getProductionProcessesList()})),e.length&&Object(y["api_saveFootpintOutputStep2"])(e).then(t=>{200==t.data.code&&(console.log(t),this.handleBeforeClose(),this.getProductionProcessesList())}).catch(t=>{this.getProductionProcessesList()}))}else"cancel"==t&&this.handleBeforeClose()},rightHandleClose(t){this.stepList[t.index].rightList.forEach(async(e,a)=>{e.name==t.data.name&&(this.stepList[t.index].rightList[a].id&&await Object(y["removeOutputRowData"])(this.stepList[t.index].rightList[a].id).then(t=>{200==t.data.code?this.$message({type:"success",message:"删除成功"}):this.$message({type:"error",message:"删除失败"})}),this.stepList[t.index].rightList.splice(a,1))})},leftHandleClose(t){this.stepList[t.index].leftList.forEach(async(e,a)=>{e.name==t.data.name&&(this.stepList[t.index].leftList[a].id&&await Object(y["removeInputRowData"])(this.stepList[t.index].leftList[a].id).then(t=>{200==t.data.code?this.$message({type:"success",message:"删除成功"}):this.$message({type:"error",message:"删除失败"})}),this.stepList[t.index].leftList.splice(a,1))})},rightTagClick(t){this.outputRowData=t,this.currentStatus="output",t.currentStatus="output",this.showModal=!0,t.outputFactorName&&(t.factorName=t.outputFactorName),this.$nextTick(async()=>{"0"!=t.isTransport||t.transportId?this.$refs.materials.ruleForm=Object(tt["b"])(t):await Object(y["api_getTransportInfo"])(t.id).then(({data:e})=>{if(e.data.length){const a=e.data[0],i={...t,...a};i.id=t.id,i.transportId=e.data[0].id,this.$refs.materials.ruleForm=Object(tt["b"])(i)}else this.$refs.materials.ruleForm=Object(tt["b"])(t)})})},leftTagClick(t){console.log(t,"rowData"),this.inputRowData=t,this.currentStatus="input",this.showModal=!0,t.currentStatus="input",t.putFactorName&&(t.factorName=t.putFactorName),this.$nextTick(async()=>{"0"!=t.isTransport||t.transportId?this.$refs.materials.ruleForm=Object(tt["b"])(t):Object(y["api_getTransportInfo"])(t.id).then(({data:e})=>{if(e.data.length>0){const a=e.data[0],i={...t,...a};i.id=t.id,i.transportId=e.data[0].id,this.$refs.materials.ruleForm=Object(tt["b"])(i)}})})},handleBeforeClose(){this.showModal=!1},removeCarBonItem(t){this.carbonInputList.splice(t,1)}}},at=et,it=(a("5057"),Object(I["a"])(at,E,C,!1,null,null,null)),rt=it.exports,st=function(){var t=this,e=t._self._c;return e("div",[e("el-tabs",{attrs:{type:"card"},on:{"tab-click":t.handleClick},model:{value:t.activeName,callback:function(e){t.activeName=e},expression:"activeName"}},t._l(t.tabList,(function(a){return e("el-tab-pane",{key:a.id,attrs:{label:a.cfMaterialEntity.name,name:a.cfMaterialEntity.id}},[e("materials-form",{ref:"materials",refInFor:!0,attrs:{hideFactor:!1,tabId:a.id,isViewData:t.viewData,ruleForm:a.materialsFormData},on:{changeSelect:t.changeSelect,changeFileList:t.changeFileList}})],1)})),1),e("div",{staticClass:"btns"},[e("el-button",{attrs:{type:"primary"},on:{click:t.toggleStepBack}},[t._v("上一步")]),e("el-button",{attrs:{type:"primary"},on:{click:t.toggleStepNext}},[t._v("下一步")])],1)],1)},ot=[],lt=(a("a982"),{props:{rowData:{type:Object,default:()=>{}},active:Number,viewData:{type:Boolean}},components:{materialsForm:P},data(){return{activeName:"",tabList:[],factorList:[],fileListp:[],filteredArrayp:[]}},watch:{async active(t){3==t&&(await this.getTabsList(),await this.getDetail(this.tabList[0].materialId),this.activeName=this.tabList[0].cfMaterialEntity.id)}},async created(){3==this.active&&(await this.getTabsList(),this.tabList.map(async t=>{await this.getDetail(t.materialId)}),this.activeName=this.tabList[0].cfMaterialEntity.id)},methods:{changeFileList(t){const e=this.tabList.findIndex(e=>e.tabId==t.tabId);this.tabList[e].attachList=t.fileList.map(t=>({name:t.name,id:t.id,url:t.url,dataSource:"产品包装",target:"报告文件",carbonFootprintId:this.rowData.id})),console.log(this.tabList," this.tabList")},changeFileListp(t){this.fileListp=t},changeFilteredArrayp(t){this.filteredArrayp=t},toggleStepBack(){this.$emit("toggleStepBack")},handleClick(t){this.$refs.materials.ruleForm=Object(tt["b"])(this.tabList[t.index].ruleForm)},changeSelect(t){this.factorList=t},async toggleStepNext(){if(this.viewData)this.$emit("toggleStepNext");else{let t;if(t=this.$refs.materials.every(t=>(t.validateFn(),t.valid)),t){const t=[];this.tabList.forEach(e=>{const{materialsFormData:a}=e;console.log(a,"d"),t.push({materialEmission:e.materialEmission,attachList:e.attachList,carbonFootprintId:this.rowData.id,count:a.count,dataExplain:a.dataExplain,dataSource:a.dataSource,isTransport:a.isTransport,manufacturer:a.manufacturer,manufacturerAddress:a.manufacturerAddress,materialId:e.materialId,modelNumber:a.modelNumber,unit:Object(v["h"])(a.unit),materialUnit:e.cfMaterialEntity.unit,batchNumber:a.batchNumber,type:a.type,name:a.name,id:a.id?a.id:null,specification:a.specification,transportInformationEntity:{carbonFootprintId:this.rowData.id,id:a.transportId||null,destination:a.destination,emission:a.emission,factorEmission:a.factorEmission2,factorId:a.factorId2,haulDistance:a.haulDistance,vehicle:Object(v["h"])(a.vehicle),origin:a.origin,roughWeight:a.roughWeight,transportType:"产品包装"}})}),t.forEach(t=>{1==t.isTransport&&delete t.transportInformationEntity});const e=t.filter(t=>""!=t.count),{data:a}=await Object(y["api_saveFootpintStep3"])(e);200===a.code&&this.$emit("toggleStepNext")}else this.$message({type:"error",message:"请填写完整表单"})}},async getDetail(t){const{data:e}=await Object(y["api_getStep3Detail"])(this.rowData.id,t);if(e.data.length>0){let t={};if("0"==e.data[0].isTransport){const{data:a}=await Object(y["api_getTransportInfo"])(e.data[0].id);t.factorId2=a.data[0].factorId,t.factorEmission2=a.data[0].factorEmission,t.transportId=a.data[0].id,t.roughWeight=a.data[0].roughWeight,t.origin=a.data[0].origin,t.destination=a.data[0].destination,t.haulDistance=a.data[0].haulDistance,t.vehicle=a.data[0].vehicle,t.trFactorName=a.data[0].trFactorName}e.data.forEach(e=>{"0"==e.isTransport?e.datas={...e,...t}:e.datas={...e}}),this.tabList.forEach(t=>{let a=e.data.find(e=>e.materialId==t.materialId);a&&a.datas&&(console.log("2222"),t.materialsFormData=a.datas)})}},async getTabsList(){const{data:t}=await Object(y["api_getAction2Detail"])(this.rowData.productModelId);console.log("1",t),this.tabList=t.data.map(t=>{Object(tt["b"])(m);return{id:t.id,tabId:t.id,materialId:t.materialId,cfMaterialEntity:t.cfMaterialEntity,materialEmission:t.cfMaterialEntity.carbonEmission,materialsFormData:{isTransport:"1",manufacturer:t.cfMaterialEntity.manufacturingEnterprise,manufacturerAddress:t.cfMaterialEntity.manufacturingEnterpriseAddress,batchNumber:t.cfMaterialEntity.batchNumber,code:t.cfMaterialEntity.code,explain:t.cfMaterialEntity.explain,factorId:t.cfMaterialEntity.factorId,name:t.cfMaterialEntity.name,modelNumber:t.cfMaterialEntity.modelNumber,unit:t.cfMaterialEntity.unit,materialUnit:t.cfMaterialEntity.unit,specification:t.cfMaterialEntity.specification,factorEmission:t.cfMaterialEntity.carbonEmission}}})}}}),ct=lt,nt=(a("c292"),Object(I["a"])(ct,st,ot,!1,null,null,null)),dt=nt.exports,ut=function(){var t=this,e=t._self._c;return e("div",{staticClass:"distriindex"},[t._v(" "+t._s(t.addressList[0].attachList)+" "),e("el-tabs",{attrs:{type:"border-card"},on:{"tab-click":t.handleClick}},t._l(t.addressList,(function(a){return e("el-tab-pane",{key:a.id,attrs:{label:a.dictValue}},[e("product-distribution",{key:a.id,ref:"productDistri",refInFor:!0,attrs:{tabId:a.id,ruleForm:a.ruleForm,viewData:t.viewData},on:{changeSelect:t.changeSelect,changeFileList:t.changeFileList}})],1)})),1),e("div",{staticClass:"btns"},[e("el-button",{attrs:{type:"primary"},on:{click:t.toggleStepBack}},[t._v("上一步")]),e("el-button",{attrs:{type:"primary"},on:{click:t.toggleStepNext}},[t._v(" "+t._s("摇篮到大门"==t.rowData.lifecycle?"确认完成":"下一步")+" ")])],1)],1)},pt=[],mt=function(){var t=this,e=t._self._c;return e("div",[e("div",{staticClass:"run-emission"},[t._v("运输排放")]),e("el-form",{ref:"ruleForm",attrs:{"label-width":"150px",model:t.ruleForm,rules:t.rules,disabled:t.viewData}},[e("el-row",[e("el-col",{attrs:{span:8}},[e("el-form-item",{attrs:{label:"发货地:",prop:"placeOfDispatch"}},[e("el-input",{attrs:{clearable:""},model:{value:t.ruleForm.placeOfDispatch,callback:function(e){t.$set(t.ruleForm,"placeOfDispatch",e)},expression:"ruleForm.placeOfDispatch"}})],1)],1),e("el-col",{attrs:{span:8}},[e("el-form-item",{attrs:{label:"收货地:",prop:"placeOfReceipt"}},[e("el-input",{attrs:{clearable:""},model:{value:t.ruleForm.placeOfReceipt,callback:function(e){t.$set(t.ruleForm,"placeOfReceipt",e)},expression:"ruleForm.placeOfReceipt"}})],1)],1),e("el-col",{attrs:{span:8}},[e("el-form-item",{attrs:{label:"运输距离:",prop:"haulDistance"}},[e("el-input",{attrs:{clearable:""},model:{value:t.ruleForm.haulDistance,callback:function(e){t.$set(t.ruleForm,"haulDistance",e)},expression:"ruleForm.haulDistance"}},[e("template",{slot:"append"},[t._v("km")])],2)],1)],1),e("el-col",{attrs:{span:8}},[e("el-form-item",{staticStyle:{"margin-bottom":"2px"},attrs:{label:"数量:",prop:"count"}},[e("el-input",{staticStyle:{height:"34px"},attrs:{clearable:""},model:{value:t.ruleForm.count,callback:function(e){t.$set(t.ruleForm,"count",e)},expression:"ruleForm.count"}},[e("div",{staticClass:"utit",attrs:{slot:"append"},slot:"append"},[e("el-cascader",{attrs:{clearable:"","show-all-levels":!1,placeholder:"请选择",options:t.cascaderDatas},model:{value:t.ruleForm.countUnit,callback:function(e){t.$set(t.ruleForm,"countUnit",e)},expression:"ruleForm.countUnit"}})],1)])],1)],1),e("el-col",{attrs:{span:8}},[e("el-form-item",{staticStyle:{"margin-bottom":"2px"},attrs:{label:"产品重量:",prop:"productWeight"}},[e("el-input",{attrs:{clearable:""},model:{value:t.ruleForm.productWeight,callback:function(e){t.$set(t.ruleForm,"productWeight",e)},expression:"ruleForm.productWeight"}},[e("div",{staticClass:"utit",attrs:{slot:"append"},slot:"append"},[e("el-cascader",{attrs:{clearable:"","show-all-levels":!1,placeholder:"请选择",options:t.cascaderDatas},model:{value:t.ruleForm.productWeightUnit,callback:function(e){t.$set(t.ruleForm,"productWeightUnit",e)},expression:"ruleForm.productWeightUnit"}})],1)])],1)],1),e("el-col",{attrs:{span:8}},[e("el-form-item",{attrs:{label:"交通工具:",prop:"vehicle"}},[e("el-select",{attrs:{placeholder:"请选择"},model:{value:t.ruleForm.vehicle,callback:function(e){t.$set(t.ruleForm,"vehicle",e)},expression:"ruleForm.vehicle"}},t._l(t.vehicleDatas,(function(t){return e("el-option",{key:t.dictKey,attrs:{label:t.dictValue,value:t.dictValue}})})),1)],1)],1),e("el-col",{attrs:{span:7}},[e("el-form-item",{attrs:{label:"交通因子:",prop:"factorName"}},[e("el-input",{attrs:{disabled:"",clearable:"",value:t.ruleForm.factorName}}),e("el-button",{staticStyle:{"margin-left":"5px"},attrs:{type:"primary"},on:{click:t.addFactor}},[t._v("选择")])],1)],1),e("el-col",{attrs:{span:24}},[e("el-form-item",{attrs:{label:"附件:"}},[e("vzUpLoad",{ref:"upload",attrs:{files:t.fileList},on:{change:t.changeFile,removeFile:t.removeFile}})],1)],1)],1)],1),e("cus-dialog",{attrs:{showBtn:!1,isShow:t.showFactor,title:"选择因子"},on:{handleClose:e=>t.showFactor=!1}},[e("el-form",{attrs:{"label-width":"120px"}},[e("el-row",{attrs:{gutter:20}},[e("el-col",{attrs:{span:8}},[e("el-form-item",{attrs:{label:"因子名称:"}},[e("el-input",{attrs:{placeholder:"请输入内容"},on:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.search.apply(null,arguments)}},model:{value:t.factorSearchData.name,callback:function(e){t.$set(t.factorSearchData,"name",e)},expression:"factorSearchData.name"}})],1)],1),e("el-col",{attrs:{span:8}},[e("el-form-item",{attrs:{label:"因子类型:"}},[e("el-select",{attrs:{placeholder:"请选择"},model:{value:t.factorSearchData.type,callback:function(e){t.$set(t.factorSearchData,"type",e)},expression:"factorSearchData.type"}},t._l(t.factorTypeList,(function(t){return e("el-option",{key:t.id,attrs:{label:t.dictValue,value:t.dictValue}})})),1)],1)],1),e("el-col",{attrs:{span:8}},[e("el-button",{staticStyle:{"margin-left":"12px"},attrs:{type:"primary"},on:{click:t.search}},[t._v("搜 索")]),e("el-button",{on:{click:t.resetSearch}},[t._v("重 置")])],1)],1)],1),e("el-table",{attrs:{size:"mini",data:t.factorList,stripe:"","show-overflow-tooltip":"","header-cell-style":{background:"#f5f6fa",color:"#606266",padding:"10px"}}},[e("el-table-column",{attrs:{label:"#"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-radio",{staticClass:"radio",attrs:{label:a.$index},on:{change:t.changeSelect},model:{value:t.select,callback:function(e){t.select=e},expression:"select"}},[t._v(" ")])]}}])}),e("el-table-column",{attrs:{prop:"name",label:"因子名称"}}),e("el-table-column",{attrs:{prop:"type",label:"因子类型"}}),e("el-table-column",{attrs:{prop:"factorEmissions",label:"因子排放"}}),e("el-table-column",{attrs:{prop:"factorEmissionsUnit",label:"因子单位"}}),e("el-table-column",{attrs:{prop:"dataDate",label:"数据时间"}}),e("el-table-column",{attrs:{prop:"area",label:"适用地区"}}),e("el-table-column",{attrs:{fixed:"right",label:"操作",width:"100"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-button",{attrs:{type:"text",size:"small"},on:{click:function(e){return t.handleClick(a.row)}}},[t._v("详情")])]}}])})],1),e("div",{staticClass:"pagination"},[e("el-pagination",{attrs:{background:"","hide-on-single-page":"",total:t.factorPage.total,"page-sizes":[10,20,30,40],"page-size":10,layout:"total, sizes, prev, pager, next, jumper"},on:{"size-change":t.sizeChange,"current-change":t.currentChange}})],1)],1)],1)},ht=[],gt={props:{ruleForm:{type:Object,default:()=>{}},viewData:{type:Boolean},tabId:String},components:{cusDialog:T["a"],vzUpLoad:U["a"]},watch:{ruleForm:{immediate:!0,handler(t){t.id&&this.getFileListFn({orgId:t.id})}}},data(){return{vehicleDatas:[],rules:f,select:"",factorSearchData:{name:"",type:""},cascaderDatas:[],showFactor:!1,factorList:[],factorPage:v["m"],valid:null,fileList:[],filteredArray:[]}},created(){this.getUnitDict(),this.getTraffic()},methods:{handleClick(t){const e=this.$router.resolve({path:"/factorDetail",query:{id:t.id}});window.open(e.href,"_black")},getTraffic(){Object(l["getList"])("traffic").then(t=>{console.log(t),200==t.data.code&&(this.vehicleDatas=t.data.data[0].children)})},async getUnitDict(){let{data:t}=await Object(l["getList"])("UNIT"),e=t.data.find(t=>"UNIT"==t.code);this.cascaderDatas=Object(v["j"])(e.children)},async getFileListFn(t){let{data:e}=await Object(N["getFileList"])(t);e.data.records.forEach(t=>{t.name=t.introduction}),this.fileList=e.data.records},changeFile(t){this.$emit("changeFileList",{fileList:t,tabId:this.tabId})},removeFile(t){const e=this.fileList.findIndex(e=>e.id==t.id);this.fileList.splice(e,1),this.$emit("changeFileList",{fileList:this.fileList,tabId:this.tabId})},productDistributonValidate(){this.$refs.ruleForm.validate(t=>{this.valid=t})},addFactor(){this.showFactor=!0,this.factorSearchData.name=this.ruleForm.vehicle,this.getFactorListPage()},search(){this.factorPage.currentPage=1,this.getFactorListPage()},resetSearch(){this.factorPage.currentPage=1,this.factorSearchData={},this.getFactorListPage()},sizeChange(t){this.factorPage.pageSize=t,this.getFactorListPage()},currentChange(t){this.factorPage.currentPage=t,this.getFactorListPage()},changeSelect(t){this.ruleForm.factorId=this.factorList[t].id,this.ruleForm.factorName=this.factorList[t].name,this.showFactor=!1,this.$emit("changeSelect",this.factorList)},async getFactorListPage(){const t={current:this.factorPage.currentPage,size:this.factorPage.size},{data:e}=await Object(y["api_getFactorListPage"])(Object.assign(t,this.factorSearchData));200===e.code&&(console.log(e,"1"),this.factorList=e.data.records,this.factorPage.total=e.data.total)}}},ft=gt,bt=(a("6f33"),Object(I["a"])(ft,mt,ht,!1,null,"528b33a0",null)),vt=bt.exports,yt=(a("5a04"),{props:{rowData:{type:Object,default:()=>{}},active:Number,viewData:{type:Boolean}},components:{productDistribution:vt},data(){return{radio1:"",addressList:[],factorList:[],productDistributionId:"",index:"",fileListp:[],filteredArrayp:[]}},watch:{active(t){4===t&&this.getAddressList()}},created(){4==this.active&&this.getAddressList()},methods:{changeFileList(t){const e=this.addressList.findIndex(e=>e.id==t.tabId);console.log(this.addressList[e].attachList,"222"),this.addressList[e].attachList=t.fileList.map(t=>({name:t.name,id:t.id,url:t.url,dataSource:"产品分销",target:"报告文件",carbonFootprintId:this.rowData.id}))},changeFilteredArrayp(t){this.filteredArrayp=t},toggleStepBack(){this.$emit("toggleStepBack")},handleClick({index:t}){this.index=t,this.getDetail(this.addressList[t].id)},async getDetail(t){const{data:e}=await Object(y["api_getStep4Detail"])(this.rowData.id,t);e.data.length&&this.addressList.forEach(t=>{e.data[0].productDistributionId==t.id&&(t.ruleForm=e.data[0])})},changeSelect(t){this.factorList=t},async toggleStepNext(){if(this.viewData)"摇篮到大门"==this.rowData.lifecycle?this.$emit("ClosePopup",!1):this.$emit("toggleStepNext");else{this.$refs.productDistri[0].productDistributonValidate();let t=this.$refs.productDistri[0].valid;if(t){const t=[];if(this.addressList.forEach(e=>{const{ruleForm:a}=e,{countUnit:i,productWeightUnit:r}=a;if(i&&r){a.countUnit=Object(v["h"])(i),a.productWeightUnit=Object(v["h"])(r);let s="",o="";const l=this.factorList.find(t=>t.id==a.factorId);void 0!=l?(o=l.id,s=l.factorEmissions):(o=a.factorId,s=a.factorEmission),t.push({carbonFootprintId:this.rowData.id,attachList:e.attachList,vehicle:a.vehicle,productDistributionId:a.productDistributionId,factorEmission:s,factorId:o,count:a.count,id:a.id||null,haulDistance:a.haulDistance,placeOfDispatch:a.placeOfDispatch,placeOfReceipt:a.placeOfReceipt,productWeight:a.productWeight,countUnit:a.countUnit,productWeightUnit:a.productWeightUnit})}else this.$message.warning("请选择相关单位")}),!(t.length>0))return!1;{const e=t.filter(t=>""!=t.count),{data:a}=await Object(y["api_saveFootpintStep4"])(e);200===a.code&&("摇篮到大门"==this.rowData.lifecycle?this.$emit("ClosePopup",!1):this.$emit("toggleStepNext"))}}}},async getAddressList(){const{data:t}=await Object(y["api_getAction3Detail"])({model_id:this.rowData.productModelId}),e=await Promise.all(t.data.map(async t=>{const e=Object(tt["b"])(g);return e.productDistributionId=t.id,{...t,ruleForm:e}}));this.addressList=e,e.length&&this.getDetail(e[this.index||0].id)}}}),Ft=yt,Dt=(a("2c89"),Object(I["a"])(Ft,ut,pt,!1,null,"70d7cc08",null)),wt=Dt.exports,Lt=function(){var t=this,e=t._self._c;return e("div",[e("el-tabs",{attrs:{type:"border-card"},on:{"tab-click":t.handleClick}},t._l(t.addressList,(function(a){return e("el-tab-pane",{key:a.id,attrs:{label:a.dictValue}},[e("product-use-form",{ref:"productUse",refInFor:!0,attrs:{tabId:a.id,ruleForm:a.ruleForm,viewData:t.viewData},on:{changeSelect:t.changeSelect,changeFileList:t.changeFileList}})],1)})),1),e("div",{staticClass:"btns"},[e("el-button",{attrs:{type:"primary"},on:{click:t.toggleStepBack}},[t._v("上一步")]),e("el-button",{attrs:{type:"primary"},on:{click:t.toggleStepNext}},[t._v("下一步")])],1)],1)},St=[],It=function(){var t=this,e=t._self._c;return e("div",[e("el-form",{ref:"ruleForm",attrs:{"label-width":"180px",model:t.ruleForm,disabled:t.viewData,rules:t.rules}},[e("el-row",[e("el-col",{attrs:{span:8}},[e("el-form-item",{staticStyle:{"margin-bottom":"2px"},attrs:{label:"能耗:",prop:"energyConsumption"}},[e("el-input",{attrs:{clearable:""},model:{value:t.ruleForm.energyConsumption,callback:function(e){t.$set(t.ruleForm,"energyConsumption",e)},expression:"ruleForm.energyConsumption"}},[e("div",{staticClass:"utit",attrs:{slot:"append"},slot:"append"},[e("el-cascader",{staticStyle:{width:"100%;border:none"},attrs:{clearable:"","show-all-levels":!1,placeholder:"请选择",options:t.cascaderDatas},model:{value:t.ruleForm.energyConsumptionUnit,callback:function(e){t.$set(t.ruleForm,"energyConsumptionUnit",e)},expression:"ruleForm.energyConsumptionUnit"}})],1)])],1)],1),e("el-col",{attrs:{span:8}},[e("el-form-item",{attrs:{label:"产品平均存放天数:",prop:"productDaysOfStorage"}},[e("el-input",{attrs:{clearable:""},model:{value:t.ruleForm.productDaysOfStorage,callback:function(e){t.$set(t.ruleForm,"productDaysOfStorage",e)},expression:"ruleForm.productDaysOfStorage"}})],1)],1),e("el-col",{attrs:{span:8}},[e("el-form-item",{attrs:{label:"产品体积\t:",prop:"productVolume"}},[e("el-input",{attrs:{clearable:""},model:{value:t.ruleForm.productVolume,callback:function(e){t.$set(t.ruleForm,"productVolume",e)},expression:"ruleForm.productVolume"}},[e("template",{slot:"append"},[t._v("m³")])],2)],1)],1),e("el-col",{attrs:{span:8}},[e("el-form-item",{attrs:{label:"存储体积\t:",prop:"storageVolume"}},[e("el-input",{attrs:{clearable:""},model:{value:t.ruleForm.storageVolume,callback:function(e){t.$set(t.ruleForm,"storageVolume",e)},expression:"ruleForm.storageVolume"}},[e("template",{slot:"append"},[t._v("m³")])],2)],1)],1),e("el-col",{attrs:{span:7}},[e("el-form-item",{attrs:{label:"能耗方式:",prop:"factorName"}},[e("el-input",{attrs:{disabled:"",clearable:""},model:{value:t.ruleForm.factorName,callback:function(e){t.$set(t.ruleForm,"factorName",e)},expression:"ruleForm.factorName"}}),e("el-button",{staticStyle:{"margin-left":"5px"},attrs:{type:"primary"},on:{click:t.addFactor}},[t._v("选择")])],1)],1),e("el-col",{attrs:{span:24}},[e("el-form-item",{attrs:{label:"附件:"}},[e("vzUpLoad",{ref:"upload",attrs:{files:t.fileList},on:{change:t.changeFile,removeFile:t.removeFile}})],1)],1)],1)],1),e("cus-dialog",{attrs:{showBtn:!1,isShow:t.showFactor,title:"选择因子"},on:{handleClose:e=>t.showFactor=!1}},[e("el-form",{attrs:{"label-width":"120px"}},[e("el-row",{attrs:{gutter:20}},[e("el-col",{attrs:{span:8}},[e("el-form-item",{attrs:{label:"因子名称:",prop:"name"}},[e("el-input",{attrs:{placeholder:"请输入内容"},model:{value:t.factorSearchData.name,callback:function(e){t.$set(t.factorSearchData,"name",e)},expression:"factorSearchData.name"}})],1)],1),e("el-col",{attrs:{span:8}},[e("el-form-item",{attrs:{label:"因子类型:",prop:"type"}},[e("el-select",{attrs:{placeholder:"请选择"},model:{value:t.factorSearchData.type,callback:function(e){t.$set(t.factorSearchData,"type",e)},expression:"factorSearchData.type"}},t._l(t.factorTypeList,(function(t){return e("el-option",{key:t.id,attrs:{label:t.dictValue,value:t.dictValue}})})),1)],1)],1),e("el-col",{attrs:{span:8}},[e("el-button",{staticStyle:{"margin-left":"12px"},attrs:{type:"primary"},on:{click:t.search}},[t._v("搜 索")]),e("el-button",{on:{click:t.resetSearch}},[t._v("重 置")])],1)],1)],1),e("el-table",{attrs:{size:"mini",data:t.factorList,stripe:"","show-overflow-tooltip":"","header-cell-style":{background:"#f5f6fa",color:"#606266",padding:"10px"}}},[e("el-table-column",{attrs:{label:"#"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-radio",{staticClass:"radio",attrs:{label:a.$index},on:{change:t.changeSelect},model:{value:t.select,callback:function(e){t.select=e},expression:"select"}},[t._v(" ")])]}}])}),e("el-table-column",{attrs:{prop:"name",label:"因子名称"}}),e("el-table-column",{attrs:{prop:"type",label:"因子类型"}}),e("el-table-column",{attrs:{prop:"factorEmissions",label:"因子排放值"}}),e("el-table-column",{attrs:{prop:"factorEmissionsUnit",label:"因子单位"}}),e("el-table-column",{attrs:{prop:"dataDate",label:"数据时间"}}),e("el-table-column",{attrs:{prop:"area",label:"适用地区"}}),e("el-table-column",{attrs:{fixed:"right",label:"操作",width:"100"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-button",{attrs:{type:"text",size:"small"},on:{click:function(e){return t.handleClick(a.row)}}},[t._v("详情")])]}}])})],1),e("div",{staticClass:"pagination"},[e("el-pagination",{attrs:{background:"",total:t.factorPage.total,"hide-on-single-page":"","page-sizes":[10,20,30,40],"page-size":10,layout:"total, sizes, prev, pager, next, jumper"},on:{"size-change":t.sizeChange,"current-change":t.currentChange}})],1)],1)],1)},xt=[],kt={props:{ruleForm:Object,tabId:String,viewData:{type:Boolean}},components:{cusDialog:T["a"],vzUpLoad:U["a"]},data(){return{select:"",factorList:[],factorSearchData:{},showFactor:!1,factorPage:v["m"],rules:b,valid:null,fileList:[],filteredArray:[],cascaderDatas:[]}},watch:{ruleForm:{immediate:!0,handler(t){t.id&&this.getFileListFn({orgId:t.id})}}},created(){this.getUnitDict()},methods:{handleClick(t){const e=this.$router.resolve({path:"/factorDetail",query:{id:t.id}});window.open(e.href,"_black")},async getUnitDict(){let{data:t}=await Object(l["getList"])("UNIT"),e=t.data.find(t=>"UNIT"==t.code);this.cascaderDatas=Object(v["j"])(e.children)},changeFile(t){this.$emit("changeFileList",{fileList:t,tabId:this.tabId})},removeFile(t){const e=this.fileList.findIndex(e=>e.id==t.id);this.fileList.splice(e,1),this.$emit("changeFileList",{fileList:this.fileList,tabId:this.tabId})},async getFileListFn(t){let{data:e}=await Object(N["getFileList"])(t);e.data.records.forEach(t=>{t.name=t.introduction}),this.fileList=e.data.records},productUseValidate(){this.$refs.ruleForm.validate(t=>{console.log(t),this.valid=t})},changeSelect(t){console.log(this.factorList),this.ruleForm.factorId=this.factorList[t].id,this.ruleForm.factorName=this.factorList[t].name,this.ruleForm.factorEmission=this.factorList[t].factorEmissions,this.showFactor=!1},resetSearch(){this.factorPage.currentPage=1,this.factorSearchData={},this.getFactorListPage()},search(){this.factorPage.currentPage=1,this.getFactorListPage()},addFactor(){this.showFactor=!0,this.getFactorListPage()},async getFactorListPage(){const t={current:this.factorPage.currentPage,size:this.factorPage.size},{data:e}=await Object(y["api_getFactorListPage"])(Object.assign(t,this.factorSearchData));200===e.code&&(this.factorList=e.data.records,this.factorPage.total=e.data.total)}}},Et=kt,Ct=(a("f85a"),Object(I["a"])(Et,It,xt,!1,null,"256d952c",null)),_t=Ct.exports,Ot={props:{rowData:{type:Object,default:()=>{}},active:Number,viewData:{type:Boolean}},components:{productUseForm:_t},watch:{active:{immediate:!0,async handler(t){5===t&&(await this.getCityList(),this.addressList.forEach(t=>{this.getDetail(t.id)}))}}},data(){return{addressList:[],facorList:[],index:"",fileListp:[],filteredArrayp:[]}},methods:{changeFileList(t){const e=this.addressList.findIndex(e=>e.id==t.tabId);this.addressList[e].attachList=t.fileList.map(t=>({name:t.name,id:t.id,url:t.url,dataSource:"产品使用",target:"报告文件",carbonFootprintId:this.rowData.id}))},toggleStepBack(){this.$emit("toggleStepBack")},handleClick({index:t}){this.index=t,this.getDetail(this.addressList[t].id)},async getDetail(t){const{data:e}=await Object(y["api_getStep5Detail"])(this.rowData.id,t);e.data.length>0&&this.addressList.forEach(t=>{t.id==e.data[0].productUseId&&(t.ruleForm=e.data[0])})},changeSelect(t){this.facorList=t},async toggleStepNext(){if(this.viewData)this.$emit("toggleStepNext");else{this.$refs.productUse[0].productUseValidate();let t=this.$refs.productUse[0].valid;if(t){const t=[];if(this.addressList.forEach(e=>{const{ruleForm:a}=e,{energyConsumptionUnit:i}=a;if(i){a.energyConsumptionUnit=Object(v["h"])(i);const r=this.facorList.find(t=>t.name==a.factorId);let s="",o="";void 0!=r?(s=r.factorId,o=r.factorEmissions):(s=a.factorId,o=a.factorEmission),t.push({id:a.id||null,attachList:e.attachList,carbonFootprintId:this.rowData.id,energyConsumption:a.energyConsumption,factorEmission:o,factorId:s,productDaysOfStorage:a.productDaysOfStorage,productUseId:a.productUseId,productVolume:a.productVolume,storageVolume:a.storageVolume,energyConsumptionUnit:a.energyConsumptionUnit})}else this.$message.warning("请选择相关单位")}),t.length>0){const{data:e}=await Object(y["api_saveFootpintStep5"])(t);200==e.code&&this.$emit("toggleStepNext")}}}},async getCityList(){const{data:t}=await Object(y["api_getAction4Detail"])({model_id:this.rowData.productModelId}),e=await Promise.all(t.data.map(async t=>{const e=Object(tt["b"])(n);return e.productUseId=t.id,{...t,ruleForm:e}}));this.addressList=e,t.data.length&&this.getDetail(e[this.index||0].id)}}},Tt=Ot,Ut=(a("2c09"),Object(I["a"])(Tt,Lt,St,!1,null,null,null)),Nt=Ut.exports,$t=function(){var t=this,e=t._self._c;return e("div",[e("el-tabs",{attrs:{type:"border-card"},on:{"tab-click":t.handleClick}},t._l(t.tabList,(function(a){return e("el-tab-pane",{key:a.id,attrs:{label:a.cfFactorEntity.name,name:a.cfFactorEntity.id}},[e("productDisposeForm",{ref:"productDispose",refInFor:!0,attrs:{tabId:a.factorId,isViewData:t.viewData,selectList:t.selectList,ruleForm:a.ruleForm},on:{changeFileList:t.changeFileList,changeSelect:t.changeSelect}})],1)})),1),e("div",{staticClass:"btns"},[e("el-button",{attrs:{type:"primary"},on:{click:t.toggleStepBack}},[t._v("上一步")]),e("el-button",{attrs:{type:"primary"},on:{click:t.toggleStepNext}},[t._v("确认完成")])],1)],1)},jt=[],Mt=function(){var t=this,e=t._self._c;return e("div",[e("el-form",{ref:"ruleForm",attrs:{"label-width":"120px",model:t.ruleForm,rules:t.rules,disabled:t.isViewData}},[e("el-row",[e("el-col",{attrs:{span:8}},[e("el-form-item",{attrs:{label:"废弃物种类:",prop:"materialId"}},[e("el-select",{attrs:{placeholder:"请选择"},on:{change:t.changeselect},model:{value:t.ruleForm.materialId,callback:function(e){t.$set(t.ruleForm,"materialId",e)},expression:"ruleForm.materialId"}},t._l(t.selectList,(function(t){return e("el-option",{key:t.cfMaterialEntity.id,attrs:{label:t.cfMaterialEntity.name,value:t.cfMaterialEntity.id}})})),1)],1)],1),e("el-col",{attrs:{span:8}},[e("el-form-item",{staticStyle:{"margin-bottom":"2px"},attrs:{label:"重量\t:",prop:"weight"}},[e("el-input",{model:{value:t.ruleForm.weight,callback:function(e){t.$set(t.ruleForm,"weight",e)},expression:"ruleForm.weight"}},[e("div",{staticClass:"utit",attrs:{slot:"append"},slot:"append"},[e("el-cascader",{staticStyle:{width:"100%;border:none"},attrs:{clearable:"","show-all-levels":!1,placeholder:"请选择",options:t.cascaderDatas},model:{value:t.ruleForm.weightUnit,callback:function(e){t.$set(t.ruleForm,"weightUnit",e)},expression:"ruleForm.weightUnit"}})],1)])],1)],1),e("el-col",{attrs:{span:24}},[e("el-form-item",{attrs:{label:"附件:"}},[e("vzUpLoad",{ref:"upload",attrs:{files:t.fileList},on:{change:t.changeFile,removeFile:t.removeFile}})],1)],1)],1)],1)],1)},Pt=[],Vt={props:{ruleForm:{type:Object,default:()=>({})},hideFactor:{type:Boolean,default:!0},isViewData:{type:Boolean},active:{type:Number},selectList:{type:Array},tabId:String},watch:{ruleForm:{immediate:!0,handler(t){t.id&&this.getFileListFn({orgId:t.id})}}},components:{cusDialog:T["a"],vzUpLoad:U["a"]},data(){return{cascaderDatas:[],ruleForm:{},total:"",factorTypeList:[],factorList:[],showFactor:!1,factorSearchData:{name:"",type:""},factorPage:v["m"],select:"",fileList:[],filteredArray:[]}},created(){this.getUnitDict()},methods:{async getUnitDict(){let{data:t}=await Object(l["getList"])("UNIT"),e=t.data.find(t=>"UNIT"==t.code);this.cascaderDatas=Object(v["j"])(e.children)},changeFile(t){this.$emit("changeFileList",{fileList:t,tabId:this.tabId})},removeFile(t){const e=this.fileList.findIndex(e=>e.id==t.id);this.fileList.splice(e,1),this.$emit("changeFileList",{fileList:this.fileList,tabId:this.tabId})},async getFileListFn(t){let{data:e}=await Object(N["getFileList"])(t);e.data.records.forEach(t=>{t.name=t.introduction}),this.fileList=e.data.records},changeSelect(t){this.ruleForm.factorId=this.factorList[t].id,this.ruleForm.factorName=this.factorList[t].name,this.showFactor=!1},changeselect(t){this.ruleForm.materialId=t}}},Bt=Vt,At=(a("216e"),Object(I["a"])(Bt,Mt,Pt,!1,null,"00b95fe8",null)),zt=At.exports,qt={props:{rowData:{type:Object,default:()=>{}},active:Number,viewData:{type:Boolean}},components:{productDisposeForm:zt},watch:{active:{handler(t){6===t&&this.getDetail()}}},data(){return{selectList:[],tabList:[],index:"",fileListp:[],filteredArrayp:[]}},async created(){6==this.active&&(this.getTabs(),await this.getTabList(),this.tabList.map(async t=>{await this.getDetail(t.factorId)}),this.activeName=this.tabList[0].cfFactorEntity.id)},methods:{changeFileList(t){const e=this.tabList.findIndex(e=>e.factorId==t.tabId);this.tabList[e].attachList=t.fileList.map(t=>({name:t.name,id:t.id,url:t.url,dataSource:"产品处置",target:"报告文件",carbonFootprintId:this.rowData.id}))},handleClick({index:t}){this.index=t,this.$refs.productDispose.ruleForm=Object(tt["b"])(this.tabList[t].ruleForm)},toggleStepBack(){this.$emit("toggleStepBack")},async getTabs(){const{data:t}=await Object(y["api_getAction0Detail"])(this.rowData.productModelId);this.selectList=t.data},async getTabList(){const{data:t}=await Object(y["api_getAction5Detail"])(this.rowData.productModelId);this.tabList=t.data.map(t=>({factorId:t.factorId,cfFactorEntity:t.cfFactorEntity,ruleForm:{code:t.cfFactorEntity.code,explain:t.cfFactorEntity.explain,factorId:t.cfFactorEntity.factorId,name:t.cfFactorEntity.name,factorEmission:t.cfFactorEntity.factorEmissions,weightUnit:t.cfFactorEntity.weightUnit}}))},async getDetail(t){let{data:e}=await Object(y["api_getStep6Detail"])(this.rowData.id,t);e.data.length>0&&this.tabList.forEach(t=>{let a=e.data.find(e=>e.factorId==t.factorId);t.ruleForm=a})},async toggleStepNext(){if(this.viewData)this.$emit("ClosePopup",!1);else{const t=[];if(this.tabList.forEach(e=>{const{ruleForm:a}=e,{weightUnit:i}=a;i?(a.weightUnit=Object(v["h"])(i),t.push({id:a.id||null,attachList:e.attachList,carbonFootprintId:this.rowData.id,factorEmission:a.factorEmission,factorId:e.factorId,weight:a.weight,materialId:a.materialId,weightUnit:a.weightUnit})):this.$message.warning("请选择相关单位")}),t.length>0){const{data:e}=await Object(y["api_saveFootpintStep6"])(t);200===e.code&&(this.$message.success(e.msg),this.$emit("ClosePopup",!1))}}}}},Rt=qt,Wt=Object(I["a"])(Rt,$t,jt,!1,null,null,null),Ht=Wt.exports,Kt=function(){var t=this,e=t._self._c;return e("div",[e("el-tabs",{attrs:{type:"card"},on:{"tab-click":t.handleClick},model:{value:t.activeName,callback:function(e){t.activeName=e},expression:"activeName"}},t._l(t.tabList,(function(a){return e("el-tab-pane",{key:a.id,attrs:{label:a.cfMaterialEntity.name,name:a.cfMaterialEntity.id}},[e("materials-form",{ref:"materials",refInFor:!0,attrs:{ruleForm:a.ruleForm,tabId:a.tabId,hideFactor:!1,isViewData:t.viewData},on:{changeFileList:t.changeFileList,changeSelect:t.changeSelect}})],1)})),1),e("div",{staticClass:"btns"},[e("el-button",{attrs:{type:"primary"},on:{click:t.toggleStepBack}},[t._v("上一步")]),e("el-button",{attrs:{type:"primary"},on:{click:t.toggleStepNext}},[t._v("下一步")])],1)],1)},Xt=[],Zt=(a("2e36"),{props:{rowData:{type:Object,default:()=>{}},viewData:{type:Boolean},active:Number},watch:{active:{immediate:!0,async handler(t){1===t&&(await this.getTabList(),this.tabList.forEach(t=>{this.getDetail(t.materialId)}),this.activeName=this.tabList[0].cfMaterialEntity.id)}}},data(){return{tabList:[],activeName:"",currentId:"",factorList:[],tabIndex:0,fileListp:[],filteredArrayp:[]}},mounted(){},methods:{handleClick(t){this.currentId=this.tabList[t.index].id,this.tabIndex=t.index,this.$refs.materials.ruleForm=Object(tt["b"])(this.tabList[t.index].ruleForm)},changeSelect(t){this.factorList=t},async getDetail(t){const{data:e}=await Object(y["api_getStep1Detail"])(this.rowData.id,t);let a={};if(e.data.length>0){if("0"==e.data[0].isTransport){const{data:t}=await Object(y["api_getTransportInfo"])(e.data[0].id);a.factorId2=t.data[0].factorId,a.factorEmission2=t.data[0].factorEmission,a.transportId=t.data[0].id,a.roughWeight=t.data[0].roughWeight,a.origin=t.data[0].origin,a.destination=t.data[0].destination,a.haulDistance=t.data[0].haulDistance,a.vehicle=t.data[0].vehicle,a.trFactorName=t.data[0].trFactorName}e.data.forEach(t=>{"0"==t.isTransport?t.datas={...t,...a}:t.datas={...t}}),console.log(e.data," data.data"),this.tabList.map(t=>{e.data.forEach(e=>{t.materialId==e.materialId&&(t.ruleForm=e.datas,t.tabId=e.id)})})}},toggleStepBack(){this.$emit("toggleStepBack")},changeFileList(t){const e=this.tabList.findIndex(e=>e.tabId==t.tabId);this.tabList[e].attachList=t.fileList.map(t=>({name:t.name,id:t.id,url:t.url,dataSource:"原材料",target:"报告文件",carbonFootprintId:this.rowData.id}))},changeFilteredArrayp(t){this.filteredArrayp=t},async toggleStepNext(){if(this.viewData)this.$emit("toggleStepNext");else{let t=!0;if(console.log(this.$refs.materials),t=this.$refs.materials.every(t=>(t.validateFn(),console.log(this.tabList),console.log(t),0==t.valid&&console.log(this.ruleForm),t.valid)),t){const t=[];this.tabList.forEach(e=>{const{ruleForm:a}=e;console.log(e,1111),t.push({carbonFootprintId:this.rowData.id,count:a.count,id:a.id||null,dataExplain:a.dataExplain,dataSource:a.dataSource,isTransport:a.isTransport,manufacturer:a.manufacturer,manufacturerAddress:a.manufacturerAddress,materialId:e.materialId,modelNumber:a.modelNumber,type:a.type,name:a.name,materialUnit:e.cfMaterialEntity.unit,attachList:e.attachList,unit:Object(v["h"])(a.unit),batchNumber:a.batchNumber,materialEmission:a.materialEmission,specification:a.specification,transportInformationEntity:{carbonFootprintId:this.rowData.id,id:a.transportId||null,destination:a.destination,factorEmission:a.factorEmission2,factorId:a.factorId2,haulDistance:a.haulDistance,origin:a.origin,vehicle:Object(v["h"])(a.vehicle),roughWeight:a.roughWeight,transportType:"外购原材料"}})}),t.forEach(t=>{1==t.isTransport&&delete t.transportInformationEntity});const e=t.filter(t=>""!=t.count),{data:a}=await Object(y["api_saveFootpintStep1"])(e);200===a.code&&(this.$message.success(a.msg),this.$emit("toggleStepNext"))}else this.$message({type:"error",message:"请填写完整表单"})}},async getTabList(){const{data:t}=await Object(y["api_getAction0Detail"])(this.rowData.productModelId),e=t.data.filter(t=>t.cfMaterialEntity);this.tabList=e.map(t=>(console.log(t,"v"),{materialId:t.materialId,cfMaterialEntity:t.cfMaterialEntity,ruleForm:{isTransport:"1",manufacturer:t.cfMaterialEntity.manufacturingEnterprise,manufacturerAddress:t.cfMaterialEntity.manufacturingEnterpriseAddress,batchNumber:t.cfMaterialEntity.batchNumber,code:t.cfMaterialEntity.code,explain:t.cfMaterialEntity.explain,factorId:t.cfMaterialEntity.factorId,name:t.cfMaterialEntity.name,modelNumber:t.cfMaterialEntity.modelNumber,materialUnit:t.cfMaterialEntity.unit,unit:t.cfMaterialEntity.unit,specification:t.cfMaterialEntity.specification,materialEmission:t.cfMaterialEntity.carbonEmission}})),t.data.length}},components:{materialsForm:P}}),Qt=Zt,Gt=(a("0e23"),Object(I["a"])(Qt,Kt,Xt,!1,null,null,null)),Yt=Gt.exports,Jt=a("f0a4"),te=a("17dd"),ee=a.n(te),ae=a("4a6d"),ie=a("fe98"),re={components:{productBaseData:k,poductProduce:rt,productPackaging:dt,productDistributionWrap:wt,productUseAddress:Nt,productDispose:Ht,productSourceMaterial:Yt},data(){return{qrcodeVisible:!1,active:0,isEditFootpint:!1,stepList:u,showFrintModal:!1,showProductModal:!1,form:{},query:{},loading:!1,page:v["m"],selectionList:[],option:d,data:[],ruleForm:{},rules:{productCarbonFootprintName:[{required:!0,message:"请输入碳足迹名称",trigger:"blur"}],approvalStandards:[{required:!0,message:"请选择认证标准",trigger:"change"}],productName:[{required:!0,message:"请选择产品",trigger:"change"}],modalName:[{required:!0,message:"请选择模型",trigger:"change"}]},productList:[],productModalList:[],productObject:{},productModalObject:{},rowData:{},isViewData:!1,draweTitle:"",qrCodeSrc:"",lifecycle:[{id:"1654381547328868353",parentId:"1654381229438373889",code:"lifecycle",dictKey:"AZ",dictValue:"摇篮到坟墓",sort:1,remark:null,isSealed:0,isDeleted:0,status:0,createTime:null,parentName:null,hasChildren:!1},{id:"1654381685044645889",parentId:"1654381229438373889",code:"lifecycle",dictKey:"ym",dictValue:"摇篮到大门",sort:2,remark:null,isSealed:0,isDeleted:0,status:0,createTime:null,parentName:null,hasChildren:!1}],count:0,name:"",http:"http://192.168.2.203:8083",draweTitle:"",approvalStandardsList:[],timer:null,productDetail:{},title:"",lifeCycleList:[]}},computed:{...Object(Jt["b"])(["userInfo","permission"])},mounted(){},created(){this.getProductList(),this.getProductModalList(),this.onLoad()},methods:{async handleQRCode(t){this.productDetail=Object.assign(t.productModelVO,t.productVO),this.qrcodeVisible=!0,this.getQRCode(t.id),this.lifecycle=t.lifecycle,this.name=t.name;let e={carbonFootprintId:t.id,count:t.productVO.count};const{data:a}=await Object(y["api_getCarbonEmissionProportion"])(e);this.count=a.data,this.count=Number(this.count).toFixed(2)},async gethttp(t){const{data:e}=await Object(ae["getLists"])(t);200===e.code&&e.data.records.length?this.http=e.data.records[0].domainUrl:this.http=""},qrcodeVisibleShow(){this.qrcodeVisible=!1},saveImg(){this.timer&&clearTimeout(this.timer),this.timer=setTimeout(()=>{const t=this.$refs.captureArea;ee()(t).then(t=>{const e=t.toDataURL("image/png"),a=document.createElement("a");a.href=e,a.download="扫码查看.png",a.click()}),this.timer=null},1e3)},getQRCode(t){let e={width:180,height:180,color:{dark:"#000000",light:"#ffffff"}},a=this.rsaPublicData(t);const i=`${this.http}/#/?id=${a}`;o.a.toDataURL(i,e).then(t=>{this.qrCodeSrc=t}).catch(t=>{console.error(t)})},rsaPublicData(t){const e="0476cf11ef3ab14ac836c0bf850c46cb96402c1d7dd4ded1591a4e5a4fea8951a96a842b4d4e7b9ec6fd779ccc6ef8d83ee7623184e6788847ed0c827351d41093",a=ie["sm2"].doEncrypt(t,e);return a},handleBeforeClose(){this.showProductModal=!1,this.active=0,this.productObject={}},viewData(t){"摇篮到大门"==t.lifecycle?this.stepList=p:"摇篮到坟墓"==t.lifecycle&&(this.stepList=u),this.draweTitle="LCA核算查看",this.ruleForm={code:t.productModelVO.code,lifecycle:t.productModelVO.lifecycle,name:t.productModelVO.name},this.productObject=this.productList.find(e=>e.id==t.productId),this.rowData=t,this.isViewData=!0,this.showProductModal=!0},toggleStepNext(){this.active++},toggleStepBack(){this.active--},ClosePopup(){this.active=0,this.showProductModal=!1},addFrintModal(){this.showFrintModal=!0,this.title="新增产品碳足迹",this.getApprovalStandards()},configurations(t){this.active=0,"摇篮到大门"==t.lifecycle?this.stepList=p:"摇篮到坟墓"==t.lifecycle&&(this.stepList=u),this.draweTitle="LCA核算配置",this.ruleForm={code:t.productModelVO.code,lifecycle:t.productModelVO.lifecycle,name:t.productModelVO.name},this.productObject=this.productList.find(e=>e.id==t.productId),this.rowData=t,this.showProductModal=!0,this.isViewData=!1},closeFrintModal(){this.showFrintModal=!1,this.ruleForm={},this.productObject={},this.productModalObject={},this.$refs.ruleForm.resetFields()},async submitFrintData(t){"cancel"==t?this.closeFrintModal():this.$refs.ruleForm.validate(async t=>{if(!t)return!1;{const{data:t}=await Object(y["api_saveFootprintpProduct"])({productId:this.ruleForm.product,productModelId:this.ruleForm.modal,productCarbonFootprintName:this.ruleForm.productCarbonFootprintName,approvalStandards:this.ruleForm.approvalStandards});200===t.code&&(this.closeFrintModal(),this.onLoad(),this.productObject={},this.productModalObject={},this.$message.success(t.msg))}})},changeProduct(t){this.productObject=this.productList.find(e=>e.id==t),this.ruleForm.product=t},changeModal(t){this.productModalObject=this.productModalList.find(e=>e.id==t),this.ruleForm.modal=t},getProductList(){this.productList=[{id:"1727264924310138881",createUser:"1605399440819564545",createDept:"1605399437405401089",createTime:"2023-11-22 17:57:04",updateUser:"1605399440819564545",updateTime:"2023-11-22 17:57:04",status:1,isDeleted:0,tenantId:"999606",name:"测试废弃物",code:"211",type:"废弃物",manufacturingEnterprise:"北京市北京市昌平区龙岗1号街道工业科技",manufacturingEnterpriseAddress:"北京市北京市昌平区龙岗1号街道工业科技园一号院区89号",count:"12111",batchNumber:"001001",unitMass:"22",unit:"kg",productPicture:"http://192.168.2.201:9000/bucket2/upload/20231122175026095/截屏2023-11-13 18.16.09.png",flowChart:"http://192.168.2.201:9000/bucket2/upload/20231122175031601/截屏2023-11-22 14.42.19.png",productDate:"2022-11-01,2022-12-21",explain:"北京市北京市昌平区龙岗1号街道工业科技园一号院区89号北京市北京市昌平区龙岗1号街道工业科技园一号院区89号北京市北京市昌平区龙岗1号街道工业科技园一号院区89号北京市北京市昌平区龙岗1号街道工业科技园一号院区89号北京市北京市昌平区龙岗1号街道工业科技园一号院区89号北京市北京市昌平区龙岗1号街道工业科技园一号院区89号北京市北京市昌平区龙岗1号街道工业科技园一号院区89号北京市北京市昌平区龙岗1号街道工业科技园一号院区89号"},{id:"1724611652675936257",createUser:"1605399440819564545",createDept:"1605399437405401089",createTime:"2023-11-15 10:13:54",updateUser:"1605399440819564545",updateTime:"2023-11-27 18:28:35",status:1,isDeleted:0,tenantId:"999606",name:"123",code:"2",type:"工业",manufacturingEnterprise:"2",manufacturingEnterpriseAddress:"2",count:"2",batchNumber:"123",unitMass:"集体企业",unit:"kg",productPicture:"http://192.168.2.201:9000/bucket2/upload/20231115101320563/1699493222541.jpg",flowChart:"http://192.168.2.201:9000/bucket2/upload/20231115101323653/1699493653200.jpg",productDate:"2023-10-03,2023-11-19",explain:"update"},{id:"1722803540579045378",createUser:"1720273705042350082",createDept:"1719918438626754562",createTime:"2023-11-10 10:29:07",updateUser:"1605399440819564545",updateTime:"2023-11-16 17:47:40",status:1,isDeleted:0,tenantId:"999606",name:"1122",code:"2112",type:"工业",manufacturingEnterprise:"1221",manufacturingEnterpriseAddress:"212121",count:"2121",batchNumber:"2211",unitMass:"1212",unit:"g",productPicture:"http://192.168.2.201:9000/bucket2/upload/20231116174738632/icon_wuranwuleixingguanli.png",flowChart:null,productDate:"2022-11-01,2022-12-01",explain:"1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"},{id:"1721713408962662401",createUser:"1605399440819564545",createDept:"1605399437405401089",createTime:"2023-11-07 10:17:19",updateUser:"1605399440819564545",updateTime:"2023-11-07 10:17:19",status:1,isDeleted:0,tenantId:"999606",name:"212121",code:"4213",type:"生活",manufacturingEnterprise:"四大花旦",manufacturingEnterpriseAddress:"为企鹅企鹅企鹅群",count:"333",batchNumber:"1213",unitMass:"3",unit:"kg",productPicture:"http://192.168.2.201:9000/bucket2/upload/20231107101707852/碳足迹认证字超出.jpg",flowChart:"http://192.168.2.201:9000/bucket2/upload/20231107101711780/配额管理字体重叠.jpg",productDate:"2023-11-01,2023-12-12",explain:""},{id:"1716652160545902593",createUser:"1605399440819564545",createDept:"1605399437405401089",createTime:"2023-10-24 11:05:44",updateUser:"1605399440819564545",updateTime:"2023-11-03 14:52:37",status:1,isDeleted:0,tenantId:"999606",name:"产品122225542255422554",code:"21",type:"工业",manufacturingEnterprise:"21",manufacturingEnterpriseAddress:"21",count:"21",batchNumber:"21",unitMass:"1",unit:"kg",productPicture:"http://192.168.2.201:9000/bucket2/upload/20231024110459201/pass.png",flowChart:"http://192.168.2.201:9000/bucket2/upload/20231024110515825/qualified.png",productDate:"2023-09-01,2023-09-27",explain:"产品12产品12产品12产品12产品12产品12产品12产品12产品12产品12产品12产品12产品12产品12产品12产品122产品12产品12产品12产品12产品12产品12产品12产品12产品12产品产品12产品12产品12产品12产品12产品12产品12产品12产品12产品12产品12产品122产品12产品12产品12产品12产品12产品12产品12产品12产品12产品品12产品12产品12产品12产品12产品12产品12产品12产品12产品12产品122、"},{id:"1701116510965358593",createUser:"1605399440819564545",createDept:"1605399437405401089",createTime:"2023-09-11 14:12:36",updateUser:"1605399440819564545",updateTime:"2023-11-07 16:37:39",status:1,isDeleted:0,tenantId:"999606",name:"305不锈钢",code:"2589",type:"生活",manufacturingEnterprise:"山西太原钢铁",manufacturingEnterpriseAddress:"山西省太原市",count:"25",batchNumber:"202155236",unitMass:"1",unit:"kg",productPicture:"http://192.168.2.201:9000/bucket2/upload/20231020095226476/2b709850a7db799a4a0d8c4e1cd190a.jpg",flowChart:"http://192.168.2.201:9000/bucket2/upload/20231020095237957/3d956039dcdaa58ab84ba54eaac41a2c.jpg",productDate:"2023-03-01,2023-04-24",explain:"305 不锈钢是一种奥氏体不锈钢,用于需要卓越耐腐蚀性的应用。它通常用于生产消费品、医疗设备、电气元件和其他暴露在恶劣环境条件下的产品。因此,305 不锈钢已成为许多不同行业制造商越来越受欢迎的材料。"},{id:"1700144158504939522",createUser:"1605399440819564545",createDept:"1605399437405401089",createTime:"2023-09-08 21:48:49",updateUser:"1605399440819564545",updateTime:"2023-11-07 16:37:47",status:1,isDeleted:0,tenantId:"999606",name:"三相四线费控智能电能表DTZY188Z",code:"DTZ5547",type:"生活",manufacturingEnterprise:"XXX医疗电气股份有限公司",manufacturingEnterpriseAddress:"XXX慈城镇枫湾路26号",count:"2456",batchNumber:"DTZY188Z",unitMass:"1",unit:"kg",productPicture:"http://192.168.2.201:9000/bucket2/upload/20231020095242757/1b43a2d12152d91d2053f32e1c73ef3c.jpg",flowChart:"http://192.168.2.201:9000/bucket2/upload/20231020095245189/9dc4f5ff14729dc51a6af8fed8987a7f.jpg",productDate:"2022-10-01,2023-01-09",explain:"三相四线费控智能电表是针对国家建设智能电网而研发生产的智能型电能计量产品,主要是包括本地费控和远程费控两种,本地费控可以提前在电表内设置电价、金额等信息,智能电表能自行计费运算实现供电控制,远程费控则是由售电主站通过远程命令控制智能电表,进行跳闸断电及合闸恢复供电,三相四线费控智能电表是用电收费改革,提高供用电科学管理水平,促进合理用电的理想电能计量产品。"}]},getProductModalList(){this.productModalList=[{id:"1727145064137695233",createUser:"1605399440819564545",createDept:"1605399437405401089",createTime:"2023-11-22 10:00:47",updateUser:"1605399440819564545",updateTime:"2023-11-22 10:00:47",status:1,isDeleted:0,tenantId:"999606",name:"1212",code:"21212",lifecycle:"摇篮到大门"},{id:"1722809561007484929",createUser:"1720273705042350082",createDept:"1719918438626754562",createTime:"2023-11-10 10:53:02",updateUser:"1605399440819564545",updateTime:"2023-11-17 11:38:16",status:1,isDeleted:0,tenantId:"999606",name:"模型1",code:"1",lifecycle:"摇篮到大门"},{id:"1722073676255211521",createUser:"1605399440819564545",createDept:"1605399437405401089",createTime:"2023-11-08 10:08:54",updateUser:"1605399440819564545",updateTime:"2023-11-08 10:08:54",status:1,isDeleted:0,tenantId:"999606",name:"ykj",code:"213213",lifecycle:"摇篮到大门"},{id:"1721854737738829826",createUser:"1605399440819564545",createDept:"1605399437405401089",createTime:"2023-11-07 19:38:55",updateUser:"1605399440819564545",updateTime:"2023-11-07 19:38:55",status:1,isDeleted:0,tenantId:"999606",name:"1221",code:"12212",lifecycle:"摇篮到大门"},{id:"1721395271125913601",createUser:"1605399440819564545",createDept:"1605399437405401089",createTime:"2023-11-06 13:13:09",updateUser:"1605399440819564545",updateTime:"2023-11-07 18:53:27",status:1,isDeleted:0,tenantId:"999606",name:"产品模型",code:"GH4546",lifecycle:"摇篮到大门"},{id:"1719301839024799746",createUser:"1605399440819564545",createDept:"1605399437405401089",createTime:"2023-10-31 18:34:36",updateUser:"1605399440819564545",updateTime:"2023-10-31 18:34:36",status:1,isDeleted:0,tenantId:"999606",name:"213",code:"3213",lifecycle:"摇篮到大门"},{id:"1718817911981682689",createUser:"1605399440819564545",createDept:"1605399437405401089",createTime:"2023-10-30 10:31:39",updateUser:"1605399440819564545",updateTime:"2023-10-30 10:31:39",status:1,isDeleted:0,tenantId:"999606",name:"2313",code:"321331",lifecycle:"摇篮到坟墓"},{id:"1718817280294334465",createUser:"1605399440819564545",createDept:"1605399437405401089",createTime:"2023-10-30 10:29:08",updateUser:"1605399440819564545",updateTime:"2023-10-30 10:29:08",status:1,isDeleted:0,tenantId:"999606",name:"21332",code:"3123213",lifecycle:"摇篮到大门"},{id:"1716663367004770305",createUser:"1605399440819564545",createDept:"1605399437405401089",createTime:"2023-10-24 11:50:15",updateUser:"1605399440819564545",updateTime:"2023-11-28 16:40:03",status:1,isDeleted:0,tenantId:"999606",name:"模型13",code:"13",lifecycle:"摇篮到坟墓"},{id:"1716651059151032322",createUser:"1605399440819564545",createDept:"1605399437405401089",createTime:"2023-10-24 11:01:21",updateUser:"1605399440819564545",updateTime:"2023-10-24 11:02:46",status:1,isDeleted:0,tenantId:"999606",name:"模型12",code:"12",lifecycle:"摇篮到大门"},{id:"1714912957428568066",createUser:"1605399440819564545",createDept:"1605399437405401089",createTime:"2023-10-19 15:54:45",updateUser:"1605399440819564545",updateTime:"2023-10-19 15:54:45",status:1,isDeleted:0,tenantId:"999606",name:"213",code:"213123",lifecycle:"摇篮到大门"},{id:"1711353273877032962",createUser:"1605399440819564545",createDept:"1605399437405401089",createTime:"2023-10-09 20:09:51",updateUser:"1605399440819564545",updateTime:"2023-10-09 20:09:51",status:1,isDeleted:0,tenantId:"999606",name:"尿素制造模型",code:"NHK11254",lifecycle:"摇篮到大门"},{id:"1701123116956409857",createUser:"1605399440819564545",createDept:"1605399437405401089",createTime:"2023-09-11 14:38:51",updateUser:"1605399440819564545",updateTime:"2023-09-15 19:24:22",status:1,isDeleted:0,tenantId:"999606",name:"不锈钢产品模型",code:"GTBZ2533698",lifecycle:"摇篮到大门"},{id:"1700153192549216257",createUser:"1605399440819564545",createDept:"1605399437405401089",createTime:"2023-09-08 22:24:43",updateUser:"1605399440819564545",updateTime:"2023-09-08 22:24:43",status:1,isDeleted:0,tenantId:"999606",name:"三相四线费控智能电能表模型",code:"GHKIol5698",lifecycle:"摇篮到大门"}]},async getLifeCycle(){const{data:t}=await Object(l["getList"])("lifecycle");200===t.code&&t.data.length&&(this.lifeCycleList=t.data[0].children)},async getApprovalStandards(){const{data:t}=await Object(l["getList"])("approval_standards");200===t.code&&t.data.length&&(this.approvalStandardsList=t.data[0].children)},onLoad(){this.query.name,this.page.currentPage,this.page.pageSize,this.factorTypeTreeId,this.$route.query.productId;const t=[{id:"1729084538459508737",createUser:"1605399440819564545",createDept:"1605399437405401089",createTime:"2023-11-27 18:27:33",updateUser:"1605399440819564545",updateTime:"2023-11-27 18:27:33",status:1,isDeleted:0,tenantId:"999606",productId:"1724611652675936257",productModelId:"1722809561007484929",productCarbonFootprintName:"11",approvalStandards:"ISO-14067:2018",totalEmission:null,productVO:{id:"1729084538459508737",createUser:"1605399440819564545",createDept:"1605399437405401089",createTime:"2023-11-27 18:27:33",updateUser:"1605399440819564545",updateTime:"2023-11-27 18:27:33",status:1,isDeleted:0,tenantId:"999606",name:"123",code:"1",type:"工业",manufacturingEnterprise:"2",manufacturingEnterpriseAddress:"2",count:"2",batchNumber:"123",unitMass:null,unit:"kg",productPicture:"http://192.168.2.201:9000/bucket2/upload/20231115101320563/1699493222541.jpg",flowChart:null,productDate:"2023-10-03,2023-11-19",explain:"update",carbonFootprintVO:null},productModelVO:{id:"1729084538459508737",createUser:"1605399440819564545",createDept:"1605399437405401089",createTime:"2023-11-27 18:27:33",updateUser:"1605399440819564545",updateTime:"2023-11-27 18:27:33",status:1,isDeleted:0,tenantId:"999606",name:"模型1",code:"1",lifecycle:"摇篮到大门"},productEmission:null,authenticationVO:null,calculateEntityList:null,productDistributionEntities:null,baseImg:null,label:!0},{id:"1729027664682909698",createUser:"1605399440819564545",createDept:"1605399437405401089",createTime:"2023-11-27 14:41:34",updateUser:"1605399440819564545",updateTime:"2023-11-27 14:41:34",status:1,isDeleted:0,tenantId:"999606",productId:"1727264924310138881",productModelId:"1716663367004770305",productCarbonFootprintName:"2121",approvalStandards:"ISO-14067:2018",totalEmission:null,productVO:{id:"1729027664682909698",createUser:"1605399440819564545",createDept:"1605399437405401089",createTime:"2023-11-27 14:41:34",updateUser:"1605399440819564545",updateTime:"2023-11-27 14:41:34",status:1,isDeleted:0,tenantId:"999606",name:"测试废弃物",code:"13",type:"废弃物",manufacturingEnterprise:"北京市北京市昌平区龙岗1号街道工业科技",manufacturingEnterpriseAddress:"北京市北京市昌平区龙岗1号街道工业科技园一号院区89号",count:"12111",batchNumber:"001001",unitMass:null,unit:"kg",productPicture:"http://192.168.2.201:9000/bucket2/upload/20231122175026095/截屏2023-11-13 18.16.09.png",flowChart:null,productDate:"2022-11-01,2022-12-21",explain:"北京市北京市昌平区龙岗1号街道工业科技园一号院区89号北京市北京市昌平区龙岗1号街道工业科技园一号院区89号北京市北京市昌平区龙岗1号街道工业科技园一号院区89号北京市北京市昌平区龙岗1号街道工业科技园一号院区89号北京市北京市昌平区龙岗1号街道工业科技园一号院区89号北京市北京市昌平区龙岗1号街道工业科技园一号院区89号北京市北京市昌平区龙岗1号街道工业科技园一号院区89号北京市北京市昌平区龙岗1号街道工业科技园一号院区89号",carbonFootprintVO:null},productModelVO:{id:"1729027664682909698",createUser:"1605399440819564545",createDept:"1605399437405401089",createTime:"2023-11-27 14:41:34",updateUser:"1605399440819564545",updateTime:"2023-11-27 14:41:34",status:1,isDeleted:0,tenantId:"999606",name:"模型13",code:"13",lifecycle:"摇篮到坟墓"},productEmission:null,authenticationVO:null,calculateEntityList:null,productDistributionEntities:null,baseImg:null,label:!0},{id:"1727265255228141570",createUser:"1605399440819564545",createDept:"1605399437405401089",createTime:"2023-11-22 17:58:23",updateUser:"1605399440819564545",updateTime:"2023-11-22 17:58:23",status:1,isDeleted:0,tenantId:"999606",productId:"1727264924310138881",productModelId:"1716663367004770305",productCarbonFootprintName:"测试1111",approvalStandards:"ISO-14067:2018",totalEmission:null,productVO:{id:"1727265255228141570",createUser:"1605399440819564545",createDept:"1605399437405401089",createTime:"2023-11-22 17:58:23",updateUser:"1605399440819564545",updateTime:"2023-11-22 17:58:23",status:1,isDeleted:0,tenantId:"999606",name:"测试废弃物",code:"13",type:"废弃物",manufacturingEnterprise:"北京市北京市昌平区龙岗1号街道工业科技",manufacturingEnterpriseAddress:"北京市北京市昌平区龙岗1号街道工业科技园一号院区89号",count:"12111",batchNumber:"001001",unitMass:null,unit:"kg",productPicture:"http://192.168.2.201:9000/bucket2/upload/20231122175026095/截屏2023-11-13 18.16.09.png",flowChart:null,productDate:"2022-11-01,2022-12-21",explain:"北京市北京市昌平区龙岗1号街道工业科技园一号院区89号北京市北京市昌平区龙岗1号街道工业科技园一号院区89号北京市北京市昌平区龙岗1号街道工业科技园一号院区89号北京市北京市昌平区龙岗1号街道工业科技园一号院区89号北京市北京市昌平区龙岗1号街道工业科技园一号院区89号北京市北京市昌平区龙岗1号街道工业科技园一号院区89号北京市北京市昌平区龙岗1号街道工业科技园一号院区89号北京市北京市昌平区龙岗1号街道工业科技园一号院区89号",carbonFootprintVO:null},productModelVO:{id:"1727265255228141570",createUser:"1605399440819564545",createDept:"1605399437405401089",createTime:"2023-11-22 17:58:23",updateUser:"1605399440819564545",updateTime:"2023-11-22 17:58:23",status:1,isDeleted:0,tenantId:"999606",name:"模型13",code:"13",lifecycle:"摇篮到坟墓"},productEmission:null,authenticationVO:null,calculateEntityList:null,productDistributionEntities:null,baseImg:null,label:!0},{id:"1726410242398240769",createUser:"1605399440819564545",createDept:"1605399437405401089",createTime:"2023-11-20 09:20:52",updateUser:"1605399440819564545",updateTime:"2023-11-20 09:20:52",status:1,isDeleted:0,tenantId:"999606",productId:"1722803540579045378",productModelId:"1721854737738829826",productCarbonFootprintName:"33",approvalStandards:"ISO-14067:2018",totalEmission:null,productVO:{id:"1726410242398240769",createUser:"1605399440819564545",createDept:"1605399437405401089",createTime:"2023-11-20 09:20:52",updateUser:"1605399440819564545",updateTime:"2023-11-20 09:20:52",status:1,isDeleted:0,tenantId:"999606",name:"1122",code:"12212",type:"工业",manufacturingEnterprise:"1221",manufacturingEnterpriseAddress:"212121",count:"2121",batchNumber:"2211",unitMass:null,unit:"g",productPicture:"http://192.168.2.201:9000/bucket2/upload/20231116174738632/icon_wuranwuleixingguanli.png",flowChart:null,productDate:"2022-11-01,2022-12-01",explain:"1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111",carbonFootprintVO:null},productModelVO:{id:"1726410242398240769",createUser:"1605399440819564545",createDept:"1605399437405401089",createTime:"2023-11-20 09:20:52",updateUser:"1605399440819564545",updateTime:"2023-11-20 09:20:52",status:1,isDeleted:0,tenantId:"999606",name:"1221",code:"12212",lifecycle:"摇篮到大门"},productEmission:null,authenticationVO:null,calculateEntityList:null,productDistributionEntities:null,baseImg:null,label:!0},{id:"1724248299185098753",createUser:"1605399440819564545",createDept:"1605399437405401089",createTime:"2023-11-14 10:10:04",updateUser:"1605399440819564545",updateTime:"2023-11-14 10:10:04",status:1,isDeleted:0,tenantId:"999606",productId:"1722803540579045378",productModelId:"1722809561007484929",productCarbonFootprintName:"2112",approvalStandards:"ISO-14067:2018",totalEmission:null,productVO:{id:"1724248299185098753",createUser:"1605399440819564545",createDept:"1605399437405401089",createTime:"2023-11-14 10:10:04",updateUser:"1605399440819564545",updateTime:"2023-11-14 10:10:04",status:1,isDeleted:0,tenantId:"999606",name:"1122",code:"1",type:"工业",manufacturingEnterprise:"1221",manufacturingEnterpriseAddress:"212121",count:"2121",batchNumber:"2211",unitMass:null,unit:"g",productPicture:"http://192.168.2.201:9000/bucket2/upload/20231116174738632/icon_wuranwuleixingguanli.png",flowChart:null,productDate:"2022-11-01,2022-12-01",explain:"1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111",carbonFootprintVO:null},productModelVO:{id:"1724248299185098753",createUser:"1605399440819564545",createDept:"1605399437405401089",createTime:"2023-11-14 10:10:04",updateUser:"1605399440819564545",updateTime:"2023-11-14 10:10:04",status:1,isDeleted:0,tenantId:"999606",name:"模型1",code:"1",lifecycle:"摇篮到大门"},productEmission:null,authenticationVO:null,calculateEntityList:null,productDistributionEntities:null,baseImg:null,label:!0},{id:"1724239634856136705",createUser:"1605399440819564545",createDept:"1605399437405401089",createTime:"2023-11-14 09:35:38",updateUser:"1605399440819564545",updateTime:"2023-11-14 09:35:38",status:1,isDeleted:0,tenantId:"999606",productId:"1701116510965358593",productModelId:"1711353273877032962",productCarbonFootprintName:"测试计算准不准",approvalStandards:"ISO-14067:2018",totalEmission:null,productVO:{id:"1724239634856136705",createUser:"1605399440819564545",createDept:"1605399437405401089",createTime:"2023-11-14 09:35:38",updateUser:"1605399440819564545",updateTime:"2023-11-14 09:35:38",status:1,isDeleted:0,tenantId:"999606",name:"305不锈钢",code:"NHK11254",type:"生活",manufacturingEnterprise:"山西太原钢铁",manufacturingEnterpriseAddress:"山西省太原市",count:"25",batchNumber:"202155236",unitMass:null,unit:"kg",productPicture:"http://192.168.2.201:9000/bucket2/upload/20231020095226476/2b709850a7db799a4a0d8c4e1cd190a.jpg",flowChart:null,productDate:"2023-03-01,2023-04-24",explain:"305 不锈钢是一种奥氏体不锈钢,用于需要卓越耐腐蚀性的应用。它通常用于生产消费品、医疗设备、电气元件和其他暴露在恶劣环境条件下的产品。因此,305 不锈钢已成为许多不同行业制造商越来越受欢迎的材料。",carbonFootprintVO:null},productModelVO:{id:"1724239634856136705",createUser:"1605399440819564545",createDept:"1605399437405401089",createTime:"2023-11-14 09:35:38",updateUser:"1605399440819564545",updateTime:"2023-11-14 09:35:38",status:1,isDeleted:0,tenantId:"999606",name:"尿素制造模型",code:"NHK11254",lifecycle:"摇篮到大门"},productEmission:null,authenticationVO:null,calculateEntityList:null,productDistributionEntities:null,baseImg:null,label:!0},{id:"1722809612425457665",createUser:"1720273705042350082",createDept:"1719918438626754562",createTime:"2023-11-10 10:53:15",updateUser:"1720273705042350082",updateTime:"2023-11-10 10:53:15",status:1,isDeleted:0,tenantId:"999606",productId:"1722803540579045378",productModelId:"1722809561007484929",productCarbonFootprintName:"核算1",approvalStandards:"ISO-14067:2018",totalEmission:null,productVO:{id:"1722809612425457665",createUser:"1720273705042350082",createDept:"1719918438626754562",createTime:"2023-11-10 10:53:15",updateUser:"1720273705042350082",updateTime:"2023-11-10 10:53:15",status:1,isDeleted:0,tenantId:"999606",name:"1122",code:"1",type:"工业",manufacturingEnterprise:"1221",manufacturingEnterpriseAddress:"212121",count:"2121",batchNumber:"2211",unitMass:null,unit:"g",productPicture:"http://192.168.2.201:9000/bucket2/upload/20231116174738632/icon_wuranwuleixingguanli.png",flowChart:null,productDate:"2022-11-01,2022-12-01",explain:"1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111",carbonFootprintVO:null},productModelVO:{id:"1722809612425457665",createUser:"1720273705042350082",createDept:"1719918438626754562",createTime:"2023-11-10 10:53:15",updateUser:"1720273705042350082",updateTime:"2023-11-10 10:53:15",status:1,isDeleted:0,tenantId:"999606",name:"模型1",code:"1",lifecycle:"摇篮到大门"},productEmission:null,authenticationVO:null,calculateEntityList:null,productDistributionEntities:null,baseImg:null,label:!0},{id:"1722073759692500993",createUser:"1605399440819564545",createDept:"1605399437405401089",createTime:"2023-11-08 10:09:14",updateUser:"1605399440819564545",updateTime:"2023-11-08 10:09:14",status:1,isDeleted:0,tenantId:"999606",productId:"1701116510965358593",productModelId:"1722073676255211521",productCarbonFootprintName:"yyy",approvalStandards:"ISO-14067:2018",totalEmission:null,productVO:{id:"1722073759692500993",createUser:"1605399440819564545",createDept:"1605399437405401089",createTime:"2023-11-08 10:09:14",updateUser:"1605399440819564545",updateTime:"2023-11-08 10:09:14",status:1,isDeleted:0,tenantId:"999606",name:"305不锈钢",code:"213213",type:"生活",manufacturingEnterprise:"山西太原钢铁",manufacturingEnterpriseAddress:"山西省太原市",count:"25",batchNumber:"202155236",unitMass:null,unit:"kg",productPicture:"http://192.168.2.201:9000/bucket2/upload/20231020095226476/2b709850a7db799a4a0d8c4e1cd190a.jpg",flowChart:null,productDate:"2023-03-01,2023-04-24",explain:"305 不锈钢是一种奥氏体不锈钢,用于需要卓越耐腐蚀性的应用。它通常用于生产消费品、医疗设备、电气元件和其他暴露在恶劣环境条件下的产品。因此,305 不锈钢已成为许多不同行业制造商越来越受欢迎的材料。",carbonFootprintVO:null},productModelVO:{id:"1722073759692500993",createUser:"1605399440819564545",createDept:"1605399437405401089",createTime:"2023-11-08 10:09:14",updateUser:"1605399440819564545",updateTime:"2023-11-08 10:09:14",status:1,isDeleted:0,tenantId:"999606",name:"ykj",code:"213213",lifecycle:"摇篮到大门"},productEmission:null,authenticationVO:null,calculateEntityList:null,productDistributionEntities:null,baseImg:null,label:!0},{id:"1719175492021452801",createUser:"1605399440819564545",createDept:"1605399437405401089",createTime:"2023-10-31 10:12:33",updateUser:"1605399440819564545",updateTime:"2023-10-31 10:12:33",status:1,isDeleted:0,tenantId:"999606",productId:"1701116510965358593",productModelId:"1716663367004770305",productCarbonFootprintName:"23213123",approvalStandards:"ISO-14067:2018",totalEmission:null,productVO:{id:"1719175492021452801",createUser:"1605399440819564545",createDept:"1605399437405401089",createTime:"2023-10-31 10:12:33",updateUser:"1605399440819564545",updateTime:"2023-10-31 10:12:33",status:1,isDeleted:0,tenantId:"999606",name:"305不锈钢",code:"13",type:"生活",manufacturingEnterprise:"山西太原钢铁",manufacturingEnterpriseAddress:"山西省太原市",count:"25",batchNumber:"202155236",unitMass:null,unit:"kg",productPicture:"http://192.168.2.201:9000/bucket2/upload/20231020095226476/2b709850a7db799a4a0d8c4e1cd190a.jpg",flowChart:null,productDate:"2023-03-01,2023-04-24",explain:"305 不锈钢是一种奥氏体不锈钢,用于需要卓越耐腐蚀性的应用。它通常用于生产消费品、医疗设备、电气元件和其他暴露在恶劣环境条件下的产品。因此,305 不锈钢已成为许多不同行业制造商越来越受欢迎的材料。",carbonFootprintVO:null},productModelVO:{id:"1719175492021452801",createUser:"1605399440819564545",createDept:"1605399437405401089",createTime:"2023-10-31 10:12:33",updateUser:"1605399440819564545",updateTime:"2023-10-31 10:12:33",status:1,isDeleted:0,tenantId:"999606",name:"模型13",code:"13",lifecycle:"摇篮到坟墓"},productEmission:null,authenticationVO:null,calculateEntityList:null,productDistributionEntities:null,baseImg:null,label:!0},{id:"1717116921771401217",createUser:"1605399440819564545",createDept:"1605399437405401089",createTime:"2023-10-25 17:52:31",updateUser:"1605399440819564545",updateTime:"2023-10-25 17:52:31",status:1,isDeleted:0,tenantId:"999606",productId:"1716652160545902593",productModelId:"1716663367004770305",productCarbonFootprintName:"23",approvalStandards:"PAS-2050",totalEmission:null,productVO:{id:"1717116921771401217",createUser:"1605399440819564545",createDept:"1605399437405401089",createTime:"2023-10-25 17:52:31",updateUser:"1605399440819564545",updateTime:"2023-10-25 17:52:31",status:1,isDeleted:0,tenantId:"999606",name:"产品122225542255422554",code:"13",type:"工业",manufacturingEnterprise:"21",manufacturingEnterpriseAddress:"21",count:"21",batchNumber:"21",unitMass:null,unit:"kg",productPicture:"http://192.168.2.201:9000/bucket2/upload/20231024110459201/pass.png",flowChart:null,productDate:"2023-09-01,2023-09-27",explain:"产品12产品12产品12产品12产品12产品12产品12产品12产品12产品12产品12产品12产品12产品12产品12产品122产品12产品12产品12产品12产品12产品12产品12产品12产品12产品产品12产品12产品12产品12产品12产品12产品12产品12产品12产品12产品12产品122产品12产品12产品12产品12产品12产品12产品12产品12产品12产品品12产品12产品12产品12产品12产品12产品12产品12产品12产品12产品122、",carbonFootprintVO:null},productModelVO:{id:"1717116921771401217",createUser:"1605399440819564545",createDept:"1605399437405401089",createTime:"2023-10-25 17:52:31",updateUser:"1605399440819564545",updateTime:"2023-10-25 17:52:31",status:1,isDeleted:0,tenantId:"999606",name:"模型13",code:"13",lifecycle:"摇篮到坟墓"},productEmission:null,authenticationVO:null,calculateEntityList:null,productDistributionEntities:null,baseImg:null,label:!0}],e=t.map(t=>({...t,createDateTxt:t.createTime,name:t.productVO.name,modalName:t.productModelVO.name,lifecycle:t.productModelVO.lifecycle,batchNumber:t.productVO.batchNumber,productDate:t.productVO.productDate}));this.data=e},handleDelete(t){this.$confirm("确定将选择数据删除?",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>Object(y["api_removeCarbonFootprintProductList"])(t.id)).then(()=>{this.onLoad(this.page),this.$message({type:"success",message:"操作成功!"}),this.active=0,this.$refs.crud.toggleSelection()})},searchReset(){this.query={},this.onLoad(this.page)},searchChange(t,e){this.query=t,this.page.currentPage=1,this.onLoad(this.page,t),e()},selectionChange(t){this.selectionList=t},selectionClear(){this.selectionList=[],this.$refs.crud.toggleSelection()},currentChange(t){this.page.currentPage=t,this.onLoad()},sizeChange(t){this.page.pageSize=t,this.onLoad()},refreshChange(){this.onLoad(this.page,this.query)}},filters:{toFixed2(t){return parseFloat(t).toFixed(2)}}},se=re,oe=(a("3092"),Object(I["a"])(se,i,r,!1,null,"41b36f60",null));e["default"]=oe.exports},"5d85":function(t,e,a){},"6a14e":function(t,e,a){},"6f33":function(t,e,a){"use strict";a("39cc")},"86e2":function(t,e,a){"use strict";a("5d3d")},"8b85":function(t,e,a){},"8d3b":function(t,e,a){},a2c4:function(t,e,a){"use strict";a("6a14e")},a5b1:function(t,e,a){},aa43:function(t,e,a){},aac2:function(t,e,a){},c292:function(t,e,a){"use strict";a("aac2")},c837:function(t,e,a){},c94c:function(t,e,a){},dadd:function(t,e,a){"use strict";a("249b")},f249:function(t,e,a){"use strict";a("1946")},f85a:function(t,e,a){"use strict";a("aa43")}}]);