import{c as t,n as e,$ as a,F as l,v as o,G as s,d,w as i,i as r,o as m,e as n,x as u}from"./index-Cd91A6jN.js";import{_ as p}from"./u-icon.B2PvH2xC.js";import{r as h}from"./uni-app.es._xPf64vy.js";import{_ as c}from"./u-navbar.lHEFLUnK.js";import{_ as f}from"./u-toast.D85N6PPc.js";import{_ as g}from"./u-input.Drw88frE.js";import{_ as y,a as F}from"./u-form._UXWp9F0.js";import{_ as b}from"./index.EbrwsAQA.js";import{_ as V}from"./u-action-sheet.DV-ca77O.js";import{t as _}from"./t-datetime.D3lJ4p5_.js";import{S as D,a as U}from"./schedule.e0J0NUzx.js";import{u as x}from"./base.BRwlGL5-.js";import{_ as w}from"./_plugin-vue_export-helper.BCo6x5W8.js";import"./emitter.DrjJCwnj.js";import"./u-button.CapR3zI1.js";import"./u-popup.D3lI-JJq.js";const j=x();const T=w({components:{datetime:_},data:()=>({showAction:"",userInfo:{},show:!1,showtdatetime:!1,dataForm:{id:0,category:"",creatorUserId:0,userName:"",allDay:0,urgent:"1",startDay:"",startTime:"",endDay:"",endTime:"",duration:"",content:"",title:"",toUserIds:"",reminderTime:-2,reminderType:1,send:"",sendName:"",repetition:1,repeatTime:"",color:"#188ae2"},showBtn:!1,startDate:{},endDate:{},repeatDate:{},repeat:"",endDay:"",startDay:"",toUserType:!1,actionList:[],delList:[],groupId:""}),onReady(){this.$refs.dataForm.setRules(this.rules)},onLoad(a){this.dataForm.id=a.id,this.toUserType=a.type,this.actionList=[],this.delList=[],this.groupId=a.groupId,"true"==this.toUserType?(this.actionList.push({text:"编辑",id:"update"}),this.actionList.push({text:"删除",id:"deldete",color:"#ff3a3a"})):this.actionList.push({text:"删除",id:"deldete",color:"#ff3a3a"}),D(this.groupId,a.id).then((t=>{let e=t.data||{};e.files=e.files?JSON.parse(e.files):[],this.dataForm=e,"1"!=this.dataForm.repetition?(this.delList.push({text:"仅删除此日程",id:"1"}),this.delList.push({text:"删除此日程及后续日程",id:"2"}),this.delList.push({text:"删除所有日程",id:"3"})):this.delList.push({text:"删除",id:"3",color:"#ff3a3a"}),this.startDate=this.timestampToTime(this.dataForm.startDay),this.endDate=this.timestampToTime(this.dataForm.endDay)})).catch((a=>{t({title:a,complete:()=>{setTimeout((()=>{e()}),300)}})}))},methods:{delAction(l){"1"!=this.dataForm.repetition?U(this.dataForm.id,l+1).then((l=>{t({title:l.msg,complete:()=>{a("refresh"),e()}})})):U(this.dataForm.id,3).then((l=>{t({title:l.msg,complete:()=>{a("refresh"),e()}})}))},handleAction(t){"update"==this.actionList[t].id?l({url:"/pages/portal/schedule/index?id="+this.dataForm.id}):this.showBtn=!0},back(){e()},getResult(){e()},changeSend(t,e){this.dataForm.send=t,this.dataForm.sendName=e},getDictionaryData(){j.getDictionaryData({sort:"scheduleType"}).then((t=>{this.typeOptions=t}))},timestampToTime(t){let e={};var a=new Date(t);let l=a.getFullYear(),o=a.getMonth()+1<10?"0"+(a.getMonth()+1):a.getMonth()+1,s=a.getDate(),d=a.getHours(),i=a.getMinutes(),r=a.getSeconds();return e.year=l,e.month=o,e.date=s,e.hours=d<10?0+d:d,e.minutes=i<10?0+i:i,e.seconds=r,e}}},[["render",function(t,e,a,l,_,D){const U=h(o("u-icon"),p),x=r,w=h(o("u-navbar"),c),j=h(o("u-toast"),f),T=h(o("u-input"),g),I=h(o("u-form-item"),y),L=h(o("JnpfUploadFile"),b),k=s("datetime"),v=h(o("u-form"),F),A=h(o("u-action-sheet"),V);return m(),d(x,{class:""},{default:i((()=>[n(w,{title:"详情","custom-back":D.back},{right:i((()=>[n(x,{class:"navbar-right"},{default:i((()=>[n(x,{class:"message-box right-item",style:{"padding-right":"20rpx"}},{default:i((()=>[_.groupId?u("",!0):(m(),d(U,{key:0,name:"more-dot-fill",onClick:e[0]||(e[0]=t=>_.show=!0)}))])),_:1})])),_:1})])),_:1},8,["custom-back"]),n(x,{class:"scheduleForm-v jnpf-wrap"},{default:i((()=>[n(j,{ref:"uToast"},null,512),n(v,{model:_.dataForm,ref:"dataForm",errorType:["toast"],"label-position":"left","label-width":"150","label-align":"left"},{default:i((()=>[n(x,{class:"u-p-l-20 u-p-r-20 form-item-box"},{default:i((()=>[n(I,{label:"标题",prop:"title"},{default:i((()=>[n(T,{"input-align":"right",modelValue:_.dataForm.title,"onUpdate:modelValue":e[1]||(e[1]=t=>_.dataForm.title=t),"label-align":"right",placeholder:"",disabled:""},null,8,["modelValue"])])),_:1}),n(I,{label:"内容",prop:"content"},{default:i((()=>[n(T,{"input-align":"right",modelValue:_.dataForm.content,"onUpdate:modelValue":e[2]||(e[2]=t=>_.dataForm.content=t),type:"textarea",placeholder:"",disabled:""},null,8,["modelValue"])])),_:1})])),_:1}),n(x,{class:"u-p-l-20 u-p-r-20 u-m-t-20 form-item-box"},{default:i((()=>[n(I,{label:"附件",prop:"content"},{default:i((()=>[n(L,{modelValue:_.dataForm.files,"onUpdate:modelValue":e[3]||(e[3]=t=>_.dataForm.files=t),detailed:""},null,8,["modelValue"])])),_:1})])),_:1}),n(x,{class:"jnpf-card"},{default:i((()=>[n(x,{class:"u-p-l-20 u-p-r-20 form-item-box"},{default:i((()=>[n(I,{label:"紧急程度",prop:"urgent"},{default:i((()=>[n(T,{"input-align":"right",modelValue:_.dataForm.urgent,"onUpdate:modelValue":e[4]||(e[4]=t=>_.dataForm.urgent=t),"label-align":"right",placeholder:"",disabled:""},null,8,["modelValue"])])),_:1}),n(I,{label:"类型",prop:"category"},{default:i((()=>[n(T,{"input-align":"right",modelValue:_.dataForm.category,"onUpdate:modelValue":e[5]||(e[5]=t=>_.dataForm.category=t),placeholder:"",disabled:""},null,8,["modelValue"])])),_:1}),n(I,{label:"创建人",prop:"creatorUserId"},{default:i((()=>[n(T,{"input-align":"right",modelValue:_.dataForm.creatorUserId,"onUpdate:modelValue":e[6]||(e[6]=t=>_.dataForm.creatorUserId=t),placeholder:"",disabled:""},null,8,["modelValue"])])),_:1}),n(I,{label:"参与人",prop:"toUserIds"},{default:i((()=>[n(T,{"input-align":"right",modelValue:_.dataForm.toUserIds,"onUpdate:modelValue":e[7]||(e[7]=t=>_.dataForm.toUserIds=t),placeholder:"",disabled:""},null,8,["modelValue"])])),_:1})])),_:1})])),_:1}),n(x,{class:"jnpf-card"},{default:i((()=>[n(x,{class:"u-p-l-20 u-p-r-20 form-item-box"},{default:i((()=>[n(I,{label:"开始时间",prop:"startDay"},{default:i((()=>[n(k,{delayMin:0,modelValue:_.startDay,"onUpdate:modelValue":e[8]||(e[8]=t=>_.startDay=t),date:_.startDate,disabled:"",showtdatetime:_.showtdatetime,type:1,allDay:_.dataForm.allDay,placeholder:""},null,8,["modelValue","date","showtdatetime","allDay"])])),_:1}),n(I,{label:"结束时间",prop:"endDay"},{default:i((()=>[n(k,{delayMin:0,modelValue:_.endDay,"onUpdate:modelValue":e[9]||(e[9]=t=>_.endDay=t),date:_.endDate,disabled:"",showtdatetime:_.showtdatetime,type:2,allDay:_.dataForm.allDay,placeholder:""},null,8,["modelValue","date","showtdatetime","allDay"])])),_:1})])),_:1})])),_:1})])),_:1},8,["model"])])),_:1}),n(A,{onClick:D.handleAction,list:_.actionList,tips:{text:"",color:"#000",fontSize:30},modelValue:_.show,"onUpdate:modelValue":e[10]||(e[10]=t=>_.show=t)},null,8,["onClick","list","modelValue"]),n(A,{onClick:D.delAction,list:_.delList,tips:{text:!0===_.toUserType?"1"!=_.dataForm.repetition?"此为重复日程,将删除(含参与人)应用于":"确认删除(含参与人)当前日程":"1"!=_.dataForm.repetition?"此为重复日程,将删除应用于":"确认删除当前日程",color:"#000",fontSize:30},modelValue:_.showBtn,"onUpdate:modelValue":e[11]||(e[11]=t=>_.showBtn=t)},null,8,["onClick","list","tips","modelValue"])])),_:1})}],["__scopeId","data-v-261f0035"]]);export{T as default};