1 |
- import{d,J as F,g as t,h as p,O as b,o as k,R as P,F as h,T as f,N as R}from"./index-1d4a9afa.js";import{M as I}from"./index-6b314488.js";import{M as _}from"./index-8fc031c0.js";import{i as M}from"./icon-timer-ac089c62.js";import{i as C}from"./icon-student-default-4c78efb2.js";import{C as y}from"./index-a27d7671.js";import{I as E}from"./index-c272bcfa.js";import{a as r,b as H,S as v}from"./index-fc00eb76.js";import{M as O}from"./index-575d1b2d.js";import{m as L}from"./api-a27e9fce.js";import{T as V,a as w}from"./index-22c9ea74.js";import{L as x}from"./index-5807759e.js";import{D as B,a as G}from"./index-ab43c325.js";import"./index-dbc03ded.js";import"./use-tab-status-a36febbc.js";const N="_list_1war5_25",D="_todo_1war5_29",J="_listHide_1war5_39",Q="_listItem_1war5_43",U="_itemTop_1war5_49",j="_icon_1war5_56",W="_timeTitle_1war5_61",q="_time_1war5_61",z="_timeBtn_1war5_68",K="_success_1war5_72",X="_error_1war5_75",Y="_iconTeacher_1war5_78",Z="_menubox_1war5_92",$="_optionModel_1war5_122",o={"schedule-manage":"_schedule-manage_1war5_1",list:N,todo:D,listHide:J,listItem:Q,itemTop:U,icon:j,timeTitle:W,time:q,timeBtn:z,success:K,error:X,iconTeacher:Y,menubox:Z,optionModel:$},T=d({name:"schedule-manage-list-item",props:{status:{type:String,default:""},item:{type:Object,default:()=>({})},isLink:{type:Boolean,default:!1}},emits:["goto"],setup(i,{emit:l}){const{item:n,isLink:e}=F(i);return()=>t("div",{class:o.listItem},[t("div",{class:o.itemTop},[t("img",{class:o.icon,src:M},null),t("span",{class:o.timeTitle},[p("审批时间:")]),t("span",{class:o.time},[n.value.createTime]),i.status==="success"&&t("div",{class:[o.timeBtn,o.success]},[p("已通过")]),i.status==="error"&&t("div",{class:[o.timeBtn,o.error]},[p("未通过")])]),t(y,{center:!0,title:n.value.studentName,label:n.value.subjectName,value:"退团申请",isLink:e.value,onClick:()=>l("goto")},{icon:()=>t(E,{src:n.value.studentAvatar||C,class:o.iconTeacher,fit:"cover",round:!0},null)})])}}),S=d({name:"schedule-manage-list-item",props:{status:{type:String,default:""}},emits:["goto"],setup(i,{emit:l}){return()=>t("div",{class:o.listItem},[t("div",{class:o.itemTop},[t(r,null,null)]),t(y,{center:!0,isLink:!0,onClick:()=>l("goto")},{icon:()=>t(H,{avatarSize:"1.28rem"},null),title:()=>t(r,{rowWidth:"50%"},null),label:()=>t(r,{rowWidth:"30%"},null),value:()=>t(r,null,null)})])}}),he=d({name:"schedule-manage",setup(){const i="schedule-manage-tab-name",l=a=>{if(a==="set")sessionStorage.setItem(i,e.tabActive);else return sessionStorage.getItem(i)||""},n=R(),e=b({tabActive:l("get"),examineLoading:!0,refreshLoading:!1,examineFinish:!1,examineList:[],examinePage:{page:1,rows:20},examineSkelet:!0,completeList:[],completePage:{page:1,rows:20},completeResh:!1,completeLoading:!1,completeSkelet:!0,completeFinish:!1,completeActive:"",completeColumns:[{text:"全部活动",value:""}],options:[{text:"全部状态",value:""},{text:"已通过",value:"PASS"},{text:"未通过",value:"REJECT"}],optionTitle:"全部状态",activeOption:"",search:""}),u=async()=>{console.log("请求"),e.examineLoading=!0,L({page:e.examinePage.page,rows:e.examinePage.rows,status:"ING"}).then(a=>{var c;e.refreshLoading&&(e.examineList=[]);const s=Array.isArray((c=a==null?void 0:a.data)==null?void 0:c.rows)?a.data.rows:[];e.examineList=e.examineList.concat(s),(!s.length||s.length<e.examinePage.rows)&&(e.examineFinish=!0)}).catch(()=>{e.examineFinish=!0}).finally(()=>{setTimeout(()=>{e.examineLoading=!1,e.refreshLoading=!1,e.examineSkelet=!1},500)})},m=()=>{e.completeLoading||(console.log("请求",e.completeLoading,e.completeResh),e.completeLoading=!0,L({page:e.completePage.page,rows:e.completePage.rows,search:e.search,status:e.activeOption}).then(a=>{var c;e.completeResh&&(e.completeList=[]);const s=Array.isArray((c=a==null?void 0:a.data)==null?void 0:c.rows)?a.data.rows:[];e.completeList=e.completeList.concat(s),!s.length||s.length<e.completePage.rows?e.completeFinish=!0:e.completeFinish=!1}).catch(()=>{e.completeFinish=!0}).finally(()=>{setTimeout(()=>{e.completeLoading=!1,e.completeResh=!1,e.completeSkelet=!1},500)}))};k(()=>{u(),m()});const A=a=>{e.optionTitle=e.activeOption==="PASS"?"已通过":e.activeOption==="REJECT"?"未通过":"全部状态",e.examinePage.page=1,e.completeResh=!0,m()},g=a=>{l("set"),n.push({path:"schedule-manage-detail",query:{musicGroupQuitId:a.musicGroupQuitId}})};return()=>t("div",{class:o["schedule-manage"]},[t(I,{class:"schedule-manage-top",position:"top"},{default:()=>[t(P,null,null)]}),t(V,{swipeable:!0,animated:!0,active:e.tabActive,"onUpdate:active":a=>e.tabActive=a},{default:()=>[t(w,{name:"todo",title:"待审批"},{default:()=>[t(_,{modelValue:e.refreshLoading,"onUpdate:modelValue":a=>e.refreshLoading=a,onRefresh:()=>{e.examinePage.page=1,e.examineFinish=!1,u()}},{default:()=>[t(x,{loading:e.examineLoading,finished:e.examineFinish,class:[o.list,o.todo],onLoad:()=>{e.examinePage.page++,u()}},{default:()=>[e.examineSkelet?t("div",{class:[o.list,o.listHide]},[t(v,{loading:!0},{template:()=>t("div",{style:{width:"100%"}},[new Array(10).fill(1).map(a=>t(S,null,null))])})]):t(h,null,[e.examineList.map(a=>t(T,{isLink:!0,item:a,onGoto:()=>g(a)},null)),!e.examineList.length&&t(f,{description:"暂无数据",style:{minHeight:"100%"}},null)])]})]})]}),t(w,{name:"complete",title:"已完成"},{default:()=>[t("div",{class:o.menubox},[t(B,null,{default:()=>[t(G,{teleport:"body",title:e.optionTitle,modelValue:e.activeOption,"onUpdate:modelValue":a=>e.activeOption=a,options:e.options,onChange:A,class:o.optionModel},null)]}),t(O,{placeholder:"请输入学员名称",disabled:e.completeLoading,onSearch:a=>{e.search=a,e.completePage.page=1,e.completeResh=!0,m()}},null)]),t(_,{modelValue:e.completeResh,"onUpdate:modelValue":a=>e.completeResh=a,onRefresh:()=>{console.log("下拉"),e.completePage.page=1,e.completeFinish=!1,m()}},{default:()=>[t(x,{loading:e.completeLoading,finished:e.completeFinish,class:o.list,onLoad:()=>{e.completePage.page++,console.log("触底",e.completeResh),m()}},{default:()=>[e.completeSkelet?t("div",{class:[o.list,o.listHide]},[t(v,{loading:!0},{template:()=>t("div",{style:{width:"100%"}},[new Array(4).fill(1).map(a=>t(S,null,null))])})]):t(h,null,[e.completeList.map(a=>t(T,{item:a,isLink:!0,onGoto:()=>g(a),status:a.status==="PASS"?"success":a.status==="REJECT"?"error":""},null)),!e.completeList.length&&t(f,{description:"暂无数据",style:{minHeight:"100%"}},null)])]})]})]})]})])}});export{he as default};
|