import{_ as e}from"./SoftKeyboard-BLcsSwTx.js";import{e as a,r as s,w as l,a as t,b as o,a1 as d,J as n,L as u,q as i,s as r,ad as c,D as m,o as p,av as v,t as b,G as f,am as y,n as _,_ as g}from"./index-D8tPjwDN.js";import j from"./left-9QZPf6PC.js";import{u as k,d as h}from"./testTube-2pHOon0Y.js";import{T as I}from"./Tube-ZVKPjuR7.js";import{e as x}from"./index-DGBKTRr-.js";import{_ as U}from"./consumables-MurZLn2q.js";import{_ as T}from"./_curry1-D3PJq_hl.js";import{_ as V}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-DJHgdVw6.js";import"./socket-CtIqJ6J7.js";function F(e){return function e(a){for(var s,l,t,o=[],d=0,n=a.length;d<n;){if(V(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=T((function(e){return null!=e&&"function"==typeof e.clone?e.clone():U(e,!0)})),S=T(F());const B={id:"changeUser-container"},R={class:"header"},w={class:"content"},K={class:"samples-grid"},D={class:"sample-content"},q={class:"item-index"},G={class:"tube-circle"},J={class:"inputs"},H=["onUpdate:modelValue","onFocus"],L=["onUpdate:modelValue","onFocus"],N={class:"keyboard-container"},O=g(a({name:"TubeUserId",__name:"TubeUserId",setup(a){const g=m(),U=k(),T=s([C(U.tubeRack.tubeSettings.slice(0,5)),C(U.tubeRack.tubeSettings.slice(5,10))]),V=s(!1),F=s(""),O=s("text"),W=s();s("");const X=s({type:"barcode",item:void 0}),z=(e,a)=>!(!X.value.item||a.tubeIndex!==X.value.item.tubeIndex||e!==X.value.type),A=()=>{g.back()},E=async()=>{const e=S(T.value);(await h({uuid:U.tubeRack.uuid,setting:e})).success?(U.tubeRack.tubeSettings=e,A()):x.error("更新失败")},M=s(null),P=s(),Q=(e,a,s)=>{V.value=!0,X.value={type:e,item:a},F.value="barcode"===e?a.sampleBarcode:a.userid,V.value=!0;const l="barcode"===e?a.sampleBarcode:a.userid;F.value=l?l.toString():"",M.value=s.target.name,P.value=a};return l(F,(e=>{M.value&&(P.value[M.value]=e)})),(a,s)=>{const l=e;return p(),t("div",B,[o("div",R,[o("div",{class:"header-left",onClick:d(A,["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(T.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",D,[o("div",q,b(e.tubeIndex+1),1),o("div",G,[i(I,{tube:e,showNum:!1,showUserId:!1,onClickTubeItem:s[0]||(s[0]=()=>{})},null,8,["tube"])]),o("div",J,[f(o("input",{class:_(["input-field",{onFocus:z("barcode",e)}]),"onUpdate:modelValue":a=>e.sampleBarcode=a,name:"sampleBarcode",placeholder:"条形码",onFocus:a=>Q("barcode",e,a),readonly:""},null,42,H),[[y,e.sampleBarcode]]),f(o("input",{class:_(["input-field",{onFocus:z("userid",e)}]),"onUpdate:modelValue":a=>e.userid=a,name:"userid",placeholder:"用户ID",onFocus:a=>Q("userid",e,a),readonly:""},null,42,L),[[y,e.userid]])])])])))),128))])])))),128))]),o("div",{class:"footer"},[o("button",{class:"btn cancel",onClick:A},"取消"),o("button",{class:"btn confirm",onClick:E},"确定")]),i(c,{name:"slide-up"},{default:r((()=>[o("div",N,[i(l,{ref_key:"softKeyboardRef",ref:W,modelValue:F.value,"onUpdate:modelValue":s[1]||(s[1]=e=>F.value=e),"is-visible":V.value,"keyboard-type":O.value,onUpdateKeyboardVisible:s[2]||(s[2]=e=>V.value=e),onConfirm:()=>{},onClose:s[3]||(s[3]=e=>V.value=!1)},null,8,["modelValue","is-visible","keyboard-type"])])])),_:1})])}}}),[["__scopeId","data-v-08d6e7d9"]]);export{O as default};
