1 |
- import{d as R,r as _,p as Y,x as Z,a3 as j,o as S,c as B,f as r,A as e,a,k as U,C as G,D as v,a1 as N,F as H,U as K,_ as L,J as Q,V as T,aZ as W,Y as X,__tla as $}from"./index-a9d538d5.js";import{_ as aa,__tla as ta}from"./index.vue_vue_type_script_setup_true_lang-ca67dc77.js";import{_ as la,__tla as ra}from"./ContentWrap.vue_vue_type_script_setup_true_lang-6b7b4656.js";import{_ as ea,__tla as _a}from"./main.vue_vue_type_script_setup_true_lang-39d10875.js";import{g as oa,c as sa,u as ca,d as na,__tla as ia}from"./main-f74e18a3.js";import{s as ua,__tla as ma}from"./index-0a2436e1.js";import{N as pa,c as fa,__tla as da}from"./NewsForm-f077618c.js";import ya,{__tla as ha}from"./DraftTable-282589c5.js";import{u as va,__tla as ga}from"./useMessage-d5cbbfad.js";import{_ as wa}from"./_plugin-vue_export-helper-1b428a4d.js";import{__tla as Ia}from"./index-95ad39b3.js";import{__tla as ba}from"./el-card-0ea446a3.js";import{__tla as Sa}from"./index-8c1e8eaf.js";import{__tla as Ua}from"./main-e189a7a8.js";import{__tla as Na}from"./el-image-2dadd73e.js";import{__tla as Va}from"./el-image-viewer-2e77a3e7.js";import{__tla as ka}from"./main-63875a84.js";import{__tla as xa}from"./main.vue_vue_type_script_setup_true_lang-aca28046.js";import{__tla as Ca}from"./index-f0a5f1f0.js";import{__tla as Da}from"./formatTime-8985a9d0.js";import{__tla as Ja}from"./style.css_vue_type_style_index_0_src_true_lang-0456a07b.js";import{__tla as Pa}from"./CoverSelect-4e2c5e02.js";import{__tla as za}from"./useUpload-e4ed9474.js";let V,Fa=Promise.all([(()=>{try{return $}catch{}})(),(()=>{try{return ta}catch{}})(),(()=>{try{return ra}catch{}})(),(()=>{try{return _a}catch{}})(),(()=>{try{return ia}catch{}})(),(()=>{try{return ma}catch{}})(),(()=>{try{return da}catch{}})(),(()=>{try{return ha}catch{}})(),(()=>{try{return ga}catch{}})(),(()=>{try{return Ia}catch{}})(),(()=>{try{return ba}catch{}})(),(()=>{try{return Sa}catch{}})(),(()=>{try{return Ua}catch{}})(),(()=>{try{return Na}catch{}})(),(()=>{try{return Va}catch{}})(),(()=>{try{return ka}catch{}})(),(()=>{try{return xa}catch{}})(),(()=>{try{return Ca}catch{}})(),(()=>{try{return Da}catch{}})(),(()=>{try{return Ja}catch{}})(),(()=>{try{return Pa}catch{}})(),(()=>{try{return za}catch{}})()]).then(async()=>{V=wa(R({name:"MpDraft",__name:"index",setup(Ea){const c=va(),o=_(-1);Y("accountId",o);const d=_(!0),g=_([]),w=_(0),n=Z({pageNo:1,pageSize:10,accountId:o}),i=_(!1),u=_([]),I=_(""),m=_(!0),y=_(!1),k=l=>{o.value=l,n.pageNo=1,p()},x=async l=>{try{await c.confirm("\u4FEE\u6539\u5185\u5BB9\u53EF\u80FD\u8FD8\u672A\u4FDD\u5B58\uFF0C\u786E\u5B9A\u5173\u95ED\u5417?"),l()}catch{}},p=async()=>{d.value=!0;try{const l=await oa(n);l.list.forEach(t=>{t.content.newsItem.forEach(f=>{f.picUrl=f.thumbUrl})}),g.value=l.list,w.value=l.total}finally{d.value=!1}},C=()=>{m.value=!0,u.value=[fa()],i.value=!0},D=l=>{I.value=l.mediaId,u.value=JSON.parse(JSON.stringify(l.content.newsItem)),m.value=!1,i.value=!0},J=async()=>{y.value=!0;try{m.value?(await sa(o.value,u.value),c.notifySuccess("\u65B0\u589E\u6210\u529F")):(await ca(o.value,I.value,u.value),c.notifySuccess("\u66F4\u65B0\u6210\u529F"))}finally{i.value=!1,y.value=!1,await p()}},P=async l=>{const t=l.mediaId;try{await c.confirm("\u4F60\u6B63\u5728\u901A\u8FC7\u53D1\u5E03\u7684\u65B9\u5F0F\u53D1\u8868\u5185\u5BB9\u3002 \u53D1\u5E03\u4E0D\u5360\u7528\u7FA4\u53D1\u6B21\u6570\uFF0C\u4E00\u5929\u53EF\u591A\u6B21\u53D1\u5E03\u3002\u5DF2\u53D1\u5E03\u5185\u5BB9\u4E0D\u4F1A\u63A8\u9001\u7ED9\u7528\u6237\uFF0C\u4E5F\u4E0D\u4F1A\u5C55\u793A\u5728\u516C\u4F17\u53F7\u4E3B\u9875\u4E2D\u3002 \u53D1\u5E03\u540E\uFF0C\u4F60\u53EF\u4EE5\u524D\u5F80\u53D1\u8868\u8BB0\u5F55\u83B7\u53D6\u94FE\u63A5\uFF0C\u4E5F\u53EF\u4EE5\u5C06\u53D1\u5E03\u5185\u5BB9\u6DFB\u52A0\u5230\u81EA\u5B9A\u4E49\u83DC\u5355\u3001\u81EA\u52A8\u56DE\u590D\u3001\u8BDD\u9898\u548C\u9875\u9762\u6A21\u677F\u4E2D\u3002"),await ua(o.value,t),c.notifySuccess("\u53D1\u5E03\u6210\u529F"),await p()}catch{}},z=async l=>{const t=l.mediaId;try{await c.confirm("\u6B64\u64CD\u4F5C\u5C06\u6C38\u4E45\u5220\u9664\u8BE5\u8349\u7A3F, \u662F\u5426\u7EE7\u7EED?"),await na(o.value,t),c.notifySuccess("\u5220\u9664\u6210\u529F"),await p()}catch{}};return(l,t)=>{const f=K,F=L,h=Q,E=T,b=la,O=aa,q=W,A=j("hasPermi"),M=X;return S(),B(H,null,[r(b,null,{default:e(()=>[r(E,{class:"-mb-15px",model:a(n),ref:"queryFormRef",inline:!0,"label-width":"68px"},{default:e(()=>[r(f,{label:"\u516C\u4F17\u53F7",prop:"accountId"},{default:e(()=>[r(a(ea),{onChange:k})]),_:1}),r(f,null,{default:e(()=>[U((S(),G(h,{type:"primary",plain:"",onClick:C,disabled:a(o)===0},{default:e(()=>[r(F,{icon:"ep:plus"}),v("\u65B0\u589E ")]),_:1},8,["disabled"])),[[A,["mp:draft:create"]]])]),_:1})]),_:1},8,["model"])]),_:1}),r(b,null,{default:e(()=>[r(a(ya),{loading:a(d),list:a(g),onUpdate:D,onDelete:z,onPublish:P},null,8,["loading","list"]),r(O,{total:a(w),page:a(n).pageNo,"onUpdate:page":t[0]||(t[0]=s=>a(n).pageNo=s),limit:a(n).pageSize,"onUpdate:limit":t[1]||(t[1]=s=>a(n).pageSize=s),onPagination:p},null,8,["total","page","limit"])]),_:1}),r(q,{title:a(m)?"\u65B0\u5EFA\u56FE\u6587":"\u4FEE\u6539\u56FE\u6587",width:"80%",modelValue:a(i),"onUpdate:modelValue":t[4]||(t[4]=s=>N(i)?i.value=s:null),"before-close":x,"destroy-on-close":""},{footer:e(()=>[r(h,{onClick:t[3]||(t[3]=s=>i.value=!1)},{default:e(()=>[v("\u53D6 \u6D88")]),_:1}),r(h,{type:"primary",onClick:J},{default:e(()=>[v("\u63D0 \u4EA4")]),_:1})]),default:e(()=>[U(r(a(pa),{modelValue:a(u),"onUpdate:modelValue":t[2]||(t[2]=s=>N(u)?u.value=s:null),"is-creating":a(m)},null,8,["modelValue","is-creating"]),[[M,a(y)]])]),_:1},8,["title","modelValue"])],64)}}}),[["__scopeId","data-v-c1e8287e"]])});export{Fa as __tla,V as default};
|