mirror of
https://github.com/silenty4ng/k5web
synced 2024-11-14 22:35:31 +00:00
2 lines
5.0 KiB
JavaScript
2 lines
5.0 KiB
JavaScript
|
import{e as v,_ as k}from"./index.d368c164.js";/* empty css *//* empty css *//* empty css *//* empty css */import{d as I,r as N,bi as T,C as L,D as R,aE as t,b0 as e,aV as C,u as Q,a6 as j,bd as q,bs as z,bN as G,bQ as H,bn as J,bo as K,bb as M,bR as O,bP as W}from"./arco.b143604e.js";import{u as X}from"./loading.dfebc5d0.js";import{e as P,a as A,b as w,s as h,f as B,g as Y}from"./serial.3518333f.js";import"./chart.9aa904c5.js";import"./vue.12fb94d8.js";const Z={class:"container"},$={name:"Chi"},oo=I({...$,setup(to){const o=v(),{loading:V,setLoading:F}=X(!1),a=N({logo_line1:"",logo_line2:"",mdc_audio_local:!0}),U=async()=>{var y,r,m,s,l,_,i,d,g,c,p,b;if(o.connectState!=!0){alert("\u8BF7\u5148\u8FDE\u63A5\u624B\u53F0\uFF01");return}if(await P(o.connectPort),F(!0),((y=o.configuration)==null?void 0:y.charset)=="losehu"){let n=new Uint8Array(38);n.set(await A(o.connectPort,123680,38,(r=o.configuration)==null?void 0:r.uart),0),a.logo_line1=w(n.subarray(0,19),(m=o.configuration)==null?void 0:m.charset),a.logo_line2=w(n.subarray(19,38),(s=o.configuration)==null?void 0:s.charset)}else if(((l=o.configuration)==null?void 0:l.charset)=="gb2312"){let n=new Uint8Array(36);n.set(await A(o.connectPort,8192,36,(_=o.configuration)==null?void 0:_.uart),0),a.logo_line1=w(n.subarray(0,18),(i=o.configuration)==null?void 0:i.charset),a.logo_line2=w(n.subarray(18,36),(d=o.configuration)==null?void 0:d.charset)}else{let n=new Uint8Array(32);n.set(await A(o.connectPort,3760,32,(g=o.configuration)==null?void 0:g.uart),0),a.logo_line1=w(n.subarray(0,16),(c=o.configuration)==null?void 0:c.charset),a.logo_line2=w(n.subarray(16,32),(p=o.configuration)==null?void 0:p.charset)}parseInt(await A(o.connectPort,8189,1,(b=o.configuration)==null?void 0:b.uart))==0?a.mdc_audio_local=!1:a.mdc_audio_local=!0,F(!1)},x=async()=>{var y,r,m,s,l,_,i,d,g,c,p,b,n,f,E;if(o.connectState!=!0){alert("\u8BF7\u5148\u8FDE\u63A5\u624B\u53F0\uFF01");return}if(F(!0),await P(o.connectPort),((y=o.configuration)==null?void 0:y.charset)=="losehu"){let u=new Uint8Array(38);u.set(h(a.logo_line1,(r=o.configuration)==null?void 0:r.charset).subarray(0,19),0),u.set(h(a.logo_line2,(m=o.configuration)==null?void 0:m.charset).subarray(0,19),19),await B(o.connectPort,123678,[18,18],2,(s=o.configuration)==null?void 0:s.uart),await B(o.connectPort,123680,u,38,(l=o.configuration)==null?void 0:l.uart)}else if(((_=o.configuration)==null?void 0:_.charset)=="gb2312"){let u=new Uint8Array(36);u.set(h(a.logo_line1,(i=o.configuration)==null?void 0:i.charset).subarray(0,18),0),u.set(h(a.logo_line2,(d=o.configuration)==null?void 0:d.charset).subarray(0,18),18),await B(o.connectPort,8228,[18,18],2,(g=o.configuration)==null?void 0:g.uart),await B(o.connectPort,8192,u,36,(c=o.configuration)==null?void 0:c.uart)}else{let u=new Uint8Array(32);u.set(h(a.logo_line1,(p=o.configuration)==null?void 0:p.charset).subarray(0,16),0),u.set(h(a.logo_line2,(b=o.configuration)==null?void 0:b.charset).subarray(0,16),16),await B(o.connectPort,3760,u,32,(n=o.configuration)==null?void 0:n.uart)}(f=o.configuration)!=null&&f.localmdc&&await B(o.connectPort,8189,new Uint8Array([a.mdc_audio_local?1:0]),1,(E=o.configuration)==null?void 0:E.uart),await Y(o.connectPort),F(!1)},D=async()=>{},S=async()=>{};return(y,r)=>{const m=T("Breadcrumb"),s=j,l=q,_=z,i=G,d=H,g=J,c=K,p=M,b=O,n=W;return L(),R("div",Z,[t(m,{items:["\u5C0F\u5DE5\u5177","\u8BBE\u7F6E\u7BA1\u7406"]}),t(d,{gutter:20,align:"stretch"},{default:e(()=>[t(i,{span:24},{default:e(()=>[t(n,{class:"general-card",title:"\u8BBE\u7F6E\u7BA1\u7406"},{default:e(()=>[t(d,{style:{"margin-bottom":"16px"}},{default:e(()=>[t(i,{span:12},{default:e(()=>[t(_,null,{default:e(()=>[t(l,{type:"primary",onClick:U},{icon:e(()=>[t(s)]),default:e(()=>[C(" \u4ECE\u8BBE\u5907\u8BFB\u53D6 ")]),_:1}),t(l,{onClick:x},{icon:e(()=>[t(s)]),default:e(()=>[C(" \u5199\u5165\u8BBE\u5907 ")]),_:1})]),_:1})]),_:1}),t(i,{span:12,style:{"text-align":"right"}},{default:e(()=>[t(_,null,{default:e(()=>[t(l,{type:"primary",onClick:D},{default:e(()=>[C(" \u4FDD\u5
|