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

index.vue 94KB

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