血透系统PC前端

home.vue 206KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557
  1. <template>
  2. <div class="main-contain">
  3. <div class="position">
  4. <bread-crumb :crumbs='crumbs'></bread-crumb>
  5. </div>
  6. <div class="app-container">
  7. <el-container>
  8. <div style="width:22%">
  9. <el-row>
  10. <el-col :span="24">
  11. <span class="zone">分&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;区:</span>
  12. <el-select v-model="forms.zone_id" placeholder="请选择" class="a" @change="changeBedNumber" style="width:70%" :disabled="zoneDisabled">
  13. <el-option
  14. v-for="item in bedZone"
  15. :key="item.id"
  16. :label="item.name"
  17. :value="item.id"
  18. >
  19. </el-option>
  20. </el-select>
  21. </el-col>
  22. </el-row>
  23. <!-- <el-row>-->
  24. <!-- <el-col>-->
  25. <!-- <span class="zone">班&nbsp;&nbsp;&nbsp;&nbsp;次:</span>-->
  26. <!-- <el-select v-model="forms.class_id" placeholder="请选择" class="a" @change="changeClassId" style="width:125px">-->
  27. <!-- <el-option-->
  28. <!-- v-for="item in Classes"-->
  29. <!-- :key="item.id"-->
  30. <!-- :label="item.name"-->
  31. <!-- :value="item.id">-->
  32. <!-- </el-option>-->
  33. <!-- </el-select>-->
  34. <!-- </el-col>-->
  35. <!-- </el-row>-->
  36. <el-row>
  37. <el-col>
  38. <span class="zone">设备类型:</span>
  39. <el-select v-model="forms.device_type" placeholder="请选择" class="a" @change="changeDeviceId" style="width:70%">
  40. <el-option
  41. v-for="item in DeviceTypeType"
  42. :key="item.id"
  43. :label="item.name"
  44. :value="item.id">
  45. </el-option>
  46. </el-select>
  47. </el-col>
  48. </el-row>
  49. <el-row>
  50. <el-table
  51. ref="singleTable"
  52. :data="tableDatatwo"
  53. highlight-current-row
  54. border
  55. @current-change="handleCurrentChange"
  56. height="440"
  57. :row-style="{ color: '#303133' }"
  58. :header-cell-style="{
  59. backgroundColor: 'rgb(245, 247, 250)',
  60. color: '#606266'
  61. }"
  62. >
  63. <el-table-column
  64. prop="date"
  65. label="设备名称"
  66. width="90"
  67. align="center"
  68. >
  69. <template slot-scope="scope">
  70. <div @click="handleIndex(scope.$index)">{{scope.row.device_name}}</div>
  71. </template>
  72. </el-table-column>
  73. <el-table-column
  74. prop="name"
  75. label="设备型号"
  76. width="90"
  77. align="center">
  78. <template slot-scope="scope">
  79. <div @click="handleIndex(scope.$index)">{{scope.row.device_mode}}</div>
  80. </template>
  81. </el-table-column>
  82. <el-table-column
  83. prop="address"
  84. label="机位号"
  85. align="center"
  86. widwid="60">
  87. <template slot-scope="scope">
  88. <div @click="handleIndex(scope.$index)">{{scope.row.bed_number}}</div>
  89. </template>
  90. </el-table-column>
  91. </el-table>
  92. </el-row>
  93. </div>
  94. <el-main>
  95. <div class="main newMain">
  96. <div class="newButtonOne">
  97. <el-button
  98. type="success"
  99. @click="clickQuery()"
  100. >
  101. 综合查询
  102. </el-button>
  103. </div>
  104. <el-tabs v-model="activeName" @tab-click="handleClick">
  105. <!-- 透析机基本信息 -->
  106. <el-tab-pane label="基本信息" name="first" >
  107. <!-- 透析机基本信息 -->
  108. <div class="disinfectOne newDisinfectOne" v-show="tShow">
  109. <el-row>
  110. <div class="b">
  111. <el-button @click="UpdateMachine()">修改</el-button>
  112. </div>
  113. </el-row>
  114. <el-row>
  115. <el-form :model="form" ref="form" :rules="rules">
  116. <el-row>
  117. <el-col :span="8">
  118. <el-form-item label="序列号:" required prop="serial_number">
  119. <el-input style="width:150px" v-model="form.serial_number" :disabled="disableThree"></el-input>
  120. </el-form-item>
  121. </el-col>
  122. <el-col :span="8">
  123. <el-form-item label="设备类型:" required prop="devicetype">
  124. <el-select style="width:150px" v-model="form.devicetype" :disabled="true">
  125. <el-option v-for="item in this.DeviceTypes" :key="item.id" :label="item.name" :value="item.id" ></el-option>
  126. </el-select>
  127. </el-form-item>
  128. </el-col>
  129. <el-col :span="8">
  130. <el-form-item label="机位号:">
  131. <el-select style="width:150px" v-model="form.bed_number" :disabled="disableThree">
  132. <el-option v-for="item in this.Number" :key="item.bed_id" :label="item.bed_number" :value="item.bed_id"></el-option>
  133. </el-select>
  134. </el-form-item>
  135. </el-col>
  136. </el-row>
  137. <el-row>
  138. <el-col :span="8">
  139. <el-form-item label="设备名称:" required prop="device_name">
  140. <el-input style="width:150px" v-model="form.device_name" :disabled="disableThree"></el-input>
  141. </el-form-item>
  142. </el-col>
  143. <el-col :span="8">
  144. <el-form-item label="生产厂家:">
  145. <el-input style="width:150px" v-model="form.manufacture_factory" :disabled="disableThree"></el-input>
  146. </el-form-item>
  147. </el-col>
  148. <el-col :span="8">
  149. <el-form-item label="维修厂家:">
  150. <el-input style="width:150px" v-model="form.service_manufacturer" :disabled="disableThree"></el-input>
  151. </el-form-item>
  152. </el-col>
  153. </el-row>
  154. <el-row>
  155. <el-col :span="8">
  156. <el-form-item label="设备型号:" required prop="unit_type">
  157. <el-select style="width:150px" v-model="form.unit_type" :disabled="disableThree">
  158. <el-option
  159. v-for="item in this.deviceMode"
  160. :key="item.id"
  161. :label="item.device_mode"
  162. :value="item.id"
  163. ></el-option>
  164. </el-select>
  165. </el-form-item>
  166. </el-col>
  167. <el-col :span="8">
  168. <el-form-item label="使用科室:">
  169. <el-input style="width:150px" v-model="form.use_section" :disabled="disableThree"></el-input>
  170. </el-form-item>
  171. </el-col>
  172. <el-col :span="8">
  173. <el-form-item label="科室编号:">
  174. <el-input style="width:150px" v-model="form.section_number" :disabled="disableThree"></el-input>
  175. </el-form-item>
  176. </el-col>
  177. </el-row>
  178. <el-row>
  179. <el-col :span="8">
  180. <el-form-item label="购买日期:">
  181. <el-date-picker
  182. v-model="form.buy_date"
  183. prefix-icon="none"
  184. type="date"
  185. placeholder="请选择"
  186. format="yyyy-MM-dd"
  187. value-format="yyyy-MM-dd"
  188. style="width:150px"
  189. :disabled="disableThree">
  190. </el-date-picker>
  191. </el-form-item>
  192. </el-col>
  193. <el-col :span="8">
  194. <el-form-item label="安装日期:">
  195. <el-date-picker
  196. v-model="form.install_date"
  197. prefix-icon="none"
  198. type="date"
  199. placeholder="请选择"
  200. format="yyyy-MM-dd"
  201. value-format="yyyy-MM-dd"
  202. style="width:150px"
  203. :disabled="disableThree">
  204. </el-date-picker>
  205. </el-form-item>
  206. </el-col>
  207. <el-col :span="8">
  208. <el-form-item label="启用日期:">
  209. <el-date-picker
  210. v-model="form.start_date"
  211. prefix-icon="none"
  212. type="date"
  213. placeholder="请选择"
  214. format="yyyy-MM-dd"
  215. value-format="yyyy-MM-dd"
  216. style="width:150px"
  217. :disabled="disableThree">
  218. </el-date-picker>
  219. </el-form-item>
  220. </el-col>
  221. <el-col :span="8">
  222. <el-form-item label="维修工程师:">
  223. <el-input style="width:150px" v-model="form.maintenance_engineer" :disabled="disableThree"></el-input>
  224. </el-form-item>
  225. </el-col>
  226. <el-col :span="8">
  227. <el-form-item label="联系电话:">
  228. <el-input style="width:150px" v-model="form.telephone" :disabled="disableThree"></el-input>
  229. </el-form-item>
  230. </el-col>
  231. <el-col :span="8">
  232. <el-form-item label="保修期限:">
  233. <el-input style="width:150px" v-model="form.guarantee_date" :disabled="disableThree"></el-input>
  234. </el-form-item>
  235. </el-col>
  236. </el-row>
  237. <el-row>
  238. <el-col :span="8">
  239. <el-form-item label="机器状态:">
  240. <el-select style="width:150px" v-model="form.machine_status" @change="changeMachineStatus">
  241. <el-option v-for="item in machineStatus" :key="item.id" :label="item.name" :value="item.id" :disabled="disableThree"></el-option>
  242. </el-select>
  243. </el-form-item>
  244. </el-col>
  245. <el-col :span="8">
  246. <el-form-item label="初次使用次数:">
  247. <el-input v-model="form.user_total" style="width:150px" :disabled="disableThree"></el-input>
  248. </el-form-item>
  249. </el-col>
  250. <el-col :span="8">
  251. <el-form-item label="备注:">
  252. <el-input style="width:150px" v-model="form.remarks" :disabled="disableThree"></el-input>
  253. </el-form-item>
  254. </el-col>
  255. </el-row>
  256. <el-row>
  257. <el-col :span="8">
  258. <el-form-item label="报废日期:">
  259. <el-date-picker
  260. v-model="form.rubbish_date"
  261. prefix-icon="none"
  262. type="date"
  263. placeholder="请选择"
  264. format="yyyy-MM-dd"
  265. value-format="yyyy-MM-dd"
  266. style="width:150px"
  267. :disabled="disableThree">
  268. </el-date-picker>
  269. </el-form-item>
  270. </el-col>
  271. <el-col :span="8">
  272. <el-form-item label="报废原因:">
  273. <el-select style="width:150px" v-model="form.rubbish_reason" :disabled="readisable">
  274. <el-option v-for="item in this.DisCardResion" :key="item.id" :label="item.name" :value="item.id" :disabled="disableThree"></el-option>
  275. </el-select>
  276. </el-form-item>
  277. </el-col>
  278. <el-col :span="8">
  279. <el-form-item label="使用年限(年):">
  280. <el-input style="width:150px" v-model="form.user_year" :disabled="disableThree"></el-input>
  281. </el-form-item>
  282. </el-col>
  283. </el-row>
  284. <el-row>
  285. <el-col :span="8">
  286. <el-form-item label="工作时长(时):">
  287. <el-input style="width:150px" v-model="form.work_time" :disabled="disableThree"></el-input>
  288. </el-form-item>
  289. </el-col>
  290. </el-row>
  291. <el-row>
  292. <el-form-item label="治疗模式:">
  293. <el-checkbox-group v-model="form.treat_mode" @change="handleCheckedCitiesChange">
  294. <el-checkbox v-for="city in cities" :label="city" :key="city">{{city}}</el-checkbox>
  295. </el-checkbox-group>
  296. </el-form-item>
  297. </el-row>
  298. <el-row>
  299. <el-col>
  300. <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox>
  301. </el-col>
  302. </el-row>
  303. <el-row>
  304. <div class="but">
  305. <el-col :span="12">
  306. <el-button size="medium" v-show="cancelShow" @click="cleanMainchine">取消</el-button>
  307. </el-col>
  308. <el-col :span="8">
  309. <el-button type="primary" size="medium" v-show="confirmShow" @click="UpdateMachineInfo('form')">保存</el-button>
  310. </el-col>
  311. </div>
  312. </el-row>
  313. </el-form>
  314. </el-row>
  315. </div>
  316. <!-- 水处理机基本信息 -->
  317. <div v-show="sShow">
  318. <el-row>
  319. <div class="b">
  320. <el-button size="small" @click="UpdateMachine()">修改</el-button>
  321. </div>
  322. </el-row>
  323. <el-row>
  324. <el-form :model="form" ref="form" :rules="rules">
  325. <el-row>
  326. <el-col :span="7">
  327. <el-form-item label="序列号:" required prop="serial_number">
  328. <el-input style="width:150px" v-model="form.serial_number" :disabled="disableFour"></el-input>
  329. </el-form-item>
  330. </el-col>
  331. <el-col :span="7">
  332. <el-form-item label="设备类型:" required prop="devicetype">
  333. <el-select style="width:150px" v-model="form.devicetype" :disabled="true">
  334. <el-option v-for="item in this.DeviceTypes" :key="item.id" :label="item.name" :value="item.id" :disabled="disableFour" ></el-option>
  335. </el-select>
  336. </el-form-item>
  337. </el-col>
  338. <el-col :span="7">
  339. <el-form-item label="机位号">
  340. <el-input style="width:150px" v-model="form.beds" :disabled="disableFour"></el-input>
  341. </el-form-item>
  342. </el-col>
  343. </el-row>
  344. <el-row>
  345. <el-col :span="7">
  346. <el-form-item label="设备名称:" required prop="device_name">
  347. <el-input style="width:150px" v-model="form.device_name" :disabled="disableFour"></el-input>
  348. </el-form-item>
  349. </el-col>
  350. <el-col :span="7">
  351. <el-form-item label="生产厂家:">
  352. <el-input style="width:150px" v-model="form.manufacture_factory" :disabled="disableFour"></el-input>
  353. </el-form-item>
  354. </el-col>
  355. <el-col :span="7">
  356. <el-form-item label="维修厂家:">
  357. <el-input style="width:150px" v-model="form.service_manufacturer" :disabled="disableFour"></el-input>
  358. </el-form-item>
  359. </el-col>
  360. </el-row>
  361. <el-row>
  362. <el-col :span="7">
  363. <el-form-item label="设备型号:" required prop="unit_type">
  364. <el-select style="width:135px" v-model="form.unit_type" :disabled="disableFour">
  365. <el-option
  366. v-for="item in this.deviceMode"
  367. :key="item.id"
  368. :label="item.device_mode"
  369. :value="item.id"
  370. ></el-option>
  371. </el-select>
  372. </el-form-item>
  373. </el-col>
  374. <el-col :span="7">
  375. <el-form-item label="使用科室:">
  376. <el-input style="width:150px" v-model="form.use_section" :disabled="disableFour"></el-input>
  377. </el-form-item>
  378. </el-col>
  379. <el-col :span="7">
  380. <el-form-item label="科室编号:">
  381. <el-input style="width:150px" v-model="form.section_number" :disabled="disableFour"></el-input>
  382. </el-form-item>
  383. </el-col>
  384. </el-row>
  385. <el-row>
  386. <el-col :span="7">
  387. <el-form-item label="购买日期:">
  388. <el-date-picker
  389. v-model="form.buy_date"
  390. prefix-icon="none"
  391. type="date"
  392. placeholder="请选择"
  393. format="yyyy-MM-dd"
  394. value-format="yyyy-MM-dd"
  395. style="width:150px"
  396. :disabled="disableFour">
  397. </el-date-picker>
  398. </el-form-item>
  399. </el-col>
  400. <el-col :span="7">
  401. <el-form-item label="安装日期:">
  402. <el-date-picker
  403. v-model="form.install_date"
  404. prefix-icon="none"
  405. type="date"
  406. placeholder="请选择"
  407. format="yyyy-MM-dd"
  408. value-format="yyyy-MM-dd"
  409. style="width:150px"
  410. :disabled="disableFour">
  411. </el-date-picker>
  412. </el-form-item>
  413. </el-col>
  414. <el-col :span="7">
  415. <el-form-item label="启用日期:">
  416. <el-date-picker
  417. v-model="form.start_date"
  418. prefix-icon="none"
  419. type="date"
  420. placeholder="请选择"
  421. format="yyyy-MM-dd"
  422. value-format="yyyy-MM-dd"
  423. style="width:150px"
  424. :disabled="disableFour">
  425. </el-date-picker>
  426. </el-form-item>
  427. </el-col>
  428. <el-col :span="7">
  429. <el-form-item label="维修工程师:">
  430. <el-input style="width:150px" v-model="form.maintenance_engineer" :disabled="disableFour"></el-input>
  431. </el-form-item>
  432. </el-col>
  433. <el-col :span="7">
  434. <el-form-item label="联系电话:">
  435. <el-input style="width:150px" v-model="form.telephone" :disabled="disableFour"></el-input>
  436. </el-form-item>
  437. </el-col>
  438. <el-col :span="7">
  439. <el-form-item label="保修期限:">
  440. <el-input style="width:150px" v-model="form.guarantee_date" :disabled="disableFour"></el-input>
  441. </el-form-item>
  442. </el-col>
  443. </el-row>
  444. <el-row>
  445. <el-col :span="7">
  446. <el-form-item label="机器状态:">
  447. <el-select style="width:150px" v-model="form.machine_status" :disabled="disableFour">
  448. <el-option v-for="item in machineStatus" :key="item.id" :label="item.name" :value="item.id" ></el-option>
  449. </el-select>
  450. </el-form-item>
  451. </el-col>
  452. <el-col :span="7">
  453. <el-form-item label="备注:">
  454. <el-input style="width:150px" v-model="form.remarks" :disabled="disableFour"></el-input>
  455. </el-form-item>
  456. </el-col>
  457. <el-col :span="7">
  458. <el-form-item label="报废日期:">
  459. <el-date-picker
  460. v-model="form.rubbish_date"
  461. prefix-icon="none"
  462. type="date"
  463. placeholder="请选择"
  464. format="yyyy-MM-dd"
  465. value-format="yyyy-MM-dd"
  466. style="width:135px"
  467. :disabled="disableFour">
  468. </el-date-picker>
  469. </el-form-item>
  470. </el-col>
  471. </el-row>
  472. <el-row>
  473. <el-col :span="7">
  474. <el-form-item label="报废原因:">
  475. <el-select style="width:150px" v-model="form.rubbish_reason" :disabled="disableFour">
  476. <el-option v-for="item in this.DisCardResion" :key="item.id" :label="item.name" :value="item.id" ></el-option>
  477. </el-select>
  478. </el-form-item>
  479. </el-col>
  480. <el-col :span="7">
  481. <el-form-item label="使用年限(年):">
  482. <el-input style="width:150px" v-model="form.user_year" :disabled="disableFour"></el-input>
  483. </el-form-item>
  484. </el-col>
  485. <el-col :span="7">
  486. <el-form-item label="工作时长(h):">
  487. <el-input style="width:150px" v-model="form.work_time" :disabled="disableFour"></el-input>
  488. </el-form-item>
  489. </el-col>
  490. </el-row>
  491. <el-row>
  492. <el-col :span="8">
  493. <el-form-item label="消毒方式:">
  494. <el-select style="width:135px" v-model="form.Disinfection_mode" :disabled="disableFour">
  495. <el-option
  496. v-for="item in this.DisinfectionMode"
  497. :key="item.id"
  498. :label="item.name"
  499. :value="item.id"
  500. ></el-option>
  501. </el-select>
  502. </el-form-item>
  503. </el-col>
  504. <el-col :span="8">
  505. <el-form-item label="反渗模式:">
  506. <el-select style="width:135px" v-model="form.revers_mode" :disabled="disableFour">
  507. <el-option
  508. v-for="item in this.reverseMode"
  509. :key="item.id"
  510. :label="item.name"
  511. :value="item.id"
  512. ></el-option>
  513. </el-select>
  514. </el-form-item>
  515. </el-col>
  516. </el-row>
  517. <el-row>
  518. <div class="but">
  519. <el-col :span="12">
  520. <el-button size="medium" v-show="cancelShow" @click="cleanMainchine">取消</el-button>
  521. </el-col>
  522. <el-col :span="8">
  523. <el-button type="primary" size="medium" v-show="confirmShow" @click="UpdateMachineInfoTwo('form')">保存</el-button>
  524. </el-col>
  525. </div>
  526. </el-row>
  527. </el-form>
  528. </el-row>
  529. </div>
  530. <!-- 其他信息 -->
  531. <div v-show="qShow" class="disinfectOne">
  532. <el-row>
  533. <div class="b">
  534. <el-button size="small" @click="UpdateMachine()">修改</el-button>
  535. </div>
  536. </el-row>
  537. <el-form :model="form" ref="form" :rules="rules">
  538. <el-row>
  539. <el-col :span="8">
  540. <el-form-item label="序列号:" required prop="serial_number">
  541. <el-input style="width:150px" v-model="form.serial_number" :disabled="disableFive"></el-input>
  542. </el-form-item>
  543. </el-col>
  544. <el-col :span="8">
  545. <el-form-item label="设备类型:" required prop="devicetype">
  546. <el-select style="width:150px" v-model="form.devicetype" :disabled="true">
  547. <el-option v-for="item in this.DeviceTypes" :key="item.id" :label="item.name" :value="item.id" ></el-option>
  548. </el-select>
  549. </el-form-item>
  550. </el-col>
  551. <el-col :span="8">
  552. <el-form-item label="机位号:">
  553. <!-- <el-select style="width:150px" v-model="form.bed_number" :disabled="true">
  554. <el-option v-for="item in this.Number" :key="item.id" :label="item.number" :value="item.id"></el-option>
  555. </el-select> -->
  556. <el-input v-model="form.bed_numbers" style="width:150px" :disabled="disableFive"></el-input>
  557. </el-form-item>
  558. </el-col>
  559. </el-row>
  560. <el-row>
  561. <el-col :span="8">
  562. <el-form-item label="设备名称:" required prop="device_name">
  563. <el-input style="width:150px" v-model="form.device_name" :disabled="disableFive"></el-input>
  564. </el-form-item>
  565. </el-col>
  566. <el-col :span="8">
  567. <el-form-item label="生产厂家:">
  568. <el-input style="width:150px" v-model="form.manufacture_factory" :disabled="disableFive"></el-input>
  569. </el-form-item>
  570. </el-col>
  571. <el-col :span="8">
  572. <el-form-item label="维修厂家:">
  573. <el-input style="width:150px" v-model="form.service_manufacturer" :disabled="disableFive"></el-input>
  574. </el-form-item>
  575. </el-col>
  576. </el-row>
  577. <el-row>
  578. <el-col :span="8">
  579. <el-form-item label="设备型号:" required prop="unit_type">
  580. <el-select style="width:135px" v-model="form.unit_type" :disabled="disableFive">
  581. <el-option
  582. v-for="item in this.deviceMode"
  583. :key="item.id"
  584. :label="item.device_mode"
  585. :value="item.id"
  586. ></el-option>
  587. </el-select>
  588. </el-form-item>
  589. </el-col>
  590. <el-col :span="8">
  591. <el-form-item label="使用科室:">
  592. <el-input style="width:150px" v-model="form.use_section" :disabled="disableFive"></el-input>
  593. </el-form-item>
  594. </el-col>
  595. <el-col :span="8">
  596. <el-form-item label="科室编号:">
  597. <el-input style="width:150px" v-model="form.section_number" :disabled="disableFive"></el-input>
  598. </el-form-item>
  599. </el-col>
  600. </el-row>
  601. <el-row>
  602. <el-col :span="8">
  603. <el-form-item label="购买日期:">
  604. <el-date-picker
  605. v-model="form.buy_date"
  606. prefix-icon="none"
  607. type="date"
  608. placeholder="请选择"
  609. format="yyyy-MM-dd"
  610. value-format="yyyy-MM-dd"
  611. style="width:150px"
  612. :disabled="disableFive">
  613. </el-date-picker>
  614. </el-form-item>
  615. </el-col>
  616. <el-col :span="8">
  617. <el-form-item label="安装日期:">
  618. <el-date-picker
  619. v-model="form.install_date"
  620. prefix-icon="none"
  621. type="date"
  622. placeholder="请选择"
  623. format="yyyy-MM-dd"
  624. value-format="yyyy-MM-dd"
  625. style="width:150px"
  626. :disabled="disableFive">
  627. </el-date-picker>
  628. </el-form-item>
  629. </el-col>
  630. <el-col :span="8">
  631. <el-form-item label="启用日期:">
  632. <el-date-picker
  633. v-model="form.start_date"
  634. prefix-icon="none"
  635. type="date"
  636. placeholder="请选择"
  637. format="yyyy-MM-dd"
  638. value-format="yyyy-MM-dd"
  639. style="width:150px"
  640. :disabled="disableFive">
  641. </el-date-picker>
  642. </el-form-item>
  643. </el-col>
  644. <el-col :span="8">
  645. <el-form-item label="维修工程师:">
  646. <el-input style="width:150px" v-model="form.maintenance_engineer" :disabled="disableFive"></el-input>
  647. </el-form-item>
  648. </el-col>
  649. <el-col :span="8">
  650. <el-form-item label="联系电话:">
  651. <el-input style="width:150px" v-model="form.telephone" :disabled="disableFive"></el-input>
  652. </el-form-item>
  653. </el-col>
  654. <el-col :span="8">
  655. <el-form-item label="保修期限:">
  656. <el-input style="width:150px" v-model="form.guarantee_date" :disabled="disableFive"></el-input>
  657. </el-form-item>
  658. </el-col>
  659. </el-row>
  660. <el-row>
  661. <el-col :span="8">
  662. <el-form-item label="机器状态:">
  663. <el-select style="width:150px" v-model="form.machine_status" @change="changeMachineStatus">
  664. <el-option v-for="item in machineStatus" :key="item.id" :label="item.name" :value="item.id" :disabled="disableFive"></el-option>
  665. </el-select>
  666. </el-form-item>
  667. </el-col>
  668. <el-col :span="8">
  669. <el-form-item label="消毒方式:">
  670. <el-select style="width:135px" v-model="form.Disinfection_mode" :disabled="disableFive">
  671. <el-option
  672. v-for="item in this.DisinfectionMode"
  673. :key="item.id"
  674. :label="item.name"
  675. :value="item.id"
  676. ></el-option>
  677. </el-select>
  678. </el-form-item>
  679. </el-col>
  680. <el-col :span="8">
  681. <el-form-item label="备注:">
  682. <el-input style="width:150px" v-model="form.remarks" :disabled="disableFive"></el-input>
  683. </el-form-item>
  684. </el-col>
  685. </el-row>
  686. <el-row>
  687. <el-col :span="8">
  688. <el-form-item label="报废日期:">
  689. <el-date-picker
  690. v-model="form.rubbish_date"
  691. prefix-icon="none"
  692. type="date"
  693. placeholder="请选择"
  694. format="yyyy-MM-dd"
  695. value-format="yyyy-MM-dd"
  696. style="width:135px"
  697. :disabled="disableFive">
  698. </el-date-picker>
  699. </el-form-item>
  700. </el-col>
  701. <el-col :span="8">
  702. <el-form-item label="报废原因:">
  703. <el-select style="width:150px" v-model="form.rubbish_reason" :disabled="readisable">
  704. <el-option v-for="item in this.DisCardResion" :key="item.id" :label="item.name" :value="item.id" :disabled="disableFive"></el-option>
  705. </el-select>
  706. </el-form-item>
  707. </el-col>
  708. <el-col :span="8">
  709. <el-form-item label="使用年限(年):">
  710. <el-input style="width:150px" v-model="form.user_year" :disabled="disableFive"></el-input>
  711. </el-form-item>
  712. </el-col>
  713. </el-row>
  714. <el-row>
  715. <el-col :span="8">
  716. <el-form-item label="工作时长:">
  717. <el-input style="width:150px" v-model="form.work_time" :disabled="disableFive"></el-input>
  718. </el-form-item>
  719. </el-col>
  720. </el-row>
  721. <el-row>
  722. <div class="but">
  723. <el-col :span="12">
  724. <el-button size="medium" v-show="cancelShow" @click="cleanMainchine">取消</el-button>
  725. </el-col>
  726. <el-col :span="8">
  727. <el-button type="primary" size="medium" v-show="confirmShow" @click="UpdateMacheineTwo('form')">保存</el-button>
  728. </el-col>
  729. </div>
  730. </el-row>
  731. </el-form>
  732. </div>
  733. </el-tab-pane>
  734. <el-tab-pane label="消毒计划" name="second">
  735. <div class="disinfect" v-show="DisShow">
  736. <div class="newButton">
  737. <el-button
  738. type="primary"
  739. size="small"
  740. @click="addPlan"
  741. >
  742. 新增计划
  743. </el-button>
  744. </div>
  745. <el-tabs type="border-card" v-model="activeNameTwo" @tab-click="handleClick" >
  746. <el-tab-pane label="当前设备计划列表" name="first">
  747. <el-row style="display: flex;align-items: center;">
  748. <el-col :span="2">
  749. <el-checkbox style="width: 30px" @change="changeCheckOne" v-model="checkAllStatus">全选</el-checkbox>
  750. </el-col>
  751. <el-col :span="2">
  752. <el-button size="small" @click="openDeleteMahcine">批量删除</el-button>
  753. </el-col>
  754. </el-row>
  755. <el-row>
  756. <el-table
  757. ref="multipleTable"
  758. @selection-change="handleSelectionChangeOne"
  759. :data="planData"
  760. border
  761. fit
  762. highlight-current-row
  763. style="width: 100%;margin-top: 10px;"
  764. :row-style="{ color: '#303133' }"
  765. :header-cell-style="{
  766. backgroundColor: 'rgb(245, 247, 250)',
  767. color: '#606266'
  768. }"
  769. >
  770. <el-table-column align="center" type="selection" width="55"></el-table-column>
  771. <el-table-column label="时间" align="center" min-width="50px">
  772. <template slot-scope="scope">
  773. {{scope.row.time}}
  774. </template>
  775. </el-table-column>
  776. <el-table-column label="班次" align="center" min-width="50px">
  777. <template slot-scope="scope">
  778. {{scope.row.classtime}}
  779. </template>
  780. </el-table-column>
  781. <el-table-column label="机表消毒方式" align="center" min-width="110px" >
  782. <template slot-scope="scope">
  783. {{scope.row.way}}
  784. </template>
  785. </el-table-column>
  786. <el-table-column label="机表消毒液" align="center" min-width="100px" >
  787. <template slot-scope="scope">
  788. {{scope.row.machine_disinfectant}}
  789. </template>
  790. </el-table-column>
  791. <el-table-column label="液路消毒方式" align="center" min-width="110px" >
  792. <template slot-scope="scope">
  793. {{scope.row.disinfectan_way}}
  794. </template>
  795. </el-table-column>
  796. <el-table-column label="液路消毒液" align="center" min-width="100px" >
  797. <template slot-scope="scope">
  798. {{scope.row.disinfectant}}
  799. </template>
  800. </el-table-column>
  801. <el-table-column label="消毒时长/min" align="center" min-width="60px" >
  802. <template slot-scope="scope">
  803. {{scope.row.disinfec_time}}
  804. </template>
  805. </el-table-column>
  806. <el-table-column label="操作" align="center" min-width="130px">
  807. <template slot-scope="scope">
  808. <el-tooltip class="item" effect="dark" content="编辑" placement="top">
  809. <el-button
  810. size="mini"
  811. type="primary"
  812. icon="el-icon-edit-outline"
  813. @click="EditMachine(scope.row.id, scope.$index)"
  814. ></el-button>
  815. </el-tooltip>
  816. <el-tooltip class="item" effect="dark" content="删除" placement="top">
  817. <el-button
  818. size="mini"
  819. type="danger"
  820. icon="el-icon-delete"
  821. @click="openDelete(scope.row.id, scope.$index)"
  822. ></el-button>
  823. </el-tooltip>
  824. </template>
  825. </el-table-column>
  826. </el-table>
  827. </el-row>
  828. </el-tab-pane>
  829. <el-tab-pane label="按机型列表" name="second">
  830. <el-row style="display: flex;align-items: center;">
  831. <el-col :span="2">
  832. <el-checkbox style="width: 30px" @change="changeCheck" v-model="checkAllStatusOne">全选</el-checkbox>
  833. </el-col>
  834. <el-col :span="2">
  835. <el-button size="small" @click="openDeleteMahcineOne">批量删除</el-button>
  836. </el-col>
  837. </el-row>
  838. <el-row>
  839. <el-table
  840. ref="multipleTableOne"
  841. @selection-change="handleSelectionChange"
  842. :row-style="{ color: '#303133' }"
  843. :header-cell-style="{
  844. backgroundColor: 'rgb(245, 247, 250)',
  845. color: '#606266'
  846. }"
  847. :data="tableData"
  848. border
  849. fit
  850. highlight-current-row
  851. style="width: 100%;margin-top: 10px;"
  852. >
  853. <el-table-column align="center" type="selection" width="55"></el-table-column>
  854. <el-table-column label="型号" align="center" min-width="60px">
  855. <template slot-scope="scope">
  856. {{scope.row.device_mode}}
  857. </template>
  858. </el-table-column>
  859. <el-table-column label="时间" align="center" min-width="60px" >
  860. <template slot-scope="scope">
  861. {{scope.row.time}}
  862. </template>
  863. </el-table-column>
  864. <el-table-column label="班次" align="center" min-width="60px" >
  865. <template slot-scope="scope">
  866. {{scope.row.classtime}}
  867. </template>
  868. </el-table-column>
  869. <el-table-column label="基表消毒方式" align="center" min-width="110px" >
  870. <template slot-scope="scope">
  871. {{scope.row.way}}
  872. </template>
  873. </el-table-column>
  874. <el-table-column label="基表消毒液" align="center" min-width="100px" >
  875. <template slot-scope="scope">
  876. {{scope.row.machine_disinfectant}}
  877. </template>
  878. </el-table-column>
  879. <el-table-column label="液路消毒方式" align="center" min-width="110px" >
  880. <template slot-scope="scope">
  881. {{scope.row.disinfectant}}
  882. </template>
  883. </el-table-column>
  884. <el-table-column label="液路消毒液" align="center" min-width="100px" >
  885. <template slot-scope="scope">
  886. {{scope.row.disinfectan_way}}
  887. </template>
  888. </el-table-column>
  889. <el-table-column label="消毒时长/min" align="center" min-width="60px" >
  890. <template slot-scope="scope">
  891. {{scope.row.disinfec_time}}
  892. </template>
  893. </el-table-column>
  894. <el-table-column label="操作" align="center" width="130px">
  895. <template slot-scope="scope">
  896. <el-tooltip class="item" effect="dark" content="编辑" placement="top">
  897. <el-button
  898. size="mini"
  899. type="primary"
  900. icon="el-icon-edit-outline"
  901. @click="EditMachine(scope.row.id, scope.$index)"
  902. ></el-button>
  903. </el-tooltip>
  904. <el-tooltip class="item" effect="dark" content="删除" placement="top">
  905. <el-button
  906. size="mini"
  907. type="danger"
  908. icon="el-icon-delete"
  909. @click="openDelete(scope.row.id, scope.$index)"
  910. ></el-button>
  911. </el-tooltip>
  912. </template>
  913. </el-table-column>
  914. </el-table>
  915. </el-row>
  916. </el-tab-pane>
  917. </el-tabs>
  918. </div>
  919. <div class="zClass" v-show="DioShow">
  920. 暂无数据
  921. </div>
  922. </el-tab-pane>
  923. <el-tab-pane label="使用登记" name="third">
  924. <div class="userbutton">
  925. <el-button type="primary" @click="ToReminders">自动生成使用登记</el-button>
  926. </div>
  927. <div v-show="UserShow">
  928. <el-tabs type="border-card" v-model="activeNameThree" @tab-click="handleClick">
  929. <el-tab-pane label="新增使用登记" name="first">
  930. <el-form :model="userform" ref="userform" :rules="userRules">
  931. <el-row>
  932. <el-col :span="8">
  933. <el-form-item label="日期:" required prop="date" class="st">
  934. <el-date-picker
  935. v-model="userform.date"
  936. prefix-icon="none"
  937. type="date"
  938. placeholder="请选择"
  939. format="yyyy-MM-dd"
  940. value-format="yyyy-MM-dd"
  941. style="width:150px">
  942. </el-date-picker>
  943. </el-form-item>
  944. </el-col>
  945. <el-col :span="8">
  946. <el-form-item label="班次:" required prop="classtype" class="st">
  947. <el-select v-model="userform.classtype" placeholder="请选择" style="width:150px">
  948. <el-option
  949. v-for="item in classType"
  950. :key="item.id"
  951. :label="item.name"
  952. :value="item.id"
  953. style="width:90px">
  954. </el-option>
  955. </el-select>
  956. </el-form-item>
  957. </el-col>
  958. <el-col :span="8">
  959. <el-form-item label="分区:" required prop="zone" >
  960. <el-select v-model="userform.zone" placeholder="请选择" style="width:150px" :disabled="true">
  961. <el-option
  962. v-for="item in bedZoneThree"
  963. :key="item.id"
  964. :label="item.name"
  965. :value="item.id"
  966. >
  967. </el-option>
  968. </el-select>
  969. </el-form-item>
  970. </el-col>
  971. </el-row>
  972. <el-row>
  973. <el-col :span="8">
  974. <el-form-item label="机位号:" required prop="bed_number">
  975. <el-select style="width:150px" v-model="userform.bed_number" :disabled="true">
  976. <el-option v-for="item in this.bedNumberTwo" :key="item.id" :label="item.number" :value="item.id"></el-option>
  977. </el-select>
  978. </el-form-item>
  979. </el-col>
  980. <el-col :span="8">
  981. <el-form-item label="患者:" required prop ="patient_name">
  982. <el-autocomplete
  983. style="width:150px"
  984. popper-class="my-autocomplete"
  985. v-model="userform.patient_name"
  986. :fetch-suggestions="querySearchAsync"
  987. placeholder="请输入内容"
  988. @select="handleSelect">
  989. <i
  990. class="el-icon-search el-input__icon"
  991. slot="suffix"
  992. >
  993. </i>
  994. <template slot-scope="{ item }">
  995. <span class="addr">{{ item.name }}</span>
  996. </template>
  997. </el-autocomplete>
  998. </el-form-item>
  999. </el-col>
  1000. <el-col :span="8">
  1001. <el-form-item label="传染病:">
  1002. <el-input style="width:150px" v-model="userform.contagion" :disabled="true"></el-input>
  1003. </el-form-item>
  1004. </el-col>
  1005. </el-row>
  1006. <el-row>
  1007. <el-col :span="8">
  1008. <el-form-item label="透析方式:">
  1009. <el-select v-model="userform.dialysis_mode" placeholder="请选择" style="width:150px">
  1010. <el-option
  1011. v-for="item in treatmode"
  1012. :key="item.id"
  1013. :label="item.name"
  1014. :value="item.id">
  1015. </el-option>
  1016. </el-select>
  1017. </el-form-item>
  1018. </el-col>
  1019. <el-col :span="8">
  1020. <el-form-item label="上机时间:">
  1021. <el-date-picker
  1022. type="datetime"
  1023. format="yyyy-MM-dd HH:mm"
  1024. value-format="yyyy-MM-dd HH:mm"
  1025. placeholder="选择时间"
  1026. v-model="userform.start_time"
  1027. style="width:185px"
  1028. ></el-date-picker>
  1029. </el-form-item>
  1030. </el-col>
  1031. <el-col :span="8">
  1032. <el-form-item label="下机时间:">
  1033. <el-date-picker
  1034. type="datetime"
  1035. format="yyyy-MM-dd HH:mm"
  1036. value-format="yyyy-MM-dd HH:mm"
  1037. placeholder="选择时间"
  1038. v-model="userform.end_time"
  1039. style="width:185px"
  1040. ></el-date-picker>
  1041. </el-form-item>
  1042. </el-col>
  1043. </el-row>
  1044. <el-row>
  1045. <el-col :span="8">
  1046. <el-form-item label="透析时长:">
  1047. <el-input style="width:150px" v-model="userform.dialysis_time"></el-input>
  1048. </el-form-item>
  1049. </el-col>
  1050. <el-col :span="8">
  1051. <el-form-item label="实际超滤量(L)">
  1052. <el-input style="width:150px" v-model="userform.hyperfiltratio"></el-input>
  1053. </el-form-item>
  1054. </el-col>
  1055. <el-col :span="8">
  1056. <el-form-item label="体重减少(kg):">
  1057. <el-input style="width:150px" v-model="userform.weight_loss"></el-input>
  1058. </el-form-item>
  1059. </el-col>
  1060. </el-row>
  1061. <el-row>
  1062. <el-col :span="8">
  1063. <el-form-item label="预警值:">
  1064. <el-input style="width:150px" v-model="userform.warning_value"></el-input>
  1065. </el-form-item>
  1066. </el-col>
  1067. <el-col :span="8">
  1068. <el-form-item label="使用次数:">
  1069. <el-input style="width:150px" v-model="userform.user_total" :disabled="true"></el-input>
  1070. </el-form-item>
  1071. </el-col>
  1072. <el-col :span="8">
  1073. <el-form-item label="运行:">
  1074. <el-radio-group v-model="userform.run" @change="changeRun">
  1075. <el-radio :label="gender.id" :value="gender.id" v-for="(gender, index) in runOption" :key="gender.id">{{gender.name}}</el-radio>
  1076. </el-radio-group>
  1077. </el-form-item>
  1078. </el-col>
  1079. </el-row>
  1080. <el-row>
  1081. <el-col>
  1082. <el-form-item class="stoppage" label="故障发生阶段:">
  1083. <el-radio-group v-model="userform.failure_stage" :disabled ="runDisable">
  1084. <el-radio :label="gender.id" :value="gender.id" v-for="(gender, index) in faultPhase" :key="index">{{gender.name}}</el-radio>
  1085. </el-radio-group>
  1086. </el-form-item>
  1087. </el-col>
  1088. </el-row>
  1089. <el-row>
  1090. <el-col :span="24">
  1091. <el-form-item class="stoppage" label="故障描述:">
  1092. <el-input style="width:78%" v-model="userform.fault_description"></el-input>
  1093. </el-form-item>
  1094. </el-col>
  1095. </el-row>
  1096. <el-row>
  1097. <el-col :span="24">
  1098. <el-form-item class="stoppage" label="故障提示信息及代码:">
  1099. <el-input style="width:78%" v-model="userform.code_information"></el-input>
  1100. </el-form-item>
  1101. </el-col>
  1102. </el-row>
  1103. <el-row>
  1104. <el-form-item label="机器消毒:"></el-form-item>
  1105. </el-row>
  1106. <el-row>
  1107. <el-col :span="3">
  1108. <el-form-item label="①机表"></el-form-item>
  1109. </el-col>
  1110. <el-col :span="10">
  1111. <el-form-item label="消毒方式:" required prop="disinfect_type">
  1112. <el-select v-model="userform.disinfect_type" placeholder="请选择" >
  1113. <el-option
  1114. v-for="item in disinfectType"
  1115. :key="item.id"
  1116. :label="item.name"
  1117. :value="item.id"
  1118. style="width:150px">
  1119. </el-option>
  1120. </el-select>
  1121. </el-form-item>
  1122. </el-col>
  1123. <el-col :span="10">
  1124. <el-form-item label="消毒液:" required prop="disinfectant_type">
  1125. <el-select v-model="userform.disinfectant_type" placeholder="请选择" >
  1126. <el-option
  1127. v-for="item in disinfectantType"
  1128. :key="item.id"
  1129. :label="item.name"
  1130. :value="item.id"
  1131. style="width:200px">
  1132. </el-option>
  1133. </el-select>
  1134. </el-form-item>
  1135. </el-col>
  1136. </el-row>
  1137. <el-row>
  1138. <el-col :span="3">
  1139. <el-form-item style="visibility: hidden;" label="①机表"></el-form-item>
  1140. </el-col>
  1141. <el-col :span="10">
  1142. <el-form-item label="消毒状态:" required prop="disinfection">
  1143. <el-select v-model="userform.disinfection" placeholder="请选择" >
  1144. <el-option
  1145. v-for="item in disinfection"
  1146. :key="item.id"
  1147. :label="item.name"
  1148. :value="item.id"
  1149. style="width:200px">
  1150. </el-option>
  1151. </el-select>
  1152. </el-form-item>
  1153. </el-col>
  1154. <el-col :span="10">
  1155. <el-form-item label="运行:">
  1156. <el-radio-group v-model="userform.machine_run">
  1157. <el-radio :label="gender.id" :value="gender.id" v-for="(gender, index) in runOptions" :key="index">{{gender.name}}</el-radio>
  1158. </el-radio-group>
  1159. </el-form-item>
  1160. </el-col>
  1161. </el-row>
  1162. <el-row>
  1163. <el-col :span="3">
  1164. <el-form-item label="②液路"></el-form-item>
  1165. </el-col>
  1166. <el-col :span="10">
  1167. <el-form-item label="消毒方式:" required prop="fluid_path">
  1168. <el-select v-model="userform.fluid_path" placeholder="请选择" >
  1169. <el-option
  1170. v-for="item in sterilizeType"
  1171. :key="item.id"
  1172. :label="item.name"
  1173. :value="item.id"
  1174. style="width:200px">
  1175. </el-option>
  1176. </el-select>
  1177. </el-form-item>
  1178. </el-col>
  1179. <el-col :span="10">
  1180. <el-form-item label="消毒液:" required prop="disinfectant">
  1181. <el-select v-model="userform.disinfectant" placeholder="请选择" >
  1182. <el-option
  1183. v-for="item in fluidPathType"
  1184. :key="item.id"
  1185. :label="item.name"
  1186. :value="item.id"
  1187. style="width:260px">
  1188. </el-option>
  1189. </el-select>
  1190. </el-form-item>
  1191. </el-col>
  1192. </el-row>
  1193. <el-row>
  1194. <el-col :span="3">
  1195. <el-form-item style="visibility: hidden;" label="①机表"></el-form-item>
  1196. </el-col>
  1197. <el-col :span="10">
  1198. <el-form-item label="消毒状态:" required prop="disinfection_status">
  1199. <el-select v-model="userform.disinfection_status" placeholder="请选择" >
  1200. <el-option
  1201. v-for="item in disinfection"
  1202. :key="item.id"
  1203. :label="item.name"
  1204. :value="item.id"
  1205. style="width:200px">
  1206. </el-option>
  1207. </el-select>
  1208. </el-form-item>
  1209. </el-col>
  1210. <el-col :span="10">
  1211. <el-form-item label="消毒液残留:">
  1212. <el-radio-group v-model="userform.disinfection_residue">
  1213. <el-radio :label="gender.id" :value="gender.id" v-for="(gender, index) in Disinfectant" :key="index">{{gender.name}}</el-radio>
  1214. </el-radio-group>
  1215. </el-form-item>
  1216. </el-col>
  1217. </el-row>
  1218. <el-row>
  1219. <el-col :span="8">
  1220. <el-form-item label="消毒时长:">
  1221. <el-input style="width:135px" v-model="userform.longtime"></el-input><span style="color:#606266;">分钟</span>
  1222. </el-form-item>
  1223. </el-col>
  1224. <el-col :span="8">
  1225. <el-form-item label="开始消毒时间:">
  1226. <el-date-picker
  1227. type="datetime"
  1228. format="yyyy-MM-dd HH:mm"
  1229. value-format="yyyy-MM-dd HH:mm"
  1230. placeholder="选择时间"
  1231. v-model="userform.starttime"
  1232. style="width:185px;"
  1233. ></el-date-picker>
  1234. </el-form-item>
  1235. </el-col>
  1236. <el-col :span="8">
  1237. <el-form-item label="结束消毒时间:">
  1238. <el-date-picker
  1239. type="datetime"
  1240. format="yyyy-MM-dd HH:mm"
  1241. value-format="yyyy-MM-dd HH:mm"
  1242. placeholder="选择时间"
  1243. v-model="userform.endtime"
  1244. style="width:185px;"
  1245. ></el-date-picker>
  1246. </el-form-item>
  1247. </el-col>
  1248. </el-row>
  1249. <el-row>
  1250. <el-col :span="3" style="height: 36px;line-height: 36px;">
  1251. <el-form-item label="透析机消毒液:"></el-form-item>
  1252. </el-col>
  1253. <el-col :span="5" style="display:flex;align-items: center">
  1254. <el-form-item>
  1255. <el-checkbox v-model="userform.dialysis_checked">更换</el-checkbox>
  1256. </el-form-item>
  1257. </el-col>
  1258. <el-col :span="8">
  1259. <el-form-item label="名称:">
  1260. <el-select v-model="userform.dialysis_name" placeholder="请选择" style="width:150px">
  1261. <el-option
  1262. v-for="item in names"
  1263. :key="item.id"
  1264. :label="item.name"
  1265. :value="item.id"
  1266. >
  1267. </el-option>
  1268. </el-select>
  1269. </el-form-item>
  1270. </el-col>
  1271. <el-col :span="8">
  1272. <el-form-item label="规格:">
  1273. <el-input style="width:100px" v-model="userform.norms"></el-input><span style="color:#606266;">桶</span>
  1274. </el-form-item>
  1275. <span class="warn" v-show="warnShow">您已一个月未更换,请注意检测</span>
  1276. </el-col>
  1277. </el-row>
  1278. <el-row>
  1279. <el-col>
  1280. <el-form-item label="浓度:">
  1281. <el-radio-group v-model="userform.dialysis_concentration">
  1282. <el-radio :label="gender.id" :value="gender.id" v-for="(gender, index) in potency" :key="index">{{gender.name}}</el-radio>
  1283. </el-radio-group>
  1284. </el-form-item>
  1285. </el-col>
  1286. </el-row>
  1287. <el-row>
  1288. <el-col :span="8">
  1289. <el-form-item label="细菌过滤器:">
  1290. <el-checkbox v-model="userform.germ_checked">更换</el-checkbox>
  1291. <span class="warn" v-show="warnShowTwo">您已一个月未更换,请注意检测</span>
  1292. </el-form-item>
  1293. </el-col>
  1294. <el-col :span="8">
  1295. <el-form-item class="newname" label="名称:">
  1296. <el-select v-model="userform.germ_name" placeholder="请选择" style="width:150px">
  1297. <el-option
  1298. v-for="item in germs"
  1299. :key="item.id"
  1300. :label="item.name"
  1301. :value="item.id"
  1302. >
  1303. </el-option>
  1304. </el-select>
  1305. </el-form-item>
  1306. </el-col>
  1307. <el-col :span="8">
  1308. <el-form-item class="newname" label="数量:">
  1309. <el-input style="width:100px" v-model="userform.germ_number"></el-input><span style="color:#606266;">支</span>
  1310. </el-form-item>
  1311. </el-col>
  1312. </el-row>
  1313. <el-row>
  1314. <el-col :span="8">
  1315. <el-form-item label="空气滤网清洁:">
  1316. <el-checkbox v-model="userform.clean">清洁</el-checkbox>
  1317. <span class="warn" v-show="warnShowThree">您已一个月未清洁,请检查</span>
  1318. </el-form-item>
  1319. </el-col>
  1320. <el-col :span="8">
  1321. <el-form-item class="newname" label="签名:" required prop="sign_name">
  1322. <el-select v-model="userform.sign_name" placeholder="请选择" >
  1323. <el-option
  1324. v-for="item in autograph"
  1325. :key="item.admin_user_id"
  1326. :label="item.user_name"
  1327. :value="item.admin_user_id"
  1328. style="width:185px">
  1329. </el-option>
  1330. </el-select>
  1331. </el-form-item>
  1332. </el-col>
  1333. </el-row>
  1334. <el-row>
  1335. <div class="elbutton">
  1336. <el-col :span="6">
  1337. <el-button>取消</el-button>
  1338. </el-col>
  1339. <el-col :span="2">
  1340. <el-button type="primary" @click="SaveInformation('userform')">保存</el-button>
  1341. </el-col>
  1342. </div>
  1343. </el-row>
  1344. </el-form>
  1345. </el-tab-pane>
  1346. <el-tab-pane label="使用登记列表" name="second">
  1347. <user-form ref="userForm" :userdata="userdata"></user-form>
  1348. </el-tab-pane>
  1349. </el-tabs>
  1350. </div>
  1351. <div v-show="Ushow" class="zClass">
  1352. 暂无数据
  1353. </div>
  1354. </el-tab-pane>
  1355. <el-tab-pane label="质量控制" name="fourth">
  1356. <div v-show="zhiShow">
  1357. <el-tabs type="border-card" v-model="activeNameSix" @tab-click="handleClick">
  1358. <el-tab-pane label="新增质量控制" name="first">
  1359. <span style="margin-bottom: 20px;display: block;">细菌培养</span>
  1360. <el-form :model="qualityForm" ref="qualityForm" :rules="qualitRules">
  1361. <el-row>
  1362. <el-col :span="8">
  1363. <el-form-item label="取样日期:">
  1364. <el-date-picker
  1365. v-model="qualityForm.date"
  1366. prefix-icon="none"
  1367. type="date"
  1368. placeholder="请选择"
  1369. format="yyyy-MM-dd"
  1370. value-format="yyyy-MM-dd"
  1371. style="width:150px">
  1372. </el-date-picker>
  1373. </el-form-item>
  1374. </el-col>
  1375. <el-col :span="8">
  1376. <el-form-item label="取样标本:">
  1377. <el-select style="width:150px" v-model="qualityForm.specimen" @change="changeSpecimen">
  1378. <el-option v-for="item in samplingSpecimen" :key="item.id" :label="item.name" :value="item.id"></el-option>
  1379. </el-select>
  1380. </el-form-item>
  1381. </el-col>
  1382. <el-col :span="8">
  1383. <el-form-item label="A浓缩液批号:">
  1384. <el-input style="width:150px" v-model="qualityForm.concentrate_noa" :disabled="disable"></el-input>
  1385. </el-form-item>
  1386. </el-col>
  1387. </el-row>
  1388. <el-row>
  1389. <el-col :span="8">
  1390. <el-form-item label="B浓缩液批号">
  1391. <el-input style="width:150px" v-model="qualityForm.concentrate_nob" :disabled="diableTwo"></el-input>
  1392. </el-form-item>
  1393. </el-col>
  1394. <el-col :span="8">
  1395. <el-form-item label="采样部位:">
  1396. <el-select style="width:150px" v-model="qualityForm.sampling_locationa">
  1397. <el-option v-for="item in samplingLocation" :key="item.id" :label="item.name" :value="item.id"></el-option>
  1398. </el-select>
  1399. </el-form-item>
  1400. </el-col>
  1401. <el-col :span="8">
  1402. <el-form-item label="检测单位:" required prop="detection_unit">
  1403. <el-input style="width:150px" v-model="qualityForm.detection_unit"></el-input>
  1404. </el-form-item>
  1405. </el-col>
  1406. </el-row>
  1407. <el-row>
  1408. <el-col :span="8">
  1409. <el-form-item label="取样者:" required prop="sampler">
  1410. <el-select style="width:150px" v-model="qualityForm.sampler">
  1411. <el-option v-for="item in sampling" :key="item.addmin_user_id" :label="item.user_name" :value="item.admin_user_id"></el-option>
  1412. </el-select>
  1413. </el-form-item>
  1414. </el-col>
  1415. <el-col :span="8">
  1416. <el-form-item label="出报告日期:">
  1417. <el-date-picker
  1418. v-model="qualityForm.reporting_date"
  1419. prefix-icon="none"
  1420. type="date"
  1421. placeholder="请选择"
  1422. format="yyyy-MM-dd"
  1423. value-format="yyyy-MM-dd"
  1424. style="width:150px">
  1425. </el-date-picker>
  1426. </el-form-item>
  1427. </el-col>
  1428. </el-row>
  1429. <el-row>
  1430. <el-col :span="24">
  1431. <el-form-item label="检测结果:(cfu/ml)">
  1432. <el-input
  1433. type="textarea"
  1434. :rows="2"
  1435. placeholder="请输入内容"
  1436. style="width:84%"
  1437. v-model="qualityForm.detection_result"
  1438. >
  1439. </el-input>
  1440. </el-form-item>
  1441. </el-col>
  1442. </el-row>
  1443. <el-row>
  1444. <el-col :span="24">
  1445. <span style="color:#FF9900">注:细菌检测应每个月一次,要求细菌数<100cfu/ml</span>
  1446. </el-col>
  1447. </el-row>
  1448. <el-row>
  1449. <div class="clearn">
  1450. <el-col :span="4">
  1451. <el-button @click="cleanSaveBacteria">取消</el-button>
  1452. </el-col>
  1453. <el-col :span="4">
  1454. <el-button type="primary" @click="SaveBacteria('qualityForm')">保存</el-button>
  1455. </el-col>
  1456. </div>
  1457. </el-row>
  1458. </el-form>
  1459. <el-divider></el-divider>
  1460. <span style="margin-bottom: 20px;display: block;">内毒素检测</span>
  1461. <el-form ref="qualityFormTwo" :model="qualityFormTwo" :rules="diaRules">
  1462. <el-row>
  1463. <el-col :span="8">
  1464. <el-form-item label="取样日期:">
  1465. <el-date-picker
  1466. v-model="qualityFormTwo.sampling_date"
  1467. prefix-icon="none"
  1468. type="date"
  1469. placeholder="请选择"
  1470. format="yyyy-MM-dd"
  1471. value-format="yyyy-MM-dd"
  1472. style="width:150px">
  1473. </el-date-picker>
  1474. </el-form-item>
  1475. </el-col>
  1476. <el-col :span="8">
  1477. <el-form-item label="取样标本:">
  1478. <el-select style="width:150px" v-model="qualityFormTwo.specimenb" @change="changeSpecimen">
  1479. <el-option v-for="item in samplingSpecimen" :key="item.id" :label="item.name" :value="item.id"></el-option>
  1480. </el-select>
  1481. </el-form-item>
  1482. </el-col>
  1483. <el-col :span="8">
  1484. <el-form-item label="A浓缩液批号:">
  1485. <el-input style="width:150px" v-model="qualityFormTwo.concentrate_noc" :disabled="disable"></el-input>
  1486. </el-form-item>
  1487. </el-col>
  1488. </el-row>
  1489. <el-row>
  1490. <el-col :span="8">
  1491. <el-form-item label="B浓缩液批号:">
  1492. <el-input style="width:150px" v-model ="qualityFormTwo.concentrateb_nod" :disabled="diableTwo"></el-input>
  1493. </el-form-item>
  1494. </el-col>
  1495. <el-col :span="8">
  1496. <el-form-item label="采样部位:">
  1497. <el-select style="width:150px" v-model="qualityFormTwo.sampling_locationb">
  1498. <el-option v-for="item in samplingLocation" :key="item.id" :label="item.name" :value="item.id"></el-option>
  1499. </el-select>
  1500. </el-form-item>
  1501. </el-col>
  1502. <el-col :span="8">
  1503. <el-form-item label="检测单位:" required prop="detection_unit">
  1504. <el-input style="width:150px" v-model ="qualityFormTwo.detection_unit"></el-input>
  1505. </el-form-item>
  1506. </el-col>
  1507. </el-row>
  1508. <el-row>
  1509. <el-col :span="8">
  1510. <el-form-item label="取样者:" required prop="samplerb">
  1511. <el-select style="width:150px" v-model="qualityFormTwo.samplerb">
  1512. <el-option v-for="item in sampling" :key="item.addmin_user_id" :label="item.user_name" :value="item.admin_user_id"></el-option>
  1513. </el-select>
  1514. </el-form-item>
  1515. </el-col>
  1516. <el-col :span="8">
  1517. <el-form-item label="出报告日期:">
  1518. <el-date-picker
  1519. v-model="qualityFormTwo.reporting_dateb"
  1520. prefix-icon="none"
  1521. type="date"
  1522. placeholder="请选择"
  1523. format="yyyy-MM-dd"
  1524. value-format="yyyy-MM-dd"
  1525. style="width:150px">
  1526. </el-date-picker>
  1527. </el-form-item>
  1528. </el-col>
  1529. </el-row>
  1530. <el-row>
  1531. <el-col :span="24">
  1532. <el-form-item label="检测结果:(EU/ml)">
  1533. <el-input
  1534. type="textarea"
  1535. :rows="2"
  1536. placeholder="请输入内容"
  1537. style="width:800px"
  1538. v-model="qualityFormTwo.detection_resultb"
  1539. >
  1540. </el-input>
  1541. </el-form-item>
  1542. </el-col>
  1543. </el-row>
  1544. <el-row>
  1545. <el-col :span="24">
  1546. <span style="color:#FF9900">注:内毒素检测应至少每3个月1次,要求内毒素<0.25EU/ml,每台透析机每年至少检测一次</span>
  1547. </el-col>
  1548. </el-row>
  1549. <el-row>
  1550. <div class="clearn">
  1551. <el-col :span="4">
  1552. <el-button @click="cleanLincomycin">取消</el-button>
  1553. </el-col>
  1554. <el-col :span="4">
  1555. <el-button type="primary" @click="SaveLincomycin('qualityFormTwo')">保存</el-button>
  1556. </el-col>
  1557. </div>
  1558. </el-row>
  1559. </el-form>
  1560. <el-divider></el-divider>
  1561. <span style="margin-bottom: 20px;display: block;">透析液离子浓度检测</span>
  1562. <el-form ref="qualityFormThree" :model="qualityFormThree" :rules="ruleThree">
  1563. <el-row>
  1564. <el-col :span="8">
  1565. <el-form-item label="取样日期:">
  1566. <el-date-picker
  1567. v-model="qualityFormThree.dateb"
  1568. prefix-icon="none"
  1569. type="date"
  1570. placeholder="请选择"
  1571. format="yyyy-MM-dd"
  1572. value-format="yyyy-MM-dd"
  1573. style="width:150px">
  1574. </el-date-picker>
  1575. </el-form-item>
  1576. </el-col>
  1577. <el-col :span="8">
  1578. <el-form-item label="取样者:" required prop="samplerc">
  1579. <el-select style="width:150px" v-model="qualityFormThree.samplerc">
  1580. <el-option v-for="item in sampling" :key="item.addmin_user_id" :label="item.user_name" :value="item.admin_user_id"></el-option>
  1581. </el-select>
  1582. </el-form-item>
  1583. </el-col>
  1584. <el-col :span="8">
  1585. <el-form-item label="检测单位:" required prop="detection_unit">
  1586. <el-input style="width:150px" v-model ="qualityFormThree.detection_unit"></el-input>
  1587. </el-form-item>
  1588. </el-col>
  1589. </el-row>
  1590. <el-row>
  1591. <el-col :span="8">
  1592. <el-form-item label="A浓缩液批号:">
  1593. <el-input style="width:150px" v-model="qualityFormThree.concentrate_nof"></el-input>
  1594. </el-form-item>
  1595. </el-col>
  1596. <el-col :span="8">
  1597. <el-form-item label="B浓缩液批号:">
  1598. <el-input style="width:150px" v-model="qualityFormThree.concentrate_nog"></el-input>
  1599. </el-form-item>
  1600. </el-col>
  1601. <el-col :span="8">
  1602. <el-form-item label="出报告日期:">
  1603. <el-date-picker
  1604. v-model="qualityFormThree.date_reportc"
  1605. prefix-icon="none"
  1606. type="date"
  1607. placeholder="请选择"
  1608. format="yyyy-MM-dd"
  1609. value-format="yyyy-MM-dd"
  1610. style="width:150px">
  1611. </el-date-picker>
  1612. </el-form-item>
  1613. </el-col>
  1614. </el-row>
  1615. <el-row>
  1616. <el-col :span="8">
  1617. <!-- <span>Na<sup>+</sup></span> -->
  1618. <el-form-item class="newItem" label="实际Na⁺(mmol/L):">
  1619. <el-input style="width:123px" v-model="qualityFormThree.actual_na"></el-input>
  1620. </el-form-item>
  1621. </el-col>
  1622. <el-col :span="8">
  1623. <el-form-item class="newItem" label="配方Na⁺(mmol/L):">
  1624. <el-input style="width:123px" v-model="qualityFormThree.actual_pna"></el-input>
  1625. </el-form-item>
  1626. </el-col>
  1627. <el-col :span="8">
  1628. <el-form-item label="K⁺(mmol/L):">
  1629. <el-input style="width:150px" v-model="qualityFormThree.actual_k"></el-input>
  1630. </el-form-item>
  1631. </el-col>
  1632. </el-row>
  1633. <el-row>
  1634. <el-col :span="8">
  1635. <el-form-item label="Ca2⁺(mmol/L):">
  1636. <el-input style="width:150px" v-model="qualityFormThree.actual_ca"></el-input>
  1637. </el-form-item>
  1638. </el-col>
  1639. <el-col :span="8">
  1640. <el-form-item label="CI¯(mmol/L):">
  1641. <el-input style="width:150px" v-model="qualityFormThree.actual_ci"></el-input>
  1642. </el-form-item>
  1643. </el-col>
  1644. <el-col :span="8">
  1645. <el-form-item label="HCO3¯(mmol/L):">
  1646. <el-input style="width:150px" v-model="qualityFormThree.actual_hco"></el-input>
  1647. </el-form-item>
  1648. </el-col>
  1649. </el-row>
  1650. <el-row>
  1651. <el-col :span="8">
  1652. <el-form-item label="Mg2⁺(mmol/L):">
  1653. <el-input style="width:150px" v-model="qualityFormThree.actual_mg"></el-input>
  1654. </el-form-item>
  1655. </el-col>
  1656. <el-col :span="8">
  1657. <el-form-item label="PH:">
  1658. <el-input style="width:150px" v-model="qualityFormThree.actual_ph"></el-input>
  1659. </el-form-item>
  1660. </el-col>
  1661. </el-row>
  1662. <el-row>
  1663. <div></div>
  1664. </el-row>
  1665. <el-row>
  1666. <el-col :span="24">
  1667. <el-form-item label="备注:">
  1668. <el-input
  1669. type="textarea"
  1670. :rows="2"
  1671. placeholder="请输入内容"
  1672. style="width:500px"
  1673. v-model="qualityFormThree.remakes"
  1674. >
  1675. </el-input>
  1676. </el-form-item>
  1677. </el-col>
  1678. </el-row>
  1679. <el-row>
  1680. <div class="clearn">
  1681. <el-col :span="4">
  1682. <el-button @click="cleanQuality">取消</el-button>
  1683. </el-col>
  1684. <el-col :span="4">
  1685. <el-button type="primary" @click="SaveQualityControl('qualityFormThree')">保存</el-button>
  1686. </el-col>
  1687. </div>
  1688. </el-row>
  1689. </el-form>
  1690. </el-tab-pane>
  1691. <el-tab-pane label="质量控制列表" name="second">
  1692. <quality-form ref="child"></quality-form>
  1693. </el-tab-pane>
  1694. </el-tabs>
  1695. </div>
  1696. <div v-show="zhShow" class="zClass">
  1697. 暂无数据
  1698. </div>
  1699. </el-tab-pane>
  1700. <el-tab-pane label="维修维护" name="five">
  1701. <el-tabs type="border-card" v-model="activeNameFive" @tab-click="handleClick">
  1702. <el-tab-pane label="新增维修维护" name="first">
  1703. <el-form :model="guaForm" ref="guaForm" :rules="repirRules">
  1704. <el-row>
  1705. <el-col :span="8">
  1706. <el-form-item label="保修日期:" required prop="guarantee_date">
  1707. <el-date-picker
  1708. v-model="guaForm.guarantee_date"
  1709. prefix-icon="none"
  1710. type="date"
  1711. placeholder="请选择"
  1712. format="yyyy-MM-dd"
  1713. value-format="yyyy-MM-dd"
  1714. style="width:150px">
  1715. </el-date-picker>
  1716. </el-form-item>
  1717. </el-col>
  1718. <el-col :span="8">
  1719. <el-form-item label="出发时间:">
  1720. <el-date-picker
  1721. type="datetime"
  1722. format="yyyy-MM-dd HH:mm"
  1723. value-format="yyyy-MM-dd HH:mm"
  1724. placeholder="选择时间"
  1725. v-model="guaForm.start_time"
  1726. style="width:150px;">
  1727. </el-date-picker>
  1728. </el-form-item>
  1729. </el-col>
  1730. </el-row>
  1731. <el-row>
  1732. <el-col :span="8">
  1733. <el-form-item label="到达时间:">
  1734. <!-- <el-date-picker
  1735. v-model="guaForm.arrive_time"
  1736. prefix-icon="none"
  1737. type="date"
  1738. placeholder="请选择"
  1739. format="yyyy-MM-dd"
  1740. value-format="yyyy-MM-dd"
  1741. style="width:150px">
  1742. </el-date-picker> -->
  1743. <el-date-picker
  1744. type="datetime"
  1745. format="yyyy-MM-dd HH:mm"
  1746. value-format="yyyy-MM-dd HH:mm"
  1747. placeholder="选择时间"
  1748. v-model="guaForm.arrive_time"
  1749. style="width:150px;">
  1750. </el-date-picker>
  1751. </el-form-item>
  1752. </el-col>
  1753. <el-col :span="8">
  1754. <el-form-item label="完成时间:">
  1755. <el-date-picker
  1756. type="datetime"
  1757. format="yyyy-MM-dd HH:mm"
  1758. value-format="yyyy-MM-dd HH:mm"
  1759. placeholder="选择时间"
  1760. v-model="guaForm.finish_time"
  1761. style="width:150px;">
  1762. </el-date-picker>
  1763. </el-form-item>
  1764. </el-col>
  1765. <el-col :span="8">
  1766. <el-form-item label="总路程:(公里)">
  1767. <el-input style="width:150px" v-model = "guaForm.total_distance"></el-input>
  1768. </el-form-item>
  1769. </el-col>
  1770. </el-row>
  1771. <el-row>
  1772. <el-col :span="24">
  1773. <el-form-item label="故障发生阶段">
  1774. <el-radio-group v-model="guaForm.failure_stage">
  1775. <el-radio :label="gender.id" :value="gender.id" v-for="(gender, index) in faultPhase" :key="index">{{gender.name}}</el-radio>
  1776. </el-radio-group>
  1777. </el-form-item>
  1778. </el-col>
  1779. </el-row>
  1780. <el-row>
  1781. <el-col :span="24">
  1782. <el-form-item class="formItem" label="故障提示信息及代码">
  1783. <el-input
  1784. type="textarea"
  1785. :rows="2"
  1786. placeholder="请输入内容"
  1787. v-model="guaForm.code_information"
  1788. style="width:85%">
  1789. </el-input>
  1790. </el-form-item>
  1791. </el-col>
  1792. </el-row>
  1793. <el-row>
  1794. <el-col :span="8">
  1795. <el-form-item label="故障描述:" required prop="fault_description">
  1796. <el-input
  1797. type="textarea"
  1798. :rows="2"
  1799. placeholder="请输入内容"
  1800. v-model="guaForm.fault_description"
  1801. style="width:86%;margin-left: 10%;">
  1802. </el-input>
  1803. </el-form-item>
  1804. </el-col>
  1805. <el-col :span="8">
  1806. <el-form-item label="原因分析:">
  1807. <el-input
  1808. type="textarea"
  1809. :rows="2"
  1810. placeholder="请输入内容"
  1811. v-model="guaForm.cause_analysis"
  1812. style="width:86%;margin-left: 10%;">
  1813. </el-input>
  1814. </el-form-item>
  1815. </el-col>
  1816. <el-col :span="8">
  1817. <el-form-item label="处理过程:">
  1818. <el-input
  1819. type="textarea"
  1820. :rows="2"
  1821. placeholder="请输入内容"
  1822. v-model="guaForm.treatment_process"
  1823. style="width:86%;margin-left: 10%;">
  1824. </el-input>
  1825. </el-form-item>
  1826. </el-col>
  1827. </el-row>
  1828. <el-row>
  1829. <el-col :span="24">
  1830. <el-form-item label="上传图片:">
  1831. <el-upload
  1832. :data="uploadFileData"
  1833. action="https://upload.qiniup.com"
  1834. :on-success="handleSuccess"
  1835. :before-upload="beforeUploadFile"
  1836. :limit="1"
  1837. ref='upload'
  1838. >
  1839. <el-button size="small" type="primary">上传图片</el-button>
  1840. </el-upload>
  1841. <a class="el-upload-list__item-name">
  1842. <i style="color:#0000EE"><a @click="toLink()">{{filename}}</a><span v-show="classShow" @click="hiddenShow"><li class="el-icon-circle-close"></li></span></i>
  1843. </a>
  1844. </el-form-item>
  1845. </el-col>
  1846. </el-row>
  1847. <el-row>
  1848. <el-col :span="20">
  1849. <el-form-item label="故障是否排除:">
  1850. <el-radio-group v-model="guaForm.exclude">
  1851. <el-radio :label="gender.id" :value="gender.id" v-for="(gender, index) in breakDown" :key="index">{{gender.name}}</el-radio>
  1852. </el-radio-group>
  1853. </el-form-item>
  1854. </el-col>
  1855. </el-row>
  1856. <el-row>
  1857. <el-col :span="20">
  1858. <el-form-item label="原因:">
  1859. <el-input
  1860. type="textarea"
  1861. :rows="2"
  1862. placeholder="请输入内容"
  1863. v-model="guaForm.reason"
  1864. style="width:300px">
  1865. </el-input>
  1866. </el-form-item>
  1867. </el-col>
  1868. </el-row>
  1869. <el-row>
  1870. <div class="clearn">
  1871. <el-col :span="4">
  1872. <el-button>取消</el-button>
  1873. </el-col>
  1874. <el-col :span="4">
  1875. <el-button type="primary" @click="SaveRepair('guaForm')">保存</el-button>
  1876. </el-col>
  1877. </div>
  1878. </el-row>
  1879. </el-form>
  1880. </el-tab-pane>
  1881. <el-tab-pane label="维修维护列表" name="second">
  1882. <repair-form ref="child"></repair-form>
  1883. </el-tab-pane>
  1884. </el-tabs>
  1885. </el-tab-pane>
  1886. </el-tabs>
  1887. </div>
  1888. <!-- <el-autocomplete
  1889. popper-class="my-autocomplete"
  1890. v-model="state"
  1891. :fetch-suggestions="querySearch"
  1892. placeholder="请输入内容"
  1893. @select="handleSelect"
  1894. >
  1895. <i
  1896. class="el-icon-edit el-input__icon"
  1897. slot="suffix"
  1898. @click="handleIconClick">
  1899. </i>
  1900. <template slot-scope="{ item }">
  1901. <div class="name">{{ item.value }}</div>
  1902. <span class="addr">{{ item.address }}</span>
  1903. </template>
  1904. </el-autocomplete> -->
  1905. </el-main>
  1906. </el-container>
  1907. </el-container>
  1908. </el-container>
  1909. <!-- 新增计划 -->
  1910. <plan-form ref="planForm" :equimentid="equimentid" v-on:getAllPlan="getAllPlan" v-on:getAllPlanDetail="getAllPlanDetail" @func="getPlanData"></plan-form>
  1911. <!-- <edit-machine-form ref="editmachineform" :planid="planid" ></edit-machine-form> -->
  1912. <!-- 综合查询 -->
  1913. <multiple-form ref="multipleform" :equimentid="equimentid"></multiple-form>
  1914. <!-- 使用登记提醒配置 -->
  1915. <remander-form ref="remanderform"> </remander-form>
  1916. <!-- 编辑消毒计划 -->
  1917. <el-dialog title="编辑消毒计划" :visible.sync="dialogVisible" width="50%" center>
  1918. <el-form :model="machineform" ref="machineform" :rules="planRules">
  1919. <el-row>
  1920. <el-col :span="10">
  1921. <el-form-item label="设备型号:" required prop = "device_type">
  1922. <el-select style="width:135px" v-model="machineform.device_type">
  1923. <el-option
  1924. v-for="item in this.DeviceType"
  1925. :key="item.id"
  1926. :label="item.device_mode"
  1927. :value="item.id"
  1928. ></el-option>
  1929. </el-select>
  1930. </el-form-item>
  1931. </el-col>
  1932. <el-col :span="10">
  1933. <el-form-item label="消毒时长:" required prop="disinfec_time">
  1934. <el-input style="width:135px" v-model="machineform.disinfec_time"></el-input>
  1935. <span>分钟</span>
  1936. </el-form-item>
  1937. </el-col>
  1938. </el-row>
  1939. <el-row>
  1940. <el-col :span="10">
  1941. <el-form-item label="时间:" required prop="time">
  1942. <el-select
  1943. v-model="machineform.time"
  1944. placeholder="请选择时间"
  1945. style="width: 140px;"
  1946. >
  1947. <el-option
  1948. v-for="item in this.timeType"
  1949. :key="item.id"
  1950. :label="item.name"
  1951. :value="item.id"
  1952. ></el-option>
  1953. </el-select>
  1954. </el-form-item>
  1955. </el-col>
  1956. <el-col :span="10">
  1957. <el-form-item label="班次:" required prop="class_time">
  1958. <el-select
  1959. v-model="machineform.class_time"
  1960. placeholder="请选择时间"
  1961. style="width: 140px;"
  1962. >
  1963. <el-option
  1964. v-for="item in this.classType"
  1965. :key="item.id"
  1966. :label="item.name"
  1967. :value="item.id"
  1968. ></el-option>
  1969. </el-select>
  1970. </el-form-item>
  1971. </el-col>
  1972. </el-row>
  1973. <el-row>
  1974. <el-col :span="10">
  1975. <el-form-item label="机表消毒方式:">
  1976. <el-select style="width:135px" v-model="machineform.way">
  1977. <el-option
  1978. v-for="item in this.disinfectType"
  1979. :key="item.id"
  1980. :label="item.name"
  1981. :value="item.id"
  1982. ></el-option>
  1983. </el-select>
  1984. </el-form-item>
  1985. </el-col>
  1986. <el-col :span="10">
  1987. <el-form-item label="机表消毒液:">
  1988. <el-select
  1989. style="width:135px"
  1990. v-model="machineform.machine_disinfectant"
  1991. >
  1992. <el-option
  1993. v-for="item in this.disinfectantType"
  1994. :key="item.id"
  1995. :label="item.name"
  1996. :value="item.id"
  1997. ></el-option>
  1998. </el-select>
  1999. </el-form-item>
  2000. </el-col>
  2001. </el-row>
  2002. <el-row>
  2003. <el-col :span="10">
  2004. <el-form-item label="液路消毒方式:">
  2005. <el-select style="width:135px" v-model="machineform.disinfectant_way">
  2006. <el-option
  2007. v-for="item in this.sterilizeType"
  2008. :key="item.id"
  2009. :label="item.name"
  2010. :value="item.id"
  2011. ></el-option>
  2012. </el-select>
  2013. </el-form-item>
  2014. </el-col>
  2015. <el-col :span="10">
  2016. <el-form-item label="液路消毒液:">
  2017. <el-select style="width:135px" v-model="machineform.disinfectant">
  2018. <el-option
  2019. v-for="item in this.fluidPathType"
  2020. :key="item.id"
  2021. :label="item.name"
  2022. :value="item.id"
  2023. ></el-option>
  2024. </el-select>
  2025. </el-form-item>
  2026. </el-col>
  2027. </el-row>
  2028. </el-form>
  2029. <span slot="footer" class="dialog-footer">
  2030. <el-button @click="dialogVisible = false">取 消</el-button>
  2031. <el-button type="primary" @click="UpdatePlanInfo('machineform')">保存</el-button>
  2032. </span>
  2033. </el-dialog>
  2034. </div>
  2035. </div>
  2036. </template>
  2037. <script>
  2038. import BreadCrumb from '../components/bread-crumb'
  2039. import { getAllSubregion, getAllMachine, getMachineDetailById,
  2040. UpdateMachineInfo, getAllPlan, getAllPlanDetail, DeletePlans,
  2041. getAllEquimentName, EditPlanDetail, UpdatePlanInfo, SaveInformation, getPatientInfo,
  2042. ChangeClass, getAllOrganization, getUserRegister, SaveQualityControl, getOrgName, SaveRepair, SaveBacteria, SaveLincomycin, getAutoData, getAllEquitType, UpdateMacheineTwo, getTotalNumber, getTimeWarning, getTimeBeteen, getAllpatient, UpdateMachineInfoTwo, getPatientDetail, openDelete, getAllMode, selectChange, selectBed } from '@/api/manage'
  2043. import { uParseTime } from '@/utils/tools'
  2044. import { getToken } from '@/api/qiniu'
  2045. import PlanForm from './components/PlanForm'
  2046. import EditMachineForm from './components/EditMachineForm'
  2047. import MultipleForm from './components/MultipleForm'
  2048. import UserForm from './components/UserForm'
  2049. import QualityForm from './components/QualityForm'
  2050. import RepairForm from './components/RepairForm'
  2051. import RemanderForm from './components/RemanderForm'
  2052. import { parseTime } from '@/utils'
  2053. import { getFileExtension } from '@/utils/tools'
  2054. import { PostSearch } from '@/api/patient'
  2055. const cityOptions = ['HD', 'HDF', 'HD+HP', 'HP', 'HF', 'SCUF', 'IUF', 'HFHD', 'HFHD+HP', 'PHF', 'HFR', 'HDF+HP', 'CRRT', '腹水回输']
  2056. const moment = require('moment')
  2057. export default {
  2058. name: 'home',
  2059. components: {
  2060. BreadCrumb,
  2061. PlanForm,
  2062. EditMachineForm,
  2063. MultipleForm,
  2064. UserForm,
  2065. QualityForm,
  2066. RepairForm,
  2067. RemanderForm
  2068. },
  2069. data() {
  2070. return {
  2071. crumbs: [
  2072. { path: false, name: '设备管理详情页' }
  2073. ],
  2074. tableData: [],
  2075. tableDatatwo: [],
  2076. planData: [],
  2077. DeviceTypeType: [
  2078. { id: 0, name: '全部' },
  2079. { id: 1, name: '透析机' },
  2080. { id: 2, name: '水处理机' },
  2081. { id: 3, name: '其他' }
  2082. ],
  2083. bedNumber: [],
  2084. zoneNumber: [],
  2085. Number: [],
  2086. form: {
  2087. id: '',
  2088. serial_number: '',
  2089. devicetype: '',
  2090. bed_number: '',
  2091. device_name: '',
  2092. manufacture_factory: '',
  2093. service_manufacturer: '',
  2094. unit_type: '',
  2095. use_section: '',
  2096. section_number: '',
  2097. buy_date: '',
  2098. install_date: '',
  2099. start_date: '',
  2100. maintenance_engineer: '',
  2101. telephone: '',
  2102. guarantee_date: '',
  2103. machine_status: '',
  2104. user_total: '',
  2105. remarks: '',
  2106. rubbish_date: '',
  2107. rubbish_reason: '',
  2108. user_year: '',
  2109. work_time: '',
  2110. treat_mode: [],
  2111. treat_type: [],
  2112. bed: '', // 治疗模式
  2113. Disinfection_mode: '',
  2114. revers_mode: '',
  2115. beds: '',
  2116. bed_numbers: ''
  2117. },
  2118. activeName: 'first',
  2119. activeNameTwo: 'first',
  2120. activeNameThree: 'first',
  2121. activeNameSix: 'first',
  2122. activeNameFive: 'first',
  2123. machineStatus: [
  2124. { id: 1, name: '使用机' },
  2125. { id: 2, name: '备用机' },
  2126. { id: 3, name: '急诊机' },
  2127. { id: 4, name: '报废机' }
  2128. ],
  2129. DisCardResion: [
  2130. { id: 0, name: '请选择' },
  2131. { id: 1, name: '超期限报废' },
  2132. { id: 2, name: '故障报废' },
  2133. { id: 3, name: '核定报废' }
  2134. ],
  2135. DeviceTypes: [
  2136. { id: 1, name: '透析机' },
  2137. { id: 2, name: '水处理机' },
  2138. { id: 3, name: '其他' }
  2139. ],
  2140. Classes: [
  2141. { id: 0, name: '全部' },
  2142. { id: 1, name: '上午' },
  2143. { id: 2, name: '下午' },
  2144. { id: 3, name: '晚上' }
  2145. ],
  2146. names: [
  2147. { id: 0, name: '请选择' },
  2148. { id: 1, name: '20%柠檬酸' },
  2149. { id: 2, name: '50%柠檬酸' },
  2150. { id: 3, name: '次氯酸钠' }
  2151. ],
  2152. germs: [
  2153. { id: 0, name: '请选择' },
  2154. { id: 1, name: '费森细菌过滤器' },
  2155. { id: 2, name: '日机装细菌过滤器' },
  2156. { id: 3, name: '贝朗机细菌过滤器' },
  2157. { id: 4, name: '东丽机细菌过滤器' }
  2158. ],
  2159. DisinfectionMode: [
  2160. { id: 0, name: '请选择' },
  2161. { id: 1, name: '化学消毒' },
  2162. { id: 2, name: '热消毒' },
  2163. { id: 3, name: '化学消毒+热消毒' }
  2164. ],
  2165. autograph: [],
  2166. bedZone: [],
  2167. bedZoneTwo: [],
  2168. forms: {
  2169. zone_id: 0, // 分区号
  2170. class_id: '', // 班次
  2171. device_type: 0, // 设备类型
  2172. date: ''
  2173. },
  2174. currentRow: null,
  2175. cancelShow: false,
  2176. confirmShow: false,
  2177. isIndeterminate: true,
  2178. checkAll: false,
  2179. cities: cityOptions,
  2180. rules: {
  2181. serial_number: [{ required: true, message: '请填写序列号' }],
  2182. device_name: [{ required: true, message: '请填写序列号' }],
  2183. devicetype: [{ required: true, message: '请填写设备类型' }],
  2184. unit_type: [{ required: true, message: '请填写设备型号' }]
  2185. },
  2186. qualitRules: {
  2187. detection_unit: [{ required: true, message: '请填写检测单位' }],
  2188. sampler: [{ required: true, message: '请填写取样者' }]
  2189. },
  2190. diaRules: {
  2191. detection_unit: [{ required: true, message: '请填写检测单位' }],
  2192. samplerb: [{ required: true, message: '请填写取样者' }]
  2193. },
  2194. repirRules: {
  2195. guarantee_date: [{ required: true, message: '请填写保修日期' }],
  2196. fault_description: [{ required: true, message: '请填写故障描述' }]
  2197. },
  2198. ruleThree: {
  2199. detection_unit: [{ required: true, message: '请填写检测单位' }],
  2200. samplerc: [{ required: true, message: '请填写取样者' }]
  2201. },
  2202. userRules: {
  2203. date: [{ required: true, message: '请填写日期' }],
  2204. zone: [{ required: true, message: '请填写分区' }],
  2205. bed_number: [{ required: true, message: '请填写机位号' }],
  2206. patient_name: [{ required: true, message: '请填写患者', trigger: ['blur', 'change'] }],
  2207. disinfect_type: [{ required: true, message: '请填写消毒方式' }],
  2208. disinfectant_type: [{ required: true, message: '请填写消毒液' }],
  2209. disinfection: [{ required: true, message: '请填写消毒状态' }],
  2210. fluid_path: [{ required: true, message: '请填写消毒方式' }],
  2211. disinfectant: [{ required: true, message: '请填写消毒液' }],
  2212. disinfection_status: [{ required: true, message: '消毒状态' }],
  2213. sign_name: [{ required: true, message: '请填写签名', trigger: ['change'] }],
  2214. classtype: [{ required: true, message: '请填写班次' }]
  2215. },
  2216. planRules: {
  2217. device_type: [{ required: true, message: '请输入设备型号' }],
  2218. disinfec_time: [{ required: true, message: '请输入消毒时长' }],
  2219. time: [{ required: true, message: '请输入时间' }],
  2220. class_time: [{ required: true, message: '请输入班次' }]
  2221. },
  2222. runOption: [
  2223. { id: 1, name: '正常' },
  2224. { id: 2, name: '故障' }
  2225. ],
  2226. runOptions: [
  2227. { id: 1, name: '达标' },
  2228. { id: 2, name: '未达标' }
  2229. ],
  2230. faultPhase: [
  2231. { id: 1, name: '开机启动' },
  2232. { id: 2, name: '自检' },
  2233. { id: 3, name: '准备' },
  2234. { id: 4, name: '治疗' },
  2235. { id: 5, name: '消毒' }
  2236. ],
  2237. Disinfectant: [
  2238. { id: 1, name: '有' },
  2239. { id: 2, name: '无' }
  2240. ],
  2241. potency: [
  2242. { id: 1, name: '达标' },
  2243. { id: 2, name: '未达标' }
  2244. ],
  2245. sampling: [],
  2246. DeviceType: [],
  2247. equimentid: 0,
  2248. checkAllStatus: false,
  2249. checkAllStatusOne: false,
  2250. selectMachines: [],
  2251. selectMachinesOne: [],
  2252. machineIndex: -1,
  2253. planid: 0,
  2254. machineform: {
  2255. id: '',
  2256. device_type: '',
  2257. disinfec_time: '',
  2258. time: '',
  2259. class_time: '',
  2260. way: '',
  2261. machine_disinfectant: '',
  2262. disinfectant_way: '',
  2263. disinfectant: ''
  2264. },
  2265. dialogVisible: false,
  2266. timeType: [
  2267. { id: 1, name: '周一' },
  2268. { id: 2, name: '周二' },
  2269. { id: 3, name: '周三' },
  2270. { id: 4, name: '周四' },
  2271. { id: 5, name: '周五' },
  2272. { id: 6, name: '周六' },
  2273. { id: 7, name: '周日' }
  2274. ],
  2275. classType: [
  2276. { id: 0, name: '请选择' },
  2277. { id: 1, name: '上午' },
  2278. { id: 2, name: '下午' },
  2279. { id: 3, name: '晚上' }
  2280. ],
  2281. // 基表消毒方式
  2282. disinfectType:
  2283. [
  2284. { id: 0, name: '/' },
  2285. { id: 1, name: '擦拭' },
  2286. { id: 2, name: '化学消毒' }
  2287. ],
  2288. // 基表消毒液
  2289. disinfectantType: [
  2290. { id: 0, name: '/' },
  2291. { id: 1, name: '0.22%季铵盐' },
  2292. { id: 2, name: '500mg/l含氯消毒剂' },
  2293. { id: 3, name: '1000mg/l含氯消毒剂' },
  2294. { id: 4, name: '1500mg/l含氯消毒剂' }
  2295. ],
  2296. // 夜路消毒方式
  2297. sterilizeType: [
  2298. { id: 0, name: '/' },
  2299. { id: 1, name: '热化学消毒' },
  2300. { id: 2, name: '化学消毒 + 除钙' },
  2301. { id: 3, name: '热化学消毒 + 除钙' },
  2302. { id: 4, name: '热消毒' },
  2303. { id: 5, name: '化学消毒' },
  2304. { id: 6, name: '除钙' },
  2305. { id: 7, name: '清洗' }
  2306. ],
  2307. // 夜路消毒液
  2308. fluidPathType: [
  2309. { id: 0, name: '/' },
  2310. { id: 1, name: '20%柠檬酸' },
  2311. { id: 2, name: '25%柠檬酸' },
  2312. { id: 3, name: '50%柠檬酸' },
  2313. { id: 4, name: '50%柠檬酸 + 5%次氯酸钠' },
  2314. { id: 5, name: '20%柠檬酸 + 10%冰醋酸' },
  2315. { id: 6, name: '0.2%过氧化乙酸' },
  2316. { id: 7, name: '10%冰醋酸' },
  2317. { id: 8, name: '50%冰醋酸' },
  2318. { id: 9, name: '5%次氯酸钠' }
  2319. ],
  2320. userform: {
  2321. id: 0,
  2322. date: moment(new Date()).format('YYYY-MM-DD'), // 日期
  2323. classtype: '', // 班次
  2324. zone: '', // 分区
  2325. bed_number: '', // 床位号
  2326. patient_name: '', // 患者
  2327. contagion: '', // 传染病
  2328. dialysis_mode: '', // 透析方式
  2329. start_time: '', // 上机时间
  2330. end_time: '', // 下机时间
  2331. dialysis_time: '', // 透析时长
  2332. hyperfiltratio: '', // 实际超滤量
  2333. weight_loss: '', // 体重减少
  2334. warning_value: '', // 预警值
  2335. user_total: '', // 使用次数
  2336. run: 1, // 运行
  2337. failure_stage: '', // 故事发生阶段
  2338. fault_description: '', // 故障描述
  2339. code_information: '', // 故障提示及代码
  2340. // 机器消毒
  2341. disinfect_type: 1, // 消毒方式
  2342. disinfectant_type: 2, // 消毒液
  2343. disinfection: 1, // 消毒状态
  2344. machine_run: 1, // 运行
  2345. // 液路
  2346. fluid_path: 3, // 消毒方式
  2347. disinfectant: 3, // 消毒液
  2348. disinfection_status: 1, // 消毒状态
  2349. disinfection_residue: 1, // 消毒液残留
  2350. longtime: '', // 消毒时长
  2351. starttime: '', // 开始消毒时间
  2352. endtime: '', // 结束消毒时间
  2353. dialysis_checked: '', // 更换
  2354. dialysis_name: '', // 名称
  2355. norms: '', // 规格
  2356. dialysis_concentration: 1, // 浓度
  2357. germ_checked: '', // 更换
  2358. germ_name: '', // 名称
  2359. germ_number: '', // 数量
  2360. clean: '', // 清洁
  2361. sign_name: '', // 签名
  2362. patient_id: ''
  2363. },
  2364. treatmentmodes: [
  2365. { id: 1, name: 'HD' },
  2366. { id: 2, name: 'HDF' },
  2367. { id: 3, name: 'HD+HP' },
  2368. { id: 4, name: 'HP' },
  2369. { id: 5, name: 'HF' },
  2370. { id: 6, name: 'SCUF' },
  2371. { id: 7, name: 'IUF' },
  2372. { id: 8, name: 'HFHD+HP' },
  2373. { id: 9, name: 'HFR' },
  2374. { id: 10, name: 'HDF+HP' },
  2375. { id: 11, name: 'GRRT' },
  2376. { id: 12, name: '腹水回输' }
  2377. ],
  2378. treatmode: [
  2379. { id: 0, name: '请选择' },
  2380. { id: 1, name: 'HD' },
  2381. { id: 2, name: 'HDF' },
  2382. { id: 3, name: 'HD + HP' },
  2383. { id: 4, name: 'HP' },
  2384. { id: 5, name: 'HF' },
  2385. { id: 6, name: 'SCUF' },
  2386. { id: 7, name: 'IUF' },
  2387. { id: 8, name: 'HFHD' },
  2388. { id: 9, name: 'HFHD+HP' },
  2389. { id: 10, name: 'PHF' },
  2390. { id: 11, name: 'HFR' },
  2391. { id: 12, name: 'HDF+HP' },
  2392. { id: 13, name: 'CRRT' },
  2393. { id: 14, name: '腹水回输' },
  2394. { id: 15, name: 'HD前置换' },
  2395. { id: 16, name: 'HD后置换' },
  2396. { id: 17, name: 'HDF前置换' },
  2397. { id: 18, name: 'HDF后置换' }
  2398. ],
  2399. disinfection: [
  2400. { id: 0, name: '请选择' },
  2401. { id: 1, name: '已消毒' },
  2402. { id: 2, name: '未消毒' },
  2403. { id: 3, name: '消毒未完成' }
  2404. ],
  2405. patientName: [],
  2406. start: '',
  2407. end: '',
  2408. // 细菌培养
  2409. qualityForm: {
  2410. date: moment(new Date()).format('YYYY-MM-DD'), // 取样日期
  2411. specimen: '', // 取样标本
  2412. concentrate_noa: '', // 浓A
  2413. concentrate_nob: '', // 浓B,
  2414. sampling_locationa: '', // 采样部位
  2415. detection_unit: '', // 检测单位
  2416. sampler: '', // 取样者
  2417. reporting_date: '', // 报告日期
  2418. detection_result: '' // 检测结果
  2419. },
  2420. qualityFormTwo: {
  2421. // 内毒素检测
  2422. detection_unit: '', // 检测单位
  2423. sampling_date: moment(new Date()).format('YYYY-MM-DD'), // 取样日期
  2424. specimenb: '', // 取样标本
  2425. concentrate_noc: '', // A浓缩液批号
  2426. concentrateb_nod: '', // B浓
  2427. sampling_locationb: '', // 采样部位
  2428. samplerb: '', // 取样者
  2429. reporting_dateb: '', // 出报告日期
  2430. detection_resultb: '' // 检测结果
  2431. },
  2432. qualityFormThree: {
  2433. detection_unit: '', // 检测单位
  2434. // 透析液离子浓度检测
  2435. dateb: moment(new Date()).format('YYYY-MM-DD'), // 取样日期
  2436. samplerc: '', // 取样者
  2437. concentrate_nof: '', // A浓
  2438. concentrate_nog: '', // B浓
  2439. date_reportc: '', // 出报告日期
  2440. actual_na: '',
  2441. actual_pna: '',
  2442. actual_k: '',
  2443. actual_ca: '',
  2444. actual_ci: '',
  2445. actual_hco: '',
  2446. actual_mg: '',
  2447. actual_ph: '',
  2448. remakes: ''
  2449. },
  2450. disable: false,
  2451. diableTwo: false,
  2452. samplingSpecimen: [
  2453. { id: 0, name: '请选择' },
  2454. { id: 1, name: '透析液' },
  2455. { id: 2, name: 'A浓缩液' },
  2456. { id: 3, name: 'B浓缩液' },
  2457. { id: 4, name: '置换液' },
  2458. { id: 5, name: '透析用水' }
  2459. ],
  2460. samplingLocation: [
  2461. { id: 0, name: '请选择' },
  2462. { id: 1, name: '透析液入口' },
  2463. { id: 2, name: '透析液取样口' },
  2464. { id: 3, name: '置换液出口' },
  2465. { id: 4, name: '透析机反渗水入口' }
  2466. ],
  2467. breakDown: [
  2468. { id: 1, name: '是' },
  2469. { id: 2, name: '待观察' },
  2470. { id: 3, name: '未解决' }
  2471. ],
  2472. guaForm: {
  2473. guarantee_date: moment(new Date()).format('YYYY-MM-DD'),
  2474. start_time: '',
  2475. arrive_time: '',
  2476. finish_time: '',
  2477. total_distance: '',
  2478. failure_stage: '',
  2479. fault_description: '',
  2480. cause_analysis: '',
  2481. treatment_process: '',
  2482. images: '',
  2483. exclude: '',
  2484. reason: '',
  2485. code_information: '',
  2486. imageName: ''
  2487. },
  2488. filename: '',
  2489. qiniuDomain: 'https://images.shengws.com/',
  2490. uploadFileData: { token: '', key: '' },
  2491. tShow: false,
  2492. sShow: false,
  2493. qShow: false,
  2494. readisable: true,
  2495. fileList: [],
  2496. DisShow: true,
  2497. DioShow: false,
  2498. zhiShow: true,
  2499. zhShow: false,
  2500. UserShow: true,
  2501. Ushow: false,
  2502. restaurants: [],
  2503. state: '',
  2504. userdata: 0,
  2505. disableThree: true,
  2506. disableFour: true,
  2507. disableFive: true,
  2508. runDisable: true,
  2509. warnShow: false,
  2510. warnShowTwo: false,
  2511. warnShowThree: false,
  2512. bedZoneThree: [],
  2513. bedNumberTwo: [],
  2514. reverseMode: [
  2515. { id: 0, name: '请选择' },
  2516. { id: 1, name: '单级反渗' },
  2517. { id: 2, name: '双级反渗' }
  2518. ],
  2519. tabIndex: '',
  2520. deviceMode: [],
  2521. zoneDisabled: false,
  2522. bedid: '',
  2523. unitType: '',
  2524. classShow: false
  2525. }
  2526. },
  2527. methods: {
  2528. changeRun(val) {
  2529. if (val === 1) {
  2530. this.runDisable = true
  2531. this.userform.failure_stage = ''
  2532. }
  2533. if (val === 2) {
  2534. this.runDisable = false
  2535. }
  2536. },
  2537. handleClick(tab, event) {
  2538. // console.log(tab, event)
  2539. },
  2540. handleExceed(file) {
  2541. // console.log(file)
  2542. },
  2543. handleRemove(file, fileList) {
  2544. },
  2545. beforeRemove(file, fileList) {
  2546. // console.log(file, fileList)
  2547. },
  2548. handlePreview(file) {
  2549. // console.log(file)
  2550. },
  2551. changetreatmentmode(val) {
  2552. const checkedCount = val.length
  2553. this.checkAll = checkedCount === this.treatmentmode.length
  2554. this.isIndeterminate = checkedCount > 0 && checkedCount < this.treatmentmode.length
  2555. },
  2556. handleCheckAllChange(val) {
  2557. this.form.treat_mode = val ? cityOptions : []
  2558. this.isIndeterminate = false
  2559. },
  2560. handleCheckedCitiesChange(value) {
  2561. const checkedCount = value.length
  2562. this.checkAll = checkedCount === this.cities.length
  2563. this.isIndeterminate = checkedCount > 0 && checkedCount < this.cities.length
  2564. },
  2565. // 获取所有分区
  2566. getAllSubregion() {
  2567. getAllSubregion().then(response => {
  2568. var zones = response.data.data.zones
  2569. this.deviceType = zones
  2570. var numbers = response.data.data.numbers
  2571. var zone = [{ id: 0, name: '全部' }]
  2572. for (let i = 0; i < zones.length; i++) {
  2573. const item = zones[i]
  2574. zone.push({ id: item.id, name: item.name })
  2575. }
  2576. var devicenumber = response.data.data.devicenumber
  2577. // console.log('devicenumber', devicenumber)
  2578. this.bedZone = zone
  2579. var zoness = [{ id: 0, name: '请选择' }]
  2580. for (let i = 0; i < zones.length; i++) {
  2581. const item = zones[i]
  2582. zoness.push({ id: item.id, name: item.name })
  2583. }
  2584. var bed = [{ id: 0, number: '请选择' }]
  2585. for (let i = 0; i < numbers.length; i++) {
  2586. const item = numbers[i]
  2587. // console.log(item)
  2588. bed.push({ id: item.id, number: item.number })
  2589. }
  2590. this.bedNumberTwo = bed
  2591. this.bedZoneTwo = zones
  2592. this.bedZoneThree = zoness
  2593. this.bedNumber = numbers
  2594. // this.Number = devicenumber
  2595. })
  2596. },
  2597. changeBedNumber(val) {
  2598. this.forms.zone_id = val
  2599. this.getAllMachine()
  2600. },
  2601. changeClassId(val) {
  2602. this.forms.class_id = val
  2603. this.getAllMachine()
  2604. },
  2605. changeDeviceId(val) {
  2606. if (val === 1) {
  2607. this.zoneDisabled = false
  2608. } else {
  2609. this.zoneDisabled = true
  2610. }
  2611. this.forms.device_type = val
  2612. this.getAllMachine()
  2613. },
  2614. getAllMachine() {
  2615. getAllMachine(this.forms.zone_id, this.forms.device_type).then(response => {
  2616. if (response.data.state === 1) {
  2617. var addmahcer = response.data.data.addmahcer
  2618. console.log('addmacher是', addmahcer)
  2619. this.tableDatatwo = addmahcer
  2620. this.tabIndex = this.$route.query.index
  2621. this.$refs.singleTable.setCurrentRow(this.tableDatatwo[this.tabIndex])
  2622. }
  2623. })
  2624. },
  2625. handleIndex(index) {
  2626. this.tabIndex = index
  2627. },
  2628. handleCurrentChange(val) {
  2629. this.unitType = val.unit_type
  2630. console.log('val是什么', val)
  2631. this.currentRow = val
  2632. this.$forceUpdate()
  2633. this.getMachineDetailById(val.id)
  2634. this.equimentid = val.id
  2635. this.userdata = val.id
  2636. this.getAllPlanDetail(val.unit_type)
  2637. this.getPatientInfo(val.id)
  2638. // 获取基本信息
  2639. this.getUserRegister(val.id)
  2640. // 病人下机后插入数据
  2641. this.getAutoData(val.id)
  2642. this.getTotalNumber(val.id)
  2643. // this.getTimeWarning(val.id)
  2644. this.getTimeBeteen(val.id)
  2645. this.getData(val.bed_id)
  2646. },
  2647. getAutoData(id) {
  2648. getAutoData(id).then(response => {
  2649. if (response.data.state === 1) {
  2650. var dialysis = response.data.data.dialysis
  2651. }
  2652. })
  2653. },
  2654. getMachineDetailById(id) {
  2655. getMachineDetailById(id).then(response => {
  2656. if (response.data.state === 1) {
  2657. var addmacher = response.data.data.addmacher
  2658. console.log('设备详情', addmacher)
  2659. var warning = response.data.data.warning
  2660. // console.log('warning', warning)
  2661. var time = this.getTimestamp(this.userform.date) - warning.stime
  2662. // console.log('时间', time)
  2663. // if (time < 2678400 && warning.dialysis_checked === 1) {
  2664. // this.warnShow = false
  2665. // } else {
  2666. // this.warnShow = true
  2667. // }
  2668. var germ = response.data.data.germ
  2669. // console.log('germ', germ)
  2670. var timetwo = this.getTimestamp(this.userform.date) - germ.stime
  2671. // console.log('时间', timetwo)
  2672. // if (timetwo < 2678400 && germ.germ_checked === 1) {
  2673. // this.warnShowTwo = false
  2674. // } else {
  2675. // this.warnShowTwo = true
  2676. // }
  2677. var clean = response.data.data.clean
  2678. var timethree = this.getTimestamp(this.userform.date) - clean.stime
  2679. // console.log('时间', timethree)
  2680. // if (timethree < 2678400 && clean.clean === 1) {
  2681. // this.warnShowThree = false
  2682. // } else {
  2683. // this.warnShowThree = true
  2684. // }
  2685. var number = response.data.data.number
  2686. // console.log('number', number)
  2687. this.Number = number
  2688. if (addmacher.device_type === 1) {
  2689. this.sShow = false
  2690. this.qShow = false
  2691. this.tShow = true
  2692. this.DisShow = true
  2693. this.DioShow = false
  2694. this.zhiShow = true
  2695. this.zhShow = false
  2696. this.UserShow = true
  2697. this.Ushow = false
  2698. }
  2699. if (addmacher.device_type === 2) {
  2700. this.tShow = false
  2701. this.qShow = false
  2702. this.sShow = true
  2703. this.DisShow = false
  2704. this.DioShow = true
  2705. this.zhiShow = true
  2706. this.zhShow = false
  2707. this.UserShow = true
  2708. this.Ushow = false
  2709. }
  2710. if (addmacher.device_type === 3) {
  2711. this.tShow = false
  2712. this.sShow = false
  2713. this.qShow = true
  2714. this.DisShow = false
  2715. this.DioShow = true
  2716. this.zhiShow = false
  2717. this.zhShow = true
  2718. this.UserShow = false
  2719. this.Ushow = true
  2720. }
  2721. var mode = response.data.data.mode
  2722. var zone = response.data.data.zone
  2723. const arr1 = []
  2724. // const cityOptions = ['HD', 'HDF', 'HD+HP', 'HP', 'HF', 'SCUF', 'IUF', 'HFHD+HP', 'HFR', 'HDF+HP', 'GRRT', '腹水回收']
  2725. for (let index = 0; index < mode.length; index++) {
  2726. if (mode[index].treate_mode === 1) {
  2727. mode[index] = 'HD'
  2728. }
  2729. if (mode[index].treate_mode === 2) {
  2730. mode[index] = 'HDF'
  2731. }
  2732. if (mode[index].treate_mode === 3) {
  2733. mode[index] = 'HD+HP'
  2734. }
  2735. if (mode[index].treate_mode === 4) {
  2736. mode[index] = 'HP'
  2737. }
  2738. if (mode[index].treate_mode === 5) {
  2739. mode[index] = 'HF'
  2740. }
  2741. if (mode[index].treate_mode === 6) {
  2742. mode[index] = 'SCUF'
  2743. }
  2744. if (mode[index].treate_mode === 7) {
  2745. mode[index] = 'IUF'
  2746. }
  2747. if (mode[index].treate_mode === 8) {
  2748. mode[index] = 'HFHD'
  2749. }
  2750. if (mode[index].treate_mode === 9) {
  2751. mode[index] = 'HFHD+HP'
  2752. }
  2753. if (mode[index].treate_mode === 10) {
  2754. mode[index] = 'PHF'
  2755. }
  2756. if (mode[index].treate_mode === 11) {
  2757. mode[index] = 'HFR'
  2758. }
  2759. if (mode[index].treate_mode === 12) {
  2760. mode[index] = 'HDF+HP'
  2761. }
  2762. if (mode[index].treate_mode === 13) {
  2763. mode[index] = 'CRRT'
  2764. }
  2765. if (mode[index].treate_mode === 14) {
  2766. mode[index] = '腹水回输'
  2767. }
  2768. arr1.push(mode[index])
  2769. }
  2770. this.form.treat_mode = arr1
  2771. this.form.id = addmacher.id
  2772. this.form.serial_number = addmacher.serial_number
  2773. this.form.devicetype = addmacher.device_type
  2774. this.form.bed_number = addmacher.bed_id
  2775. this.form.bed_numbers = addmacher.bed_number
  2776. this.form.beds = addmacher.bed_number
  2777. this.form.device_name = addmacher.device_name
  2778. this.form.manufacture_factory = addmacher.manufacture_factory
  2779. this.form.service_manufacturer = addmacher.service_manufacturer
  2780. // this.form.unit_type = addmacher.unit_type
  2781. this.form.unit_type = parseInt(addmacher.device_mode)
  2782. this.form.use_section = addmacher.use_section
  2783. this.form.section_number = addmacher.section_number
  2784. if (addmacher.buy_date !== 0) {
  2785. this.form.buy_date = uParseTime(addmacher.buy_date, '{y}-{m}-{d}')
  2786. }
  2787. if (addmacher.install_date !== 0) {
  2788. this.form.install_date = uParseTime(addmacher.install_date, '{y}-{m}-{d}')
  2789. }
  2790. if (addmacher.start_date !== 0) {
  2791. this.form.start_date = uParseTime(addmacher.start_date, '{y}-{m}-{d}')
  2792. }
  2793. this.form.maintenance_engineer = addmacher.maintenace_engineer
  2794. this.form.telephone = addmacher.telephone
  2795. this.form.guarantee_date = addmacher.guarantee_date
  2796. this.form.machine_status = addmacher.machine_status
  2797. this.form.user_total = addmacher.user_total
  2798. this.form.remarks = addmacher.remarks
  2799. if (addmacher.rubbish_date !== 0) {
  2800. this.form.rubbish_date = uParseTime(addmacher.rubbish_date, '{y}-{m}-{d}')
  2801. }
  2802. this.form.rubbish_reason = addmacher.rubbish_reason
  2803. this.form.user_year = addmacher.user_year
  2804. this.form.work_time = addmacher.work_time
  2805. // eslint-disable-next-line eqeqeq
  2806. if (addmacher.disinfection_mode == 0) {
  2807. this.form.Disinfection_mode = 0
  2808. } else {
  2809. this.form.Disinfection_mode = addmacher.disinfection_mode
  2810. }
  2811. // eslint-disable-next-line eqeqeq
  2812. if (addmacher.revers_mode == 0) {
  2813. this.form.revers_mode = 0
  2814. } else {
  2815. this.form.revers_mode = addmacher.revers_mode
  2816. }
  2817. this.getAllSubregion()
  2818. }
  2819. })
  2820. },
  2821. UpdateMachine() {
  2822. this.cancelShow = true
  2823. this.confirmShow = true
  2824. this.disableThree = false
  2825. this.disableFour = false
  2826. this.disableFive = false
  2827. },
  2828. UpdateMachineInfo(formName) {
  2829. const arr2 = []
  2830. this.form.treat_mode.map((item, index) => {
  2831. const obj = {}
  2832. if (item === 'HD') {
  2833. obj.id = 1
  2834. }
  2835. if (item === 'HDF') {
  2836. obj.id = 2
  2837. }
  2838. if (item === 'HD+HP') {
  2839. obj.id = 3
  2840. }
  2841. if (item === 'HP') {
  2842. obj.id = 4
  2843. }
  2844. if (item === 'HF') {
  2845. obj.id = 5
  2846. }
  2847. if (item === 'SCUF') {
  2848. obj.id = 6
  2849. }
  2850. if (item === 'IUF') {
  2851. obj.id = 7
  2852. }
  2853. if (item === 'HFHD') {
  2854. obj.id = 8
  2855. }
  2856. if (item === 'HFHD+HP') {
  2857. obj.id = 9
  2858. }
  2859. if (item === 'PHF') {
  2860. obj.id = 10
  2861. }
  2862. if (item === 'HFR') {
  2863. obj.id = 11
  2864. }
  2865. if (item === 'HDF+HP') {
  2866. obj.id = 12
  2867. }
  2868. if (item === 'CRRT') {
  2869. obj.id = 13
  2870. }
  2871. if (item === '腹水回输') {
  2872. obj.id = 14
  2873. }
  2874. arr2.push(obj.id)
  2875. })
  2876. this.form.treat_type = arr2
  2877. var device_type = this.form.devicetype
  2878. var device_types = parseInt(device_type)
  2879. this.form.devicetype = device_types
  2880. if (this.form.rubbish_reason === '') {
  2881. this.form.rubbish_reason = 0
  2882. }
  2883. var rubbish_reason = this.form.rubbish_reason
  2884. var rubbish_reasons = parseInt(rubbish_reason)
  2885. this.form.rubbish_reason = rubbish_reasons
  2886. var machine_status = this.form.machine_status
  2887. var machine_statuss = parseInt(machine_status)
  2888. this.form.machine_status = machine_statuss
  2889. // if (this.form.bed_number === '') {
  2890. // this.form.bed_number = 0
  2891. // }
  2892. var bed_numbers = this.form.bed_number
  2893. var bed_numberss = parseInt(bed_numbers)
  2894. this.form.bed_number = bed_numberss
  2895. this.$refs[formName].validate(valid => {
  2896. UpdateMachineInfo(this.form).then(response => {
  2897. // console.log('form', this.form)
  2898. if (response.data.state === 1) {
  2899. var addmacher = response.data.data.addmacher
  2900. console.log('addmacher----', addmacher)
  2901. this.$message.success('修改成功')
  2902. // this.$router.push({ path: '/device/home?index=' + this.tabIndex })
  2903. for(let i = 0;i < this.tableDatatwo.length;i++) {
  2904. if(this.tableDatatwo[i].id == addmacher.id) {
  2905. this.tableDatatwo[i] = addmacher
  2906. this.$refs.singleTable.setCurrentRow(this.tableDatatwo[i])
  2907. this.$forceUpdate
  2908. }
  2909. }
  2910. // this.getAllMachine()
  2911. // this.getAllSubregion()
  2912. // this.$refs.singleTable.setCurrentRow(addmacher)
  2913. // this.$forceUpdate()
  2914. }
  2915. })
  2916. })
  2917. },
  2918. // eslint-disable-next-line no-irregular-whitespace
  2919. // 更新水处理机
  2920. UpdateMachineInfoTwo(formName) {
  2921. var device_type = this.form.devicetype
  2922. var device_types = parseInt(device_type)
  2923. this.form.devicetype = device_types
  2924. if (this.form.rubbish_reason === '') {
  2925. this.form.rubbish_reason = 0
  2926. }
  2927. var rubbish_reason = this.form.rubbish_reason
  2928. var rubbish_reasons = parseInt(rubbish_reason)
  2929. this.form.rubbish_reason = rubbish_reasons
  2930. var machine_status = this.form.machine_status
  2931. var machine_statuss = parseInt(machine_status)
  2932. this.form.machine_status = machine_statuss
  2933. var revers_mode = this.form.revers_mode
  2934. var revers_modes = parseInt(revers_mode)
  2935. this.form.revers_mode = revers_modes
  2936. var disinfecction_modes = this.form.Disinfection_mode
  2937. var disinfecction_modess = parseInt(disinfecction_modes)
  2938. this.form.Disinfection_mode = disinfecction_modess
  2939. this.$refs[formName].validate(valid => {
  2940. if (valid) {
  2941. UpdateMachineInfoTwo(this.form).then(response => {
  2942. if (response.data.state === 1) {
  2943. // eslint-disable-next-line no-unused-vars
  2944. var addmacher = response.data.data.addmacher
  2945. this.$message.success('修改成功')
  2946. this.getAllMachine()
  2947. this.getAllSubregion()
  2948. }
  2949. })
  2950. }
  2951. })
  2952. },
  2953. UpdateMacheineTwo(formName) {
  2954. var device_type = this.form.devicetype
  2955. var device_types = parseInt(device_type)
  2956. this.form.devicetype = device_types
  2957. if (this.form.rubbish_reason === '') {
  2958. this.form.rubbish_reason = 0
  2959. }
  2960. var rubbish_reason = this.form.rubbish_reason
  2961. var rubbish_reasons = parseInt(rubbish_reason)
  2962. this.form.rubbish_reason = rubbish_reasons
  2963. var machine_status = this.form.machine_status
  2964. var machine_statuss = parseInt(machine_status)
  2965. this.form.machine_status = machine_statuss
  2966. this.$refs[formName].validate(valid => {
  2967. UpdateMacheineTwo(this.form).then(response => {
  2968. if (response.data.state === 1) {
  2969. var add = response.data.data.addmacher
  2970. this.$message.success('修改成功')
  2971. this.getAllMachine()
  2972. this.getAllSubregion()
  2973. }
  2974. })
  2975. })
  2976. },
  2977. cleanMainchine() {
  2978. this.confirmShow = false
  2979. this.cancelShow = false
  2980. // this.form.manufacture_factory = ""
  2981. // this.form.service_manufacturer= ""
  2982. // this.form.use_section= ""
  2983. // this.form.buy_date= ""
  2984. // this.form.install_date= ""
  2985. // this.form.start_date= ""
  2986. // this.form.maintenance_engineer= ""
  2987. // this.form.telephone= ""
  2988. // this.form.guarantee_date= ""
  2989. // this.form.user_total= ""
  2990. // this.form.rubbish_date= ""
  2991. // this.form.user_year = ""
  2992. // this.form.work_time = ""
  2993. // this.form.treat_mode = ""
  2994. },
  2995. addPlan() {
  2996. this.$refs.planForm.open()
  2997. },
  2998. ToReminders() {
  2999. this.$refs.remanderform.open()
  3000. },
  3001. changeCheck() {
  3002. this.$refs.multipleTableOne.clearSelection()
  3003. if (this.checkAllStatusOne) {
  3004. this.$refs.multipleTableOne.toggleAllSelection()
  3005. }
  3006. },
  3007. handleSelectionChange(val) {
  3008. this.selectMachinesOne = val
  3009. },
  3010. changeCheckOne() {
  3011. this.$refs.multipleTable.clearSelection()
  3012. if (this.checkAllStatus) {
  3013. this.$refs.multipleTable.toggleAllSelection()
  3014. }
  3015. },
  3016. handleSelectionChangeOne(val) {
  3017. this.selectMachines = val
  3018. },
  3019. changeMachineStatus(val) {
  3020. if (val === 4) {
  3021. this.readisable = false
  3022. } else {
  3023. this.readisable = true
  3024. this.form.rubbish_date = ''
  3025. this.form.rubbish_reason = ''
  3026. }
  3027. },
  3028. getAllPlan() {
  3029. getAllPlan().then(response => {
  3030. if (response.data.state === 1) {
  3031. var plan = response.data.data.plan
  3032. for (let index = 0; index < plan.length; index++) {
  3033. if (plan[index].time === 1) {
  3034. plan[index].time = '周一'
  3035. }
  3036. if (plan[index].time === 2) {
  3037. plan[index].time = '周二'
  3038. }
  3039. if (plan[index].time === 3) {
  3040. plan[index].time = '周三'
  3041. }
  3042. if (plan[index].time === 4) {
  3043. plan[index].time = '周四'
  3044. }
  3045. if (plan[index].time === 5) {
  3046. plan[index].time = '周五'
  3047. }
  3048. if (plan[index].time === 6) {
  3049. plan[index].time = '周六'
  3050. }
  3051. if (plan[index].time === 7) {
  3052. plan[index].time = '周日'
  3053. }
  3054. if (plan[index].classtime === 1) {
  3055. plan[index].classtime = '上午'
  3056. }
  3057. if (plan[index].classtime === 2) {
  3058. plan[index].classtime = '下午'
  3059. }
  3060. if (plan[index].classtime === 3) {
  3061. plan[index].classtime = '晚上'
  3062. }
  3063. if (plan[index].way === 0) {
  3064. plan[index].way = '/'
  3065. }
  3066. if (plan[index].way === 1) {
  3067. plan[index].way = '擦拭'
  3068. }
  3069. if (plan[index].way === 2) {
  3070. plan[index].way = '化学消毒'
  3071. }
  3072. if (plan[index].machine_disinfectant === 0) {
  3073. plan[index].machine_disinfectant = '/'
  3074. }
  3075. if (plan[index].machine_disinfectant === 1) {
  3076. plan[index].machine_disinfectant = '0.22%季铵盐'
  3077. }
  3078. if (plan[index].machine_disinfectant === 2) {
  3079. plan[index].machine_disinfectant = '500mg/l含氯消毒剂'
  3080. }
  3081. if (plan[index].machine_disinfectantant === 3) {
  3082. plan[index].machine_disinfectant = '1000mg/l含氯消毒剂'
  3083. }
  3084. if (plan[index].machine_disinfectant === 4) {
  3085. plan[index].machine_disinfectant = '1500mg/l含氯消毒剂'
  3086. }
  3087. if (plan[index].disinfectan_way === 0) {
  3088. plan[index].disinfectan_way = '/'
  3089. }
  3090. if (plan[index].disinfectan_way === 1) {
  3091. plan[index].disinfectan_way = '热化学消毒'
  3092. }
  3093. if (plan[index].disinfectan_way === 2) {
  3094. plan[index].disinfectan_way = '化学消毒 + 除钙'
  3095. }
  3096. if (plan[index].disinfectan_way === 3) {
  3097. plan[index].disinfectan_way = '热化学消毒 + 除钙'
  3098. }
  3099. if (plan[index].disinfectan_way === 4) {
  3100. plan[index].disinfectan_way = '热消毒'
  3101. }
  3102. if (plan[index].disinfectan_way === 5) {
  3103. plan[index].disinfectan_way = '化学消毒'
  3104. }
  3105. if (plan[index].disinfectan_way === 6) {
  3106. plan[index].disinfectan_way = '除钙'
  3107. }
  3108. if (plan[index].disinfectan_way === 7) {
  3109. plan[index].disinfectan_way = '清洗'
  3110. }
  3111. if (plan[index].disinfectant === 0) {
  3112. plan[index].disinfectant = '/'
  3113. }
  3114. if (plan[index].disinfectant === 1) {
  3115. plan[index].disinfectant = '20%柠檬酸'
  3116. }
  3117. if (plan[index].disinfectant === 2) {
  3118. plan[index].disinfectant = '25%柠檬酸'
  3119. }
  3120. if (plan[index].disinfectant === 3) {
  3121. plan[index].disinfectant = '50%柠檬酸'
  3122. }
  3123. if (plan[index].disinfectant === 4) {
  3124. plan[index].disinfectant = '50%柠檬酸 + 5%次氯酸钠'
  3125. }
  3126. if (plan[index].disinfectant === 5) {
  3127. plan[index].disinfectant = '20%柠檬酸 + 10%冰醋酸'
  3128. }
  3129. if (plan[index].disinfectant === 6) {
  3130. plan[index].disinfectant = '0.2%过氧化乙酸'
  3131. }
  3132. if (plan[index].disinfectant === 7) {
  3133. plan[index].disinfectant = '10%冰醋酸'
  3134. }
  3135. if (plan[index].disinfectant === 8) {
  3136. plan[index].disinfectant = '50%冰醋酸'
  3137. }
  3138. if (plan[index].disinfectant === 9) {
  3139. plan[index].disinfectant = '5%次氯酸钠'
  3140. }
  3141. }
  3142. this.tableData = plan
  3143. }
  3144. })
  3145. },
  3146. getAllPlanDetail(unit_type) {
  3147. getAllPlanDetail(unit_type).then(response => {
  3148. if (response.data.state === 1) {
  3149. var plandetail = response.data.data.plandetail
  3150. console.log('plandetail', plandetail)
  3151. for (let index = 0; index < plandetail.length; index++) {
  3152. if (plandetail[index].time === 1) {
  3153. plandetail[index].time = '周一'
  3154. }
  3155. if (plandetail[index].time === 2) {
  3156. plandetail[index].time = '周二'
  3157. }
  3158. if (plandetail[index].time === 3) {
  3159. plandetail[index].time = '周三'
  3160. }
  3161. if (plandetail[index].time === 4) {
  3162. plandetail[index].time = '周四'
  3163. }
  3164. if (plandetail[index].time === 5) {
  3165. plandetail[index].time = '周五'
  3166. }
  3167. if (plandetail[index].time === 6) {
  3168. plandetail[index].time = '周六'
  3169. }
  3170. if (plandetail[index].time === 7) {
  3171. plandetail[index].time = '周日'
  3172. }
  3173. if (plandetail[index].classtime === 1) {
  3174. plandetail[index].classtime = '上午'
  3175. }
  3176. if (plandetail[index].classtime === 2) {
  3177. plandetail[index].classtime = '下午'
  3178. }
  3179. if (plandetail[index].classtime === 3) {
  3180. plandetail[index].classtime = '晚上'
  3181. }
  3182. if (plandetail[index].way === 0) {
  3183. plandetail[index].way = '/'
  3184. }
  3185. if (plandetail[index].way === 1) {
  3186. plandetail[index].way = '擦拭'
  3187. }
  3188. if (plandetail[index].way === 2) {
  3189. plandetail[index].way = '化学消毒'
  3190. }
  3191. if (plandetail[index].machine_disinfectant === 0) {
  3192. plandetail[index].machine_disinfectant = '/'
  3193. }
  3194. if (plandetail[index].machine_disinfectant === 1) {
  3195. plandetail[index].machine_disinfectant = '0.22%季铵盐'
  3196. }
  3197. if (plandetail[index].machine_disinfectant === 2) {
  3198. plandetail[index].machine_disinfectant = '500mg/l含氯消毒剂'
  3199. }
  3200. if (plandetail[index].machine_disinfectantant === 3) {
  3201. plandetail[index].machine_disinfectant = '1000mg/l含氯消毒剂'
  3202. }
  3203. if (plandetail[index].machine_disinfectant === 4) {
  3204. plandetail[index].machine_disinfectant = '1500mg/l含氯消毒剂'
  3205. }
  3206. if (plandetail[index].disinfectan_way === 0) {
  3207. plandetail[index].disinfectan_way = '/'
  3208. }
  3209. if (plandetail[index].disinfectan_way === 1) {
  3210. plandetail[index].disinfectan_way = '热化学消毒'
  3211. }
  3212. if (plandetail[index].disinfectan_way === 2) {
  3213. plandetail[index].disinfectan_way = '化学消毒 + 除钙'
  3214. }
  3215. if (plandetail[index].disinfectan_way === 3) {
  3216. plandetail[index].disinfectan_way = '热化学消毒 + 除钙'
  3217. }
  3218. if (plandetail[index].disinfectan_way === 4) {
  3219. plandetail[index].disinfectan_way = '热消毒'
  3220. }
  3221. if (plandetail[index].disinfectan_way === 5) {
  3222. plandetail[index].disinfectan_way = '化学消毒'
  3223. }
  3224. if (plandetail[index].disinfectan_way === 6) {
  3225. plandetail[index].disinfectan_way = '除钙'
  3226. }
  3227. if (plandetail[index].disinfectan_way === 7) {
  3228. plandetail[index].disinfectan_way = '清洗'
  3229. }
  3230. if (plandetail[index].disinfectant === 0) {
  3231. plandetail[index].disinfectant = '/'
  3232. }
  3233. if (plandetail[index].disinfectant === 1) {
  3234. plandetail[index].disinfectant = '20%柠檬酸'
  3235. }
  3236. if (plandetail[index].disinfectant === 2) {
  3237. plandetail[index].disinfectant = '25%柠檬酸'
  3238. }
  3239. if (plandetail[index].disinfectant === 3) {
  3240. plandetail[index].disinfectant = '50%柠檬酸'
  3241. }
  3242. if (plandetail[index].disinfectant === 4) {
  3243. plandetail[index].disinfectant = '50%柠檬酸 + 5%次氯酸钠'
  3244. }
  3245. if (plandetail[index].disinfectant === 5) {
  3246. plandetail[index].disinfectant = '20%柠檬酸 + 10%冰醋酸'
  3247. }
  3248. if (plandetail[index].disinfectant === 6) {
  3249. plandetail[index].disinfectant = '0.2%过氧化乙酸'
  3250. }
  3251. if (plandetail[index].disinfectant === 7) {
  3252. plandetail[index].disinfectant = '10%冰醋酸'
  3253. }
  3254. if (plandetail[index].disinfectant === 8) {
  3255. plandetail[index].disinfectant = '50%冰醋酸'
  3256. }
  3257. if (plandetail[index].disinfectant === 9) {
  3258. plandetail[index].disinfectant = '5%次氯酸钠'
  3259. }
  3260. }
  3261. this.planData = plandetail
  3262. }
  3263. })
  3264. },
  3265. EditMachine(id, index) {
  3266. this.dialogVisible = true
  3267. EditPlanDetail(id).then(response => {
  3268. if (response.data.state === 1) {
  3269. var plan = response.data.data.plan
  3270. this.machineform.id = plan.id
  3271. this.machineform.device_type = plan.device_type
  3272. this.machineform.disinfec_time = plan.disinfec_time
  3273. this.machineform.time = plan.time
  3274. this.machineform.class_time = plan.classtime
  3275. this.machineform.way = plan.way
  3276. this.machineform.machine_disinfectant = plan.machine_disinfectant
  3277. this.machineform.disinfectant_way = plan.disinfectan_way
  3278. this.machineform.disinfectant = plan.disinfectant
  3279. this.getPatientDetail(this.unitType, this.$route.query.bedid)
  3280. }
  3281. })
  3282. },
  3283. UpdatePlanInfo(formName) {
  3284. var devicetype = this.machineform.device_type
  3285. var devicetypes = parseInt(devicetype)
  3286. this.machineform.device_type = devicetypes
  3287. var disinfectimes = this.machineform.disinfec_time
  3288. var disinfectime = parseInt(disinfectimes)
  3289. this.machineform.disinfec_time = disinfectime
  3290. var times = this.machineform.time
  3291. var time = parseInt(times)
  3292. this.machineform.time = time
  3293. var classtimes = this.machineform.class_time
  3294. var classtime = parseInt(classtimes)
  3295. this.machineform.class_time = classtime
  3296. var ways = this.machineform.way
  3297. var way = parseInt(ways)
  3298. this.machineform.way = way
  3299. var machinedisinfectant = this.machineform.machine_disinfectant
  3300. var machinedisinfectants = parseInt(machinedisinfectant)
  3301. this.machineform.machine_disinfectant = machinedisinfectants
  3302. var disinfectantways = this.machineform.disinfectant_way
  3303. var disinfectantway = parseInt(disinfectantways)
  3304. this.machineform.disinfectant_way = disinfectantway
  3305. var disinfectants = this.machineform.disinfectant
  3306. var disinfectant = parseInt(disinfectants)
  3307. this.machineform.disinfectant = disinfectant
  3308. UpdatePlanInfo(this.machineform).then(response => {
  3309. if (response.data.state === 1) {
  3310. var plan = response.data.data.plan
  3311. this.dialogVisible = false
  3312. this.$message.success('修改成功')
  3313. this.getAllPlanDetail(this.unitType)
  3314. this.getAllPlan()
  3315. }
  3316. })
  3317. },
  3318. openDeleteMahcine() {
  3319. if (this.selectMachines.length == 0) {
  3320. this.$message.error('请选择要删除的信息')
  3321. return false
  3322. }
  3323. this.$confirm(
  3324. '确认要删除所选记录吗? <br>删除后,信息将无法恢复',
  3325. '删除提示',
  3326. {
  3327. dangerouslyUseHTMLString: true,
  3328. confirmButtonText: '确定',
  3329. cancelButtonText: '取消',
  3330. type: 'warning'
  3331. }
  3332. )
  3333. .then(() => {
  3334. var ids = []
  3335. var idMap = {}
  3336. for (const index in this.selectMachines) {
  3337. ids.push(this.selectMachines[index].id)
  3338. idMap[this.selectMachines[index].id] = this.selectMachines[
  3339. index
  3340. ].id
  3341. }
  3342. DeletePlans({ ids: ids }).then(response => {
  3343. // eslint-disable-next-line eqeqeq
  3344. if (response.data.state == 1) {
  3345. // eslint-disable-next-line no-unused-vars
  3346. var msg = response.data.data.msg
  3347. var planDataLength = this.planData.length
  3348. for (let index = planDataLength - 1; index >= 0; index--) {
  3349. if (this.planData[index].id in idMap) {
  3350. this.planData.splice(index, 1)
  3351. }
  3352. }
  3353. var planDataLengths = this.tableData.length
  3354. for (let index = planDataLengths - 1; index >= 0; index--) {
  3355. if (this.tableData[index].id in idMap) {
  3356. this.tableData.splice(index, 1)
  3357. }
  3358. }
  3359. this.$message.success('删除消毒计划成功')
  3360. } else {
  3361. this.$message.error('删除消毒计划失败')
  3362. }
  3363. })
  3364. .catch(e => {})
  3365. })
  3366. .catch(() => {
  3367. return false
  3368. })
  3369. },
  3370. openDelete(id, index) {
  3371. // eslint-disable-next-line no-undef
  3372. this.$confirm(
  3373. '确认要删除所选记录吗? <br>删除后,信息将无法恢复',
  3374. '删除提示',
  3375. {
  3376. dangerouslyUseHTMLString: true,
  3377. confirmButtonText: '确定',
  3378. cancelButtonText: '取消',
  3379. type: 'warning'
  3380. }
  3381. ).then(() => {
  3382. openDelete(id, index).then(response => {
  3383. if (response.data.state === 1) {
  3384. var msg = response.data.data.msg
  3385. this.tableData.splice(index, 1)
  3386. this.planData.splice(index, 1)
  3387. }
  3388. })
  3389. })
  3390. },
  3391. openDeleteMahcineOne() {
  3392. if (this.selectMachinesOne.length == 0) {
  3393. this.$message.error('请选择要删除的信息')
  3394. return false
  3395. }
  3396. this.$confirm(
  3397. '确认要删除所选记录吗? <br>删除后,信息将无法恢复',
  3398. '删除提示',
  3399. {
  3400. dangerouslyUseHTMLString: true,
  3401. confirmButtonText: '确定',
  3402. cancelButtonText: '取消',
  3403. type: 'warning'
  3404. }
  3405. )
  3406. .then(() => {
  3407. var ids = []
  3408. var idMap = {}
  3409. for (const index in this.selectMachinesOne) {
  3410. ids.push(this.selectMachinesOne[index].id)
  3411. idMap[this.selectMachinesOne[index].id] = this.selectMachinesOne[
  3412. index
  3413. ].id
  3414. }
  3415. DeletePlans({ ids: ids })
  3416. .then(response => {
  3417. if (response.data.state == 1) {
  3418. var msg = response.data.data.msg
  3419. var planDataLength = this.tableData.length
  3420. for (let index = planDataLength - 1; index >= 0; index--) {
  3421. if (this.tableData[index].id in idMap) {
  3422. this.tableData.splice(index, 1)
  3423. }
  3424. }
  3425. var planDataLengths = this.planData.length
  3426. for (let index = planDataLengths - 1; index >= 0; index--) {
  3427. if (this.planData[index].id in idMap) {
  3428. this.planData.splice(index, 1)
  3429. }
  3430. }
  3431. this.$message.success('删除消毒计划成功')
  3432. } else {
  3433. this.$message.error('删除消毒计划失败')
  3434. }
  3435. })
  3436. .catch(e => {})
  3437. })
  3438. .catch(() => {
  3439. return false
  3440. })
  3441. },
  3442. getAllEquimentName() {
  3443. getAllEquimentName().then(response => {
  3444. if (response.data.state === 1) {
  3445. var equit = response.data.data.equit
  3446. // this.DeviceType = equit
  3447. }
  3448. })
  3449. },
  3450. clickQuery() {
  3451. this.$refs.multipleform.open()
  3452. },
  3453. getPatientInfo(bedid) {
  3454. getPatientInfo(bedid).then(response => {
  3455. if (response.data.state === 1) {
  3456. var schedules = response.data.data.schedules
  3457. // this.patientName = schedules
  3458. }
  3459. })
  3460. },
  3461. ChangeClass(id) {
  3462. ChangeClass(this.equimentid, id).then(response => {
  3463. if (response.data.state === 1) {
  3464. var patients = response.data.data.patients
  3465. if (patients.is_infectious === 0) {
  3466. this.userform.contagion = ''
  3467. }
  3468. if (patients.is_infectious === 1) {
  3469. this.userform.contagion = '无'
  3470. }
  3471. if (patients.is_infectious === 2) {
  3472. this.userform.contagion = '有'
  3473. }
  3474. this.userform.date = uParseTime(patients.schedule_date, '{y}-{m}-{d}')
  3475. this.userform.patient_name = patients.name
  3476. this.userform.patient_id = patients.patient_id
  3477. // this.userform.patient_name = patients.name
  3478. var zone = response.data.data.zone
  3479. // console.log('zone==========', zone)
  3480. this.userform.zone = zone.id
  3481. var number = response.data.data.number
  3482. // console.log('nubmer', number)
  3483. this.userform.bed_number = number.id
  3484. // this.userform.bed_number = number.number
  3485. var order = response.data.data.order
  3486. this.userform.start_time = uParseTime(order.start_time, '{y}-{m}-{d} {h}:{i}')
  3487. this.userform.end_time = uParseTime(order.end_time, '{y}-{m}-{d} {h}:{i}')
  3488. var prescription = response.data.data.prescription
  3489. this.userform.dialysis_mode = prescription.mode_id
  3490. var dislysis = response.data.data.dislysis
  3491. this.userform.dialysis_time = dislysis.actual_treatment_hour + 'h' + dislysis.actual_treatment_minute + 'min'
  3492. this.userform.hyperfiltratio = dislysis.actual_ultrafiltration
  3493. this.userform.weight_loss = dislysis.weight_loss
  3494. }
  3495. })
  3496. },
  3497. updateTimes(time) {
  3498. if (time < 0) {
  3499. return ''
  3500. } else {
  3501. return uParseTime(time, '{y}-{m}-{d} {h}:{i}')
  3502. }
  3503. },
  3504. getTimes(time) {
  3505. return uParseTime(time, '{y}-{m}-{d} {h}:{i}')
  3506. },
  3507. getTime(time) {
  3508. return uParseTime(time, '{y}-{m}-{d}')
  3509. },
  3510. SaveInformation(formName) {
  3511. if (this.userform.classtype === '') {
  3512. this.userform.classtype = 0
  3513. }
  3514. var classtypes = this.userform.classtype
  3515. var classtype = parseInt(classtypes)
  3516. this.userform.classtype = classtype
  3517. var zone = this.userform.zone
  3518. var zones = parseInt(zone)
  3519. this.userform.zone = zones
  3520. var bednumber = this.userform.bed_number
  3521. var bednumbers = parseInt(bednumber)
  3522. this.userform.bed_number = bednumbers
  3523. // var patientName = this.userform.patient_name
  3524. // var patient_name = parseInt(patientName)
  3525. // this.userform.patient_name = patient_name
  3526. var dialysismode = this.userform.dialysis_mode
  3527. var dialysis_mode = parseInt(dialysismode)
  3528. this.userform.dialysis_mode = dialysis_mode
  3529. if (this.userform.failure_stage === '') {
  3530. this.userform.failure_stage = 0
  3531. }
  3532. if (this.userform.dialysis_checked === '') {
  3533. this.userform.dialysis_checked = 0
  3534. }
  3535. if (this.userform.dialysis_checked === true) {
  3536. this.userform.dialysis_checked = 1
  3537. }
  3538. if (this.userform.dialysis_checked === false) {
  3539. this.userform.dialysis_checked = 2
  3540. }
  3541. if (this.userform.germ_checked === '') {
  3542. this.userform.germ_checked = 0
  3543. }
  3544. if (this.userform.germ_checked === true) {
  3545. this.userform.germ_checked = 1
  3546. }
  3547. if (this.userform.germ_checked === false) {
  3548. this.userform.germ_checked = 2
  3549. }
  3550. if (this.userform.dialysis_name === '') {
  3551. this.userform.dialysis_name = 0
  3552. }
  3553. var dialysis_name = this.userform.dialysis_name
  3554. var dialysis = parseInt(dialysis_name)
  3555. this.userform.dialysis_name = dialysis
  3556. if (this.userform.germ_name === '') {
  3557. this.userform.germ_name = 0
  3558. }
  3559. var germname = this.userform.germ_name
  3560. var germames = parseInt(germname)
  3561. this.userform.germ_name = germames
  3562. if (this.userform.clean === '') {
  3563. this.userform.clean = 0
  3564. }
  3565. if (this.userform.clean === true) {
  3566. this.userform.clean = 1
  3567. }
  3568. if (this.userform.clean === false) {
  3569. this.userform.clean = 2
  3570. }
  3571. // eslint-disable-next-line eqeqeq
  3572. if (this.userform.start_time == '') {
  3573. this.userform.start_time = '0'
  3574. }
  3575. // eslint-disable-next-line eqeqeq
  3576. if (this.userform.end_time == '') {
  3577. this.userform.end_time = '0'
  3578. }
  3579. // eslint-disable-next-line eqeqeq
  3580. if (this.userform.starttime == '') {
  3581. this.userform.starttime = '0'
  3582. }
  3583. // eslint-disable-next-line eqeqeq
  3584. if (this.userform.endtime == '') {
  3585. this.userform.endtime = '0'
  3586. }
  3587. if (this.userform.hyperfiltratio === '') {
  3588. this.userform.hyperfiltratio = 0
  3589. }
  3590. var hyperfiltratio = this.userform.hyperfiltratio
  3591. var hyperfiltratios = parseInt(hyperfiltratio)
  3592. this.userform.hyperfiltratio = hyperfiltratios
  3593. if (this.userform.weight_loss === '') {
  3594. this.userform.weight_loss = 0
  3595. }
  3596. var weightloss = this.userform.weight_loss
  3597. var weidht = parseInt(weightloss)
  3598. this.userform.weight_loss = weidht
  3599. if (this.userform.user_total === '0') {
  3600. this.userform.user_total = 0
  3601. }
  3602. // console.log('上机时间', this.userform.start_time)
  3603. // console.log('下机时间', this.userform.end_time)
  3604. this.$refs[formName].validate((valid) => {
  3605. if (valid) {
  3606. SaveInformation(this.equimentid, this.userform).then(response => {
  3607. if (response.data.state === 1) {
  3608. // eslint-disable-next-line no-unused-vars
  3609. var information = response.data.data.information
  3610. var infor = response.data.data.infor
  3611. this.userform.start_time = ''
  3612. this.userform.end_time = ''
  3613. this.userform.starttime = ''
  3614. this.userform.endtime = ''
  3615. this.userform.date = ''
  3616. this.userform.classtype = ''
  3617. this.userform.zone = ''
  3618. this.userform.patient_name = ''
  3619. this.userform.sign_name = ''
  3620. this.userform.bed_number = ''
  3621. this.userform.hyperfiltratio = ''
  3622. this.userform.weight_loss = ''
  3623. this.userform.dialysis_time = ''
  3624. this.$message.success('添加成功')
  3625. // this.$refs.child.getInformationData()
  3626. }
  3627. })
  3628. }
  3629. })
  3630. },
  3631. toLink() {
  3632. window.location.href = this.guaForm.images
  3633. },
  3634. // changStartTime(val) {
  3635. // this.userform.starttime = val
  3636. // },
  3637. // changeEndTime(val) {
  3638. // this.userform.endtime = val
  3639. // console.log('val', val)
  3640. // console.log('开始时间', this.userform.starttime)
  3641. // console.log('呵呵', this.formatDuring(val))
  3642. // },
  3643. // formatDuring(mss) {
  3644. // const days = parseInt(mss / (1000 * 60 * 60 * 24)) // 得到天数
  3645. // const hours = parseInt((mss % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)) // 得到小时
  3646. // const minutes = parseInt((mss % (1000 * 60 * 60)) / (1000 * 60)) // 得到分钟数
  3647. // const seconds = (mss % (1000 * 60)) / 1000 // 得到秒数
  3648. // const str1 = hours < 10 ? ('0' + hours) : hours
  3649. // console.log('str1', str1)
  3650. // const str2 = minutes < 10 ? ('0' + minutes) : minutes
  3651. // return str1 + ':' + str2
  3652. // },
  3653. // 获取签名
  3654. getAllOrganization() {
  3655. getAllOrganization().then(response => {
  3656. if (response.data.state === 1) {
  3657. var approle = response.data.data.approle
  3658. // console.log('approle签名',approle)
  3659. this.autograph = approle
  3660. this.sampling = approle
  3661. }
  3662. })
  3663. },
  3664. getUserRegister(id) {
  3665. getUserRegister(id).then(response => {
  3666. if (response.data.state === 1) {
  3667. var information = response.data.data.information
  3668. console.log('产讯使用登记', information)
  3669. // eslint-disable-next-line no-unused-vars
  3670. var role = response.data.data.role
  3671. // console.log('role', role)
  3672. // eslint-disable-next-line eqeqeq
  3673. var dislysis = response.data.data.dislysis
  3674. this.userform.id = information.id
  3675. if (information.date === 0) {
  3676. this.userform.date = moment(new Date()).format('YYYY-MM-DD')
  3677. } else {
  3678. this.userform.date = uParseTime(information.date, '{y}-{m}-{d}')
  3679. }
  3680. this.userform.classtype = information.class
  3681. this.userform.zone = information.zone
  3682. this.userform.bed_number = information.bed_number
  3683. this.userform.patient_name = information.name
  3684. this.userform.patient_id = information.patient_id
  3685. this.userform.contagion = information.contagion
  3686. this.userform.dialysis_mode = information.dialysis_mode
  3687. this.userform.start_time = this.updateTimes(information.start_time)
  3688. // this.userform.start_time = uParseTime(information.start_time, '{y}-{m}-{d} {h}:{i}')
  3689. this.userform.end_time = this.updateTimes(information.end_time)
  3690. // this.userform.end_time = uParseTime(information.end_time, '{y}-{m}-{d} {h}:{i}')
  3691. // this.userform.dialysis_time = information.dialysis_hour
  3692. // this.userform.hyperfiltratio = information.hyperfiltratio
  3693. // this.userform.weight_loss = information.weight_loss
  3694. if (information.hyperfiltratio === '') {
  3695. this.userform.hyperfiltratio = dislysis.actual_ultrafiltration
  3696. } else {
  3697. this.userform.hyperfiltratio = information.hyperfiltratio
  3698. }
  3699. if (information.dialysis_hour === '') {
  3700. this.userform.dialysis_time = dislysis.actual_treatment_hour + 'h' + dislysis.actual_treatment_minute + 'min'
  3701. } else {
  3702. this.userform.dialysis_time = information.dialysis_hour
  3703. }
  3704. // this.userform.dialysis_time = dislysis.actual_treatment_hour + 'h' + dislysis.actual_treatment_minute + 'min'
  3705. // this.userform.hyperfiltratio = dislysis.actual_ultrafiltration
  3706. if (information.weight_loss === '') {
  3707. this.userform.weight_loss = dislysis.weight_loss
  3708. } else {
  3709. this.userform.weight_loss = information.weight_loss
  3710. }
  3711. // this.userform.weight_loss = dislysis.weight_loss
  3712. this.userform.warning_value = information.warning_value
  3713. this.userform.user_total = information.user_total
  3714. if (information.move === 0) {
  3715. this.userform.run = 1
  3716. } else {
  3717. this.userform.run = information.move
  3718. }
  3719. this.userform.failure_stage = information.failure_stage
  3720. this.userform.fault_description = information.fault_description
  3721. this.userform.code_information = information.code_information
  3722. this.userform.disinfect_type = information.disinfect_type
  3723. this.userform.disinfection = information.disinfection
  3724. this.userform.machine_run = information.machine_run
  3725. this.userform.fluid_path = information.fluid_path
  3726. this.userform.disinfectant = information.disinfectant
  3727. this.userform.disinfectant = information.disinfection_status
  3728. this.userform.disinfection_residue = information.disinfection_residue
  3729. this.userform.longtime = information.long_time
  3730. this.userform.starttime = this.updateTimes(information.disinfec_startime)
  3731. this.userform.endtime = this.updateTimes(information.disinfec_endtime)
  3732. // this.userform.starttime = uParseTime(information.disinfec_startime, '{y}-{m}-{d} {h}:{i}')
  3733. // this.userform.endtime = uParseTime(information.disinfec_endtime, '{y}-{m}-{d} {h}:{i}')
  3734. if (information.dialysis_checked === 1) {
  3735. this.userform.dialysis_checked = true
  3736. }
  3737. if (information.dialysis_checked === 0) {
  3738. this.userform.dialysis_checked = false
  3739. }
  3740. if (information.dialysis_checked === 2) {
  3741. this.userform.dialysis_checked = false
  3742. }
  3743. this.userform.dialysis_name = information.dialysis_name
  3744. this.userform.norms = information.norms
  3745. this.userform.dialysis_concentration = information.dialysis_concentration
  3746. if (information.germ_checked === 0) {
  3747. this.userform.germ_checked = false
  3748. }
  3749. if (information.germ_checked === 2) {
  3750. this.userform.germ_checked = false
  3751. }
  3752. if (information.germ_checked === 1) {
  3753. this.userform.germ_checked = true
  3754. }
  3755. this.userform.germ_name = information.germ_name
  3756. this.userform.germ_number = information.germ_number
  3757. if (information.clean === 1) {
  3758. this.userform.clean = true
  3759. }
  3760. if (information.clean === 0) {
  3761. this.userform.clean = false
  3762. }
  3763. if (information.clean === 2) {
  3764. this.userform.clean = false
  3765. }
  3766. // eslint-disable-next-line eqeqeq
  3767. if (information.admin_user_id == 0) {
  3768. this.userform.sign_name = ''
  3769. } else {
  3770. this.userform.sign_name = information.admin_user_id
  3771. }
  3772. this.$forceUpdate()
  3773. }
  3774. })
  3775. },
  3776. getOrgName() {
  3777. getOrgName().then(response => {
  3778. if (response.data.state === 1) {
  3779. var org = response.data.data.org
  3780. this.qualityForm.detection_unit = org.org_name
  3781. this.qualityFormTwo.detection_unit = org.org_name
  3782. this.qualityFormThree.detection_unit = org.org_name
  3783. }
  3784. })
  3785. },
  3786. SaveBacteria(formName) {
  3787. if (this.qualityForm.specimen === '') {
  3788. this.qualityForm.specimen = 0
  3789. }
  3790. var specimen = this.qualityForm.specimen
  3791. var specimens = parseInt(specimen)
  3792. this.qualityForm.specimen = specimens
  3793. if (this.qualityForm.sampling_locationa === '') {
  3794. this.qualityForm.sampling_locationa = 0
  3795. }
  3796. var samplinglocationa = this.qualityForm.sampling_locationa
  3797. var samplinglocationas = parseInt(samplinglocationa)
  3798. this.qualityForm.sampling_locationa = samplinglocationas
  3799. this.$refs[formName].validate(response => {
  3800. SaveBacteria(this.equimentid, this.qualityForm).then(response => {
  3801. if (response.data.state === 1) {
  3802. var culture = response.data.data.culture
  3803. this.$message.success('保存成功')
  3804. this.qualityForm.specimen = '',
  3805. this.qualityForm.concentrate_noa = '',
  3806. this.qualityForm.concentrate_nob = '',
  3807. this.qualityForm.sampling_locationa = '',
  3808. this.qualityForm.sampler = ''
  3809. this.qualityForm.reporting_date = ''
  3810. this.qualityForm.detection_result = ''
  3811. this.$refs.child.getAllQulityInfo()
  3812. }
  3813. })
  3814. })
  3815. },
  3816. cleanSaveBacteria() {
  3817. this.qualityForm.specimen = '',
  3818. this.qualityForm.concentrate_noa = '',
  3819. this.qualityForm.concentrate_nob = '',
  3820. this.qualityForm.sampling_locationa = '',
  3821. this.qualityForm.sampler = ''
  3822. this.qualityForm.reporting_date = ''
  3823. this.qualityForm.detection_result = ''
  3824. },
  3825. SaveLincomycin(formName) {
  3826. this.$refs[formName].validate((valid) => {
  3827. if (this.qualityFormTwo.specimenb === '') {
  3828. this.qualityFormTwo.specimenb = 0
  3829. }
  3830. var specimen = this.qualityFormTwo.specimenb
  3831. var specimenb = parseInt(specimen)
  3832. this.qualityFormTwo.specimenb = specimenb
  3833. if (this.qualityFormTwo.sampling_locationb === '') {
  3834. this.qualityFormTwo.sampling_locationb = 0
  3835. }
  3836. var sampling = this.qualityFormTwo.sampling_locationb
  3837. var samplings = parseInt(sampling)
  3838. this.qualityFormTwo.sampling_locationb = samplings
  3839. if (valid) {
  3840. SaveLincomycin(this.equimentid, this.qualityFormTwo).then(response => {
  3841. if (response.data.state === 1) {
  3842. var dialysate = response.data.data.dialysate
  3843. this.$message.success('保存成功')
  3844. this.qualityFormTwo.specimenb = ''
  3845. this.qualityFormTwo.concentrate_noc = ''
  3846. this.qualityFormTwo.concentrateb_nod = ''
  3847. this.qualityFormTwo.sampling_locationb = ''
  3848. this.qualityFormTwo.samplerb = ''
  3849. this.qualityFormTwo.reporting_dateb = ''
  3850. this.qualityFormTwo.detection_resultb = ''
  3851. this.$refs.child.getAllQulityInfo()
  3852. }
  3853. })
  3854. }
  3855. })
  3856. },
  3857. cleanLincomycin() {
  3858. this.qualityFormTwo.specimenb = ''
  3859. this.qualityFormTwo.concentrate_noc = ''
  3860. this.qualityFormTwo.concentrateb_nod = ''
  3861. this.qualityFormTwo.sampling_locationb = ''
  3862. this.qualityFormTwo.samplerb = ''
  3863. this.qualityFormTwo.reporting_dateb = ''
  3864. this.qualityFormTwo.detection_resultb = ''
  3865. },
  3866. SaveQualityControl(formName) {
  3867. this.$refs[formName].validate((valid) => {
  3868. if (valid) {
  3869. SaveQualityControl(this.equimentid, this.qualityFormThree).then(response => {
  3870. if (response.data.state === 1) {
  3871. var ion = response.data.data.ion
  3872. // console.log('ion', ion)
  3873. this.$message.success('保存成功')
  3874. this.$refs.child.getAllQulityInfo()
  3875. this.qualityFormThree.samplerc = ''
  3876. this.qualityFormThree.concentrate_nof = ''
  3877. this.qualityFormThree.concentrate_nog = ''
  3878. this.qualityFormThree.date_reportc = ''
  3879. this.qualityFormThree.actual_na = ''
  3880. this.qualityFormThree.actual_pna = ''
  3881. this.qualityFormThree.actual_k = ''
  3882. this.qualityFormThree.actual_ca = ''
  3883. this.qualityFormThree.actual_ci = ''
  3884. this.qualityFormThree.actual_hco = ''
  3885. this.qualityFormThree.actual_mg = ''
  3886. this.qualityFormThree.actual_ph = ''
  3887. this.qualityFormThree.remakes = ''
  3888. }
  3889. })
  3890. }
  3891. })
  3892. },
  3893. cleanQuality() {
  3894. this.qualityFormThree.samplerc = ''
  3895. this.qualityFormThree.concentrate_nof = ''
  3896. this.qualityFormThree.concentrate_nog = ''
  3897. this.qualityFormThree.date_reportc = ''
  3898. this.qualityFormThree.actual_na = ''
  3899. this.qualityFormThree.actual_pna = ''
  3900. this.qualityFormThree.actual_k = ''
  3901. this.qualityFormThree.actual_ca = ''
  3902. this.qualityFormThree.actual_ci = ''
  3903. this.qualityFormThree.actual_hco = ''
  3904. this.qualityFormThree.actual_mg = ''
  3905. this.qualityFormThree.actual_ph = ''
  3906. this.qualityFormThree.remakes = ''
  3907. },
  3908. changeSpecimen(val) {
  3909. if (val === 0) {
  3910. this.disable = false
  3911. this.diableTwo = false
  3912. }
  3913. if (val === 1) {
  3914. this.disable = false
  3915. this.diableTwo = false
  3916. }
  3917. if (val === 2) {
  3918. this.qualityForm.concentrate_nob = ''
  3919. this.qualityFormTwo.concentrateb_nod = ''
  3920. this.diableTwo = true
  3921. this.disable = false
  3922. }
  3923. if (val === 3) {
  3924. this.qualityForm.concentrate_noa = ''
  3925. this.qualityFormTwo.concentrate_noc = ''
  3926. this.disable = true
  3927. this.diableTwo = false
  3928. }
  3929. if (val === 4) {
  3930. this.disable = false
  3931. this.diableTwo = false
  3932. }
  3933. if (val === 5) {
  3934. this.disable = false
  3935. this.diableTwo = false
  3936. }
  3937. },
  3938. beforeUploadFile(file) {
  3939. this.filename = file.name
  3940. this.classShow = true
  3941. this.guaForm.imageName = file.name
  3942. const isLt2M = file.size / 1024 / 1024 <= 2048
  3943. var date = new Date()
  3944. var ext = getFileExtension(file.name)
  3945. var key = date.getFullYear() + (date.getMonth() + 1) + date.getDate() + date.getHours() + date.getMinutes() + date.getSeconds() + '_o_' + file.uid + '.' + ext
  3946. const _self = this
  3947. return new Promise((resolve, reject) => {
  3948. getToken().then(response => {
  3949. const token = response.data.data.uptoken
  3950. console.log('token', token)
  3951. _self._data.uploadFileData.token = token
  3952. _self._data.uploadFileData.key = key
  3953. resolve(true)
  3954. // eslint-disable-next-line handle-callback-err
  3955. }).catch(err => {
  3956. reject(false)
  3957. })
  3958. })
  3959. },
  3960. handleSuccess(res, file, fileList) {
  3961. this.guaForm.images = this.qiniuDomain + res.url
  3962. console.log('图片路径', this.guaForm.images)
  3963. this.$refs.upload.clearFiles()
  3964. this.filename = file.name
  3965. this.guaForm.imageName = file.name
  3966. },
  3967. // eslint-disable-next-line no-dupe-keys
  3968. getTime(value, temp) {
  3969. // eslint-disable-next-line eqeqeq
  3970. if (value != undefined) {
  3971. return parseTime(value, temp)
  3972. }
  3973. return ''
  3974. },
  3975. SaveRepair(formName) {
  3976. if (this.guaForm.start_time === '') {
  3977. this.guaForm.start_time = '0'
  3978. }
  3979. if (this.guaForm.arrive_time === '') {
  3980. this.guaForm.arrive_time = '0'
  3981. }
  3982. if (this.guaForm.finish_time === '') {
  3983. this.guaForm.finish_time = '0'
  3984. }
  3985. if (this.guaForm.failure_stage === '') {
  3986. this.guaForm.failure_stage = '0'
  3987. }
  3988. var failurestages = this.guaForm.failure_stage
  3989. var falur = parseInt(failurestages)
  3990. this.guaForm.failure_stage = falur
  3991. if (this.guaForm.exclude === '') {
  3992. this.guaForm.exclude = 0
  3993. }
  3994. var excludes = this.guaForm.exclude
  3995. var exclude = parseInt(excludes)
  3996. this.guaForm.exclude = exclude
  3997. this.$refs[formName].validate((valid) => {
  3998. if (valid) {
  3999. SaveRepair(this.equimentid, this.guaForm).then(response => {
  4000. if (response.data.state === 1) {
  4001. var repair = response.data.data.repair
  4002. // console.log('reqair', repair)
  4003. this.$message.success('保存成功')
  4004. this.$refs.child.getAllRepair()
  4005. this.guaForm.start_time = ''
  4006. this.guaForm.arrive_time = ''
  4007. this.guaForm.finish_time = ''
  4008. this.guaForm.total_distance = ''
  4009. this.guaForm.code_information = ''
  4010. this.guaForm.fault_description = ''
  4011. this.guaForm.cause_analysis = ''
  4012. this.guaForm.reason = ''
  4013. this.guaForm.failure_stage = 0
  4014. this.guaForm.exclude = 0
  4015. this.guaForm.images = ''
  4016. this.guaForm.treatment_process = ''
  4017. }
  4018. })
  4019. }
  4020. })
  4021. },
  4022. querySearchAsync(keyword, cb) {
  4023. let key = ''
  4024. if (keyword != undefined) {
  4025. key = keyword
  4026. }
  4027. let searchArray = []
  4028. PostSearch(key).then(response => {
  4029. if (response.data.state == 1) {
  4030. searchArray = response.data.data.patient
  4031. // console.log("ser",searchArray)
  4032. cb(searchArray)
  4033. }
  4034. })
  4035. return searchArray
  4036. },
  4037. createFilter(queryString) {
  4038. return (searchArray) => {
  4039. return (searchArray.id.toLowerCase().indexOf(queryString.toLowerCase()) === 0)
  4040. }
  4041. },
  4042. handleSelect(item) {
  4043. this.userform.patient_id = item.id
  4044. this.userform.patient_name = item.name
  4045. // eslint-disable-next-line no-undef
  4046. getPatientDetail(item.id).then(response => {
  4047. // eslint-disable-next-line eqeqeq
  4048. if (response.data.state == 1) {
  4049. var patient = response.data.data.patient
  4050. // console.log('patient', patient)
  4051. // eslint-disable-next-line no-undef
  4052. if (patient.is_infectious === 0) {
  4053. this.userform.contagion = ''
  4054. }
  4055. // eslint-disable-next-line no-undef
  4056. if (patient.is_infectious === 1) {
  4057. this.userform.contagion = '无'
  4058. }
  4059. // eslint-disable-next-line no-undef
  4060. if (patient.is_infectious === 2) {
  4061. this.userform.contagion = '有'
  4062. }
  4063. }
  4064. })
  4065. },
  4066. getAllEquitType() {
  4067. getAllEquitType().then(response => {
  4068. if (response.data.state === 1) {
  4069. var equitname = response.data.data.mode
  4070. this.DeviceType = equitname
  4071. }
  4072. })
  4073. },
  4074. getTotalNumber() {
  4075. getTotalNumber(this.equimentid).then(response => {
  4076. if (response.data.state === 1) {
  4077. var total = response.data.data.total
  4078. if (total === '') {
  4079. this.userform.user_total = ''
  4080. }
  4081. this.userform.user_total = total
  4082. } else {
  4083. this.$message.error('数据返回失败')
  4084. }
  4085. })
  4086. },
  4087. getAllpatient() {
  4088. getAllpatient().then(response => {
  4089. if (response.data.state === 1) {
  4090. var allpatient = response.data.data.allpatient
  4091. this.patientName = allpatient
  4092. }
  4093. })
  4094. },
  4095. getTimeWarning(id) {
  4096. getTimeWarning(id).then(response => {
  4097. if (response.data.state === 1) {
  4098. var information = response.data.data.informations
  4099. // console.log('码字', information)
  4100. // console.log('当前时间', this.getTimestamp(this.userform.date))
  4101. // console.log('存入时间', information.stime)
  4102. var time = this.getTimestamp(this.userform.date) - information.stime
  4103. console.log('时间', time)
  4104. // if (time < 2678400) {
  4105. // this.warnShow = false
  4106. // }
  4107. var deviceInformation = response.data.data.deviceInformation
  4108. var timetwo = this.getTimestamp(this.userform.date) - deviceInformation.stime
  4109. // if (timetwo < 2678400) {
  4110. // this.warnShowTwo = false
  4111. // }
  4112. var clean = response.data.data.clean
  4113. // var timethree = this.getTimestamp(this.userform.date) - clean.stime
  4114. // if (timethree < 2678400) {
  4115. // this.warnShowThree = false
  4116. // }
  4117. }
  4118. })
  4119. },
  4120. getTimeBeteen(id) {
  4121. var todayTime = moment(new Date()).format('YYYY-MM-DD')
  4122. console.log('todayTime', todayTime)
  4123. getTimeBeteen(id, todayTime).then(response => {
  4124. if (response.data.state === 1) {
  4125. // debugger
  4126. var timedata = response.data.data.timeData
  4127. console.log('timedata', timedata)
  4128. console.log('timedata', timedata.length)
  4129. if (timedata.length === 0) {
  4130. this.warnShow = true
  4131. }
  4132. if (timedata.length !== 0) {
  4133. this.warnShow = false
  4134. }
  4135. var todayTimeTwo = response.data.data.timeDataTwo
  4136. console.log('todayTimeTwo', todayTimeTwo)
  4137. if (todayTimeTwo.length === 0) {
  4138. this.warnShowTwo = true
  4139. }
  4140. if (todayTimeTwo.length !== 0) {
  4141. this.warnShowTwo = false
  4142. }
  4143. var timeDataThree = response.data.data.timeDataThree
  4144. console.log('timeDataThree', timeDataThree)
  4145. if (timeDataThree.length === 0) {
  4146. this.warnShowThree = true
  4147. }
  4148. if (timeDataThree.length !== 0) {
  4149. this.warnShowThree = false
  4150. }
  4151. }
  4152. })
  4153. },
  4154. getTimestamp(time) { // 把时间日期转成时间戳
  4155. return (new Date(time)).getTime() / 1000
  4156. },
  4157. // eslint-disable-next-line no-irregular-whitespace
  4158. // 通过自组建传值改变表格数据
  4159. getPlanData(data) {
  4160. if (data === 1) {
  4161. this.getAllPlanDetail(this.unitType)
  4162. }
  4163. },
  4164. getAllMode() {
  4165. getAllMode().then(response => {
  4166. var mode = response.data.data.mode
  4167. this.deviceMode = mode
  4168. })
  4169. },
  4170. selectChange(id) {
  4171. selectChange(id).then(response => {
  4172. if (response.data.state === 1) {
  4173. this.userform.bed_number = ''
  4174. var change = response.data.data.change
  4175. this.bedNumberTwo = change
  4176. // console.log('change', change)
  4177. }
  4178. })
  4179. },
  4180. selectBed(id) {
  4181. selectBed(id).then(response => {
  4182. if (response.data.state === 1) {
  4183. var zone = response.data.data.zone
  4184. }
  4185. })
  4186. },
  4187. getData(id) {
  4188. selectBed(id).then(response => {
  4189. if (response.data.state === 1) {
  4190. var zone = response.data.data.zone
  4191. this.$forceUpdate()
  4192. this.userform.bed_number = zone.id
  4193. this.userform.zone = zone.zone_id
  4194. console.log('zone', zone)
  4195. }
  4196. })
  4197. },
  4198. hiddenShow() {
  4199. this.filename = ''
  4200. this.classShow = false
  4201. }
  4202. },
  4203. created() {
  4204. this.getAllSubregion()
  4205. this.getAllMachine()
  4206. var index = this.$route.query.index
  4207. var bedid = this.$route.query.bedid
  4208. // var id = this.$route.query.id
  4209. // this.equimentid = id
  4210. this.bedid = bedid
  4211. this.getAllPlan()
  4212. this.getAllEquimentName()
  4213. this.getAllOrganization()
  4214. this.getOrgName()
  4215. this.getAllEquitType()
  4216. this.getAllpatient()
  4217. this.getAllMode()
  4218. }
  4219. }
  4220. </script>
  4221. <style lang="scss" scoped>
  4222. .zone{
  4223. // margin-left: 30px;
  4224. // text-align: left;
  4225. width: 70px;
  4226. display: inline-block;
  4227. color:#606266;
  4228. }
  4229. .disinfect{
  4230. position: relative;
  4231. .newButton{
  4232. // position: absolute;
  4233. // right: 2%;
  4234. // top:4px;
  4235. // z-index: 9;
  4236. margin-bottom: 10px;
  4237. margin-left: 90%;
  4238. }
  4239. }
  4240. .disinfectOne{
  4241. position: relative;
  4242. .newButtonOne{
  4243. position: absolute;
  4244. right: 0;
  4245. top: -10;
  4246. z-index: 18;
  4247. }
  4248. }
  4249. .but{
  4250. width: 200px;
  4251. height: 50px;
  4252. // border: solid 1px red;
  4253. margin-left: 77%;
  4254. }
  4255. .clearn{
  4256. width: 460px;
  4257. height: 50px;
  4258. // border:solid 1px red;
  4259. margin-left:650px;
  4260. }
  4261. .zClass{
  4262. width: 200px;
  4263. height: 200px;
  4264. // border:solid 1px red;
  4265. margin-left: 450px;
  4266. margin-top: 200px;
  4267. }
  4268. .warn{
  4269. color: red;
  4270. font-size: 14px;
  4271. width: 100%;
  4272. display: inline-block;
  4273. margin-left: 96px;
  4274. }
  4275. .userbutton{
  4276. margin-bottom: 10px;
  4277. margin-left: 82%
  4278. }
  4279. </style>
  4280. <style lang="scss">
  4281. .a{
  4282. margin-bottom: 10px;
  4283. margin-top: 6px;
  4284. }
  4285. .b{
  4286. .el-button{
  4287. margin-left: 90%;
  4288. margin-bottom: 10px;
  4289. }
  4290. }
  4291. .stoppage{
  4292. .el-form-item__label{
  4293. width:190px;
  4294. }
  4295. }
  4296. .st{
  4297. .el-form-item__label{
  4298. width:-10px;
  4299. }
  4300. }
  4301. .main{
  4302. position: relative;
  4303. .newButtonOne{
  4304. position:absolute;
  4305. right: 0;
  4306. z-index: 2;
  4307. }
  4308. }
  4309. .elbutton{
  4310. // border: solid 1px red;
  4311. height: 50px;
  4312. width: 400px;
  4313. margin-left: 650px;
  4314. }
  4315. // .el-form-item__label {
  4316. // width: 130px;
  4317. // font-size: 14px;
  4318. // }
  4319. .el-form-item__error {
  4320. margin-left: 130px;
  4321. }
  4322. .el-upload-list__item-name {
  4323. color: #606266;
  4324. display: block;
  4325. margin-right: 40px;
  4326. overflow: hidden;
  4327. padding-left: 4px;
  4328. text-overflow: ellipsis;
  4329. transition: color .3s;
  4330. white-space: nowrap;
  4331. }
  4332. .el-main{
  4333. padding-top: 0px;
  4334. }
  4335. .newMain{
  4336. .el-form-item__label{
  4337. width: 104px;
  4338. }
  4339. }
  4340. .newDisinfectOne{
  4341. .el-input--prefix .el-input__inner{
  4342. padding-left: 15px
  4343. }
  4344. }
  4345. .stoppage{
  4346. .el-form-item__label{
  4347. width: 18%;
  4348. }
  4349. }
  4350. .newItem{
  4351. .el-form-item__label{
  4352. width: 130px;
  4353. }
  4354. }
  4355. .formItem{
  4356. .el-form-item__label{
  4357. width: 104px;
  4358. line-height: 30px;
  4359. }
  4360. }
  4361. .newname{
  4362. .el-form-item__label{
  4363. width: 60px;
  4364. }
  4365. }
  4366. ::-webkit-scrollbar{
  4367. height: 20px;
  4368. }
  4369. </style>