(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0b6ae8"],{"1dcb":function(t,e,a){"use strict";a.r(e);var l=function(){var t=this,e=t._self._c;return e("div",[e("el-breadcrumb",[e("el-breadcrumb-item",[t._v("首页")]),e("el-breadcrumb-item",[t._v("基础数据管理")]),e("el-breadcrumb-item",[t._v("企业产品")])],1),e("el-card",{staticClass:"box-card"},[e("el-form",{attrs:{model:t.form,"label-width":"100px"}},[e("el-card",{staticClass:"box-card",staticStyle:{height:"80px"}},[e("el-row",{staticClass:"row-bg",attrs:{gutter:20,type:"flex",justify:"space-between"}},[e("el-col",{attrs:{span:6}},[e("el-form-item",{attrs:{label:"产品名称:"}},[e("el-input",{attrs:{size:"mini",placeholder:"请输入产品名称"},model:{value:t.form.product,callback:function(e){t.$set(t.form,"product",e)},expression:"form.product"}})],1)],1),e("el-col",{attrs:{span:6}},[e("el-form-item",{attrs:{label:"年生产能力:"}},[e("el-input",{attrs:{size:"mini",placeholder:"请输入年生产能力"},model:{value:t.form.productivity,callback:function(e){t.$set(t.form,"productivity",e)},expression:"form.productivity"}})],1)],1),e("el-col",{staticStyle:{margin:"5px"},attrs:{span:4}},[e("el-divider",{attrs:{direction:"vertical"}}),e("el-button",{attrs:{type:"primary",size:"mini"},on:{click:t.getProductList}},[t._v("查询")]),e("el-button",{attrs:{size:"mini"},on:{click:t.add}},[t._v("新增")])],1)],1)],1)],1),e("el-tabs",{model:{value:t.activeName,callback:function(e){t.activeName=e},expression:"activeName"}},[e("el-tab-pane",{attrs:{label:"列表展示",name:"first"}},[e("el-card",{staticClass:"box-heard"},[e("alltitle",{attrs:{msg:"企业产品列表"}}),e("el-table",{staticStyle:{width:"100%","margin-top":"10px"},attrs:{stripe:!0,data:t.tableData}},[t._l(t.colums,(function(a,l){return[a.template?t._e():e("el-table-column",{key:a.k,attrs:{align:"center",label:a.label,prop:a.prop,width:a.width,"column-key":a.columnKey,filters:a.filters,formatter:a.format,type:a.type,"filter-method":a.filterMethod,"show-overflow-tooltip":!0}}),"actionBar"==a.prop?e("el-table-column",{key:l,attrs:{align:"center",label:a.label,prop:a.prop,width:a.width},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-button",{attrs:{type:"text",size:"small"},on:{click:function(e){return t.remove(a.row)}}},[t._v("删除")]),e("el-button",{attrs:{type:"text",size:"small"},on:{click:function(e){return t.toEdit(a.row)}}},[t._v("编辑")])]}}],null,!0)}):t._e()]}))],2),e("el-pagination",{staticClass:"postop",staticStyle:{float:"right"},attrs:{"current-page":t.currentPage4,"page-sizes":[10,30,50,100],"page-size":1,layout:"total, sizes, prev, pager, next, jumper",total:t.tableData.length},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1)],1),e("el-tab-pane",{attrs:{label:"图形展示",name:"second"}},[e("el-card",{staticClass:"box-heard"},[e("el-row",{attrs:{gutter:10}},[e("el-col",{attrs:{span:8}},[e("el-card",{staticClass:"all-radius"},[e("carbonPie",{ref:"option",attrs:{option:t.option,width:400,height:280}})],1)],1),e("el-col",{attrs:{span:16}},[e("el-card",{staticClass:"all-radius"},[e("carbonPie",{ref:"option1",attrs:{option:t.option1,width:760,height:280}})],1)],1)],1)],1)],1)],1)],1),e("newadd",{ref:"add",on:{change:t.info}})],1)},o=[],r=(a("fcd3"),a("751a"));a("01ea");function i(t){return Object(r["b"])("/product/info",{params:t})}function s(t){return Object(r["b"])("/product/add",{params:t})}function n(t){return Object(r["b"])("/product/imginfo",{params:t})}var c=function(){var t=this,e=t._self._c;return e("div",[e("alldialog",{ref:"allDialog",attrs:{title:"新增企业产品"},on:{submit:t.submit}},[e("el-card",[e("el-form",{attrs:{model:t.form,"label-width":"120px"}},[e("alltitle",{attrs:{msg:"基本信息"}}),e("el-row",{staticClass:"pad",attrs:{gutter:20}},[e("el-col",{attrs:{span:12}},[e("el-form-item",{attrs:{label:"产品名称:"}},[e("el-input",{staticStyle:{width:"50%"},attrs:{size:"mini",placeholder:"请输入产品名称"},model:{value:t.form.product,callback:function(e){t.$set(t.form,"product",e)},expression:"form.product"}})],1)],1),e("el-col",{attrs:{span:12}},[e("el-form-item",{attrs:{label:"年生产能力:"}},[e("el-input",{staticStyle:{width:"50%"},attrs:{size:"mini",placeholder:"请输入年生产能力"},model:{value:t.form.productivity,callback:function(e){t.$set(t.form,"productivity",e)},expression:"form.productivity"}})],1)],1),e("el-col",{attrs:{span:12}},[e("el-form-item",{attrs:{label:"单位:"}},[e("el-input",{staticStyle:{width:"50%"},attrs:{size:"mini",placeholder:"请输入单位"},model:{value:t.form.unitl,callback:function(e){t.$set(t.form,"unitl",e)},expression:"form.unitl"}})],1)],1)],1),e("el-row",{attrs:{gutter:20}},[e("el-col",{attrs:{span:24}},[e("el-form-item",{attrs:{label:"备注:"}},[e("el-input",{staticStyle:{width:"80%"},attrs:{type:"textarea",rows:"2",size:"mini",placeholder:"请输入详情描述"},model:{value:t.form.details,callback:function(e){t.$set(t.form,"details",e)},expression:"form.details"}})],1)],1)],1)],1)],1)],1)],1)},p=[],d={data(){return{visible:!1,form:{product:"",productivity:"",unitl:"",details:"",product:""},propertys:[{value:"1",label:"二氧化碳"},{value:"2",label:"甲烷"},{value:"3",label:"氧化亚氮"},{value:"4",label:"氢氟碳化物"},{value:"5",label:"全氟碳化物"},{value:"6",label:"六氟化硫"},{value:"7",label:"三氟化硫"},{value:"8",label:"水泥"}]}},methods:{submit(){this.form.blongCompanyCode=this.$store.getters.userInfo.blongCompanyCode,this.form.user_name=this.$store.getters.userInfo.user_name,s(Object.assign(this.form)).then(t=>{console.log(t),this.$emit("change")}).catch(t=>{console.log(t)})},show(t){this.$refs.allDialog.showDialog(),t||(this.form=t)}}},u=d,m=a("1805"),b=Object(m["a"])(u,c,p,!1,null,"026deb84",null),f=b.exports,h={components:{newadd:f},data(){return{activeName:"first",currentPage4:1,form:{},tableData:[{product:"石油",productivity:"17535.26",unitl:"吨"},{product:"汽油",productivity:"28655.3",unitl:"吨"},{product:"煤炭",productivity:"869557.251",unitl:"吨"},{product:"煤油",productivity:"13521.2",unitl:"吨"},{product:"天然气",productivity:"86445.23",unitl:"吨"}],colums:[{width:80,type:"index",label:"序号"},{prop:"product",label:"产品"},{prop:"productivity",label:"年生产能力"},{prop:"unitl",label:"单位"},{prop:"material",label:"所需原料"},{prop:"unitlCarbon",label:"单位产品排放量"},{prop:"details",label:"备注"},{prop:"actionBar",label:"操作",template:!0}],option:{title:{text:"企业产品分布情况",left:"center"},tooltip:{trigger:"item"},legend:{orient:"vertical",left:"left"},series:[{name:"企业产品(吨)",type:"pie",radius:"50%",data:[],emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}}}]},option1:{title:{text:"企业产品生产情况",left:"center"},tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:[{type:"category",data:[],axisTick:{alignWithLabel:!0}}],yAxis:[{type:"value"}],series:[{name:"企业产品(吨)",type:"bar",barWidth:"60%",data:[]}]},blongCompanyCode:""}},created(){this.blongCompanyCode=this.$store.getters.userInfo.blongCompanyCode,this.info()},methods:{async info(){await i({blongCompanyCode:this.blongCompanyCode}).then(t=>{this.tableData=t.data}),await n({blongCompanyCode:this.blongCompanyCode}).then(t=>{console.log(t),t.data.forEach(t=>{this.option.series[0].data.push({value:t.productivity,name:t.product}),this.option1.xAxis[0].data.push(t.product),this.option1.series[0].data.push(t.productivity)}),this.$refs["option"].init(),this.$refs["option1"].init(),console.log(this.option,"5555")})},handleSizeChange(t){console.log(`每页 ${t} 条`)},handleCurrentChange(t){console.log("当前页: "+t)},add(t){this.$refs["add"].show(t)},getProductList(){},remove(t){},toEdit(t){this.$refs["add"].show(t)}}},g=h,y=Object(m["a"])(g,l,o,!1,null,"0f062e4d",null);e["default"]=y.exports}}]);