list.b7e0c0ef.js 5.3 KB

1
  1. import{d as O,j as e,A as m,B as b,P as V,Q as G,S as R,U as r,C as q,aS as U,F as B,y as E,T as j}from"./ResizeObserver.es.b7226882.js";import{L as x}from"./index.9fec2202.js";import"./index.40f703b6.js";import{F as I}from"./index.021f1c7b.js";import{S as H}from"./index.521acd0b.js";import{I as M}from"./index.20c0f4c5.js";import{c as K}from"./index.926ca9c5.js";import{g as Q,m as W}from"./music.e5884c70.js";import{C as J}from"./index.969bba7f.js";import{T as X}from"./index.1743594f.js";import"./use-tab-status.db1f6d2e.js";import"./use-id.5d5e6e63.js";import"./index.1eaf642c.js";var Y="./assets/music-icon.fd0e8ce9.png";const Z="_item_18izn_1",$="_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",re="_user_18izn_78",ie="_userIcon_18izn_84",ce="_favorite_18izn_92",de="_tags_18izn_95";var i={item:Z,header:$,mate:ee,icon:ae,info:te,btn:se,vip:ue,free:le,charge:oe,footer:ne,user:re,userIcon:ie,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:i.item,onClick:()=>{t==null||t(o)}},[e("header",{class:i.header},[e("div",{class:i.mate},[e(M,{src:Y,round:!0,class:i.icon},null),e("div",{class:i.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:i.buttons},[e(b,{class:K(i.btn,i[h])},{default:()=>[me[h.toLocaleUpperCase()]]})])])])}}});const fe=()=>{};var we=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",Q());const _=V();G();const z={},A=_.query;A.version&&(z.version=A.version||"");const c=R({search:_.query.search||"",musicTagIds:_.query.tagids||"",page:1,...z,...o}),s=r(null),v=r(!1),D=r(!1),S=r(!1),T=r(!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){const 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(),T.value=!1}});const d=r(""),u=r(null),f=r(!1),P=async a=>{try{await E.post("/api-admin/music/sheet/audit",{data:a}),j.success("\u63D0\u4EA4\u6210\u529F"),f.value=!1,d.value="",g(c.search)}catch{}};return()=>e(B,null,[e(x,{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(X,null,{default:()=>[e(J,{border:!1},null),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",round:!0},{default:()=>{var a,l,p,F,w,k;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 W({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&&((w=u.value)==null?void 0:w.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&&((k=u.value)==null?void 0:k.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{we as default};