1 |
- import{M as N}from"./index-6b314488.js";import{j as U,d as S,g as t,v as M,n as j,D as V,X as L,O as Q,i as K,o as Y,E as X,R as H,h as a,P as f,B as v,W as J,f as I,S as Z,M as y}from"./index-1d4a9afa.js";import{i as z}from"./icon-music-10132ef5.js";import{M as $,A as tt,a as et,f as ot,g as nt,h as ut,i as at,j as it}from"./api-a0afe4e5.js";import{S as st,b as F,a as s}from"./index-fc00eb76.js";import{C as A}from"./index-b8090118.js";import{C as h}from"./index-a27d7671.js";import{G,a as w}from"./index-0840b1a0.js";import{I as m}from"./index-c272bcfa.js";import{P as D}from"./index-6d1e9935.js";import{C as lt,a as rt}from"./index-fb5f172f.js";import{F as dt}from"./index-dbc03ded.js";import"./icon-student-default-4c78efb2.js";import"./index-22c9ea74.js";import"./use-tab-status-a36febbc.js";const[ct,pt]=U("divider"),ft={dashed:Boolean,hairline:M,contentPosition:j("center")};var mt=S({name:ct,props:ft,setup(i,{slots:d}){return()=>{var l;return t("div",{role:"separator",class:pt({dashed:i.dashed,hairline:i.hairline,[`content-${i.contentPosition}`]:!!d.default})},[(l=d.default)==null?void 0:l.call(d)])}}});const ht=V(mt),gt="_studentDetail_itdtt_1",_t="_bg_itdtt_4",vt="_musicGroup_itdtt_10",At="_iconMusic_itdtt_15",wt="_box_itdtt_33",bt="_infobox_itdtt_40",Gt="_infoItem_itdtt_48",St="_edit_itdtt_62",qt="_iconPen_itdtt_66",Ct="_attendanceTitle_itdtt_71",Bt="_quitBox_itdtt_92",xt="_quitTitle_itdtt_97",Et="_quitDes_itdtt_104",It="_divider_itdtt_109",yt="_quitLabel_itdtt_112",Ft="_reasonBox_itdtt_118",Dt="_quitReason_itdtt_126",Lt="_optionBox_itdtt_130",Tt="_cellActive_itdtt_147",kt="_concatBox_itdtt_151",Ot="_concatTitle_itdtt_151",Pt="_concatContent_itdtt_173",Rt="_concatIcon_itdtt_176",Wt="_btns_itdtt_180",o={studentDetail:gt,bg:_t,musicGroup:vt,iconMusic:At,box:wt,infobox:bt,infoItem:Gt,edit:St,iconPen:qt,attendanceTitle:Ct,quitBox:Bt,quitTitle:xt,quitDes:Et,divider:It,quitLabel:yt,reasonBox:Ft,quitReason:Dt,optionBox:Lt,cellActive:Tt,concatBox:kt,concatTitle:Ot,concatContent:Pt,concatIcon:Rt,btns:Wt},Nt=""+new URL("icon_detail_bg-9aeaf861.png",import.meta.url).href,Ut="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAeCAYAAAA/xX6fAAAAAXNSR0IArs4c6QAAAuNJREFUSEu9ls9LFGEYx7/fGXcT7YeGlEhmiCQEUZAElrq7kWXrD+iQl6BDxzoUBJ26dgmK/oH+AQ+VrrPbljU76xpRnaKLh1DLi0RiB4XWnXlidqZ1I0dndqXnNrzP+3ye7/s+z7wP8Z+NJV4u1UPTugvwDCCN2FjxTknwXaiOoG/gvaeTnjwEFddgWhOIDX12wmaTtwl5CIESVDDB+1Ykfm/TfblUJ00rA6AZ4DeJxA8TmcleKsyUwQoAlnyBiUVReRVn41/+8dfHO6ioBsAWZ42fJBI/QWa0BIghd8NTqQ9fR1f/T19AL6epyXaGlAwgrY6LfBWEoohcnCMNbRlAI4CC5MNN6K8SNqO1cR0GiDZHGBZEamI2rPjJbNKCCAEuSiTuZlShPuN5KxGy76x9M5gDNDRxwy9KZLByYO5lC828fWcdXrCdA+paM1W78KRzA2bGEBkpHmO5Va9wJn2ApqlD5Nh2sOoV6okmKuobQI47xYgF4ebK/qisXOHbF/u5br4GcNIvrHKF+rMGquEpCE75gul6LZTVC1AwHVzhu+Re/pJXAE6XYLuUKLovzXs1k5JNjonIFYAfgwFz43tohtKAdPuFFY/R0GYBHAVh+Qem0/WsLaQA9DpKOC8WY4h5KysVSlabhdhAij9gIlHHfaoGkWhQWDG1QEBdr6W6loDgvJvxvFiKL2XBFep6jQsbqBQWTKGRPEeI3Wu2BVYWXKGRbiUKHwD8ECs/iNhlz9L3aolgCou/K6FdXVsF3G4tWNFsF83H+t/A0gOM6t7DLcAlIFDsQ2fEIPJSZzWia3jNR9L+XcbGwjy4exmQepDLpJGcAGS4eLnAE2tp9QZGR/P+I27hqes1UNYeE7jp/jAShDMAG0BpJl0BOGc/bjtgR9wBzVZjiSVRZxA2tFsEHpVBd4BVFsKGgXfQF7fVuqaneqjYoz56QDY4k1wVZreSyAoEMwJ5gOjQtHttVQStYOtvOuag3D3dsWsAAAAASUVORK5CYII=",Mt=""+new URL("icon-phone-90855b4d.png",import.meta.url).href,jt=""+new URL("icon-message-10494f42.png",import.meta.url).href;function b(i){return typeof i=="function"||Object.prototype.toString.call(i)==="[object Object]"&&!L(i)}const Vt=S({name:"student-manage-detail-skeletion",props:{loading:{type:Boolean,default:!0}},setup(i,{slots:d}){return()=>t(st,{loading:i.loading},{template:()=>{let l,e,p;return t("div",{style:{width:"100%",height:"calc(100vh - 30px - var(--header-height))",overflow:"hidden"}},[t(A,{class:o.infobox,border:!1},{default:()=>[t(h,{border:!1,center:!0,style:{padding:0}},{icon:()=>t(F,{avatarSize:"1rem"},null),title:()=>t(s,{rowWidth:"80%"},null)})]}),t(A,{class:o.infobox,border:!1},{default:()=>[t(h,{border:!1,center:!0,style:{padding:0}},{icon:()=>t(F,{avatarSize:"1rem"},null),title:()=>t(s,{rowWidth:"80%"},null),label:()=>t(s,{rowWidth:"40%"},null),value:()=>t(s,{rowWidth:"80%",style:{marginLeft:"auto"}},null)})]}),t(A,{class:o.infobox,border:!1},b(l=new Array(4).fill(1).map(g=>t(h,{border:!1},{title:()=>t(s,{rowWidth:"80%"},null),value:()=>t(s,{rowWidth:"80%",style:{marginLeft:"auto"}},null)})))?l:{default:()=>[l]}),t("div",{style:{overflow:"hidden"},class:o.infobox},[t(s,{rowWidth:"30%"},null),t(G,{border:!1},b(e=new Array(4).fill(1).map(g=>t(w,null,{default:()=>[t(s,{rowWidth:"90%"},null),t(s,{rowWidth:"90%"},null)]})))?e:{default:()=>[e]})]),t("div",{style:{overflow:"hidden"},class:o.infobox},[t(s,{rowWidth:"30%"},null),t(G,{border:!1},b(p=new Array(4).fill(1).map(g=>t(w,null,{default:()=>[t(s,{rowWidth:"90%"},null),t(s,{rowWidth:"90%"},null)]})))?p:{default:()=>[p]})])])},default:()=>{var l;return(l=d.default)==null?void 0:l.call(d)}})}});function Qt(i){return typeof i=="function"||Object.prototype.toString.call(i)==="[object Object]"&&!L(i)}const se=S({name:"student-manage-detail",setup(){var C,B,x,E;const i=J(),d=((B=(C=i.query)==null?void 0:C.studentId)==null?void 0:B.toString())||"",l=((E=(x=i.query.musicGroupIds)==null?void 0:x.toString())==null?void 0:E.split(","))||[],e=Q({skelet:!0,loading:!1,groupShow:!1,quitShow:!1,quitConfirmShow:!1,cancelShow:!1,gradeShow:!1,gradeOptions:[[],[]],musicGroup:[],musicGroupTitle:"全部乐团",musicGroupId:l[0]||"",student:{},gradeList:null,quitList:[],reason:"",quitLoading:!1}),p=K([]),g=()=>{ot(d).then(u=>{Array.isArray(u.data)&&(e.musicGroup=u.data.map(n=>({text:n.name,value:n.id,gradeType:n.gradeType})),e.musicGroup.length===1&&(e.musicGroupTitle=e.musicGroup[0].text))})},q=()=>{if(e.student.organId&&e.musicGroup.length){if(e.gradeList)return;console.log(e.musicGroup);const u=Array.from(new Set(e.musicGroup.map(n=>n.gradeType))).join(",");console.log("🚀 ~ gradeType:",u),it(e.student.organId,u).then(n=>{e.gradeList=n.data,e.gradeOptions[0]=Object.entries(n.data).map(c=>({text:c[1],value:c[0]})),e.gradeOptions[1]=new Array(30).fill(1).map((c,r)=>({text:`${r+1}班`,value:`${r+1}班`}))});return}setTimeout(()=>{q()},30)},_=()=>{e.loading=!0,nt({studentId:d,musicGroupId:e.musicGroupId||""}).then(u=>{u.data&&(u.data.phone&&(u.data.phoneStr=u.data.phone.slice(0,3)+"****"+u.data.phone.slice(-4)),e.student=u.data,q())}).finally(()=>{setTimeout(()=>{e.loading=!1,e.skelet=!1},500)})};Y(()=>{g(),_()});const T=X(()=>{const u=e.musicGroup.filter(n=>e.quitList.includes(n.value)).map(n=>"“"+n.text+"”").join("、");return`${e.student.studentName}从${u}`}),k=async u=>{const n=await ut({currentClass:u[1].value,currentGrade:u[0].text,currentGradeNum:u[0].value,musicGroupId:e.musicGroupId,studentId:e.student.studentId});console.log(n),n.code===200&&I("修改成功"),_()},O=async()=>{if(!e.reason){I("请填写退团原因");return}e.quitLoading=!0;try{(await at({musicGroupId:e.quitList.join(","),reason:e.reason,reasonEnum:"OTHER",userId:e.student.studentId})).code===200&&(e.quitConfirmShow=!1,e.quitShow=!1,e.quitList=[],_())}catch(u){}e.quitLoading=!1},P=()=>Z(e.student.quitTime).format("YYYY年MM月DD日"),R=()=>{y({api:"joinChatGroup",content:{type:"single",id:e.student.studentId}})},W=()=>{y({api:"callPhone",content:{phone:e.student.phone}})};return()=>{let u;return t("div",{class:o.studentDetail},[t(m,{class:o.bg,src:Nt},null),t(N,{position:"top"},{default:()=>[t(H,{background:"transparent"},null)]}),t(Vt,{loading:e.skelet},{default:()=>[t(h,{class:o.musicGroup,title:e.musicGroupTitle,isLink:e.musicGroup.length>1,clickable:e.musicGroup.length>1,center:!0,border:!1,onClick:()=>{e.musicGroup.length<2||(e.groupShow=!0)}},{icon:()=>t(m,{class:o.iconMusic,src:z},null)}),t("div",{class:o.box},[t($,{item:e.student,valueType:e.student.inGroupStatus==="OUT"?"statued":e.student.inGroupStatus==="APPLY_OUT"?"statuing":"status",isLink:!1,onQuit:()=>e.quitShow=!0,onContact:()=>e.cancelShow=!0},null)]),t("div",{class:o.infobox},[t("div",{class:o.attendanceTitle},[t("span",null,[a("基本信息")])]),t("div",{class:o.infoItem},[t("div",null,[a("性别")]),t("div",null,[e.student.gender?"男":"女"])]),t("div",{class:o.infoItem},[t("div",null,[a("联系电话")]),t("div",null,[e.student.phoneStr])]),t("div",{class:o.infoItem},[t("div",null,[a("年级")]),t("div",{class:o.edit,onClick:()=>{e.student.inGroupStatus!=="OUT"&&(e.gradeShow=!0)}},[e.student.currentGrade,e.student.currentClass,e.student.inGroupStatus!=="OUT"&&t(m,{class:o.iconPen,src:Ut},null)])]),t("div",{class:o.infoItem},[t("div",null,[a("艺术实践")]),t("div",null,[e.student.artPracticeCount,a("次")])]),e.student.quitTime&&t("div",{class:o.infoItem},[t("div",null,[a("退团时间")]),t("div",{style:{color:"#FF5A56"}},[P()])])]),t("div",{class:o.box},[t(tt,{item:e.student},null)]),t("div",{class:o.box},[t(et,{item:e.student},null)])]}),t(f,{show:e.groupShow,"onUpdate:show":n=>e.groupShow=n,position:"bottom",round:!0},{default:()=>[t(D,{visibleOptionNum:5,columns:e.musicGroup,onCancel:()=>e.groupShow=!1,onConfirm:n=>{const c=n.selectedOptions[0],r=e.musicGroupId;e.musicGroupId=c.value,e.musicGroupTitle=c.text,e.groupShow=!1,r!=c.value&&_()}},null)]}),t(f,{show:e.cancelShow,"onUpdate:show":n=>e.cancelShow=n,position:"bottom",round:!0,closeable:!0},{default:()=>[t("div",{class:o.concatBox},[t("div",{class:o.concatTitle},[a("联系方式")]),t("div",{class:o.concatContent},[t(G,{columnNum:2,border:!1,center:!0},{default:()=>[t(w,{text:"发送消息",onClick:R},{icon:()=>t(m,{class:o.concatIcon,src:jt},null)}),t(w,{text:"拨打电话",onClick:W},{icon:()=>t(m,{class:o.concatIcon,src:Mt},null)})]})])])]}),t(f,{show:e.gradeShow,"onUpdate:show":n=>e.gradeShow=n,position:"bottom",round:!0},{default:()=>[t(D,{visibleOptionNum:5,columns:e.gradeOptions,onCancel:()=>e.gradeShow=!1,onConfirm:n=>{e.gradeShow=!1,k(n.selectedOptions)}},null)]}),t(f,{show:e.quitShow,"onUpdate:show":n=>e.quitShow=n,class:["popup-custom","van-scale"],transition:"van-scale"},{default:()=>[t("div",{class:o.quitBox},[t("div",{class:o.quitTitle},[a("选择乐团")]),t("div",{class:o.quitDes},[a("请选择要退出的乐团:")]),t(lt,{modelValue:e.quitList,"onUpdate:modelValue":n=>e.quitList=n,class:o.optionBox},{default:()=>[t(A,{border:!1},Qt(u=e.musicGroup.map((n,c)=>t(h,{class:[e.quitList.includes(n.value)&&o.cellActive],title:n.text,center:!0,border:!1,onClick:()=>{var r;(r=p.value[c])==null||r.toggle()}},{value:()=>t(rt,{ref:r=>p.value[c]=r,shape:"square",name:n.value,onClick:r=>r.stopPropagation()},null)})))?u:{default:()=>[u]})]}),t("div",{class:["btnGroupPopup",o.btns]},[t(v,{round:!0,onClick:()=>e.quitShow=!1},{default:()=>[a("取消")]}),t(v,{type:"primary",round:!0,disabled:!e.quitList.length,onClick:()=>{e.quitConfirmShow=!0}},{default:()=>[a("下一步")]})])])]}),t(f,{show:e.quitConfirmShow,"onUpdate:show":n=>e.quitConfirmShow=n,class:["popup-custom","van-scale"],overlayStyle:{background:"transparent"},transition:"van-scale"},{default:()=>[t("div",{class:o.quitBox},[t("div",{class:o.quitTitle},[a("学员退团")]),t("div",{class:o.quitDes},[a("确认要将学员"),t("span",{style:{color:"#FF5A56"}},[T.value]),a("中退团吗?")]),t(ht,{class:o.divider},null),t("div",{style:{color:"#333"},class:[o.quitLabel,o.quitReason]},[t("span",{style:{color:"#FF5A56"}},[a("*")]),a("退团原因:")]),t("div",{class:o.quitLabel},[t(dt,{class:o.reasonBox,modelValue:e.reason,"onUpdate:modelValue":n=>e.reason=n,type:"textarea",rows:3,required:!0,placeholder:"请填写退团原因"},null)]),t("div",{class:o.quitLabel},[a("确认后,我们将在7个工作日内与学生联系退费事宜")]),t("div",{class:["btnGroupPopup"]},[t(v,{round:!0,onClick:()=>e.quitConfirmShow=!1},{default:()=>[a("取消")]}),t(v,{loading:e.quitLoading,type:"primary",round:!0,onClick:()=>O()},{default:()=>[a("确定")]})])])]})])}}});export{se as default};
|