import{q as H,k as L,a as y,r as T,R as j,ak as I,b as c,M as O,o as d,c as Q,d as a,e,g as o,N as S,s as r,f as Z,t as z,aq as F,i as m,H as n,Z as G,E as b,S as k}from"./index.699f1124.js";import{e as J,d as K,u as N}from"./achievement.74d29f09.js";const W={class:"app-container"},X=n("\u53D1\u5E03\u6210\u679C"),ee=n("\u5F85\u5BA1\u6838"),te=n("\u5DF2\u53D1\u5E03"),ae=n("\u5DF2\u9A73\u56DE"),se=n("\u8349\u7A3F\u7BB1"),le=n("\u7F16\u8F91"),oe=n("\u5220\u9664"),ne=n("\u67E5\u770B\u5339\u914D\u7ED3\u679C"),ie=n("\u53D6\u6D88\u53D1\u5E03"),ce=H({name:"Achievement"}),re=Object.assign(ce,{setup(ue){const D=L(),x=y([]),h=y(!0),g=y(0),V=T({queryParams:{pageNum:1,pageSize:10,status:1}}),{queryParams:l}=j(V),_=async()=>{h.value=!0;const t=await J(l.value);x.value=t.rows,g.value=t.total,h.value=!1},q=()=>{l.value.pageNum=1,_()},w=t=>{b.confirm('\u662F\u5426\u786E\u8BA4\u5220\u9664\u6570\u636E\u7F16\u53F7\u4E3A"'+t+'"\u7684\u6210\u679C\u9879\uFF1F').then(async()=>{await K({ids:[t]}),_(),k.success("\u5220\u9664\u6210\u529F")})};function B(t){let i=t.shelfStatus==2?"\u4E0A\u67B6":"\u4E0B\u67B6";b.confirm('\u786E\u8BA4\u8981"'+i+'""'+t.id+'"\u7684\u6210\u679C\u5417?').then(async()=>{const u=t.shelfStatus==1?2:1;await N({id:t.id,shelfStatus:u}),_(),k.success(i+"\u6210\u529F")})}const E=t=>{b.confirm(`\u786E\u8BA4\u8981\u53D6\u6D88\u53D1\u5E03\u7F16\u53F7\u4E3A"${t}"\u7684\u6210\u679C\u5417?`).then(async()=>{await N({id:t,status:"3"}),k.success("\u53D6\u6D88\u53D1\u5E03\u6210\u529F"),_()})};function A(t){D.push({path:"./results",query:{keyword:t.title}})}return I(()=>{_()}),(t,i)=>{const u=c("el-button"),C=c("router-link"),M=c("el-col"),$=c("el-row"),f=c("el-radio-button"),P=c("el-radio-group"),p=c("el-table-column"),R=c("el-table"),U=c("pagination"),Y=O("loading");return d(),Q("div",W,[a($,{gutter:10,class:"mb8"},{default:e(()=>[a(M,{span:1.5},{default:e(()=>[a(C,{to:"./release"},{default:e(()=>[a(u,{type:"primary",size:"small"},{default:e(()=>[X]),_:1})]),_:1})]),_:1},8,["span"])]),_:1}),a(P,{modelValue:o(l).status,"onUpdate:modelValue":i[0]||(i[0]=s=>o(l).status=s),size:"small",onChange:q},{default:e(()=>[a(f,{label:0},{default:e(()=>[ee]),_:1}),a(f,{label:1},{default:e(()=>[te]),_:1}),a(f,{label:2},{default:e(()=>[ae]),_:1}),a(f,{label:3},{default:e(()=>[se]),_:1})]),_:1},8,["modelValue"]),S((d(),r(R,{data:x.value,style:{"margin-top":"20px"}},{default:e(()=>[a(p,{label:"\u6570\u636E\u7F16\u53F7",prop:"id"}),a(p,{label:"\u6210\u679C\u540D\u79F0",prop:"title"}),a(p,{label:"\u6210\u679C\u9886\u57DF",prop:"industryStr"}),a(p,{label:"\u53D1\u5E03\u65F6\u95F4",prop:"createTime",width:"180"},{default:e(({row:s})=>[Z("span",null,z(o(F)(s.createTime).format("YYYY-MM-DD HH:mm:ss")),1)]),_:1}),a(p,{label:"\u64CD\u4F5C","class-name":"small-padding fixed-width"},{default:e(({row:s})=>[o(l).status==3?(d(),r(C,{key:0,to:{path:"./release",query:{id:s.id}}},{default:e(()=>[a(u,{size:"small",type:"text",icon:"Edit"},{default:e(()=>[le]),_:1})]),_:2},1032,["to"])):m("",!0),o(l).status==1?(d(),r(u,{key:1,size:"small",type:"text",icon:s.shelfStatus==1?"Download":"Upload",onClick:v=>B(s)},{default:e(()=>[n(z(s.shelfStatus==1?"\u4E0B\u67B6":"\u4E0A\u67B6"),1)]),_:2},1032,["icon","onClick"])):m("",!0),o(l).status!=0?(d(),r(u,{key:2,size:"small",type:"text",icon:"Delete",onClick:v=>w(s.id)},{default:e(()=>[oe]),_:2},1032,["onClick"])):m("",!0),o(l).status==1?(d(),r(u,{key:3,size:"small",type:"text",icon:"View",onClick:v=>A(s)},{default:e(()=>[ne]),_:2},1032,["onClick"])):m("",!0),o(l).status==0?(d(),r(u,{key:4,size:"small",type:"text",icon:"Close",onClick:v=>E(s.id)},{default:e(()=>[ie]),_:2},1032,["onClick"])):m("",!0)]),_:1})]),_:1},8,["data"])),[[Y,h.value]]),S(a(U,{total:g.value,page:o(l).pageNum,"onUpdate:page":i[1]||(i[1]=s=>o(l).pageNum=s),limit:o(l).pageSize,"onUpdate:limit":i[2]||(i[2]=s=>o(l).pageSize=s),onPagination:_},null,8,["total","page","limit"]),[[G,g.value>0]])])}}});export{re as default};
