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

index.vue 70KB

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