import{_ as a}from"./SoftKeyboard-BW9CkzhQ.js";import{X as e,e as t,r as l,f as s,g as u,w as n,a as i,b as o,p as d,q as c,I as r,J as p,ac as v,R as m,ag as y,ah as b,o as f,D as _,t as g,d as w,ai as h,aj as V,_ as k}from"./index-C1tQD-C0.js";import{e as x}from"./index-BimIWPqC.js";/* empty css                                                                     */const C="/api/v1/engineer/experiment-consistency-testing/",T="/api/v1/engineer/liquid-absorption-and-distribution-test/",U={id:"debug-view"},j={class:"content-box"},E={class:"title"},K={class:"content"},S={class:"content-box"},q={class:"title"},F={class:"content1"},I={key:0,class:"keyboard"},N=k(t({__name:"debug",setup(t){const k=l([]),N=l(!1),R=l(""),B=l("number"),D=l();s((async()=>{const a=await(async()=>{try{return(await e.post(C+"getConfig")).data}catch(a){}})(),t=await(async()=>{try{return(await e.post(T+"getConfig")).data}catch(a){}})();k.value=a.data.tubeExConfigs,N.value=t.data.takeTipEachTime||!1})),u((()=>{W()}));const J=l(!1),O=l(""),W=()=>{J.value=!1,O.value=""};l(0);const X=l(0);n(R,(a=>{var e;a.endsWith(".")&&(a+="0"),e=a,O.value=e,k.value[X.value].repeatTimes=e})),l();const z=async()=>{k.value.filter((a=>a.repeatTimes>10)).length?x.error("请输入正确的试管次数"):await(async a=>{try{return(await e.post(C+"submitConfig",a)).data}catch(t){}})({tubeExConfigs:k.value.map((a=>({repeatTimes:Number(a.repeatTimes)||0})))})},A=[{label:"取一次10ul",value:10},{label:"取一次75ul",value:75}],G=l(10),H=async()=>{(await(async()=>{try{return(await e.post(T+"dropTipBlock")).data}catch(a){}})()).success&&x.success("操作成功")},L=async()=>{(await(async a=>{try{return(await e.post(T+"submitConfig",a)).data}catch(t){}})({takeTipEachTime:N.value})).success&&x.success("保存成功")},M=async()=>{(await(async a=>{try{return(await e.post(T+"testOnce?ul="+a)).data}catch(t){}})(G.value)).success&&x.success("已开始移液")};return(e,t)=>{const l=m,s=h,u=V,n=y,x=b,C=a;return f(),i("div",U,[o("div",j,[o("div",E,[t[6]||(t[6]=o("span",null,"一致性测试",-1)),o("div",null,[d(l,{type:"primary",onClick:z},{default:c((()=>t[5]||(t[5]=[_("提交配置")]))),_:1})])]),o("div",K,[(f(!0),i(r,null,p(k.value,((a,e)=>(f(),i("div",{key:e,class:"tube-item"},[o("span",null,"试管"+g(e+1),1),d(s,{style:{width:"80px"},modelValue:a.repeatTimes,"onUpdate:modelValue":e=>a.repeatTimes=e,type:"number",name:e,onFocus:a=>(a=>{J.value=!0;const e=k.value[a].repeatTimes;R.value=e?e.toString():"",X.value=a})(e),readonly:""},null,8,["modelValue","onUpdate:modelValue","name","onFocus"])])))),128))])]),o("div",S,[o("div",q,[t[9]||(t[9]=o("span",null,"加样准确度与重复性",-1)),o("div",null,[d(l,{onClick:H},{default:c((()=>t[7]||(t[7]=[_("丢弃tip")]))),_:1}),d(l,{type:"primary",onClick:M},{default:c((()=>t[8]||(t[8]=[_("移液操作")]))),_:1})])]),o("div",F,[t[11]||(t[11]=o("div",null,"移液操作: ",-1)),d(n,{modelValue:G.value,"onUpdate:modelValue":t[0]||(t[0]=a=>G.value=a),style:{width:"150px"}},{default:c((()=>[(f(),i(r,null,p(A,((a,e)=>d(u,{key:e,label:a.label,value:a.value},null,8,["label","value"]))),64))])),_:1},8,["modelValue"]),d(x,{modelValue:N.value,"onUpdate:modelValue":t[1]||(t[1]=a=>N.value=a),onChange:L},{default:c((()=>t[10]||(t[10]=[_(" 每次丢弃tip")]))),_:1},8,["modelValue"])])]),d(v,{name:"slide-up"},{default:c((()=>[J.value?(f(),i("div",I,[d(C,{ref_key:"softKeyboardRef",ref:D,modelValue:R.value,"onUpdate:modelValue":t[2]||(t[2]=a=>R.value=a),"is-visible":J.value,"keyboard-type":B.value,onUpdateKeyboardVisible:t[3]||(t[3]=a=>J.value=a),onConfirm:()=>{},onClose:t[4]||(t[4]=a=>J.value=!1)},null,8,["modelValue","is-visible","keyboard-type"])])):w("",!0)])),_:1})])}}}),[["__scopeId","data-v-385f219f"]]);export{N as default};
