student-leave.276a0cef.js 6.5 KB

1
  1. import{d as g,ag as f,c as e,ai as m,q as s,F as B,ah as I,r as w,$ as L,aj as D,B as W,R as c,m as T,o as v}from"./index.3b0304e1.js";import{O as R}from"./index.454c666f.js";import{A as C}from"./approval-item.69ddcd43.js";import{O as y}from"./index.495ac005.js";import{F as S}from"./index.f8e9940f.js";import"./clock-icon.6fd57365.js";import"./default-icon.11fd2315.js";import"./student-icon.30fb072d.js";import"./msg-icon.adf37f7b.js";import"./index.ff3f298b.js";const h="_leaveWrap_12p3w_1",E="_subTitle_12p3w_4",Y="_subTitleIcon_12p3w_9",q="_leaveInfo_12p3w_19",x="_leaveDate_12p3w_25",O="_leaveReason_12p3w_34",Q="_courseWrap_12p3w_42",j="_courseWrapTitlte_12p3w_45",G="_courseList_12p3w_48",U="_reasonWrap_12p3w_51",k="_bottomIcon_12p3w_57",F="_reasonLabelLeft_12p3w_65",H="_btnWrap_12p3w_74",N="_unpassBtn_12p3w_77",M="_titleDot_12p3w_91";var a={leaveWrap:h,subTitle:E,subTitleIcon:Y,leaveInfo:q,leaveDate:x,leaveReason:O,courseWrap:Q,courseWrapTitlte:j,courseList:G,reasonWrap:U,bottomIcon:k,"van-field":"_van-field_12p3w_61",reasonLabelLeft:F,btnWrap:H,unpassBtn:N,titleDot:M};const Z="_itemWrap_1om1w_1",X="_itemWrapTop_1om1w_7",K="_itemWrapTopLeft_1om1w_15",V="_clockWrap_1om1w_20",J="_leftTimer_1om1w_29",P="_itemWrapTopRight_1om1w_35",z="_passLabel_1om1w_40",$="_unpassLabel_1om1w_46",ee="_passIcon_1om1w_52",ae="_msgIcon_1om1w_56",te="_itemWrapBottom_1om1w_59",se="_itemWrapBottomMain_1om1w_66",oe="_itemWrapBottomSub_1om1w_77",le="_rejectBtn_1om1w_83";var l={itemWrap:Z,itemWrapTop:X,itemWrapTopLeft:K,clockWrap:V,leftTimer:J,itemWrapTopRight:P,passLabel:z,unpassLabel:$,passIcon:ee,msgIcon:ae,itemWrap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j6GQ+bpQ3p+YmNg0Pj7u189pSKQtUsq7PwLoH0QcjYBXnuctGBkZ+RgLqB2XWZbVm81mORH1NYPSFR8R7zuOc61xPNRlJgVTBXUct4bNsW27eVBrAc55qrRvE6h52hugoDB6vu/3xy2MaYHqCyMiXpVS7p1TGNMeHWmBOOe6QTvdmNltH65pgGIdrqYeJW4/0gDFaj/0wmkatKRAiRo0c4zoa0/sFjYJUOIWNli8o5r8uoOvc65BDZbqjItiAJX0Kq2UWgEAP+cqHUB11GNDfRYFzzFEtAMA1rd6jgGA/xDxxk95jglL7d/+YJWk5qSdG/k+lHbhtHLfAGtPoUUd9vdqAAAAAElFTkSuQmCC",ue=g({props:["item","type"],name:"student-course-item",setup(o){const r=f(),u=()=>{r.push({path:"/course-adjust",query:{id:o.item.id,isBack:"true"}})};return()=>e(B,null,[e("div",{class:l.itemWrap},[e("div",{class:l.itemWrapTop},[e("div",{class:l.itemWrapTopLeft},[e("div",{class:l.clockWrap},[e("img",{src:ne,alt:""},null)]),e("p",{class:l.leftTimer},[m(o.item.startTime).format("YYYY-MM-DD HH:mm"),s(" -"),m(o.item.endTime).format("HH:mm")])])]),e("div",{class:l.itemWrapBottom},[e("div",null,[e("p",{class:l.itemWrapBottomMain},[o.item.className,s("-"),o.item.teacherName]),e("p",{class:l.itemWrapBottomSub},[o.item.orchestraName])]),e("div",{class:l.itemWrapBottomRight},[o.type=="STUDENT"?null:e("div",{class:l.rejectBtn,onClick:u},[s("\u8C03\u6574")])])])])])}});c("wait");const n=c({}),d=c([]),i=c(""),_=c(!1);var Te=g({name:"approval-manage",setup(){const o=f(),r=I(),u=w({dialogStatus:!1,dialogMessage:""}),b=async()=>{try{const{data:t}=await T.get(`/api-school/userApproveRecord/detail/${r.query.id}`,{});n.value=t,d.value=t.courseScheduleList||[],i.value=n.value.approvalComments}catch(t){const p=t.message;v(p)}};L(()=>{i.value="",_.value=r.query.type=="end",b()});const A=async t=>{if(!i.value){v("\u8BF7\u8F93\u5165\u5BA1\u6279\u539F\u56E0");return}try{const p=await T.post("/api-school/userApproveRecord/approval",{hideLoading:!1,data:{id:r.query.id,approvalComments:i.value,status:t}});p.code===999?(u.dialogStatus=!0,u.dialogMessage=p.message):o.back()}catch(p){v(p.message||"\u63D0\u4EA4\u5931\u8D25")}};return()=>e(B,null,[e("div",{class:a.leaveWrap},[e(R,null,{default:()=>[e(D,null,null)]}),e(C,{item:n.value,type:r.query.type},null),n.value.approveType=="LEAVE"?e("div",null,[e("div",{class:a.leaveInfo},[e("p",{class:a.subTitle},[e("span",{class:a.titleDot},null),e("span",null,[s("\u8BF7\u5047\u65E5\u671F")])]),e("p",{class:a.leaveDate},[m(n.value.startTime).format("YYYY\u5E74MM\u6708DD\u65E5"),s(" -")," ",m(n.value.endTime).format("YYYY\u5E74MM\u6708DD\u65E5")]),e("p",{class:a.subTitle},[e("span",{class:a.titleDot},null),e("span",null,[s("\u8BF7\u5047\u539F\u56E0")])]),e("p",{class:a.leaveReason},[n.value.approveReason])]),d.value.length>0?e("div",{class:a.courseWrap},[e("div",{class:a.courseWrapTitlte},[" ",e("p",{class:a.subTitle},[e("span",{class:a.titleDot},null),e("span",null,[s("\u6D89\u53CA\u8BFE\u7A0B")])])]),e("div",{class:a.courseList},[d.value.map(t=>e(ue,{item:t,type:n.value.clientType},null))])]):null]):null,n.value.approveType=="ORCHESTRA"?e("div",null,[e("div",{class:a.leaveInfo},[e("p",{class:a.subTitle},[e("span",{class:a.titleDot},null),e("span",null,[s("\u9000\u56E2\u539F\u56E0")])]),e("p",{class:a.leaveReason},[n.value.approveReason])])]):null,e("div",{class:a.reasonWrap},[e(S,{"label-align":"top",maxlength:400,modelValue:i.value,"onUpdate:modelValue":t=>i.value=t,autosize:!0,type:"textarea",rows:5,"show-word-limit":!0,placeholder:"\u8BF7\u8F93\u5165\u4F60\u7684\u5BA1\u6279\u610F\u89C1",disabled:_.value},{label:()=>e("div",null,[e("div",{class:a.reasonLabelLeft},[" ",e("span",{class:a.titleDot},null),e("span",null,[s("\u610F\u89C1\u5BA1\u6279")])])])})]),_.value?null:e("div",{class:["btnGroup btnMore",a.btnWrap]},[e(W,{color:"#ccc",class:a.unpassBtn,onClick:()=>A("UNPASS")},{default:()=>[s("\u62D2\u7EDD")]}),e(W,{color:"#FF8057",class:a.unpassBtn,onClick:()=>A("PASS")},{default:()=>[s("\u901A\u8FC7")]})]),e(y,{title:"\u63D0\u793A",show:u.dialogStatus,"onUpdate:show":t=>u.dialogStatus=t,message:u.dialogMessage,confirmButtonText:"\u786E\u5B9A",onConfirm:()=>{o.back()}},null)])])}});export{Te as default};