import{a4 as r,ai as y,d as $,aj as C,r as u,o as v,a6 as B,a7 as a,a9 as m,a8 as l,ac as V,ao as j,ad as R,c as T,ak as g,af as S}from"./vendor.e9cda63f.js";import{F as w}from"./index.43d299e0.js";import{g as I}from"./gm.616963af.js";import{_ as L,o as k,n as M}from"./index.fdd4233a.js";import"./pagination.392a2bfd.js";const N=r(!1),n=y({server_id:0,nick_name:"",taskID:0}),U=r(19),q=r(!1),i={required:!0,message:"\u8BE5\u9879\u4E3A\u5FC5\u586B\u9879"},x=r({server_id:[i],game_url:[i],name:[i],config:[i],desc:[i]}),P=$({name:"CompleteTask",components:{Footer:w},setup(){C();const e=r(),o=r(),b="100px",F={children:"children",label:"label"},E=r(),_=()=>{I.getServerInfo().then(s=>{e.value=s.data.data,n.server_id=e.value[0].id,console.log(e.value)})},c=s=>{n.server_id=s,console.log(n)},f=()=>{if(console.log(n),n.nick_name==""){k("\u73A9\u5BB6\u6635\u79F0\u4E0D\u53EF\u4E3A\u7A7A!");return}if(n.taskID==0){k("\u4EFB\u52A1\u4E0D\u53EF\u4E3A\u7A7A!");return}const s=j.service({lock:!0,text:"\u52A0\u8F7D\u4E2D...",background:"rgba(0, 0 ,0 ,0.7)"});I.CompleteTask(n).then(d=>{d.code==200?(s.close(),M(d.message)):(s.close(),k(d.message))})},p=()=>{n.server_id=0,n.nick_name="",n.taskID=0,_()};return _(),{useI18n:C,defaultProps:F,serverForm:o,RefChild:E,radio:U,form:n,serverInfo:e,changeServerID:c,loading:q,dialogVisible:N,formRules:x,formLabelWidth:b,submitForm:f,resetForm:p}}}),W=m("br",null,null,-1),z={class:"el_form"},G={class:"select_server"},H={class:"submit_style"},J=g("\u63D0\u4EA4"),K=g("\u91CD\u7F6E");function O(e,o,b,F,E,_){const c=u("el-alert"),f=u("el-radio"),p=u("el-radio-group"),s=u("el-form-item"),d=u("el-input"),A=u("el-button"),h=u("el-form");return v(),B(V,null,[a(c,{title:"\u5B8C\u6210\u5355\u4E2A\u4EFB\u52A1",type:"info"}),W,m("div",z,[a(h,{ref:"ruleFormRef",model:e.form,"label-width":"120px",style:{"max-width":"560px"}},{default:l(()=>[a(s,{label:"\u533A\u670D\u9009\u62E9"},{default:l(()=>[m("div",G,[(v(!0),B(V,null,R(e.serverInfo,t=>(v(),T(p,{modelValue:e.form.server_id,"onUpdate:modelValue":o[0]||(o[0]=D=>e.form.server_id=D),key:t.id,onChange:D=>e.changeServerID(t.id)},{default:l(()=>[a(f,{class:"server_name",label:t.id},{default:l(()=>[g(S(t.name),1)]),_:2},1032,["label"])]),_:2},1032,["modelValue","onChange"]))),128))])]),_:1}),a(s,{label:"\u73A9\u5BB6\u6635\u79F0"},{default:l(()=>[a(d,{modelValue:e.form.nick_name,"onUpdate:modelValue":o[1]||(o[1]=t=>e.form.nick_name=t)},null,8,["modelValue"])]),_:1}),a(s,{label:"\u4EFB\u52A1ID"},{default:l(()=>[a(d,{modelValue:e.form.taskID,"onUpdate:modelValue":o[2]||(o[2]=t=>e.form.taskID=t),modelModifiers:{number:!0}},null,8,["modelValue"])]),_:1}),a(s,null,{default:l(()=>[m("div",H,[a(A,{type:"primary",onClick:o[3]||(o[3]=t=>e.submitForm())},{default:l(()=>[J]),_:1}),a(A,{onClick:o[4]||(o[4]=t=>e.resetForm())},{default:l(()=>[K]),_:1})])]),_:1})]),_:1},8,["model"])])],64)}var oe=L(P,[["render",O]]);export{oe as default};
