import{u as J}from"./useTable-cf8e962b-1782729249161v=1.0.0.js";import{u as O}from"./useHandleData-54f3fb4d-1782729249161v=1.0.0.js";import{u as U}from"./useScore-f76f71fb-1782729249161v=1.0.0.js";import{e as $}from"./scoreReleaseApi-72c5cd84-1782729249161v=1.0.0.js";import{u as M,a as q,w as K,_ as Q}from"./index-b309bf9f-1782729249161v=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-1e24e3ad-1782729249161v=1.0.0.js";import"./notData-926f7286-1782729249161v=1.0.0.js";import"./eleVendor-5008d1ec-1782729249161v=1.0.0.js";import"./useGetDIct-806ef814-1782729249161v=1.0.0.js";import"./useGetGroupTerm-aa499933-1782729249161v=1.0.0.js";import"./eventGroupAndTermApi-7b02c2ee-1782729249161v=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};
