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

index.vue 69KB

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