"use strict";(self["webpackChunkscui"]=self["webpackChunkscui"]||[]).push([[8816],{42299:function(e,t,a){a.r(t),a.d(t,{default:function(){return O}});var s=a(66252),i=a(3577);const l=e=>((0,s.dD)("data-v-050fac2a"),e=e(),(0,s.Cn)(),e),n={class:"left-panel"},d={class:"item"},o=l((()=>(0,s._)("span",{class:"name hidden-md-and-down"},"状态",-1))),c={class:"right-panel"},r=(0,s.Uk)("添加保养单"),u={class:"serviceView"},m={class:"headerView"},v={class:"nameView"},h=l((()=>(0,s._)("div",{class:"name"},"设备名称",-1))),p={class:"text"},w={class:"nameView"},_=l((()=>(0,s._)("div",{class:"name"},"保养单号",-1))),f={class:"text"},g={class:"nameView"},y=l((()=>(0,s._)("div",{class:"name"},"保养周期",-1))),k={class:"text"},D={class:"nameView"},C=l((()=>(0,s._)("div",{class:"name"},"保养状态",-1))),b={class:"text"},x={class:"nameView"},T=l((()=>(0,s._)("div",{class:"name"},"操作人",-1))),M={class:"text"},S={class:"middleView"},W=l((()=>(0,s._)("div",{class:"header"},[(0,s._)("div",{class:"title"},"保养明细")],-1))),I={class:"tableView"};function L(e,t,a,l,L,E){const V=(0,s.up)("el-option"),q=(0,s.up)("el-select"),Z=(0,s.up)("el-button"),$=(0,s.up)("el-header"),z=(0,s.up)("FullCalendar"),B=(0,s.up)("el-main"),F=(0,s.up)("el-container"),H=(0,s.up)("save-dialog"),N=(0,s.up)("el-table-column"),P=(0,s.up)("el-table"),A=(0,s.up)("scDrawer");return(0,s.wg)(),(0,s.iD)(s.HY,null,[(0,s.Wm)(F,{class:"mainBox mainNoBack planBox"},{default:(0,s.w5)((()=>[(0,s.Wm)($,{class:"planHeader"},{default:(0,s.w5)((()=>[(0,s._)("div",n,[(0,s._)("div",d,[o,(0,s.Wm)(q,{class:"imgSelect",placeholder:"请选择状态",modelValue:L.from.status,"onUpdate:modelValue":t[0]||(t[0]=e=>L.from.status=e),clearable:"",size:L.size},{default:(0,s.w5)((()=>[((0,s.wg)(!0),(0,s.iD)(s.HY,null,(0,s.Ko)(L.statusList,((e,t)=>((0,s.wg)(),(0,s.j4)(V,{key:t,label:e.name,value:e.id},null,8,["label","value"])))),128))])),_:1},8,["modelValue","size"])])]),(0,s._)("div",c,[(0,s.Wm)(Z,{type:"primary",icon:"el-icon-plus",onClick:E.add,size:L.size},{default:(0,s.w5)((()=>[r])),_:1},8,["onClick","size"])])])),_:1}),(0,s.Wm)(B,{class:"nopadding"},{default:(0,s.w5)((()=>[(0,s.Wm)(z,{options:L.calendarOptions},{eventContent:(0,s.w5)((e=>[(0,s._)("span",null,(0,i.toDisplayString)(e.event.title),1)])),_:1},8,["options"])])),_:1})])),_:1}),L.dialog.save?((0,s.wg)(),(0,s.j4)(H,{key:0,ref:"saveDialog",onSuccess:E.handleSaveSuccess,onClosed:t[1]||(t[1]=e=>L.dialog.save=!1)},null,8,["onSuccess"])):(0,s.kq)("",!0),(0,s.Wm)(A,{ref:"scDrawer",drawerName:L.drawer.title},{default:(0,s.w5)((()=>[(0,s._)("div",u,[(0,s._)("div",m,[(0,s._)("div",v,[h,(0,s._)("div",p,(0,i.toDisplayString)(L.serviceInfo.eq_name),1)]),(0,s._)("div",w,[_,(0,s._)("div",f,(0,i.toDisplayString)(L.serviceInfo.service_sn),1)]),(0,s._)("div",g,[y,(0,s._)("div",k,(0,i.toDisplayString)(L.serviceInfo.cycle)+"天",1)]),(0,s._)("div",D,[C,(0,s._)("div",b,(0,i.toDisplayString)(L.serviceInfo.tip),1)]),(0,s._)("div",x,[T,(0,s._)("div",M,(0,i.toDisplayString)(L.serviceInfo.creator_name),1)])]),(0,s._)("div",S,[W,(0,s._)("div",I,[(0,s.Wm)(P,{height:"100%",border:!1,data:L.serviceInfo.details},{default:(0,s.w5)((()=>[(0,s.Wm)(N,{label:"序号",type:"index",width:"50"}),(0,s.Wm)(N,{prop:"cycle",label:"保养周期","show-overflow-tooltip":"",width:"100"},{default:(0,s.w5)((e=>[(0,s.Uk)((0,i.toDisplayString)(e.row.cycle)+"天 ",1)])),_:1}),(0,s.Wm)(N,{prop:"action",label:"保养项","show-overflow-tooltip":"",width:"106"}),(0,s.Wm)(N,{prop:"remark",label:"备注","show-overflow-tooltip":""}),(0,s.Wm)(N,{prop:"creator_name",label:"保养人","show-overflow-tooltip":"",width:"90"}),(0,s.Wm)(N,{prop:"updated_at",label:"保养日期","show-overflow-tooltip":"",width:"110"})])),_:1},8,["data"])])])])])),_:1},8,["drawerName"])],64)}var E=a(4813),V=a(91132),q=a(40334),Z=a(39897),$=a(15978),z=a(75910),B=a(558),F=a(61802);const{ElMessageBox:H}=a(49666);var N={name:"index",components:{FullCalendar:E.Z,saveDialog:F["default"]},data(){return{size:"small",dialog:{save:!1},drawer:{title:"设备保养单"},from:{status:1},statusList:[{name:"正常",id:1},{name:"已到时",id:2},{name:"已超时",id:3}],serviceInfo:{},calendarOptions:{plugins:[$.Z,V.Z,q.Z,Z.ZP],headerToolbar:{left:"title",center:"",right:"prevYear,prev,next,nextYear,resourceTimelineDay,resourceTimelineWeek,resourceTimelineMonth,resourceTimelineYear"},initialView:"resourceTimelineWeek",views:{resourceTimeLineDay:{buttonText:"Day"},resourceTimeLineWeek:{buttonText:"Week"},resourceTimeLineMonth:{buttonText:"Month"}},locales:[z.Z],locale:"zh-cn",editable:!1,eventDraggable:!1,selectable:!0,eventStartEditable:!1,eventDurationEditable:!1,weekends:!0,selectMirror:!0,dayMaxEvents:!0,dateClick:this.handleDateClick,select:this.handleDateSelect,eventClick:this.handleEventClick,eventsSet:this.handleEvents,viewDidMount:this.viewDidMount,buttonText:{today:"今天"},slotMinTime:"08:00",slotMaxTime:"18:00",businessHours:{daysOfWeek:[0,1,2,3,4,5,6],startTime:"08:00",endTime:"18:00"},resourceAreaColumns:[{headerContent:"设备名称",field:"eq_name",width:210,cellContent:e=>{const t=document.createElement("div");let a=e.resource.extendedProps,s=a.eq_name;return 1!=a.tip_code?(t.innerHTML='


