2024-02-25 08:33:34 +00:00
|
|
|
import{e as k,q as v,_ as I}from"./index.fc1ffc8e.js";/* empty css *//* empty css *//* empty css *//* empty css */import{d as N,r as T,aV as L,bN as M,bC as q,C as H,D as R,aI as t,aH as e,aM as C,u as Z,a6 as j,aZ as z,b8 as G,bD as J,bM as K,b5 as O,ba as Q}from"./arco.4738edf2.js";import{u as W}from"./loading.21fd9185.js";import{e as P,a as A,f as w,s as h,b as B,g as X}from"./serial.a589823e.js";import"./chart.a6be8b1c.js";import"./vue.202e581b.js";const Y={class:"container"},$={name:"Chi"},oo=N({...$,setup(to){const o=k(),{loading:V,setLoading:F}=W(!1),a=T({logo_line1:"",logo_line2:"",mdc_audio_local:!0}),U=async()=>{var b,u,p,s,l,_,i,d,f,c,m,y;if(o.connectState!=!0){alert("\u8BF7\u5148\u8FDE\u63A5\u624B\u53F0\uFF01");return}if(await P(o.connectPort),F(!0),((b=o.configuration)==null?void 0:b.charset)=="losehu"){let n=new Uint8Array(38);n.set(await A(o.connectPort,123680,38,(u=o.configuration)==null?void 0:u.uart),0),a.logo_line1=w(n.subarray(0,19),(p=o.configuration)==null?void 0:p.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,(f=o.configuration)==null?void 0:f.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),(m=o.configuration)==null?void 0:m.charset)}parseInt(await A(o.connectPort,8189,1,(y=o.configuration)==null?void 0:y.uart))==0?a.mdc_audio_local=!1:a.mdc_audio_local=!0,F(!1)},x=async()=>{var b,u,p,s,l,_,i,d,f,c,m,y,n,g,E;if(o.connectState!=!0){alert("\u8BF7\u5148\u8FDE\u63A5\u624B\u53F0\uFF01");return}if(F(!0),await P(o.connectPort),((b=o.configuration)==null?void 0:b.charset)=="losehu"){let r=new Uint8Array(38);r.set(h(a.logo_line1,(u=o.configuration)==null?void 0:u.charset).subarray(0,19),0),r.set(h(a.logo_line2,(p=o.configuration)==null?void 0:p.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,r,38,(l=o.configuration)==null?void 0:l.uart)}else if(((_=o.configuration)==null?void 0:_.charset)=="gb2312"){let r=new Uint8Array(36);r.set(h(a.logo_line1,(i=o.configuration)==null?void 0:i.charset).subarray(0,18),0),r.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,(f=o.configuration)==null?void 0:f.uart),await B(o.connectPort,8192,r,36,(c=o.configuration)==null?void 0:c.uart)}else{let r=new Uint8Array(32);r.set(h(a.logo_line1,(m=o.configuration)==null?void 0:m.charset).subarray(0,16),0),r.set(h(a.logo_line2,(y=o.configuration)==null?void 0:y.charset).subarray(0,16),16),await B(o.connectPort,3760,r,32,(n=o.configuration)==null?void 0:n.uart)}(g=o.configuration)!=null&&g.localmdc&&await B(o.connectPort,8189,new Uint8Array([a.mdc_audio_local?1:0]),1,(E=o.configuration)==null?void 0:E.uart),await X(o.connectPort),F(!1)},D=async()=>{},S=async()=>{};return(b,u)=>{const p=v,s=j,l=z,_=G,i=J,d=K,f=O,c=Q,m=L,y=M,n=q;return H(),R("div",Y,[t(p,{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\u5B58 ")]),_:1}),
|