k5web/assets/index.009b4046.js
2024-05-08 23:37:58 +08:00

2 lines
5.1 KiB
JavaScript

import{e as k,af as I,_ as v}from"./index.abea991e.js";/* empty css *//* empty css *//* empty css *//* empty css */import{d as L,r as N,b3 as T,bN as H,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,bL as O,bf as Q,bk as W}from"./arco.7dae27b5.js";import{u as X}from"./loading.44241341.js";import{e as P,a as A,f as w,s as F,b as B,g as Y}from"./serial.c741fbda.js";import"./chart.e6650a02.js";import"./vue.9b8cbb5e.js";const Z={class:"container"},$={name:"Chi"},oo=L({...$,setup(to){const o=k(),{loading:U,setLoading:h}=X(!1),a=N({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),h(!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,h(!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(h(!0),await P(o.connectPort),((b=o.configuration)==null?void 0:b.charset)=="losehu"){let r=new Uint8Array(38);r.set(F(a.logo_line1,(u=o.configuration)==null?void 0:u.charset).subarray(0,19),0),r.set(F(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(F(a.logo_line1,(i=o.configuration)==null?void 0:i.charset).subarray(0,18),0),r.set(F(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(F(a.logo_line1,(m=o.configuration)==null?void 0:m.charset).subarray(0,16),0),r.set(F(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),h(!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=T,y=H,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\uFF08\u624B\u53F0\u5E94\u5728\u5F00\u673A\u72B6\u6001\u4E0B\uFF09"},{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-d1bfde71"]]);export{fo as default};