Elizabeth's proactive approach involves introducing urinal toilet attachment , an ingenious concept that optimizes space and functionality.

index.vue 84KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306
  1. <template>
  2. <div class="main-contain">
  3. <div class="position">
  4. <bread-crumb :crumbs="crumbs"></bread-crumb>
  5. <div class="print" style="float:left;">
  6. <el-button
  7. v-if="queueConfig.txxqyxs == 1"
  8. size="small"
  9. type="primary"
  10. @click="call"
  11. >叫号</el-button
  12. >
  13. <el-button
  14. v-if="queueConfig.txxqyxs == 1"
  15. size="small"
  16. type="primary"
  17. @click="next"
  18. >下一位</el-button
  19. >
  20. <el-button
  21. size="small"
  22. type="primary"
  23. @click="printOrderOne"
  24. icon="el-icon-printer"
  25. >打印上机单</el-button
  26. >
  27. <el-button
  28. size="small"
  29. type="primary"
  30. @click="printOrder"
  31. icon="el-icon-printer"
  32. >打印</el-button
  33. >
  34. </div>
  35. </div>
  36. <div
  37. class="loadingBox"
  38. v-loading="loading"
  39. element-loading-text="拼命加载中"
  40. element-loading-spinner="el-icon-loading"
  41. element-loading-background="rgba(0, 0, 0, 0.8)"
  42. >
  43. <div class="patientBox" style="width:300px;padding-left:10px;position: relative;">
  44. <el-button
  45. style="position: absolute;right:0;top:2px;z-index:10"
  46. size="small"
  47. type="primary"
  48. @click="refresh"
  49. >刷新</el-button>
  50. <el-tabs v-model="activeName" @tab-click="handleClick">
  51. <el-tab-pane label="候诊区" name="first">
  52. <div class="cell clearfix" style="margin-bottom:10px;">
  53. <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>
  54. <el-input size="small" style="width:25%;" @keyup.enter.native='searchAction' v-model.trim="search_input" class="filter-item"/>
  55. <el-button size="small" class="filter-item" type="primary" style="margin-right:20px;" @click="searchAction">搜索</el-button>
  56. </div>
  57. <div class="cell clearfix" style="margin-bottom:10px;display:flex;">
  58. <el-select v-model="patientStateVal" placeholder="全部患者状态" style="margin-right:10px;" @change="handleStateChange">
  59. <el-option
  60. v-for="item in patient_state"
  61. :key="item.value"
  62. :label="item.label"
  63. :value="item.value">
  64. </el-option>
  65. </el-select>
  66. <el-select v-model="treatStateVal" placeholder="全部治疗状态" style="margin-right:20px;" @change="handleTreatChange">
  67. <el-option
  68. v-for="item in treat_state"
  69. :key="item.value"
  70. :label="item.label"
  71. :value="item.value">
  72. </el-option>
  73. </el-select>
  74. </div>
  75. <div class="cell clearfix" style="margin-bottom:10px;display:flex;">
  76. <el-select v-model="scheduleStateVal" placeholder="班次" style="margin-right:10px;" @change="handletimeType">
  77. <el-option
  78. v-for="item in schedule_options"
  79. :key="item.value"
  80. :label="item.label"
  81. :value="item.value">
  82. </el-option>
  83. </el-select>
  84. <el-select v-model="zoneVal" placeholder="分区" style="margin-right:20px;" @change="handleZoneChange">
  85. <el-option
  86. v-for="item in zone_options"
  87. :key="item.id"
  88. :label="item.text"
  89. :value="item.id">
  90. </el-option>
  91. </el-select>
  92. </div>
  93. <div style="padding-right:20px;">
  94. <el-table
  95. ref="tab"
  96. @row-click="changePatient"
  97. highlight-current-row
  98. :data="tableData"
  99. height="500"
  100. border
  101. style="width: 100%">
  102. <el-table-column
  103. prop="date"
  104. label="患者"
  105. >
  106. <template slot-scope="scope">
  107. {{ scope.row.patient.name }}
  108. <span v-if="scope.row.assessment_before_dislysis && patientStateVal == 1">
  109. ({{ getTime(scope.row.assessment_before_dislysis.created_time) }})
  110. </span>
  111. </template>
  112. </el-table-column>
  113. <el-table-column
  114. prop="name"
  115. label="状态"
  116. >
  117. <template slot-scope="scope">
  118. <div style="display:flex;align-items:center;justify-content:space-around;">
  119. <span class="tip1" v-if="scope.row.prescription == null || scope.row.prescription.creater == 0">
  120. 待开处方
  121. </span>
  122. <span class="tip2" v-if="scope.row.assessment_before_dislysis == null || scope.row.assessment_before_dislysis.weight_before == ''">
  123. 待称重
  124. </span>
  125. </div>
  126. </template>
  127. </el-table-column>
  128. </el-table>
  129. </div>
  130. </el-tab-pane>
  131. <el-tab-pane label="透析区" name="second">
  132. <div class="cell clearfix" style="margin-bottom:10px;">
  133. <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>
  134. <el-input size="small" style="width:25%;" @keyup.enter.native='searchAction' v-model.trim="search_input" class="filter-item"/>
  135. <el-button size="small" class="filter-item" style="margin-right:20px;" type="primary" @click="searchAction">搜索</el-button>
  136. </div>
  137. <div class="cell clearfix" style="margin-bottom:10px;display:flex;">
  138. <el-select v-model="patientStateVal" placeholder="全部患者状态" style="margin-right:10px;" @change="handleStateChange">
  139. <el-option
  140. v-for="item in patient_state"
  141. :key="item.value"
  142. :label="item.label"
  143. :value="item.value">
  144. </el-option>
  145. </el-select>
  146. <el-select v-model="treatStateVal" placeholder="全部治疗状态" style="margin-right:20px;" @change="handleTreatChange">
  147. <el-option
  148. v-for="item in treat_state"
  149. :key="item.value"
  150. :label="item.label"
  151. :value="item.value">
  152. </el-option>
  153. </el-select>
  154. </div>
  155. <div class="cell clearfix" style="margin-bottom:10px;display:flex;">
  156. <el-select v-model="scheduleStateVal" placeholder="班次" style="margin-right:10px;" @change="handletimeType">
  157. <el-option
  158. v-for="item in schedule_options"
  159. :key="item.value"
  160. :label="item.label"
  161. :value="item.value">
  162. </el-option>
  163. </el-select>
  164. <el-select v-model="zoneVal" placeholder="分区" style="margin-right:20px;" @change="handleZoneChange">
  165. <el-option
  166. v-for="item in zone_options"
  167. :key="item.id"
  168. :label="item.text"
  169. :value="item.id">
  170. </el-option>
  171. </el-select>
  172. </div>
  173. <div style="padding-right:20px;">
  174. <el-table
  175. ref="tab1"
  176. @row-click="changePatient"
  177. highlight-current-row
  178. :data="tableData1"
  179. height="500"
  180. border
  181. style="width: 100%">
  182. <el-table-column
  183. prop="date"
  184. label="患者"
  185. >
  186. <template slot-scope="scope">
  187. {{ scope.row.patient.name }}
  188. <span v-if="scope.row.assessment_before_dislysis && patientStateVal == 1">
  189. ({{ getTime(scope.row.assessment_before_dislysis.created_time) }})
  190. </span>
  191. </template>
  192. </el-table-column>
  193. <el-table-column
  194. prop="name"
  195. label="状态"
  196. >
  197. <template slot-scope="scope">
  198. <div style="display:flex;align-items:center;justify-content:space-around;">
  199. <span class="tip3" v-if="scope.row.dialysis_order ? scope.row.dialysis_order.stage == 1 : false">
  200. 已上机
  201. </span>
  202. <span class="tip4" v-if="scope.row.dialysis_order ? scope.row.dialysis_order.stage == 2 : false">
  203. 已下机
  204. </span>
  205. <span class="tip5" v-if="scope.row.treatment_summary == null || scope.row.treatment_summary.dialysis_summary == ''">
  206. 待开小结
  207. </span>
  208. </div>
  209. </template>
  210. </el-table-column>
  211. </el-table>
  212. </div>
  213. </el-tab-pane>
  214. </el-tabs>
  215. <el-dialog
  216. :visible.sync="startVisibility"
  217. :close-on-click-modal="false"
  218. :close-on-press-escape="false"
  219. :show-close="false"
  220. width="30%"
  221. >
  222. <el-button
  223. size="small"
  224. icon="el-icon-printer"
  225. type="primary"
  226. @click="printAction"
  227. style="float:right"
  228. >打印</el-button
  229. >
  230. <div id="print_content">
  231. <div class="print_main_content">
  232. <div class="table_panel">
  233. <div v-for="(main_collection,index) in printList" :key="index">
  234. <div class="signPrint" style="font-size:16px;">
  235. <div style="margin-left:50px;">姓名:
  236. <span>{{main_collection.patient.name}} </span>
  237. ({{ main_collection.patient.dialysis_no }},{{ main_collection.patient.age }}岁)
  238. </div>
  239. <div class="printCell">
  240. <span>
  241. 床号:{{ main_collection.number.number }}
  242. <span style="width:auto;" v-if="main_collection.schedule_type == 1">上午</span>
  243. <span style="width:auto;" v-if="main_collection.schedule_type == 2">下午</span>
  244. <span style="width:auto;" v-if="main_collection.schedule_type == 3">晚上</span>
  245. </span>
  246. <span>{{ printDate }}</span>
  247. </div>
  248. <div class="printCell">
  249. <span>干体重:{{main_collection.assessmentbefor.dry_weight}}Kg</span>
  250. <span>抗凝剂:{{ main_collection.dialysissolution.anticoagulant ? anticoagulants_confit[main_collection.dialysissolution.anticoagulant].name : ''}}</span>
  251. </div>
  252. <div class="printCell">
  253. <span>净重值:{{ main_collection.assessmentbefor.weight_before - main_collection.assessmentbefor.additional_weight }}Kg</span>
  254. 首剂:<span v-if="main_collection.dialysissolution.anticoagulant == 1">{{main_collection.dialysissolution.anticoagulant_shouji}} mg</span>
  255. <span v-if="main_collection.dialysissolution.anticoagulant == 2">
  256. {{main_collection.dialysissolution.anticoagulant_shouji}}mg
  257. </span>
  258. <span v-if="main_collection.dialysissolution.anticoagulant == 3">
  259. {{main_collection.dialysissolution.anticoagulant_shouji}}iu
  260. </span>
  261. <span v-if="main_collection.dialysissolution.anticoagulant == 4">
  262. {{main_collection.dialysissolution.anticoagulant_shouji}}mg
  263. </span>
  264. <span v-if="main_collection.dialysissolution.anticoagulant == 5">
  265. {{main_collection.dialysissolution.anticoagulant_shouji}} mg
  266. </span>
  267. <span v-if="main_collection.dialysissolution.anticoagulant == 6">
  268. {{main_collection.dialysissolution.anticoagulant_shouji}}iu
  269. </span>
  270. <span v-if="main_collection.dialysissolution.anticoagulant == 7">
  271. {{main_collection.dialysissolution.anticoagulant_shouji}}iu
  272. </span>
  273. <span v-if="main_collection.dialysissolution.anticoagulant == 8">
  274. {{main_collection.dialysissolution.anticoagulant_shouji}}iu
  275. </span>
  276. <span v-if="main_collection.dialysissolution.anticoagulant == 9">
  277. {{main_collection.dialysissolution.anticoagulant_shouji}}iu
  278. </span>
  279. <span v-if="main_collection.dialysissolution.anticoagulant == 10">
  280. {{main_collection.dialysissolution.anticoagulant_shouji}}iu
  281. </span>
  282. <span v-if="main_collection.dialysissolution.anticoagulant == 11">
  283. {{main_collection.dialysissolution.anticoagulant_shouji}}iu
  284. </span>
  285. </div>
  286. <div class="printCell">
  287. <span>体重增加:{{ (main_collection.assessmentbefor.weight_before - main_collection.lastafterweight.weight_after).toFixed(2) }}Kg</span>
  288. 维持:{{main_collection.dialysissolution.anticoagulant_weichi}}
  289. <span v-if="main_collection.dialysissolution.anticoagulant == 1">
  290. mg/h
  291. </span>
  292. <span v-if="main_collection.dialysissolution.anticoagulant == 2">
  293. mg/h
  294. </span>
  295. <span v-if="main_collection.dialysissolution.anticoagulant == 3">
  296. iu/h
  297. </span>
  298. <span v-if="main_collection.dialysissolution.anticoagulant == 4">
  299. mg/h
  300. </span>
  301. <span v-if="main_collection.dialysissolution.anticoagulant == 5">
  302. mg/h
  303. </span>
  304. <span v-if="main_collection.dialysissolution.anticoagulant == 6">
  305. iu/h
  306. </span>
  307. <span v-if="main_collection.dialysissolution.anticoagulant == 7">
  308. iu/h
  309. </span>
  310. <span v-if="main_collection.dialysissolution.anticoagulant == 8">
  311. iu/h
  312. </span>
  313. <span v-if="main_collection.dialysissolution.anticoagulant == 9">
  314. iu/h
  315. </span>
  316. <span v-if="main_collection.dialysissolution.anticoagulant == 10">
  317. iu/h
  318. </span>
  319. <span v-if="main_collection.dialysissolution.anticoagulant == 11">
  320. iu/h
  321. </span>
  322. </div>
  323. <div class="printCell">
  324. <span>处方脱水量:{{ main_collection.prescription.target_ultrafiltration }}L</span>
  325. 总量:{{main_collection.dialysissolution.anticoagulant_zongliang}}
  326. <span v-if="main_collection.dialysissolution.anticoagulant == 1">
  327. mg
  328. </span>
  329. <span v-if="main_collection.dialysissolution.anticoagulant == 2">
  330. mg
  331. </span>
  332. <span v-if="main_collection.dialysissolution.anticoagulant == 3">
  333. iu
  334. </span>
  335. <span v-if="main_collection.dialysissolution.anticoagulant == 4">
  336. mg
  337. </span>
  338. <span v-if="main_collection.dialysissolution.anticoagulant == 5">
  339. mg
  340. </span>
  341. <span v-if="main_collection.dialysissolution.anticoagulant == 6">
  342. iu
  343. </span>
  344. <span v-if="main_collection.dialysissolution.anticoagulant == 7">
  345. iu
  346. </span>
  347. <span v-if="main_collection.dialysissolution.anticoagulant == 8">
  348. iu
  349. </span>
  350. <span v-if="main_collection.dialysissolution.anticoagulant == 9">
  351. iu
  352. </span>
  353. <span v-if="main_collection.dialysissolution.anticoagulant == 10">
  354. iu
  355. </span>
  356. <span v-if="main_collection.dialysissolution.anticoagulant == 11">
  357. iu
  358. </span>
  359. </div>
  360. </div>
  361. </div>
  362. </div>
  363. </div>
  364. </div>
  365. <span slot="footer" class="dialog-footer">
  366. <el-button @click="startVisibility = false">取 消</el-button>
  367. </span>
  368. </el-dialog>
  369. </div>
  370. <div style="width:75%" v-show="!showView">
  371. <div style="margin-left:60px;color:#34495e">
  372. <span>{{ patient.name }}({{ patient.dialysis_no }})</span>
  373. <span v-if="newTime != ''">&nbsp;&nbsp;|&nbsp;&nbsp;</span>
  374. <span v-if="newTime != ''">签到时间:{{ newTime }}</span>
  375. </div>
  376. <nav-igation
  377. ref="nav"
  378. title="弹窗导航"
  379. @advice="adviceFunc"
  380. :patient="patient"
  381. :schedual="schedual"
  382. :prescription="prescription"
  383. :solution="solution"
  384. :receiver_treatment_access="receiver_treatment_access"
  385. :predialysis_evaluation="predialysis_evaluation"
  386. :doctor_advices="doctor_advices"
  387. :double_check="double_check"
  388. :assessment_after_dislysis="assessment_after_dislysis"
  389. :treatment_summary="treatment_summary"
  390. :monitor_records="monitor_records"
  391. :dialysis_order="dialysis_order"
  392. :admin_users="admin_users"
  393. :devices="devices"
  394. :device_numbers="device_numbers"
  395. :admin_user_map="admin_user_map"
  396. :device_map="device_map"
  397. :device_number_map="device_number_map"
  398. :niprocart_info="niprocart_info"
  399. :jms_info="jms_info"
  400. :fistula_needle_set_info="fistula_needle_set_info"
  401. :fistula_needle_set_16_info="fistula_needle_set_16_info"
  402. :hemoperfusion_info="hemoperfusion_info"
  403. :dialyser_sterilised_info="dialyser_sterilised_info"
  404. :filtryzer_info="filtryzer_info"
  405. :dialyzers_info="dialyzers_info"
  406. :injector_info="injector_info"
  407. :bloodlines_info="bloodlines_info"
  408. :tubingHemodialysis_info="tubingHemodialysis_info"
  409. :safe_package_info="safe_package_info"
  410. :aliquid_info="aliquid_info"
  411. :config="config"
  412. :longAdvices="longAdvices"
  413. :waitUploadAdvices="waitUploadAdvices"
  414. :is_open="is_open"
  415. :last_predialysis_evaluation="lastPredialysisEvaluation"
  416. :last_monitor_record="lastMonitorRecord"
  417. :last_assessment_after_dislysis="lastAssessmentAfterDislysis"
  418. :last_dialysis_prescribe="lastDialysisPrescribe"
  419. :last_dryWeight_dislysis="lastDryWeightDislysis"
  420. :special_premission="headNurses"
  421. @assessmentAfterDislysis="assessmentAfterDislysisFunc"
  422. :system_prescribe="system_prescribe"
  423. :his_is_open="his_is_open"
  424. :is_advice_open="is_advice_open"
  425. :lastAssessment="lastAssessment"
  426. :stockType="stockType"
  427. :his_doctor_advices="his_doctor_advices"
  428. >
  429. </nav-igation>
  430. <basic-infor
  431. :patient="patient"
  432. :device_number="schedual.id == 0 ? '' : schedual.device_number.number"
  433. :steps="steps"
  434. title="基本信息"
  435. ></basic-infor>
  436. <dialysis-prescription
  437. :prescription="prescription"
  438. :solution="solution"
  439. :device_map="device_map"
  440. :preparestock="preparestock"
  441. title="透析处方"
  442. ></dialysis-prescription>
  443. <!-- <past-data class="往期数据"></past-data> -->
  444. <div style="height: 20px;background-color: #f6f8f9"></div>
  445. <accepts-assessment
  446. :record="receiver_treatment_access"
  447. title="接诊评估"
  448. ></accepts-assessment>
  449. <assessment-before
  450. :record="predialysis_evaluation"
  451. ref="assessment_before"
  452. title="透前评估"
  453. ></assessment-before>
  454. <stat-order
  455. ref="stat_order"
  456. :advices="doctor_advices"
  457. :doctor_map="admin_user_map"
  458. title="临时医嘱"
  459. ></stat-order>
  460. <double-check
  461. ref="double_check"
  462. :record="double_check"
  463. :admin_map="admin_user_map"
  464. title="双人核对 "
  465. ></double-check>
  466. <dialysis-computer
  467. ref="dialysis_computer"
  468. :record="dialysis_order"
  469. :admin_map="admin_user_map"
  470. :device_number_map="device_number_map"
  471. title="透析上机 "
  472. ></dialysis-computer>
  473. <dialysis-monitoring
  474. ref="monitoring"
  475. :monitores="monitor_records"
  476. title="透析监测"
  477. ></dialysis-monitoring>
  478. <el-dialog
  479. title="长期医嘱单"
  480. :visible.sync="dialogFormVisible"
  481. width="960px"
  482. >
  483. <div class="printForm">
  484. <h1 class="title">长期医嘱单</h1>
  485. <div class="info">
  486. <ul>
  487. <li>
  488. <span class="name">姓名:</span>
  489. <input type="text" class="InputBox" />
  490. </li>
  491. <li>
  492. <span class="name">性别:</span>
  493. <input type="text" class="InputBox" />
  494. </li>
  495. <li>
  496. <span class="name">年龄:</span>
  497. <input type="text" class="InputBox" />
  498. </li>
  499. <li>
  500. <span class="name">科别:</span>
  501. <input type="text" class="InputBox" />
  502. </li>
  503. <li>
  504. <span class="name">床号:</span>
  505. <input type="text" class="InputBox" />
  506. </li>
  507. <li>
  508. <span class="name">住院号:</span>
  509. <input type="text" class="InputBox" />
  510. </li>
  511. </ul>
  512. </div>
  513. <table
  514. border="1"
  515. style="border:1px #999 solid;margin-top:20px;"
  516. bordercolorlight="#fff"
  517. bordercolordark="#fff"
  518. width="100%"
  519. cellpadding="0"
  520. cellspacing="0"
  521. class="printTable"
  522. >
  523. <tbody>
  524. <tr align="center">
  525. <th style="width:20%;" colspan="2" align="center">起始</th>
  526. <th style="width:20%;" rowspan="2" align="center">医嘱</th>
  527. <th style="width:8%;" rowspan="2" align="center">医师签名</th>
  528. <th style="width:6%;" rowspan="2" align="center">执行护士签名</th>
  529. <th style="width:42%;" colspan="4" align="center">停止</th>
  530. </tr>
  531. <tr align="center">
  532. <th align="center">日期</th>
  533. <th align="center">时间</th>
  534. <th style="width:10%;" align="center">日期</th>
  535. <th style="width:10%;" align="center">时间</th>
  536. <th style="width:10%;" align="center">医师签名</th>
  537. <th style="width:6%;" align="center">执行护士签名</th>
  538. </tr>
  539. <tr align="center">
  540. <td>2018-90-09</td>
  541. <td>2018-90-09</td>
  542. <td>地方开发发地方开发发方发发发大渡岗</td>
  543. <td>张三</td>
  544. <td>张三</td>
  545. <td>张三</td>
  546. <td>张三</td>
  547. <td>张三</td>
  548. <td>张三</td>
  549. </tr>
  550. <tr align="center">
  551. <td>2018-90-09</td>
  552. <td>2018-90-09</td>
  553. <td>地方开发发地方开发发方发发发大渡岗</td>
  554. <td>张三</td>
  555. <td>张三</td>
  556. <td>张三</td>
  557. <td>张三</td>
  558. <td>张三</td>
  559. <td>张三</td>
  560. </tr>
  561. </tbody>
  562. </table>
  563. </div>
  564. </el-dialog>
  565. <el-dialog title="临时医嘱单" :visible.sync="orders" width="960px">
  566. <div class="printForm">
  567. <h1 class="title">临时医嘱单</h1>
  568. <div class="info">
  569. <ul>
  570. <li>
  571. <span class="name">姓名:</span>
  572. <input type="text" class="InputBox" />
  573. </li>
  574. <li>
  575. <span class="name">性别:</span>
  576. <input type="text" class="InputBox" />
  577. </li>
  578. <li>
  579. <span class="name">年龄:</span>
  580. <input type="text" class="InputBox" />
  581. </li>
  582. <li>
  583. <span class="name">科:</span>
  584. <input type="text" class="InputBox" />
  585. </li>
  586. <li>
  587. <span class="name">区:</span>
  588. <input type="text" class="InputBox" />
  589. </li>
  590. <li>
  591. <span class="name">房:</span>
  592. <input type="text" class="InputBox" />
  593. </li>
  594. <li>
  595. <span class="name">床:</span>
  596. <input type="text" class="InputBox" />
  597. </li>
  598. <li>
  599. <span class="name">住院号:</span>
  600. <input type="text" class="InputBox" />
  601. </li>
  602. </ul>
  603. </div>
  604. <table
  605. border="1"
  606. style="border:1px #999 solid;margin-top:20px;"
  607. bordercolorlight="#fff"
  608. bordercolordark="#fff"
  609. width="100%"
  610. cellpadding="0"
  611. cellspacing="0"
  612. class="printTable"
  613. >
  614. <tbody>
  615. <tr align="center">
  616. <th style="width:10%;" align="center">日期</th>
  617. <th style="width:10%;" align="center">时间</th>
  618. <th style="width:10%;" align="center">医生签名</th>
  619. <th style="width:40%;" align="center">医嘱内容</th>
  620. <th style="width:10%;" align="center">执行时间</th>
  621. <th style="width:10%;" align="center">护士签名</th>
  622. <th style="width:10%;" align="center">金额</th>
  623. </tr>
  624. <tr align="center">
  625. <td>2018-90-09</td>
  626. <td>2018-90-09</td>
  627. <td>张三</td>
  628. <td>张三</td>
  629. <td>张三</td>
  630. <td>张三</td>
  631. <td>888</td>
  632. </tr>
  633. <tr align="center">
  634. <td>2018-90-09</td>
  635. <td>2018-90-09</td>
  636. <td>张三</td>
  637. <td>张三</td>
  638. <td>2018-90-09</td>
  639. <td>张三</td>
  640. <td>888</td>
  641. </tr>
  642. </tbody>
  643. </table>
  644. </div>
  645. </el-dialog>
  646. <dialysis-off
  647. ref="dialysis_off"
  648. :record="dialysis_order"
  649. :admin_map="admin_user_map"
  650. title="透析下机 "
  651. ></dialysis-off>
  652. <assessment-after
  653. ref="assessment_after"
  654. :record="assessment_after_dislysis"
  655. title="透后评估"
  656. ></assessment-after>
  657. <treatment-of
  658. ref="treatment_of"
  659. :record="treatment_summary"
  660. title="治疗小结"
  661. ></treatment-of>
  662. </div>
  663. <div v-if="showView" style="text-align:center;margin: 0 auto;font-size:20px;">
  664. <p style="margin-top:20px;">当前叫号</p>
  665. <p style="margin-top:20px;">{{ $route.query.patient_name ? $route.query.patient_name : ""}}</p>
  666. <p style="margin-top:20px;">签到时间:{{ $route.query.curPatientTime ? getDates($route.query.curPatientTime) : '' }}</p>
  667. <p style="color:red;margin-top:20px;">提示:当前患者无排班,请先排班</p>
  668. </div>
  669. </div>
  670. </div>
  671. </template>
  672. <script>
  673. const moment = require('moment')
  674. import axios from 'axios'
  675. import NavIgation from './NavIgation'
  676. import BasicInfor from './BasicInfor'
  677. import DialysisPrescription from './DialysisPrescription'
  678. import PastData from './pastData'
  679. import AcceptsAssessment from './acceptsAssessment'
  680. import AssessmentBefore from './assessmentBefore'
  681. import StatOrder from './statOrder'
  682. import DialysisComputer from './dialysisComputer'
  683. import DoubleCheck from './doubleCheck'
  684. import DialysisMonitoring from './dialysisMonitoring'
  685. import DialysisOff from './dialysisOff'
  686. import AssessmentAfter from './assessmentAfter'
  687. import TreatmentOf from './treatmentOf'
  688. import OperationStaff from './operationStaff'
  689. import {
  690. getDialysisScheduleDetail,
  691. getLongAdvice,
  692. getDialysisRecordInitData,
  693. getDialysisSchedules,
  694. getInitPrintData
  695. } from '@/api/dialysis_record'
  696. import { parseTime } from '@/utils'
  697. import BreadCrumb from '@/xt_pages/components/bread-crumb'
  698. import print from 'print-js'
  699. export default {
  700. name: 'index',
  701. components: {
  702. NavIgation,
  703. BasicInfor,
  704. DialysisPrescription,
  705. PastData,
  706. AcceptsAssessment,
  707. AssessmentBefore,
  708. StatOrder,
  709. DialysisComputer,
  710. DoubleCheck,
  711. DialysisMonitoring,
  712. DialysisOff,
  713. AssessmentAfter,
  714. TreatmentOf,
  715. OperationStaff,
  716. BreadCrumb
  717. },
  718. data() {
  719. return {
  720. crumbs: [
  721. { path: false, name: '透析管理' },
  722. { path: false, name: '透析记录' },
  723. { path: false, name: '透析单' }
  724. ],
  725. dialogFormVisible: false,
  726. orders: false,
  727. loading: false,
  728. patient_id: 0,
  729. date: 0,
  730. longAdvices: [],
  731. waitUploadAdvices: [],
  732. is_open: 0,
  733. targetAdvices: [],
  734. patient: { id: 0 }, // 患者信息
  735. schedual: { id: 0 }, // 患者排班信息
  736. prescription: { id: 0 }, // 透析处方
  737. solution: { id: 0 }, // 透析方案
  738. system_prescribe: { id: 0 },
  739. receiver_treatment_access: { id: 0 }, // 接诊评估
  740. predialysis_evaluation: { id: 0 }, // 透前评估
  741. doctor_advices: [], // 临时医嘱
  742. double_check: { id: 0 }, // 双人核对
  743. assessment_after_dislysis: { id: 0 }, // 透后评估
  744. treatment_summary: { id: 0 }, // 治疗小结
  745. monitor_records: [], // 透析监测
  746. dialysis_order: { id: 0 }, // 透析记录
  747. admin_users: [], // 系统用户列表
  748. devices: [], // 设备
  749. device_numbers: [], // 床位号
  750. admin_user_map: {}, // {user_id: admin_user object}
  751. device_map: {}, // {device_id: device}
  752. device_number_map: {}, // {device_number_id: device_number}
  753. niprocart_info: [],
  754. jms_info: [],
  755. fistula_needle_set_info: [],
  756. fistula_needle_set_16_info: [],
  757. hemoperfusion_info: [],
  758. dialyser_sterilised_info: [],
  759. filtryzer_info: [],
  760. dialyzers_info: [],
  761. injector_info: [],
  762. bloodlines_info: [],
  763. tubingHemodialysis_info: [],
  764. safe_package_info: [],
  765. aliquid_info: [],
  766. config: {},
  767. his_is_open:0,
  768. is_advice_open:0,
  769. lastPredialysisEvaluation: { id: 0 },
  770. lastMonitorRecord: { id: 0 },
  771. lastAssessmentAfterDislysis: { id: 0 },
  772. lastDryWeightDislysis: { id: 0 },
  773. lastAssessment:{id:0},
  774. headNurses: [],
  775. lastDialysisPrescribe: { id: 0 },
  776. //
  777. activeName: 'first',
  778. selected_date: new Date(),
  779. // search_input 和 search_keyword,使输入关键字时不会经常刷新 filtedSchedules
  780. search_keyword: '', // 确定用于搜索的关键字
  781. search_input: '', // 输入中的关键字
  782. patient_state: [
  783. { value: 0, label: '全部患者' },
  784. { value: 1, label: '已签到' },
  785. { value: 2, label: '未签到' },
  786. { value: 3, label: '已上机' },
  787. { value: 4, label: '已下机' }
  788. ],
  789. patientStateVal: 0,
  790. treat_state: [
  791. { value: 0, label: '全部治疗' },
  792. { value: 1, label: '待开处方' },
  793. { value: 2, label: '待开小结' },
  794. { value: 3, label: '待医嘱核对' },
  795. ],
  796. treatStateVal: 0,
  797. schedule_options: [
  798. { value: 0, label: '全部班' },
  799. { value: 1, label: '上午' },
  800. { value: 2, label: '下午' },
  801. { value: 3, label: '晚上' }
  802. ],
  803. scheduleStateVal: 0,
  804. zone_options: [
  805. { id: 0, text: '全部分区' }
  806. ],
  807. zoneVal: 0,
  808. tableData: [],
  809. tableData1: [],
  810. arr: [],
  811. newName: '',
  812. newTime: '',
  813. scheudle_mode:"",
  814. showView:false,
  815. curPatient:{},
  816. queueConfig:{},
  817. stockType:[],
  818. preparestock:[],
  819. his_doctor_advices:[],
  820. startVisibility:false,
  821. printList:[],
  822. anticoagulants_confit:null,
  823. printDate:''
  824. }
  825. },
  826. created() {
  827. this.printDate = moment().format("YYYY-MM-DD HH:mm:ss")
  828. if(this.$route.query.showView){
  829. this.showView = this.$route.query.showView
  830. }
  831. if(sessionStorage.getItem("nameActive")){
  832. this.activeName = sessionStorage.getItem("nameActive")
  833. }
  834. var patient_id = this.$route.query.patient_id
  835. var date = this.$route.query.date
  836. this.patient_id = patient_id
  837. this.date = date
  838. this.getScheduleDetail()
  839. this.getLongAdvice()
  840. this.selected_date = this.$route.query.date * 1000
  841. var schedule_type_selected = this.$store.getters.schedule_type_selected
  842. var zone_selected = this.$store.getters.zone_selected
  843. var patient_state_selected = this.$store.getters.patient_state_selected
  844. var treat_state_selected = this.$store.getters.treat_state_selected
  845. var selected_date = this.$store.getters.selected_date
  846. if (schedule_type_selected) {
  847. this.scheduleStateVal = schedule_type_selected.schedule_type_selected
  848. }
  849. if (zone_selected) {
  850. this.zoneVal = zone_selected.zone_selected
  851. }
  852. if (patient_state_selected) {
  853. this.patientStateVal = patient_state_selected.patient_state_selected
  854. }
  855. if (treat_state_selected) {
  856. this.treatStateVal = treat_state_selected.treat_state_selected
  857. }
  858. if (selected_date.selected_date) {
  859. this.selected_date = selected_date.selected_date
  860. }
  861. this.initData = {
  862. cmd: "queue/join",
  863. data: {type:3,page:0,size:0},
  864. };
  865. this.websocketSend(this.initData)
  866. this.getInitData()
  867. this.anticoagulants_confit = this.$store.getters.anticoagulants_confit
  868. },
  869. beforeMount() {
  870. if (this.websocket) {
  871. if (this.websocket.readyState == 1) {
  872. console.log('执行1')
  873. this.websocketMess();
  874. } else {
  875. setTimeout(() => {
  876. console.log('执行2')
  877. this.websocketMess();
  878. }, 1000);
  879. }
  880. } else {
  881. setTimeout(() => {
  882. if (this.websocket) {
  883. console.log('执行3')
  884. this.websocketMess();
  885. } else {
  886. setTimeout(() => {
  887. console.log('执行4')
  888. this.websocketMess();
  889. }, 1000);
  890. }
  891. }, 1000);
  892. }
  893. },
  894. mounted() {
  895. const timer = setInterval(() => {
  896. // this.getInitData();
  897. this.requestDialysisSchedules()
  898. }, 1000 * 30)
  899. // 通过$once来监听定时器,在beforeDestroy钩子可以被清除。
  900. this.$once('hook:beforeDestroy', () => {
  901. clearInterval(timer)
  902. })
  903. let obj = {
  904. cmd: "queue/join",
  905. data: {type:3,page:0,size:0},
  906. };
  907. this.websocketSend(obj)
  908. },
  909. computed: {
  910. websocket() {
  911. return this.$store.state.user.websocket;
  912. },
  913. steps: function() {
  914. var steps = [
  915. { title: '透析处方', finish: false },
  916. { title: '接诊评估', finish: false },
  917. { title: '透前评估', finish: false },
  918. { title: '临时医嘱', finish: false },
  919. { title: '双人核对', finish: false },
  920. { title: '透析上机', finish: false },
  921. { title: '透析监测', finish: false },
  922. { title: '透析下机', finish: false },
  923. { title: '透后评估', finish: false },
  924. { title: '治疗小结', finish: false }
  925. ]
  926. steps[0].finish = this.prescription.id && this.prescription.creater > 0
  927. steps[1].finish = this.receiver_treatment_access.id > 0
  928. steps[2].finish =
  929. this.predialysis_evaluation.id > 0 &&
  930. this.predialysis_evaluation.creater > 0
  931. steps[3].finish = this.doctor_advices.length > 0
  932. steps[5].finish = this.dialysis_order.id > 0
  933. steps[7].finish =
  934. this.dialysis_order.id > 0 && this.dialysis_order.stage == 2
  935. steps[4].finish =
  936. this.double_check.id > 0 &&
  937. this.double_check.creater > 0 &&
  938. this.double_check.modifier > 0
  939. steps[6].finish = this.monitor_records.length > 0
  940. steps[8].finish =
  941. this.assessment_after_dislysis.id > 0 &&
  942. this.assessment_after_dislysis.creater > 0
  943. steps[9].finish = this.treatment_summary.id > 0
  944. return steps
  945. },
  946. filtedSchedules: function() {
  947. var search_keyword = this.search_keyword
  948. if (search_keyword.length > 0) {
  949. var schedules = []
  950. for (let o_i = 0; o_i < this.zone_schedules.length; o_i++) {
  951. const scheduleInfo = this.zone_schedules[o_i]
  952. var originSchedules = scheduleInfo.schedules
  953. if (originSchedules.length == 0) {
  954. continue
  955. }
  956. var filtedSchedules = []
  957. for (let s_i = 0; s_i < originSchedules.length; s_i++) {
  958. const schedule = originSchedules[s_i]
  959. if (schedule.patient.name.indexOf(search_keyword) != -1) {
  960. filtedSchedules.push(schedule)
  961. // break
  962. }
  963. }
  964. if (filtedSchedules.length > 0) {
  965. schedules.push({ zone_id: scheduleInfo.zone_id, zone_name: scheduleInfo.zone_name, schedules: filtedSchedules })
  966. }
  967. }
  968. return schedules
  969. }
  970. // var zone_selected = this.zoneVal
  971. // var timetype_selected = this.scheduleStateVal
  972. // if ((zone_selected == 0 && timetype_selected == 0) || this.zone_options.length <= 1) {
  973. // var schedules = []
  974. // for (let index = 0; index < this.zone_schedules.length; index++) {
  975. // const scheduleInfo = this.zone_schedules[index]
  976. // if (scheduleInfo.schedules.length != 0) {
  977. // schedules.push(scheduleInfo)
  978. // }
  979. // }
  980. // return schedules
  981. // }
  982. // var schedules = []
  983. // for (let o_i = 0; o_i < this.zone_schedules.length; o_i++) {
  984. // const scheduleInfo = this.zone_schedules[o_i]
  985. // if (zone_selected == scheduleInfo.zone_id && timetype_selected == 0) {
  986. // if (scheduleInfo.schedules.length == 0) {
  987. // return []
  988. // } else {
  989. // return [scheduleInfo]
  990. // }
  991. // }
  992. // var originSchedules = scheduleInfo.schedules
  993. // if (originSchedules.length == 0) {
  994. // continue
  995. // }
  996. // var filtedSchedules = []
  997. // for (let s_i = 0; s_i < originSchedules.length; s_i++) {
  998. // const schedule = originSchedules[s_i]
  999. // if (zone_selected != 0) {
  1000. // if (zone_selected == schedule.device_number.zone.id) {
  1001. // if (timetype_selected == 0 || schedule.schedule_type == timetype_selected) {
  1002. // filtedSchedules.push(schedule)
  1003. // }
  1004. // }
  1005. // } else {
  1006. // if (timetype_selected == 0 || schedule.schedule_type == timetype_selected) {
  1007. // filtedSchedules.push(schedule)
  1008. // }
  1009. // }
  1010. // }
  1011. // if (filtedSchedules.length > 0) {
  1012. // schedules.push({ zone_id: scheduleInfo.zone_id, zone_name: scheduleInfo.zone_name, schedules: filtedSchedules })
  1013. // }
  1014. // }
  1015. // return schedules
  1016. }
  1017. },
  1018. beforeDestroy(){
  1019. let unObj = {
  1020. cmd: "queue/unjoin",
  1021. data: {type:3},
  1022. };
  1023. this.websocketSend(unObj)
  1024. },
  1025. methods: {
  1026. adviceFunc() {
  1027. this.getScheduleDetail()
  1028. },
  1029. getLongAdvice() {
  1030. const params = {
  1031. patient_id: this.patient_id
  1032. }
  1033. getLongAdvice(params).then(rs => {
  1034. var resp = rs.data
  1035. if (resp.state == 1) {
  1036. var status = parseInt(resp.data.status)
  1037. switch (status) {
  1038. case 2:
  1039. var totalAdvice = resp.data.advices
  1040. var longAdvicesTwo = resp.data.advices_two
  1041. var waitUploadAdvices = []
  1042. for (let i = 0; i < totalAdvice.length; i++) {
  1043. totalAdvice[i]['isCheck'] = 1
  1044. }
  1045. for (let i = 0; i < totalAdvice.length; i++) {
  1046. for (let a = 0; a < longAdvicesTwo.length; a++) {
  1047. if (
  1048. totalAdvice[i].template_id ==
  1049. longAdvicesTwo[a].template_id &&
  1050. totalAdvice[i].frequency_type ==
  1051. longAdvicesTwo[a].frequency_type
  1052. ) {
  1053. totalAdvice[i]['isCheck'] = 0
  1054. }
  1055. }
  1056. }
  1057. for (let i = 0; i < totalAdvice.length; i++) {
  1058. if (totalAdvice[i].isCheck == 1) {
  1059. waitUploadAdvices.push(totalAdvice[i])
  1060. }
  1061. }
  1062. this.is_open = resp.data.is_open_remind
  1063. if(this.his_is_open == 1){
  1064. this.is_open = 0
  1065. }
  1066. if(this.is_advice_open == 1){
  1067. this.is_open = 1
  1068. }
  1069. this.longAdvices = totalAdvice
  1070. this.waitUploadAdvices = waitUploadAdvices
  1071. break
  1072. }
  1073. } else {
  1074. this.$message.error(resp.msg)
  1075. }
  1076. })
  1077. },
  1078. assessmentAfterDislysisFunc: function(val) {
  1079. for (var index in val) {
  1080. this.$set(this.assessment_after_dislysis, index, val[index])
  1081. }
  1082. },
  1083. didDelMonitor(record_id) {
  1084. var mrl = this.monitor_records.length
  1085. for (let index = 0; index < mrl; index++) {
  1086. if (this.monitor_records[index].id == record_id) {
  1087. this.monitor_records.splice(index, 1)
  1088. break
  1089. }
  1090. }
  1091. },
  1092. getScheduleDetail: function() {
  1093. this.loading = true
  1094. var dateStr = parseTime(this.date, '{y}-{m}-{d}')
  1095. if(this.$route.query.showView == true){
  1096. this.loading = false
  1097. return
  1098. }
  1099. this.doctor_advices = []
  1100. getDialysisScheduleDetail(this.patient_id, dateStr).then(rs => {
  1101. var resp = rs.data
  1102. if (resp.state == 1) {
  1103. var patient = resp.data.patient // 患者信息
  1104. var schedual = resp.data.schedual // 患者排班信息
  1105. // console.log("排班22222222222",schedual)
  1106. var prescription = resp.data.prescription // 透析处方
  1107. if (prescription != null) {
  1108. if (prescription.body_fluid == -2) {
  1109. prescription.body_fluid = 0
  1110. }
  1111. if(prescription.bilirubin_adsorption_column == 0){
  1112. prescription.bilirubin_adsorption_column = ""
  1113. }
  1114. if(prescription.plasma_separator == 0){
  1115. prescription.plasma_separator = ""
  1116. }
  1117. }
  1118. var solution = resp.data.solution // 透析方案
  1119. var receiver_treatment_access = resp.data.receiver_treatment_access // 接诊评估
  1120. var predialysis_evaluation = resp.data.predialysis_evaluation // 透前评估
  1121. if (predialysis_evaluation != null) {
  1122. if (predialysis_evaluation.blood_access_part_id == -2) {
  1123. predialysis_evaluation.blood_access_part_id = 0
  1124. }
  1125. if(predialysis_evaluation.blood_pressure_during_dialysis == 0){
  1126. predialysis_evaluation.blood_pressure_during_dialysis = ""
  1127. }
  1128. }
  1129. var doctor_advices = resp.data.doctor_advices // 临时医嘱
  1130. var double_check = resp.data.double_check // 双人核对
  1131. var assessment_after_dislysis = resp.data.assessment_after_dislysis // 透后评估
  1132. var treatment_summary = resp.data.treatment_summary // 治疗小结
  1133. var monitor_records = resp.data.monitor_records // 透析监测
  1134. var dialysis_order = resp.data.dialysis_order // 透析记录
  1135. var niprocart_info = resp.data.niprocart_info
  1136. var jms_info = resp.data.jms_info
  1137. var fistula_needle_set_info = resp.data.fistula_needle_set_info
  1138. var fistula_needle_set_16_info = resp.data.fistula_needle_set_16_info
  1139. var hemoperfusion_info = resp.data.hemoperfusion_info
  1140. var dialyser_sterilised_info = resp.data.dialyser_sterilised_info
  1141. var filtryzer_info = resp.data.filtryzer_info
  1142. var dialyzers_info = resp.data.dialyzers_info
  1143. var injector_info = resp.data.injector_info
  1144. var bloodlines_info = resp.data.bloodlines_info
  1145. var tubingHemodialysis_info = resp.data.tubingHemodialysis_info
  1146. var safe_package_info = resp.data.safe_package_info
  1147. var aliquid_info = resp.data.aliquid_info
  1148. var lastPredialysisEvaluation = resp.data.lastPredialysisEvaluation
  1149. if (lastPredialysisEvaluation != null) {
  1150. if (lastPredialysisEvaluation.blood_access_part_id == -2) {
  1151. lastPredialysisEvaluation.blood_access_part_id = 0
  1152. }
  1153. }
  1154. var lastMonitorRecord = resp.data.lastMonitorRecord
  1155. var lastAssessmentAfterDislysis = resp.data.lastAssessmentAfterDislysis
  1156. // if(lastAssessmentAfterDislysis.hypertenison!=""){
  1157. // lastAssessmentAfterDislysis.hypertenison = lastAssessmentAfterDislysis.hypertenison.toString()
  1158. // }
  1159. // if(lastAssessmentAfterDislysis.hypopiesia!=""){
  1160. // lastAssessmentAfterDislysis.hypopiesia = lastAssessmentAfterDislysis.hypopiesia.toString()
  1161. // }
  1162. var lastDialysisPrescribe = resp.data.lastDialysisPrescribe
  1163. var lastDryWeightDislysis = resp.data.lastDryWeightDislysis
  1164. var system_prescribe = resp.data.system_prescribe
  1165. var lastAssessment = resp.data.lastAssessment
  1166. this.$refs.nav.setLastRecord(
  1167. lastPredialysisEvaluation,
  1168. lastMonitorRecord,
  1169. lastAssessmentAfterDislysis,
  1170. lastDialysisPrescribe,
  1171. lastDryWeightDislysis,
  1172. schedual,
  1173. system_prescribe,
  1174. lastAssessment,
  1175. )
  1176. var headNurses = resp.data.headNurse
  1177. var config = resp.data.config
  1178. this.lastPredialysisEvaluation = lastPredialysisEvaluation
  1179. this.lastMonitorRecord = lastMonitorRecord
  1180. this.lastAssessmentAfterDislysis = lastAssessmentAfterDislysis
  1181. this.lastDialysisPrescribe = lastDialysisPrescribe
  1182. this.lastDryWeightDislysis = lastDryWeightDislysis
  1183. this.lastAssessment = lastAssessment
  1184. this.headNurses = headNurses
  1185. this.system_prescribe = system_prescribe
  1186. this.niprocart_info = []
  1187. this.jms_info = []
  1188. this.fistula_needle_set_info = []
  1189. this.fistula_needle_set_16_info = []
  1190. this.hemoperfusion_info = []
  1191. this.dialyser_sterilised_info = []
  1192. this.filtryzer_info = []
  1193. this.dialyzers_info = []
  1194. this.injector_info = []
  1195. this.bloodlines_info = []
  1196. this.tubingHemodialysis_info = []
  1197. this.safe_package_info = []
  1198. this.aliquid_info = []
  1199. this.niprocart_info = niprocart_info
  1200. this.jms_info = jms_info
  1201. this.fistula_needle_set_info = fistula_needle_set_info
  1202. this.fistula_needle_set_16_info = fistula_needle_set_16_info
  1203. this.hemoperfusion_info = hemoperfusion_info
  1204. this.dialyser_sterilised_info = dialyser_sterilised_info
  1205. this.filtryzer_info = filtryzer_info
  1206. this.dialyzers_info = dialyzers_info
  1207. this.injector_info = injector_info
  1208. this.bloodlines_info = bloodlines_info
  1209. this.tubingHemodialysis_info = tubingHemodialysis_info
  1210. this.safe_package_info = safe_package_info
  1211. this.aliquid_info = aliquid_info
  1212. this.config = config
  1213. this.patient = patient
  1214. this.schedual = schedual == null ? { id: 0 } : schedual
  1215. this.prescription = prescription == null ? { id: 0 } : prescription
  1216. this.solution = solution == null ? { id: 0 } : solution
  1217. this.receiver_treatment_access =
  1218. receiver_treatment_access == null
  1219. ? { id: 0 }
  1220. : receiver_treatment_access
  1221. this.predialysis_evaluation =
  1222. predialysis_evaluation == null ? { id: 0 } : predialysis_evaluation
  1223. this.doctor_advices = doctor_advices == null ? [] : doctor_advices
  1224. this.double_check = double_check == null ? { id: 0 } : double_check
  1225. this.assessment_after_dislysis =
  1226. assessment_after_dislysis == null
  1227. ? { id: 0 }
  1228. : assessment_after_dislysis
  1229. this.treatment_summary =
  1230. treatment_summary == null ? { id: 0 } : treatment_summary
  1231. this.monitor_records = monitor_records == null ? [] : monitor_records
  1232. this.dialysis_order =
  1233. dialysis_order == null ? { id: 0 } : dialysis_order
  1234. this.admin_users = resp.data.doctors
  1235. this.devices = resp.data.devices
  1236. this.device_numbers = resp.data.device_numbers
  1237. var his_doctor_advices = resp.data.his_advices
  1238. this.his_doctor_advices = his_doctor_advices
  1239. this.his_is_open = resp.data.is_open_config.is_open
  1240. this.is_advice_open = resp.data.is_advice_open.is_advice_open
  1241. var stockType = resp.data.stockType
  1242. this.stockType = stockType
  1243. var prepare = resp.data.prepare
  1244. if(prepare!=null){
  1245. this.preparestock = prepare
  1246. }else{
  1247. this.preparestock = []
  1248. }
  1249. for (let i = 0; i < this.doctor_advices.length; i++){
  1250. this.doctor_advices[i]['origin'] = 1
  1251. }
  1252. if (his_doctor_advices != null) {
  1253. for (let i = 0; i < his_doctor_advices.length; i++) {
  1254. his_doctor_advices[i]['origin'] = 2
  1255. his_doctor_advices[i]['way'] = 1
  1256. this.doctor_advices.push(his_doctor_advices[i])
  1257. }
  1258. }
  1259. const obj = {}
  1260. this.doctor_advices = this.doctor_advices.reduce((cur, next) => {
  1261. obj[next.id] ? '' : obj[next.id] = true && cur.push(next)
  1262. return cur
  1263. }, []) // 设置cur默认类型为数组,并且初始值为空的数组
  1264. var device_map = {}
  1265. for (let index = 0; index < this.devices.length; index++) {
  1266. const device = this.devices[index]
  1267. device_map[device.id] = device
  1268. }
  1269. this.device_map = device_map
  1270. var admin_map = {}
  1271. for (let index = 0; index < this.admin_users.length; index++) {
  1272. const admin = this.admin_users[index]
  1273. admin_map[admin.id] = admin
  1274. }
  1275. this.admin_user_map = admin_map
  1276. var device_number_map = {}
  1277. for (let index = 0; index < this.device_numbers.length; index++) {
  1278. const device_number = this.device_numbers[index]
  1279. device_number_map[device_number.id] = device_number
  1280. }
  1281. this.device_number_map = device_number_map
  1282. } else {
  1283. this.$message.error(resp.msg)
  1284. }
  1285. // 目标超滤量是否默认上次数据
  1286. if (this.lastDialysisPrescribe != null) {
  1287. delete this.lastDialysisPrescribe.target_ultrafiltration
  1288. }
  1289. if (this.solution != null) {
  1290. delete this.solution.target_ultrafiltration
  1291. }
  1292. if(this.predialysis_evaluation.id > 0){
  1293. this.newTime = parseTime(this.predialysis_evaluation.created_time, '{h}:{i}')
  1294. }
  1295. this.loading = false
  1296. })
  1297. },
  1298. printOrder() {
  1299. var xtdate = parseTime(this.date, '{y}-{m}-{d}')
  1300. this.$router.push(
  1301. '/dialysis/print?xtdate=' + xtdate + '&xtno=' + this.patient.dialysis_no
  1302. )
  1303. },
  1304. printOrderOne(){
  1305. this.getInitPrintData()
  1306. },
  1307. // 日期
  1308. handleScheduleDateChange: function(index) {
  1309. this.treatStateVal = 0
  1310. this.patientStateVal = 0
  1311. this.zoneVal = 0
  1312. this.scheduleStateVal = 0
  1313. this.search_keyword = this.search_input = ''
  1314. // this.$store.dispatch("SaveDialysisAreaSelectIndexs", {
  1315. // zone: this.zone_selected,
  1316. // schedule_type: this.schedule_type_selected,
  1317. // schedule_date: this.selected_date,
  1318. // })
  1319. this.selected_date = index
  1320. this.$store.dispatch('SetSelectedDate', { selected_date: index })
  1321. this.requestDialysisSchedules()
  1322. },
  1323. // 初始化数据
  1324. getInitData: function() {
  1325. getDialysisRecordInitData().then(rs => {
  1326. var resp = rs.data
  1327. if (resp.state == 1) {
  1328. var zones = resp.data.zones
  1329. var schedules = resp.data.schedules
  1330. var zone_options = [{ id: 0, text: '全部分区' }]
  1331. for (let z_i = 0; z_i < zones.length; z_i++) {
  1332. const zone = zones[z_i]
  1333. zone_options.push({ id: zone.id, text: zone.name })
  1334. }
  1335. this.zone_options = zone_options
  1336. this.arr = this.processedDialysisSchedules(schedules, this.zone_options)
  1337. this.requestDialysisSchedules()
  1338. } else {
  1339. this.$message.error(resp.msg)
  1340. }
  1341. })
  1342. },
  1343. // 班次
  1344. handletimeType: function(index) {
  1345. this.scheduleStateVal = index
  1346. this.$store.dispatch('SetScheduleTypeSelected', { schedule_type_selected: index })
  1347. this.search_keyword = this.search_input = ''
  1348. this.getData()
  1349. },
  1350. // 分区
  1351. handleZoneChange: function(index) {
  1352. this.zoneVal = index
  1353. this.$store.dispatch('SetZoneSelected', { zone_selected: index })
  1354. this.search_keyword = this.search_input = ''
  1355. this.getData()
  1356. },
  1357. // 患者状态
  1358. handleStateChange: function(index) {
  1359. this.patientStateVal = index
  1360. this.$store.dispatch('SetPatientStateSelected', { patient_state_selected: index })
  1361. this.search_keyword = this.search_input = ''
  1362. this.getData()
  1363. },
  1364. handleTreatChange: function(index) {
  1365. this.treatStateVal = index
  1366. this.$store.dispatch('SetTreatStateSelected', { treat_state_selected: index })
  1367. this.search_keyword = this.search_input = ''
  1368. this.getData()
  1369. },
  1370. processedDialysisSchedules: function(schedules, zone_options) {
  1371. var zoneMap = {}
  1372. var scheduleMap = {}
  1373. for (let z_i = 0; z_i < zone_options.length; z_i++) {
  1374. const zone = zone_options[z_i]
  1375. if (zone.id == 0) {
  1376. continue
  1377. }
  1378. scheduleMap[zone.id] = []
  1379. }
  1380. for (let index = 0; index < schedules.length; index++) {
  1381. const schedule = schedules[index]
  1382. scheduleMap[schedule.device_number.zone.id].push(schedule)
  1383. }
  1384. var zone_schedules = []
  1385. for (let index = 0; index < zone_options.length; index++) {
  1386. const zone = zone_options[index]
  1387. if (zone.id == 0) {
  1388. continue
  1389. }
  1390. var schedules = scheduleMap[zone.id]
  1391. zone_schedules.push({ zone_id: zone.id, zone_name: zone.text, schedules: schedules })
  1392. }
  1393. return zone_schedules
  1394. },
  1395. searchAction: function() {
  1396. this.search_keyword = this.search_input
  1397. this.scheduleStateVal = 0
  1398. this.zoneVal = 0
  1399. this.treatStateVal = 0
  1400. this.patientStateVal = 0
  1401. if (this.search_input != '') {
  1402. const arr = []
  1403. this.filtedSchedules.map(item => {
  1404. arr.push(...item.schedules)
  1405. })
  1406. if (this.activeName == 'first') {
  1407. this.tableData = arr
  1408. } else if (this.activeName == 'second') {
  1409. this.tableData1 = arr
  1410. }
  1411. } else {
  1412. this.getData()
  1413. }
  1414. },
  1415. requestDialysisSchedules: function() {
  1416. var ymd = parseTime(this.selected_date, '{y}-{m}-{d}')
  1417. getDialysisSchedules(ymd).then(rs => {
  1418. var resp = rs.data
  1419. if (resp.state == 1) {
  1420. var schedules = resp.data.schedules
  1421. // if(this.prescription!=null){
  1422. // for(let i=0;i<schedules.length;i++){
  1423. // if(this.prescription.patient_id == schedules[i].patient_id){
  1424. // this.prescription = schedules[i].prescription
  1425. // }
  1426. // }
  1427. // }
  1428. this.zone_schedules = this.processedDialysisSchedules(schedules, this.zone_options)
  1429. const patientArr = JSON.parse(JSON.stringify(this.zone_schedules))
  1430. if (this.activeName == 'first') {
  1431. for (let i = 0; i < patientArr.length; i++) {
  1432. for (let j = 0; j < patientArr[i].schedules.length; j++) {
  1433. if (patientArr[i].schedules.length > 0 && patientArr[i].schedules[j].dialysis_order != null) {
  1434. // 删除元素后改变i的值
  1435. patientArr[i].schedules.splice(j--, 1)
  1436. }
  1437. }
  1438. }
  1439. } else if (this.activeName == 'second') {
  1440. for (let i = 0; i < patientArr.length; i++) {
  1441. for (let j = 0; j < patientArr[i].schedules.length; j++) {
  1442. if (patientArr[i].schedules.length > 0 && patientArr[i].schedules[j].dialysis_order == null) {
  1443. // 删除元素后改变i的值
  1444. patientArr[i].schedules.splice(j--, 1)
  1445. }
  1446. }
  1447. }
  1448. }
  1449. const newArr = []
  1450. patientArr.map(item => {
  1451. newArr.push(...item.schedules)
  1452. })
  1453. this.tableData = newArr
  1454. this.getData()
  1455. } else {
  1456. this.$message.error(resp.msg)
  1457. }
  1458. })
  1459. },
  1460. changePatient(schedual) {
  1461. this.patient_id = schedual.patient_id
  1462. this.date = schedual.schedule_date
  1463. // this.getScheduleDetail();
  1464. this.getLongAdvice();
  1465. var patient_id = schedual.patient_id
  1466. var date = schedual.schedule_date
  1467. this.$router.push({
  1468. path: '/dialysis/details',
  1469. query: {
  1470. patient_id: patient_id,
  1471. date: date,
  1472. patient_name: schedual.patient.name,
  1473. mode_id:schedual.mode_id
  1474. }
  1475. })
  1476. },
  1477. handleClick(type) {
  1478. sessionStorage.setItem('nameActive', type.name);
  1479. this.getData()
  1480. },
  1481. getData() {
  1482. let patientArr = []
  1483. patientArr = JSON.parse(JSON.stringify(this.zone_schedules))
  1484. if (this.activeName == 'first') {
  1485. for (let i = 0; i < patientArr.length; i++) {
  1486. for (let j = 0; j < patientArr[i].schedules.length; j++) {
  1487. if (patientArr[i].schedules.length > 0 && patientArr[i].schedules[j].dialysis_order != null) {
  1488. // 删除元素后改变i的值
  1489. // console.log('候诊区', patientArr[i].schedules[j])
  1490. patientArr[i].schedules.splice(j--, 1)
  1491. }
  1492. }
  1493. }
  1494. let arr1 = []
  1495. if (this.patientStateVal == 0) {
  1496. arr1 = patientArr
  1497. } else if (this.patientStateVal == 1) {
  1498. let arr = []
  1499. arr = patientArr
  1500. for (let i = 0; i < arr.length; i++) {
  1501. for (let j = 0; j < arr[i].schedules.length; j++) {
  1502. 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 == ''))) {
  1503. // 删除元素后改变i的值
  1504. arr[i].schedules.splice(j--, 1)
  1505. }
  1506. }
  1507. }
  1508. // console.log('执行1', arr)
  1509. arr1 = arr
  1510. } else if (this.patientStateVal == 2) {
  1511. let arr = []
  1512. arr = patientArr
  1513. for (let i = 0; i < arr.length; i++) {
  1514. for (let j = 0; j < arr[i].schedules.length; j++) {
  1515. 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))) {
  1516. // 删除元素后改变i的值
  1517. arr[i].schedules.splice(j--, 1)
  1518. }
  1519. }
  1520. }
  1521. // console.log('执行2', arr)
  1522. arr1 = arr
  1523. }
  1524. let arr2 = []
  1525. if (this.treatStateVal == 0) {
  1526. arr2 = JSON.parse(JSON.stringify(arr1))
  1527. } else if (this.treatStateVal == 1) {
  1528. let arr = []
  1529. arr = JSON.parse(JSON.stringify(arr1))
  1530. for (let i = 0; i < arr.length; i++) {
  1531. for (let j = 0; j < arr[i].schedules.length; j++) {
  1532. 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)) {
  1533. // 删除元素后改变i的值
  1534. arr[i].schedules.splice(j--, 1)
  1535. }
  1536. }
  1537. }
  1538. arr2 = arr
  1539. } else if(this.treatStateVal == 3){
  1540. let arr = []
  1541. arr = JSON.parse(JSON.stringify(arr1))
  1542. for (let i = 0; i < arr.length; i++) {
  1543. for (let j = 0; j < arr[i].schedules.length; j++) {
  1544. if(arr[i].schedules[j].doctor_advice.length == 0){
  1545. arr[i].schedules.splice(j--, 1)
  1546. }
  1547. if(arr[i].schedules && arr[i].schedules[j] && arr[i].schedules[j].doctor_advice){
  1548. let sign = 0
  1549. arr[i].schedules[j].doctor_advice.map(item => {
  1550. if(item.check_state == 1){
  1551. sign++
  1552. }
  1553. })
  1554. if(sign == arr[i].schedules[j].doctor_advice.length && arr[i].schedules[j].doctor_advice.length > 0){
  1555. arr[i].schedules.splice(j--, 1)
  1556. }
  1557. }
  1558. }
  1559. }
  1560. arr2 = arr
  1561. }
  1562. let arr3 = []
  1563. if (this.scheduleStateVal == 0) {
  1564. arr3 = JSON.parse(JSON.stringify(arr2))
  1565. } else {
  1566. let arr = []
  1567. arr = JSON.parse(JSON.stringify(arr2))
  1568. for (let i = 0; i < arr.length; i++) {
  1569. for (let j = 0; j < arr[i].schedules.length; j++) {
  1570. if (this.scheduleStateVal != arr[i].schedules[j].schedule_type) {
  1571. // 删除元素后改变i的值
  1572. arr[i].schedules.splice(j--, 1)
  1573. }
  1574. }
  1575. }
  1576. arr3 = arr
  1577. }
  1578. let arr4 = []
  1579. if (this.zoneVal == 0) {
  1580. arr4 = JSON.parse(JSON.stringify(arr3))
  1581. } else {
  1582. let arr = []
  1583. arr = JSON.parse(JSON.stringify(arr3))
  1584. for (let i = 0; i < arr.length; i++) {
  1585. if (this.zoneVal != arr[i].zone_id) {
  1586. // 删除元素后改变i的值
  1587. arr.splice(i--, 1)
  1588. }
  1589. }
  1590. arr4 = arr
  1591. }
  1592. const newArr = []
  1593. arr4.map(item => {
  1594. newArr.push(...item.schedules)
  1595. })
  1596. if(this.patientStateVal == 1){
  1597. newArr.map(item => {
  1598. item.created_time = item.assessment_before_dislysis.created_time
  1599. })
  1600. newArr.sort(this.compare('created_time'))
  1601. }
  1602. // console.log('排序',newArr)
  1603. this.tableData = newArr
  1604. const name = this.$route.query.patient_name
  1605. this.tableData.map((item, index) => {
  1606. if (name == item.patient.name) {
  1607. // if (item.assessment_before_dislysis != null) {
  1608. // this.newTime = parseTime(item.assessment_before_dislysis.created_time, '{h}:{i}')
  1609. // }
  1610. setTimeout(() => {
  1611. this.$refs.tab.setCurrentRow(this.tableData[index])
  1612. }, 10)
  1613. }
  1614. })
  1615. } else if (this.activeName == 'second') {
  1616. for (let i = 0; i < patientArr.length; i++) {
  1617. for (let j = 0; j < patientArr[i].schedules.length; j++) {
  1618. if (patientArr[i].schedules.length > 0 && patientArr[i].schedules[j].dialysis_order == null) {
  1619. // 删除元素后改变i的值
  1620. patientArr[i].schedules.splice(j--, 1)
  1621. }
  1622. }
  1623. }
  1624. let arr1 = []
  1625. // let patientArr =
  1626. if (this.patientStateVal == 0) {
  1627. arr1 = patientArr
  1628. } else if (this.patientStateVal == 1) {
  1629. let arr = []
  1630. arr = patientArr
  1631. for (let i = 0; i < arr.length; i++) {
  1632. for (let j = 0; j < arr[i].schedules.length; j++) {
  1633. 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 == ''))) {
  1634. // 删除元素后改变i的值
  1635. arr[i].schedules.splice(j--, 1)
  1636. }
  1637. }
  1638. }
  1639. arr1 = arr
  1640. } else if (this.patientStateVal == 2) {
  1641. let arr = []
  1642. arr = patientArr
  1643. for (let i = 0; i < arr.length; i++) {
  1644. for (let j = 0; j < arr[i].schedules.length; j++) {
  1645. 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))) {
  1646. // 删除元素后改变i的值
  1647. arr[i].schedules.splice(j--, 1)
  1648. }
  1649. }
  1650. }
  1651. arr1 = arr
  1652. } else if (this.patientStateVal == 3) {
  1653. let arr = []
  1654. arr = patientArr
  1655. for (let i = 0; i < arr.length; i++) {
  1656. for (let j = 0; j < arr[i].schedules.length; j++) {
  1657. if (arr[i].schedules.length > 0 && (arr[i].schedules[j].dialysis_order != null && arr[i].schedules[j].dialysis_order.stage != 1)) {
  1658. // 删除元素后改变i的值
  1659. arr[i].schedules.splice(j--, 1)
  1660. }
  1661. }
  1662. }
  1663. arr1 = arr
  1664. } else if (this.patientStateVal == 4) {
  1665. let arr = []
  1666. arr = patientArr
  1667. for (let i = 0; i < arr.length; i++) {
  1668. for (let j = 0; j < arr[i].schedules.length; j++) {
  1669. if (arr[i].schedules.length > 0 && (arr[i].schedules[j].dialysis_order != null && arr[i].schedules[j].dialysis_order.stage != 2)) {
  1670. // 删除元素后改变i的值
  1671. arr[i].schedules.splice(j--, 1)
  1672. }
  1673. }
  1674. }
  1675. arr1 = arr
  1676. }
  1677. let arr2 = []
  1678. if (this.treatStateVal == 0) {
  1679. arr2 = JSON.parse(JSON.stringify(arr1))
  1680. } else if (this.treatStateVal == 2) {
  1681. let arr = []
  1682. arr = JSON.parse(JSON.stringify(arr1))
  1683. for (let i = 0; i < arr.length; i++) {
  1684. for (let j = 0; j < arr[i].schedules.length; j++) {
  1685. if (arr[i].schedules.length > 0 && arr[i].schedules[j].treatment_summary != null && arr[i].schedules[j].treatment_summary.dialysis_summary != '') {
  1686. // 删除元素后改变i的值
  1687. arr[i].schedules.splice(j--, 1)
  1688. }
  1689. }
  1690. }
  1691. arr2 = arr
  1692. } else if(this.treatStateVal == 3){
  1693. let arr = []
  1694. arr = JSON.parse(JSON.stringify(arr1))
  1695. for (let i = 0; i < arr.length; i++) {
  1696. for (let j = 0; j < arr[i].schedules.length; j++) {
  1697. if(arr[i].schedules[j].doctor_advice.length == 0){
  1698. arr[i].schedules.splice(j--, 1)
  1699. }
  1700. if(arr[i].schedules && arr[i].schedules[j] && arr[i].schedules[j].doctor_advice){
  1701. let sign = 0
  1702. arr[i].schedules[j].doctor_advice.map(item => {
  1703. if(item.check_state == 1){
  1704. sign++
  1705. }
  1706. })
  1707. if(sign == arr[i].schedules[j].doctor_advice.length && arr[i].schedules[j].doctor_advice.length > 0){
  1708. arr[i].schedules.splice(j--, 1)
  1709. }
  1710. }
  1711. }
  1712. }
  1713. arr2 = arr
  1714. }
  1715. let arr3 = []
  1716. if (this.scheduleStateVal == 0) {
  1717. arr3 = JSON.parse(JSON.stringify(arr2))
  1718. } else {
  1719. let arr = []
  1720. arr = JSON.parse(JSON.stringify(arr2))
  1721. for (let i = 0; i < arr.length; i++) {
  1722. for (let j = 0; j < arr[i].schedules.length; j++) {
  1723. if (this.scheduleStateVal != arr[i].schedules[j].schedule_type) {
  1724. // 删除元素后改变i的值
  1725. arr[i].schedules.splice(j--, 1)
  1726. }
  1727. }
  1728. }
  1729. arr3 = arr
  1730. }
  1731. let arr4 = []
  1732. if (this.zoneVal == 0) {
  1733. arr4 = JSON.parse(JSON.stringify(arr3))
  1734. } else {
  1735. let arr = []
  1736. arr = JSON.parse(JSON.stringify(arr3))
  1737. for (let i = 0; i < arr.length; i++) {
  1738. if (this.zoneVal != arr[i].zone_id) {
  1739. // 删除元素后改变i的值
  1740. arr.splice(i--, 1)
  1741. }
  1742. }
  1743. arr4 = arr
  1744. }
  1745. const newArr = []
  1746. arr4.map(item => {
  1747. newArr.push(...item.schedules)
  1748. })
  1749. if(this.patientStateVal == 1){
  1750. newArr.map(item => {
  1751. item.created_time = item.assessment_before_dislysis.created_time
  1752. })
  1753. newArr.sort(this.compare('created_time'))
  1754. }
  1755. this.tableData1 = newArr
  1756. const name = this.$route.query.patient_name
  1757. this.tableData1.map((item, index) => {
  1758. if (name == item.patient.name) {
  1759. // if (item.assessment_before_dislysis != null) {
  1760. // this.newTime = parseTime(item.assessment_before_dislysis.created_time, '{h}:{i}')
  1761. // }
  1762. setTimeout(() => {
  1763. this.$refs.tab1.setCurrentRow(this.tableData1[index])
  1764. }, 10)
  1765. }
  1766. })
  1767. }
  1768. },
  1769. compare(property){
  1770. return function(a,b){
  1771. var value1 = a[property];
  1772. var value2 = b[property];
  1773. return value2 - value1;
  1774. }
  1775. },
  1776. getTime(date){
  1777. date = new Date(date * 1000)
  1778. var Y = date.getFullYear() + '-';
  1779. var M = (date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1);
  1780. var D = (date.getDate() < 10 ? '0'+date.getDate() : date.getDate());
  1781. var h = (date.getHours() < 10 ? '0'+date.getHours() : date.getHours());
  1782. var m = (date.getMinutes() < 10 ? '0'+date.getMinutes() : date.getMinutes());
  1783. var s = (date.getSeconds() < 10 ? '0'+date.getSeconds() : date.getSeconds());
  1784. let strDate = h + ':' + m;
  1785. return strDate;
  1786. },
  1787. refresh(){
  1788. this.requestDialysisSchedules()
  1789. },
  1790. websocketSend(data) {
  1791. try {
  1792. this.websocket.send(JSON.stringify(data))
  1793. } catch (error) {
  1794. this.showError = true;
  1795. this.showIndex = 4;
  1796. this.errorInfo = "网络异常,请稍后退出重试!";
  1797. }
  1798. },
  1799. websocketMess() {
  1800. this.websocket.onmessage = e => {
  1801. let res = JSON.parse(e.data);
  1802. // let res = re.data;
  1803. // console.log('res3333333333',res)
  1804. if(res.channel == 'queue/join'){
  1805. let timeType = null
  1806. if(this.scheduleStateVal == 1){
  1807. timeType = 1
  1808. }else if(this.scheduleStateVal == 2){
  1809. timeType = 2
  1810. }else{
  1811. if(new Date().getHours() < 10){
  1812. timeType = 1
  1813. }else if(new Date().getHours() >= 10){
  1814. timeType = 2
  1815. }
  1816. }
  1817. let fisrtQueueInfo = []
  1818. this.newFisrtQueueInfo = res.data.fisrtQueueInfo
  1819. this.queueConfig = res.data.queueConfig
  1820. if(res.data.fisrtQueueInfo != null){
  1821. if(timeType == 1){
  1822. fisrtQueueInfo = res.data.fisrtQueueInfo.morning
  1823. if(fisrtQueueInfo.create_time){
  1824. fisrtQueueInfo.create_time = moment(parseInt(fisrtQueueInfo.create_time) * 1000).format('HH:mm')
  1825. }
  1826. }else if(timeType == 2){
  1827. fisrtQueueInfo = res.data.fisrtQueueInfo.afternoon
  1828. if(fisrtQueueInfo.create_time){
  1829. fisrtQueueInfo.create_time = moment(parseInt(fisrtQueueInfo.create_time) * 1000).format('HH:mm')
  1830. }
  1831. }
  1832. }
  1833. this.fisrtQueueInfo = fisrtQueueInfo
  1834. // this.fisrtQueueInfo = res.data.fisrtQueueInfo
  1835. let arr = res.data.patientQueueList.data
  1836. let waitingCalledArr = []
  1837. let calledArr = []
  1838. arr.map(item => {
  1839. if(item.status == 1){
  1840. // item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
  1841. waitingCalledArr.push(item)
  1842. }else if(item.status == 2){
  1843. // item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
  1844. calledArr.push(item)
  1845. }
  1846. })
  1847. this.waitingCalled = waitingCalledArr
  1848. this.called = calledArr
  1849. }else if(res.channel == 'allQueueList'){
  1850. let arr = res.data.queue_list.data
  1851. let waitingCalledArr = []
  1852. let calledArr = []
  1853. arr.map(item => {
  1854. if(item.status == 1){
  1855. // item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
  1856. waitingCalledArr.push(item)
  1857. }else if(item.status == 2){
  1858. // item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
  1859. calledArr.push(item)
  1860. }
  1861. })
  1862. this.waitingCalled = waitingCalledArr
  1863. this.called = calledArr
  1864. }else if(res.channel == 'patientCallInfo'){
  1865. res.data.patientInfo.create_time = moment(res.data.patientInfo.create_time * 1000).format('HH:mm')
  1866. this.fisrtQueueInfo = res.data.patientInfo
  1867. }else if(res.channel == 'fisrtQueueInfo'){
  1868. if(this.scheduleStateVal == 1){
  1869. timeType = 1
  1870. }else if(this.scheduleStateVal == 2){
  1871. timeType = 2
  1872. }else{
  1873. if(new Date().getHours() < 10){
  1874. timeType = 1
  1875. }else if(new Date().getHours() >= 10){
  1876. timeType = 2
  1877. }
  1878. }
  1879. let fisrtQueueInfo = []
  1880. this.newFisrtQueueInfo = res.data.patientInfo
  1881. if(res.data.patientInfo != null){
  1882. if(timeType == 1){
  1883. fisrtQueueInfo = res.data.patientInfo.morning
  1884. if(fisrtQueueInfo.create_time){
  1885. fisrtQueueInfo.create_time = moment(parseInt(fisrtQueueInfo.create_time) * 1000).format('HH:mm')
  1886. }
  1887. }else if(timeType == 2){
  1888. fisrtQueueInfo = res.data.patientInfo.afternoon
  1889. if(fisrtQueueInfo.create_time){
  1890. fisrtQueueInfo.create_time = moment(parseInt(fisrtQueueInfo.create_time) * 1000).format('HH:mm')
  1891. }
  1892. }
  1893. }
  1894. this.fisrtQueueInfo = fisrtQueueInfo
  1895. }
  1896. }
  1897. },
  1898. call(){
  1899. // console.log('patient_id',patient_id)
  1900. let org_id = parseInt(sessionStorage.getItem("org_id"));
  1901. let admin_user_id = parseInt(sessionStorage.getItem("admin_user_id"));
  1902. axios.get('/api/index/callpatient?org_id=' + org_id + '&patient_id=' + this.patient_id + '&admin_user_id=' + admin_user_id).then(res => {
  1903. // let patientArr = res.data.queue_list.data
  1904. // this.patientArr = patientArr
  1905. // this.$emit('child-event',this.patientArr)
  1906. if(res.data.data.patientInfo == null){
  1907. this.$message.error('已经是最后一位了');
  1908. return
  1909. }
  1910. if(res.data.code == 200){
  1911. this.$message({
  1912. message: res.data.msg,
  1913. type: 'success'
  1914. });
  1915. this.curPatient = res.data.data.patientInfo
  1916. let arr = []
  1917. let newArr = []
  1918. this.zone_schedules.map(item => {
  1919. newArr.push(...item.schedules)
  1920. })
  1921. newArr.map(item => {
  1922. arr.push(item.patient_id)
  1923. })
  1924. if(arr.indexOf(parseInt(res.data.data.patientInfo.patient_id)) > -1){
  1925. this.showView = false
  1926. this.$router.push({
  1927. path: '/dialysis/details',
  1928. query: {
  1929. patient_id: parseInt(res.data.data.patientInfo.patient_id),
  1930. date: this.$route.query.date,
  1931. patient_name: res.data.data.patientInfo.patient_name,
  1932. mode_id:newArr[arr.indexOf(parseInt(res.data.data.patientInfo.patient_id))].mode_id,
  1933. curPatientTime:res.data.data.patientInfo.create_time,
  1934. showView:false
  1935. }
  1936. })
  1937. }else {
  1938. this.showView = true
  1939. this.$router.push({
  1940. path: '/dialysis/details',
  1941. query: {
  1942. patient_id: parseInt(res.data.data.patientInfo.patient_id),
  1943. date: this.$route.query.date,
  1944. patient_name: res.data.data.patientInfo.patient_name,
  1945. mode_id:this.$route.query.mode_id,
  1946. curPatientTime:res.data.data.patientInfo.create_time,
  1947. showView:true
  1948. }
  1949. })
  1950. }
  1951. }
  1952. })
  1953. },
  1954. next(){
  1955. let schedule_type = null
  1956. if(new Date().getHours() < 11){
  1957. schedule_type = 1
  1958. }else {
  1959. schedule_type = 2
  1960. }
  1961. let org_id = parseInt(sessionStorage.getItem("org_id"));
  1962. let admin_user_id = parseInt(sessionStorage.getItem("admin_user_id"));
  1963. 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 => {
  1964. if(res.data.data.patientInfo == null){
  1965. this.$message.error('已经是最后一位了');
  1966. return
  1967. }
  1968. if(res.data.code == 200){
  1969. this.$message({
  1970. message: res.data.msg,
  1971. type: 'success'
  1972. });
  1973. this.curPatient = res.data.data.patientInfo
  1974. let arr = []
  1975. let newArr = []
  1976. this.zone_schedules.map(item => {
  1977. newArr.push(...item.schedules)
  1978. })
  1979. newArr.map(item => {
  1980. arr.push(item.patient_id)
  1981. })
  1982. if(arr.indexOf(parseInt(res.data.data.patientInfo.patient_id)) > -1){
  1983. this.showView = false
  1984. this.$router.push({
  1985. path: '/dialysis/details',
  1986. query: {
  1987. patient_id: parseInt(res.data.data.patientInfo.patient_id),
  1988. date: this.$route.query.date,
  1989. patient_name: res.data.data.patientInfo.patient_name,
  1990. mode_id:newArr[arr.indexOf(parseInt(res.data.data.patientInfo.patient_id))].mode_id,
  1991. curPatientTime:res.data.data.patientInfo.create_time,
  1992. showView:false
  1993. }
  1994. })
  1995. }else {
  1996. this.showView = true
  1997. this.$router.push({
  1998. path: '/dialysis/details',
  1999. query: {
  2000. patient_id: parseInt(res.data.data.patientInfo.patient_id),
  2001. date: this.$route.query.date,
  2002. patient_name: res.data.data.patientInfo.patient_name,
  2003. mode_id:this.$route.query.mode_id,
  2004. curPatientTime:res.data.data.patientInfo.create_time,
  2005. showView:true
  2006. }
  2007. })
  2008. }
  2009. }
  2010. })
  2011. },
  2012. getDates(time){
  2013. return moment(time * 1000).format('HH:mm:ss')
  2014. },
  2015. printAction: function() {
  2016. 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;}}'
  2017. const style1 = '@media print { .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: 170px;} @page {margin-top:10px;}}'
  2018. printJS({
  2019. printable: 'print_content',
  2020. type: 'html',
  2021. documentTitle: ' ',
  2022. style: style1,
  2023. scanStyles: false
  2024. })
  2025. },
  2026. getInitPrintData(){
  2027. var params = {
  2028. patient_id:this.$route.query.patient_id,
  2029. record_date:this.$route.query.date,
  2030. }
  2031. getInitPrintData(params).then(response=>{
  2032. if(response.data.state == 1){
  2033. var list = response.data.data.list
  2034. console.log("list2332322332",list)
  2035. this.printList = list
  2036. this.startVisibility = true
  2037. }
  2038. })
  2039. }
  2040. }
  2041. }
  2042. </script>
  2043. <style style="stylesheet/scss" lang="scss" scoped>
  2044. .details-bg {
  2045. background: #fff;
  2046. margin: 0 15px;
  2047. }
  2048. .printForm {
  2049. .title {
  2050. font-size: 30px;
  2051. font-weight: 500;
  2052. text-align: center;
  2053. line-height: 60px;
  2054. }
  2055. .info {
  2056. ul {
  2057. display: -webkit-box;
  2058. display: -moz-box;
  2059. display: -ms-flexbox;
  2060. display: -webkit-flex;
  2061. display: flex;
  2062. align-items: center;
  2063. -moz-box-sizing: border-box;
  2064. -webkit-box-sizing: border-box;
  2065. -o-box-sizing: border-box;
  2066. -ms-box-sizing: border-box;
  2067. box-sizing: border-box;
  2068. -webkit-justify-content: space-around;
  2069. -moz-justify-content: space-around;
  2070. -ms-justify-content: space-around;
  2071. -o-justify-content: space-around;
  2072. justify-content: space-around;
  2073. li {
  2074. display: flex;
  2075. box-sizing: border-box;
  2076. justify-content: space-around;
  2077. .name {
  2078. }
  2079. .InputBox {
  2080. padding: 0;
  2081. border: none;
  2082. border-bottom: 1px #e5e5e5 solid;
  2083. width: 60px;
  2084. outline: none;
  2085. }
  2086. }
  2087. }
  2088. }
  2089. .printTable {
  2090. tr {
  2091. padding: 2px;
  2092. th {
  2093. padding: 6px 4px;
  2094. }
  2095. td {
  2096. padding: 6px 4px;
  2097. }
  2098. }
  2099. }
  2100. }
  2101. .loadingBox{
  2102. display: flex;
  2103. .patientBox{
  2104. background: #fff;
  2105. }
  2106. .tip1{
  2107. background: #4fc7cb;
  2108. border-radius: 5px;
  2109. text-align: center;
  2110. font-size: 12px;
  2111. display: inline-block;
  2112. width: 60px;
  2113. color: #fff;
  2114. }
  2115. .tip2{
  2116. background: #ee8556;
  2117. border-radius: 5px;
  2118. text-align: center;
  2119. font-size: 12px;
  2120. display: inline-block;
  2121. width: 60px;
  2122. color: #fff;
  2123. }
  2124. .tip3{
  2125. background: #409eff;
  2126. border-radius: 5px;
  2127. text-align: center;
  2128. font-size: 12px;
  2129. display: inline-block;
  2130. width: 60px;
  2131. color: #fff;
  2132. }
  2133. .tip4{
  2134. background: #a8b3ba;
  2135. border-radius: 5px;
  2136. text-align: center;
  2137. font-size: 12px;
  2138. display: inline-block;
  2139. width: 60px;
  2140. color: #fff;
  2141. }
  2142. .tip5{
  2143. background: #7bce91;
  2144. border-radius: 5px;
  2145. text-align: center;
  2146. font-size: 12px;
  2147. display: inline-block;
  2148. width: 60px;
  2149. color: #fff;
  2150. }
  2151. }
  2152. </style>
  2153. <style lang="scss">
  2154. .loadingBox{
  2155. .el-loading-spinner{
  2156. top:10%;
  2157. }
  2158. .el-button--small, .el-button--small.is-round{
  2159. padding:9px 10px;
  2160. }
  2161. .el-date-editor{
  2162. .el-input__inner{
  2163. padding-right:0px;
  2164. }
  2165. }
  2166. .el-table td, .el-table th{
  2167. text-align: center;
  2168. }
  2169. .el-table .cell{
  2170. padding: 0;
  2171. }
  2172. }
  2173. </style>