import{u as J}from"./useTable-34acff72-1782572373740v=1.0.0.js";import{u as O}from"./useHandleData-64cc6aad-1782572373740v=1.0.0.js";import{u as U}from"./useScore-79ca4f62-1782572373740v=1.0.0.js";import{e as $}from"./scoreReleaseApi-a2bdf2d9-1782572373740v=1.0.0.js";import{u as M,a as q,w as K,_ as Q}from"./index-f6f689f9-1782572373740v=1.0.0.js";import{y as h,c as W,h as X,m as Y,al as r,z as c,I as v,J as o,u as a,k as ee,R as l,M as m,O as C}from"./vendor-866bb149-1782572373740v=1.0.0.js";import"./notData-cef8761e-1782572373740v=1.0.0.js";import"./eleVendor-48a7d3b8-1782572373740v=1.0.0.js";import"./useGetDIct-7b6bc50c-1782572373740v=1.0.0.js";import"./useGetGroupTerm-2c81d695-1782572373740v=1.0.0.js";import"./eventGroupAndTermApi-31c30359-1782572373740v=1.0.0.js";const ae=h({name:"scoreIndex"}),te=h({...ae,setup(ne){const k=M(),P=q(),S=t=>{u.value=t,_()},s=W(()=>JSON.parse(sessionStorage.getItem("eventParams")||"{}")),I=(t,e)=>{p.value[t]=e},{tableColumns:T,columns:z,dataCallBack:G,paramCallBack:x,eventGradeType:u,innerSearchParam:E}=U(s.value.eventProjectType,I),{tableData:N,pageable:i,baseParam:F,searchParam:p,totalParam:oe,pageParam:re,handleSizeChange:H,handleCurrentChange:j,getTableList:_,search:R,reset:V,loading:w}=J($,G,x);X(()=>p.value,()=>{E.value=p.value},{deep:!0});const y=(t,e=0)=>{sessionStorage.setItem("scoreReleaseAdd",JSON.stringify({id:t.eventGradeId,eventTermName:t.eventTermName,eventGroupName:t.eventGroupName,eventTermId:t.eventTermId,eventProjectId:t.eventProjectId,eventGradeId:t.eventGradeId,eventGroupId:t.eventGroupId,name:s.value.name,isDetail:e,eventProjectName:t.eventProjectName,eventGradeType:u.value})),k.push({name:"scoreReleaseAdd",query:{}})},B=async(t,e)=>{let d=e==="publish"?"\u53D1\u5E03":"\u64A4\u9500";await O(K,{bizContentId:t.eventGradeId,bizTable:"ppo_eventactivity__event_grade",field:"event_grade_status",val:e},d),_()};return Y(async()=>{s.value,F.value.eventId=s.value.id,await _()}),(t,e)=>{const d=r("el-tab-pane"),Z=r("el-tabs"),D=r("HZSearchForm"),g=r("el-link"),A=r("HZProTable"),L=r("el-pagination"),f=r("HZPageLayout");return c(),v(f,{title:a(P).meta.title},{default:o(()=>[a(s).eventProjectType!=="one"?(c(),v(Z,{key:0,modelValue:a(u),"onUpdate:modelValue":e[0]||(e[0]=n=>ee(u)?u.value=n:null),onTabChange:S,type:"card"},{default:o(()=>[l(d,{label:"\u6309\u9879\u76EE\u5F55\u5165\u6210\u7EE9",name:"much_project"}),l(d,{label:"\u6309\u7EC4\u522B\u5F55\u5165\u6210\u7EE9",name:"much_group"})]),_:1},8,["modelValue"])):m("v-if",!0),l(f,{isCard:!1},{searchForm:o(()=>[l(D,{"search-param":a(p),columns:a(z),search:a(R),reset:a(V)},null,8,["search-param","columns","search","reset"])]),pagination:o(()=>[l(L,{"current-page":a(i).page,"onUpdate:currentPage":e[1]||(e[1]=n=>a(i).page=n),"page-size":a(i).size,"onUpdate:pageSize":e[2]||(e[2]=n=>a(i).size=n),"page-sizes":[10,20,50,100],background:"",layout:"total, sizes, prev, pager, next",total:a(i).count,onSizeChange:a(H),onCurrentChange:a(j)},null,8,["current-page","page-size","total","onSizeChange","onCurrentChange"])]),dialog:o(()=>e[7]||(e[7]=[])),default:o(()=>[l(A,{columns:a(T),data:a(N),isFlex:!1,loading:a(w),showColSet:!1},{tableHeader:o(()=>e[3]||(e[3]=[])),operation:o(n=>[l(g,{type:"primary",onClick:b=>y(n.row,1)},{default:o(()=>e[4]||(e[4]=[C(" \u67E5\u770B ",-1)])),_:2,__:[4]},1032,["onClick"]),n.row.eventGradeStatus!=="publish"?(c(),v(g,{key:0,type:"primary",onClick:b=>y(n.row)},{default:o(()=>e[5]||(e[5]=[C("\u53D1\u5E03 ",-1)])),_:2,__:[5]},1032,["onClick"])):m("v-if",!0),n.row.eventGradeStatus==="publish"?(c(),v(g,{key:1,type:"primary",onClick:b=>B(n.row,"channel")},{default:o(()=>e[6]||(e[6]=[C("\u64A4\u9500 ",-1)])),_:2,__:[6]},1032,["onClick"])):m("v-if",!0),m(' <el-link type="primary" @click="handleEdit(scope.row)"> \u7F16\u8F91 </el-link> '),m(' <el-link type="danger" @click="handleDel(scope.row)"> \u5220\u9664 </el-link> ')]),_:1},8,["columns","data","loading"])]),_:1})]),_:1},8,["title"])}}});const Ce=Q(te,[["__scopeId","data-v-0a30cabe"]]);export{Ce as default};
