(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6114790f"],{"1cdc":function(e,t,a){},"254a":function(e,t,a){},"30a4":function(e,t,a){"use strict";a("1cdc")},"35fd":function(e,t,a){"use strict";var r=function(){var e=this,t=e._self._c;return t("div",[t("el-dialog",{staticClass:"aboutDialog",staticStyle:{overflow:"auto"},attrs:{visible:e.isShow,fullscreen:e.isFullscreen,"append-to-body":"",width:e.width,top:e.top,center:e.btnIsCenter},on:{"update:visible":function(t){e.isShow=t},close:e.close,"before-close":e.beforeClose}},[t("div",{attrs:{slot:"title"},slot:"title"},[t("span",[e._v(e._s(e.title))])]),e._t("default"),e.dialogBtns.cancelShow&&e.showBtn||e.dialogBtns.submitShow&&e.showBtn?t("div",{attrs:{slot:"footer"},slot:"footer"},[t("el-button",{directives:[{name:"show",rawName:"v-show",value:e.dialogBtns.submitShow,expression:"dialogBtns.submitShow"}],attrs:{loading:e.submitLoading,size:"mini",type:"primary"},on:{click:e.handleSubmit}},[e._v(e._s(e.dialogBtns.submitText))]),t("el-button",{directives:[{name:"show",rawName:"v-show",value:e.dialogBtns.cancelShow,expression:"dialogBtns.cancelShow"}],attrs:{size:"mini"},on:{click:e.closeDiolog}},[e._v(e._s(e.dialogBtns.cancelText))])],1):e._e()],2)],1)},i=[],l={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(e){this.$confirm("确认关闭?").then(t=>{e(),this.$emit("beforeClose")}).catch(e=>{})},closeDiolog(){this.$emit("handleClose")},handleSubmit(){this.$emit("handleSubmit")}}},o=l,s=(a("a2c4"),a("30a4"),a("1805")),n=Object(s["a"])(o,r,i,!1,null,"500051b5",null);t["a"]=n.exports},"666e":function(e,t,a){"use strict";a("254a")},"6a14e":function(e,t,a){},9031:function(e,t,a){"use strict";a.d(t,"a",(function(){return r})),a.d(t,"b",(function(){return i}));const r=()=>{const e=["#2474FF","#FFA200","#1C3FFF","#BD1CFF","#1CD4FF","#19C297","#EB5454","#19C25F","#24BDFF","#FF4D01","#EB5486","#19B4C2","#242BFF","#FFF701","#EB54B9","#1927C2","#6624FF","#34FF01","#A054EB"];return e},i=()=>{const e=["#19C297","#FFA200","#2474FF","#EB5454","#C7C7C7","#9F54EB","#42E5E3"];return e}},a2c4:function(e,t,a){"use strict";a("6a14e")},d2bf:function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e._self._c;return t("basic-container",[t("el-row",{staticStyle:{"margin-bottom":"30px"},attrs:{gutter:20}},[t("el-col",{attrs:{span:8}},[t("div",{staticClass:"box"},[t("div",{staticClass:"header-title"},[e._v("设备总数")]),t("div",{staticClass:"titledf"},[t("div",{staticClass:"text-wrapper"},[t("div",{staticClass:"bg"},[t("span",{staticClass:"bg_text"},[e._v(e._s(22))]),t("span",{staticClass:"bg_text_uitl"},[e._v("单位:t")])])])])])]),t("el-col",{attrs:{span:8}},[t("div",{ref:"referer",staticClass:"header-col"})]),t("el-col",{attrs:{span:8}},[t("div",{ref:"shureferer",staticClass:"header-col"})])],1),t("el-row",[t("el-col",{attrs:{span:24}},[t("avue-crud",{ref:"crud",attrs:{option:e.option,"table-loading":e.loading,page:e.page,data:e.data},on:{"refresh-change":e.refreshChange,"search-change":e.searchChange,"search-reset":e.searchReset,"current-change":e.currentChange,"size-change":e.sizeChange,"selection-change":e.selectionChange,"update:page":function(t){e.page=t}},scopedSlots:e._u([{key:"menu",fn:function({row:a}){return[t("el-button",{attrs:{type:"text",size:"small",plain:"",icon:"el-icon-view"},on:{click:function(t){return e.viewData(a)}}},[e._v("查看")])]}}])},[t("template",{slot:"menuLeft"},[t("el-button",{attrs:{type:"primary",size:"small",icon:"el-icon-upload2"},on:{click:e.handleExport}},[e._v(" 导 出 ")])],1)],2)],1)],1),t("cus-drawe",{attrs:{size:"35%",title:"查看设备",visible:e.visible,buttons:e.buttonsList},on:{handleBeforeClose:e.handleBeforeClose,buttonClick:e.buttonsClick}},[t("el-form",{ref:"ruleForm",staticClass:"demo-ruleForm",attrs:{model:e.ruleForm,rules:e.rules,"label-width":"100px",disabled:""}},[t("el-row",[t("el-col",{attrs:{span:24}},[t("el-form-item",{attrs:{label:"设备名称:",prop:"name"}},[t("el-input",{attrs:{clearable:""},model:{value:e.ruleForm.name,callback:function(t){e.$set(e.ruleForm,"name",t)},expression:"ruleForm.name"}})],1)],1),t("el-col",{attrs:{span:24}},[t("el-form-item",{attrs:{label:"设备编码:",prop:"code"}},[t("el-input",{attrs:{clearable:""},model:{value:e.ruleForm.code,callback:function(t){e.$set(e.ruleForm,"code",t)},expression:"ruleForm.code"}})],1)],1),t("el-col",{attrs:{span:24}},[t("el-form-item",{attrs:{label:"规格型号:",prop:"model"}},[t("el-input",{attrs:{clearable:""},model:{value:e.ruleForm.model,callback:function(t){e.$set(e.ruleForm,"model",t)},expression:"ruleForm.model"}})],1)],1),t("el-col",{attrs:{span:24}},[t("el-form-item",{attrs:{label:"设备分类:",prop:"facilityTypeName"}},[t("el-input",{attrs:{clearable:""},model:{value:e.ruleForm.facilityTypeName,callback:function(t){e.$set(e.ruleForm,"facilityTypeName",t)},expression:"ruleForm.facilityTypeName"}})],1)],1),t("el-col",{attrs:{span:24}},[t("el-form-item",{attrs:{label:"设备位置:",prop:"place"}},[t("el-input",{attrs:{clearable:""},model:{value:e.ruleForm.place,callback:function(t){e.$set(e.ruleForm,"place",t)},expression:"ruleForm.place"}})],1)],1),t("el-col",{attrs:{span:24}},[t("el-form-item",{attrs:{label:"设备产能:",prop:"capacity"}},[t("el-input",{attrs:{clearable:""},model:{value:e.ruleForm.capacity,callback:function(t){e.$set(e.ruleForm,"capacity",t)},expression:"ruleForm.capacity"}})],1)],1),t("el-col",{attrs:{span:24}},[t("el-form-item",{attrs:{label:"购买日期:",prop:"purchaseDate"}},[t("el-date-picker",{staticStyle:{width:"100%"},attrs:{type:"date",placeholder:"选择日期","value-format":"yyyy-mm-dd"},model:{value:e.ruleForm.purchaseDate,callback:function(t){e.$set(e.ruleForm,"purchaseDate",t)},expression:"ruleForm.purchaseDate"}})],1)],1),t("el-col",{attrs:{span:24}},[t("el-form-item",{attrs:{label:"设备状态:",prop:"deviceStatus"}},[t("el-select",{attrs:{placeholder:"请选择"},model:{value:e.ruleForm.deviceStatus,callback:function(t){e.$set(e.ruleForm,"deviceStatus",t)},expression:"ruleForm.deviceStatus"}},e._l(e.devicTypeList,(function(e){return t("el-option",{key:e.dictKey,attrs:{label:e.dictValue,value:e.dictKey}})})),1)],1)],1),t("el-col",{attrs:{span:24}},[t("el-form-item",{attrs:{label:"恢复时间:",prop:"times"}},[t("el-date-picker",{staticStyle:{width:"100%"},attrs:{type:"datetimerange","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期",format:"yyyy-MM-dd","value-format":"yyyy-MM-dd"},model:{value:e.times,callback:function(t){e.times=t},expression:"times"}})],1)],1),t("el-col",{attrs:{span:24}},[t("el-form-item",{attrs:{label:"所属车间:",prop:"workshop"}},[t("el-input",{attrs:{clearable:""},model:{value:e.ruleForm.workshop,callback:function(t){e.$set(e.ruleForm,"workshop",t)},expression:"ruleForm.workshop"}})],1)],1)],1)],1)],1)],1)},i=[],l=(a("fcd3"),a("aada"),a("1287"),a("2fb4"),a("bc57")),o=a("af95"),s=a("35fd"),n=a("0e0b"),c=a("9031"),d={components:{cusDialog:s["a"],vzUpLoad:o["a"]},data(){return{colorArr:[],colorArrTwo:[],data:[{id:"1766024530311090178",createUser:"1762882390462664706",createDept:"1762872149339639810",createTime:"2024-03-08 08:53:53",updateUser:"1762882390462664706",updateTime:"2024-03-08 08:53:53",status:1,isDeleted:0,tenantId:"416380",code:"1102",name:"透平发电机",companyId:null,companyName:"鹰电能源有限公司",brand:"星河",model:"144",facilityTypeId:"1766022417807937537",facilityTypeName:"电能设备",place:"厂区东北",capacity:"221",purchaseDate:"2023-08-24",deviceStatus:"1",recoveryStartTime:null,recoveryStopTime:null,workshop:"1车间",remark:"22",accountEnterpriseId:"1762872149339639810"},{id:"1766024026113806338",createUser:"1762882390462664706",createDept:"1762872149339639810",createTime:"2024-03-08 08:51:53",updateUser:"1762882390462664706",updateTime:"2024-03-08 08:52:05",status:1,isDeleted:0,tenantId:"416380",code:"104",name:"热交换器",companyId:null,companyName:"啸莱能源有限公司",brand:"逐风",model:"210",facilityTypeId:"1766022234957254658",facilityTypeName:"热量传输设备",place:"厂区北",capacity:"332",purchaseDate:"2023-11-15",deviceStatus:"1",recoveryStartTime:null,recoveryStopTime:null,workshop:"2车间",remark:"11",accountEnterpriseId:"1762872149339639810"},{id:"1766015691834626050",createUser:"1762882141362950145",createDept:"1762871099350159361",createTime:"2024-03-08 08:18:46",updateUser:"1762882141362950145",updateTime:"2024-03-08 08:18:46",status:1,isDeleted:0,tenantId:"416380",code:"02",name:"空气预热器",companyId:null,companyName:"圣莱能源有限公司",brand:"苏式成",model:"112",facilityTypeId:"1766014432532598786",facilityTypeName:"发热设备",place:"厂区西南",capacity:"2210",purchaseDate:"2024-03-08",deviceStatus:"1",recoveryStartTime:null,recoveryStopTime:null,workshop:"1号车间",remark:null,accountEnterpriseId:"1762871099350159361"},{id:"1766015424145756162",createUser:"1762882141362950145",createDept:"1762871099350159361",createTime:"2024-03-08 08:17:42",updateUser:"1762882141362950145",updateTime:"2024-03-08 08:17:42",status:1,isDeleted:0,tenantId:"416380",code:"01",name:"燃气内燃机",companyId:null,companyName:"圣莱能源有限公司",brand:"赛巴斯",model:"1421",facilityTypeId:"1766014558110060546",facilityTypeName:"发电设备",place:"厂房东区",capacity:"1120",purchaseDate:"2023-07-20",deviceStatus:"1",recoveryStartTime:null,recoveryStopTime:null,workshop:"2号车间",remark:null,accountEnterpriseId:"1762871099350159361"},{id:"1766000576779358209",createUser:"1762882894181797889",createDept:"1762873995252830210",createTime:"2024-03-08 07:18:42",updateUser:"1762882894181797889",updateTime:"2024-03-08 07:18:42",status:1,isDeleted:0,tenantId:"416380",code:"#7881",name:"运输机",companyId:null,companyName:"圣莱能源有限公司",brand:"雕牌",model:"700",facilityTypeId:"1766000417026707457",facilityTypeName:"类型一",place:"车间一",capacity:"69",purchaseDate:"2023-03-06",deviceStatus:"1",recoveryStartTime:null,recoveryStopTime:null,workshop:"车间一",remark:null,accountEnterpriseId:"1762873995252830210"}],buttonsList:[],ruleForm:{},visible:!1,option:{align:"left",border:!1,index:!1,searchMenuSpan:6,addBtn:!1,delBtn:!1,menu:!0,height:"auto",calcHeight:30,editBtn:!1,selection:!0,tip:!1,menuAlign:"left",menuHeaderAlign:"left",column:[{label:"设备名称",prop:"name",search:!0},{label:"所属企业",prop:"companyName"},{label:"设备编码",prop:"code",search:!0},{label:"设备品牌",prop:"brand"},{label:"所属车间",prop:"workshop"}]},loading:!1,devicTypeList:[],defaultProps:{children:"children",label:"label"},page:{total:0,size:10,current:1},rules:null,query:{},fileList:[],optionTypePie:null,optionStatePie:null,ids:[],facilityData:{},times:[]}},async mounted(){this.colorArrTwo=Object(c["b"])(),this.getDeviceTypeDistribution()},methods:{async getFacilityTypeDistributionFn(){await Object(l["getFacilityTypeDistribution"])().then(e=>{this.facilityData=e.data.data})},getDeviceTypeDistribution(){this.optionTypePie={title:{text:"设备类型分布",left:"left",top:"0",textStyle:{fontSize:16,fontFamily:"PingFangSC",color:"#1b1b1b"}},tooltip:{trigger:"item",formatter:function(e){var t=e.name+"
",a=e.color;return t+='',t+=e.value+"个",t+='
'+e.percent+"%",t}},grid:{left:"10%",right:"60%"},legend:{type:"scroll",orient:"vertical",right:"0",top:"18%"},series:[{type:"pie",radius:["35%","60%"],center:["40%","50%"],avoidLabelOverlap:!0,minAngle:10,itemStyle:{borderRadius:3,borderColor:"#fff",borderWidth:2},label:{show:!1},data:[{name:"发电机组",value:1},{name:"汽轮机",value:1},{name:"1",value:2},{name:"类型二",value:1},{name:"燃煤锅炉",value:1},{name:"锅炉辅机",value:1}],color:this.colorArr}]},this.optionStatePie={title:{text:"设备状态分布",left:"left",top:"0",textStyle:{fontSize:16,fontFamily:"PingFangSC",color:"#1b1b1b"}},tooltip:{trigger:"item",formatter:function(e){var t=e.name+"
",a=e.color;return t+='',t+=e.value+"个",t+='
'+e.percent+"%",t}},grid:{left:"10%",right:"60%"},legend:{orient:"vertical",right:"0",top:"18%"},series:[{type:"pie",radius:["35%","60%"],center:["40%","50%"],avoidLabelOverlap:!0,minAngle:10,itemStyle:{borderRadius:3,borderColor:"#fff",borderWidth:2},label:{show:!1},data:[{name:"运行",value:"86.00"},{name:"维修",value:"14.00"}],color:this.colorArrTwo}]},this.optionsPiesTwo(),this.optionsPiesThree()},selectionChange(e){e.length>0&&(this.ids=e.map(e=>e.id))},handleExport(){if(console.log(this.ids),this.ids.length>0){const e=this.$loading({lock:!0,text:"正在导出文件,请稍等。",spinner:"el-icon-loading",background:"rgba(0, 0, 0, 0.7)"}),t={ids:this.ids};Object(l["exportFacilityList"])(t).then(t=>{e.close();const a=t.data,r=new Blob([a],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),i="设备台账文件.xlsx";if("download"in document.createElement("a")){const e=document.createElement("a");e.download=i,e.style.display="none",e.href=URL.createObjectURL(r),document.body.appendChild(e),e.click(),URL.revokeObjectURL(e.href),document.body.removeChild(e)}else navigator.msSaveBlob(r,i)})}else this.$message.error("请选择导出的数据")},optionsPiesTwo(){var e=this.$echarts.init(this.$refs.referer);e.clear(),this.$nextTick(()=>{e.setOption(this.optionTypePie),window.addEventListener("resize",()=>{e.resize()})})},optionsPiesThree(){var e=this.$echarts.init(this.$refs.shureferer);e.clear(),this.$nextTick(()=>{e.setOption(this.optionStatePie),window.addEventListener("resize",()=>{e.resize()})})},getDeviceType(){qrCode("device_type").then(e=>{this.devicTypeList=e.data.data[0].children})},async getFileListFn(e){let{data:t}=await getFileList(e);t.data.records.forEach(e=>{e.name=e.introduction}),this.fileList=t.data.records},currentChange(e){this.page.current=e,this.onLoad()},sizeChange(e){this.page.size=e,this.onLoad()},searchChange(e,t){this.query=e,this.onLoad(),t()},searchReset(){this.query={},this.onLoad()},refreshChange(){this.page={pageSize:10,currentPage:1,total:0},this.onLoad()},onLoad(e){this.loading=!0;const t={...this.query,current:this.page.current,size:this.page.size};Object(l["getFacilityList"])(t).then(e=>{const t=e.data.data;this.page.total=t.total,this.data=t.records,this.loading=!1})},handleBeforeClose(){this.$refs["ruleForm"].resetFields(),this.ruleForm={},this.times=[],this.visible=!1},buttonsClick(e){"cancel"==e&&this.handleBeforeClose()},viewData(e){e.recoveryStartTime&&e.recoveryStopTime?(this.times.push(e.recoveryStartTime),this.times.push(e.recoveryStopTime)):this.times=[],this.getFileListFn({orgId:e.id}),this.buttonsList=Object(n["a"])("view"),this.visible=!0,this.ruleForm=Object(n["b"])(e)}}},p=d,u=(a("666e"),a("1805")),m=Object(u["a"])(p,r,i,!1,null,"bef16516",null);t["default"]=m.exports}}]);