TabVoice-bab68bae.js 3.7 KB

1
  1. import{d as B,co as E,b as H,r as V,f as J,o as n,c as w,a as r,g as I,t as R,i as a,w as l,l as S,j as g,y as F,s as O,v as P,J as W,cu as X,E as G,bo as K,ac as L,ad as N,_ as Q,__tla as Y}from"./index-b2b3c6c4.js";import{W as Z,__tla as $}from"./main-2c41dec3.js";import aa,{__tla as ta}from"./main-a3bf7529.js";import{u as ea,U as la,__tla as ra}from"./useUpload-fb27bbcc.js";import{u as sa,__tla as oa}from"./useMessage-a5edbb0f.js";import{__tla as _a}from"./index-341fc94c.js";import{__tla as ca}from"./index-2d76a87c.js";import{__tla as ua}from"./main-9ec062cd.js";import{__tla as ia}from"./el-image-d434829d.js";import{__tla as na}from"./el-image-viewer-b5664270.js";import{__tla as ma}from"./main-5cbc3cda.js";import{__tla as da}from"./index-23a6a8c6.js";import{__tla as pa}from"./index-9fa58f2e.js";import{__tla as fa}from"./formatTime-7e07ce72.js";let k,ya=Promise.all([(()=>{try{return Y}catch{}})(),(()=>{try{return $}catch{}})(),(()=>{try{return ta}catch{}})(),(()=>{try{return ra}catch{}})(),(()=>{try{return oa}catch{}})(),(()=>{try{return _a}catch{}})(),(()=>{try{return ca}catch{}})(),(()=>{try{return ua}catch{}})(),(()=>{try{return ia}catch{}})(),(()=>{try{return na}catch{}})(),(()=>{try{return ma}catch{}})(),(()=>{try{return da}catch{}})(),(()=>{try{return pa}catch{}})(),(()=>{try{return fa}catch{}})()]).then(async()=>{let m,d,p;m={key:0,class:"select-item2"},d={class:"item-name"},p=(s=>(L("data-v-17bdaa79"),s=s(),N(),s))(()=>I("div",{class:"el-upload__tip"}," \u683C\u5F0F\u652F\u6301 mp3/wma/wav/amr\uFF0C\u6587\u4EF6\u5927\u5C0F\u4E0D\u8D85\u8FC7 2M\uFF0C\u64AD\u653E\u957F\u5EA6\u4E0D\u8D85\u8FC7 60s ",-1)),k=Q(B({__name:"TabVoice",props:{modelValue:{type:Object,required:!0}},emits:["update:modelValue"],setup(s,{emit:x}){const j=sa(),z={Authorization:"Bearer "+E()},C=s,D=x,e=H({get:()=>C.modelValue,set:t=>D("update:modelValue",t)}),o=V(!1),f=V([]),c=J({accountId:e.value.accountId,type:"voice",title:"",introduction:""}),M=t=>ea(la.Voice,10)(t),T=t=>{if(t.code!==0)return j.error("\u4E0A\u4F20\u51FA\u9519\uFF1A"+t.msg),!1;f.value=[],c.title="",c.introduction="",y(t.data)},U=()=>{e.value.mediaId=null,e.value.url=null,e.value.name=null},y=t=>{o.value=!1,e.value.mediaId=t.mediaId,e.value.url=t.url,e.value.name=t.name};return(t,_)=>{const u=O,v=P,i=W,q=X,h=G,A=K;return n(),w("div",null,[r(e).url?(n(),w("div",m,[I("p",d,R(r(e).name),1),a(u,{class:"ope-row",justify:"center"},{default:l(()=>[a(r(aa),{url:r(e).url},null,8,["url"])]),_:1}),a(u,{class:"ope-row",justify:"center"},{default:l(()=>[a(i,{type:"danger",circle:"",onClick:U},{default:l(()=>[a(v,{icon:"ep:delete"})]),_:1})]),_:1})])):(n(),S(u,{key:1,style:{"text-align":"center"}},{default:l(()=>[a(h,{span:12,class:"col-select"},{default:l(()=>[a(i,{type:"success",onClick:_[0]||(_[0]=b=>o.value=!0)},{default:l(()=>[g(" \u7D20\u6750\u5E93\u9009\u62E9"),a(v,{icon:"ep:circle-check"})]),_:1}),a(q,{title:"\u9009\u62E9\u8BED\u97F3",modelValue:r(o),"onUpdate:modelValue":_[1]||(_[1]=b=>F(o)?o.value=b:null),width:"90%","append-to-body":"","destroy-on-close":""},{default:l(()=>[a(r(Z),{type:"voice","account-id":r(e).accountId,onSelectMaterial:y},null,8,["account-id"])]),_:1},8,["modelValue"])]),_:1}),a(h,{span:12,class:"col-add"},{default:l(()=>[a(A,{action:"/dev-api/admin-api/mp/material/upload-temporary",headers:z,multiple:"",limit:1,"file-list":r(f),data:r(c),"before-upload":M,"on-success":T},{tip:l(()=>[p]),default:l(()=>[a(i,{type:"primary"},{default:l(()=>[g("\u70B9\u51FB\u4E0A\u4F20")]),_:1})]),_:1},8,["file-list","data"])]),_:1})]),_:1}))])}}}),[["__scopeId","data-v-17bdaa79"],["__file","/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-admin/src/views/mp/components/wx-reply/components/TabVoice.vue"]])});export{ya as __tla,k as default};