k5web/assets/index.841ac084.js
2024-04-28 21:26:15 +08:00

2 lines
5.0 KiB
JavaScript

import{e as k,as as I,_ as v}from"./index.e9286132.js";/* empty css *//* empty css *//* empty css *//* empty css */import{d as N,r as T,b3 as H,bN as L,bH as M,C as R,D as j,aI as t,aH as e,aM as C,u as q,a6 as z,b7 as G,bi as J,bI as K,bM as O,bf as Q,bk as W}from"./arco.93f0afda.js";import{u as X}from"./loading.fe99eb42.js";import{e as P,a as A,f as w,s as h,b as B,g as Y}from"./serial.bad97c4e.js";import"./chart.c383733a.js";import"./vue.ded74ca2.js";const Z={class:"container"},$={name:"Chi"},oo=N({...$,setup(to){const o=k(),{loading:U,setLoading:F}=X(!1),a=T({logo_line1:"",logo_line2:"",mdc_audio_local:!0}),V=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 Y(o.connectPort),F(!1)},D=async()=>{},S=async()=>{};return(b,u)=>{const p=I,s=z,l=G,_=J,i=K,d=O,f=Q,c=W,m=H,y=L,n=M;return R(),j("div",Z,[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:V},{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}),t(l,{onClick:S},{default:e(()=>[C(" \u52A0\u8F7D ")]),_:1})]),_:1})]),_:1})]),_:1}),t(y,{loading:q(U),style:{width:"100%"}},{default:e(()=>[t(c,{"label-col-style":{width:"25%"},field:"logo_line1",label:"\u542F\u52A8\u753B\u9762\u9996\u884C\u6587\u5B57"},{default:e(()=>[t(f,{modelValue:a.logo_line1,"onUpdate:modelValue":u[0]||(u[0]=g=>a.logo_line1=g)},null,8,["modelValue"])]),_:1}),t(c,{"label-col-style":{width:"25%"},field:"logo_line2",label:"\u542F\u52A8\u753B\u9762\u6B21\u884C\u6587\u5B57"},{default:e(()=>[t(f,{modelValue:a.logo_line2,"onUpdate:modelValue":u[1]||(u[1]=g=>a.logo_line2=g)},null,8,["modelValue"])]),_:1}),t(c,{"label-col-style":{width:"25%"},field:"logo_line2",label:"\u672C\u5730\u64AD\u653E\u9996\u5C3E\u97F3\uFF08\u4EC5117P6\uFF09"},{default:e(()=>[t(m,{modelValue:a.mdc_audio_local,"onUpdate:modelValue":u[2]||(u[2]=g=>a.mdc_audio_local=g),type:"round"},null,8,["modelValue"])]),_:1})]),_:1},8,["loading"])]),_:1})]),_:1})]),_:1})])}}});const fo=v(oo,[["__scopeId","data-v-2f03e8a6"]]);export{fo as default};