(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-a71cee3a"],{"1ad5":function(t,e,a){},4945:function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"product-management"},[e("el-card",{staticClass:"box-card"},[e("el-form",{ref:"query",attrs:{model:t.query,"label-width":"80px"}},[e("el-row",{attrs:{gutter:80}},[e("el-col",{attrs:{span:6}},[e("div",[e("el-form-item",{attrs:{label:"产品名称:"}},[e("el-input",{attrs:{placeholder:"请输入"},model:{value:t.name,callback:function(e){t.name=e},expression:"name"}})],1)],1)]),e("el-col",{attrs:{span:6}},[e("div",[e("el-button",{attrs:{type:"primary",icon:"el-icon-search"},on:{click:t.search}},[t._v("搜索")]),e("el-button",{attrs:{plain:"",icon:"el-icon-delete"},on:{click:t.reset}},[t._v("清空")])],1)])],1)],1)],1),e("basic-container",{staticClass:"reports-content"},[e("el-row",{attrs:{gutter:20}},t._l(t.data,(function(a,i){return e("el-col",{key:i,attrs:{span:6}},[e("div",{staticClass:"card-box"},[e("div",{staticClass:"card-box-content"},[e("div",{staticStyle:{display:"flex","align-items":"center",overflow:"hidden",padding:"0 24px","margin-bottom":"30px"}},[e("el-image",{staticClass:"institutionimg",attrs:{"preview-src-list":[a.productPicture],src:a.productPicture,alt:""}}),e("el-tooltip",{staticClass:"item",staticStyle:{"margin-left":"8px",width:"120px"},attrs:{effect:"dark",content:a.name,placement:"top-end"}},[e("div",{staticClass:"emissionc"},[t._v(t._s(a.name))])])],1),e("div",{staticClass:"card-box-content-info",staticStyle:{"margin-bottom":"12px"}},[e("span",{staticStyle:{width:"70px"}},[t._v("产品型号:")]),e("span",[t._v(t._s(a.batchNumber))])]),e("div",{staticClass:"card-box-content-info"},[e("span",{staticStyle:{width:"70px"}},[t._v("生产企业:")]),e("span",[t._v(t._s(a.manufacturingEnterprise))])])]),e("div",{staticClass:"card-box-footer"},[e("div",{staticClass:"btn",on:{click:function(e){return t.showLCATag(a.id,!1)}}},[e("i",{staticClass:"el-icon-view"}),e("span",[t._v("查看")])]),e("div",{staticClass:"btn",on:{click:function(e){return t.showLCATag(a.id,!0)}}},[e("i",{staticClass:"el-icon-download"}),e("span",[t._v("下载")])])])])])})),1),e("el-pagination",{attrs:{"page-size":7,background:"",total:t.page.total,"hide-on-single-page":""},on:{"current-change":t.currentChange}}),0==t.data.length?e("el-empty",{staticStyle:{hight:"100%"},attrs:{description:"暂无数据"}}):t._e()],1),e("cus-drawe",{attrs:{size:"80%",title:"LCA碳标签",visible:t.tagVisible,showBtn:!1,buttons:[]},on:{handleBeforeClose:t.tagVisibleClose}},[t.tagList.length?e("el-row",{attrs:{gutter:20}},t._l(t.tagList,(function(a,i){return e("el-col",{key:a.id,attrs:{span:8}},[e("div",{staticClass:"vzQrCodeBoxWrapper"},[e("div",{ref:"cardBox",refInFor:!0,staticStyle:{height:"290px"}},[e("div",{staticClass:"vzQrCodeBox"},[e("div",[e("div",{staticClass:"df"},[e("el-image",{staticStyle:{width:"120px",height:"120px","border-radius":"6px !important","min-width":"100px"},attrs:{src:a.qrCodeSrc,"preview-src-list":[a.qrCodeSrc]}}),e("div",{staticClass:"ml32"},[e("h3",[t._v(t._s(a.name))])])],1),e("div",{staticClass:"vzQrCodeTxt"},[t._v(" 您可通过微信/移动端浏览器扫一扫查看数据,或保存二维码图片分享至移动端查看 ")])])]),e("div",{staticClass:"footprint"},[e("span",{staticClass:"footprintTitle"},[t._v("产品碳足迹:")]),e("span",{staticClass:"footprintValue"},[t._v(t._s(a.emission)+" / kgCO2eq")])]),e("div",{staticClass:"footprint"},[e("span",{staticClass:"footprintTitle"},[t._v("产品生命周期:")]),e("span",{staticClass:"footprintValue"},[t._v(" "+t._s(a.productModelVO.lifecycle)+" ")])])]),t.view?e("div",{staticClass:"vzQrCodeRight"},[e("div",{staticClass:"vzQrCodecon"},[e("el-button",{staticStyle:{"background-color":"#fff !important",color:"#19c297","border-radius":"2px",border:"1px solid #19c297"},on:{click:function(e){return t.saveImg(i)}}},[t._v("保存图片")])],1)]):t._e()])])})),1):t.tagList.length?t._e():e("el-empty",{staticStyle:{height:"80vh"},attrs:{description:"暂无数据"}})],1)],1)},s=[],r=(a("fcd3"),a("24cc")),n=a.n(r),c=a("d2e1"),o=a("17dd"),d=a.n(o),u=a("4a6d"),p=a("f0a4"),l=a("fe98"),g={data(){return{name:"",data:[],query:{},page:{pageSize:11,currentPage:1,total:0,size:11,page:1},tagVisible:!1,tagList:[],qrCodeSrc:{http:"http://192.168.2.203:8083",ip:""},view:!1}},created(){this.onLoad()},computed:{...Object(p["b"])(["userInfo"])},methods:{viewData(t){},handleDold(t){},tagVisibleClose(){this.tagList=[],this.tagVisible=!1},saveImg(t){const e=this.$refs.cardBox[t],a=this.$loading({lock:!0,text:"正在生成文件,请稍等。",spinner:"el-icon-loading",background:"rgba(0, 0, 0, 0.7)"});d()(e).then(t=>{const e=t.toDataURL("image/png"),i=document.createElement("a");i.href=e,i.download="扫码查看.png",i.click(),a.close()})},async getQRCode(t){let e={width:180,height:180,color:{dark:"#000000",light:"#ffffff"}},a=this.rsaPublicData(t);const i=`${this.qrCodeSrc.http}/#/?id=${a}`;return await n.a.toDataURL(i,e)},async showLCATag(t,e){this.view=e,this.tagVisible=!0;const{data:a}=await Object(c["api_getCarbonFootprintProductList"])({productId:t}),i=[];a.data.records.forEach(async t=>{i.push(Promise.all([this.getQRCode(t.id),this.getCarbonEmission(t.id,t.productVO.count)]).then(([e,a])=>{this.tagList.push({emission:a,qrCodeSrc:e,name:t.productVO.name,...t})}))}),await Promise.all(i)},rsaPublicData(t){const e="0476cf11ef3ab14ac836c0bf850c46cb96402c1d7dd4ded1591a4e5a4fea8951a96a842b4d4e7b9ec6fd779ccc6ef8d83ee7623184e6788847ed0c827351d41093",a=l["sm2"].doEncrypt(t,e);return a},async gethttp(){let t={category:1,tenantId:this.userInfo.tenant_id,status:2};const{data:e}=await Object(u["getLists"])(t);200===e.code&&e.data.records.length?this.qrCodeSrc.http=e.data.records[0].domainUrl:this.qrCodeSrc.http=""},async getCarbonEmission(t,e){const{data:a}=await Object(c["api_getCarbonEmissionProportion"])({carbonFootprintId:t,count:e});return a.data},reset(){this.query={},this.name="",this.onLoad()},search(){if(""==this.name)return!1;this.query.name=this.name,this.onLoad()},onLoad(){this.query,this.page.currentPage,this.page.pageSize;const t=[{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:"三相四线费控智能电表是针对国家建设智能电网而研发生产的智能型电能计量产品,主要是包括本地费控和远程费控两种,本地费控可以提前在电表内设置电价、金额等信息,智能电表能自行计费运算实现供电控制,远程费控则是由售电主站通过远程命令控制智能电表,进行跳闸断电及合闸恢复供电,三相四线费控智能电表是用电收费改革,提高供用电科学管理水平,促进合理用电的理想电能计量产品。"}];this.data=t},handleSizeChange(t){this.page.pageSize=t,this.onLoad()},currentChange(t){this.page.currentPage=t,this.onLoad()}}},h=g,m=(a("8fc6"),a("1805")),f=Object(m["a"])(h,i,s,!1,null,"4af7e369",null);e["default"]=f.exports},"8fc6":function(t,e,a){"use strict";a("1ad5")}}]);