1 |
- import{az as I,d as ea,r as N,x as la,b as ia,o as r,c as p,k as S,a as t,F as J,Q as K,B as Q,E as ra,f as e,A as d,D as U,C as X,a2 as Y,_ as na,J as oa,K as ca,W as sa,X as pa,Y as da,__tla as ma}from"./index-1f518666.js";import{_ as ua,__tla as _a}from"./index.vue_vue_type_script_setup_true_lang-cf2a6735.js";import ga,{__tla as fa}from"./main-dc7513d8.js";import ya,{__tla as wa}from"./main-6c366489.js";import{_ as ha,__tla as va}from"./main.vue_vue_type_script_setup_true_lang-9e9d0fbc.js";import{g as ba,__tla as ka}from"./index-c117fbd5.js";import{g as Ia,__tla as Sa}from"./index-91b90d90.js";import{d as q,__tla as Ua}from"./formatTime-a4909bb5.js";import{_ as za}from"./_plugin-vue_export-helper-1b428a4d.js";let P,L,R,C,V,Z,Na=Promise.all([(()=>{try{return ma}catch{}})(),(()=>{try{return _a}catch{}})(),(()=>{try{return fa}catch{}})(),(()=>{try{return wa}catch{}})(),(()=>{try{return va}catch{}})(),(()=>{try{return ka}catch{}})(),(()=>{try{return Sa}catch{}})(),(()=>{try{return Ua}catch{}})()]).then(async()=>{var y=(n=>(n.Draft="2",n.Published="1",n))(y||{});let x,T,E,D,W,j,B,M,O,A;C=n=>I.get({url:"/mp/draft/page",params:n}),L=(n,u)=>I.post({url:"/mp/draft/create?accountId="+n,data:{articles:u}}),Z=(n,u,c)=>I.put({url:"/mp/draft/update?accountId="+n+"&mediaId="+u,method:"put",data:c}),R=(n,u)=>I.delete({url:"/mp/draft/delete?accountId="+n+"&mediaId="+u}),x={class:"pb-30px"},T={key:0},E={class:"waterfall"},D=["src"],W={class:"item-name"},j={key:1},B={key:2},M={key:3},O={class:"waterfall"},A={key:0},P=za(ea({name:"WxMaterialSelect",__name:"main",props:{type:{},accountId:{},newsType:{default:y.Published}},emits:["select-material"],setup(n,{emit:u}){const c=n,$=u,f=N(!1),_=N(0),g=N([]),i=la({pageNo:1,pageSize:10,accountId:c.accountId}),w=o=>{$("select-material",o)},F=async()=>{f.value=!0;try{c.type==="news"&&c.newsType===y.Published?await aa():c.type==="news"&&c.newsType===y.Draft?await ta():await h()}finally{f.value=!1}},h=async()=>{const o=await ba({...i,type:c.type});g.value=o.list,_.value=o.total},aa=async()=>{const o=await Ia(i);o.list.forEach(l=>{l.content.newsItem.forEach(m=>{m.picUrl=m.thumbUrl})}),g.value=o.list,_.value=o.total},ta=async()=>{const o=await C(i);o.list.forEach(l=>{l.content.newsItem.forEach(m=>{m.picUrl=m.thumbUrl})}),g.value=o.list,_.value=o.total};return ia(async()=>{F()}),(o,l)=>{const m=na,v=oa,G=ca,b=ua,s=sa,H=pa,k=da;return r(),p("div",x,[c.type==="image"?(r(),p("div",T,[S((r(),p("div",E,[(r(!0),p(J,null,K(t(g),a=>(r(),p("div",{class:"waterfall-item",key:a.mediaId},[Q("img",{class:"material-img",src:a.url},null,8,D),Q("p",W,ra(a.name),1),e(G,{class:"ope-row"},{default:d(()=>[e(v,{type:"success",onClick:z=>w(a)},{default:d(()=>[U(" \u9009\u62E9 "),e(m,{icon:"ep:circle-check"})]),_:2},1032,["onClick"])]),_:2},1024)]))),128))])),[[k,t(f)]]),e(b,{total:t(_),page:t(i).pageNo,"onUpdate:page":l[0]||(l[0]=a=>t(i).pageNo=a),limit:t(i).pageSize,"onUpdate:limit":l[1]||(l[1]=a=>t(i).pageSize=a),onPagination:h},null,8,["total","page","limit"])])):c.type==="voice"?(r(),p("div",j,[S((r(),X(H,{data:t(g)},{default:d(()=>[e(s,{label:"\u7F16\u53F7",align:"center",prop:"mediaId"}),e(s,{label:"\u6587\u4EF6\u540D",align:"center",prop:"name"}),e(s,{label:"\u8BED\u97F3",align:"center"},{default:d(a=>[e(t(ya),{url:a.row.url},null,8,["url"])]),_:1}),e(s,{label:"\u4E0A\u4F20\u65F6\u95F4",align:"center",prop:"createTime",width:"180",formatter:t(q)},null,8,["formatter"]),e(s,{label:"\u64CD\u4F5C",align:"center",fixed:"right"},{default:d(a=>[e(v,{type:"primary",link:"",onClick:z=>w(a.row)},{default:d(()=>[U("\u9009\u62E9 "),e(m,{icon:"ep:plus"})]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])),[[k,t(f)]]),e(b,{total:t(_),page:t(i).pageNo,"onUpdate:page":l[2]||(l[2]=a=>t(i).pageNo=a),limit:t(i).pageSize,"onUpdate:limit":l[3]||(l[3]=a=>t(i).pageSize=a),onPagination:F},null,8,["total","page","limit"])])):c.type==="video"?(r(),p("div",B,[S((r(),X(H,{data:t(g)},{default:d(()=>[e(s,{label:"\u7F16\u53F7",align:"center",prop:"mediaId"}),e(s,{label:"\u6587\u4EF6\u540D",align:"center",prop:"name"}),e(s,{label:"\u6807\u9898",align:"center",prop:"title"}),e(s,{label:"\u4ECB\u7ECD",align:"center",prop:"introduction"}),e(s,{label:"\u89C6\u9891",align:"center"},{default:d(a=>[e(t(ha),{url:a.row.url},null,8,["url"])]),_:1}),e(s,{label:"\u4E0A\u4F20\u65F6\u95F4",align:"center",prop:"createTime",width:"180",formatter:t(q)},null,8,["formatter"]),e(s,{label:"\u64CD\u4F5C",align:"center",fixed:"right","class-name":"small-padding fixed-width"},{default:d(a=>[e(v,{type:"primary",link:"",onClick:z=>w(a.row)},{default:d(()=>[U("\u9009\u62E9 "),e(m,{icon:"akar-icons:circle-plus"})]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])),[[k,t(f)]]),e(b,{total:t(_),page:t(i).pageNo,"onUpdate:page":l[4]||(l[4]=a=>t(i).pageNo=a),limit:t(i).pageSize,"onUpdate:limit":l[5]||(l[5]=a=>t(i).pageSize=a),onPagination:h},null,8,["total","page","limit"])])):c.type==="news"?(r(),p("div",M,[S((r(),p("div",O,[(r(!0),p(J,null,K(t(g),a=>(r(),p("div",{class:"waterfall-item",key:a.mediaId},[a.content&&a.content.newsItem?(r(),p("div",A,[e(t(ga),{articles:a.content.newsItem},null,8,["articles"]),e(G,{class:"ope-row"},{default:d(()=>[e(v,{type:"success",onClick:z=>w(a)},{default:d(()=>[U(" \u9009\u62E9 "),e(m,{icon:"ep:circle-check"})]),_:2},1032,["onClick"])]),_:2},1024)])):Y("",!0)]))),128))])),[[k,t(f)]]),e(b,{total:t(_),page:t(i).pageNo,"onUpdate:page":l[6]||(l[6]=a=>t(i).pageNo=a),limit:t(i).pageSize,"onUpdate:limit":l[7]||(l[7]=a=>t(i).pageSize=a),onPagination:h},null,8,["total","page","limit"])])):Y("",!0)])}}}),[["__scopeId","data-v-2341c1e4"]]),V=Object.freeze(Object.defineProperty({__proto__:null,default:P},Symbol.toStringTag,{value:"Module"}))});export{P as W,Na as __tla,L as c,R as d,C as g,V as m,Z as u};
|