import{d as e,o as t,r as a,g as o,b as l,w as n,F as s,i as c,h as i,j as d,k as u,m as p,a as r,p as f,u as h,q as y,f as C,t as b,s as m,v as _,x as k,T as g,y as w,z as T,A as v,G as x,_ as I}from"./index-CY26MUkV.js";import{o as N}from"./popup.Dnln7fgr.js";import{u as S}from"./useService.-Ss4zQ-R.js";import"./useConfigStroe.kvAOvD0g.js";const P=I(e({__name:"ceshi",setup(e){t(()=>{});const{ifNeedPrint:I}=S(),P=a(""),j=async()=>{const e=await k("/File/GetFile?filePath=eece051a-60ac-4d6d-90d9-3a1eaec42497/ceshi.pdf").catch(async t=>{const a=await e.blob();await fetch("http://172.16.12.73:1885/api/machine/id",{method:"POST",body:a,headers:{"Content-Type":"application/pdf"}})})},B=async()=>{await k("/File/GetFile?filePath=eece051a-60ac-4d6d-90d9-3a1eaec42497/ceshi.pdf",{},{responseType:"arrayBuffer"}).catch(async e=>{console.log(e);let t=new Blob([e],{type:"application/pdf"});await fetch("http://127.0.0.1:1885/api/upload/print",{method:"POST",body:t,headers:{"Content-Type":"application/pdf"}})})},F=()=>{I(P.value)},O=a(""),A=async()=>{let e=await k("/api/services/app/TransCode/GetPrintTxt",{name:"条码打印模版.text"});e||g.error("模版获取错误"),e.success||g.error("模版获取错误");let t=e.result||"";O.value=t,I(t)},G=async()=>{let e=await N({title:"供应商查询",methodName:"查询供应商",search:["parameter2"],keyName:"parameter4",textName:"parameter5"});console.log(e)},V=()=>{fetch("http://127.0.0.1:9123/ping",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})})},q=()=>{console.log(w.isOpen())},L=()=>{w.openDb().then(e=>{console.log(e)})},z=()=>{w.closeSQL().then(e=>{console.log(e)})},D=async()=>{let e=x.location,t=await T(e,{LocationCode:""}).catch(e=>{console.log(e)});t&&(t.result||[]).map(e=>({locationId:e.id,locationCode:e.locationCode,locationName:e.locationName,warehouseId:e.warehouseId,warehouseCode:e.warehouseCode,warehouseName:e.warehouseName})).forEach(e=>{v.insert(e)})},E=()=>{},J=()=>{},Q=()=>{},U=()=>{v.deleteAll()},$=()=>{w.getTable().then(e=>{console.log(e)})},H=()=>{},K=()=>{},M=()=>{v.selectById(99).then(e=>{console.log(e)})},R=()=>{v.selectAll().then(e=>{console.log(e)})};return(e,t)=>{const a=i(u("up-navbar"),d),k=c,g=m,w=_,T=p("m-toast-app");return r(),o(s,null,[l(k,{class:"content"},{default:n(()=>[l(a,{title:e.$t("Test"),border:"",bgColor:h(y).bgColor,leftIconColor:h(y).leftIconColor,titleStyle:"color:"+h(y).titleColor,autoBack:!0},null,8,["title","bgColor","leftIconColor","titleStyle"]),l(k,{class:""},{default:n(()=>[C("打印")]),_:1}),l(k,{class:"",onClick:j},{default:n(()=>[C("调用本地Ip")]),_:1}),l(k,{class:"",onClick:B},{default:n(()=>[C("调用本地localhost")]),_:1}),f("hr"),l(k,null,{default:n(()=>[C(b(O.value),1)]),_:1}),f("hr"),l(g,{modelValue:P.value,"onUpdate:modelValue":t[0]||(t[0]=e=>P.value=e),style:{border:"1px solid #000",width:"95%","margin-top":"10px","margin-bottom":"10px"},placeholder:"打印内容",maxlength:"1000000"},null,8,["modelValue"]),l(w,{type:"button",onClick:F},{default:n(()=>[C("模版打印")]),_:1}),l(w,{type:"button",onClick:A},{default:n(()=>[C("远程模版打印")]),_:1}),l(k,{class:""},{default:n(()=>[C("搜索")]),_:1}),l(w,{type:"button",onClick:G},{default:n(()=>[C("打开搜索")]),_:1}),l(k,{class:""},{default:n(()=>[C("服务调试")]),_:1}),l(w,{type:"button",onClick:V},{default:n(()=>[C("发送pdf数据")]),_:1}),l(k,{class:""},{default:n(()=>[C("sqlline调试")]),_:1}),l(w,{type:"button",onClick:q},{default:n(()=>[C("检查数据库打开状态")]),_:1}),l(w,{type:"button",onClick:L},{default:n(()=>[C("打开数据库")]),_:1}),l(w,{type:"button",onClick:z},{default:n(()=>[C("关闭数据库")]),_:1}),l(w,{type:"button",onClick:D},{default:n(()=>[C("添加数据")]),_:1}),l(w,{type:"button",onClick:E},{default:n(()=>[C("修改数据")]),_:1}),l(w,{type:"button",onClick:J},{default:n(()=>[C("添加表")]),_:1}),l(w,{type:"button",onClick:Q},{default:n(()=>[C("合并数据")]),_:1}),l(w,{type:"button",onClick:U},{default:n(()=>[C("删除数据库数据")]),_:1}),l(w,{type:"button",onClick:$},{default:n(()=>[C("查询所有数据表名")]),_:1}),l(w,{type:"button",onClick:H},{default:n(()=>[C("查询表是否存在")]),_:1}),l(w,{type:"button",onClick:K},{default:n(()=>[C("获取表数据总条数")]),_:1}),l(w,{type:"button",onClick:M},{default:n(()=>[C("获取数据库数据")]),_:1}),l(w,{type:"button",onClick:R},{default:n(()=>[C("获取分页数据库数据+排序")]),_:1})]),_:1}),l(T)],64)}}}),[["__scopeId","data-v-3c29444b"]]);export{P as default};
