index.vue 129KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500
  1. <template>
  2. <!-- 点击透析记录患者资料跳转的页面 -->
  3. <div class="main-contain">
  4. <div class="position">
  5. <bread-crumb :crumbs="crumbs"></bread-crumb>
  6. <div class="print" style="float:left;">
  7. <el-button
  8. v-if="queueConfig.txxqyxs == 1"
  9. size="small"
  10. type="primary"
  11. @click="call"
  12. >叫号</el-button
  13. >
  14. <el-button
  15. v-if="queueConfig.txxqyxs == 1"
  16. size="small"
  17. type="primary"
  18. @click="next"
  19. >下一位</el-button
  20. >
  21. <el-button
  22. size="small"
  23. type="primary"
  24. @click="history_click"
  25. >透析历史</el-button>
  26. <el-button
  27. size="small"
  28. type="primary"
  29. @click="printOrderOne"
  30. icon="el-icon-printer"
  31. >打印上机单</el-button>
  32. <el-button
  33. size="small"
  34. type="primary"
  35. @click="printOrder"
  36. icon="el-icon-printer"
  37. >打印</el-button
  38. >
  39. </div>
  40. </div>
  41. <div
  42. class="loadingBox"
  43. v-loading="loading"
  44. element-loading-text="拼命加载中"
  45. element-loading-spinner="el-icon-loading"
  46. element-loading-background="rgba(0, 0, 0, 0.8)"
  47. >
  48. <div class="patientBox" style="width:300px;padding-left:10px;position: relative;" v-if="norefresh">
  49. <el-button
  50. style="position: absolute;right:0;top:2px;z-index:10"
  51. size="small"
  52. type="primary"
  53. @click="refresh"
  54. >刷新</el-button>
  55. <el-tabs v-model="activeName" @tab-click="handleClick">
  56. <!-- 候诊区 -->
  57. <el-tab-pane label="候诊区" name="first">
  58. <div class="cell clearfix" style="margin-bottom:10px;">
  59. <el-date-picker v-model="selected_date"
  60. prefix-icon="el-icon-date" @change="handleScheduleDateChange"
  61. :editable="false" :clearable="false"
  62. style="width: 45%;margin-right:10px;" type="date" placeholder="选择日期时间" align="right" >
  63. </el-date-picker>
  64. <el-input size="small" style="width:25%;" @keyup.enter.native='searchAction' v-model.trim="search_input" class="filter-item"/>
  65. <el-button size="small" class="filter-item" type="primary" style="margin-right:20px;" @click="searchAction">搜索</el-button>
  66. </div>
  67. <div class="cell clearfix" style="margin-bottom:10px;display:flex;">
  68. <el-select v-model="patientStateVal" placeholder="全部患者状态" style="margin-right:10px;" @change="handleStateChange">
  69. <el-option
  70. v-for="item in patient_state"
  71. :key="item.value"
  72. :label="item.label"
  73. :value="item.value">
  74. </el-option>
  75. </el-select>
  76. <el-select v-model="treatStateVal" placeholder="全部治疗状态" style="margin-right:20px;" @change="handleTreatChange">
  77. <el-option
  78. v-for="item in treat_state"
  79. :key="item.value"
  80. :label="item.label"
  81. :value="item.value">
  82. </el-option>
  83. </el-select>
  84. </div>
  85. <div class="cell clearfix" style="margin-bottom:10px;display:flex;">
  86. <el-select v-model="scheduleStateVal" placeholder="班次" style="margin-right:10px;" @change="handletimeType">
  87. <el-option
  88. v-for="item in schedule_options"
  89. :key="item.value"
  90. :label="item.label"
  91. :value="item.value">
  92. </el-option>
  93. </el-select>
  94. <el-select v-model="zoneVal" placeholder="分区" style="margin-right:20px;" @change="handleZoneChange">
  95. <el-option
  96. v-for="item in zone_options"
  97. :key="item.id"
  98. :label="item.text"
  99. :value="item.id">
  100. </el-option>
  101. </el-select>
  102. </div>
  103. <div style="padding-right:20px;">
  104. <el-table
  105. ref="tab"
  106. @row-click="changePatient"
  107. highlight-current-row
  108. :data="tableData"
  109. height="500"
  110. border
  111. style="width: 100%">
  112. <el-table-column
  113. prop="date"
  114. label="床号"
  115. width="50"
  116. >
  117. <template slot-scope="scope">
  118. {{ scope.row.device_number.number }}
  119. </template>
  120. </el-table-column>
  121. <el-table-column
  122. prop="date"
  123. label="患者"
  124. >
  125. <template slot-scope="scope">
  126. {{ scope.row.patient.name }}
  127. <span v-if="scope.row.assessment_before_dislysis && patientStateVal == 1">
  128. ({{ getTime(scope.row.assessment_before_dislysis.created_time) }})
  129. </span>
  130. <!-- <span class="touxi_cishu" @click.stop="chishuclick(scope.row.patient.name)">
  131. 0/4
  132. </span> -->
  133. </template>
  134. </el-table-column>
  135. <el-table-column
  136. prop="name"
  137. label="状态"
  138. >
  139. <template slot-scope="scope">
  140. <div style="display:flex;align-items:center;justify-content:space-around;">
  141. <span class="tip1" v-if="scope.row.prescription == null || scope.row.prescription.creater == 0">
  142. 待开处方
  143. </span>
  144. <span class="tip2" v-if="scope.row.assessment_before_dislysis == null || scope.row.assessment_before_dislysis.weight_before == ''">
  145. 待称重
  146. </span>
  147. </div>
  148. </template>
  149. </el-table-column>
  150. </el-table>
  151. </div>
  152. </el-tab-pane>
  153. <!-- 透析区 -->
  154. <el-tab-pane label="透析区" name="second">
  155. <div class="cell clearfix" style="margin-bottom:10px;">
  156. <el-date-picker v-model="selected_date" prefix-icon="el-icon-date" @change="handleScheduleDateChange" :editable="false" :clearable="false" style="width: 45%;margin-right:10px;" type="date" placeholder="选择日期时间" align="right" ></el-date-picker>
  157. <el-input size="small" style="width:25%;" @keyup.enter.native='searchAction' v-model.trim="search_input" class="filter-item"/>
  158. <el-button size="small" class="filter-item" style="margin-right:20px;" type="primary" @click="searchAction">搜索</el-button>
  159. </div>
  160. <div class="cell clearfix" style="margin-bottom:10px;display:flex;">
  161. <el-select v-model="patientStateVal" placeholder="全部患者状态" style="margin-right:10px;" @change="handleStateChange">
  162. <el-option
  163. v-for="item in patient_state"
  164. :key="item.value"
  165. :label="item.label"
  166. :value="item.value">
  167. </el-option>
  168. </el-select>
  169. <el-select v-model="treatStateVal" placeholder="全部治疗状态" style="margin-right:20px;" @change="handleTreatChange">
  170. <el-option
  171. v-for="item in treat_state"
  172. :key="item.value"
  173. :label="item.label"
  174. :value="item.value">
  175. </el-option>
  176. </el-select>
  177. </div>
  178. <div class="cell clearfix" style="margin-bottom:10px;display:flex;">
  179. <el-select v-model="scheduleStateVal" placeholder="班次" style="margin-right:10px;" @change="handletimeType">
  180. <el-option
  181. v-for="item in schedule_options"
  182. :key="item.value"
  183. :label="item.label"
  184. :value="item.value">
  185. </el-option>
  186. </el-select>
  187. <el-select v-model="zoneVal" placeholder="分区" style="margin-right:20px;" @change="handleZoneChange">
  188. <el-option
  189. v-for="item in zone_options"
  190. :key="item.id"
  191. :label="item.text"
  192. :value="item.id">
  193. </el-option>
  194. </el-select>
  195. </div>
  196. <div style="padding-right:20px;">
  197. <el-table
  198. ref="tab1"
  199. @row-click="changePatient"
  200. highlight-current-row
  201. :data="tableData1"
  202. height="500"
  203. border
  204. style="width: 100%">
  205. <el-table-column
  206. prop="date"
  207. label="床号"
  208. width="50"
  209. >
  210. <template slot-scope="scope">
  211. {{ scope.row.device_number.number }}
  212. </template>
  213. </el-table-column>
  214. <el-table-column
  215. prop="date"
  216. label="患者"
  217. >
  218. <template slot-scope="scope">
  219. {{ scope.row.patient.name }}
  220. <span v-if="scope.row.assessment_before_dislysis && patientStateVal == 1">
  221. ({{ getTime(scope.row.assessment_before_dislysis.created_time) }})
  222. </span>
  223. <!-- <span class="touxi_cishu" @click.stop="chishuclick(scope.row.patient.name)">
  224. 0/4
  225. </span> -->
  226. </template>
  227. </el-table-column>
  228. <el-table-column
  229. prop="name"
  230. label="状态"
  231. >
  232. <template slot-scope="scope">
  233. <div style="display:flex;align-items:center;justify-content:space-around;">
  234. <span class="tip3" v-if="scope.row.dialysis_order ? scope.row.dialysis_order.stage == 1 : false">
  235. 已上机
  236. </span>
  237. <span class="tip4" v-if="scope.row.dialysis_order ? scope.row.dialysis_order.stage == 2 : false">
  238. 已下机
  239. </span>
  240. <span class="tip5" v-if="scope.row.treatment_summary == null || scope.row.treatment_summary.dialysis_summary == ''">
  241. 待开小结
  242. </span>
  243. </div>
  244. </template>
  245. </el-table-column>
  246. </el-table>
  247. </div>
  248. </el-tab-pane>
  249. </el-tabs>
  250. <!-- 打印上机单弹窗 -->
  251. <el-dialog
  252. :visible.sync="startVisibility"
  253. :close-on-click-modal="false"
  254. :close-on-press-escape="false"
  255. :show-close="false"
  256. width="30%"
  257. >
  258. <el-button
  259. size="small"
  260. icon="el-icon-printer"
  261. type="primary"
  262. @click="printAction"
  263. style="float:right"
  264. >打印</el-button
  265. >
  266. <div id="print_content">
  267. <div class="print_main_content">
  268. <div class="table_panel">
  269. <div v-for="(main_collection,index) in printList" :key="index">
  270. <div class="signPrint" style="width: 360px;font-size:16px;">
  271. <div style="margin-left:50px;">姓名:
  272. <span>{{main_collection.patient.name}} </span>
  273. ({{ main_collection.patient.dialysis_no }},{{getNewAge(main_collection.patient.id_card_no) }}岁)
  274. </div>
  275. <div class="printCell" style="display:flex;justify-content: space-around;" v-if="org_id ==10598 || org_id == 0">
  276. <div style="margin-left:-250px;">透析模式:
  277. <span>{{getModeName(main_collection.prescription.mode_id) }}</span>
  278. </div>
  279. </div>
  280. <div class="printCell" style="display:flex;justify-content: space-around;">
  281. <span style="display: block;width: 50%;">
  282. 床号:{{ main_collection.number.number }}
  283. <span style="width:auto;" v-if="main_collection.schedule_type == 1">上午</span>
  284. <span style="width:auto;" v-if="main_collection.schedule_type == 2">下午</span>
  285. <span style="width:auto;" v-if="main_collection.schedule_type == 3">晚上</span>
  286. </span>
  287. <span style="display: block;width: 50%;">{{ printDate }}</span>
  288. </div>
  289. <div class="printCell" style="display:flex;justify-content: space-around;">
  290. <span style="display: block;width: 50%;">干体重:{{main_collection.assessmentbefor.dry_weight}}Kg</span>
  291. <span style="display: block;width: 50%;" v-if="org_id!=10598">抗凝剂:{{ main_collection.dialysissolution.anticoagulant ? anticoagulants_confit[main_collection.dialysissolution.anticoagulant].name : ''}}</span>
  292. <span style="display: block;width: 50%;" v-if="org_id==10598">抗凝剂:{{ main_collection.dialysissolution.anticoagulant ? anticoagulants_confit[main_collection.dialysissolution.anticoagulant].name : ''}}</span>
  293. </div>
  294. <div class="printCell" style="display:flex;justify-content: space-around;">
  295. <span style="display: block;width: 50%;">净重值:{{ main_collection.assessmentbefor.weight_before - main_collection.assessmentbefor.additional_weight }}Kg</span>
  296. <span style="display: block;width: 50%;" v-if="org_id!=10598">
  297. 首剂: <span v-if="main_collection.dialysissolution.anticoagulant == 1">{{main_collection.dialysissolution.anticoagulant_shouji}} mg</span>
  298. <span v-if="main_collection.dialysissolution.anticoagulant == 2">
  299. {{main_collection.dialysissolution.anticoagulant_shouji}}mg
  300. </span>
  301. <span v-if="main_collection.dialysissolution.anticoagulant == 3">
  302. {{main_collection.dialysissolution.anticoagulant_shouji}}iu
  303. </span>
  304. <span v-if="main_collection.dialysissolution.anticoagulant == 4">
  305. {{main_collection.dialysissolution.anticoagulant_shouji}}mg
  306. </span>
  307. <span v-if="main_collection.dialysissolution.anticoagulant == 5">
  308. {{main_collection.dialysissolution.anticoagulant_shouji}} mg
  309. </span>
  310. <span v-if="main_collection.dialysissolution.anticoagulant == 6">
  311. {{main_collection.dialysissolution.anticoagulant_shouji}}iu
  312. </span>
  313. <span v-if="main_collection.dialysissolution.anticoagulant == 7">
  314. {{main_collection.dialysissolution.anticoagulant_shouji}}iu
  315. </span>
  316. <span v-if="main_collection.dialysissolution.anticoagulant == 8">
  317. {{main_collection.dialysissolution.anticoagulant_shouji}}iu
  318. </span>
  319. <span v-if="main_collection.dialysissolution.anticoagulant == 9">
  320. {{main_collection.dialysissolution.anticoagulant_shouji}}iu
  321. </span>
  322. <span v-if="main_collection.dialysissolution.anticoagulant == 10">
  323. {{main_collection.dialysissolution.anticoagulant_shouji}}iu
  324. </span>
  325. <span v-if="main_collection.dialysissolution.anticoagulant == 11">
  326. {{main_collection.dialysissolution.anticoagulant_shouji}}iu
  327. </span>
  328. </span>
  329. <span style="display: block;width: 50%;" v-if="org_id ==10598">
  330. 首剂: <span v-if="main_collection.prescription.anticoagulant == 1">{{main_collection.prescription.anticoagulant_shouji}} mg</span>
  331. <span v-if="main_collection.prescription.anticoagulant == 2">
  332. {{main_collection.prescription.anticoagulant_shouji}}mg
  333. </span>
  334. <span v-if="main_collection.prescription.anticoagulant == 3">
  335. {{main_collection.prescription.anticoagulant_shouji}}iu
  336. </span>
  337. <span v-if="main_collection.prescription.anticoagulant == 4">
  338. {{main_collection.prescription.anticoagulant_shouji}}mg
  339. </span>
  340. <span v-if="main_collection.prescription.anticoagulant == 5">
  341. {{main_collection.prescription.anticoagulant_shouji}} mg
  342. </span>
  343. <span v-if="main_collection.prescription.anticoagulant == 6">
  344. {{main_collection.prescription.anticoagulant_shouji}}iu
  345. </span>
  346. <span v-if="main_collection.prescription.anticoagulant == 7">
  347. {{main_collection.prescription.anticoagulant_shouji}}iu
  348. </span>
  349. <span v-if="main_collection.prescription.anticoagulant == 8">
  350. {{main_collection.prescription.anticoagulant_shouji}}iu
  351. </span>
  352. <span v-if="main_collection.prescription.anticoagulant == 9">
  353. {{main_collection.prescription.anticoagulant_shouji}}iu
  354. </span>
  355. <span v-if="main_collection.prescription.anticoagulant == 10">
  356. {{main_collection.prescription.anticoagulant_shouji}}iu
  357. </span>
  358. <span v-if="main_collection.prescription.anticoagulant == 11">
  359. {{main_collection.prescription.anticoagulant_shouji}}iu
  360. </span>
  361. </span>
  362. </div>
  363. <div class="printCell" style="display:flex;justify-content: space-around;">
  364. <span style="display: block;width: 50%;">体重增加:{{ (main_collection.assessmentbefor.weight_before - assessmentAfterDislysis.weight_after).toFixed(2) }}Kg</span>
  365. <span style="display: block;width: 50%;" v-if="org_id!=10598">
  366. 维持:{{main_collection.dialysissolution.anticoagulant_weichi}}
  367. <span v-if="main_collection.dialysissolution.anticoagulant == 1">
  368. mg/h
  369. </span>
  370. <span v-if="main_collection.dialysissolution.anticoagulant == 2">
  371. mg/h
  372. </span>
  373. <span v-if="main_collection.dialysissolution.anticoagulant == 3">
  374. iu/h
  375. </span>
  376. <span v-if="main_collection.dialysissolution.anticoagulant == 4">
  377. mg/h
  378. </span>
  379. <span v-if="main_collection.dialysissolution.anticoagulant == 5">
  380. mg/h
  381. </span>
  382. <span v-if="main_collection.dialysissolution.anticoagulant == 6">
  383. iu/h
  384. </span>
  385. <span v-if="main_collection.dialysissolution.anticoagulant == 7">
  386. iu/h
  387. </span>
  388. <span v-if="main_collection.dialysissolution.anticoagulant == 8">
  389. iu/h
  390. </span>
  391. <span v-if="main_collection.dialysissolution.anticoagulant == 9">
  392. iu/h
  393. </span>
  394. <span v-if="main_collection.dialysissolution.anticoagulant == 10">
  395. iu/h
  396. </span>
  397. <span v-if="main_collection.dialysissolution.anticoagulant == 11">
  398. iu/h
  399. </span>
  400. </span>
  401. <span style="display: block;width: 50%;" v-if="org_id ==10598">
  402. 维持:{{main_collection.prescription.anticoagulant_weichi}}
  403. <span v-if="main_collection.prescription.anticoagulant == 1">
  404. mg/h
  405. </span>
  406. <span v-if="main_collection.prescription.anticoagulant == 2">
  407. mg/h
  408. </span>
  409. <span v-if="main_collection.prescription.anticoagulant == 3">
  410. iu/h
  411. </span>
  412. <span v-if="main_collection.prescription.anticoagulant == 4">
  413. mg/h
  414. </span>
  415. <span v-if="main_collection.prescription.anticoagulant == 5">
  416. mg/h
  417. </span>
  418. <span v-if="main_collection.prescription.anticoagulant == 6">
  419. iu/h
  420. </span>
  421. <span v-if="main_collection.prescription.anticoagulant == 7">
  422. iu/h
  423. </span>
  424. <span v-if="main_collection.prescription.anticoagulant == 8">
  425. iu/h
  426. </span>
  427. <span v-if="main_collection.prescription.anticoagulant == 9">
  428. iu/h
  429. </span>
  430. <span v-if="main_collection.prescription.anticoagulant == 10">
  431. iu/h
  432. </span>
  433. <span v-if="main_collection.prescription.anticoagulant == 11">
  434. iu/h
  435. </span>
  436. </span>
  437. </div>
  438. <div class="printCell" style="display:flex;justify-content: space-around;">
  439. <span style="display: block;width: 50%;">处方脱水量:{{ main_collection.prescription.target_ultrafiltration }}
  440. <span v-if="$store.getters.xt_user.org.id == 10278 || $store.getters.xt_user.org.id == 10138 || $store.getters.xt_user.org.id == 10460">ml</span>
  441. <span v-else>L</span>
  442. </span>
  443. <span style="display: block;width: 50%;" v-if="org_id!=10598">
  444. 总量:{{main_collection.dialysissolution.anticoagulant_zongliang}}
  445. <span v-if="main_collection.dialysissolution.anticoagulant == 1">
  446. mg
  447. </span>
  448. <span v-if="main_collection.dialysissolution.anticoagulant == 2">
  449. mg
  450. </span>
  451. <span v-if="main_collection.dialysissolution.anticoagulant == 3">
  452. iu
  453. </span>
  454. <span v-if="main_collection.dialysissolution.anticoagulant == 4">
  455. mg
  456. </span>
  457. <span v-if="main_collection.dialysissolution.anticoagulant == 5">
  458. mg
  459. </span>
  460. <span v-if="main_collection.dialysissolution.anticoagulant == 6">
  461. iu
  462. </span>
  463. <span v-if="main_collection.dialysissolution.anticoagulant == 7">
  464. iu
  465. </span>
  466. <span v-if="main_collection.dialysissolution.anticoagulant == 8">
  467. iu
  468. </span>
  469. <span v-if="main_collection.dialysissolution.anticoagulant == 9">
  470. iu
  471. </span>
  472. <span v-if="main_collection.dialysissolution.anticoagulant == 10">
  473. iu
  474. </span>
  475. <span v-if="main_collection.dialysissolution.anticoagulant == 11">
  476. iu
  477. </span>
  478. </span>
  479. <span style="display: block;width: 50%;" v-if="org_id ==10598">
  480. 总量:{{main_collection.prescription.anticoagulant_zongliang}}
  481. <span v-if="main_collection.prescription.anticoagulant == 1">
  482. mg
  483. </span>
  484. <span v-if="main_collection.prescription.anticoagulant == 2">
  485. mg
  486. </span>
  487. <span v-if="main_collection.prescription.anticoagulant == 3">
  488. iu
  489. </span>
  490. <span v-if="main_collection.prescription.anticoagulant == 4">
  491. mg
  492. </span>
  493. <span v-if="main_collection.prescription.anticoagulant == 5">
  494. mg
  495. </span>
  496. <span v-if="main_collection.prescription.anticoagulant == 6">
  497. iu
  498. </span>
  499. <span v-if="main_collection.prescription.anticoagulant == 7">
  500. iu
  501. </span>
  502. <span v-if="main_collection.prescription.anticoagulant == 8">
  503. iu
  504. </span>
  505. <span v-if="main_collection.prescription.anticoagulant == 9">
  506. iu
  507. </span>
  508. <span v-if="main_collection.prescription.anticoagulant == 10">
  509. iu
  510. </span>
  511. <span v-if="main_collection.prescription.anticoagulant == 11">
  512. iu
  513. </span>
  514. </span>
  515. </div>
  516. <div class="printCell" style="display:flex;justify-content: space-around;" v-if="org_id==10598 || org_id == 0">
  517. <span style="display: block;margin-left: -30px;">目标脱水量:{{main_collection.prescription.target_ultrafiltration}}
  518. <span v-if="$store.getters.xt_user.org.id == 10278 || $store.getters.xt_user.org.id == 10460">ml</span>
  519. <span v-else>L</span>
  520. </span>
  521. <span>
  522. 血流量:{{ main_collection.prescription.blood_flow_volume }} ml/min
  523. </span>
  524. </div>
  525. </div>
  526. </div>
  527. <!-- <div v-for="(main_collection,index) in printList" :key="index" style="width: 80%;">
  528. <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse; text-align: center; margin: auto;">
  529. <tr style="height: 20px;">
  530. <td>{{ printDate }}</td>
  531. <td>机号:{{ main_collection.number.number }}</td>
  532. </tr>
  533. <tr style="height: 20px;">
  534. <td>姓名</td>
  535. <td>{{main_collection.patient.name}}</td>
  536. </tr>
  537. <tr style="height: 20px;">
  538. <td>治疗方式</td>
  539. <td></td>
  540. </tr>
  541. <tr style="height: 20px;">
  542. <td>透析时间</td>
  543. <td>{{ printDate }}</td>
  544. </tr>
  545. <tr style="height: 20px;">
  546. <td>透前体重</td>
  547. <td></td>
  548. </tr>
  549. <tr style="height: 20px;">
  550. <td>干体重</td>
  551. <td>{{main_collection.assessmentbefor.dry_weight}}Kg</td>
  552. </tr>
  553. <tr style="height: 20px;">
  554. <td>超滤量</td>
  555. <td></td>
  556. </tr>
  557. <tr style="height: 20px;">
  558. <td>透前血压</td>
  559. <td>-</td>
  560. </tr>
  561. <tr style="height: 20px;">
  562. <td></td>
  563. <td></td>
  564. </tr>
  565. <tr style="height: 20px;">
  566. <td></td>
  567. <td></td>
  568. </tr>
  569. </table>
  570. </div> -->
  571. </div>
  572. </div>
  573. </div>
  574. <span slot="footer" class="dialog-footer">
  575. <el-button @click="startVisibility = false">取 消</el-button>
  576. </span>
  577. </el-dialog>
  578. <!-- 打印上机单弹窗----新 -->
  579. <el-dialog
  580. :visible.sync="centerDialogVisible"
  581. width="30%"
  582. >
  583. <el-button
  584. size="small"
  585. icon="el-icon-printer"
  586. type="primary"
  587. @click="printAction"
  588. style="float:right"
  589. >打印</el-button
  590. >
  591. <div id="print_content">
  592. <div class="print_main_content">
  593. <div class="table_panel" v-for="(main_collection,index) in printList">
  594. <div style="border: 1px solid black;width: 82%;" >
  595. <div style="margin: 5px 0;">
  596. <span style="font-weight: bolder;">{{main_collection.patient.name}} </span>&nbsp;&nbsp;
  597. <span>
  598. <span v-if="main_collection.patient.gender==1">男</span>
  599. <span v-if="main_collection.patient.gender==2">女</span>
  600. </span>&nbsp;&nbsp;
  601. <span>{{getNewAge(main_collection.patient.id_card_no) }}岁</span>&nbsp;&nbsp;<span>{{getTimes(main_collection.schedule_date)}}</span>&nbsp;&nbsp;
  602. <span></span>
  603. &nbsp;&nbsp;
  604. <span>
  605. <span style="width:auto;" v-if="main_collection.schedule_type == 1">上午</span>
  606. <span style="width:auto;" v-if="main_collection.schedule_type == 2">下午</span>
  607. <span style="width:auto;" v-if="main_collection.schedule_type == 3">晚上</span>
  608. </span>&nbsp;&nbsp;<span>{{ main_collection.number.number }}</span>
  609. </div>
  610. <div style="margin: 5px 0;">
  611. <span>身高:{{ main_collection.patient.height?main_collection.patient.height:"" }} cm</span>&nbsp;&nbsp;<span>干体重:{{main_collection.assessmentbefor.dry_weight}}kg</span>&nbsp;&nbsp;
  612. <span>HCT:%</span>&nbsp;&nbsp;<span>KTV目标:</span>
  613. </div>
  614. </div>
  615. <div style="height: 30px;width: 82%;border: 1px solid black;">
  616. </div>
  617. <div style="border: 1px solid black;width: 82%;">
  618. <div style="display: flex;margin: 5px 0;">
  619. <div style="flex: 1;">透析模式:{{getModeId(main_collection.mode_id)}}</div>
  620. <div style="flex: 1;">透析器/灌流器:{{main_collection.prescription.dialyzer_perfusion_apparatus }} </div>
  621. </div>
  622. <div style="display: flex;margin: 5px 0;">
  623. <div style="flex: 1;">血流量:{{main_collection.prescription.blood_flow_volume}}ml/min</div>
  624. <div style="flex: 1;">置换液总量:<span v-if="main_collection.prescription.displace_liqui_value>0">{{main_collection.prescription.displace_liqui_value}}</span>L</div>
  625. </div>
  626. <div style="margin: 5px 0;">
  627. <div>透析液类型:
  628. <span>Na:{{ main_collection.prescription.sodium }}</span>
  629. <span>K:{{ main_collection.prescription.kalium }}</span>
  630. <span>Ca:{{main_collection.prescription.calcium }}</span>
  631. <span>
  632. <span v-if="main_collection.prescription.chaptalization==0"> 不含 </span>
  633. <span v-if="main_collection.prescription.chaptalization>0"> 含糖:{{main_collection.prescription.chaptalization}} </span>
  634. HCO3:</span>
  635. </div>
  636. </div>
  637. <div style="display: flex;margin: 5px 0;">
  638. <div style="flex: 1;">超滤曲线:</div>
  639. <div style="flex: 1;">Na曲线:</div>
  640. </div>
  641. <div style="margin: 5px 0;">
  642. <span>抗凝方案:</span>
  643. <span>{{ main_collection.dialysissolution.anticoagulant ? anticoagulants_confit[main_collection.dialysissolution.anticoagulant].name : ''}}</span>
  644. <span>
  645. 首剂:<span v-if="main_collection.dialysissolution.anticoagulant == 1">{{main_collection.dialysissolution.anticoagulant_shouji}} mg</span>
  646. <span v-if="main_collection.dialysissolution.anticoagulant == 2">
  647. {{main_collection.dialysissolution.anticoagulant_shouji}}mg
  648. </span>
  649. <span v-if="main_collection.dialysissolution.anticoagulant == 3">
  650. {{main_collection.dialysissolution.anticoagulant_shouji}}iu
  651. </span>
  652. <span v-if="main_collection.dialysissolution.anticoagulant == 4">
  653. {{main_collection.dialysissolution.anticoagulant_shouji}}mg
  654. </span>
  655. <span v-if="main_collection.dialysissolution.anticoagulant == 5">
  656. {{main_collection.dialysissolution.anticoagulant_shouji}} mg
  657. </span>
  658. <span v-if="main_collection.dialysissolution.anticoagulant == 6">
  659. {{main_collection.dialysissolution.anticoagulant_shouji}}iu
  660. </span>
  661. <span v-if="main_collection.dialysissolution.anticoagulant == 7">
  662. {{main_collection.dialysissolution.anticoagulant_shouji}}iu
  663. </span>
  664. <span v-if="main_collection.dialysissolution.anticoagulant == 8">
  665. {{main_collection.dialysissolution.anticoagulant_shouji}}iu
  666. </span>
  667. <span v-if="main_collection.dialysissolution.anticoagulant == 9">
  668. {{main_collection.dialysissolution.anticoagulant_shouji}}iu
  669. </span>
  670. <span v-if="main_collection.dialysissolution.anticoagulant == 10">
  671. {{main_collection.dialysissolution.anticoagulant_shouji}}iu
  672. </span>
  673. <span v-if="main_collection.dialysissolution.anticoagulant == 11">
  674. {{main_collection.dialysissolution.anticoagulant_shouji}}iu
  675. </span>
  676. </span>
  677. <span>
  678. 维持:{{main_collection.dialysissolution.anticoagulant_weichi}}
  679. <span v-if="main_collection.dialysissolution.anticoagulant == 1">
  680. mg/h
  681. </span>
  682. <span v-if="main_collection.dialysissolution.anticoagulant == 2">
  683. mg/h
  684. </span>
  685. <span v-if="main_collection.dialysissolution.anticoagulant == 3">
  686. iu/h
  687. </span>
  688. <span v-if="main_collection.dialysissolution.anticoagulant == 4">
  689. mg/h
  690. </span>
  691. <span v-if="main_collection.dialysissolution.anticoagulant == 5">
  692. mg/h
  693. </span>
  694. <span v-if="main_collection.dialysissolution.anticoagulant == 6">
  695. iu/h
  696. </span>
  697. <span v-if="main_collection.dialysissolution.anticoagulant == 7">
  698. iu/h
  699. </span>
  700. <span v-if="main_collection.dialysissolution.anticoagulant == 8">
  701. iu/h
  702. </span>
  703. <span v-if="main_collection.dialysissolution.anticoagulant == 9">
  704. iu/h
  705. </span>
  706. <span v-if="main_collection.dialysissolution.anticoagulant == 10">
  707. iu/h
  708. </span>
  709. <span v-if="main_collection.dialysissolution.anticoagulant == 11">
  710. iu/h
  711. </span>
  712. </span>
  713. <span>
  714. 总量:{{main_collection.dialysissolution.anticoagulant_zongliang}}
  715. <span v-if="main_collection.dialysissolution.anticoagulant == 1">
  716. mg
  717. </span>
  718. <span v-if="main_collection.dialysissolution.anticoagulant == 2">
  719. mg
  720. </span>
  721. <span v-if="main_collection.dialysissolution.anticoagulant == 3">
  722. iu
  723. </span>
  724. <span v-if="main_collection.dialysissolution.anticoagulant == 4">
  725. mg
  726. </span>
  727. <span v-if="main_collection.dialysissolution.anticoagulant == 5">
  728. mg
  729. </span>
  730. <span v-if="main_collection.dialysissolution.anticoagulant == 6">
  731. iu
  732. </span>
  733. <span v-if="main_collection.dialysissolution.anticoagulant == 7">
  734. iu
  735. </span>
  736. <span v-if="main_collection.dialysissolution.anticoagulant == 8">
  737. iu
  738. </span>
  739. <span v-if="main_collection.dialysissolution.anticoagulant == 9">
  740. iu
  741. </span>
  742. <span v-if="main_collection.dialysissolution.anticoagulant == 10">
  743. iu
  744. </span>
  745. <span v-if="main_collection.dialysissolution.anticoagulant == 11">
  746. iu
  747. </span>
  748. </span>
  749. </div>
  750. <div style="margin: 5px 0;">
  751. 血管通路:{{getBloodAccess(main_collection.assessmentbefor.blood_access_part_opera_id) }}
  752. </div>
  753. </div>
  754. <div style="border: 1px solid black;width: 82%;">
  755. <div style="margin: 5px 0;">高危因素:{{ main_collection.prescription.remark }}</div>
  756. </div>
  757. </div>
  758. </div>
  759. </div>
  760. <span slot="footer" class="dialog-footer">
  761. <el-button @click="centerDialogVisible = false">取 消</el-button>
  762. </span>
  763. </el-dialog>
  764. <el-dialog
  765. :visible.sync="endVisibility"
  766. :close-on-click-modal="false"
  767. :close-on-press-escape="false"
  768. :show-close="false"
  769. width="30%"
  770. >
  771. <el-button
  772. size="small"
  773. icon="el-icon-printer"
  774. type="primary"
  775. @click="printAction"
  776. style="float:right"
  777. >打印</el-button
  778. >
  779. <div id="print_content">
  780. <div class="print_main_content">
  781. <div class="table_panel">
  782. <div v-for="(main_collection,index) in printList" :key="index">
  783. <div class="signPrint" style="width: 360px;font-size:16px;">
  784. <div style="margin-left:50px;">姓名:
  785. <span>{{main_collection.patient.name}} </span>
  786. ({{ main_collection.patient.dialysis_no }},{{getNewAge(main_collection.patient.id_card_no) }}岁)
  787. </div>
  788. <div class="printCell" style="display:flex;justify-content: space-around;">
  789. <span style="display: block;width: 50%;">
  790. 床号:{{ main_collection.number.number }}
  791. <span style="width:auto;" v-if="main_collection.schedule_type == 1">上午</span>
  792. <span style="width:auto;" v-if="main_collection.schedule_type == 2">下午</span>
  793. <span style="width:auto;" v-if="main_collection.schedule_type == 3">晚上</span>
  794. </span>
  795. <span style="display: block;width: 50%;">{{ printDate }}</span>
  796. </div>
  797. <div class="printCell" style="display:flex;justify-content: space-around;">
  798. <span style="display: block;width: 50%;">干体重:{{main_collection.assessmentbefor.dry_weight}}Kg</span>
  799. <span style="display: block;width: 50%;">抗凝剂:{{ main_collection.dialysissolution.anticoagulant ? anticoagulants_confit[main_collection.dialysissolution.anticoagulant].name : ''}}</span>
  800. </div>
  801. <div class="printCell" style="display:flex;justify-content: space-around;">
  802. <span style="display: block;width: 50%;">净重值:{{ main_collection.assessmentbefor.weight_before - main_collection.assessmentbefor.additional_weight }}Kg</span>
  803. <span style="display: block;width: 50%;">
  804. 首剂: <span v-if="main_collection.dialysissolution.anticoagulant == 1">{{main_collection.dialysissolution.anticoagulant_shouji}} mg</span>
  805. <span v-if="main_collection.dialysissolution.anticoagulant == 2">
  806. {{main_collection.dialysissolution.anticoagulant_shouji}}mg
  807. </span>
  808. <span v-if="main_collection.dialysissolution.anticoagulant == 3">
  809. {{main_collection.dialysissolution.anticoagulant_shouji}}iu
  810. </span>
  811. <span v-if="main_collection.dialysissolution.anticoagulant == 4">
  812. {{main_collection.dialysissolution.anticoagulant_shouji}}mg
  813. </span>
  814. <span v-if="main_collection.dialysissolution.anticoagulant == 5">
  815. {{main_collection.dialysissolution.anticoagulant_shouji}} mg
  816. </span>
  817. <span v-if="main_collection.dialysissolution.anticoagulant == 6">
  818. {{main_collection.dialysissolution.anticoagulant_shouji}}iu
  819. </span>
  820. <span v-if="main_collection.dialysissolution.anticoagulant == 7">
  821. {{main_collection.dialysissolution.anticoagulant_shouji}}iu
  822. </span>
  823. <span v-if="main_collection.dialysissolution.anticoagulant == 8">
  824. {{main_collection.dialysissolution.anticoagulant_shouji}}iu
  825. </span>
  826. <span v-if="main_collection.dialysissolution.anticoagulant == 9">
  827. {{main_collection.dialysissolution.anticoagulant_shouji}}iu
  828. </span>
  829. <span v-if="main_collection.dialysissolution.anticoagulant == 10">
  830. {{main_collection.dialysissolution.anticoagulant_shouji}}iu
  831. </span>
  832. <span v-if="main_collection.dialysissolution.anticoagulant == 11">
  833. {{main_collection.dialysissolution.anticoagulant_shouji}}iu
  834. </span>
  835. </span>
  836. </div>
  837. <div class="printCell" style="display:flex;justify-content: space-around;">
  838. <span style="display: block;width: 50%;">体重增加:{{ (main_collection.assessmentbefor.weight_before - assessmentAfterDislysis.weight_after).toFixed(2) }}Kg</span>
  839. <span style="display: block;width: 50%;">
  840. 维持:{{main_collection.dialysissolution.anticoagulant_weichi}}
  841. <span v-if="main_collection.dialysissolution.anticoagulant == 1">
  842. mg/h
  843. </span>
  844. <span v-if="main_collection.dialysissolution.anticoagulant == 2">
  845. mg/h
  846. </span>
  847. <span v-if="main_collection.dialysissolution.anticoagulant == 3">
  848. iu/h
  849. </span>
  850. <span v-if="main_collection.dialysissolution.anticoagulant == 4">
  851. mg/h
  852. </span>
  853. <span v-if="main_collection.dialysissolution.anticoagulant == 5">
  854. mg/h
  855. </span>
  856. <span v-if="main_collection.dialysissolution.anticoagulant == 6">
  857. iu/h
  858. </span>
  859. <span v-if="main_collection.dialysissolution.anticoagulant == 7">
  860. iu/h
  861. </span>
  862. <span v-if="main_collection.dialysissolution.anticoagulant == 8">
  863. iu/h
  864. </span>
  865. <span v-if="main_collection.dialysissolution.anticoagulant == 9">
  866. iu/h
  867. </span>
  868. <span v-if="main_collection.dialysissolution.anticoagulant == 10">
  869. iu/h
  870. </span>
  871. <span v-if="main_collection.dialysissolution.anticoagulant == 11">
  872. iu/h
  873. </span>
  874. </span>
  875. </div>
  876. <div class="printCell" style="display:flex;justify-content: space-around;">
  877. <span style="display: block;width: 50%;">处方脱水量:{{ main_collection.prescription.target_ultrafiltration }}
  878. <span v-if="$store.getters.xt_user.org.id == 10278 || $store.getters.xt_user.org.id == 10138">ml</span>
  879. <span v-else>L</span>
  880. </span>
  881. <span style="display: block;width: 50%;">
  882. 总量:{{main_collection.dialysissolution.anticoagulant_zongliang}}
  883. <span v-if="main_collection.dialysissolution.anticoagulant == 1">
  884. mg
  885. </span>
  886. <span v-if="main_collection.dialysissolution.anticoagulant == 2">
  887. mg
  888. </span>
  889. <span v-if="main_collection.dialysissolution.anticoagulant == 3">
  890. iu
  891. </span>
  892. <span v-if="main_collection.dialysissolution.anticoagulant == 4">
  893. mg
  894. </span>
  895. <span v-if="main_collection.dialysissolution.anticoagulant == 5">
  896. mg
  897. </span>
  898. <span v-if="main_collection.dialysissolution.anticoagulant == 6">
  899. iu
  900. </span>
  901. <span v-if="main_collection.dialysissolution.anticoagulant == 7">
  902. iu
  903. </span>
  904. <span v-if="main_collection.dialysissolution.anticoagulant == 8">
  905. iu
  906. </span>
  907. <span v-if="main_collection.dialysissolution.anticoagulant == 9">
  908. iu
  909. </span>
  910. <span v-if="main_collection.dialysissolution.anticoagulant == 10">
  911. iu
  912. </span>
  913. <span v-if="main_collection.dialysissolution.anticoagulant == 11">
  914. iu
  915. </span>
  916. </span>
  917. </div>
  918. </div>
  919. </div>
  920. </div>
  921. </div>
  922. </div>
  923. <span slot="footer" class="dialog-footer">
  924. <el-button @click="endVisibility = false">取 消</el-button>
  925. </span>
  926. </el-dialog>
  927. <!-- 显示透析日期的弹窗 -->
  928. <el-dialog
  929. :title="'患者信息(姓名:'+Dialysis_patient+'、透析号:'+20011120+')'"
  930. :visible.sync="cishu_dialogVisible"
  931. width="50%"
  932. :modal-append-to-body='false'
  933. :close-on-click-modal="false">
  934. <div>
  935. <div style="line-height: 40px;">
  936. 透析频率:HD(每周2次)
  937. </div>
  938. <div style="line-height: 40px;">
  939. 已排详情
  940. </div>
  941. <div>
  942. <el-calendar>
  943. <!-- 这里使用的是 2.5 slot 语法,对于新项目请使用 2.6 slot 语法-->
  944. <template
  945. slot="dateCell"
  946. slot-scope="{date, data}">
  947. <P v-if="data.day.split('-').slice(1).join('-')=='03-06'"
  948. style="background: red;color: white;text-align: center;">
  949. HD
  950. </P>
  951. <p :class="data.isSelected ? 'is-selected' : ''" style="text-align: center;">
  952. {{ data.day.split('-').slice(2).join('-') }} {{ data.isSelected ? '✔️' : ''}}<br/>
  953. <span v-if="data.day.split('-').slice(1).join('-')=='03-06'">上午 门诊</span>
  954. </p>
  955. </template>
  956. </el-calendar>
  957. </div>
  958. </div>
  959. </el-dialog>
  960. </div>
  961. <!-- 右侧内容 -->
  962. <div style="width:75%" v-show="!showView">
  963. <!-- <div v-if="Refresh"> -->
  964. <div style="margin-left:60px;color:#34495e">
  965. <span>{{ patient.name }}({{ patient.dialysis_no }})</span>
  966. <span v-if="newTime != ''">&nbsp;&nbsp;|&nbsp;&nbsp;</span>
  967. <span v-if="newTime != ''">签到时间:{{ newTime }}</span>
  968. </div>
  969. <nav-igation
  970. ref="nav"
  971. title="弹窗导航"
  972. @advice="adviceFunc"
  973. :patient="patient"
  974. :schedual="schedual"
  975. :prescription="prescription"
  976. :solution="solution"
  977. :receiver_treatment_access="receiver_treatment_access"
  978. :predialysis_evaluation="predialysis_evaluation"
  979. :doctor_advices="doctor_advices"
  980. :double_check="double_check"
  981. :assessment_after_dislysis="assessment_after_dislysis"
  982. :treatment_summary="treatment_summary"
  983. :monitor_records="monitor_records"
  984. :dialysis_order="dialysis_order"
  985. :admin_users="admin_users"
  986. :devices="devices"
  987. :device_numbers="device_numbers"
  988. :admin_user_map="admin_user_map"
  989. :device_map="device_map"
  990. :device_number_map="device_number_map"
  991. :niprocart_info="niprocart_info"
  992. :jms_info="jms_info"
  993. :fistula_needle_set_info="fistula_needle_set_info"
  994. :fistula_needle_set_16_info="fistula_needle_set_16_info"
  995. :hemoperfusion_info="hemoperfusion_info"
  996. :dialyser_sterilised_info="dialyser_sterilised_info"
  997. :filtryzer_info="filtryzer_info"
  998. :dialyzers_info="dialyzers_info"
  999. :injector_info="injector_info"
  1000. :bloodlines_info="bloodlines_info"
  1001. :tubingHemodialysis_info="tubingHemodialysis_info"
  1002. :safe_package_info="safe_package_info"
  1003. :aliquid_info="aliquid_info"
  1004. :config="config"
  1005. :longAdvices="longAdvices"
  1006. :waitUploadAdvices="waitUploadAdvices"
  1007. :is_open="is_open"
  1008. :last_predialysis_evaluation="lastPredialysisEvaluation"
  1009. :last_monitor_record="lastMonitorRecord"
  1010. :last_assessment_after_dislysis="lastAssessmentAfterDislysis"
  1011. :last_dialysis_prescribe="lastDialysisPrescribe"
  1012. :last_dryWeight_dislysis="lastDryWeightDislysis"
  1013. :special_premission="headNurses"
  1014. @assessmentAfterDislysis="assessmentAfterDislysisFunc"
  1015. :system_prescribe="system_prescribe"
  1016. :his_is_open="his_is_open"
  1017. :is_advice_open="is_advice_open"
  1018. :lastAssessment="lastAssessment"
  1019. :stockType="stockType"
  1020. :his_doctor_advices="his_doctor_advices"
  1021. :lastOrder="lastOrder"
  1022. :dryWeightList="dryWeightList"
  1023. :docList="docList"
  1024. :lastTreat="lastTreat"
  1025. >
  1026. </nav-igation>
  1027. <basic-infor
  1028. :patient="patient"
  1029. :dialysis_date="dialysis_date"
  1030. :device_number="schedual.id == 0 ? '' : schedual.device_number.number"
  1031. :steps="steps"
  1032. title="基本信息"
  1033. ></basic-infor>
  1034. <dialysis-prescription
  1035. :prescription="prescription"
  1036. :solution="solution"
  1037. :device_map="device_map"
  1038. :preparestock="preparestock"
  1039. title="透析处方"
  1040. ></dialysis-prescription>
  1041. <!-- <past-data class="往期数据"></past-data> -->
  1042. <div style="height: 20px;background-color: #f6f8f9"></div>
  1043. <accepts-assessment
  1044. :record="receiver_treatment_access"
  1045. title="接诊评估"
  1046. ></accepts-assessment>
  1047. <assessment-before
  1048. :record="predialysis_evaluation"
  1049. ref="assessment_before"
  1050. title="透前评估"
  1051. ></assessment-before>
  1052. <stat-order
  1053. ref="stat_order"
  1054. :advices="doctor_advices"
  1055. :doctor_map="admin_user_map"
  1056. title="临时医嘱"
  1057. ></stat-order>
  1058. <double-check
  1059. ref="double_check"
  1060. :record="double_check"
  1061. :admin_map="admin_user_map"
  1062. title="双人核对 "
  1063. ></double-check>
  1064. <dialysis-computer
  1065. ref="dialysis_computer"
  1066. :record="dialysis_order"
  1067. :admin_map="admin_user_map"
  1068. :device_number_map="device_number_map"
  1069. title="透析上机 "
  1070. ></dialysis-computer>
  1071. <dialysis-monitoring
  1072. ref="monitoring"
  1073. :monitores="monitor_records"
  1074. title="透析监测"
  1075. ></dialysis-monitoring>
  1076. <!-- </div> -->
  1077. <el-dialog
  1078. title="长期医嘱单"
  1079. :visible.sync="dialogFormVisible"
  1080. width="960px"
  1081. >
  1082. <div class="printForm">
  1083. <h1 class="title">长期医嘱单</h1>
  1084. <div class="info">
  1085. <ul>
  1086. <li>
  1087. <span class="name">姓名:</span>
  1088. <input type="text" class="InputBox" />
  1089. </li>
  1090. <li>
  1091. <span class="name">性别:</span>
  1092. <input type="text" class="InputBox" />
  1093. </li>
  1094. <li>
  1095. <span class="name">年龄:</span>
  1096. <input type="text" class="InputBox" />
  1097. </li>
  1098. <li>
  1099. <span class="name">科别:</span>
  1100. <input type="text" class="InputBox" />
  1101. </li>
  1102. <li>
  1103. <span class="name">床号:</span>
  1104. <input type="text" class="InputBox" />
  1105. </li>
  1106. <li>
  1107. <span class="name">住院号:</span>
  1108. <input type="text" class="InputBox" />
  1109. </li>
  1110. </ul>
  1111. </div>
  1112. <table
  1113. border="1"
  1114. style="border:1px #999 solid;margin-top:20px;"
  1115. bordercolorlight="#fff"
  1116. bordercolordark="#fff"
  1117. width="100%"
  1118. cellpadding="0"
  1119. cellspacing="0"
  1120. class="printTable"
  1121. >
  1122. <tbody>
  1123. <tr align="center">
  1124. <th style="width:20%;" colspan="2" align="center">起始</th>
  1125. <th style="width:20%;" rowspan="2" align="center">医嘱</th>
  1126. <th style="width:8%;" rowspan="2" align="center">医师签名</th>
  1127. <th style="width:6%;" rowspan="2" align="center">执行护士签名</th>
  1128. <th style="width:42%;" colspan="4" align="center">停止</th>
  1129. </tr>
  1130. <tr align="center">
  1131. <th align="center">日期</th>
  1132. <th align="center">时间</th>
  1133. <th style="width:10%;" align="center">日期</th>
  1134. <th style="width:10%;" align="center">时间</th>
  1135. <th style="width:10%;" align="center">医师签名</th>
  1136. <th style="width:6%;" align="center">执行护士签名</th>
  1137. </tr>
  1138. <tr align="center">
  1139. <td>2018-90-09</td>
  1140. <td>2018-90-09</td>
  1141. <td>地方开发发地方开发发方发发发大渡岗</td>
  1142. <td>张三</td>
  1143. <td>张三</td>
  1144. <td>张三</td>
  1145. <td>张三</td>
  1146. <td>张三</td>
  1147. <td>张三</td>
  1148. </tr>
  1149. <tr align="center">
  1150. <td>2018-90-09</td>
  1151. <td>2018-90-09</td>
  1152. <td>地方开发发地方开发发方发发发大渡岗</td>
  1153. <td>张三</td>
  1154. <td>张三</td>
  1155. <td>张三</td>
  1156. <td>张三</td>
  1157. <td>张三</td>
  1158. <td>张三</td>
  1159. </tr>
  1160. </tbody>
  1161. </table>
  1162. </div>
  1163. </el-dialog>
  1164. <el-dialog title="临时医嘱单" :visible.sync="orders" width="960px">
  1165. <div class="printForm">
  1166. <h1 class="title">临时医嘱单</h1>
  1167. <div class="info">
  1168. <ul>
  1169. <li>
  1170. <span class="name">姓名:</span>
  1171. <input type="text" class="InputBox" />
  1172. </li>
  1173. <li>
  1174. <span class="name">性别:</span>
  1175. <input type="text" class="InputBox" />
  1176. </li>
  1177. <li>
  1178. <span class="name">年龄:</span>
  1179. <input type="text" class="InputBox" />
  1180. </li>
  1181. <li>
  1182. <span class="name">科:</span>
  1183. <input type="text" class="InputBox" />
  1184. </li>
  1185. <li>
  1186. <span class="name">区:</span>
  1187. <input type="text" class="InputBox" />
  1188. </li>
  1189. <li>
  1190. <span class="name">房:</span>
  1191. <input type="text" class="InputBox" />
  1192. </li>
  1193. <li>
  1194. <span class="name">床:</span>
  1195. <input type="text" class="InputBox" />
  1196. </li>
  1197. <li>
  1198. <span class="name">住院号:</span>
  1199. <input type="text" class="InputBox" />
  1200. </li>
  1201. </ul>
  1202. </div>
  1203. <table
  1204. border="1"
  1205. style="border:1px #999 solid;margin-top:20px;"
  1206. bordercolorlight="#fff"
  1207. bordercolordark="#fff"
  1208. width="100%"
  1209. cellpadding="0"
  1210. cellspacing="0"
  1211. class="printTable"
  1212. >
  1213. <tbody>
  1214. <tr align="center">
  1215. <th style="width:10%;" align="center">日期</th>
  1216. <th style="width:10%;" align="center">时间</th>
  1217. <th style="width:10%;" align="center">医生签名</th>
  1218. <th style="width:40%;" align="center">医嘱内容</th>
  1219. <th style="width:10%;" align="center">执行时间</th>
  1220. <th style="width:10%;" align="center">护士签名</th>
  1221. <th style="width:10%;" align="center">金额</th>
  1222. </tr>
  1223. <tr align="center">
  1224. <td>2018-90-09</td>
  1225. <td>2018-90-09</td>
  1226. <td>张三</td>
  1227. <td>张三</td>
  1228. <td>张三</td>
  1229. <td>张三</td>
  1230. <td>888</td>
  1231. </tr>
  1232. <tr align="center">
  1233. <td>2018-90-09</td>
  1234. <td>2018-90-09</td>
  1235. <td>张三</td>
  1236. <td>张三</td>
  1237. <td>2018-90-09</td>
  1238. <td>张三</td>
  1239. <td>888</td>
  1240. </tr>
  1241. </tbody>
  1242. </table>
  1243. </div>
  1244. </el-dialog>
  1245. <dialysis-off
  1246. ref="dialysis_off"
  1247. :record="dialysis_order"
  1248. :admin_map="admin_user_map"
  1249. title="透析下机 "
  1250. ></dialysis-off>
  1251. <assessment-after
  1252. ref="assessment_after"
  1253. :record="assessment_after_dislysis"
  1254. title="透后评估"
  1255. ></assessment-after>
  1256. <treatment-of
  1257. ref="treatment_of"
  1258. :record="treatment_summary"
  1259. title="治疗小结"
  1260. ></treatment-of>
  1261. </div>
  1262. <div v-if="showView" style="text-align:center;margin: 0 auto;font-size:20px;">
  1263. <p style="margin-top:20px;">当前叫号</p>
  1264. <p style="margin-top:20px;">{{ $route.query.patient_name ? $route.query.patient_name : ""}}</p>
  1265. <p style="margin-top:20px;">签到时间:{{ $route.query.curPatientTime ? getDates($route.query.curPatientTime) : '' }}</p>
  1266. <p style="color:red;margin-top:20px;">提示:当前患者无排班,请先排班</p>
  1267. </div>
  1268. </div>
  1269. <!-- 透析历史 -->
  1270. <el-dialog class="history"
  1271. :title="'患者信息(姓名:'+patient.name+'、透析号:'+patient.dialysis_no +')' "
  1272. :visible.sync="historyclick"
  1273. width="50%"
  1274. >
  1275. <div>
  1276. <!-- <div >
  1277. 透析频率:
  1278. <div class="touxipl"></div>
  1279. </div> -->
  1280. <div style="margin: 20px 0;">
  1281. <div style="border-left: 2px solid #409eff;color: #409eff;padding: 0 10px;">
  1282. <span>已排详情</span>
  1283. </div>
  1284. <div @click="viewDayWork">
  1285. <el-calendar v-model="time_value">
  1286. <template
  1287. slot="dateCell"
  1288. slot-scope="{date, data}" >
  1289. <p :class="data.isSelected ? 'is-selected' : ''" style="text-align: center;" >
  1290. {{ data.day.split('-').slice(2).join('-') }}<br/>
  1291. <span v-for="(item,index) in orderList" :key="index" style="background: red;color: white;text-align: center;">
  1292. <span v-if="data.day == item.order_date">
  1293. {{ getModeId(item.mode_id) }}
  1294. <span v-if="item.schedual_type_name ==1">上午</span>
  1295. <span v-if="item.schedual_type_name ==2">下午</span>
  1296. <span v-if="item.schedual_type_name ==3">晚上</span>
  1297. </span>
  1298. </span>
  1299. </p>
  1300. </template>
  1301. </el-calendar>
  1302. </div>
  1303. </div>
  1304. </div>
  1305. </el-dialog>
  1306. </div>
  1307. </template>
  1308. <script>
  1309. const moment = require('moment')
  1310. import axios from 'axios'
  1311. import NavIgation from './NavIgation'
  1312. import BasicInfor from './BasicInfor'
  1313. import DialysisPrescription from './DialysisPrescription'
  1314. import PastData from './pastData'
  1315. import AcceptsAssessment from './acceptsAssessment'
  1316. import AssessmentBefore from './assessmentBefore'
  1317. import StatOrder from './statOrder'
  1318. import DialysisComputer from './dialysisComputer'
  1319. import DoubleCheck from './doubleCheck'
  1320. import DialysisMonitoring from './dialysisMonitoring'
  1321. import DialysisOff from './dialysisOff'
  1322. import AssessmentAfter from './assessmentAfter'
  1323. import TreatmentOf from './treatmentOf'
  1324. import OperationStaff from './operationStaff'
  1325. import {
  1326. getDialysisScheduleDetail,
  1327. getLongAdviceTwo,
  1328. getDialysisRecordInitData,
  1329. getDialysisSchedules,
  1330. getInitPrintData,
  1331. getPatientDialysisRecordList
  1332. } from '@/api/dialysis_record'
  1333. import { getDataConfig } from '@/utils/data'
  1334. import { parseTime } from '@/utils'
  1335. import BreadCrumb from '@/xt_pages/components/bread-crumb'
  1336. import print from 'print-js'
  1337. import { uParseTime } from '@/utils/tools'
  1338. import Calendar from 'vue-calendar-component'
  1339. import data from '../../../store/modules/data'
  1340. export default {
  1341. name: 'index',
  1342. components: {
  1343. NavIgation,
  1344. BasicInfor,
  1345. DialysisPrescription,
  1346. PastData,
  1347. AcceptsAssessment,
  1348. AssessmentBefore,
  1349. StatOrder,
  1350. DialysisComputer,
  1351. DoubleCheck,
  1352. DialysisMonitoring,
  1353. DialysisOff,
  1354. AssessmentAfter,
  1355. TreatmentOf,
  1356. OperationStaff,
  1357. BreadCrumb,
  1358. Calendar,//日历
  1359. },
  1360. data() {
  1361. return {
  1362. crumbs: [
  1363. { path: false, name: '透析管理' },
  1364. { path: false, name: '透析记录' },
  1365. { path: false, name: '透析单' }
  1366. ],
  1367. dialogFormVisible: false,
  1368. orders: false,
  1369. loading: false,
  1370. cishu_dialogVisible:false,//
  1371. patient_id: 0,
  1372. date: 0,
  1373. dialysis_date:0,
  1374. longAdvices: [],
  1375. waitUploadAdvices: [],
  1376. is_open: 0,
  1377. targetAdvices: [],
  1378. patient: { id: 0 }, // 患者信息
  1379. schedual: { id: 0 }, // 患者排班信息
  1380. prescription: { id: 0 }, // 透析处方
  1381. solution: { id: 0 }, // 透析方案
  1382. system_prescribe: { id: 0 },
  1383. receiver_treatment_access: { id: 0 }, // 接诊评估
  1384. predialysis_evaluation: { id: 0 }, // 透前评估
  1385. doctor_advices: [], // 临时医嘱
  1386. double_check: { id: 0 }, // 双人核对
  1387. assessment_after_dislysis: { id: 0 }, // 透后评估
  1388. treatment_summary: { id: 0 }, // 治疗小结
  1389. monitor_records: [], // 透析监测
  1390. dialysis_order: { id: 0 }, // 透析记录
  1391. admin_users: [], // 系统用户列表
  1392. devices: [], // 设备
  1393. device_numbers: [], // 床位号
  1394. admin_user_map: {}, // {user_id: admin_user object}
  1395. device_map: {}, // {device_id: device}
  1396. device_number_map: {}, // {device_number_id: device_number}
  1397. niprocart_info: [],
  1398. jms_info: [],
  1399. fistula_needle_set_info: [],
  1400. fistula_needle_set_16_info: [],
  1401. hemoperfusion_info: [],
  1402. dialyser_sterilised_info: [],
  1403. filtryzer_info: [],
  1404. dialyzers_info: [],
  1405. injector_info: [],
  1406. bloodlines_info: [],
  1407. tubingHemodialysis_info: [],
  1408. safe_package_info: [],
  1409. aliquid_info: [],
  1410. config: {},
  1411. his_is_open:0,
  1412. is_advice_open:0,
  1413. lastPredialysisEvaluation: { id: 0 },
  1414. lastMonitorRecord: { id: 0 },
  1415. lastAssessmentAfterDislysis: { id: 0 },
  1416. lastDryWeightDislysis: { id: 0 },
  1417. lastAssessment:{id:0},
  1418. headNurses: [],
  1419. lastDialysisPrescribe: { id: 0 },
  1420. //
  1421. activeName: 'first',
  1422. selected_date: new Date(),
  1423. // search_input 和 search_keyword,使输入关键字时不会经常刷新 filtedSchedules
  1424. search_keyword: '', // 确定用于搜索的关键字
  1425. search_input: '', // 输入中的关键字
  1426. patient_state: [
  1427. { value: 0, label: '全部患者' },
  1428. { value: 1, label: '已签到' },
  1429. { value: 2, label: '未签到' },
  1430. { value: 3, label: '已上机' },
  1431. { value: 4, label: '已下机' }
  1432. ],
  1433. patientStateVal: 0,
  1434. treat_state: [
  1435. { value: 0, label: '全部治疗' },
  1436. { value: 1, label: '待开处方' },
  1437. { value: 2, label: '待开小结' },
  1438. { value: 3, label: '待医嘱核对' },
  1439. ],
  1440. treatStateVal: 0,
  1441. schedule_options: [
  1442. { value: 0, label: '全部班' },
  1443. { value: 1, label: '上午' },
  1444. { value: 2, label: '下午' },
  1445. { value: 3, label: '晚上' }
  1446. ],
  1447. scheduleStateVal: 0,
  1448. zone_options: [
  1449. { id: 0, text: '全部分区' }
  1450. ],
  1451. zoneVal: 0,
  1452. tableData: [],
  1453. tableData1: [],
  1454. arr: [],
  1455. newName: '',
  1456. newTime: '',
  1457. scheudle_mode:"",
  1458. showView:false,
  1459. curPatient:{},
  1460. queueConfig:{},
  1461. stockType:[],
  1462. preparestock:[],
  1463. his_doctor_advices:[],
  1464. startVisibility:false,
  1465. endVisibility:false,
  1466. centerDialogVisible:false,//新上机单弹窗
  1467. printList:[],
  1468. anticoagulants_confit:null,
  1469. printDate:'',
  1470. assessmentAfterDislysis:{},
  1471. lastOrder:{},
  1472. dryWeightList:[],
  1473. docList:[],
  1474. blood_access_part_opera: [],
  1475. Dialysis_patient:'',
  1476. Refresh:true,
  1477. norefresh:true,
  1478. historyclick:false,
  1479. time_value:new Date(),
  1480. start_time:moment().startOf('months').format('YYYY-MM-DD'),
  1481. end_time:moment().endOf('months').format('YYYY-MM-DD'),
  1482. orderList:[],
  1483. lastTreat:{id:0}
  1484. // start_time2:'',
  1485. // end_time2:'',
  1486. }
  1487. },
  1488. created() {
  1489. this.blood_access_part_opera = getDataConfig('hemodialysis', 'vascular_access_desc')
  1490. this.org_id = this.$store.getters.xt_user.org.id,
  1491. this.printDate = moment().format("YYYY-MM-DD HH:mm:ss")
  1492. if(this.$route.query.showView){
  1493. this.showView = this.$route.query.showView
  1494. }
  1495. if(sessionStorage.getItem("nameActive")){
  1496. this.activeName = sessionStorage.getItem("nameActive")
  1497. }
  1498. var patient_id = this.$route.query.patient_id
  1499. var date = this.$route.query.date
  1500. this.patient_id = patient_id
  1501. this.date = date
  1502. this.dialysis_date=
  1503. this.getScheduleDetail()
  1504. this.getLongAdvice()
  1505. this.selected_date = this.$route.query.date * 1000
  1506. var schedule_type_selected = this.$store.getters.schedule_type_selected
  1507. var zone_selected = this.$store.getters.zone_selected
  1508. var patient_state_selected = this.$store.getters.patient_state_selected
  1509. var treat_state_selected = this.$store.getters.treat_state_selected
  1510. var selected_date = this.$store.getters.selected_date
  1511. if (schedule_type_selected) {
  1512. this.scheduleStateVal = schedule_type_selected.schedule_type_selected
  1513. }
  1514. if (zone_selected) {
  1515. this.zoneVal = zone_selected.zone_selected
  1516. }
  1517. if (patient_state_selected) {
  1518. this.patientStateVal = patient_state_selected.patient_state_selected
  1519. }
  1520. if (treat_state_selected) {
  1521. this.treatStateVal = treat_state_selected.treat_state_selected
  1522. }
  1523. if (selected_date.selected_date) {
  1524. this.selected_date = selected_date.selected_date
  1525. }
  1526. this.initData = {
  1527. cmd: "queue/join",
  1528. data: {type:3,page:0,size:0},
  1529. };
  1530. this.websocketSend(this.initData)
  1531. this.getInitData()
  1532. this.anticoagulants_confit = this.$store.getters.anticoagulants_confit
  1533. },
  1534. computed: {
  1535. websocket() {
  1536. return this.$store.state.user.websocket;
  1537. },
  1538. steps: function() {
  1539. var steps = [
  1540. { title: '透析处方', finish: false },
  1541. { title: '接诊评估', finish: false },
  1542. { title: '透前评估', finish: false },
  1543. { title: '临时医嘱', finish: false },
  1544. { title: '双人核对', finish: false },
  1545. { title: '透析上机', finish: false },
  1546. { title: '透析监测', finish: false },
  1547. { title: '透析下机', finish: false },
  1548. { title: '透后评估', finish: false },
  1549. { title: '治疗小结', finish: false }
  1550. ]
  1551. steps[0].finish = this.prescription.id && this.prescription.creater > 0
  1552. steps[1].finish = this.receiver_treatment_access.id > 0
  1553. // steps[2].finish =this.predialysis_evaluation.id > 0 && this.predialysis_evaluation.creater > 0
  1554. steps[2].finish =this.predialysis_evaluation.id > 0
  1555. steps[3].finish = this.doctor_advices.length > 0
  1556. steps[5].finish = this.dialysis_order.id > 0
  1557. steps[7].finish =
  1558. this.dialysis_order.id > 0 && this.dialysis_order.stage == 2
  1559. steps[4].finish =
  1560. this.double_check.id > 0 &&
  1561. this.double_check.creater > 0 &&
  1562. this.double_check.modifier > 0
  1563. steps[6].finish = this.monitor_records.length > 0
  1564. // steps[8].finish = this.assessment_after_dislysis.id > 0 && this.assessment_after_dislysis.creater > 0
  1565. steps[8].finish = this.assessment_after_dislysis.id > 0
  1566. steps[9].finish = this.treatment_summary.id > 0
  1567. return steps
  1568. },
  1569. filtedSchedules: function() {
  1570. var search_keyword = this.search_keyword
  1571. if (search_keyword.length > 0) {
  1572. var schedules = []
  1573. for (let o_i = 0; o_i < this.zone_schedules.length; o_i++) {
  1574. const scheduleInfo = this.zone_schedules[o_i]
  1575. var originSchedules = scheduleInfo.schedules
  1576. if (originSchedules.length == 0) {
  1577. continue
  1578. }
  1579. var filtedSchedules = []
  1580. for (let s_i = 0; s_i < originSchedules.length; s_i++) {
  1581. const schedule = originSchedules[s_i]
  1582. if ((schedule.patient.name.indexOf(search_keyword) != -1) || (schedule.patient.first_letter.indexOf(search_keyword) != -1)) {
  1583. filtedSchedules.push(schedule)
  1584. // break
  1585. }
  1586. }
  1587. if (filtedSchedules.length > 0) {
  1588. schedules.push({ zone_id: scheduleInfo.zone_id, zone_name: scheduleInfo.zone_name, schedules: filtedSchedules })
  1589. }
  1590. }
  1591. return schedules
  1592. }
  1593. // var zone_selected = this.zoneVal
  1594. // var timetype_selected = this.scheduleStateVal
  1595. // if ((zone_selected == 0 && timetype_selected == 0) || this.zone_options.length <= 1) {
  1596. // var schedules = []
  1597. // for (let index = 0; index < this.zone_schedules.length; index++) {
  1598. // const scheduleInfo = this.zone_schedules[index]
  1599. // if (scheduleInfo.schedules.length != 0) {
  1600. // schedules.push(scheduleInfo)
  1601. // }
  1602. // }
  1603. // return schedules
  1604. // }
  1605. // var schedules = []
  1606. // for (let o_i = 0; o_i < this.zone_schedules.length; o_i++) {
  1607. // const scheduleInfo = this.zone_schedules[o_i]
  1608. // if (zone_selected == scheduleInfo.zone_id && timetype_selected == 0) {
  1609. // if (scheduleInfo.schedules.length == 0) {
  1610. // return []
  1611. // } else {
  1612. // return [scheduleInfo]
  1613. // }
  1614. // }
  1615. // var originSchedules = scheduleInfo.schedules
  1616. // if (originSchedules.length == 0) {
  1617. // continue
  1618. // }
  1619. // var filtedSchedules = []
  1620. // for (let s_i = 0; s_i < originSchedules.length; s_i++) {
  1621. // const schedule = originSchedules[s_i]
  1622. // if (zone_selected != 0) {
  1623. // if (zone_selected == schedule.device_number.zone.id) {
  1624. // if (timetype_selected == 0 || schedule.schedule_type == timetype_selected) {
  1625. // filtedSchedules.push(schedule)
  1626. // }
  1627. // }
  1628. // } else {
  1629. // if (timetype_selected == 0 || schedule.schedule_type == timetype_selected) {
  1630. // filtedSchedules.push(schedule)
  1631. // }
  1632. // }
  1633. // }
  1634. // if (filtedSchedules.length > 0) {
  1635. // schedules.push({ zone_id: scheduleInfo.zone_id, zone_name: scheduleInfo.zone_name, schedules: filtedSchedules })
  1636. // }
  1637. // }
  1638. // return schedules
  1639. }
  1640. },
  1641. beforeMount() {
  1642. if (this.websocket) {
  1643. if (this.websocket.readyState == 1) {
  1644. console.log('执行1')
  1645. this.websocketMess();
  1646. } else {
  1647. setTimeout(() => {
  1648. console.log('执行2')
  1649. this.websocketMess();
  1650. }, 1000);
  1651. }
  1652. } else {
  1653. setTimeout(() => {
  1654. if (this.websocket) {
  1655. console.log('执行3')
  1656. this.websocketMess();
  1657. } else {
  1658. setTimeout(() => {
  1659. console.log('执行4')
  1660. this.websocketMess();
  1661. }, 1000);
  1662. }
  1663. }, 1000);
  1664. }
  1665. },
  1666. mounted() {
  1667. const timer = setInterval(() => {
  1668. // this.getInitData();
  1669. this.requestDialysisSchedules()
  1670. }, 1000 * 30)
  1671. // 通过$once来监听定时器,在beforeDestroy钩子可以被清除。
  1672. this.$once('hook:beforeDestroy', () => {
  1673. clearInterval(timer)
  1674. })
  1675. let obj = {
  1676. cmd: "queue/join",
  1677. data: {type:3,page:0,size:0},
  1678. };
  1679. this.websocketSend(obj)
  1680. // this.getmonth(this.time_value)
  1681. // this.handlePick(this.time_value)
  1682. },
  1683. beforeDestroy(){
  1684. let unObj = {
  1685. cmd: "queue/unjoin",
  1686. data: {type:3},
  1687. };
  1688. this.websocketSend(unObj)
  1689. },
  1690. methods: {
  1691. getModeName(id){
  1692. var name = ""
  1693. if(id == 1){
  1694. name = "HD"
  1695. }
  1696. if(id == 2){
  1697. name = "HDF"
  1698. }
  1699. if(id == 3){
  1700. name = "HD+HP"
  1701. }
  1702. if(id == 4){
  1703. name = "HP"
  1704. }
  1705. if(id == 5){
  1706. name = "HF"
  1707. }
  1708. if(id == 6){
  1709. name = "SCUF"
  1710. }
  1711. if(id == 7){
  1712. name = "IUF"
  1713. }
  1714. if(id == 8){
  1715. name = "HFHD"
  1716. }
  1717. if(id == 9){
  1718. name = "HFHD+HP"
  1719. }
  1720. if(id == 10){
  1721. name = "PHF"
  1722. }
  1723. if(id == 11){
  1724. name = "HFR"
  1725. }
  1726. if(id == 12){
  1727. name = "HDF+HP"
  1728. }
  1729. if(id == 13){
  1730. name = "CRRT"
  1731. }
  1732. if(id == 14){
  1733. name = "腹水回输"
  1734. }
  1735. if(id == 19){
  1736. name = "IUF+HD"
  1737. }
  1738. if(id == 20){
  1739. name = "UF"
  1740. }
  1741. if(id == 21){
  1742. name = "HD+"
  1743. }
  1744. if(id == 22){
  1745. name = "血浆胆红素吸附+HDF"
  1746. }
  1747. if(id == 23){
  1748. name = "血浆胆红素吸附"
  1749. }
  1750. if(id == 24){
  1751. name = "I-HDF"
  1752. }
  1753. if(id == 25){
  1754. name = "HD高通"
  1755. }
  1756. if(id == 26){
  1757. name = "CVVH"
  1758. }
  1759. if(id == 27){
  1760. name = "CVVHD"
  1761. }
  1762. if(id == 28){
  1763. name = "CVVHDF"
  1764. }
  1765. if(id == 29){
  1766. name = "PE"
  1767. }
  1768. if(id == 30){
  1769. name = "血浆胆红素吸附+HP"
  1770. }
  1771. if(id == 31){
  1772. name = "HPD"
  1773. }
  1774. if(id == 32){
  1775. name = "HDP"
  1776. }
  1777. return name
  1778. },
  1779. // 透析次数
  1780. chishuclick(row){
  1781. this.cishu_dialogVisible=true
  1782. console.log('ddddddd',row);
  1783. this.Dialysis_patient=row
  1784. },
  1785. getNewAge(UUserCard) {
  1786. if (UUserCard != null && UUserCard != '') {
  1787. // 获取年龄
  1788. var myDate = new Date()
  1789. var month = myDate.getMonth() + 1
  1790. var day = myDate.getDate()
  1791. var age = myDate.getFullYear() - UUserCard.substring(6, 10) - 1
  1792. if (UUserCard.substring(10, 12) < month || UUserCard.substring(10, 12) == month && UUserCard.substring(12, 14) <= day) {
  1793. age++
  1794. }
  1795. return age
  1796. }
  1797. },
  1798. adviceFunc() {
  1799. this.getScheduleDetail()
  1800. },
  1801. getLongAdvice() {
  1802. const params = {
  1803. patient_id: this.patient_id,
  1804. schedule_date:this.$route.query.date,
  1805. }
  1806. getLongAdviceTwo(params).then(rs => {
  1807. var resp = rs.data
  1808. if (resp.state == 1) {
  1809. console.log('vbnvnffvvvv',resp);
  1810. var status = parseInt(resp.data.status)
  1811. switch (status) {
  1812. case 2:
  1813. var totalAdvice = resp.data.advices
  1814. var longAdvicesTwo = resp.data.advices_two
  1815. var waitUploadAdvices = []
  1816. for (let i = 0; i < totalAdvice.length; i++) {
  1817. totalAdvice[i]['isCheck'] = 1
  1818. }
  1819. for (let i = 0; i < totalAdvice.length; i++) {
  1820. for (let a = 0; a < longAdvicesTwo.length; a++) {
  1821. if (
  1822. totalAdvice[i].template_id ==
  1823. longAdvicesTwo[a].template_id &&
  1824. totalAdvice[i].frequency_type ==
  1825. longAdvicesTwo[a].frequency_type
  1826. ) {
  1827. totalAdvice[i]['isCheck'] = 0
  1828. }
  1829. }
  1830. }
  1831. for (let i = 0; i < totalAdvice.length; i++) {
  1832. if (totalAdvice[i].isCheck == 1) {
  1833. waitUploadAdvices.push(totalAdvice[i])
  1834. }
  1835. }
  1836. this.is_open = resp.data.is_open_remind
  1837. if(this.his_is_open == 1){
  1838. this.is_open = 0
  1839. }
  1840. if(this.is_advice_open == 1){
  1841. this.is_open = 1
  1842. }
  1843. this.longAdvices = totalAdvice
  1844. console.log("长期医嘱汇总 u 公告让你😯23232322332",this.longAdvices)
  1845. this.waitUploadAdvices = waitUploadAdvices
  1846. break
  1847. }
  1848. } else {
  1849. this.$message.error(resp.msg)
  1850. }
  1851. })
  1852. },
  1853. assessmentAfterDislysisFunc: function(val) {
  1854. for (var index in val) {
  1855. this.$set(this.assessment_after_dislysis, index, val[index])
  1856. }
  1857. },
  1858. didDelMonitor(record_id) {
  1859. var mrl = this.monitor_records.length
  1860. for (let index = 0; index < mrl; index++) {
  1861. if (this.monitor_records[index].id == record_id) {
  1862. this.monitor_records.splice(index, 1)
  1863. break
  1864. }
  1865. }
  1866. },
  1867. getScheduleDetail: function() {
  1868. this.loading = true
  1869. var dateStr = parseTime(this.date, '{y}-{m}-{d}')
  1870. if(this.$route.query.showView == true){
  1871. this.loading = false
  1872. return
  1873. }
  1874. // console.log('kkkkkkk',dateStr);
  1875. this.doctor_advices = []
  1876. getDialysisScheduleDetail(this.patient_id, dateStr).then(rs => {
  1877. var resp = rs.data
  1878. if (resp.state == 1) {
  1879. var patient = resp.data.patient // 患者信息
  1880. var schedual = resp.data.schedual // 患者排班信息
  1881. console.log("排班22222222222",resp)
  1882. var prescription = resp.data.prescription // 透析处方
  1883. if (prescription != null) {
  1884. if (prescription.body_fluid == -2) {
  1885. prescription.body_fluid = 0
  1886. }
  1887. if(prescription.bilirubin_adsorption_column == 0){
  1888. prescription.bilirubin_adsorption_column = ""
  1889. }
  1890. if(prescription.plasma_separator == 0){
  1891. prescription.plasma_separator = ""
  1892. }
  1893. }
  1894. var solution = resp.data.solution // 透析方案
  1895. var receiver_treatment_access = resp.data.receiver_treatment_access // 接诊评估
  1896. var predialysis_evaluation = resp.data.predialysis_evaluation // 透前评估
  1897. if (predialysis_evaluation != null) {
  1898. if (predialysis_evaluation.blood_access_part_id == -2) {
  1899. predialysis_evaluation.blood_access_part_id = 0
  1900. }
  1901. if(predialysis_evaluation.blood_pressure_during_dialysis == 0){
  1902. predialysis_evaluation.blood_pressure_during_dialysis = ""
  1903. }
  1904. }
  1905. var doctor_advices = resp.data.doctor_advices // 临时医嘱
  1906. var double_check = resp.data.double_check // 双人核对
  1907. var assessment_after_dislysis = resp.data.assessment_after_dislysis // 透后评估
  1908. var treatment_summary = resp.data.treatment_summary // 治疗小结
  1909. var monitor_records = resp.data.monitor_records // 透析监测
  1910. var dialysis_order = resp.data.dialysis_order // 透析记录
  1911. var niprocart_info = resp.data.niprocart_info
  1912. var jms_info = resp.data.jms_info
  1913. var fistula_needle_set_info = resp.data.fistula_needle_set_info
  1914. var fistula_needle_set_16_info = resp.data.fistula_needle_set_16_info
  1915. var hemoperfusion_info = resp.data.hemoperfusion_info
  1916. var dialyser_sterilised_info = resp.data.dialyser_sterilised_info
  1917. var filtryzer_info = resp.data.filtryzer_info
  1918. var dialyzers_info = resp.data.dialyzers_info
  1919. var injector_info = resp.data.injector_info
  1920. var bloodlines_info = resp.data.bloodlines_info
  1921. var tubingHemodialysis_info = resp.data.tubingHemodialysis_info
  1922. var safe_package_info = resp.data.safe_package_info
  1923. var aliquid_info = resp.data.aliquid_info
  1924. var lastPredialysisEvaluation = resp.data.lastPredialysisEvaluation
  1925. if (lastPredialysisEvaluation != null) {
  1926. if (lastPredialysisEvaluation.blood_access_part_id == -2) {
  1927. lastPredialysisEvaluation.blood_access_part_id = 0
  1928. }
  1929. }
  1930. var lastMonitorRecord = resp.data.lastMonitorRecord
  1931. var lastAssessmentAfterDislysis = resp.data.lastAssessmentAfterDislysis
  1932. // if(lastAssessmentAfterDislysis.hypertenison!=""){
  1933. // lastAssessmentAfterDislysis.hypertenison = lastAssessmentAfterDislysis.hypertenison.toString()
  1934. // }
  1935. // if(lastAssessmentAfterDislysis.hypopiesia!=""){
  1936. // lastAssessmentAfterDislysis.hypopiesia = lastAssessmentAfterDislysis.hypopiesia.toString()
  1937. // }
  1938. var lastDialysisPrescribe = resp.data.lastDialysisPrescribe
  1939. var lastDryWeightDislysis = resp.data.lastDryWeightDislysis
  1940. var system_prescribe = resp.data.system_prescribe
  1941. var lastAssessment = resp.data.lastAssessment
  1942. var lastOrder = resp.data.lastOrder
  1943. this.lastOrder = lastOrder
  1944. this.$refs.nav.setLastRecord(
  1945. lastPredialysisEvaluation,
  1946. lastMonitorRecord,
  1947. lastAssessmentAfterDislysis,
  1948. lastDialysisPrescribe,
  1949. lastDryWeightDislysis,
  1950. schedual,
  1951. system_prescribe,
  1952. lastAssessment,
  1953. )
  1954. var headNurses = resp.data.headNurse
  1955. var config = resp.data.config
  1956. this.lastPredialysisEvaluation = lastPredialysisEvaluation
  1957. this.lastMonitorRecord = lastMonitorRecord
  1958. this.lastAssessmentAfterDislysis = lastAssessmentAfterDislysis
  1959. this.lastDialysisPrescribe = lastDialysisPrescribe
  1960. this.lastDryWeightDislysis = lastDryWeightDislysis
  1961. this.lastAssessment = lastAssessment
  1962. this.headNurses = headNurses
  1963. this.system_prescribe = system_prescribe
  1964. this.niprocart_info = []
  1965. this.jms_info = []
  1966. this.fistula_needle_set_info = []
  1967. this.fistula_needle_set_16_info = []
  1968. this.hemoperfusion_info = []
  1969. this.dialyser_sterilised_info = []
  1970. this.filtryzer_info = []
  1971. this.dialyzers_info = []
  1972. this.injector_info = []
  1973. this.bloodlines_info = []
  1974. this.tubingHemodialysis_info = []
  1975. this.safe_package_info = []
  1976. this.aliquid_info = []
  1977. this.niprocart_info = niprocart_info
  1978. this.jms_info = jms_info
  1979. this.fistula_needle_set_info = fistula_needle_set_info
  1980. this.fistula_needle_set_16_info = fistula_needle_set_16_info
  1981. this.hemoperfusion_info = hemoperfusion_info
  1982. this.dialyser_sterilised_info = dialyser_sterilised_info
  1983. this.filtryzer_info = filtryzer_info
  1984. this.dialyzers_info = dialyzers_info
  1985. this.injector_info = injector_info
  1986. this.bloodlines_info = bloodlines_info
  1987. this.tubingHemodialysis_info = tubingHemodialysis_info
  1988. this.safe_package_info = safe_package_info
  1989. this.aliquid_info = aliquid_info
  1990. this.config = config
  1991. // console.log('sdfdasfda4444444',this.patient);
  1992. this.patient = patient
  1993. console.log('bbbbbbbcccccccccc',this.patient);
  1994. this.schedual = schedual == null ? { id: 0 } : schedual
  1995. this.prescription = prescription == null ? { id: 0 } : prescription
  1996. this.solution = solution == null ? { id: 0 } : solution
  1997. this.receiver_treatment_access =
  1998. receiver_treatment_access == null
  1999. ? { id: 0 }
  2000. : receiver_treatment_access
  2001. this.predialysis_evaluation =
  2002. predialysis_evaluation == null ? { id: 0 } : predialysis_evaluation
  2003. this.doctor_advices = doctor_advices == null ? [] : doctor_advices
  2004. this.double_check = double_check == null ? { id: 0 } : double_check
  2005. this.assessment_after_dislysis =
  2006. assessment_after_dislysis == null
  2007. ? { id: 0 }
  2008. : assessment_after_dislysis
  2009. this.treatment_summary =
  2010. treatment_summary == null ? { id: 0 } : treatment_summary
  2011. this.monitor_records = monitor_records == null ? [] : monitor_records
  2012. this.dialysis_order =
  2013. dialysis_order == null ? { id: 0 } : dialysis_order
  2014. this.admin_users = resp.data.doctors
  2015. this.devices = resp.data.devices
  2016. this.device_numbers = resp.data.device_numbers
  2017. var his_doctor_advices = resp.data.his_advices
  2018. this.his_doctor_advices = his_doctor_advices
  2019. this.his_is_open = resp.data.is_open_config.is_open
  2020. this.is_advice_open = resp.data.is_advice_open.is_advice_open
  2021. var stockType = resp.data.stockType
  2022. this.stockType = stockType
  2023. this.lastTreat = resp.data.lastAcceptTreatment
  2024. console.log("上次透后平出-----------",this.lastTreat)
  2025. this.dryWeightList = resp.data.dryWeightList
  2026. this.docList = resp.data.docList
  2027. console.log("doclist-----",this.docList)
  2028. var prepare = resp.data.prepare
  2029. if(prepare!=null){
  2030. this.preparestock = prepare
  2031. }else{
  2032. this.preparestock = []
  2033. }
  2034. for (let i = 0; i < this.doctor_advices.length; i++){
  2035. this.doctor_advices[i]['origin'] = 1
  2036. }
  2037. if (his_doctor_advices != null) {
  2038. for (let i = 0; i < his_doctor_advices.length; i++) {
  2039. his_doctor_advices[i]['origin'] = 2
  2040. his_doctor_advices[i]['way'] = 1
  2041. this.doctor_advices.push(his_doctor_advices[i])
  2042. }
  2043. }
  2044. const obj = {}
  2045. this.doctor_advices = this.doctor_advices.reduce((cur, next) => {
  2046. obj[next.id] ? '' : obj[next.id] = true && cur.push(next)
  2047. return cur
  2048. }, []) // 设置cur默认类型为数组,并且初始值为空的数组
  2049. var device_map = {}
  2050. for (let index = 0; index < this.devices.length; index++) {
  2051. const device = this.devices[index]
  2052. device_map[device.id] = device
  2053. }
  2054. this.device_map = device_map
  2055. var admin_map = {}
  2056. for (let index = 0; index < this.admin_users.length; index++) {
  2057. const admin = this.admin_users[index]
  2058. admin_map[admin.id] = admin
  2059. }
  2060. this.admin_user_map = admin_map
  2061. var device_number_map = {}
  2062. for (let index = 0; index < this.device_numbers.length; index++) {
  2063. const device_number = this.device_numbers[index]
  2064. device_number_map[device_number.id] = device_number
  2065. }
  2066. this.device_number_map = device_number_map
  2067. } else {
  2068. this.$message.error(resp.msg)
  2069. }
  2070. // 目标超滤量是否默认上次数据
  2071. if (this.lastDialysisPrescribe != null) {
  2072. delete this.lastDialysisPrescribe.target_ultrafiltration
  2073. }
  2074. if (this.solution != null) {
  2075. delete this.solution.target_ultrafiltration
  2076. }
  2077. if(this.predialysis_evaluation.id > 0){
  2078. this.newTime = parseTime(this.predialysis_evaluation.created_time, '{h}:{i}')
  2079. this.dialysis_date = parseTime(this.predialysis_evaluation.created_time, '{y}-{m}-{d}')
  2080. console.log('qqqqqqqqq',this.dialysis_date);
  2081. // this.dialysis_date=this.predialysis_evaluation.created_time
  2082. }
  2083. this.loading = false
  2084. })
  2085. },
  2086. printOrder() {
  2087. var xtdate = parseTime(this.date, '{y}-{m}-{d}')
  2088. this.$router.push(
  2089. '/dialysis/print?xtdate=' + xtdate + '&xtno=' + this.patient.dialysis_no +"&patient_id="+this.patient.id
  2090. )
  2091. },
  2092. printOrderOne(){
  2093. this.getInitPrintData()
  2094. },
  2095. // 日期
  2096. handleScheduleDateChange: function(index) {
  2097. this.treatStateVal = 0
  2098. this.patientStateVal = 0
  2099. this.zoneVal = 0
  2100. this.scheduleStateVal = 0
  2101. this.search_keyword = this.search_input = ''
  2102. // this.$store.dispatch("SaveDialysisAreaSelectIndexs", {
  2103. // zone: this.zone_selected,
  2104. // schedule_type: this.schedule_type_selected,
  2105. // schedule_date: this.selected_date,
  2106. // })
  2107. this.selected_date = index
  2108. this.$store.dispatch('SetSelectedDate', { selected_date: index })
  2109. this.requestDialysisSchedules()
  2110. },
  2111. // 初始化数据
  2112. getInitData: function() {
  2113. getDialysisRecordInitData().then(rs => {
  2114. var resp = rs.data
  2115. if (resp.state == 1) {
  2116. var zones = resp.data.zones
  2117. var schedules = resp.data.schedules
  2118. var zone_options = [{ id: 0, text: '全部分区' }]
  2119. for (let z_i = 0; z_i < zones.length; z_i++) {
  2120. const zone = zones[z_i]
  2121. zone_options.push({ id: zone.id, text: zone.name })
  2122. }
  2123. this.zone_options = zone_options
  2124. this.arr = this.processedDialysisSchedules(schedules, this.zone_options)
  2125. this.requestDialysisSchedules()
  2126. } else {
  2127. this.$message.error(resp.msg)
  2128. }
  2129. })
  2130. },
  2131. // 班次
  2132. handletimeType: function(index) {
  2133. this.scheduleStateVal = index
  2134. this.$store.dispatch('SetScheduleTypeSelected', { schedule_type_selected: index })
  2135. this.search_keyword = this.search_input = ''
  2136. this.getData()
  2137. },
  2138. // 分区
  2139. handleZoneChange: function(index) {
  2140. this.zoneVal = index
  2141. this.$store.dispatch('SetZoneSelected', { zone_selected: index })
  2142. this.search_keyword = this.search_input = ''
  2143. this.getData()
  2144. },
  2145. // 患者状态
  2146. handleStateChange: function(index) {
  2147. this.patientStateVal = index
  2148. this.$store.dispatch('SetPatientStateSelected', { patient_state_selected: index })
  2149. this.search_keyword = this.search_input = ''
  2150. this.getData()
  2151. },
  2152. handleTreatChange: function(index) {
  2153. this.treatStateVal = index
  2154. this.$store.dispatch('SetTreatStateSelected', { treat_state_selected: index })
  2155. this.search_keyword = this.search_input = ''
  2156. this.getData()
  2157. },
  2158. processedDialysisSchedules: function(schedules, zone_options) {
  2159. var zoneMap = {}
  2160. var scheduleMap = {}
  2161. for (let z_i = 0; z_i < zone_options.length; z_i++) {
  2162. const zone = zone_options[z_i]
  2163. if (zone.id == 0) {
  2164. continue
  2165. }
  2166. scheduleMap[zone.id] = []
  2167. }
  2168. for (let index = 0; index < schedules.length; index++) {
  2169. const schedule = schedules[index]
  2170. scheduleMap[schedule.device_number.zone.id].push(schedule)
  2171. }
  2172. var zone_schedules = []
  2173. for (let index = 0; index < zone_options.length; index++) {
  2174. const zone = zone_options[index]
  2175. if (zone.id == 0) {
  2176. continue
  2177. }
  2178. var schedules = scheduleMap[zone.id]
  2179. zone_schedules.push({ zone_id: zone.id, zone_name: zone.text, schedules: schedules })
  2180. }
  2181. return zone_schedules
  2182. },
  2183. searchAction: function() {
  2184. this.search_keyword = this.search_input
  2185. this.scheduleStateVal = 0
  2186. this.zoneVal = 0
  2187. this.treatStateVal = 0
  2188. this.patientStateVal = 0
  2189. if (this.search_input != '') {
  2190. const arr = []
  2191. this.filtedSchedules.map(item => {
  2192. arr.push(...item.schedules)
  2193. })
  2194. if (this.activeName == 'first') {
  2195. this.tableData = arr
  2196. } else if (this.activeName == 'second') {
  2197. this.tableData1 = arr
  2198. }
  2199. } else {
  2200. this.getData()
  2201. }
  2202. },
  2203. requestDialysisSchedules: function() {
  2204. var ymd = parseTime(this.selected_date, '{y}-{m}-{d}')
  2205. getDialysisSchedules(ymd).then(rs => {
  2206. var resp = rs.data
  2207. if (resp.state == 1) {
  2208. var schedules = resp.data.schedules
  2209. // if(this.prescription!=null){
  2210. // for(let i=0;i<schedules.length;i++){
  2211. // if(this.prescription.patient_id == schedules[i].patient_id){
  2212. // this.prescription = schedules[i].prescription
  2213. // }
  2214. // }
  2215. // }
  2216. this.zone_schedules = this.processedDialysisSchedules(schedules, this.zone_options)
  2217. const patientArr = JSON.parse(JSON.stringify(this.zone_schedules))
  2218. if (this.activeName == 'first') {
  2219. for (let i = 0; i < patientArr.length; i++) {
  2220. for (let j = 0; j < patientArr[i].schedules.length; j++) {
  2221. if (patientArr[i].schedules.length > 0 && patientArr[i].schedules[j].dialysis_order != null) {
  2222. // 删除元素后改变i的值
  2223. patientArr[i].schedules.splice(j--, 1)
  2224. }
  2225. }
  2226. }
  2227. } else if (this.activeName == 'second') {
  2228. for (let i = 0; i < patientArr.length; i++) {
  2229. for (let j = 0; j < patientArr[i].schedules.length; j++) {
  2230. if (patientArr[i].schedules.length > 0 && patientArr[i].schedules[j].dialysis_order == null) {
  2231. // 删除元素后改变i的值
  2232. patientArr[i].schedules.splice(j--, 1)
  2233. }
  2234. }
  2235. }
  2236. }
  2237. const newArr = []
  2238. patientArr.map(item => {
  2239. newArr.push(...item.schedules)
  2240. })
  2241. // console.log("newArrwowowowowoowwowo",newArr)
  2242. this.tableData = newArr
  2243. this.getData()
  2244. } else {
  2245. this.$message.error(resp.msg)
  2246. }
  2247. })
  2248. },
  2249. changePatient(schedual) {
  2250. this.patient_id = schedual.patient_id
  2251. this.date = schedual.schedule_date
  2252. this.getScheduleDetail();
  2253. console.log('schedual',schedual);
  2254. //this.getLongAdvice();
  2255. var patient_id = schedual.patient_id
  2256. var date = schedual.schedule_date
  2257. this.$router.push({
  2258. path: '/dialysis/details',
  2259. query: {
  2260. patient_id: patient_id,
  2261. date: date,
  2262. patient_name: schedual.patient.name,
  2263. mode_id:schedual.mode_id
  2264. }
  2265. })
  2266. },
  2267. handleClick(type) {
  2268. sessionStorage.setItem('nameActive', type.name);
  2269. this.getData()
  2270. },
  2271. getData() {
  2272. let patientArr = []
  2273. patientArr = JSON.parse(JSON.stringify(this.zone_schedules))
  2274. if (this.activeName == 'first') {
  2275. for (let i = 0; i < patientArr.length; i++) {
  2276. for (let j = 0; j < patientArr[i].schedules.length; j++) {
  2277. if (patientArr[i].schedules.length > 0 && patientArr[i].schedules[j].dialysis_order != null) {
  2278. // 删除元素后改变i的值
  2279. // console.log('候诊区', patientArr[i].schedules[j])
  2280. patientArr[i].schedules.splice(j--, 1)
  2281. }
  2282. }
  2283. }
  2284. let arr1 = []
  2285. if (this.patientStateVal == 0) {
  2286. arr1 = patientArr
  2287. } else if (this.patientStateVal == 1) {
  2288. let arr = []
  2289. arr = patientArr
  2290. for (let i = 0; i < arr.length; i++) {
  2291. for (let j = 0; j < arr[i].schedules.length; j++) {
  2292. if (arr[i].schedules.length > 0 && (arr[i].schedules[j].assessment_before_dislysis == null || (arr[i].schedules[j].assessment_before_dislysis.weight_before == '' && arr[i].schedules[j].assessment_before_dislysis.diastolic_blood_pressure == '' && arr[i].schedules[j].assessment_before_dislysis.systolic_blood_pressure == ''))) {
  2293. // 删除元素后改变i的值
  2294. arr[i].schedules.splice(j--, 1)
  2295. }
  2296. }
  2297. }
  2298. // console.log('执行1', arr)
  2299. arr1 = arr
  2300. } else if (this.patientStateVal == 2) {
  2301. let arr = []
  2302. arr = patientArr
  2303. for (let i = 0; i < arr.length; i++) {
  2304. for (let j = 0; j < arr[i].schedules.length; j++) {
  2305. if (arr[i].schedules.length > 0 && (arr[i].schedules[j].assessment_before_dislysis != null && (arr[i].schedules[j].assessment_before_dislysis.weight_before != 0 || arr[i].schedules[j].assessment_before_dislysis.diastolic_blood_pressure != 0 || arr[i].schedules[j].assessment_before_dislysis.systolic_blood_pressure != 0))) {
  2306. // 删除元素后改变i的值
  2307. arr[i].schedules.splice(j--, 1)
  2308. }
  2309. }
  2310. }
  2311. // console.log('执行2', arr)
  2312. arr1 = arr
  2313. }
  2314. let arr2 = []
  2315. if (this.treatStateVal == 0) {
  2316. arr2 = JSON.parse(JSON.stringify(arr1))
  2317. } else if (this.treatStateVal == 1) {
  2318. let arr = []
  2319. arr = JSON.parse(JSON.stringify(arr1))
  2320. for (let i = 0; i < arr.length; i++) {
  2321. for (let j = 0; j < arr[i].schedules.length; j++) {
  2322. if (arr[i].schedules.length > 0 && (arr[i].schedules[j].prescription != null || arr[i].schedules[j].prescription != null ? arr[i].schedules[j].prescription.creater != 0 : false)) {
  2323. // 删除元素后改变i的值
  2324. arr[i].schedules.splice(j--, 1)
  2325. }
  2326. }
  2327. }
  2328. arr2 = arr
  2329. } else if(this.treatStateVal == 3){
  2330. let arr = []
  2331. arr = JSON.parse(JSON.stringify(arr1))
  2332. for (let i = 0; i < arr.length; i++) {
  2333. for (let j = 0; j < arr[i].schedules.length; j++) {
  2334. if(arr[i].schedules[j].doctor_advice.length == 0){
  2335. arr[i].schedules.splice(j--, 1)
  2336. }
  2337. if(arr[i].schedules && arr[i].schedules[j] && arr[i].schedules[j].doctor_advice){
  2338. let sign = 0
  2339. arr[i].schedules[j].doctor_advice.map(item => {
  2340. if(item.check_state == 1){
  2341. sign++
  2342. }
  2343. })
  2344. if(sign == arr[i].schedules[j].doctor_advice.length && arr[i].schedules[j].doctor_advice.length > 0){
  2345. arr[i].schedules.splice(j--, 1)
  2346. }
  2347. }
  2348. }
  2349. }
  2350. arr2 = arr
  2351. }
  2352. let arr3 = []
  2353. if (this.scheduleStateVal == 0) {
  2354. arr3 = JSON.parse(JSON.stringify(arr2))
  2355. } else {
  2356. let arr = []
  2357. arr = JSON.parse(JSON.stringify(arr2))
  2358. for (let i = 0; i < arr.length; i++) {
  2359. for (let j = 0; j < arr[i].schedules.length; j++) {
  2360. if (this.scheduleStateVal != arr[i].schedules[j].schedule_type) {
  2361. // 删除元素后改变i的值
  2362. arr[i].schedules.splice(j--, 1)
  2363. }
  2364. }
  2365. }
  2366. arr3 = arr
  2367. }
  2368. let arr4 = []
  2369. if (this.zoneVal == 0) {
  2370. arr4 = JSON.parse(JSON.stringify(arr3))
  2371. } else {
  2372. let arr = []
  2373. arr = JSON.parse(JSON.stringify(arr3))
  2374. for (let i = 0; i < arr.length; i++) {
  2375. if (this.zoneVal != arr[i].zone_id) {
  2376. // 删除元素后改变i的值
  2377. arr.splice(i--, 1)
  2378. }
  2379. }
  2380. arr4 = arr
  2381. }
  2382. const newArr = []
  2383. arr4.map(item => {
  2384. newArr.push(...item.schedules)
  2385. })
  2386. if(this.patientStateVal == 1){
  2387. newArr.map(item => {
  2388. item.created_time = item.assessment_before_dislysis.created_time
  2389. })
  2390. newArr.sort(this.compare('created_time'))
  2391. }
  2392. if(this.org_id ==10579 || this.org_id == 0 || this.org_id ==10587 || this.org_id ==10571){
  2393. if(newArr!=null && newArr.length>0){
  2394. for(let i=0;i<newArr.length;i++){
  2395. newArr[i].sort =0
  2396. newArr[i].sort =newArr[i].device_number.sort
  2397. }
  2398. }
  2399. newArr.sort(function(a, b) {
  2400. return a.sort - b.sort;
  2401. });
  2402. }
  2403. // console.log('排序',newArr)
  2404. this.tableData = newArr
  2405. const name = this.$route.query.patient_name
  2406. this.tableData.map((item, index) => {
  2407. if (name == item.patient.name) {
  2408. // if (item.assessment_before_dislysis != null) {
  2409. // this.newTime = parseTime(item.assessment_before_dislysis.created_time, '{h}:{i}')
  2410. // }
  2411. setTimeout(() => {
  2412. this.$refs.tab.setCurrentRow(this.tableData[index])
  2413. }, 10)
  2414. }
  2415. })
  2416. } else if (this.activeName == 'second') {
  2417. for (let i = 0; i < patientArr.length; i++) {
  2418. for (let j = 0; j < patientArr[i].schedules.length; j++) {
  2419. if (patientArr[i].schedules.length > 0 && patientArr[i].schedules[j].dialysis_order == null) {
  2420. // 删除元素后改变i的值
  2421. patientArr[i].schedules.splice(j--, 1)
  2422. }
  2423. }
  2424. }
  2425. let arr1 = []
  2426. // let patientArr =
  2427. if (this.patientStateVal == 0) {
  2428. arr1 = patientArr
  2429. } else if (this.patientStateVal == 1) {
  2430. let arr = []
  2431. arr = patientArr
  2432. for (let i = 0; i < arr.length; i++) {
  2433. for (let j = 0; j < arr[i].schedules.length; j++) {
  2434. if (arr[i].schedules.length > 0 && (arr[i].schedules[j].assessment_before_dislysis == null || (arr[i].schedules[j].assessment_before_dislysis.weight_before == '' && arr[i].schedules[j].assessment_before_dislysis.diastolic_blood_pressure == '' && arr[i].schedules[j].assessment_before_dislysis.systolic_blood_pressure == ''))) {
  2435. // 删除元素后改变i的值
  2436. arr[i].schedules.splice(j--, 1)
  2437. }
  2438. }
  2439. }
  2440. arr1 = arr
  2441. } else if (this.patientStateVal == 2) {
  2442. let arr = []
  2443. arr = patientArr
  2444. for (let i = 0; i < arr.length; i++) {
  2445. for (let j = 0; j < arr[i].schedules.length; j++) {
  2446. if (arr[i].schedules.length > 0 && (arr[i].schedules[j].assessment_before_dislysis != null && (arr[i].schedules[j].assessment_before_dislysis.weight_before != 0 || arr[i].schedules[j].assessment_before_dislysis.diastolic_blood_pressure != 0 || arr[i].schedules[j].assessment_before_dislysis.systolic_blood_pressure != 0))) {
  2447. // 删除元素后改变i的值
  2448. arr[i].schedules.splice(j--, 1)
  2449. }
  2450. }
  2451. }
  2452. arr1 = arr
  2453. } else if (this.patientStateVal == 3) {
  2454. let arr = []
  2455. arr = patientArr
  2456. for (let i = 0; i < arr.length; i++) {
  2457. for (let j = 0; j < arr[i].schedules.length; j++) {
  2458. if (arr[i].schedules.length > 0 && (arr[i].schedules[j].dialysis_order != null && arr[i].schedules[j].dialysis_order.stage != 1)) {
  2459. // 删除元素后改变i的值
  2460. arr[i].schedules.splice(j--, 1)
  2461. }
  2462. }
  2463. }
  2464. arr1 = arr
  2465. } else if (this.patientStateVal == 4) {
  2466. let arr = []
  2467. arr = patientArr
  2468. for (let i = 0; i < arr.length; i++) {
  2469. for (let j = 0; j < arr[i].schedules.length; j++) {
  2470. if (arr[i].schedules.length > 0 && (arr[i].schedules[j].dialysis_order != null && arr[i].schedules[j].dialysis_order.stage != 2)) {
  2471. // 删除元素后改变i的值
  2472. arr[i].schedules.splice(j--, 1)
  2473. }
  2474. }
  2475. }
  2476. arr1 = arr
  2477. }
  2478. let arr2 = []
  2479. if (this.treatStateVal == 0) {
  2480. arr2 = JSON.parse(JSON.stringify(arr1))
  2481. } else if (this.treatStateVal == 2) {
  2482. let arr = []
  2483. arr = JSON.parse(JSON.stringify(arr1))
  2484. for (let i = 0; i < arr.length; i++) {
  2485. for (let j = 0; j < arr[i].schedules.length; j++) {
  2486. if (arr[i].schedules.length > 0 && arr[i].schedules[j].treatment_summary != null && arr[i].schedules[j].treatment_summary.dialysis_summary != '') {
  2487. // 删除元素后改变i的值
  2488. arr[i].schedules.splice(j--, 1)
  2489. }
  2490. }
  2491. }
  2492. arr2 = arr
  2493. } else if(this.treatStateVal == 3){
  2494. let arr = []
  2495. arr = JSON.parse(JSON.stringify(arr1))
  2496. for (let i = 0; i < arr.length; i++) {
  2497. for (let j = 0; j < arr[i].schedules.length; j++) {
  2498. if(arr[i].schedules[j].doctor_advice.length == 0){
  2499. arr[i].schedules.splice(j--, 1)
  2500. }
  2501. if(arr[i].schedules && arr[i].schedules[j] && arr[i].schedules[j].doctor_advice){
  2502. let sign = 0
  2503. arr[i].schedules[j].doctor_advice.map(item => {
  2504. if(item.check_state == 1){
  2505. sign++
  2506. }
  2507. })
  2508. if(sign == arr[i].schedules[j].doctor_advice.length && arr[i].schedules[j].doctor_advice.length > 0){
  2509. arr[i].schedules.splice(j--, 1)
  2510. }
  2511. }
  2512. }
  2513. }
  2514. arr2 = arr
  2515. }
  2516. let arr3 = []
  2517. if (this.scheduleStateVal == 0) {
  2518. arr3 = JSON.parse(JSON.stringify(arr2))
  2519. } else {
  2520. let arr = []
  2521. arr = JSON.parse(JSON.stringify(arr2))
  2522. for (let i = 0; i < arr.length; i++) {
  2523. for (let j = 0; j < arr[i].schedules.length; j++) {
  2524. if (this.scheduleStateVal != arr[i].schedules[j].schedule_type) {
  2525. // 删除元素后改变i的值
  2526. arr[i].schedules.splice(j--, 1)
  2527. }
  2528. }
  2529. }
  2530. arr3 = arr
  2531. }
  2532. let arr4 = []
  2533. if (this.zoneVal == 0) {
  2534. arr4 = JSON.parse(JSON.stringify(arr3))
  2535. } else {
  2536. let arr = []
  2537. arr = JSON.parse(JSON.stringify(arr3))
  2538. for (let i = 0; i < arr.length; i++) {
  2539. if (this.zoneVal != arr[i].zone_id) {
  2540. // 删除元素后改变i的值
  2541. arr.splice(i--, 1)
  2542. }
  2543. }
  2544. arr4 = arr
  2545. }
  2546. const newArr = []
  2547. arr4.map(item => {
  2548. newArr.push(...item.schedules)
  2549. })
  2550. if(this.patientStateVal == 1){
  2551. newArr.map(item => {
  2552. item.created_time = item.assessment_before_dislysis.created_time
  2553. })
  2554. newArr.sort(this.compare('created_time'))
  2555. }
  2556. if(this.org_id == 0 || this.org_id == 10579 || this.org_id ==10587){
  2557. if(newArr!=null && newArr.length>0){
  2558. for(let i=0;i<newArr.length;i++){
  2559. newArr[i].sort =0
  2560. newArr[i].sort =newArr[i].device_number.sort
  2561. }
  2562. }
  2563. newArr.sort(function(a, b) {
  2564. return a.sort - b.sort;
  2565. });
  2566. }
  2567. this.tableData1 = newArr
  2568. const name = this.$route.query.patient_name
  2569. this.tableData1.map((item, index) => {
  2570. if (name == item.patient.name) {
  2571. // if (item.assessment_before_dislysis != null) {
  2572. // this.newTime = parseTime(item.assessment_before_dislysis.created_time, '{h}:{i}')
  2573. // }
  2574. setTimeout(() => {
  2575. this.$refs.tab1.setCurrentRow(this.tableData1[index])
  2576. }, 10)
  2577. }
  2578. })
  2579. }
  2580. },
  2581. compare(property){
  2582. return function(a,b){
  2583. var value1 = a[property];
  2584. var value2 = b[property];
  2585. return value2 - value1;
  2586. }
  2587. },
  2588. getTime(date){
  2589. date = new Date(date * 1000)
  2590. var Y = date.getFullYear() + '-';
  2591. var M = (date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1);
  2592. var D = (date.getDate() < 10 ? '0'+date.getDate() : date.getDate());
  2593. var h = (date.getHours() < 10 ? '0'+date.getHours() : date.getHours());
  2594. var m = (date.getMinutes() < 10 ? '0'+date.getMinutes() : date.getMinutes());
  2595. var s = (date.getSeconds() < 10 ? '0'+date.getSeconds() : date.getSeconds());
  2596. let strDate = h + ':' + m;
  2597. return strDate;
  2598. },
  2599. getTimes(time) {
  2600. return uParseTime(time, '{y}-{m}-{d}')
  2601. },
  2602. refresh(){
  2603. this.requestDialysisSchedules()
  2604. },
  2605. websocketSend(data) {
  2606. try {
  2607. this.websocket.send(JSON.stringify(data))
  2608. } catch (error) {
  2609. this.showError = true;
  2610. this.showIndex = 4;
  2611. this.errorInfo = "网络异常,请稍后退出重试!";
  2612. }
  2613. },
  2614. websocketMess() {
  2615. this.websocket.onmessage = e => {
  2616. let res = JSON.parse(e.data);
  2617. // let res = re.data;
  2618. // console.log('res3333333333',res)
  2619. if(res.channel == 'queue/join'){
  2620. let timeType = null
  2621. if(this.scheduleStateVal == 1){
  2622. timeType = 1
  2623. }else if(this.scheduleStateVal == 2){
  2624. timeType = 2
  2625. }else{
  2626. if(new Date().getHours() < 10){
  2627. timeType = 1
  2628. }else if(new Date().getHours() >= 10){
  2629. timeType = 2
  2630. }
  2631. }
  2632. let fisrtQueueInfo = []
  2633. this.newFisrtQueueInfo = res.data.fisrtQueueInfo
  2634. this.queueConfig = res.data.queueConfig
  2635. if(res.data.fisrtQueueInfo != null){
  2636. if(timeType == 1){
  2637. fisrtQueueInfo = res.data.fisrtQueueInfo.morning
  2638. if(fisrtQueueInfo.create_time){
  2639. fisrtQueueInfo.create_time = moment(parseInt(fisrtQueueInfo.create_time) * 1000).format('HH:mm')
  2640. }
  2641. }else if(timeType == 2){
  2642. fisrtQueueInfo = res.data.fisrtQueueInfo.afternoon
  2643. if(fisrtQueueInfo.create_time){
  2644. fisrtQueueInfo.create_time = moment(parseInt(fisrtQueueInfo.create_time) * 1000).format('HH:mm')
  2645. }
  2646. }
  2647. }
  2648. this.fisrtQueueInfo = fisrtQueueInfo
  2649. // this.fisrtQueueInfo = res.data.fisrtQueueInfo
  2650. let arr = res.data.patientQueueList.data
  2651. let waitingCalledArr = []
  2652. let calledArr = []
  2653. arr.map(item => {
  2654. if(item.status == 1){
  2655. // item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
  2656. waitingCalledArr.push(item)
  2657. }else if(item.status == 2){
  2658. // item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
  2659. calledArr.push(item)
  2660. }
  2661. })
  2662. this.waitingCalled = waitingCalledArr
  2663. this.called = calledArr
  2664. }else if(res.channel == 'allQueueList'){
  2665. let arr = res.data.queue_list.data
  2666. let waitingCalledArr = []
  2667. let calledArr = []
  2668. arr.map(item => {
  2669. if(item.status == 1){
  2670. // item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
  2671. waitingCalledArr.push(item)
  2672. }else if(item.status == 2){
  2673. // item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
  2674. calledArr.push(item)
  2675. }
  2676. })
  2677. this.waitingCalled = waitingCalledArr
  2678. this.called = calledArr
  2679. }else if(res.channel == 'patientCallInfo'){
  2680. res.data.patientInfo.create_time = moment(res.data.patientInfo.create_time * 1000).format('HH:mm')
  2681. this.fisrtQueueInfo = res.data.patientInfo
  2682. }else if(res.channel == 'fisrtQueueInfo'){
  2683. if(this.scheduleStateVal == 1){
  2684. timeType = 1
  2685. }else if(this.scheduleStateVal == 2){
  2686. timeType = 2
  2687. }else{
  2688. if(new Date().getHours() < 10){
  2689. timeType = 1
  2690. }else if(new Date().getHours() >= 10){
  2691. timeType = 2
  2692. }
  2693. }
  2694. let fisrtQueueInfo = []
  2695. this.newFisrtQueueInfo = res.data.patientInfo
  2696. if(res.data.patientInfo != null){
  2697. if(timeType == 1){
  2698. fisrtQueueInfo = res.data.patientInfo.morning
  2699. if(fisrtQueueInfo.create_time){
  2700. fisrtQueueInfo.create_time = moment(parseInt(fisrtQueueInfo.create_time) * 1000).format('HH:mm')
  2701. }
  2702. }else if(timeType == 2){
  2703. fisrtQueueInfo = res.data.patientInfo.afternoon
  2704. if(fisrtQueueInfo.create_time){
  2705. fisrtQueueInfo.create_time = moment(parseInt(fisrtQueueInfo.create_time) * 1000).format('HH:mm')
  2706. }
  2707. }
  2708. }
  2709. this.fisrtQueueInfo = fisrtQueueInfo
  2710. }
  2711. }
  2712. },
  2713. call(){
  2714. // console.log('patient_id',patient_id)
  2715. let org_id = parseInt(sessionStorage.getItem("org_id"));
  2716. let admin_user_id = parseInt(sessionStorage.getItem("admin_user_id"));
  2717. axios.get('/api/index/callpatient?org_id=' + org_id + '&patient_id=' + this.patient_id + '&admin_user_id=' + admin_user_id).then(res => {
  2718. // let patientArr = res.data.queue_list.data
  2719. // this.patientArr = patientArr
  2720. // this.$emit('child-event',this.patientArr)
  2721. if(res.data.data.patientInfo == null){
  2722. this.$message.error('已经是最后一位了');
  2723. return
  2724. }
  2725. if(res.data.code == 200){
  2726. this.$message({
  2727. message: res.data.msg,
  2728. type: 'success'
  2729. });
  2730. this.curPatient = res.data.data.patientInfo
  2731. let arr = []
  2732. let newArr = []
  2733. this.zone_schedules.map(item => {
  2734. newArr.push(...item.schedules)
  2735. })
  2736. newArr.map(item => {
  2737. arr.push(item.patient_id)
  2738. })
  2739. if(arr.indexOf(parseInt(res.data.data.patientInfo.patient_id)) > -1){
  2740. this.showView = false
  2741. this.$router.push({
  2742. path: '/dialysis/details',
  2743. query: {
  2744. patient_id: parseInt(res.data.data.patientInfo.patient_id),
  2745. date: this.$route.query.date,
  2746. patient_name: res.data.data.patientInfo.patient_name,
  2747. mode_id:newArr[arr.indexOf(parseInt(res.data.data.patientInfo.patient_id))].mode_id,
  2748. curPatientTime:res.data.data.patientInfo.create_time,
  2749. showView:false
  2750. }
  2751. })
  2752. }else {
  2753. this.showView = true
  2754. this.$router.push({
  2755. path: '/dialysis/details',
  2756. query: {
  2757. patient_id: parseInt(res.data.data.patientInfo.patient_id),
  2758. date: this.$route.query.date,
  2759. patient_name: res.data.data.patientInfo.patient_name,
  2760. mode_id:this.$route.query.mode_id,
  2761. curPatientTime:res.data.data.patientInfo.create_time,
  2762. showView:true
  2763. }
  2764. })
  2765. }
  2766. }
  2767. })
  2768. },
  2769. next(){
  2770. let schedule_type = null
  2771. if(new Date().getHours() < 11){
  2772. schedule_type = 1
  2773. }else {
  2774. schedule_type = 2
  2775. }
  2776. let org_id = parseInt(sessionStorage.getItem("org_id"));
  2777. let admin_user_id = parseInt(sessionStorage.getItem("admin_user_id"));
  2778. axios.get('/api/index/nextcall?org_id=' + org_id + '&patient_id=' + this.patient_id + '&admin_user_id=' + admin_user_id + '&schedule_type=' + schedule_type).then(res => {
  2779. if(res.data.data.patientInfo == null){
  2780. this.$message.error('已经是最后一位了');
  2781. return
  2782. }
  2783. if(res.data.code == 200){
  2784. this.$message({
  2785. message: res.data.msg,
  2786. type: 'success'
  2787. });
  2788. this.curPatient = res.data.data.patientInfo
  2789. let arr = []
  2790. let newArr = []
  2791. this.zone_schedules.map(item => {
  2792. newArr.push(...item.schedules)
  2793. })
  2794. newArr.map(item => {
  2795. arr.push(item.patient_id)
  2796. })
  2797. if(arr.indexOf(parseInt(res.data.data.patientInfo.patient_id)) > -1){
  2798. this.showView = false
  2799. this.$router.push({
  2800. path: '/dialysis/details',
  2801. query: {
  2802. patient_id: parseInt(res.data.data.patientInfo.patient_id),
  2803. date: this.$route.query.date,
  2804. patient_name: res.data.data.patientInfo.patient_name,
  2805. mode_id:newArr[arr.indexOf(parseInt(res.data.data.patientInfo.patient_id))].mode_id,
  2806. curPatientTime:res.data.data.patientInfo.create_time,
  2807. showView:false
  2808. }
  2809. })
  2810. }else {
  2811. this.showView = true
  2812. this.$router.push({
  2813. path: '/dialysis/details',
  2814. query: {
  2815. patient_id: parseInt(res.data.data.patientInfo.patient_id),
  2816. date: this.$route.query.date,
  2817. patient_name: res.data.data.patientInfo.patient_name,
  2818. mode_id:this.$route.query.mode_id,
  2819. curPatientTime:res.data.data.patientInfo.create_time,
  2820. showView:true
  2821. }
  2822. })
  2823. }
  2824. }
  2825. })
  2826. },
  2827. getDates(time){
  2828. return moment(time * 1000).format('HH:mm:ss')
  2829. },
  2830. printAction: function() {
  2831. const style = '@media print {.signPrint{margin-left:30px;} .print_main_content { background-color: white; width:960px; margin:0 auto; padding: 0 0 20px 0; } .order_title_panl { text-align: center; } .main_title { font-size: 18px; line-height: 40px; font-weight: 500; } .table_panel { } .table { width: 100%; border: 1px solid; border-collapse: collapse; padding: 2px; } thead tr td { border: 1px solid; text-align: center; font-size: 20px; padding: 15px 5px; } tbody tr td { border: 1px solid; text-align: center; font-size: 18px; padding: 10px 5px; } .proj { padding: 5px 0; text-align: left; } .proj_title { font-size: 16px; font-weight: 500; line-height: 25px; } .proj_item { font-size: 15px; line-height: 20px; } .zone_name { font-weight: 500; } .printCell span{display: inline-block;width: 180px;} @page {margin-top:10px;}}'
  2832. const style1 = '@page {margin-top:10px;} @media print{}'
  2833. printJS({
  2834. printable: 'print_content',
  2835. type: 'html',
  2836. documentTitle: '',
  2837. style: style1,
  2838. scanStyles: false
  2839. })
  2840. },
  2841. getInitPrintData(){
  2842. const loading = this.$loading({
  2843. lock: true,
  2844. text: 'Loading',
  2845. spinner: 'el-icon-loading',
  2846. background: 'rgba(0, 0, 0, 0.7)'
  2847. })
  2848. var params = {
  2849. patient_id:this.$route.query.patient_id,
  2850. record_date:this.$route.query.date,
  2851. }
  2852. getInitPrintData(params).then(response=>{
  2853. if(response.data.state == 1){
  2854. var list = response.data.data.list
  2855. console.log("listwowoowowowowow",list)
  2856. var assessmentAfterDislysis = response.data.data.assessmentAfterDislysis
  2857. this.printList = list
  2858. this.assessmentAfterDislysis = assessmentAfterDislysis
  2859. if(this.org_id ==10469){
  2860. this.centerDialogVisible = true
  2861. }else{
  2862. this.startVisibility = true
  2863. }
  2864. loading.close()
  2865. }
  2866. })
  2867. },
  2868. getModeId(val){
  2869. var name =""
  2870. if(val == 1){
  2871. name ="HD"
  2872. }
  2873. if(val == 2){
  2874. name ="HDF"
  2875. }
  2876. if(val == 3){
  2877. name ="HD+HP"
  2878. }
  2879. if(val == 4){
  2880. name ="HP"
  2881. }
  2882. if(val == 5){
  2883. name ="HF"
  2884. }
  2885. if(val == 6){
  2886. name ="SCUF"
  2887. }
  2888. if(val == 7){
  2889. name ="IUF"
  2890. }
  2891. if(val == 8){
  2892. name ="IUF"
  2893. }
  2894. if(val == 9){
  2895. name ="HFHD+HP"
  2896. }
  2897. if(val == 10){
  2898. name ="HFHD+HP"
  2899. }
  2900. if(val == 11){
  2901. name ="HFR"
  2902. }
  2903. if(val == 12){
  2904. name ="HDF+HP"
  2905. }
  2906. if(val == 13){
  2907. name ="CRRT"
  2908. }
  2909. if(val == 14){
  2910. name ="腹水回输"
  2911. }
  2912. if(val == 19){
  2913. name ="IUF+HD"
  2914. }
  2915. if(val == 20){
  2916. name ="UF"
  2917. }
  2918. if(val == 21){
  2919. name ="HD+"
  2920. }
  2921. if(val == 22){
  2922. name ="血浆胆红素吸附+HDF"
  2923. }
  2924. if(val == 23){
  2925. name ="血浆胆红素吸附"
  2926. }
  2927. if(val == 24){
  2928. name ="I-HDF"
  2929. }
  2930. if(val == 25){
  2931. name ="HD高通"
  2932. }
  2933. if(val == 26){
  2934. name ="CVVH"
  2935. }
  2936. if(val == 27){
  2937. name ="CVVHD"
  2938. }
  2939. if(val == 28){
  2940. name ="CVVHDF"
  2941. }
  2942. if(val == 29){
  2943. name ="PE"
  2944. }
  2945. if(val == 30){
  2946. name ="血浆胆红素吸附+HP"
  2947. }
  2948. if(val == 31){
  2949. name ="HPD"
  2950. }
  2951. if(val == 32){
  2952. name ="HDP"
  2953. }
  2954. if(val == 33){
  2955. name ="HDP"
  2956. }
  2957. if(val == 33){
  2958. name ="HFD"
  2959. }
  2960. if(val == 34){
  2961. name ="HDF100"
  2962. }
  2963. if(val == 35){
  2964. name ="HDF600"
  2965. }
  2966. if(val == 36){
  2967. name ="HDF800"
  2968. }
  2969. if(val == 37){
  2970. name ="HDF1000"
  2971. }
  2972. return name
  2973. },
  2974. getBloodAccess(id){
  2975. var name = ""
  2976. for(let i=0;i<this.blood_access_part_opera.length;i++){
  2977. if(id == this.blood_access_part_opera[i].id){
  2978. name = this.blood_access_part_opera[i].name
  2979. }
  2980. }
  2981. return name
  2982. },
  2983. // 透析历史
  2984. history_click(){
  2985. this.getPatientDialysisRecordList()
  2986. // this.getmonth(this.time_value2)
  2987. // console.log('time_value',moment(this.time_value2).format('YYYY-MM-DD'));
  2988. },
  2989. getPatientDialysisRecordList(){
  2990. var params= {
  2991. patient_id:this.$route.query.patient_id,
  2992. start_time:this.start_time,
  2993. end_time:this.end_time,
  2994. }
  2995. console.log('tttt',params);
  2996. getPatientDialysisRecordList(params).then(response=>{
  2997. if(response.data.state == 1){
  2998. var list = response.data.data.list
  2999. this.historyclick =true
  3000. if(list!=null && list.length>0){
  3001. for(let i=0;i<list.length;i++){
  3002. list[i].order_date =""
  3003. if(this.org_id ==9538 || this.org_id ==10101||this.org_id ==10353 ){
  3004. list[i].order_date = this.getOrderTime(list[i].dialysis_date)
  3005. list[i].schedual_type_name= list[i].schedual_type
  3006. }else{
  3007. list[i].order_date = this.getOrderTime(list[i].schedule_date)
  3008. list[i].schedual_type_name= list[i].schedule_type
  3009. }
  3010. }
  3011. }
  3012. console.log("list------",list)
  3013. this.orderList = []
  3014. this.orderList = list
  3015. }
  3016. })
  3017. },
  3018. // 获取每个月的第一天和最后一天
  3019. getmonth(val){
  3020. // const months= new Date(val).getMonth()
  3021. // let startTime = moment().month(months).startOf('month').format('YYYY-MM-DD')
  3022. // // //某月最后一天
  3023. // let endTime = moment().month(months).endOf('month').format('YYYY-MM-DD')
  3024. // this.startTime = startTime
  3025. // this.endTime = endTime
  3026. // console.log('time_value333333',this.startTime,this.endTime);
  3027. },
  3028. getOrderTime(val){
  3029. // console.log('77778888',val,this.dialysis_date=uParseTime(val, "{y}-{m}-{d}"));
  3030. if (val < 0) {
  3031. return "";
  3032. }
  3033. if (val == "") {
  3034. return "";
  3035. } else {
  3036. return uParseTime(val, "{y}-{m}-{d}");
  3037. }
  3038. },
  3039. viewDayWork(val){
  3040. const starttime = moment(this.time_value).format('YYYY-MM-DD')
  3041. console.log('eeeeeeee',starttime);
  3042. const len = (val.target.innerText).split(' ')
  3043. console.log("val33333333333333444",len)
  3044. if(val.target.innerText == '下个月'){
  3045. this.start_time = moment(this.time_value).startOf('month').format('YYYY-MM-DD')
  3046. this.end_time = moment(this.time_value).endOf('month').format('YYYY-MM-DD')
  3047. console.log('gggggggg',this.start_time,this.end_time);
  3048. this.getPatientDialysisRecordList()
  3049. }else if(val.target.innerText == '上个月'){
  3050. this.start_time = moment(this.time_value).startOf('month').format('YYYY-MM-DD')
  3051. this.end_time = moment(this.time_value).endOf('month').format('YYYY-MM-DD')
  3052. console.log('gggggggg',this.start_time,this.end_time);
  3053. this.getPatientDialysisRecordList()
  3054. }else if(val.target.innerText =='今天'){
  3055. this.start_time = moment(this.time_value).startOf('month').format('YYYY-MM-DD')
  3056. this.end_time = moment(this.time_value).endOf('month').format('YYYY-MM-DD')
  3057. console.log('gggggggg',this.start_time,this.end_time);
  3058. this.getPatientDialysisRecordList()
  3059. }else{
  3060. // console.log('4444',this.orderList);
  3061. if(len.length>1){
  3062. var patient_id = this.$route.query.patient_id
  3063. var start_time = this.timestamp(starttime)
  3064. this.$router.push({
  3065. path: "/dialysis/details",
  3066. query: { patient_id:patient_id , date: start_time}
  3067. });
  3068. this.history_click = false
  3069. }else{
  3070. this.time_value
  3071. }
  3072. }
  3073. },
  3074. timestamp(start_time) {
  3075. // 使用 Date 对象和它的 getTime 方法将日期字符串转换为时间戳
  3076. return new Date(start_time).getTime()/1000 - 28800;
  3077. }
  3078. },
  3079. watch:{
  3080. time_value:{
  3081. handler(newValue,oldValue){
  3082. console.log("newValue----------",newValue)
  3083. // this.initData()
  3084. this.time_value = newValue
  3085. // this.getmonth(this.time_value)
  3086. this.start_time = moment(this.time_value).startOf('month').format('YYYY-MM-DD')
  3087. this.end_time = moment(this.time_value).endOf('month').format('YYYY-MM-DD')
  3088. // this.start_time = moment().month(months).startOf('month').format('YYYY-MM-DD')
  3089. // this.end_time = moment().month(months).endOf('month').format('YYYY-MM-DD')
  3090. // console.log('rrrrr',this.start_time,this.end_time);
  3091. // this.end_time = moment(oldValue).format('YYYY-MM-DD')
  3092. }
  3093. }
  3094. }
  3095. }
  3096. </script>
  3097. <style style="stylesheet/scss" lang="scss" scoped>
  3098. .details-bg {
  3099. background: #fff;
  3100. margin: 0 15px;
  3101. }
  3102. .printForm {
  3103. .title {
  3104. font-size: 30px;
  3105. font-weight: 500;
  3106. text-align: center;
  3107. line-height: 60px;
  3108. }
  3109. .info {
  3110. ul {
  3111. display: -webkit-box;
  3112. display: -moz-box;
  3113. display: -ms-flexbox;
  3114. display: -webkit-flex;
  3115. display: flex;
  3116. align-items: center;
  3117. -moz-box-sizing: border-box;
  3118. -webkit-box-sizing: border-box;
  3119. -o-box-sizing: border-box;
  3120. -ms-box-sizing: border-box;
  3121. box-sizing: border-box;
  3122. -webkit-justify-content: space-around;
  3123. -moz-justify-content: space-around;
  3124. -ms-justify-content: space-around;
  3125. -o-justify-content: space-around;
  3126. justify-content: space-around;
  3127. li {
  3128. display: flex;
  3129. box-sizing: border-box;
  3130. justify-content: space-around;
  3131. // .name {
  3132. // }
  3133. .InputBox {
  3134. padding: 0;
  3135. border: none;
  3136. border-bottom: 1px #e5e5e5 solid;
  3137. width: 60px;
  3138. outline: none;
  3139. }
  3140. }
  3141. }
  3142. }
  3143. .printTable {
  3144. tr {
  3145. padding: 2px;
  3146. th {
  3147. padding: 6px 4px;
  3148. }
  3149. td {
  3150. padding: 6px 4px;
  3151. }
  3152. }
  3153. }
  3154. }
  3155. .loadingBox{
  3156. display: flex;
  3157. .patientBox{
  3158. background: #fff;
  3159. .touxi_cishu{
  3160. display: inline-block;
  3161. border: 1px solid #409eff;
  3162. width: 30px;
  3163. text-align: center;
  3164. border-radius: 10px;
  3165. }
  3166. }
  3167. .tip1{
  3168. background: #4fc7cb;
  3169. border-radius: 5px;
  3170. text-align: center;
  3171. font-size: 12px;
  3172. display: inline-block;
  3173. width: 60px;
  3174. // height: 23px;
  3175. // line-height: 23px;
  3176. color: #fff;
  3177. }
  3178. .tip2{
  3179. background: #ee8556;
  3180. border-radius: 5px;
  3181. text-align: center;
  3182. font-size: 12px;
  3183. display: inline-block;
  3184. width: 60px;
  3185. // height: 23px;
  3186. // line-height: 23px;
  3187. color: #fff;
  3188. }
  3189. .tip3{
  3190. background: #409eff;
  3191. border-radius: 5px;
  3192. text-align: center;
  3193. font-size: 12px;
  3194. display: inline-block;
  3195. width: 60px;
  3196. color: #fff;
  3197. }
  3198. .tip4{
  3199. background: #a8b3ba;
  3200. border-radius: 5px;
  3201. text-align: center;
  3202. font-size: 12px;
  3203. display: inline-block;
  3204. width: 60px;
  3205. color: #fff;
  3206. }
  3207. .tip5{
  3208. background: #7bce91;
  3209. border-radius: 5px;
  3210. text-align: center;
  3211. font-size: 12px;
  3212. display: inline-block;
  3213. width: 60px;
  3214. color: #fff;
  3215. }
  3216. }
  3217. .history{
  3218. .touxipl{
  3219. display: inline-block;
  3220. width: 60%;
  3221. border-bottom:1px solid gray;
  3222. }
  3223. }
  3224. </style>
  3225. <style lang="scss">
  3226. .loadingBox{
  3227. .el-loading-spinner{
  3228. top:10%;
  3229. }
  3230. .el-button--small, .el-button--small.is-round{
  3231. padding:9px 10px;
  3232. }
  3233. .el-date-editor{
  3234. .el-input__inner{
  3235. padding-right:0px;
  3236. }
  3237. }
  3238. .el-table td, .el-table th{
  3239. text-align: center;
  3240. }
  3241. .el-table td{
  3242. height: 44px !important;
  3243. }
  3244. .el-table .cell{
  3245. padding: 0;
  3246. }
  3247. }
  3248. .history{
  3249. .el-dialog{
  3250. .el-dialog__header{
  3251. padding: 10px 10px 10px;
  3252. background-color: #409eff;
  3253. .el-dialog__title{
  3254. color: white;
  3255. font-size: 15px;
  3256. }
  3257. .el-dialog__headerbtn{
  3258. position: absolute;
  3259. top: 12px;
  3260. right: 20px;
  3261. .el-dialog__close{
  3262. color: white;
  3263. }
  3264. }
  3265. }
  3266. .el-dialog__body{
  3267. padding: 15px 10px
  3268. }
  3269. }
  3270. }
  3271. .Calendar{
  3272. color: #000 !important;
  3273. width: 100% !important;
  3274. max-width: 839px !important;
  3275. .wh_content_all{
  3276. background-color: #fff;
  3277. .wh_top_changge{
  3278. .wh_jiantou1{
  3279. border-top: 2px solid #000;
  3280. border-left: 2px solid #000;
  3281. }
  3282. .wh_content_li{
  3283. color: #000;
  3284. }
  3285. .wh_jiantou2{
  3286. border-top: 2px solid #000;
  3287. border-right: 2px solid #000;
  3288. }
  3289. }
  3290. .wh_content_item{
  3291. text-align: center;
  3292. color: #000 ;
  3293. height: 50px;
  3294. .wh_top_tag{
  3295. width: 100%;
  3296. height: 50px ;
  3297. line-height: 50px;
  3298. margin: 0;
  3299. display: flex;
  3300. justify-content: center;
  3301. align-items: center;
  3302. text-align: center
  3303. }
  3304. .wh_isToday{
  3305. border: 1px solid #409eff;
  3306. background: #409eff !important;
  3307. color: #fff;
  3308. border-radius: 0;
  3309. }
  3310. .wh_chose_day{
  3311. border: 1px solid #409eff;
  3312. background: #fff !important;
  3313. color: #409eff;
  3314. border-radius: 0;
  3315. }
  3316. .wh_item_date{
  3317. width: 100%;
  3318. height: 50px;
  3319. line-height: 50px;
  3320. margin: 0;
  3321. display: flex;
  3322. justify-content: center;
  3323. align-items: center;
  3324. }
  3325. .wh_item_date:hover {
  3326. background: #fff;
  3327. cursor: pointer;
  3328. }
  3329. }
  3330. }
  3331. }
  3332. </style>