1 |
- import{d as h,aM as n,b as r,aN as g,bi as c,c as a,F as d,aZ as f,a as m,aO as S,aP as i,c7 as N}from"./index.2bf82915.js";import{M as b,s as o}from"./item.5b1da3e6.js";import{C as p}from"./index.222e7b2f.js";import{P as v}from"./index.7d07a41f.js";import{E as y,a as l}from"./index2.63df3145.js";import"./index2.1af0183f.js";import"./index2.ec9f8409.js";const u=h({name:"list",props:{auditStatus:{type:String,default:""},onNumber:{type:Function,default:t=>{}}},data(){return{pageInfo:{limit:10,page:1,total:0,page_size:[10,20,40,50]},list:[],loading:!1,dataShow:!1}},mounted(){var t;(t=n.user.data)!=null&&t.entryFlag&&this.getList()},methods:{async getList(){this.loading=!0;try{const{data:t}=await r.post("/api-website/music/sheet/teacher/list",{data:{auditStatus:this.auditStatus,page:this.pageInfo.page,rows:this.pageInfo.limit}});this.list=t.list.rows||[],this.pageInfo.total=t.list.total,t.list.total<=0&&(this.dataShow=!0),this.onNumber({doing:t.doing||0,pass:t.pass||0,unPass:t.unPass||0})}catch{}this.dataShow?this.loading=!1:setTimeout(()=>{this.loading=!1},200)},async onChangeState(t){g.confirm("\u786E\u8BA4\u4E0B\u67B6\u8BE5\u66F2\u8C31\u5417?","\u63D0\u793A",{confirmButtonText:"\u786E\u8BA4",cancelButtonText:"\u53D6\u6D88",type:"warning"}).then(async()=>{try{await r.post("/api-website/music/sheet/state/"+t.id),c.success("\u4E0B\u67B6\u6210\u529F"),this.pageInfo.page=1,this.getList()}catch{}})}},render(){var t;return a(d,null,[(t=n.user.data)!=null&&t.entryFlag?a(d,null,[a("div",null,[a(y,{loading:this.loading,animated:!0,class:" w-full m-auto px-[14px] flex items-center flex-col",count:3},{default:()=>[this.list.map(e=>a(b,{onClick:s=>{["PASS","DOING"].includes(this.auditStatus)&&this.$router.push({path:"/muiscDetial",query:{id:s.id}}),(this.auditStatus==="UNPASS"||this.auditStatus==="OUT_SALE")&&(console.log(s),this.$router.push({path:"/userInfo/musicOperation",query:{type:"update",id:s.id}}))},onChangeState:s=>this.onChangeState(s),item:{id:e.id,auditStatus:this.auditStatus,addName:e.addName,addUserAvatar:e.addUserAvatar,musicSheetName:e.musicSheetName,subjectNames:e.subjectNames,titleImg:e.titleImg,composer:e.composer,chargeType:e.chargeType},class:[o.musicListItem,"pt-2 cursor-pointer border-b border-solid border-[#E7E6E6] hover:bg-[#F4F4F4]"]},null))],template:()=>a("div",{class:"h-[94px] flex items-center justify-between w-full mb-2 pt-2"},[a("div",{class:"w-2/3 flex items-center"},[a(l,{variant:"circle",style:{width:"88px",height:"88px"}},null),a("div",{class:"w-1/2 pl-2"},[a(l,{variant:"h3"},null),a(l,{variant:"p",style:{width:"50%"}},null)])]),a(l,{variant:"p",style:{width:"20%"}},null)])})]),a(v,{total:this.pageInfo.total,page:this.pageInfo.page,"onUpdate:page":e=>this.pageInfo.page=e,limit:this.pageInfo.limit,"onUpdate:limit":e=>this.pageInfo.limit=e,pageSizes:this.pageInfo.page_size,pagination:this.getList},null),this.dataShow&&a(p,null,null)]):a("div",{class:"px-[38px]"},[a(p,{type:"teacherCert",message:"\u60A8\u8FD8\u672A\u5B8C\u6210\u8FBE\u4EBA\u8BA4\u8BC1\uFF0C\u8BA4\u8BC1\u540E\u624D\u53EF\u4E0A\u4F20\u4E50\u8C31\u54E6~",buttonVisibility:!0,buttonText:"\u53BB\u8BA4\u8BC1",onDetail:()=>{this.$router.push("/teacherAuth")}},null)])])}}),U=h({name:"music-class",data(){const t=sessionStorage.getItem("musicActiveName");return sessionStorage.removeItem("musicActiveName"),{activeName:t||"PASS",num:{doing:0,pass:0,unPass:0}}},render(){return a("div",{class:[o.liveClass,"relative px-[25px]"]},[a(f,{round:!0,type:"primary",class:"absolute right-11 top-4 z-10",onClick:()=>{var t;if((t=n.user.data)!=null&&t.entryFlag)this.$router.push({path:"/userInfo/musicOperation"});else{c.error("\u60A8\u8FD8\u672A\u5B8C\u6210\u8FBE\u4EBA\u8BA4\u8BC1\uFF0C\u8BA4\u8BC1\u540E\u624D\u53EF\u4E0A\u4F20\u4E50\u8C31\u54E6");return}}},{default:()=>[m("\u65B0\u5EFA\u4E50\u8C31")]}),a(S,{modelValue:this.activeName,"onUpdate:modelValue":t=>this.activeName=t},{default:()=>[a(i,{label:"\u5DF2\u4E0A\u67B6",name:"PASS"},{default:()=>[this.activeName==="PASS"&&a(u,{auditStatus:"PASS",onNumber:t=>{this.num=t}},null)]}),a(i,{label:"\u5BA1\u6838\u4E2D",name:"DOING"},{default:()=>[this.activeName==="DOING"&&a(u,{auditStatus:"DOING",onNumber:t=>{this.num=t}},null)]}),a(i,{name:"UNPASS"},{default:()=>[this.activeName==="UNPASS"&&a(u,{auditStatus:"UNPASS",onNumber:t=>{this.num=t}},null)],label:()=>a(N,{class:o.badge,value:this.num.unPass,hidden:this.num.unPass===0},{default:()=>[m("\u5BA1\u6838\u5931\u8D25")]})}),a(i,{label:"\u5DF2\u4E0B\u67B6",name:"OUT_SALE"},{default:()=>[this.activeName==="OUT_SALE"&&a(u,{auditStatus:"OUT_SALE",onNumber:t=>{this.num=t}},null)]})]})])}});export{U as default};
|