import{_ as e}from"./SoftKeyboard-BW9CkzhQ.js";import{e as a,r as s,w as l,a as t,b as o,a0 as d,I as n,J as u,p as i,q as r,ac as c,C as m,o as p,av as v,t as b,F as f,am as y,n as _,_ as k}from"./index-C1tQD-C0.js";import j from"./left-9QZPf6PC.js";import{u as g,d as I}from"./testTube-cxed3VHO.js";import{T as h}from"./Tube-C1TNHizM.js";import{e as x}from"./index-BimIWPqC.js";import{_ as U}from"./consumables-CTmb_gxU.js";import{_ as V}from"./_curry1-D3PJq_hl.js";import{_ as F}from"./reduce-C-cHtDxk.js";/* empty css                                                                     */import"./equals-cwY-6C0z.js";import"./_curry2-Ngzhmcdp.js";import"./_has-CZhjUFgV.js";import"./stop_s-gO1dx3DD.js";import"./settingTestTube-DKc4MTR2.js";import"./socket-BAyDdojS.js";function T(e){return function e(a){for(var s,l,t,o=[],d=0,n=a.length;d<n;){if(F(a[d]))for(t=0,l=(s=e(a[d])).length;t<l;)o[o.length]=s[t],t+=1;else o[o.length]=a[d];d+=1}return o}}var C=V((function(e){return null!=e&&"function"==typeof e.clone?e.clone():U(e,!0)})),S=V(T());const B={id:"changeUser-container"},R={class:"header"},w={class:"content"},K={class:"samples-grid"},q={class:"sample-content"},D={class:"item-index"},N={class:"tube-circle"},E={class:"inputs"},G=["onUpdate:modelValue","onFocus"],H=["onUpdate:modelValue","onFocus"],J={class:"keyboard-container"},W=k(a({name:"TubeUserId",__name:"TubeUserId",setup(a){const k=m(),U=g(),V=s([C(U.tubeRack.tubeSettings.slice(0,5)),C(U.tubeRack.tubeSettings.slice(5,10))]),F=s(!1),T=s(""),W=s("text"),z=s();s("");const A=s({type:"barcode",item:void 0}),L=(e,a)=>!(!A.value.item||a.tubeIndex!==A.value.item.tubeIndex||e!==A.value.type),M=()=>{k.back()},O=async()=>{const e=S(V.value);(await I({uuid:U.tubeRack.uuid,setting:e})).success?(U.tubeRack.tubeSettings=e,M()):x.error("更新失败")},P=s(null),Q=s(),X=(e,a,s)=>{F.value=!0,A.value={type:e,item:a},T.value="barcode"===e?a.sampleBarcode:a.userid,F.value=!0;const l="barcode"===e?a.sampleBarcode:a.userid;T.value=l?l.toString():"",P.value=s.target.name,Q.value=a};return l(T,(e=>{P.value&&(Q.value[P.value]=e)})),(a,s)=>{const l=e;return p(),t("div",B,[o("div",R,[o("div",{class:"header-left",onClick:d(M,["stop"])},s[4]||(s[4]=[o("img",{src:j,alt:"返回"},null,-1),o("span",{class:"title"},"患者信息",-1)]))]),o("div",w,[(p(!0),t(n,null,u(V.value,((e,a)=>(p(),t("div",{class:"sample-section",key:a},[s[5]||(s[5]=v('<div class="section-labels" data-v-08d6e7d9><div class="label-column" data-v-08d6e7d9><div class="label-item" data-v-08d6e7d9><span class="label" data-v-08d6e7d9>条形码</span></div><div class="label-item" data-v-08d6e7d9><span class="label" data-v-08d6e7d9>用户ID</span></div></div></div>',1)),o("div",K,[(p(!0),t(n,null,u(e,(e=>(p(),t("div",{class:"sample-item",key:e.tubeIndex},[o("div",q,[o("div",D,b(e.tubeIndex+1),1),o("div",N,[i(h,{tube:e,showNum:!1,showUserId:!1,onClickTubeItem:s[0]||(s[0]=()=>{})},null,8,["tube"])]),o("div",E,[f(o("input",{class:_(["input-field",{onFocus:L("barcode",e)}]),"onUpdate:modelValue":a=>e.sampleBarcode=a,name:"sampleBarcode",placeholder:"条形码",onFocus:a=>X("barcode",e,a),readonly:""},null,42,G),[[y,e.sampleBarcode]]),f(o("input",{class:_(["input-field",{onFocus:L("userid",e)}]),"onUpdate:modelValue":a=>e.userid=a,name:"userid",placeholder:"用户ID",onFocus:a=>X("userid",e,a),readonly:""},null,42,H),[[y,e.userid]])])])])))),128))])])))),128))]),o("div",{class:"footer"},[o("button",{class:"btn cancel",onClick:M},"取消"),o("button",{class:"btn confirm",onClick:O},"确定")]),i(c,{name:"slide-up"},{default:r((()=>[o("div",J,[i(l,{ref_key:"softKeyboardRef",ref:z,modelValue:T.value,"onUpdate:modelValue":s[1]||(s[1]=e=>T.value=e),"is-visible":F.value,"keyboard-type":W.value,onUpdateKeyboardVisible:s[2]||(s[2]=e=>F.value=e),onConfirm:()=>{},onClose:s[3]||(s[3]=e=>F.value=!1)},null,8,["modelValue","is-visible","keyboard-type"])])])),_:1})])}}}),[["__scopeId","data-v-08d6e7d9"]]);export{W as default};
