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

index.vue 74KB

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