Files
small-packages/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.79084d43.js
T
2026-09-04 23:37:45 +08:00

2 lines
8.6 KiB
JavaScript

var f=(h,x,m)=>new Promise((y,o)=>{var u=_=>{try{r(m.next(_))}catch(k){o(k)}},v=_=>{try{r(m.throw(_))}catch(k){o(k)}},r=_=>_.done?y(_.value):Promise.resolve(_.value).then(u,v);r((m=m.apply(h,x)).next())});import{_ as W,d as U,r as F,X as M,o as l,c as i,f as e,w as c,Q as C,s as A,y as b,h as n,j as I,k as N,g as T,T as D,i as S,p as z,q as H,R as O}from"./index.js";const t=h=>(z("data-v-894de0d4"),h=h(),H(),h),G={class:"form-item"},$=t(()=>e("div",{class:"label-name"},[e("span",null,"\u542F\u7528Wi-Fi")],-1)),j={class:"label-value"},K={class:"label-flex"},L={key:0,class:"form-item"},q=t(()=>e("div",{class:"label-name"},[e("span",null,"\u53D1\u5C04\u529F\u7387")],-1)),R={class:"label-value"},Q=t(()=>e("option",{value:100},"\u6700\u5927",-1)),X=t(()=>e("option",{value:70},"\u9AD8",-1)),J=t(()=>e("option",{value:50},"\u4E2D",-1)),Y=t(()=>e("option",{value:30},"\u4F4E",-1)),Z=[Q,X,J,Y],ee={class:"form-item"},oe=t(()=>e("div",{class:"label-name"},[e("span",null,"Wi-Fi\u540D\u79F0\uFF08SSID\uFF09")],-1)),te={class:"label-value"},se=["disabled"],ae={class:"form-item"},le=t(()=>e("div",{class:"label-name"},[e("span",null,"Wi-Fi \u5B89\u5168\u6027")],-1)),ie={class:"label-value"},ne=["disabled"],ue=O('<option value="none" data-v-894de0d4>OPEN</option><option value="psk2" data-v-894de0d4>WPA2-PSK</option><option value="psk-mixed" data-v-894de0d4>WPA/WPA2-PSK</option><option value="sae" data-v-894de0d4>WPA3-SAE</option><option value="sae-mixed" data-v-894de0d4>WPA2-PSK/WPA3-SEA</option>',5),de=[ue],ve={class:"form-item"},ce=t(()=>e("div",{class:"label-name"},[e("span",null,"Wi-Fi \u5BC6\u7801")],-1)),_e={class:"label-value"},pe=["type","disabled"],re=["src"],he={class:"form-item"},be=t(()=>e("div",{class:"label-name"},[e("span",null,"SSID \u53EF\u89C1\u6027")],-1)),me={class:"label-value"},fe=["disabled"],ye=t(()=>e("option",{value:!1},"\u663E\u793A",-1)),ke=t(()=>e("option",{value:!0},"\u9690\u85CF",-1)),ge=[ye,ke],Fe={key:1,class:"form-item"},xe=t(()=>e("div",{class:"label-name"},[e("span",null,"\u65E0\u7EBF\u6A21\u5F0F")],-1)),De={class:"label-value"},Se=["disabled"],Ee={key:0,value:"11n/ax"},we={key:1,value:"11g/n/ax"},Ce={key:2,value:"11b/g/n/ax"},Ae={key:3,value:"11b/g/n"},Pe={key:4,value:"11ac/ax"},Be={key:5,value:"11n/ac/ax"},Ve={key:6,value:"11a/n/ac/ax"},We={key:7,value:"11a/n/ac"},Ue={key:2,class:"form-item"},Me=t(()=>e("div",{class:"label-name"},[e("span",null,"\u9891\u5BBD")],-1)),Ie={class:"label-value"},Ne=["disabled"],Te=t(()=>e("option",{value:"20"},"20 MHz",-1)),ze=t(()=>e("option",{value:"40"},"40 MHz",-1)),He={key:0,value:"auto"},Oe={key:1,value:"80"},Ge={key:2,value:"160"},$e={key:3,class:"form-item"},je=t(()=>e("div",{class:"label-name"},[e("span",null,"\u4FE1\u9053")],-1)),Ke={class:"label-value"},Le=["disabled"],qe=t(()=>e("option",{value:0},"\u81EA\u52A8",-1)),Re=t(()=>e("option",{value:1},"1",-1)),Qe=t(()=>e("option",{value:2},"2",-1)),Xe=t(()=>e("option",{value:3},"3",-1)),Je=t(()=>e("option",{value:4},"4",-1)),Ye=t(()=>e("option",{value:5},"5",-1)),Ze=t(()=>e("option",{value:6},"6",-1)),eo=t(()=>e("option",{value:7},"7",-1)),oo=t(()=>e("option",{value:8},"8",-1)),to=t(()=>e("option",{value:9},"9",-1)),so=t(()=>e("option",{value:10},"10",-1)),ao=t(()=>e("option",{value:11},"11",-1)),lo=t(()=>e("option",{value:12},"12",-1)),io=t(()=>e("option",{value:13},"13",-1)),no=[qe,Re,Qe,Xe,Je,Ye,Ze,eo,oo,to,so,ao,lo,io],uo=["disabled"],vo=t(()=>e("option",{value:0},"\u81EA\u52A8",-1)),co=t(()=>e("option",{value:36},"36",-1)),_o=t(()=>e("option",{value:40},"40",-1)),po=t(()=>e("option",{value:44},"44",-1)),ro=t(()=>e("option",{value:48},"48",-1)),ho=t(()=>e("option",{value:52},"52(DFS)",-1)),bo=t(()=>e("option",{value:56},"56(DFS)",-1)),mo=t(()=>e("option",{value:60},"60(DFS)",-1)),fo=t(()=>e("option",{value:64},"64(DFS)",-1)),yo=t(()=>e("option",{value:149},"149",-1)),ko=t(()=>e("option",{value:153},"153",-1)),go=t(()=>e("option",{value:157},"157",-1)),Fo=t(()=>e("option",{value:161},"161",-1)),xo=[vo,co,_o,po,ro,ho,bo,mo,fo,yo,ko,go,Fo],Do={class:"label-btns"},So={key:2,class:"sumit btn primary-btn"},Eo="/luci-static/istorerouter/icon/eye-close.png",wo="/luci-static/istorerouter/icon/eye-on.png",Co=U({__name:"index",props:{data:Object},emits:["list"],setup(h,{emit:x}){F(!1);const m=h,y=x,o=F({}),u=F(!1),v=F(""),r=F(!0);M(()=>m.data,p=>f(this,null,function*(){console.log(p),o.value=p}),{immediate:!0});const _=()=>{u.value=!u.value},k=()=>f(this,null,function*(){V()}),P=()=>{r.value=!r.value},E=p=>f(this,null,function*(){const s={ifaceName:o.value.ifaceName,enable:p},a=D.Loading("\u4FDD\u5B58\u4E2D...");try{const d=yield S.Wireless.Switch.POST(s);if(d!=null&&d.data){const{success:g,error:w}=d==null?void 0:d.data;w&&(v.value=w),(g==null||g==0)&&(y("list"),v.value="\u914D\u7F6E\u5B8C\u6210")}}catch(d){v.value=d}a.Close()}),B=()=>f(this,null,function*(){const p={device:o.value.device,txpower:o.value.txpower},s=D.Loading("\u4FDD\u5B58\u4E2D...");try{const a=yield S.Wireless.Power.POST(p);if(a!=null&&a.data){const{success:d,error:g}=a==null?void 0:a.data;g&&(v.value=g),(d==null||d==0)&&(y("list"),v.value="\u914D\u7F6E\u5B8C\u6210")}}catch(a){v.value=a}s.Close()}),V=()=>f(this,null,function*(){u.value=!0;const p=D.Loading("\u4FDD\u5B58\u4E2D...");try{const s=yield S.Wireless.Edit.POST(o.value);if(s!=null&&s.data){const{success:a,error:d}=s==null?void 0:s.data;d&&(v.value=d),(a==null||a==0)&&(y("list"),v.value="\u914D\u7F6E\u5B8C\u6210")}}catch(s){v.value=s}u.value=!0,p.Close()});return(p,s)=>(l(),i("form",{class:"form-container",onSubmit:T(k,["prevent"])},[e("div",G,[$,e("div",j,[e("div",K,[e("label",null,[c(e("input",{type:"radio",value:!1,"onUpdate:modelValue":s[0]||(s[0]=a=>o.value.disabled=a),onClick:s[1]||(s[1]=a=>E(!0))},null,512),[[C,o.value.disabled]]),A("\u5F00\u542F")]),e("label",null,[c(e("input",{type:"radio",value:!0,"onUpdate:modelValue":s[2]||(s[2]=a=>o.value.disabled=a),onClick:s[3]||(s[3]=a=>E(!1))},null,512),[[C,o.value.disabled]]),A("\u5173\u95ED")])])])]),o.value.isGuest?n("v-if",!0):(l(),i("div",L,[q,e("div",R,[c(e("select",{"onUpdate:modelValue":s[4]||(s[4]=a=>o.value.txpower=a),onChange:s[5]||(s[5]=a=>B())},[...Z],544),[[b,o.value.txpower]])])])),e("div",ee,[oe,e("div",te,[c(e("input",{"onUpdate:modelValue":s[6]||(s[6]=a=>o.value.ssid=a),disabled:u.value},null,8,se),[[I,o.value.ssid]])])]),e("div",ae,[le,e("div",ie,[c(e("select",{"onUpdate:modelValue":s[7]||(s[7]=a=>o.value.encryption=a),disabled:u.value},[...de],8,ne),[[b,o.value.encryption]])])]),e("div",ve,[ce,e("div",_e,[c(e("input",{"onUpdate:modelValue":s[8]||(s[8]=a=>o.value.key=a),type:r.value?"password":"",disabled:u.value},null,8,pe),[[N,o.value.key]]),u.value?n("v-if",!0):(l(),i("img",{key:0,class:"seeIcon",onClick:s[9]||(s[9]=a=>P()),src:r.value?wo:Eo},null,8,re))])]),e("div",he,[be,e("div",me,[c(e("select",{"onUpdate:modelValue":s[10]||(s[10]=a=>o.value.hidden=a),disabled:u.value},[...ge],8,fe),[[b,o.value.hidden]])])]),o.value.isGuest?n("v-if",!0):(l(),i("div",Fe,[xe,e("div",De,[c(e("select",{"onUpdate:modelValue":s[11]||(s[11]=a=>o.value.hwmode=a),disabled:u.value},[o.value.band==="2g"?(l(),i("option",Ee," 11n/ax ")):n("v-if",!0),o.value.band==="2g"?(l(),i("option",we," 11g/n/ax ")):n("v-if",!0),o.value.band==="2g"?(l(),i("option",Ce," 11b/g/n/ax ")):n("v-if",!0),o.value.band==="2g"?(l(),i("option",Ae," 11b/g/n ")):n("v-if",!0),o.value.band==="5g"?(l(),i("option",Pe," 11ac/ax ")):n("v-if",!0),o.value.band==="5g"?(l(),i("option",Be," 11n/ac/ax ")):n("v-if",!0),o.value.band==="5g"?(l(),i("option",Ve," 11a/n/ac/ax ")):n("v-if",!0),o.value.band==="5g"?(l(),i("option",We," 11b/g/n ")):n("v-if",!0)],8,Se),[[b,o.value.hwmode]])])])),o.value.isGuest?n("v-if",!0):(l(),i("div",Ue,[Me,e("div",Ie,[c(e("select",{"onUpdate:modelValue":s[12]||(s[12]=a=>o.value.htmode=a),disabled:u.value},[Te,ze,o.value.band==="2g"?(l(),i("option",He," 20/40 MHz ")):n("v-if",!0),o.value.band==="5g"?(l(),i("option",Oe," 80 MHz ")):n("v-if",!0),o.value.band==="5g"?(l(),i("option",Ge," 160 MHz ")):n("v-if",!0)],8,Ne),[[b,o.value.htmode]])])])),o.value.isGuest?n("v-if",!0):(l(),i("div",$e,[je,e("div",Ke,[o.value.band==="2g"?c((l(),i("select",{key:0,"onUpdate:modelValue":s[13]||(s[13]=a=>o.value.channel=a),disabled:u.value},[...no],8,Le)),[[b,o.value.channel]]):n("v-if",!0),o.value.band==="5g"?c((l(),i("select",{key:1,"onUpdate:modelValue":s[14]||(s[14]=a=>o.value.channel=a),disabled:u.value},[...xo],8,uo)),[[b,o.value.channel]]):n("v-if",!0)])])),e("div",Do,[u.value?(l(),i("button",{key:0,class:"btn",onClick:_},"\u4FEE\u6539")):n("v-if",!0),u.value?n("v-if",!0):(l(),i("button",{key:1,class:"btn",onClick:_},"\u53D6\u6D88")),u.value?n("v-if",!0):(l(),i("button",So,"\u5E94\u7528"))])],32))}});var Bo=W(Co,[["__scopeId","data-v-894de0d4"]]);export{Bo as default};