(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0d72a8"],{"763f":function(e,t,r){"use strict";r.r(t);var i=function(){var e=this,t=e._self._c;return t("basic-container",[t("avue-crud",{attrs:{"table-loading":e.loading,option:e.option,data:e.data,page:e.page},on:{"update:page":function(t){e.page=t},"search-change":e.searchChange,"search-reset":e.searchReset,"current-change":e.currentChange,"size-change":e.sizeChange,"refresh-change":e.refreshChange,"on-load":e.getPageList},scopedSlots:e._u([{key:"menu",fn:function({type:r,size:i,row:a}){return[t("el-button",{attrs:{icon:"el-icon-view",size:i,type:r},on:{click:function(t){return e.handleView(a)}}},[e._v("查 看")]),t("el-button",{attrs:{icon:"el-icon-edit",size:i,type:r},on:{click:function(t){return e.handleEdit(a)}}},[e._v("编 辑")]),t("el-button",{attrs:{icon:"el-icon-circle-plus-outline",size:i,type:r},on:{click:function(t){return e.handleAddProduction(a)}}},[e._v("添加生产设备")]),t("el-button",{attrs:{icon:"el-icon-delete",size:i,type:r,disabled:1==a.isRelevance},on:{click:function(t){return e.handleDel(a)}}},[e._v("删 除")]),t("el-button",{attrs:{icon:"el-icon-copy-document",size:i,type:r},on:{click:function(t){return e.handleCopy(a)}}},[e._v("复 制")])]}}])},[t("template",{slot:"menuLeft"},[t("el-button",{attrs:{type:"primary",size:"small",icon:"el-icon-plus"},on:{click:e.handleAdd}},[e._v("新 增")])],1)],2),e.addShow?t("el-drawer",{attrs:{title:"机组信息",visible:e.addShow,direction:"rtl","before-close":e.handleClose,"modal-append-to-body":!1,"append-to-body":!0,size:"70%"},on:{"update:visible":function(t){e.addShow=t}}},[t("DeviceGroup",{ref:"deviceGroup",attrs:{disVersion:e.disVersion,getPageList:e.getPageList},on:{updateAddShow:e.updateAddShow}})],1):e._e(),e.addShowProduction?t("el-drawer",{staticClass:"el-dialog__wrapper avue-dialog avue-crud__dialog",attrs:{title:"新增生产设备",visible:e.addShowProduction,direction:"rtl","before-close":e.closeProduction,"append-to-body":!0,"modal-append-to-body":!1,size:"90%"},on:{"update:visible":function(t){e.addShowProduction=t}}},[t("Production",{ref:"production",attrs:{deviceGroupId:e.deviceGroupId}})],1):e._e(),t("el-dialog",{attrs:{title:"修订版本",visible:e.isVersion,width:"30%","before-close":e.handleCloseVersion,"modal-append-to-body":!1,"append-to-body":!0},on:{"update:visible":function(t){e.isVersion=t}}},[t("el-form",{ref:"versionForm",attrs:{rules:e.rules,model:e.versionForm,inline:""}},[t("el-form-item",{attrs:{label:"版本号:",prop:"version"}},[t("el-select",{staticStyle:{width:"100%"},attrs:{clearable:"",placeholder:"请选择版本号"},model:{value:e.versionForm.version,callback:function(t){e.$set(e.versionForm,"version",t)},expression:"versionForm.version"}},e._l(e.versionList,(function(e){return t("el-option",{key:e.id,attrs:{label:e.dictValue,value:e.dictValue}})})),1)],1)],1),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{attrs:{type:"primary"},on:{click:e.handleSaveVersion}},[e._v("保 存")]),t("el-button",{on:{click:e.handleCloseVersion}},[e._v("取 消")])],1)],1)],1)},a=[],o=r("f1de"),l=function(){var e=this,t=e._self._c;return t("basic-container",[t("el-form",{ref:"form",staticStyle:{"margin-right":"20px"},attrs:{rules:e.rules,model:e.setForm,"label-width":"160px",disabled:e.editShow}},[t("el-row",{attrs:{gutter:30}},[t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"年度:",prop:"year"}},[t("el-date-picker",{staticStyle:{width:"100%"},attrs:{clearable:"",format:"yyyy","value-format":"yyyy","picker-options":e.pickeroption,type:"year",placeholder:"请选择年度"},model:{value:e.setForm.year,callback:function(t){e.$set(e.setForm,"year",t)},expression:"setForm.year"}})],1)],1),t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"行业:",prop:"industryName"}},[t("el-select",{staticStyle:{width:"100%"},attrs:{clearable:"",placeholder:"请选择行业"},on:{change:e.selectIndustryName},model:{value:e.setForm.industryName,callback:function(t){e.$set(e.setForm,"industryName",t)},expression:"setForm.industryName"}},e._l(e.industryNames,(function(e){return t("el-option",{key:e.id,attrs:{label:e.name,value:e.name}})})),1)],1)],1)],1),t("el-row",{attrs:{gutter:30}},[t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"机组名称:",prop:"deviceGroupName"}},[t("el-input",{attrs:{clearable:"",placeholder:"请输入机组名称"},model:{value:e.setForm.deviceGroupName,callback:function(t){e.$set(e.setForm,"deviceGroupName",t)},expression:"setForm.deviceGroupName"}})],1)],1),t("el-col",{attrs:{span:12}},e._l(e.deviceGroupTypeList,(function(r){return t("el-form-item",{key:r.id,attrs:{label:"机组类型:",prop:"deviceGroupType"}},[t("el-select",{attrs:{placeholder:"请选择机组类型",clearable:""},on:{change:e.selectDeviceGroup},model:{value:e.setForm.deviceGroupType,callback:function(t){e.$set(e.setForm,"deviceGroupType",t)},expression:"setForm.deviceGroupType"}},e._l(r.children,(function(e){return t("el-option",{key:e.id,attrs:{label:e.dictValue,value:e.dictValue}})})),1)],1)})),1)],1),t("el-row",{attrs:{gutter:30}},[t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"燃料类型:",prop:"fuelType"}},[t("el-select",{attrs:{disabled:"",placeholder:"请选择燃料类型"},model:{value:e.setForm.fuelType,callback:function(t){e.$set(e.setForm,"fuelType",t)},expression:"setForm.fuelType"}},e._l(e.fuelTypeList,(function(e){return t("el-option",{key:e.id,attrs:{label:e.dictValue,value:e.dictValue}})})),1)],1)],1),t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"产品类别:",prop:"productType"}},[t("el-select",{attrs:{clearable:"",placeholder:"产品类别"},model:{value:e.setForm.productType,callback:function(t){e.$set(e.setForm,"productType",t)},expression:"setForm.productType"}},e._l(e.productTypeList,(function(e){return t("el-option",{key:e.dictKey,attrs:{label:e.dictValue,value:e.dictValue}})})),1)],1)],1)],1),t("el-row",{attrs:{gutter:30}},[t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"机组编码:",prop:"deviceGroupCode"}},[t("el-input",{attrs:{clearable:"",placeholder:"请输入机组编码"},model:{value:e.setForm.deviceGroupCode,callback:function(t){e.$set(e.setForm,"deviceGroupCode",t)},expression:"setForm.deviceGroupCode"}})],1)],1),t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"燃料名称:",prop:"fuelName"}},[t("el-select",{attrs:{clearable:"",multiple:"",placeholder:"请选择燃料名称"},model:{value:e.setForm.fuelName,callback:function(t){e.$set(e.setForm,"fuelName",t)},expression:"setForm.fuelName"}},e._l(e.fuelNameList,(function(e){return t("el-option",{key:e.id,attrs:{label:e.factorName,value:e.factorName}})})),1)],1)],1)],1)],1),t("div",{staticClass:"avue-dialog__footer"},[e.editShow?e._e():t("el-button",{attrs:{type:"primary",icon:"el-icon-circle-plus-outline"},on:{click:e.handleSave}},[e._v("保存")]),t("el-button",{attrs:{icon:"el-icon-circle-close"},on:{click:e.handleCanCel}},[e._v("取消")])],1)],1)},s=[],n=r("2c14"),d=r("c54a"),c={props:["getPageList","disVersion"],data(){return{pickeroption:{disabledDate(e){return e.getTime()>=(new Date).getTime()}},editShow:!1,setForm:{year:(new Date).getFullYear().toString(),fuelType:"",productType:"",version:"v1.5.0"},industryNames:[],industryId:"",deviceGroupTypeList:[],fuelTypeList:[],fuelNameList:[],isBlendedBiomassFuelList:[],productTypeList:[],mainProductList:[],rules:{year:[{required:!0,message:"请选择年度",trigger:"blur"}],industryName:[{required:!0,message:"请选择行业",trigger:"change"}],deviceGroupName:[{required:!0,message:"请输入机组名称",trigger:"blur"},{validator:d["j"],trigger:"blur"}],deviceGroupType:[{required:!0,message:"请选择机组类型",trigger:"change"}],fuelType:[{required:!0,message:"请选择燃料类型",trigger:"change"}],fuelName:[{required:!0,message:"请选择燃料名称",trigger:"blur"}],isBlendedBiomassFuel:[{required:!0,message:"请选择是或否",trigger:"change"}],deviceGroupCode:[{required:!0,message:"请输入机组编码",trigger:"blur"},{validator:d["j"],trigger:"blur"}],productType:[{required:!0,message:"请选择产品类别",trigger:"change"}],totalCapacity:[{required:!0,message:"请输入装机容量(总和)",trigger:"blur"},{validator:d["a"],trigger:"blur"}],capacityMax:[{required:!0,message:"请输入装机容量(最大)",trigger:"blur"},{validator:d["a"],trigger:"blur"}],deviceGroupYearOfInvestment:[{required:!0,message:"请输入机组投产年份",trigger:"blur"}],designedLife:[{required:!0,message:"请输入设计寿命",trigger:"blur"},{validator:d["a"],trigger:"blur"}],mainProduct:[{required:!0,message:"请选择主营产品",trigger:"blur"}]},versionList:[]}},methods:{init(){this.getSystemDict(),this.getTreeList(),this.getOwnFactortList()},infoForm(){return{industryName:"",industryId:"",deviceGroupName:"",deviceGroupType:"",fuelType:"",fuelName:"",isBlendedBiomassFuel:"",deviceGroupCode:"",productType:"",totalCapacity:"",capacityMax:"",deviceGroupYearOfInvestment:"",designedLife:"",mainProduct:""}},getTreeList(){Object(n["getParentList"])({parentId:0}).then(e=>{this.industryNames=e.data.data.records})},selectIndustryName(e){this.industryNames.forEach(t=>{t.name===e&&(this.industryId=t.id)})},getSystemDict(){Object(o["getDict"])("deviceGroup_type").then(e=>{this.deviceGroupTypeList=e.data.data,console.log(this.deviceGroupTypeList,"this.deviceGroupTypeList")}),Object(o["getDict"])("fuel_type").then(e=>{if(e.data.data.length){const t=["rm","ry","rq"],r=e.data.data[0].children,i=r.filter((e,i)=>r[i].dictKey==t[i]);this.fuelTypeList=i}}),Object(o["getDict"])("is_blended_biomass_fuel").then(e=>{this.isBlendedBiomassFuelList=e.data.data}),Object(o["getDict"])("main_product").then(e=>{this.mainProductList=e.data.data}),Object(o["getDict"])("version").then(e=>{this.versionList=e.data.data[0].children||[]})},selectDeviceGroup(e){let t=[];this.deviceGroupTypeList&&this.deviceGroupTypeList.length&&(t=this.deviceGroupTypeList[0].children);const{dictValue:r,dictKey:i,remark:a}=t.find(t=>t.dictValue==e);if(this.setForm.fuelType=i,"燃油机组"==r&&!a)return this.setForm.productType="/",void(this.productTypeList=[]);this.setForm.productType="",a&&Object(o["getDict"])(a).then(e=>{this.productTypeList=e.data.data.length&&e.data.data[0].children||[]})},getOwnFactortList(){Object(o["getOwnFactortList"])("RLRS").then(e=>{200===e.data.code&&(this.fuelNameList=e.data.data)})},handleSave(){this.$refs.form.validate(e=>{e&&(this.setForm.industryId=this.industryId,this.setForm.fuelName=this.setForm.fuelName.join(","),this.setForm.mainProduct=this.setForm.mainProduct.join(","),Object(o["postSet"])(this.setForm).then(e=>{200===e.data.code&&(this.$message.success("保存成功"),this.$emit("updateAddShow",!1),this.setForm=this.infoForm(),this.getPageList())}).catch(e=>{this.setForm.fuelName=this.setForm.fuelName.split(","),this.setForm.mainProduct=this.setForm.mainProduct.split(",")}))})},handleCanCel(){this.$confirm("确认关闭?").then(e=>{this.$emit("updateAddShow",!1),this.setFrom=this.infoForm()}).catch(e=>{})}},mounted(){this.init()}},u=c,p=r("1805"),m=Object(p["a"])(u,l,s,!1,null,"c4c1caf2",null),h=m.exports,g=function(){var e=this,t=e._self._c;return t("basic-container",[t("avue-crud",{attrs:{"table-loading":e.loading,option:e.option,data:e.data,page:e.page},on:{"update:page":function(t){e.page=t},"on-load":e.getProductionList,"current-change":e.currentChange,"size-change":e.sizeChange,"refresh-change":e.refreshChange},scopedSlots:e._u([{key:"menu",fn:function({row:r}){return[t("el-button",{attrs:{type:"text",size:"small",icon:"el-icon-edit"},on:{click:function(t){return e.handleEdit(r)}}},[e._v("编 辑")]),t("el-button",{attrs:{type:"text",size:"small",icon:"el-icon-delete"},on:{click:function(t){return e.handleDel(r)}}},[e._v("删 除")])]}}])},[t("template",{slot:"menuLeft"},[t("el-button",{attrs:{type:"primary",size:"small",icon:"el-icon-plus"},on:{click:e.handleAdd}},[e._v("新 增")])],1)],2),t("el-dialog",{attrs:{title:"新增",visible:e.addProduction,direction:"rtl","before-close":e.handleCloseProduction,"append-to-body":!0,"modal-append-to-body":!1,size:"60%"},on:{"update:visible":function(t){e.addProduction=t}}},[e.addProduction?t("el-form",{ref:"productionForm",attrs:{rules:e.rules,model:e.productionForm,"label-width":"160px"}},[t("el-row",{attrs:{gutter:30}},[t("el-col",{attrs:{span:24}},e._l(e.deviceTypeList,(function(r){return t("el-form-item",{key:r.id,attrs:{label:"设施类别:",prop:"deviceType"}},[t("el-select",{attrs:{placeholder:"请选择设施类别",clearable:""},on:{change:e.selectDeviceType},model:{value:e.productionForm.deviceType,callback:function(t){e.$set(e.productionForm,"deviceType",t)},expression:"productionForm.deviceType"}},e._l(r.children,(function(e){return t("el-option",{key:e.id,attrs:{label:e.dictValue,value:e.dictValue}})})),1)],1)})),1)],1),"锅炉"===e.productionForm.deviceType?[t("el-row",{attrs:{gutter:30}},[t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"设施类型:",prop:"deviceSubType"}},[t("el-select",{attrs:{placeholder:"请选择设施类型",clearable:""},model:{value:e.productionForm.deviceSubType,callback:function(t){e.$set(e.productionForm,"deviceSubType",t)},expression:"productionForm.deviceSubType"}},e._l(e.deviceSubTypeList,(function(e){return t("el-option",{key:e.id,attrs:{label:e.dictValue,value:e.dictValue}})})),1)],1)],1),t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"锅炉名称:",prop:"deviceName"}},[t("el-input",{attrs:{clearable:"",placeholder:"请输入锅炉名称"},model:{value:e.productionForm.deviceName,callback:function(t){e.$set(e.productionForm,"deviceName",t)},expression:"productionForm.deviceName"}})],1)],1)],1),t("el-row",{attrs:{gutter:30}},[t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"锅炉编号:",prop:"deviceNumber"}},[t("el-input",{attrs:{clearable:"",placeholder:"请输入锅炉编号"},model:{value:e.productionForm.deviceNumber,callback:function(t){e.$set(e.productionForm,"deviceNumber",t)},expression:"productionForm.deviceNumber"}})],1)],1),t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"锅炉型号:",prop:"deviceModel"}},[t("el-input",{attrs:{clearable:"",placeholder:"请输入锅炉型号"},model:{value:e.productionForm.deviceModel,callback:function(t){e.$set(e.productionForm,"deviceModel",t)},expression:"productionForm.deviceModel"}})],1)],1)],1),t("el-row",{attrs:{gutter:30}},[t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"设施安装位置:",prop:"installationSite"}},[t("el-select",{attrs:{placeholder:"请选择设施安装位置",clearable:""},model:{value:e.productionForm.installationSite,callback:function(t){e.$set(e.productionForm,"installationSite",t)},expression:"productionForm.installationSite"}},e._l(e.installationSiteList,(function(e){return t("el-option",{key:e.id,attrs:{label:e.dictValue,value:e.dictValue}})})),1)],1)],1),t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"生产能力:",prop:"productivity"}},[t("el-input",{attrs:{clearable:"",placeholder:"请输入生产能力"},model:{value:e.productionForm.productivity,callback:function(t){e.$set(e.productionForm,"productivity",t)},expression:"productionForm.productivity"}},[t("template",{slot:"append"},[e._v("t/h")])],2)],1)],1)],1),t("el-row",{attrs:{gutter:30}},[t("el-col",{attrs:{span:12}},e._l(e.isAccountingBoundaryList,(function(r){return t("el-form-item",{key:r.id,attrs:{label:"是否纳入核算边界:",prop:"isAccountingBoundary"}},[t("el-select",{attrs:{placeholder:"请输入是否纳入核算边界"},model:{value:e.productionForm.isAccountingBoundary,callback:function(t){e.$set(e.productionForm,"isAccountingBoundary",t)},expression:"productionForm.isAccountingBoundary"}},e._l(r.children,(function(e){return t("el-option",{key:e.dictKey,attrs:{label:e.dictValue,value:e.dictValue}})})),1)],1)})),1)],1)]:e._e(),"发电机"===e.productionForm.deviceType?[t("el-row",{attrs:{gutter:30}},[t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"发电机名称:",prop:"deviceName"}},[t("el-input",{attrs:{clearable:"",placeholder:"请输入发电机名称"},model:{value:e.productionForm.deviceName,callback:function(t){e.$set(e.productionForm,"deviceName",t)},expression:"productionForm.deviceName"}})],1)],1),t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"发电机编号:",prop:"deviceNumber"}},[t("el-input",{attrs:{clearable:"",placeholder:"请输入发电机编号"},model:{value:e.productionForm.deviceNumber,callback:function(t){e.$set(e.productionForm,"deviceNumber",t)},expression:"productionForm.deviceNumber"}})],1)],1)],1),t("el-row",{attrs:{gutter:30}},[t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"发电机型号:",prop:"deviceModel"}},[t("el-input",{attrs:{clearable:"",placeholder:"请输入发电机型号"},model:{value:e.productionForm.deviceModel,callback:function(t){e.$set(e.productionForm,"deviceModel",t)},expression:"productionForm.deviceModel"}})],1)],1),t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"额定功率:",prop:"ratedPower"}},[t("el-input",{attrs:{clearable:"",placeholder:"请输入额定功率"},model:{value:e.productionForm.ratedPower,callback:function(t){e.$set(e.productionForm,"ratedPower",t)},expression:"productionForm.ratedPower"}},[t("template",{slot:"append"},[e._v("MW")])],2)],1)],1)],1),t("el-row",{attrs:{gutter:30}},[t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"设备安装位置:",prop:"installationSite"}},[t("el-select",{attrs:{placeholder:"请选择设备安装位置",clearable:""},model:{value:e.productionForm.installationSite,callback:function(t){e.$set(e.productionForm,"installationSite",t)},expression:"productionForm.installationSite"}},e._l(e.installationSiteList,(function(e){return t("el-option",{key:e.id,attrs:{label:e.dictValue,value:e.dictValue}})})),1)],1)],1),t("el-col",{attrs:{span:12}},e._l(e.isAccountingBoundaryList,(function(r){return t("el-form-item",{key:r.id,attrs:{label:"是否纳入核算边界:",prop:"isAccountingBoundary"}},[t("el-select",{attrs:{placeholder:"请输入是否纳入核算边界"},model:{value:e.productionForm.isAccountingBoundary,callback:function(t){e.$set(e.productionForm,"isAccountingBoundary",t)},expression:"productionForm.isAccountingBoundary"}},e._l(r.children,(function(e){return t("el-option",{key:e.dictKey,attrs:{label:e.dictValue,value:e.dictValue}})})),1)],1)})),1)],1)]:e._e(),"汽轮机"===e.productionForm.deviceType?[t("el-row",{attrs:{gutter:30}},[t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"设施类型:",prop:"deviceSubType"}},[t("el-select",{attrs:{placeholder:"请选择设施类型",clearable:""},model:{value:e.productionForm.deviceSubType,callback:function(t){e.$set(e.productionForm,"deviceSubType",t)},expression:"productionForm.deviceSubType"}},e._l(e.deviceSubTypeList,(function(e){return t("el-option",{key:e.id,attrs:{label:e.dictValue,value:e.dictValue}})})),1)],1)],1),t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"汽轮机名称:",prop:"deviceName"}},[t("el-input",{attrs:{clearable:"",placeholder:"请输入汽轮机名称"},model:{value:e.productionForm.deviceName,callback:function(t){e.$set(e.productionForm,"deviceName",t)},expression:"productionForm.deviceName"}})],1)],1)],1),t("el-row",{attrs:{gutter:30}},[t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"汽轮机编号:",prop:"deviceNumber"}},[t("el-input",{attrs:{clearable:"",placeholder:"请输入汽轮机编号"},model:{value:e.productionForm.deviceNumber,callback:function(t){e.$set(e.productionForm,"deviceNumber",t)},expression:"productionForm.deviceNumber"}})],1)],1),t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"汽轮机型号:",prop:"deviceModel"}},[t("el-input",{attrs:{clearable:"",placeholder:"请输入汽轮机型号"},model:{value:e.productionForm.deviceModel,callback:function(t){e.$set(e.productionForm,"deviceModel",t)},expression:"productionForm.deviceModel"}})],1)],1)],1),t("el-row",{attrs:{gutter:30}},[t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"额定功率:",prop:"ratedPower"}},[t("el-input",{attrs:{clearable:"",placeholder:"请输入额定功率"},model:{value:e.productionForm.ratedPower,callback:function(t){e.$set(e.productionForm,"ratedPower",t)},expression:"productionForm.ratedPower"}},[t("template",{slot:"append"},[e._v("MW")])],2)],1)],1),t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"压力参数:",prop:"pressureParameters"}},[t("el-select",{attrs:{placeholder:"请选择压力参数"},model:{value:e.productionForm.pressureParameters,callback:function(t){e.$set(e.productionForm,"pressureParameters",t)},expression:"productionForm.pressureParameters"}},e._l(e.pressureparametersList,(function(e){return t("el-option",{key:e.dictKey,attrs:{label:e.dictValue,value:e.dictValue}})})),1)],1)],1)],1),t("el-row",{attrs:{gutter:30}},[t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"排气冷却方式:",prop:"exhaustMethod"}},[t("el-select",{attrs:{placeholder:"请选择压力参数"},model:{value:e.productionForm.exhaustMethod,callback:function(t){e.$set(e.productionForm,"exhaustMethod",t)},expression:"productionForm.exhaustMethod"}},e._l(e.exhaustCoolingMethodList,(function(e){return t("el-option",{key:e.dictKey,attrs:{label:e.dictValue,value:e.dictValue}})})),1)],1)],1),t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"设备安装位置:",prop:"installationSite"}},[t("el-select",{attrs:{placeholder:"请选择设备安装位置",clearable:""},model:{value:e.productionForm.installationSite,callback:function(t){e.$set(e.productionForm,"installationSite",t)},expression:"productionForm.installationSite"}},e._l(e.installationSiteList,(function(e){return t("el-option",{key:e.id,attrs:{label:e.dictValue,value:e.dictValue}})})),1)],1)],1)],1),t("el-row",[t("el-col",{attrs:{span:12}},e._l(e.isAccountingBoundaryList,(function(r){return t("el-form-item",{key:r.id,attrs:{label:"是否纳入核算边界:",prop:"isAccountingBoundary"}},[t("el-select",{attrs:{placeholder:"请输入是否纳入核算边界"},model:{value:e.productionForm.isAccountingBoundary,callback:function(t){e.$set(e.productionForm,"isAccountingBoundary",t)},expression:"productionForm.isAccountingBoundary"}},e._l(r.children,(function(e){return t("el-option",{key:e.dictKey,attrs:{label:e.dictValue,value:e.dictValue}})})),1)],1)})),1)],1)]:e._e()],2):e._e(),t("div",{staticClass:"avue-dialog__footer"},[t("el-button",{attrs:{type:"primary",icon:"el-icon-circle-plus-outline"},on:{click:e.handleSave}},[e._v("保存")]),t("el-button",{attrs:{icon:"el-icon-circle-close"},on:{click:e.handleCloseProduction}},[e._v("取消")])],1)],1)],1)},v=[],y=r("0e0b"),b={props:["deviceGroupId"],data(){return{exhaustCoolingMethodList:[],pressureparametersList:[],loading:!1,addProduction:!1,page:{total:0,currentPage:1,pageSize:10},option:{height:"auto",align:"center",border:!0,delBtn:!1,addBtn:!1,editBtn:!1,column:[{label:"设施类别",prop:"deviceType"},{label:"设备名称",prop:"deviceName"},{label:"设备型号",prop:"deviceModel"},{label:"设备编号",prop:"deviceNumber"},{label:"生产能力(t/h)",prop:"productivity"},{label:"额定功率(MW)",prop:"ratedPower"},{label:"压力参数",prop:"pressureParameters",hide:!0},{label:"排气冷却方式",prop:"exhaustMethod",hide:!0},{label:"设备安装位置",prop:"installationSite"},{label:"是否纳入核算边界",prop:"isAccountingBoundary",hide:!0}]},productionForm:{deviceType:"锅炉"},rules:{deviceType:[{required:!0,message:"请选择设施类别",trigger:"change"}],deviceSubType:[{required:!0,message:"请选择设施类型",trigger:"change"}],deviceName:[{required:!0,message:"请输入设备名称",trigger:"blur"},{validator:d["j"],trigger:"blur"}],deviceNumber:[{required:!0,message:"请输入设备编号",trigger:"blur"},{validator:d["j"],trigger:"blur"}],deviceModel:[{required:!0,message:"请输入设备型号",trigger:"blur"},{validator:d["j"],trigger:"blur"}],installationSite:[{required:!0,message:"请选择设施安装位置",trigger:"change"}],productivity:[{required:!0,message:"请输入生产能力",trigger:"blur"},{validator:d["a"],trigger:"blur"}],isAccountingBoundary:[{required:!0,message:"请选择是否纳入核算边界",trigger:"change"}],ratedPower:[{required:!0,message:"请输入额定功率",trigger:"blur"},{validator:d["a"],trigger:"blur"}],pressureParameters:[{required:!0,message:"请选择压力参数",trigger:"change"}],exhaustMethod:[{required:!0,message:"请选择排气冷却方式",trigger:"change"}]},deviceTypeList:[],deviceSubTypeList:[],isAccountingBoundaryList:[],installationSiteList:[],facilityTypeDict:[]}},methods:{selectDeviceType(e){this.productionForm={deviceGroupId:"",deviceName:"",deviceType:e,deviceSubType:"",deviceNumber:"",productivity:"",ratedPower:"",pressureParameters:"",exhaustMethod:"",installationSite:"",isAccountingBoundary:""},"锅炉"==e?this.changeDeviceType("device_boiler"):"汽轮机"==e&&this.changeDeviceType("device_sub_type")},init(){this.getSystemDict()},infoForm(){return{deviceGroupId:"",deviceName:"",deviceType:"锅炉",deviceSubType:"",deviceNumber:"",productivity:"",ratedPower:"",pressureParameters:"",exhaustMethod:"",installationSite:"",isAccountingBoundary:""}},getProductionList(){let e={current:this.page.currentPage,size:this.page.pageSize,deviceGroupId:this.deviceGroupId};this.loading=!0,Object(o["getProduction"])(e).then(e=>{if(200===e.data.code){const t=e.data.data;this.page.total=t.total||0,this.data=t.records||[],this.loading=!1}})},changeDeviceType(e="device_boiler"){Object(o["getDict"])(e).then(e=>{e.data.data.length&&(this.deviceSubTypeList=e.data.data[0].children)})},getSystemDict(){Object(o["getDict"])("device_type").then(e=>{this.deviceTypeList=e.data.data}),this.changeDeviceType(),Object(o["getDict"])("is_accounting_boundary").then(e=>{this.isAccountingBoundaryList=e.data.data}),Object(o["getDict"])("installation_site").then(e=>{this.installationSiteList=e.data.data[0].children||[]}),Object(o["getDict"])("pressure_parameters").then(e=>{e.data.data.length&&(this.pressureparametersList=e.data.data[0].children)}),Object(o["getDict"])("exhaust_cooling_method").then(e=>{e.data.data.length&&(this.exhaustCoolingMethodList=e.data.data[0].children)})},currentChange(e){this.page.currentPage=e},sizeChange(e){this.page.pageSize=e},refreshChange(){this.getPageList(this.page)},handleAdd(){this.addProduction=!0},handleEdit(e){this.addProduction=!0,this.productionForm=Object(y["b"])(e)},handleDel(e){this.$confirm("此操作将永久删除该文件, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{Object(o["removeProduction"])(e.id).then(e=>{200===e.data.code&&(this.$message.success("删除成功"),this.getProductionList())})}).catch(()=>{})},handleCloseProduction(){this.$confirm("确认关闭?").then(e=>{this.addProduction=!1,this.productionForm=this.infoForm()}).catch(e=>{})},handleSave(){this.$refs.productionForm.validate(e=>{e&&(this.productionForm.deviceGroupId=this.deviceGroupId,Object(o["saveProduction"])(this.productionForm).then(e=>{200===e.data.code&&(this.$message.success("保存成功"),this.productionForm=this.infoForm(),this.addProduction=!1,this.getProductionList())}))})}},mounted(){this.init()}},f=b,F=Object(p["a"])(f,g,v,!1,null,"0cc11a77",null),T=F.exports,S=r("f0a4"),L={components:{DeviceGroup:h,Production:T},computed:{...Object(S["b"])(["permission"])},data(){return{loading:!1,addShow:!1,addShowProduction:!1,deviceGroupId:"",data:[],page:{total:0,currentPage:1,pageSize:10},query:{},option:{searchMenuSpan:6,index:!0,height:"auto",align:"center",addBtn:!1,editBtn:!1,delBtn:!1,border:!0,menuWidth:400,column:[{label:"年度",prop:"year",search:!0,type:"year",width:100,valueFormat:"yyyy"},{label:"行业",prop:"industryName",width:200,type:"select",dicUrl:"/api/vz/industry/parent-list",dicFormatter:e=>e.data.records,props:{label:"name",value:"name"},search:!0},{label:"机组名称",prop:"deviceGroupName"},{label:"机组类型",prop:"deviceGroupType"},{label:"产品类别",prop:"productType"}]},isVersion:!1,rules:{version:[{required:!0,message:"请选择版本",trigger:"blur"}]},version:"",versionForm:{},disVersion:!1,versionList:[],versionId:""}},methods:{getPageList(){this.page.currentPage,this.page.pageSize,this.query;this.loading=!0;const e=[{id:"1753297026042257410",createUser:"1605399440819564545",createDept:"1605399437405401089",createTime:"2024-02-02 13:59:20",updateUser:"1605399440819564545",updateTime:"2024-03-11 14:55:39",status:1,isDeleted:0,tenantId:"999606",industryId:"1673153349597196289",industryName:"中国发电设施企业",year:2024,tempId:null,deviceGroupName:"2#机组",deviceGroupType:"燃煤机组",deviceGroupCode:"913704006644327461D01",fuelType:"燃煤",fuelName:"烟煤,柴油,无烟煤,焦炭",isBlendedBiomassFuel:"否",productType:"热电联产机组",totalCapacity:"40",capacityMax:"40",deviceGroupYearOfInvestment:2005,designedLife:"20",mainProduct:"电力,热力",version:"v1.5.0",attachFile:"",isRelevance:0,heatingRatio:"0",powerSupply:"0",heatingLoad:"0",loadingFactor:"0"},{id:"1752512621006774274",createUser:"1605399440819564545",createDept:"1605399437405401089",createTime:"2024-01-31 10:02:24",updateUser:"1605399440819564545",updateTime:"2024-01-31 10:29:22",status:1,isDeleted:0,tenantId:"999606",industryId:"1673153349597196289",industryName:"中国发电设施企业",year:2021,tempId:null,deviceGroupName:"3号机组",deviceGroupType:"燃油机组",deviceGroupCode:"20210101",fuelType:"燃油",fuelName:"石油焦,原油",isBlendedBiomassFuel:"否",productType:"/",totalCapacity:"100",capacityMax:"20",deviceGroupYearOfInvestment:2021,designedLife:"30",mainProduct:"电力",version:"v1.5.0",attachFile:null,isRelevance:0,heatingRatio:"0",powerSupply:"0",heatingLoad:"0",loadingFactor:"0"},{id:"1729401020364070913",createUser:"1605399440819564545",createDept:"1605399437405401089",createTime:"2023-11-28 15:25:09",updateUser:"1605399440819564545",updateTime:"2023-11-28 15:25:09",status:1,isDeleted:0,tenantId:"999606",industryId:"1673153349597196289",industryName:"中国发电设施企业",year:2020,tempId:null,deviceGroupName:"20年机组",deviceGroupType:"燃气机组",deviceGroupCode:"12",fuelType:"燃气",fuelName:"无烟煤",isBlendedBiomassFuel:"是",productType:"B级",totalCapacity:"12",capacityMax:"12",deviceGroupYearOfInvestment:2020,designedLife:"12",mainProduct:"电力,热力",version:"v1.5.0",attachFile:null,isRelevance:0,heatingRatio:"0",powerSupply:"0",heatingLoad:"0",loadingFactor:"0"},{id:"1727265236408299522",createUser:"1605399440819564545",createDept:"1605399437405401089",createTime:"2023-11-22 17:58:18",updateUser:"1605399440819564545",updateTime:"2023-11-22 17:58:18",status:2,isDeleted:0,tenantId:"999606",industryId:"1673153349597196289",industryName:"中国发电设施企业",year:2022,tempId:null,deviceGroupName:"1机组",deviceGroupType:"燃气机组",deviceGroupCode:"1111",fuelType:"燃气",fuelName:"无烟煤,烟煤",isBlendedBiomassFuel:"是",productType:"B级",totalCapacity:"11",capacityMax:"11",deviceGroupYearOfInvestment:2022,designedLife:"1",mainProduct:"电力",version:"v1.1.0",attachFile:null,isRelevance:0,heatingRatio:"0",powerSupply:"0",heatingLoad:"0",loadingFactor:"0"},{id:"1727262640981372929",createUser:"1605399440819564545",createDept:"1605399437405401089",createTime:"2023-11-22 17:47:59",updateUser:"1605399440819564545",updateTime:"2023-11-22 17:58:18",status:1,isDeleted:0,tenantId:"999606",industryId:"1673153349597196289",industryName:"中国发电设施企业",year:2022,tempId:null,deviceGroupName:"1机组",deviceGroupType:"燃气机组",deviceGroupCode:"1111",fuelType:"燃气",fuelName:"无烟煤,烟煤",isBlendedBiomassFuel:"是",productType:"B级",totalCapacity:"11",capacityMax:"11",deviceGroupYearOfInvestment:2022,designedLife:"1",mainProduct:"电力",version:"v1.0.0",attachFile:null,isRelevance:1,heatingRatio:"0",powerSupply:"0",heatingLoad:"0",loadingFactor:"0"},{id:"1694645662248861697",createUser:"1605399440819564545",createDept:"1605399437405401089",createTime:"2023-08-24 17:39:46",updateUser:"1605399440819564545",updateTime:"2023-11-22 17:47:13",status:1,isDeleted:0,tenantId:"999606",industryId:"1673153349597196289",industryName:"中国发电设施企业",year:2023,tempId:null,deviceGroupName:"2#机组",deviceGroupType:"燃煤机组",deviceGroupCode:"913704006644327461D01",fuelType:"燃煤",fuelName:"烟煤,柴油",isBlendedBiomassFuel:"否",productType:"热电联产机组",totalCapacity:"40",capacityMax:"40",deviceGroupYearOfInvestment:2005,designedLife:"20",mainProduct:"电力,热力",version:"v1.5.0",attachFile:"",isRelevance:0,heatingRatio:"0",powerSupply:"0",heatingLoad:"0",loadingFactor:"0"}];this.page.total=e.length,this.data=e,this.loading=!1},getSystemDict(){Object(o["getDict"])("version").then(e=>{this.versionList=e.data.data[0].children||[]})},handleVersion(e){this.isVersion=!0,this.getSystemDict(),this.versionForm.version=e.version,this.versionId=e.id,this.versionForm=Object(y["b"])(e)},handleSaveVersion(){this.$refs.versionForm.validate(e=>{if(e){let e={version:this.versionForm.version,id:this.versionId};this.versionForm.version=this.version,Object(o["getSetVersion"])(e).then(e=>{200===e.data.code&&(this.$message.success("修改成功"),this.version="",this.getPageList(),this.isVersion=!1)})}})},handleCloseVersion(e){this.$confirm("确认关闭?").then(e=>{this.isVersion=!1}).catch(e=>{})},handleAdd(){this.addShow=!0},searchChange(e,t){this.page.currentPage=1,this.query=e,this.getPageList(),t()},searchReset(){this.query={},this.getPageList()},currentChange(e){this.page.currentPage=e,this.getPageList()},sizeChange(e){this.page.pageSize=e,this.getPageList()},refreshChange(){this.page={pageSize:10,currentPage:1,total:0},this.getPageList()},updateAddShow(e){this.addShow=e,this.disVersion=!1},handleClose(){this.$refs.deviceGroup.handleCanCel()},closeProduction(){this.$confirm("确认关闭?").then(e=>{this.addShowProduction=!1}).catch(e=>{})},handleView(e){this.addShow=!0;let{year:t="",fuelName:r="",mainProduct:i="",deviceGroupYearOfInvestment:a,...o}=e;r=r.split(","),i=i.split(","),this.$nextTick(()=>{this.$refs.deviceGroup.setForm={year:new Date(t+"/01/01").getFullYear().toString(),deviceGroupYearOfInvestment:new Date(a+"/01/01").getFullYear().toString(),fuelName:r,mainProduct:i,...o},this.$refs.deviceGroup.editShow=!0})},handleEdit(e){this.addShow=!0,this.disVersion=!0;let{year:t="",fuelName:r="",mainProduct:i="",deviceGroupYearOfInvestment:a,...o}=Object(y["b"])(e);r=r.split(","),i=i.split(","),this.$nextTick(()=>{this.$refs.deviceGroup.setForm={year:new Date(t+"/01/01").getFullYear().toString(),deviceGroupYearOfInvestment:new Date(a+"/01/01").getFullYear().toString(),fuelName:r,mainProduct:i,...o}})},handleDel(e){this.$confirm("此操作将永久删除该文件, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{Object(o["removeSet"])(e.id).then(e=>{200===e.data.code&&(this.$message.success("删除成功"),this.getPageList())})}).catch(()=>{})},handleCopy(e){Object(o["copySet"])(e.id).then(e=>{200===e.data.code&&(this.$message.success("复制成功"),this.getPageList())})},handleAddProduction(e){this.addShowProduction=!0,this.deviceGroupId=e.id}},mounted(){}},P=L,w=Object(p["a"])(P,i,a,!1,null,"6d18a9e9",null);t["default"]=w.exports}}]);