index-a8576bed.js 10 KB

12345
  1. <<<<<<<< HEAD:dist/assets/index-6037c77c.js
  2. import{d as G,O as w,i as m,o as S,g as a,R as j,B as f,h as i,F as D,T as I,N as T}from"./index-6ef77773.js";import{M as B}from"./index-884fd858.js";import{M as R}from"./index-fbc0b234.js";import{s as u,M as E,A as L,a as O,b as P,c as U,d as V,e as _}from"./api-5310e764.js";import{S as q}from"./skeletion-index-fb7ee6ea.js";import{M as z}from"./index-03f0ddaa.js";import{D as H,a as C}from"./index-325981c7.js";import{P as N}from"./index-cbfe6e55.js";import{L as J}from"./index-b948e350.js";import{I as A}from"./index-6cce5316.js";import"./index-617c3e5c.js";import"./index-2ab268f1.js";import"./icon-student-default-4c78efb2.js";import"./index-54d65aa5.js";import"./index-46050490.js";import"./index-e5198b82.js";import"./use-tab-status-875823de.js";const K=""+new URL("icon-tuituan-124310f7.png",import.meta.url).href,Q=""+new URL("icon-zaidu-a09f5751.png",import.meta.url).href,pt=G({name:"student-manage",setup(){const k=T(),o=w({page:1,rows:20,keyword:"",musicGroupId:"",statusList:"",subjectId:"",vipFlag:""}),e=w({skelet:!0,refresh:!1,loading:!1,finshed:!1,list:[],studentCount:0,quitCount:0,musicGroups:[{text:"全部乐团",value:""}],musicGroupName:"全部乐团",subjects:[{text:"全部声部",value:""}],subjectName:"全部声部",studentTypes:[{text:"全部学员",value:""},{text:"团练宝学员",value:"1"},{text:"普通学员",value:"2"}],studentTypeName:"全部学员"}),g=m(),h=m(),v=m(),y=m(),x=()=>{P().then(t=>{let s=Array.isArray(t==null?void 0:t.data)?t.data:[];s.length&&(s=[{name:"全部乐团",id:""}].concat(s),e.musicGroups=s.map(l=>({text:l.name,value:l.id})))})},F=()=>{U().then(t=>{let s=Array.isArray(t==null?void 0:t.data)?t.data:[];s.length&&(s=[{name:"全部声部",id:""}].concat(s),e.subjects=s.map(l=>({text:l.name,value:l.id})))})},M=()=>{V({...o,vipFlag:o.vipFlag==="1"?!0:o.vipFlag==="2"?!1:""}).then(t=>{const s=t==null?void 0:t.data;s&&(e.studentCount=s.studentCount,e.quitCount=s.quitCount)})},b=async()=>{e.loading=!0,_({...o,vipFlag:o.vipFlag==="1"?!0:o.vipFlag==="2"?!1:""}).then(t=>{var l;e.refresh&&(e.list=[]);const s=Array.isArray((l=t==null?void 0:t.data)==null?void 0:l.rows)?t.data.rows:[];e.list=e.list.concat(s),!s.length||s.length<o.rows?e.finshed=!0:e.finshed=!1,o.page++}).catch(()=>{e.finshed=!0}).finally(()=>{setTimeout(()=>{e.loading=!1,e.refresh=!1,e.skelet=!1},500)})},p=()=>{o.page=1,e.refresh=!0,M(),b()};return S(()=>{x(),F(),M()}),()=>a("div",{class:u.container},[a(R,{position:"top"},{default:()=>[a(j,null,null),a(B,{disabled:e.loading,placeholder:"请输入学员姓名",onSearch:t=>{o.keyword=t,p()}},null),a(H,null,{default:()=>[a(C,{ref:g,title:e.musicGroupName},{default:()=>[a(N,{ref:h,showToolbar:!1,visibleOptionNum:5,columns:e.musicGroups},null),a("div",{class:["btnGroupPopup","van-hairline--top"]},[a(f,{round:!0,onClick:()=>{var t;(t=g.value)==null||t.toggle(!1)}},{default:()=>[i("取消")]}),a(f,{disabled:!e.musicGroups.length,type:"primary",round:!0,onClick:()=>{var s,l,n,r,d,c;(l=(s=h.value)==null?void 0:s.confirm)==null||l.call(s);const t=(d=(r=(n=h.value)==null?void 0:n.getSelectedOptions)==null?void 0:r.call(n))==null?void 0:d[0];t&&(o.musicGroupId=t.value,e.musicGroupName=t.text,p()),(c=g.value)==null||c.toggle(!1)}},{default:()=>[i("确定")]})])]}),a(C,{ref:v,title:e.subjectName},{default:()=>[a(N,{ref:y,showToolbar:!1,visibleOptionNum:5,columns:e.subjects},null),a("div",{class:["btnGroupPopup","van-hairline--top"]},[a(f,{round:!0,onClick:()=>{var t;(t=v.value)==null||t.toggle(!1)}},{default:()=>[i("取消")]}),a(f,{disabled:!e.subjects.length,type:"primary",round:!0,onClick:()=>{var s,l,n,r,d,c;(l=(s=y.value)==null?void 0:s.confirm)==null||l.call(s);const t=(d=(r=(n=y.value)==null?void 0:n.getSelectedOptions)==null?void 0:r.call(n))==null?void 0:d[0];console.log(t),o.subjectId=t.value,e.subjectName=t.text,p(),(c=v.value)==null||c.toggle(!1)}},{default:()=>[i("确定")]})])]}),a(C,{class:u.dropdownItem,title:e.studentTypeName,modelValue:o.vipFlag,"onUpdate:modelValue":t=>o.vipFlag=t,options:e.studentTypes,onChange:t=>{var s;e.studentTypeName=((s=e.studentTypes.find(l=>l.value==t))==null?void 0:s.text)||"",p()}},null)]})]}),a(z,{modelValue:e.refresh,"onUpdate:modelValue":t=>e.refresh=t,onRefresh:()=>{o.page=1,e.finshed=!1,b()}},{default:()=>[a(J,{class:u.list,loading:e.loading,finished:e.finshed,onLoad:()=>{e.loading=!0,console.log("触底了"),b()}},{default:()=>[a(q,{loading:e.skelet},{default:()=>[a(D,null,[a("div",{class:u.statistics},[a("div",{class:u.statisticsItem},[a(A,{class:u.iconstatistics,src:Q},null),a("div",{class:u.statisticsDes},[a("div",{style:{color:"#333"}},[a("span",{class:u.statisticsNum,style:{color:"#333"}},[e.studentCount]),i("人")]),a("div",null,[i("在读学员")])])]),a("div",{class:u.statisticsItem,onClick:()=>{k.push({path:"/student-manage-withdraw"})}},[a(A,{class:u.iconstatistics,src:K},null),a("div",{class:u.statisticsDes},[a("div",{style:{color:"#333"}},[a("span",{class:u.statisticsNum,style:{color:"#FC1A19"}},[e.quitCount]),i("人")]),a("div",null,[i("退团人数")])])])]),e.list.map(t=>a("div",{class:u.student,key:t.studentId},[a(E,{item:t},null),a(L,{item:t},null),a(O,{item:t},null)])),!e.loading&&!e.list.length&&a(I,{description:"暂无数据",style:{minHeight:"100%"}},null)])]})]})]})])}});export{pt as default};
  3. ========
  4. import{d as G,O as w,i as m,o as S,g as a,R as j,B as f,h as i,F as D,T as I,N as T}from"./index-dbd58bee.js";import{M as B}from"./index-f894e88f.js";import{M as R}from"./index-8b3add60.js";import{s as u,M as E,A as L,a as O,b as P,c as U,d as V,e as _}from"./api-f7a373f4.js";import{S as q}from"./skeletion-index-ee02825c.js";import{M as z}from"./index-88ef4b67.js";import{D as H,a as C}from"./index-751eeaa2.js";import{P as N}from"./index-96fefea8.js";import{L as J}from"./index-f53d898e.js";import{I as A}from"./index-56f13818.js";import"./index-e510518a.js";import"./index-56f3e976.js";import"./icon-student-default-4c78efb2.js";import"./index-8ef299c2.js";import"./index-360b2184.js";import"./index-96c8c221.js";import"./use-tab-status-855575aa.js";const K=""+new URL("icon-tuituan-124310f7.png",import.meta.url).href,Q=""+new URL("icon-zaidu-a09f5751.png",import.meta.url).href,pt=G({name:"student-manage",setup(){const k=T(),o=w({page:1,rows:20,keyword:"",musicGroupId:"",statusList:"",subjectId:"",vipFlag:""}),e=w({skelet:!0,refresh:!1,loading:!1,finshed:!1,list:[],studentCount:0,quitCount:0,musicGroups:[{text:"全部乐团",value:""}],musicGroupName:"全部乐团",subjects:[{text:"全部声部",value:""}],subjectName:"全部声部",studentTypes:[{text:"全部学员",value:""},{text:"团练宝学员",value:"1"},{text:"普通学员",value:"2"}],studentTypeName:"全部学员"}),g=m(),h=m(),v=m(),y=m(),x=()=>{P().then(t=>{let s=Array.isArray(t==null?void 0:t.data)?t.data:[];s.length&&(s=[{name:"全部乐团",id:""}].concat(s),e.musicGroups=s.map(l=>({text:l.name,value:l.id})))})},F=()=>{U().then(t=>{let s=Array.isArray(t==null?void 0:t.data)?t.data:[];s.length&&(s=[{name:"全部声部",id:""}].concat(s),e.subjects=s.map(l=>({text:l.name,value:l.id})))})},M=()=>{V({...o,vipFlag:o.vipFlag==="1"?!0:o.vipFlag==="2"?!1:""}).then(t=>{const s=t==null?void 0:t.data;s&&(e.studentCount=s.studentCount,e.quitCount=s.quitCount)})},b=async()=>{e.loading=!0,_({...o,vipFlag:o.vipFlag==="1"?!0:o.vipFlag==="2"?!1:""}).then(t=>{var l;e.refresh&&(e.list=[]);const s=Array.isArray((l=t==null?void 0:t.data)==null?void 0:l.rows)?t.data.rows:[];e.list=e.list.concat(s),!s.length||s.length<o.rows?e.finshed=!0:e.finshed=!1,o.page++}).catch(()=>{e.finshed=!0}).finally(()=>{setTimeout(()=>{e.loading=!1,e.refresh=!1,e.skelet=!1},500)})},p=()=>{o.page=1,e.refresh=!0,M(),b()};return S(()=>{x(),F(),M()}),()=>a("div",{class:u.container},[a(R,{position:"top"},{default:()=>[a(j,null,null),a(B,{disabled:e.loading,placeholder:"请输入学员姓名",onSearch:t=>{o.keyword=t,p()}},null),a(H,null,{default:()=>[a(C,{ref:g,title:e.musicGroupName},{default:()=>[a(N,{ref:h,showToolbar:!1,visibleOptionNum:5,columns:e.musicGroups},null),a("div",{class:["btnGroupPopup","van-hairline--top"]},[a(f,{round:!0,onClick:()=>{var t;(t=g.value)==null||t.toggle(!1)}},{default:()=>[i("取消")]}),a(f,{disabled:!e.musicGroups.length,type:"primary",round:!0,onClick:()=>{var s,l,n,r,d,c;(l=(s=h.value)==null?void 0:s.confirm)==null||l.call(s);const t=(d=(r=(n=h.value)==null?void 0:n.getSelectedOptions)==null?void 0:r.call(n))==null?void 0:d[0];t&&(o.musicGroupId=t.value,e.musicGroupName=t.text,p()),(c=g.value)==null||c.toggle(!1)}},{default:()=>[i("确定")]})])]}),a(C,{ref:v,title:e.subjectName},{default:()=>[a(N,{ref:y,showToolbar:!1,visibleOptionNum:5,columns:e.subjects},null),a("div",{class:["btnGroupPopup","van-hairline--top"]},[a(f,{round:!0,onClick:()=>{var t;(t=v.value)==null||t.toggle(!1)}},{default:()=>[i("取消")]}),a(f,{disabled:!e.subjects.length,type:"primary",round:!0,onClick:()=>{var s,l,n,r,d,c;(l=(s=y.value)==null?void 0:s.confirm)==null||l.call(s);const t=(d=(r=(n=y.value)==null?void 0:n.getSelectedOptions)==null?void 0:r.call(n))==null?void 0:d[0];console.log(t),o.subjectId=t.value,e.subjectName=t.text,p(),(c=v.value)==null||c.toggle(!1)}},{default:()=>[i("确定")]})])]}),a(C,{class:u.dropdownItem,title:e.studentTypeName,modelValue:o.vipFlag,"onUpdate:modelValue":t=>o.vipFlag=t,options:e.studentTypes,onChange:t=>{var s;e.studentTypeName=((s=e.studentTypes.find(l=>l.value==t))==null?void 0:s.text)||"",p()}},null)]})]}),a(z,{modelValue:e.refresh,"onUpdate:modelValue":t=>e.refresh=t,onRefresh:()=>{o.page=1,e.finshed=!1,b()}},{default:()=>[a(J,{class:u.list,loading:e.loading,finished:e.finshed,onLoad:()=>{e.loading=!0,console.log("触底了"),b()}},{default:()=>[a(q,{loading:e.skelet},{default:()=>[a(D,null,[a("div",{class:u.statistics},[a("div",{class:u.statisticsItem},[a(A,{class:u.iconstatistics,src:Q},null),a("div",{class:u.statisticsDes},[a("div",{style:{color:"#333"}},[a("span",{class:u.statisticsNum,style:{color:"#333"}},[e.studentCount]),i("人")]),a("div",null,[i("在读学员")])])]),a("div",{class:u.statisticsItem,onClick:()=>{k.push({path:"/student-manage-withdraw"})}},[a(A,{class:u.iconstatistics,src:K},null),a("div",{class:u.statisticsDes},[a("div",{style:{color:"#333"}},[a("span",{class:u.statisticsNum,style:{color:"#FC1A19"}},[e.quitCount]),i("人")]),a("div",null,[i("退团人数")])])])]),e.list.map(t=>a("div",{class:u.student,key:t.studentId},[a(E,{item:t},null),a(L,{item:t},null),a(O,{item:t},null)])),!e.loading&&!e.list.length&&a(I,{description:"暂无数据",style:{minHeight:"100%"}},null)])]})]})]})])}});export{pt as default};
  5. >>>>>>>> 87d4d1b1 (更新):dist/assets/index-a8576bed.js