list.76074c95.js 5.3 KB

1
  1. import{d as O,i as e,A as m,B as b,P as G,Q as T,S as R,U as i,C as q,aT as U,F as B,e as E,T as x}from"./index.6b776f4b.js";import{S as j}from"./index.998c3386.js";import{L as M}from"./index.9b1da5d2.js";import"./index.7486196c.js";import{F as I}from"./index.ef17e812.js";import{C as H}from"./index.1c64afe2.js";import{I as K}from"./index.7cc0b0e7.js";import{c as Q}from"./index.926ca9c5.js";import{s as W}from"./index.module.7b815a85.js";import{g as $,m as J}from"./music.35746cdc.js";import"./use-tab-status.ad41a764.js";import"./use-id.40b6af6b.js";import"./index.c3591af3.js";var X="./assets/music-icon.fd0e8ce9.png";const Y="_item_18izn_1",Z="_header_18izn_8",ee="_mate_18izn_14",ae="_icon_18izn_19",te="_info_18izn_25",se="_btn_18izn_53",ue="_vip_18izn_61",le="_free_18izn_65",oe="_charge_18izn_69",ne="_footer_18izn_73",ie="_user_18izn_78",re="_userIcon_18izn_84",ce="_favorite_18izn_92",de="_tags_18izn_95";var r={item:Y,header:Z,mate:ee,icon:ae,info:te,btn:se,vip:ue,free:le,charge:oe,footer:ne,user:ie,userIcon:re,favorite:ce,tags:de};const me={CHARGE:"\u70B9\u64AD",FREE:"\u514D\u8D39",VIP:"VIP"};let N;(function(t){t.UNPASS="\u62D2\u7EDD",t.DOING="\u5BA1\u6838\u4E2D",t.PASS="\u901A\u8FC7"})(N||(N={}));let C;(function(t){t.UNPASS="#f56c6c",t.DOING="#909399",t.PASS="#67c23a"})(C||(C={}));var ve=O({name:"MusicItem",props:{data:{type:Object,default:{}},onClick:{type:Function}},emits:["favorite"],setup({onClick:t,data:o}){return()=>{const h=o.musicPrice>0?"charge":"free";return e("div",{class:r.item,onClick:()=>{t==null||t(o)}},[e("header",{class:r.header},[e("div",{class:r.mate},[e(K,{src:X,round:!0,class:r.icon},null),e("div",{class:r.info},[e("h4",{class:"van-multi-ellipsis--l2"},[o.musicSheetName]),e("p",null,[e("div",null,[e("span",null,[m("\u5BA1\u6838\u72B6\u6001:")," ",e("b",{style:{color:C[o.auditStatus],fontWeight:"bold"}},[N[o.auditStatus]])]),e("span",null,[m("\u4E0A\u4F20\u4F5C\u8005: "),o.username])]),e("div",null,[e("span",null,[m("\u6536\u8D39\u4EF7\u683C: "),o.musicPrice,m("\u5143")]),e("span",null,[m("\u5BA1\u6279\u4EBA\u5458: "),o.auditName])])])])]),e("div",{class:r.buttons},[e(b,{class:Q(r.btn,r[h])},{default:()=>[me[h.toLocaleUpperCase()]]})])])])}}});const fe=()=>{};var ke=O({name:"ReviewList",props:{hideSearch:{type:Boolean,default:!1},defauleParams:{type:Object,default:()=>({})},onItemClick:{type:Function,default:fe},teacherId:{type:String||Number,default:""}},setup({hideSearch:t,defauleParams:o,onItemClick:h,teacherId:pe},{expose:L}){localStorage.setItem("behaviorId",$());const _=G();T();const z={},A=_.query;A.version&&(z.version=A.version||"");const c=R({search:_.query.search||"",musicTagIds:_.query.tagids||"",page:1,...z,...o}),s=i(null),v=i(!1),D=i(!1),S=i(!1),V=i(!1),g=a=>{c.page=1,c.search=a,s.value=null,y()},y=async()=>{var a;if(!v.value){v.value=!0,S.value=!1;try{const l=await E.post("/api-admin/music/sheet/audit/list",{data:{...c}});if(s.value){let p=(((a=s.value)==null?void 0:a.rows)||[]).concat(l.data.rows||[]);s.value.rows=p}s.value=s.value||l.data,c.page=l.data.pageNo+1,D.value=l.data.pageNo>=l.data.totalPage}catch{S.value=!0}v.value=!1}};L({onSearch:g,onComfirm:a=>{const l=Object.values(a).flat().filter(Boolean).join(",");c.musicTagIds=l,c.page=1,s.value=null,y(),V.value=!1}});const d=i(""),u=i(null),f=i(!1),P=async a=>{try{await E.post("/api-admin/music/sheet/audit",{data:a}),x.success("\u63D0\u4EA4\u6210\u529F"),f.value=!1,d.value="",g(c.search)}catch{}};return()=>e(B,null,[e(M,{loading:v.value,finished:D.value,"finished-text":s.value&&s.value.rows.length?"\u6CA1\u6709\u66F4\u591A\u4E86":"",onLoad:y,error:S.value},{default:()=>[!t&&e(j,{class:W.sticky},{default:()=>[e(H,{onSearch:g},null)]}),s.value&&s.value.rows.length?s.value.rows.map(a=>e(ve,{data:a,onClick:()=>{u.value={...a},f.value=!0,console.log(a)}},null)):!v.value&&e(q,{tips:"\u6682\u65E0\u66F2\u76EE",classImgSize:"SMALL",btnStatus:!1},null)]}),e(U,{position:"bottom",closeable:!0,style:{minHeight:"30%"},show:!!u.value&&f.value,onClosed:()=>u.value=null,onClose:()=>f.value=!1,teleport:"body"},{default:()=>{var a,l,p,F,k,w;return[e(I,{label:"\u66F2\u76EE\u540D\u79F0",readonly:!0,modelValue:(a=u.value)==null?void 0:a.musicSheetName},null),e(I,{label:"\u66F2\u8C31\u68C0\u67E5",readonly:!0,isLink:!0,modelValue:"\u7ACB\u5373\u67E5\u770B",onClick:()=>{var n;return J({id:(n=u.value)==null?void 0:n.musicSheetId},void 0,{client:"teacher"})}},null),((l=u.value)==null?void 0:l.auditStatus)==="DOING"?e(B,null,[e(I,{readonly:((p=u.value)==null?void 0:p.auditStatus)!=="DOING",modelValue:d.value,"onUpdate:modelValue":n=>d.value=n,rows:"3",clearable:!0,autosize:!0,label:"\u5BA1\u6838\u7406\u7531",type:"textarea",placeholder:"\u8BF7\u8F93\u5165\u5BA1\u6838\u7406\u7531",required:((F=u.value)==null?void 0:F.auditStatus)==="DOING"},null),e("div",{style:{display:"flex"}},[e(b,{disabled:!d.value&&((k=u.value)==null?void 0:k.auditStatus)==="DOING",block:!0,type:"danger",onClick:()=>{var n;return P({musicSheetId:(n=u.value)==null?void 0:n.musicSheetId,authStatus:"UNPASS",remark:d.value})}},{default:()=>[m("\u62D2\u7EDD")]}),e(b,{disabled:!d.value&&((w=u.value)==null?void 0:w.auditStatus)==="DOING",block:!0,type:"primary",onClick:()=>{var n;return P({musicSheetId:(n=u.value)==null?void 0:n.musicSheetId,authStatus:"PASS",remark:d.value})}},{default:()=>[m("\u540C\u610F")]})])]):null]}})])}});export{ke as default};