pages-workFlow-schedule-detail.7RJGgnwd.js 9.6 KB

1
  1. import{aq as t,aE as e,I as a,k as l,p as o,m as i,w as s,q as d,E as r,a1 as n,t as u,v as m,z as p,ad as c,o as h,b as f,$ as y,n as g,X as b}from"./index-C9TJPork.js";import{_ as k}from"./u-icon.BNGPST4x.js";import{r as _}from"./uni-app.es.CUt9gedF.js";import{_ as x}from"./_plugin-vue_export-helper.BCo6x5W8.js";import{d as F,_ as D}from"./t-datetime.iVUKMIp2.js";import{_ as I}from"./u-input.cq_N7lcW.js";import{_ as V,a as w}from"./u-form.D7hQ6Wil.js";import{_ as S}from"./u-action-sheet.BBR1EfIr.js";import{c as v,d as B}from"./schedule.DRz_j6C2.js";import{u as T}from"./base.2x6xVo4W.js";import"./u-popup.7vl_vYde.js";import"./emitter.DrjJCwnj.js";let U=t(),j={};const z=x({name:"u-navbar",props:{height:{type:[String,Number],default:""},backIconColor:{type:String,default:"#606266"},backIconName:{type:String,default:"nav-back"},backIconSize:{type:[String,Number],default:"44"},backText:{type:String,default:""},backTextStyle:{type:Object,default:()=>({color:"#606266"})},title:{type:String,default:""},titleWidth:{type:[String,Number],default:"250"},titleColor:{type:String,default:"#606266"},titleBold:{type:Boolean,default:!1},titleSize:{type:[String,Number],default:32},isBack:{type:[Boolean,String],default:!0},background:{type:Object,default:()=>({background:"#ffffff"})},isFixed:{type:Boolean,default:!0},immersive:{type:Boolean,default:!1},borderBottom:{type:Boolean,default:!0},zIndex:{type:[String,Number],default:""},customBack:{type:Function,default:null}},data:()=>({menuButtonInfo:j,statusBarHeight:U.statusBarHeight}),computed:{navbarInnerStyle(){let t={};return t.height=this.navbarHeight+"px",t},navbarStyle(){let t={};return t.zIndex=this.zIndex?this.zIndex:this.$u.zIndex.navbar,Object.assign(t,this.background),t},titleStyle(){let t={};return t.left=(U.windowWidth-e(this.titleWidth))/2+"px",t.right=(U.windowWidth-e(this.titleWidth))/2+"px",t.width=e(this.titleWidth)+"px",t},navbarHeight(){return this.height?this.height:44}},created(){},methods:{goBack(){"function"==typeof this.customBack?this.customBack.bind(this.$u.$parent.call(this))():a()}}},[["render",function(t,e,a,f,y,g){const b=h,x=_(l("u-icon"),k);return o(),i(b,{class:""},{default:s((()=>[d(b,{class:r(["u-navbar",{"u-navbar-fixed":a.isFixed,"u-border-bottom":a.borderBottom}]),style:n([g.navbarStyle])},{default:s((()=>[d(b,{class:"u-status-bar",style:n({height:y.statusBarHeight+"px"})},null,8,["style"]),d(b,{class:"u-navbar-inner",style:n([g.navbarInnerStyle])},{default:s((()=>[a.isBack?(o(),i(b,{key:0,class:"u-back-wrap",onClick:g.goBack},{default:s((()=>[d(b,{class:"u-icon-wrap"},{default:s((()=>[d(x,{name:a.backIconName,color:a.backIconColor,size:a.backIconSize},null,8,["name","color","size"])])),_:1}),a.backText?(o(),i(b,{key:0,class:"u-icon-wrap u-back-text u-line-1",style:n([a.backTextStyle])},{default:s((()=>[u(m(a.backText),1)])),_:1},8,["style"])):p("",!0)])),_:1},8,["onClick"])):p("",!0),a.title?(o(),i(b,{key:1,class:"u-navbar-content-title",style:n([g.titleStyle])},{default:s((()=>[d(b,{class:"u-title u-line-1",style:n({color:a.titleColor,fontSize:a.titleSize+"rpx",fontWeight:a.titleBold?"bold":"normal"})},{default:s((()=>[u(m(a.title),1)])),_:1},8,["style"])])),_:1},8,["style"])):p("",!0),d(b,{class:"u-slot-content"},{default:s((()=>[c(t.$slots,"default",{},void 0,!0)])),_:3}),d(b,{class:"u-slot-right"},{default:s((()=>[c(t.$slots,"right",{},void 0,!0)])),_:3})])),_:3},8,["style"])])),_:3},8,["style","class"]),a.isFixed&&!a.immersive?(o(),i(b,{key:0,class:"u-navbar-placeholder",style:n({width:"100%",height:Number(g.navbarHeight)+y.statusBarHeight+"px"})},null,8,["style"])):p("",!0)])),_:3})}],["__scopeId","data-v-3ae3e42b"]]),L=T();const N=x({components:{datetime:F},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(t){this.dataForm.id=t.id,this.toUserType=t.type,this.actionList=[],this.delList=[],this.groupId=t.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"}),v(this.groupId,t.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((t=>{f({title:t,complete:()=>{setTimeout((()=>{a()}),300)}})}))},methods:{delAction(t){"1"!=this.dataForm.repetition?B(this.dataForm.id,t+1).then((t=>{f({title:t.msg,complete:()=>{y("refresh"),a()}})})):B(this.dataForm.id,3).then((t=>{f({title:t.msg,complete:()=>{y("refresh"),a()}})}))},handleAction(t){"update"==this.actionList[t].id?g({url:"./form?id="+this.dataForm.id}):this.showBtn=!0},back(){a()},getResult(){a()},changeSend(t,e){this.dataForm.send=t,this.dataForm.sendName=e},getDictionaryData(){L.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,i=a.getDate(),s=a.getHours(),d=a.getMinutes(),r=a.getSeconds();return e.year=l,e.month=o,e.date=i,e.hours=s<10?0+s:s,e.minutes=d<10?0+d:d,e.seconds=r,e}}},[["render",function(t,e,a,r,n,u){const m=_(l("u-icon"),k),c=h,f=_(l("u-navbar"),z),y=_(l("u-toast"),D),g=_(l("u-input"),I),x=_(l("u-form-item"),V),F=b("datetime"),v=_(l("u-form"),w),B=_(l("u-action-sheet"),S);return o(),i(c,{class:""},{default:s((()=>[d(f,{title:"详情","custom-back":u.back},{right:s((()=>[d(c,{class:"navbar-right"},{default:s((()=>[d(c,{class:"message-box right-item",style:{"padding-right":"20rpx"}},{default:s((()=>[n.groupId?p("",!0):(o(),i(m,{key:0,name:"more-dot-fill",onClick:e[0]||(e[0]=t=>n.show=!0)}))])),_:1})])),_:1})])),_:1},8,["custom-back"]),d(c,{class:"scheduleForm-v jnpf-wrap"},{default:s((()=>[d(y,{ref:"uToast"},null,512),d(v,{model:n.dataForm,ref:"dataForm",errorType:["toast"],"label-position":"left","label-width":"150","label-align":"left"},{default:s((()=>[d(c,{class:"u-p-l-20 u-p-r-20 form-item-box"},{default:s((()=>[d(x,{label:"标题",prop:"title"},{default:s((()=>[d(g,{"input-align":"right",modelValue:n.dataForm.title,"onUpdate:modelValue":e[1]||(e[1]=t=>n.dataForm.title=t),"label-align":"right",placeholder:"",disabled:""},null,8,["modelValue"])])),_:1}),d(x,{label:"内容",prop:"content"},{default:s((()=>[d(g,{"input-align":"right",modelValue:n.dataForm.content,"onUpdate:modelValue":e[2]||(e[2]=t=>n.dataForm.content=t),type:"textarea",placeholder:"",disabled:""},null,8,["modelValue"])])),_:1})])),_:1}),d(c,{class:"jnpf-card"},{default:s((()=>[d(c,{class:"u-p-l-20 u-p-r-20 form-item-box"},{default:s((()=>[d(x,{label:"紧急程度",prop:"urgent"},{default:s((()=>[d(g,{"input-align":"right",modelValue:n.dataForm.urgent,"onUpdate:modelValue":e[3]||(e[3]=t=>n.dataForm.urgent=t),"label-align":"right",placeholder:"",disabled:""},null,8,["modelValue"])])),_:1}),d(x,{label:"类型",prop:"category"},{default:s((()=>[d(g,{"input-align":"right",modelValue:n.dataForm.category,"onUpdate:modelValue":e[4]||(e[4]=t=>n.dataForm.category=t),placeholder:"",disabled:""},null,8,["modelValue"])])),_:1}),d(x,{label:"创建人",prop:"creatorUserId"},{default:s((()=>[d(g,{"input-align":"right",modelValue:n.dataForm.creatorUserId,"onUpdate:modelValue":e[5]||(e[5]=t=>n.dataForm.creatorUserId=t),placeholder:"",disabled:""},null,8,["modelValue"])])),_:1}),d(x,{label:"参与人",prop:"toUserIds"},{default:s((()=>[d(g,{"input-align":"right",modelValue:n.dataForm.toUserIds,"onUpdate:modelValue":e[6]||(e[6]=t=>n.dataForm.toUserIds=t),placeholder:"",disabled:""},null,8,["modelValue"])])),_:1})])),_:1})])),_:1}),d(c,{class:"jnpf-card"},{default:s((()=>[d(c,{class:"u-p-l-20 u-p-r-20 form-item-box"},{default:s((()=>[d(x,{label:"开始时间",prop:"startDay"},{default:s((()=>[d(F,{delayMin:0,modelValue:n.startDay,"onUpdate:modelValue":e[7]||(e[7]=t=>n.startDay=t),date:n.startDate,disabled:"",showtdatetime:n.showtdatetime,type:1,allDay:n.dataForm.allDay,placeholder:""},null,8,["modelValue","date","showtdatetime","allDay"])])),_:1}),d(x,{label:"结束时间",prop:"endDay"},{default:s((()=>[d(F,{delayMin:0,modelValue:n.endDay,"onUpdate:modelValue":e[8]||(e[8]=t=>n.endDay=t),date:n.endDate,disabled:"",showtdatetime:n.showtdatetime,type:2,allDay:n.dataForm.allDay,placeholder:""},null,8,["modelValue","date","showtdatetime","allDay"])])),_:1})])),_:1})])),_:1})])),_:1},8,["model"])])),_:1}),d(B,{onClick:u.handleAction,list:n.actionList,tips:{text:"",color:"#000",fontSize:30},modelValue:n.show,"onUpdate:modelValue":e[9]||(e[9]=t=>n.show=t)},null,8,["onClick","list","modelValue"]),d(B,{onClick:u.delAction,list:n.delList,tips:{text:!0===n.toUserType?"1"!=n.dataForm.repetition?"此为重复日程,将删除(含参与人)应用于":"确认删除(含参与人)当前日程":"1"!=n.dataForm.repetition?"此为重复日程,将删除应用于":"确认删除当前日程",color:"#000",fontSize:30},modelValue:n.showBtn,"onUpdate:modelValue":e[10]||(e[10]=t=>n.showBtn=t)},null,8,["onClick","list","tips","modelValue"])])),_:1})}],["__scopeId","data-v-88add67f"]]);export{N as default};