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.6fba5e05.js";/* empty css *//* empty css *//* empty css *//* empty css */import{d as I,r as T,b0 as L,C as N,D as H,aI as t,aH as e,aM as C,u as K,a6 as M,aX as R,bb as X,bC as j,bF as q,b6 as z,b7 as G,aV as J,bK as O,bE as Q}from"./arco.a5a5eeda.js";import{u as W}from"./loading.32afe0d0.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.afd45e2e.js";import"./vue.bbd9d311.js";const Z={class:"container"},$={name:"Chi"},oo=I({...$,setup(to){const o=v(),{loading:V,setLoading:F}=W(!1),a=T({logo_line1:"",logo_line2:"",mdc_audio_local:!0}),U=async()=>{var b,r,m,s,l,_,i,d,g,c,p,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,(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,(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,r,m,s,l,_,i,d,g,c,p,y,n,f,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 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,(y=o.configuration)==null?void 0:y.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(b,r)=>{const m=L("Breadcrumb"),s=M,l=R,_=X,i=j,d=q,g=z,c=G,p=J,y=O,n=Q;return N(),H("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\u5B58 ")]),_:1}),t(l,{onClick:S},{default:e(()=>[C(" \u52A0\u8F7D ")]),_:1})]),_:1})]),_:1})]),_:1}),t(y,{loading:K(V),style:{width:"100%"}},{default:e(()=>[t(c,{"label-col-style":{width:"15%"},field:"logo_line1",label:"\u542F\u52A8\u753B\u9762\u9996\u884C\u6587\u5B57"},{default:e(()=>[t(g,{modelValue:a.logo_line1,"onUpdate:modelValue":r[0]||(r[0]=f=>a.logo_line1=f)},null,8,["modelValue"])]),_:1}),t(c,{"label-col-style":{width:"15%"},field:"logo_line2",label:"\u542F\u52A8\u753B\u9762\u6B21\u884C\u6587\u5B57"},{default:e(()=>[t(g,{modelValue:a.logo_line2,"onUpdate:modelValue":r[1]||(r[1]=f=>a.logo_line2=f)},null,8,["modelValue"])]),_:1}),t(c,{"label-col-style":{width:"15%"},field:"logo_line2",label:"\u672C\u5730\u64AD\u653E\u9996\u5C3E\u97F3\uFF08\u4EC5117P6\uFF09"},{default:e(()=>[t(p,{modelValue:a.mdc_audio_local,"onUpdate:modelValue":r[2]||(r[2]=f=>a.mdc_audio_local=f),type:"round"},null,8,["modelValue"])]),_:1})]),_:1},8,["loading"])]),_:1})]),_:1})]),_:1})])}}});const go=k(oo,[["__scopeId","data-v-766b1311"]]);export{go as default};
|