index-e77f6914.js 5.6 KB

1
  1. import{d as H,r as _,aV as M,e as Q,Q as X,o as S,c as j,f as r,w as e,a,x as U,v as B,n as v,O as N,F as G,A as K,j as L,C as T,D as W,b0 as $,I as Y,_ as Z,__tla as aa}from"./index-11e4820e.js";import{_ as ta,__tla as la}from"./index-c8f58bd0.js";import{_ as ra,__tla as ea}from"./ContentWrap-694014d4.js";import _a,{__tla as oa}from"./main-4d7fe365.js";import{g as sa,c as ca,u as na,d as ia,__tla as ua}from"./main-6c876e45.js";import{s as ma,__tla as pa}from"./index-9f4abd5e.js";import{N as fa,c as da,__tla as ya}from"./NewsForm-c4e5fd80.js";import ha,{__tla as va}from"./DraftTable-7c721be3.js";import{u as ga,__tla as wa}from"./useMessage-06ddf735.js";import{__tla as ba}from"./index-dd73c59d.js";import{__tla as Ia}from"./ContentWrap.vue_vue_type_script_setup_true_lang-11f85821.js";import{__tla as Sa}from"./el-card-919c14be.js";import{__tla as Ua}from"./index-413a299f.js";import{__tla as Na}from"./main-811efd88.js";import{__tla as Va}from"./el-image-17e8bc54.js";import{__tla as xa}from"./el-image-viewer-c4f5814f.js";import{__tla as Ca}from"./main-5f2e1efb.js";import{__tla as ka}from"./main-12949ceb.js";import{__tla as za}from"./index-68e6267b.js";import{__tla as Da}from"./formatTime-f6a2c881.js";import{__tla as Pa}from"./Editor-0f5cadc2.js";import{__tla as Fa}from"./CoverSelect-1b7d9a9e.js";import{__tla as Oa}from"./useUpload-7eca9e2f.js";let V,Ea=Promise.all([(()=>{try{return aa}catch{}})(),(()=>{try{return la}catch{}})(),(()=>{try{return ea}catch{}})(),(()=>{try{return oa}catch{}})(),(()=>{try{return ua}catch{}})(),(()=>{try{return pa}catch{}})(),(()=>{try{return ya}catch{}})(),(()=>{try{return va}catch{}})(),(()=>{try{return wa}catch{}})(),(()=>{try{return ba}catch{}})(),(()=>{try{return Ia}catch{}})(),(()=>{try{return Sa}catch{}})(),(()=>{try{return Ua}catch{}})(),(()=>{try{return Na}catch{}})(),(()=>{try{return Va}catch{}})(),(()=>{try{return xa}catch{}})(),(()=>{try{return Ca}catch{}})(),(()=>{try{return ka}catch{}})(),(()=>{try{return za}catch{}})(),(()=>{try{return Da}catch{}})(),(()=>{try{return Pa}catch{}})(),(()=>{try{return Fa}catch{}})(),(()=>{try{return Oa}catch{}})()]).then(async()=>{V=Z(H({name:"MpDraft",__name:"index",setup(Ja){const c=ga(),o=_(-1);M("accountId",o);const d=_(!0),g=_([]),w=_(0),n=Q({pageNo:1,pageSize:10,accountId:o}),i=_(!1),u=_([]),b=_(""),m=_(!0),y=_(!1),x=l=>{o.value=l,n.pageNo=1,p()},C=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 sa(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}},k=()=>{m.value=!0,u.value=[da()],i.value=!0},z=l=>{b.value=l.mediaId,u.value=JSON.parse(JSON.stringify(l.content.newsItem)),m.value=!1,i.value=!0},D=async()=>{y.value=!0;try{m.value?(await ca(o.value,u.value),c.notifySuccess("\u65B0\u589E\u6210\u529F")):(await na(o.value,b.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 ma(o.value,t),c.notifySuccess("\u53D1\u5E03\u6210\u529F"),await p()}catch{}},F=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 ia(o.value,t),c.notifySuccess("\u5220\u9664\u6210\u529F"),await p()}catch{}};return(l,t)=>{const f=K,O=L,h=T,E=W,I=ra,J=ta,R=$,q=X("hasPermi"),A=Y;return S(),j(G,null,[r(I,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(_a),{onChange:x})]),_:1}),r(f,null,{default:e(()=>[U((S(),B(h,{type:"primary",plain:"",onClick:k,disabled:a(o)===0},{default:e(()=>[r(O,{icon:"ep:plus"}),v("\u65B0\u589E ")]),_:1},8,["disabled"])),[[q,["mp:draft:create"]]])]),_:1})]),_:1},8,["model"])]),_:1}),r(I,null,{default:e(()=>[r(a(ha),{loading:a(d),list:a(g),onUpdate:z,onDelete:F,onPublish:P},null,8,["loading","list"]),r(J,{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(R,{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":C,"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:D},{default:e(()=>[v("\u63D0 \u4EA4")]),_:1})]),default:e(()=>[U(r(a(fa),{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"]),[[A,a(y)]])]),_:1},8,["title","modelValue"])],64)}}}),[["__scopeId","data-v-df550c3e"],["__file","/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-admin/src/views/mp/draft/index.vue"]])});export{Ea as __tla,V as default};