import{u as R}from"./useTable-34acff72-1782572373740v=1.0.0.js";import{u as B}from"./useHandleData-64cc6aad-1782572373740v=1.0.0.js";import{b as K,u as M,a as U,w as J,_ as Q}from"./index-f6f689f9-1782572373740v=1.0.0.js";import{r as m,y as x,m as j,al as r,z as b,I as w,J as a,R as i,u as e,O as u,A as G,Q as W,M as E}from"./vendor-866bb149-1782572373740v=1.0.0.js";import{b as X,d as Y}from"./activityStyleApi-8db7ffaf-1782572373740v=1.0.0.js";import"./notData-cef8761e-1782572373740v=1.0.0.js";import"./eleVendor-48a7d3b8-1782572373740v=1.0.0.js";const tt=()=>{const y=K();m([]),(async()=>{})(),m([]),(async()=>{})();const g=m([{prop:"title",label:"\u6807\u9898",search:{el:"input",placeholder:"\u8BF7\u8F93\u5165\u8D5B\u4E8B\u98CE\u91C7\u6807\u9898"}},{prop:"activityStatus",label:"\u72B6\u6001",isFilterEnum:!0,enum:y.getEnumListByKey("activityStatus"),search:{el:"select",placeholder:"\u8BF7\u9009\u62E9\u72B6\u6001"}}]),_=m([{type:"index",label:"\u5E8F\u53F7",width:70,fixed:"left"},{label:"\u521B\u5EFA\u65F6\u95F4",prop:"createTime"},{label:"\u6807\u9898",prop:"title"},{label:"\u6807\u7B7E",prop:"tags"},{label:"\u72B6\u6001",prop:"activityStatus",enum:y.getEnumListByKey("activityStatus"),isFilterEnum:!0},{label:"\u64CD\u4F5C",prop:"operation",fixed:"right",width:200}]);return{columns:g,tableColumns:_,dataCallBack:l=>(l.listData.forEach(s=>{}),l),paramCallBack:l=>l}},et=tt,at=x({name:"activityStyleIndex"}),nt=x({...at,setup(y){const c=M(),S=U(),{tableColumns:g,columns:_,dataCallBack:f,paramCallBack:k}=et(),{tableData:l,pageable:s,baseParam:z,searchParam:I,totalParam:ot,pageParam:it,handleSizeChange:F,handleCurrentChange:D,getTableList:v,search:P,reset:T,loading:H}=R(X,f,k),h=async(o,t)=>{let C=t==="publish"?"\u53D1\u5E03":"\u4E0B\u67B6";await B(J,{bizContentId:o.activityId,bizTable:"ppo_eventactivity__activity",field:"activity_status",val:t},C),v()},A=()=>{c.push({name:"activityStyleAdd",query:{id:sessionStorage.getItem("eventId")}})},L=o=>{c.push({name:"activityStyleDetail",query:{id:o.activityId}})},Z=o=>{c.push({name:"activityStyleEdit",query:{id:o.activityId}})},$=async o=>{let t="\u5220\u9664\u5F53\u524D\u6570\u636E";await B(Y,{id:o.activityId},t),v()};return j(async()=>{z.value.eventId=sessionStorage.getItem("eventId"),await v()}),(o,t)=>{const C=r("HZSearchForm"),O=r("el-button"),p=r("el-link"),V=r("HZProTable"),q=r("el-pagination"),N=r("HZPageLayout");return b(),w(N,{title:e(S).meta.title},{searchForm:a(()=>[i(C,{"search-param":e(I),columns:e(_),search:e(P),reset:e(T)},null,8,["search-param","columns","search","reset"])]),pagination:a(()=>[i(q,{"current-page":e(s).page,"onUpdate:currentPage":t[0]||(t[0]=n=>e(s).page=n),"page-size":e(s).size,"onUpdate:pageSize":t[1]||(t[1]=n=>e(s).size=n),"page-sizes":[10,20,50,100],background:"",layout:"total, sizes, prev, pager, next",total:e(s).count,onSizeChange:e(F),onCurrentChange:e(D)},null,8,["current-page","page-size","total","onSizeChange","onCurrentChange"])]),dialog:a(()=>t[9]||(t[9]=[])),default:a(()=>[i(V,{columns:e(g),data:e(l),isFlex:!1,loading:e(H)},{tableHeader:a(()=>t[2]||(t[2]=[])),toolButton:a(()=>[i(O,{type:"primary",onClick:A},{default:a(()=>t[3]||(t[3]=[u(" \u65B0\u589E ",-1)])),_:1,__:[3]})]),operation:a(n=>[i(p,{type:"primary",onClick:d=>L(n.row)},{default:a(()=>t[4]||(t[4]=[u(" \u67E5\u770B ",-1)])),_:2,__:[4]},1032,["onClick"]),n.row.activityStatus!=="publish"?(b(),G(W,{key:0},[i(p,{type:"primary",onClick:d=>h(n.row,"publish")},{default:a(()=>t[5]||(t[5]=[u(" \u53D1\u5E03 ",-1)])),_:2,__:[5]},1032,["onClick"]),i(p,{type:"primary",onClick:d=>Z(n.row)},{default:a(()=>t[6]||(t[6]=[u(" \u7F16\u8F91 ",-1)])),_:2,__:[6]},1032,["onClick"]),i(p,{type:"danger",onClick:d=>$(n.row)},{default:a(()=>t[7]||(t[7]=[u(" \u5220\u9664 ",-1)])),_:2,__:[7]},1032,["onClick"])],64)):E("v-if",!0),n.row.activityStatus==="publish"?(b(),w(p,{key:1,type:"primary",onClick:d=>h(n.row,"withdraw")},{default:a(()=>t[8]||(t[8]=[u(" \u4E0B\u67B6 ",-1)])),_:2,__:[8]},1032,["onClick"])):E("v-if",!0)]),_:1},8,["columns","data","loading"])]),_:1},8,["title"])}}});const mt=Q(nt,[["__scopeId","data-v-7ae827c6"]]);export{mt as default};
