| 1 |
- var p=(v,F,m)=>new Promise((l,r)=>{var h=d=>{try{n(m.next(d))}catch(B){r(B)}},S=d=>{try{n(m.throw(d))}catch(B){r(B)}},n=d=>d.done?l(d.value):Promise.resolve(d.value).then(h,S);n((m=m.apply(v,F)).next())});import{a as W,B as X,u as Y}from"./index.3ccc18ac.js";import{T as Z}from"./index.33b2f319.js";import{B as y}from"./TableImg.0cd3291c.js";import"./BasicForm.d58d202f.js";import{u as ee}from"./useTable.578ae310.js";import{E as te,p as ae}from"./index.4851d3a4.js";import{r as E,j as oe}from"./busPatientApi.88d3ef24.js";import{j as se,a as k,bR as ie,r as _,l as ue,a9 as M,o as C,Q as ne,x as a,e as w,au as le,T as re,h as t,f,i as o,y as c,z as u,B as de,n as A,R as ce,ae as me,eK as pe,eL as ve,aa as fe,O as _e}from"./index.ae52ebae.js";/* empty css */import{R as he}from"./index.0321d0be.js";import{D as Be}from"./index.c1d6a1f9.js";import{D as De,a as g}from"./index.209e9c16.js";import{R as Ce,C as T}from"./index.5e5e8ba1.js";import"./useWindowSizeFn.d176b3a5.js";import"./FullscreenOutlined.b9fd5be6.js";import"./index.e3129508.js";import"./eagerComputed.94e91cab.js";import"./css.bcd121de.js";import"./index.adbf62a5.js";import"./index.52c33256.js";import"./index.beed4ab5.js";import"./Checkbox.919eb32a.js";import"./scrollTo.d4c332b7.js";import"./useForm.e55162bc.js";import"./index.11cb8430.js";import"./index.c4be8493.js";import"./index.ddcc0e35.js";import"./useSize.9b10dc05.js";import"./onMountedOrActivated.c176aad3.js";import"./useContentViewHeight.2a59a8a3.js";import"./ArrowLeftOutlined.0f7d1b9e.js";import"./index.a995b471.js";import"./index.14e14872.js";import"./index.4040b11d.js";import"./index.0c29338b.js";import"./index.0fe57a5b.js";import"./_baseIteratee.432be787.js";import"./get.0b1c6ac7.js";import"./DeleteOutlined.707204c0.js";import"./index.87b4cc3a.js";import"./useRefs.fe3bdf15.js";import"./Form.1cc72784.js";import"./Col.605699c9.js";import"./useFlexGapSupport.3240d255.js";import"./sortable.esm.c20789c1.js";import"./RedoOutlined.80b8c01a.js";import"./index.5d87e81e.js";import"./index.95f887db.js";import"./index.9e0f8a6b.js";import"./index.37fc506d.js";import"./index.5c0d538f.js";import"./uniqBy.7b5fdd96.js";import"./index.3eedf359.js";import"./index.3b88ad02.js";import"./useContextMenu.6088df26.js";import"./busConstantApi.27f88676.js";import"./params.cdcdde57.js";import"./busHospitalConfigApi.7ecc8807.js";const Fe=[{title:"\u6CF5\u53F7",dataIndex:"deviceId",width:160},{title:"\u6CF5\u522B\u540D",dataIndex:"deviceAlias"},{title:"\u6CF5\u72B6\u6001",dataIndex:"deviceRunState",slots:{customRender:"deviceRunState"}},{title:"\u76D1\u63A7\u72B6\u6001",dataIndex:"deviceAlarm",slots:{customRender:"deviceAlarm"}},{title:"\u5F00\u59CB\u65F6\u95F4",dataIndex:"infusionStartTime",width:160},{title:"\u8BBE\u4E3A\u76D1\u63A7",dataIndex:"master",slots:{customRender:"master"},width:100}],Ie=[{title:"\u6CF5\u53F7",dataIndex:"deviceId",width:120},{title:"\u6CF5\u522B\u540D",dataIndex:"deviceAlias",width:80},{title:"\u6CF5\u72B6\u6001",dataIndex:"deviceRunState",slots:{customRender:"deviceRunState"},width:100},{title:"\u5F00\u59CB\u65F6\u95F4",dataIndex:"infusionStartTime",width:110},{title:"\u72B6\u6001",dataIndex:"deviceAlarm",slots:{customRender:"deviceAlarm"},width:60}];const N=v=>(pe("data-v-064f6b68"),v=v(),ve(),v),ge={key:0,class:"listB"},we={class:"listB-item__head"},Se={class:"listB-item__head-tit"},be={class:"listB-item__head-tit-small"},Re={key:1},xe=N(()=>f("div",{class:"common-tit"},"\u8BBE\u5907\u4FE1\u606F",-1)),ye=N(()=>f("div",{class:"common-tit"},"\u8BF7\u586B\u5199\u64A4\u6CF5\u4FE1\u606F",-1)),Ee=k({__name:"TableModal",setup(v){const{hasPermission:F}=ie(),m=_("\u91CD\u590D\u8BBE\u5907\u4FE1\u606F"),l=_(!1),r=_([]),h=ue(),S=M(),n=_([]),d=_(),B=_([]),b=_(!1),[V,{getSelectRowKeys:K,setTableData:O,reload:P}]=ee({rowKey:"deviceId",columns:Ie,rowSelection:{type:"checkbox"},showIndexColumn:!1,useSearchForm:!1,showTableSetting:!1,bordered:!0,pagination:!1}),[L,{setModalProps:U,closeModal:$}]=W(i=>p(this,null,function*(){U({confirmLoading:!1}),x()}));function x(){return p(this,null,function*(){r.value=yield E();let i=r.value.length;m.value="\u91CD\u590D\u8BBE\u5907\u4FE1\u606F("+i+")"})}function j(i){return p(this,null,function*(){b.value=!0,l.value=!0,d.value=i,n.value=ae;for(let e in n.value)n.value[e].value=i[n.value[e].field];yield me();let D=i.devices.filter(e=>e.master==0);O(D)})}function z(i,D){return p(this,null,function*(){var I;if(!F(["bus:clinic:edit"]))return;let e=D.devices.filter(R=>R.deviceId!=i.deviceId).map(R=>R.deviceId),s={patientCode:D.code,patientId:D.patientId||"",masterDeviceId:i.deviceId,replicaDeviceIds:e,tenantId:(I=h.getUserInfo)==null?void 0:I.tenantId};yield oe(s),r.value=yield E()})}function H(i){return p(this,null,function*(){l.value=!1,i||S.setAlarmModal(!1)})}function Q(){return p(this,null,function*(){$()})}function q(){B.value=K()}function G(){return p(this,null,function*(){l.value=!1,yield P(),yield x()})}function J(){return p(this,null,function*(){return b.value?(l.value=!1,b.value=!1,!1):!0})}return(i,D)=>(C(),ne(t(X),ce(i.$attrs,{destroyOnClose:"",width:"1000px",title:m.value,minHeight:500,onRegister:t(L),onOk:Q,onVisibleChange:H,okText:"\u5173\u95ED",cancelText:"\u8FD4\u56DE",closeFunc:J,showCancelBtn:l.value}),{default:a(()=>[l.value?(C(),w("div",Re,[o(t(Ce),null,{default:a(()=>[o(t(T),{span:"16"},{default:a(()=>[f("div",null,[o(t(Z),{title:"\u60A3\u8005\u4FE1\u606F",data:t(n)},null,8,["data"])]),xe,o(t(y),{onRegister:t(V),onSelectionChange:q},{deviceRunState:a(({record:e})=>{var s;return[c(u((s=e.deviceRunState)==null?void 0:s.text),1)]}),deviceAlarm:a(({record:e})=>[f("span",{class:A([e.master==0?"color-red":"color-green"])},u(e.master==0?"\u91CD\u590D":"\u76D1\u63A7\u4E2D"),3)]),_:1},8,["onRegister"])]),_:1}),o(t(T),{span:"8"},{default:a(()=>[ye,o(t(te),{data:d.value,isUndo:!0,deviceIds:B.value,onSuccess:G},null,8,["data","deviceIds"])]),_:1})]),_:1})])):(C(),w("div",ge,[(C(!0),w(le,null,re(t(r),e=>(C(),w("div",{key:e.id,class:"listB-item"},[f("div",we,[o(t(De),{column:6},{title:a(()=>[f("h3",Se,[c(u(e.name)+" ",1),f("small",be,u(e.code),1)])]),extra:a(()=>[o(t(de),{type:"primary",onClick:s=>j(e)},{default:a(()=>[c("\u6279\u91CF\u64A4\u6CF5")]),_:2},1032,["onClick"])]),default:a(()=>[o(t(g),{label:"\u6027\u522B"},{default:a(()=>{var s;return[c(u((s=e.gender)==null?void 0:s.text),1)]}),_:2},1024),o(t(g),{label:"\u5E74\u9F84"},{default:a(()=>[c(u(e.age||0),1)]),_:2},1024),o(t(g),{label:"\u75C5\u533A"},{default:a(()=>[c(u(e.ward),1)]),_:2},1024),o(t(g),{label:"\u5E8A\u53F7"},{default:a(()=>[c(u(e.bedNo),1)]),_:2},1024),o(t(g),{label:"\u624B\u672F\u540D",span:2},{default:a(()=>[c(u(e.clinicName),1)]),_:2},1024)]),_:2},1024)]),o(t(y),{columns:t(Fe),dataSource:e.devices,striped:!0,bordered:!0,pagination:!1,showIndexColumn:!0,rowKey:"deviceRunningId",onRowClick:s=>z(s,e),class:"listB-item__body"},{deviceRunState:a(({record:s})=>{var I;return[c(u((I=s.deviceRunState)==null?void 0:I.text),1)]}),deviceAlarm:a(({record:s})=>[f("span",{class:A([s.master==0?"color-red":"color-green"])},u(s.master==0?"\u91CD\u590D":"\u76D1\u63A7\u4E2D"),3)]),master:a(({record:s})=>[o(t(he),{checked:!!s.master},null,8,["checked"])]),_:2},1032,["columns","dataSource","onRowClick"]),o(t(Be))]))),128))]))]),_:1},16,["title","onRegister","showCancelBtn"]))}});var Ae=se(Ee,[["__scopeId","data-v-064f6b68"]]);const Kt=k({__name:"index",props:{count:{type:Number,default:0}},setup(v){const[F,{openModal:m}]=Y(),l=M();fe(()=>l.getAlarmModal,h=>{h&&r()});function r(){m(!0,{})}return(h,S)=>{const n=_e("a-button");return C(),w("div",null,[o(n,{type:"primary",color:"warning",class:"mt-2",block:"",onClick:r},{default:a(()=>[c(" \u91CD\u590D\u8BBE\u5907\u4FE1\u606F ( "+u(v.count)+" ) ",1)]),_:1}),o(Ae,{onRegister:t(F)},null,8,["onRegister"])])}}});export{Kt as default};
|