import{u as q}from"./useTable-34acff72-1782572373740v=1.0.0.js";import{u as T}from"./useHandleData-64cc6aad-1782572373740v=1.0.0.js";import{b as K,u as M,a as U,w as J,_ as O}from"./index-f6f689f9-1782572373740v=1.0.0.js";import{r as h,y as x,m as Q,al as s,z as C,I as E,J as a,R as o,u as t,O as u,M as w,A as j,Q as G}from"./vendor-866bb149-1782572373740v=1.0.0.js";import{g as W,d as X}from"./eventTypeApi-155a5531-1782572373740v=1.0.0.js";import"./notData-cef8761e-1782572373740v=1.0.0.js";import"./eleVendor-48a7d3b8-1782572373740v=1.0.0.js";const Y=()=>{const c=K(),i=h([{prop:"status",label:"\u72B6\u6001",search:{el:"select",placeholder:"\u8BF7\u9009\u62E9\u72B6\u6001"},enum:[{label:"\u542F\u7528",value:1},{label:"\u7981\u7528",value:0}]},{prop:"name",label:"\u641C\u7D22",search:{el:"input",placeholder:"\u8BF7\u8F93\u5165\u8D5B\u4E8B\u7C7B\u578B\u540D\u79F0"}},{prop:"eventClassification",label:"\u8D5B\u4E8B\u5206\u7C7B",search:{el:"select",placeholder:"\u8BF7\u9009\u62E9\u8D5B\u4E8B\u5206\u7C7B"},enum:c.getEnumListByKey("eventClassification")}]),_=h([{type:"index",label:"\u5E8F\u53F7",width:70,fixed:"left"},{label:"\u8D5B\u4E8B\u5206\u7C7B",prop:"eventClassification",enum:c.getEnumListByKey("eventClassification"),isFilterEnum:!0},{label:"\u8D5B\u4E8B\u7C7B\u578B\u540D\u79F0",prop:"name"},{label:"\u7C7B\u578B\u6807\u7B7E",prop:"tags"},{label:"\u53D1\u8D77\u65B9",prop:"roleNames"},{label:"\u72B6\u6001",prop:"status",enum:[{label:"\u542F\u7528",value:1},{label:"\u505C\u7528",value:0}],isFilterEnum:!0},{label:"\u6700\u540E\u4FEE\u6539\u65F6\u95F4",prop:"updateTime"},{label:"\u4FEE\u6539\u4EBA",prop:"updater"},{label:"\u64CD\u4F5C",prop:"operation",fixed:"right",width:200}]);return{columns:i,tableColumns:_,dataCallBack:r=>(r.listData.forEach(f=>{}),r),paramCallBack:r=>r}},ee=Y,te=x({name:"eventTypeIndex"}),ae=x({...te,setup(c){const i=M(),_=U(),{tableColumns:v,columns:b,dataCallBack:r,paramCallBack:f}=ee(),{tableData:B,pageable:p,baseParam:ne,searchParam:z,totalParam:le,pageParam:oe,handleSizeChange:F,handleCurrentChange:P,getTableList:g,search:S,reset:H,loading:I}=q(W,r,f),k=async(l,e)=>{let y=e===1?"\u542F\u7528":"\u7981\u7528";await T(J,{bizContentId:l.eventTypeId,bizTable:"ppo_eventactivity__event_type",field:"status",val:e},y),g()},D=()=>{i.push({name:"eventTypeAdd"})},L=l=>{i.push({name:"eventTypeDetail",query:{id:l.eventTypeId}})},Z=l=>{i.push({name:"eventTypeEdit",query:{id:l.eventTypeId}})},$=async l=>{let e="\u5220\u9664\u5F53\u524D\u6570\u636E";await T(X,{id:l.eventTypeId},e),g()};return Q(async()=>{await g()}),(l,e)=>{const y=s("HZSearchForm"),V=s("el-button"),d=s("el-link"),N=s("HZProTable"),A=s("el-pagination"),R=s("HZPageLayout");return C(),E(R,{title:t(_).meta.title},{searchForm:a(()=>[o(y,{"search-param":t(z),columns:t(b),search:t(S),reset:t(H)},null,8,["search-param","columns","search","reset"])]),pagination:a(()=>[o(A,{"current-page":t(p).page,"onUpdate:currentPage":e[0]||(e[0]=n=>t(p).page=n),"page-size":t(p).size,"onUpdate:pageSize":e[1]||(e[1]=n=>t(p).size=n),"page-sizes":[10,20,50,100],background:"",layout:"total, sizes, prev, pager, next",total:t(p).count,onSizeChange:t(F),onCurrentChange:t(P)},null,8,["current-page","page-size","total","onSizeChange","onCurrentChange"])]),dialog:a(()=>e[9]||(e[9]=[])),default:a(()=>[o(N,{columns:t(v),data:t(B),isFlex:!1,loading:t(I)},{tableHeader:a(()=>e[2]||(e[2]=[])),toolButton:a(()=>[o(V,{type:"primary",onClick:D},{default:a(()=>e[3]||(e[3]=[u(" \u65B0\u589E ",-1)])),_:1,__:[3]})]),operation:a(n=>[o(d,{type:"primary",onClick:m=>L(n.row)},{default:a(()=>e[4]||(e[4]=[u(" \u67E5\u770B ",-1)])),_:2,__:[4]},1032,["onClick"]),n.row.status==1?(C(),E(d,{key:0,onClick:m=>k(n.row,0),type:"danger"},{default:a(()=>e[5]||(e[5]=[u(" \u7981\u7528 ",-1)])),_:2,__:[5]},1032,["onClick"])):w("v-if",!0),n.row.status==0?(C(),j(G,{key:1},[o(d,{onClick:m=>k(n.row,1),type:"primary"},{default:a(()=>e[6]||(e[6]=[u("\u542F\u7528",-1)])),_:2,__:[6]},1032,["onClick"]),o(d,{type:"primary",onClick:m=>Z(n.row)},{default:a(()=>e[7]||(e[7]=[u(" \u7F16\u8F91 ",-1)])),_:2,__:[7]},1032,["onClick"]),o(d,{type:"danger",onClick:m=>$(n.row)},{default:a(()=>e[8]||(e[8]=[u(" \u5220\u9664 ",-1)])),_:2,__:[8]},1032,["onClick"])],64)):w("v-if",!0)]),_:1},8,["columns","data","loading"])]),_:1},8,["title"])}}});const ce=O(ae,[["__scopeId","data-v-b6588cde"]]);export{ce as default};
