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

index.vue 84KB

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