import{a4 as u,ai as B,d as L,aj as y,al as U,r as d,o as p,a6 as D,a7 as s,a9 as l,a8 as a,af as v,ac as V,ao as P,ad as S,c as W,ak as h}from"./vendor.e9cda63f.js";import{F as R}from"./index.d2f92af0.js";import{g as $}from"./gm.aff5ce9f.js";import{_ as w,o as j,n as M}from"./index.ef7ee694.js";import"./pagination.7745095e.js";const G=u(!1),t=B({server_id:0,nick_name:"",score:0,guard_score:0,option:1}),N=u(3),T=u(!1),g={required:!0,message:"\u8BE5\u9879\u4E3A\u5FC5\u586B\u9879"},q=u({server_id:[g],game_url:[g],name:[g],config:[g],desc:[g]}),O=L({name:"PaiWei",components:{Footer:R},setup(){y();const e=u(),n=u([{id:1,name:"\u67E5\u8BE2"},{id:2,name:"\u65B0\u589E"}]),A=u(),C="100px",I={children:"children",label:"label"},k=u(),F=u(3);U("logType",F);const m=B({LevelId:"",Score:"",GuardScore:""}),c=()=>{$.getServerInfo().then(r=>{e.value=r.data.data,t.server_id=e.value[0].id,console.log(e.value)})},i=r=>{t.server_id=r,console.log(t)},_=r=>{t.option=r,console.log(t)},b=()=>{if(console.log(t),t.nick_name==""){j("\u73A9\u5BB6\u6635\u79F0\u4E0D\u53EF\u4E3A\u7A7A!");return}const r=P.service({lock:!0,text:"\u52A0\u8F7D\u4E2D...",background:"rgba(0, 0 ,0 ,0.7)"});$.UpdatePaiWeiScore(t).then(o=>{o.code==200?(m.LevelId=o.data.levelId,m.Score=o.data.score,m.GuardScore=o.data.guardScore,r.close(),M(o.message)):(r.close(),j(o.message))})},E=()=>{t.server_id=0,t.nick_name="",t.score=0,t.guard_score=0,c()};return c(),{useI18n:y,defaultProps:I,serverForm:A,logType:F,RefChild:k,radio:N,form:t,serverInfo:e,changeServerID:i,changeOption:_,loading:T,dialogVisible:G,formRules:q,formLabelWidth:C,submitForm:b,resetForm:E,paiWeiInfo:m,optionInfo:n}}}),z=l("br",null,null,-1),H={class:"el_form"},J={class:"select_server"},K={class:"select_option"},Q={class:"submit_style"},X=h("\u63D0\u4EA4"),Y=h("\u91CD\u7F6E"),Z={class:"paiwei_info"},x=l("div",{class:"info_title"}," \u6392\u4F4D\u8D5B\u4FE1\u606F ",-1),ee={class:"info_item"},oe=l("div",{class:"item_l"},"\u6392\u4F4D\u7B49\u7EA7\uFF1A",-1),se={class:"item_r"},ne={class:"info_item"},le=l("div",{class:"item_l"},"\u79EF\u5206\uFF1A",-1),ae={class:"item_r"},te={class:"info_item"},re=l("div",{class:"item_l"},"\u4FDD\u62A4\u5206\uFF1A",-1),ue={class:"item_r"};function ie(e,n,A,C,I,k){const F=d("el-alert"),m=d("el-radio"),c=d("el-radio-group"),i=d("el-form-item"),_=d("el-input"),b=d("el-button"),E=d("el-form"),r=d("el-divider");return p(),D(V,null,[s(F,{title:"\u79EF\u5206\u6B63\u6570\u4E3A\u589E\u52A0,\u8D1F\u6570\u51CF\u5C11",type:"info"}),z,l("div",H,[s(E,{ref:"ruleFormRef",model:e.form,"label-width":"120px",style:{"max-width":"560px"}},{default:a(()=>[s(i,{label:"\u533A\u670D\u9009\u62E9"},{default:a(()=>[l("div",J,[(p(!0),D(V,null,S(e.serverInfo,o=>(p(),W(c,{modelValue:e.form.server_id,"onUpdate:modelValue":n[0]||(n[0]=f=>e.form.server_id=f),key:o.id,onChange:f=>e.changeServerID(o.id)},{default:a(()=>[s(m,{class:"server_name",label:o.id},{default:a(()=>[h(v(o.name),1)]),_:2},1032,["label"])]),_:2},1032,["modelValue","onChange"]))),128))])]),_:1}),s(i,{label:"\u64CD\u4F5C\u9009\u62E9"},{default:a(()=>[l("div",K,[(p(!0),D(V,null,S(e.optionInfo,o=>(p(),W(c,{modelValue:e.form.option,"onUpdate:modelValue":n[1]||(n[1]=f=>e.form.option=f),key:o.id,onChange:f=>e.changeOption(o.id)},{default:a(()=>[s(m,{class:"option",label:o.id},{default:a(()=>[h(v(o.name),1)]),_:2},1032,["label"])]),_:2},1032,["modelValue","onChange"]))),128))])]),_:1}),s(i,{label:"\u73A9\u5BB6\u6635\u79F0"},{default:a(()=>[s(_,{modelValue:e.form.nick_name,"onUpdate:modelValue":n[2]||(n[2]=o=>e.form.nick_name=o)},null,8,["modelValue"])]),_:1}),s(i,{label:"\u6392\u4F4D\u79EF\u5206"},{default:a(()=>[s(_,{modelValue:e.form.score,"onUpdate:modelValue":n[3]||(n[3]=o=>e.form.score=o),modelModifiers:{number:!0}},null,8,["modelValue"])]),_:1}),s(i,{label:"\u4FDD\u62A4\u5206"},{default:a(()=>[s(_,{modelValue:e.form.guard_score,"onUpdate:modelValue":n[4]||(n[4]=o=>e.form.guard_score=o),modelModifiers:{number:!0}},null,8,["modelValue"])]),_:1}),s(i,null,{default:a(()=>[l("div",Q,[s(b,{type:"primary",onClick:n[5]||(n[5]=o=>e.submitForm())},{default:a(()=>[X]),_:1}),s(b,{onClick:n[6]||(n[6]=o=>e.resetForm())},{default:a(()=>[Y]),_:1})])]),_:1})]),_:1},8,["model"]),l("div",Z,[x,s(r),l("div",ee,[oe,l("div",se,v(e.paiWeiInfo.LevelId),1)]),l("div",ne,[le,l("div",ae,v(e.paiWeiInfo.Score),1)]),l("div",te,[re,l("div",ue,v(e.paiWeiInfo.GuardScore),1)]),s(r)])])],64)}var pe=w(O,[["render",ie]]);export{pe as default};
