import{d as I,n as y,a3 as U,t as X,M as k,r as n,b as g,o as c,c as E,e,j as a,w as p,i as v,f as b,g as G,h as r,S as D,K as w,_ as K}from"./index-4789ca0a.js";import{T as A}from"./index-296c76cc.js";import{E as O}from"./el-message-box-ecaf3f80.js";const S={class:"form-container"},j=I({name:"WifiBand",__name:"WifiBand",setup(J){const d=y(),M=y(["1"]);let s=y(!0);const t=U({wifiMode:"",wifi_11n_cap:"",countryCode:"",selectedChannel:"",wifi_band:""});X(()=>{C()});function C(){k("multi_data=1&cmd=WirelessMode%2Cwifi_band%2CCountryCode%2CMAX_Access_num%2Cm_MAX_Access_num%2CChannel%2Cwifi_11n_cap%2Cwifi_sta_connection").then(u=>{d.value=u,s.value=!1,t.wifiMode=d.value.WirelessMode,t.countryCode=d.value.CountryCode,t.selectedChannel=d.value.Channel,t.wifi_11n_cap=d.value.wifi_11n_cap,t.wifi_band=d.value.wifi_band=="b"?"2.4G":d.value.wifi_band}).catch(u=>{s.value=!1})}function B(){O.confirm("所有已连接的 Wi-Fi 设备需要重连。您要继续吗？",{confirmButtonText:"继续",cancelButtonText:"取消",type:"warning"}).then(()=>{s.value=!0,D({wifiMode:t.wifiMode,countryCode:t.countryCode,MAX_Access_num:d.value.MAX_Access_num,m_MAX_Access_num:d.value.m_MAX_Access_num,wifi_band:t.wifi_band=="2.4G"?"b":t.wifi_band,selectedChannel:t.selectedChannel,abg_rate:"0",wifi_11n_cap:t.wifi_11n_cap,goformId:"SET_WIFI_INFO"}).then(u=>{u.result=="success"?(C(),w("成功发送请求",{type:"success"})):(w("操作失败",{type:"error"}),s.value=!1)}).catch(u=>{w("请求失败",{type:"error"}),s.value=!1})}).catch(()=>{w("取消应用",{type:"info"})})}return(u,o)=>{const W=n("el-input"),_=n("el-form-item"),l=n("el-option"),f=n("el-select"),h=n("el-button"),F=n("el-form"),V=n("el-card"),x=n("el-col"),m=n("el-collapse-item"),N=n("el-collapse"),T=n("el-row"),H=g("loading"),z=g("motion");return c(),E("div",null,[e(T,{gutter:24},{default:a(()=>[p((c(),v(x,{xs:24,sm:24,md:16,lg:16,xl:16,class:"mb-[5px]",initial:{opacity:0,y:100},enter:{opacity:1,y:0,transition:{delay:200}}},{default:a(()=>[p((c(),v(V,{shadow:"never"},{header:a(()=>[e(b(A),{className:"type-it1",values:["Wi-Fi 频段设置"],cursor:!1,speed:60})]),default:a(()=>[G("div",S,[e(F,{ref:"ruleFormRef",model:t,"status-icon":"","label-width":"120px",class:"demo-ruleForm","label-position":"left"},{default:a(()=>[e(_,{label:"频段选择"},{default:a(()=>[e(W,{modelValue:t.wifi_band,"onUpdate:modelValue":o[0]||(o[0]=i=>t.wifi_band=i),type:"text",autocomplete:"off",disabled:""},null,8,["modelValue"])]),_:1}),e(_,{label:"网络模式",prop:"wifiMode"},{default:a(()=>[e(f,{modelValue:t.wifiMode,"onUpdate:modelValue":o[1]||(o[1]=i=>t.wifiMode=i),"fit-input-width":!0,style:{width:"100%"},disabled:""},{default:a(()=>[e(l,{label:"802.11 b/g/n/ax",value:"6"}),e(l,{label:"802.11 b/g/n",value:"4"}),e(l,{label:"仅 802.11 n",value:"2"})]),_:1},8,["modelValue"])]),_:1}),e(_,{label:"频带宽度",prop:"wifi_11n_cap"},{default:a(()=>[e(f,{modelValue:t.wifi_11n_cap,"onUpdate:modelValue":o[2]||(o[2]=i=>t.wifi_11n_cap=i),"fit-input-width":!0,style:{width:"100%"}},{default:a(()=>[e(l,{label:"20MHz",value:"0"}),e(l,{label:"20MHz/40MHz",value:"1"})]),_:1},8,["modelValue"])]),_:1}),e(_,{label:"国家/地区码",prop:"countryCode"},{default:a(()=>[e(f,{modelValue:t.countryCode,"onUpdate:modelValue":o[3]||(o[3]=i=>t.countryCode=i),"fit-input-width":!0,style:{width:"100%"}},{default:a(()=>[e(l,{label:"中国",value:"CN"}),e(l,{label:"台灣",value:"TW"}),e(l,{label:"日本",value:"JP"}),e(l,{label:"澳門",value:"MO"}),e(l,{label:"香港",value:"HK"})]),_:1},8,["modelValue"])]),_:1}),e(_,{label:"信道",prop:"selectedChannel"},{default:a(()=>[e(f,{modelValue:t.selectedChannel,"onUpdate:modelValue":o[4]||(o[4]=i=>t.selectedChannel=i),"fit-input-width":!0,style:{width:"100%"}},{default:a(()=>[e(l,{label:"自动",value:"0"}),e(l,{label:"2412MHz (频道 1)","data-id":"1_2412",value:"1"}),e(l,{label:"2417MHz (频道 2)","data-id":"2_2417",value:"2"}),e(l,{label:"2422MHz (频道 3)","data-id":"3_2422",value:"3"}),e(l,{label:"2427MHz (频道 4)","data-id":"4_2427",value:"4"}),e(l,{label:"2432MHz (频道 5)","data-id":"5_2432",value:"5"}),e(l,{label:"2437MHz (频道 6)","data-id":"6_2437",value:"6"}),e(l,{label:"2442MHz (频道 7)","data-id":"7_2442",value:"7"}),e(l,{label:"2447MHz (频道 8)","data-id":"8_2447",value:"8"}),e(l,{label:"2452MHz (频道 9)","data-id":"9_2452",value:"9"}),e(l,{label:"2457MHz (频道 10)","data-id":"10_2457",value:"10"}),e(l,{label:"2462MHz (频道 11)","data-id":"11_2462",value:"11"}),e(l,{label:"2467MHz (频道 12)","data-id":"12_2467",value:"12"}),e(l,{label:"2472MHz (频道 13)","data-id":"13_2472",value:"13"})]),_:1},8,["modelValue"])]),_:1}),e(_,{class:"form-buttons"},{default:a(()=>[e(h,{type:"primary",onClick:o[5]||(o[5]=i=>B())},{default:a(()=>[r("应用")]),_:1})]),_:1}),e(h,{style:{visibility:"hidden"}})]),_:1},8,["model"])])]),_:1})),[[H,b(s)]])]),_:1})),[[z]]),p((c(),v(x,{xs:24,sm:24,md:8,lg:8,xl:8,class:"mb-[5px]",initial:{opacity:0,y:100},enter:{opacity:1,y:0,transition:{delay:200}}},{default:a(()=>[p((c(),v(V,{shadow:"never"},{header:a(()=>[e(b(A),{className:"type-it2",values:["设置说明"],cursor:!1,speed:60})]),default:a(()=>[e(N,{modelValue:M.value,"onUpdate:modelValue":o[6]||(o[6]=i=>M.value=i)},{default:a(()=>[e(m,{title:"频段选择",name:"1"},{default:a(()=>[r(" 您可以为您的设备选择合适的频段。 ")]),_:1}),e(m,{title:"网络模式",name:"2"},{default:a(()=>[r(" 选择合适的无线网络模式，该设备的无线性能会提高。 802.11 b/g/n/ax表示工作在2.4GHz的wif6。 ")]),_:1}),e(m,{title:"国家/地区码",name:"3"},{default:a(()=>[r(" 您可以为您的设备选择合适的国家/地区码。 ")]),_:1}),e(m,{title:"信道",name:"4"},{default:a(()=>[r(" 选择合适的频道来优化Wi-Fi网络性能和覆盖范围。 ")]),_:1})]),_:1},8,["modelValue"])]),_:1})),[[H,b(s)]])]),_:1})),[[z]])]),_:1})])}}});const q=K(j,[["__scopeId","data-v-88978230"]]);export{q as default};
