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

dialysisIndex.vue 31KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991
  1. <template>
  2. <div class="main-contain">
  3. <div
  4. class="loadingBox"
  5. v-loading="loading"
  6. element-loading-text="拼命加载中"
  7. element-loading-spinner="el-icon-loading"
  8. element-loading-background="rgba(0, 0, 0, 0.8)"
  9. v-if="dialysisShow"
  10. >
  11. <div style="padding-top: 56px;width:100%;" >
  12. <nav-igation
  13. ref="nav"
  14. title="弹窗导航"
  15. @advice="adviceFunc"
  16. :patient="patient"
  17. :schedual="schedual"
  18. :prescription="prescription"
  19. :solution="solution"
  20. :receiver_treatment_access="receiver_treatment_access"
  21. :predialysis_evaluation="predialysis_evaluation"
  22. :doctor_advices="doctor_advices"
  23. :double_check="double_check"
  24. :assessment_after_dislysis="assessment_after_dislysis"
  25. :treatment_summary="treatment_summary"
  26. :monitor_records="monitor_records"
  27. :dialysis_order="dialysis_order"
  28. :admin_users="admin_users"
  29. :devices="devices"
  30. :device_numbers="device_numbers"
  31. :admin_user_map="admin_user_map"
  32. :device_map="device_map"
  33. :device_number_map="device_number_map"
  34. :niprocart_info="niprocart_info"
  35. :jms_info="jms_info"
  36. :fistula_needle_set_info="fistula_needle_set_info"
  37. :fistula_needle_set_16_info="fistula_needle_set_16_info"
  38. :hemoperfusion_info="hemoperfusion_info"
  39. :dialyser_sterilised_info="dialyser_sterilised_info"
  40. :filtryzer_info="filtryzer_info"
  41. :dialyzers_info="dialyzers_info"
  42. :injector_info="injector_info"
  43. :bloodlines_info="bloodlines_info"
  44. :tubingHemodialysis_info="tubingHemodialysis_info"
  45. :safe_package_info="safe_package_info"
  46. :aliquid_info="aliquid_info"
  47. :config="config"
  48. :longAdvices="longAdvices"
  49. :waitUploadAdvices="waitUploadAdvices"
  50. :is_open="is_open"
  51. :last_predialysis_evaluation="lastPredialysisEvaluation"
  52. :last_monitor_record="lastMonitorRecord"
  53. :last_assessment_after_dislysis="lastAssessmentAfterDislysis"
  54. :last_dialysis_prescribe="lastDialysisPrescribe"
  55. :last_dryWeight_dislysis="lastDryWeightDislysis"
  56. :special_premission="headNurses"
  57. @assessmentAfterDislysis="assessmentAfterDislysisFunc"
  58. :system_prescribe="system_prescribe"
  59. :his_is_open="his_is_open"
  60. :lastAssessment="lastAssessment"
  61. :stockType="stockType"
  62. >
  63. </nav-igation>
  64. <basic-infor
  65. :patient="patient"
  66. :device_number="schedual.id == 0 ? '' : schedual.device_number.number"
  67. :steps="steps"
  68. title="基本信息"
  69. ></basic-infor>
  70. <dialysis-prescription
  71. :prescription="prescription"
  72. :solution="solution"
  73. :device_map="device_map"
  74. :preparestock="preparestock"
  75. title="透析处方"
  76. ></dialysis-prescription>
  77. <!-- <past-data class="往期数据"></past-data> -->
  78. <div style="height: 20px;background-color: #f6f8f9"></div>
  79. <accepts-assessment
  80. :record="receiver_treatment_access"
  81. title="接诊评估"
  82. ></accepts-assessment>
  83. <assessment-before
  84. :record="predialysis_evaluation"
  85. ref="assessment_before"
  86. title="透前评估"
  87. ></assessment-before>
  88. <stat-order
  89. ref="stat_order"
  90. :advices="doctor_advices"
  91. :doctor_map="admin_user_map"
  92. title="临时医嘱"
  93. ></stat-order>
  94. <double-check
  95. ref="double_check"
  96. :record="double_check"
  97. :admin_map="admin_user_map"
  98. title="双人核对 "
  99. ></double-check>
  100. <dialysis-computer
  101. ref="dialysis_computer"
  102. :record="dialysis_order"
  103. :admin_map="admin_user_map"
  104. :device_number_map="device_number_map"
  105. title="透析上机 "
  106. ></dialysis-computer>
  107. <dialysis-monitoring
  108. ref="monitoring"
  109. :monitores="monitor_records"
  110. title="透析监测"
  111. ></dialysis-monitoring>
  112. <dialysis-off
  113. ref="dialysis_off"
  114. :record="dialysis_order"
  115. :admin_map="admin_user_map"
  116. title="透析下机 "
  117. ></dialysis-off>
  118. <assessment-after
  119. ref="assessment_after"
  120. :record="assessment_after_dislysis"
  121. title="透后评估"
  122. ></assessment-after>
  123. <treatment-of
  124. ref="treatment_of"
  125. :record="treatment_summary"
  126. title="治疗小结"
  127. ></treatment-of>
  128. </div>
  129. </div>
  130. <div style="padding-top: 56px;width:100%;text-align:center;font-size:22px;color:red;" v-else>该患者未排班,请先去排班</div>
  131. </div>
  132. </template>
  133. <script>
  134. const moment = require('moment')
  135. import axios from 'axios'
  136. import NavIgation from '@/xt_pages/dialysis/details/NavIgation'
  137. import BasicInfor from '@/xt_pages/dialysis/details/BasicInfor'
  138. import DialysisPrescription from '@/xt_pages/dialysis/details/DialysisPrescription'
  139. import PastData from '@/xt_pages/dialysis/details/pastData'
  140. import AcceptsAssessment from '@/xt_pages/dialysis/details/acceptsAssessment'
  141. import AssessmentBefore from '@/xt_pages/dialysis/details/assessmentBefore'
  142. import StatOrder from '@/xt_pages/dialysis/details/statOrder'
  143. import DialysisComputer from '@/xt_pages/dialysis/details/dialysisComputer'
  144. import DoubleCheck from '@/xt_pages/dialysis/details/doubleCheck'
  145. import DialysisMonitoring from '@/xt_pages/dialysis/details/dialysisMonitoring'
  146. import DialysisOff from '@/xt_pages/dialysis/details/dialysisOff'
  147. import AssessmentAfter from '@/xt_pages/dialysis/details/assessmentAfter'
  148. import TreatmentOf from '@/xt_pages/dialysis/details/treatmentOf'
  149. import OperationStaff from '@/xt_pages/dialysis/details/operationStaff'
  150. import {
  151. getDialysisScheduleDetail,
  152. getLongAdvice,
  153. getDialysisRecordInitData,
  154. getDialysisSchedules
  155. } from '@/api/dialysis_record'
  156. import { parseTime } from '@/utils'
  157. import BreadCrumb from '@/xt_pages/components/bread-crumb'
  158. export default {
  159. name: 'index',
  160. components: {
  161. NavIgation,
  162. BasicInfor,
  163. DialysisPrescription,
  164. PastData,
  165. AcceptsAssessment,
  166. AssessmentBefore,
  167. StatOrder,
  168. DialysisComputer,
  169. DoubleCheck,
  170. DialysisMonitoring,
  171. DialysisOff,
  172. AssessmentAfter,
  173. TreatmentOf,
  174. OperationStaff,
  175. BreadCrumb
  176. },
  177. props:{
  178. record_date:String,
  179. patientid:Number,
  180. dialysisShow:Boolean
  181. },
  182. data() {
  183. return {
  184. crumbs: [
  185. { path: false, name: '透析管理' },
  186. { path: false, name: '透析记录' },
  187. { path: false, name: '透析单' }
  188. ],
  189. dialogFormVisible: false,
  190. orders: false,
  191. loading: false,
  192. patient_id: 0,
  193. date: 0,
  194. longAdvices: [],
  195. waitUploadAdvices: [],
  196. is_open: 0,
  197. targetAdvices: [],
  198. patient: { id: 0 }, // 患者信息
  199. schedual: { id: 0 }, // 患者排班信息
  200. prescription: { id: 0 }, // 透析处方
  201. solution: { id: 0 }, // 透析方案
  202. system_prescribe: { id: 0 },
  203. receiver_treatment_access: { id: 0 }, // 接诊评估
  204. predialysis_evaluation: { id: 0 }, // 透前评估
  205. doctor_advices: [], // 临时医嘱
  206. double_check: { id: 0 }, // 双人核对
  207. assessment_after_dislysis: { id: 0 }, // 透后评估
  208. treatment_summary: { id: 0 }, // 治疗小结
  209. monitor_records: [], // 透析监测
  210. dialysis_order: { id: 0 }, // 透析记录
  211. admin_users: [], // 系统用户列表
  212. devices: [], // 设备
  213. device_numbers: [], // 床位号
  214. admin_user_map: {}, // {user_id: admin_user object}
  215. device_map: {}, // {device_id: device}
  216. device_number_map: {}, // {device_number_id: device_number}
  217. niprocart_info: [],
  218. jms_info: [],
  219. fistula_needle_set_info: [],
  220. fistula_needle_set_16_info: [],
  221. hemoperfusion_info: [],
  222. dialyser_sterilised_info: [],
  223. filtryzer_info: [],
  224. dialyzers_info: [],
  225. injector_info: [],
  226. bloodlines_info: [],
  227. tubingHemodialysis_info: [],
  228. safe_package_info: [],
  229. aliquid_info: [],
  230. config: {},
  231. his_is_open:0,
  232. lastPredialysisEvaluation: { id: 0 },
  233. lastMonitorRecord: { id: 0 },
  234. lastAssessmentAfterDislysis: { id: 0 },
  235. lastDryWeightDislysis: { id: 0 },
  236. lastAssessment:{id:0},
  237. headNurses: [],
  238. lastDialysisPrescribe: { id: 0 },
  239. //
  240. activeName: 'first',
  241. selected_date: new Date(),
  242. // search_input 和 search_keyword,使输入关键字时不会经常刷新 filtedSchedules
  243. search_keyword: '', // 确定用于搜索的关键字
  244. search_input: '', // 输入中的关键字
  245. patient_state: [
  246. { value: 0, label: '全部患者' },
  247. { value: 1, label: '已签到' },
  248. { value: 2, label: '未签到' },
  249. { value: 3, label: '已上机' },
  250. { value: 4, label: '已下机' }
  251. ],
  252. patientStateVal: 0,
  253. treat_state: [
  254. { value: 0, label: '全部治疗' },
  255. { value: 1, label: '待开处方' },
  256. { value: 2, label: '待开小结' },
  257. { value: 3, label: '待医嘱核对' },
  258. ],
  259. treatStateVal: 0,
  260. schedule_options: [
  261. { value: 0, label: '全部班' },
  262. { value: 1, label: '上午' },
  263. { value: 2, label: '下午' },
  264. { value: 3, label: '晚上' }
  265. ],
  266. scheduleStateVal: 0,
  267. zone_options: [
  268. { id: 0, text: '全部分区' }
  269. ],
  270. zoneVal: 0,
  271. tableData: [],
  272. tableData1: [],
  273. arr: [],
  274. newName: '',
  275. newTime: '',
  276. scheudle_mode:"",
  277. showView:false,
  278. curPatient:{},
  279. queueConfig:{},
  280. stockType:[],
  281. preparestock:[],
  282. dialysisShow:false
  283. }
  284. },
  285. created() {
  286. var patient_id = this.patientid
  287. var date = this.record_date
  288. this.patient_id = patient_id
  289. this.date = date
  290. var ymd = parseTime(new Date(), '{y}-{m}-{d}')
  291. getDialysisSchedules(ymd).then(rs => {
  292. var resp = rs.data
  293. if (resp.state == 1) {
  294. var schedules = resp.data.schedules
  295. let arr = []
  296. schedules.map(item => {
  297. if(item.patient_id == this.patient_id){
  298. arr.push(item.patient_id)
  299. }
  300. })
  301. if(arr.length > 0){
  302. this.dialysisShow = true
  303. }else{
  304. this.dialysisShow = false
  305. }
  306. console.log('this.dialysisShowthis.dialysisShowthis.dialysisShow',this.dialysisShow)
  307. } else {
  308. this.$message.error(resp.msg)
  309. }
  310. })
  311. },
  312. mounted() {
  313. if(this.dialysisShow == true){
  314. this.getScheduleDetail()
  315. this.getLongAdvice()
  316. }
  317. },
  318. watch:{
  319. patientid:{
  320. handler(newVal){
  321. var ymd = parseTime(new Date(), '{y}-{m}-{d}')
  322. getDialysisSchedules(ymd).then(rs => {
  323. var resp = rs.data
  324. if (resp.state == 1) {
  325. var schedules = resp.data.schedules
  326. let arr = []
  327. schedules.map(item => {
  328. if(item.patient_id == this.patient_id){
  329. arr.push(item.patient_id)
  330. }
  331. })
  332. if(arr.length > 0){
  333. this.dialysisShow = true
  334. }else{
  335. this.dialysisShow = false
  336. }
  337. console.log('this.dialysisShowthis.dialysisShowthis.dialysisShow',this.dialysisShow)
  338. } else {
  339. this.$message.error(resp.msg)
  340. }
  341. })
  342. console.log('执行执行执行执行执行执行',this.dialysisShow)
  343. if(this.dialysisShow == true){
  344. console.log('执行')
  345. this.patient_id = newVal
  346. this.getScheduleDetail()
  347. this.getLongAdvice()
  348. }
  349. },
  350. deep:true
  351. },
  352. },
  353. computed: {
  354. websocket() {
  355. return this.$store.state.user.websocket;
  356. },
  357. steps: function() {
  358. var steps = [
  359. { title: '透析处方', finish: false },
  360. { title: '接诊评估', finish: false },
  361. { title: '透前评估', finish: false },
  362. { title: '临时医嘱', finish: false },
  363. { title: '双人核对', finish: false },
  364. { title: '透析上机', finish: false },
  365. { title: '透析监测', finish: false },
  366. { title: '透析下机', finish: false },
  367. { title: '透后评估', finish: false },
  368. { title: '治疗小结', finish: false }
  369. ]
  370. steps[0].finish = this.prescription.id && this.prescription.creater > 0
  371. steps[1].finish = this.receiver_treatment_access.id > 0
  372. steps[2].finish =
  373. this.predialysis_evaluation.id > 0 &&
  374. this.predialysis_evaluation.creater > 0
  375. steps[3].finish = this.doctor_advices.length > 0
  376. steps[5].finish = this.dialysis_order.id > 0
  377. steps[7].finish =
  378. this.dialysis_order.id > 0 && this.dialysis_order.stage == 2
  379. steps[4].finish =
  380. this.double_check.id > 0 &&
  381. this.double_check.creater > 0 &&
  382. this.double_check.modifier > 0
  383. steps[6].finish = this.monitor_records.length > 0
  384. steps[8].finish =
  385. this.assessment_after_dislysis.id > 0 &&
  386. this.assessment_after_dislysis.creater > 0
  387. steps[9].finish = this.treatment_summary.id > 0
  388. return steps
  389. },
  390. filtedSchedules: function() {
  391. var search_keyword = this.search_keyword
  392. if (search_keyword.length > 0) {
  393. var schedules = []
  394. for (let o_i = 0; o_i < this.zone_schedules.length; o_i++) {
  395. const scheduleInfo = this.zone_schedules[o_i]
  396. var originSchedules = scheduleInfo.schedules
  397. if (originSchedules.length == 0) {
  398. continue
  399. }
  400. var filtedSchedules = []
  401. for (let s_i = 0; s_i < originSchedules.length; s_i++) {
  402. const schedule = originSchedules[s_i]
  403. if (schedule.patient.name.indexOf(search_keyword) != -1) {
  404. filtedSchedules.push(schedule)
  405. // break
  406. }
  407. }
  408. if (filtedSchedules.length > 0) {
  409. schedules.push({ zone_id: scheduleInfo.zone_id, zone_name: scheduleInfo.zone_name, schedules: filtedSchedules })
  410. }
  411. }
  412. return schedules
  413. }
  414. // var zone_selected = this.zoneVal
  415. // var timetype_selected = this.scheduleStateVal
  416. // if ((zone_selected == 0 && timetype_selected == 0) || this.zone_options.length <= 1) {
  417. // var schedules = []
  418. // for (let index = 0; index < this.zone_schedules.length; index++) {
  419. // const scheduleInfo = this.zone_schedules[index]
  420. // if (scheduleInfo.schedules.length != 0) {
  421. // schedules.push(scheduleInfo)
  422. // }
  423. // }
  424. // return schedules
  425. // }
  426. // var schedules = []
  427. // for (let o_i = 0; o_i < this.zone_schedules.length; o_i++) {
  428. // const scheduleInfo = this.zone_schedules[o_i]
  429. // if (zone_selected == scheduleInfo.zone_id && timetype_selected == 0) {
  430. // if (scheduleInfo.schedules.length == 0) {
  431. // return []
  432. // } else {
  433. // return [scheduleInfo]
  434. // }
  435. // }
  436. // var originSchedules = scheduleInfo.schedules
  437. // if (originSchedules.length == 0) {
  438. // continue
  439. // }
  440. // var filtedSchedules = []
  441. // for (let s_i = 0; s_i < originSchedules.length; s_i++) {
  442. // const schedule = originSchedules[s_i]
  443. // if (zone_selected != 0) {
  444. // if (zone_selected == schedule.device_number.zone.id) {
  445. // if (timetype_selected == 0 || schedule.schedule_type == timetype_selected) {
  446. // filtedSchedules.push(schedule)
  447. // }
  448. // }
  449. // } else {
  450. // if (timetype_selected == 0 || schedule.schedule_type == timetype_selected) {
  451. // filtedSchedules.push(schedule)
  452. // }
  453. // }
  454. // }
  455. // if (filtedSchedules.length > 0) {
  456. // schedules.push({ zone_id: scheduleInfo.zone_id, zone_name: scheduleInfo.zone_name, schedules: filtedSchedules })
  457. // }
  458. // }
  459. // return schedules
  460. }
  461. },
  462. methods: {
  463. adviceFunc() {
  464. this.getScheduleDetail()
  465. },
  466. getLongAdvice() {
  467. const params = {
  468. patient_id: this.patient_id
  469. }
  470. getLongAdvice(params).then(rs => {
  471. var resp = rs.data
  472. if (resp.state == 1) {
  473. var status = parseInt(resp.data.status)
  474. switch (status) {
  475. case 2:
  476. var totalAdvice = resp.data.advices
  477. var longAdvicesTwo = resp.data.advices_two
  478. var waitUploadAdvices = []
  479. for (let i = 0; i < totalAdvice.length; i++) {
  480. totalAdvice[i]['isCheck'] = 1
  481. }
  482. for (let i = 0; i < totalAdvice.length; i++) {
  483. for (let a = 0; a < longAdvicesTwo.length; a++) {
  484. if (
  485. totalAdvice[i].template_id ==
  486. longAdvicesTwo[a].template_id &&
  487. totalAdvice[i].frequency_type ==
  488. longAdvicesTwo[a].frequency_type
  489. ) {
  490. totalAdvice[i]['isCheck'] = 0
  491. }
  492. }
  493. }
  494. for (let i = 0; i < totalAdvice.length; i++) {
  495. if (totalAdvice[i].isCheck == 1) {
  496. waitUploadAdvices.push(totalAdvice[i])
  497. }
  498. }
  499. this.is_open = resp.data.is_open_remind
  500. if(this.his_is_open == 1){
  501. this.is_open = 0
  502. }
  503. this.longAdvices = totalAdvice
  504. this.waitUploadAdvices = waitUploadAdvices
  505. break
  506. }
  507. } else {
  508. this.$message.error(resp.msg)
  509. }
  510. })
  511. },
  512. assessmentAfterDislysisFunc: function(val) {
  513. for (var index in val) {
  514. this.$set(this.assessment_after_dislysis, index, val[index])
  515. }
  516. },
  517. didDelMonitor(record_id) {
  518. var mrl = this.monitor_records.length
  519. for (let index = 0; index < mrl; index++) {
  520. if (this.monitor_records[index].id == record_id) {
  521. this.monitor_records.splice(index, 1)
  522. break
  523. }
  524. }
  525. },
  526. getScheduleDetail: function() {
  527. this.loading = true
  528. // var dateStr = parseTime(this.date, '{y}-{m}-{d}')
  529. // if(this.$route.query.showView == true){
  530. // this.loading = false
  531. // return
  532. // }
  533. console.log('this.patient_id',this.patient_id)
  534. console.log('this.date',this.date)
  535. this.doctor_advices = []
  536. getDialysisScheduleDetail(this.patient_id, this.date).then(rs => {
  537. var resp = rs.data
  538. if (resp.state == 1) {
  539. var patient = resp.data.patient // 患者信息
  540. var schedual = resp.data.schedual // 患者排班信息
  541. var prescription = resp.data.prescription // 透析处方
  542. if (prescription != null) {
  543. if (prescription.body_fluid == -2) {
  544. prescription.body_fluid = 0
  545. }
  546. }
  547. var solution = resp.data.solution // 透析方案
  548. var receiver_treatment_access = resp.data.receiver_treatment_access // 接诊评估
  549. var predialysis_evaluation = resp.data.predialysis_evaluation // 透前评估
  550. console.log("透器评估",predialysis_evaluation)
  551. if (predialysis_evaluation != null) {
  552. if (predialysis_evaluation.blood_access_part_id == -2) {
  553. predialysis_evaluation.blood_access_part_id = 0
  554. }
  555. }
  556. var doctor_advices = resp.data.doctor_advices // 临时医嘱
  557. var double_check = resp.data.double_check // 双人核对
  558. var assessment_after_dislysis = resp.data.assessment_after_dislysis // 透后评估
  559. var treatment_summary = resp.data.treatment_summary // 治疗小结
  560. var monitor_records = resp.data.monitor_records // 透析监测
  561. var dialysis_order = resp.data.dialysis_order // 透析记录
  562. var niprocart_info = resp.data.niprocart_info
  563. var jms_info = resp.data.jms_info
  564. var fistula_needle_set_info = resp.data.fistula_needle_set_info
  565. var fistula_needle_set_16_info = resp.data.fistula_needle_set_16_info
  566. var hemoperfusion_info = resp.data.hemoperfusion_info
  567. var dialyser_sterilised_info = resp.data.dialyser_sterilised_info
  568. var filtryzer_info = resp.data.filtryzer_info
  569. var dialyzers_info = resp.data.dialyzers_info
  570. var injector_info = resp.data.injector_info
  571. var bloodlines_info = resp.data.bloodlines_info
  572. var tubingHemodialysis_info = resp.data.tubingHemodialysis_info
  573. var safe_package_info = resp.data.safe_package_info
  574. var aliquid_info = resp.data.aliquid_info
  575. var lastPredialysisEvaluation = resp.data.lastPredialysisEvaluation
  576. if (lastPredialysisEvaluation != null) {
  577. if (lastPredialysisEvaluation.blood_access_part_id == -2) {
  578. lastPredialysisEvaluation.blood_access_part_id = 0
  579. }
  580. }
  581. var lastMonitorRecord = resp.data.lastMonitorRecord
  582. var lastAssessmentAfterDislysis = resp.data.lastAssessmentAfterDislysis
  583. var lastDialysisPrescribe = resp.data.lastDialysisPrescribe
  584. var lastDryWeightDislysis = resp.data.lastDryWeightDislysis
  585. var system_prescribe = resp.data.system_prescribe
  586. var lastAssessment = resp.data.lastAssessment
  587. console.log("最后一次血管通路",lastAssessment)
  588. this.$refs.nav.setLastRecord(
  589. lastPredialysisEvaluation,
  590. lastMonitorRecord,
  591. lastAssessmentAfterDislysis,
  592. lastDialysisPrescribe,
  593. lastDryWeightDislysis,
  594. schedual,
  595. system_prescribe,
  596. lastAssessment,
  597. )
  598. var headNurses = resp.data.headNurse
  599. var config = resp.data.config
  600. this.lastPredialysisEvaluation = lastPredialysisEvaluation
  601. this.lastMonitorRecord = lastMonitorRecord
  602. this.lastAssessmentAfterDislysis = lastAssessmentAfterDislysis
  603. this.lastDialysisPrescribe = lastDialysisPrescribe
  604. this.lastDryWeightDislysis = lastDryWeightDislysis
  605. this.lastAssessment = lastAssessment
  606. this.headNurses = headNurses
  607. this.system_prescribe = system_prescribe
  608. this.niprocart_info = []
  609. this.jms_info = []
  610. this.fistula_needle_set_info = []
  611. this.fistula_needle_set_16_info = []
  612. this.hemoperfusion_info = []
  613. this.dialyser_sterilised_info = []
  614. this.filtryzer_info = []
  615. this.dialyzers_info = []
  616. this.injector_info = []
  617. this.bloodlines_info = []
  618. this.tubingHemodialysis_info = []
  619. this.safe_package_info = []
  620. this.aliquid_info = []
  621. this.niprocart_info = niprocart_info
  622. this.jms_info = jms_info
  623. this.fistula_needle_set_info = fistula_needle_set_info
  624. this.fistula_needle_set_16_info = fistula_needle_set_16_info
  625. this.hemoperfusion_info = hemoperfusion_info
  626. this.dialyser_sterilised_info = dialyser_sterilised_info
  627. this.filtryzer_info = filtryzer_info
  628. this.dialyzers_info = dialyzers_info
  629. this.injector_info = injector_info
  630. this.bloodlines_info = bloodlines_info
  631. this.tubingHemodialysis_info = tubingHemodialysis_info
  632. this.safe_package_info = safe_package_info
  633. this.aliquid_info = aliquid_info
  634. this.config = config
  635. this.patient = patient
  636. this.schedual = schedual == null ? { id: 0 } : schedual
  637. this.prescription = prescription == null ? { id: 0 } : prescription
  638. this.solution = solution == null ? { id: 0 } : solution
  639. this.receiver_treatment_access =
  640. receiver_treatment_access == null
  641. ? { id: 0 }
  642. : receiver_treatment_access
  643. this.predialysis_evaluation =
  644. predialysis_evaluation == null ? { id: 0 } : predialysis_evaluation
  645. this.doctor_advices = doctor_advices == null ? [] : doctor_advices
  646. this.double_check = double_check == null ? { id: 0 } : double_check
  647. this.assessment_after_dislysis =
  648. assessment_after_dislysis == null
  649. ? { id: 0 }
  650. : assessment_after_dislysis
  651. this.treatment_summary =
  652. treatment_summary == null ? { id: 0 } : treatment_summary
  653. this.monitor_records = monitor_records == null ? [] : monitor_records
  654. this.dialysis_order =
  655. dialysis_order == null ? { id: 0 } : dialysis_order
  656. this.admin_users = resp.data.doctors
  657. this.devices = resp.data.devices
  658. this.device_numbers = resp.data.device_numbers
  659. var his_doctor_advices = resp.data.his_advices
  660. this.his_is_open = resp.data.is_open_config.is_open
  661. console.log(this.his_is_open)
  662. var stockType = resp.data.stockType
  663. this.stockType = stockType
  664. console.log("stockTYPW",stockType)
  665. var prepare = resp.data.prepare
  666. this.preparestock = prepare
  667. console.log("prepare222222",prepare)
  668. for (let i = 0; i < this.doctor_advices.length; i++){
  669. this.doctor_advices[i]['origin'] = 1
  670. }
  671. if (his_doctor_advices != null) {
  672. for (let i = 0; i < his_doctor_advices.length; i++) {
  673. his_doctor_advices[i]['origin'] = 2
  674. his_doctor_advices[i]['way'] = 1
  675. this.doctor_advices.push(his_doctor_advices[i])
  676. }
  677. }
  678. const obj = {}
  679. this.doctor_advices = this.doctor_advices.reduce((cur, next) => {
  680. obj[next.id] ? '' : obj[next.id] = true && cur.push(next)
  681. return cur
  682. }, []) // 设置cur默认类型为数组,并且初始值为空的数组
  683. console.log(this.doctor_advices)
  684. var device_map = {}
  685. for (let index = 0; index < this.devices.length; index++) {
  686. const device = this.devices[index]
  687. device_map[device.id] = device
  688. }
  689. this.device_map = device_map
  690. var admin_map = {}
  691. for (let index = 0; index < this.admin_users.length; index++) {
  692. const admin = this.admin_users[index]
  693. admin_map[admin.id] = admin
  694. }
  695. this.admin_user_map = admin_map
  696. var device_number_map = {}
  697. for (let index = 0; index < this.device_numbers.length; index++) {
  698. const device_number = this.device_numbers[index]
  699. device_number_map[device_number.id] = device_number
  700. }
  701. this.device_number_map = device_number_map
  702. } else {
  703. // this.$message.error(resp.msg)
  704. console.log("报错提示")
  705. this.$message.error("该患者今日未排班,无法使用此模块,请先排班!")
  706. }
  707. if (this.lastDialysisPrescribe != null) {
  708. delete this.lastDialysisPrescribe.target_ultrafiltration
  709. }
  710. if (this.solution != null) {
  711. delete this.solution.target_ultrafiltration
  712. }
  713. if(this.predialysis_evaluation.id > 0){
  714. this.newTime = parseTime(this.predialysis_evaluation.created_time, '{h}:{i}')
  715. }
  716. this.loading = false
  717. })
  718. },
  719. printOrder() {
  720. var xtdate = parseTime(this.date, '{y}-{m}-{d}')
  721. this.$router.push(
  722. '/dialysis/print?xtdate=' + xtdate + '&xtno=' + this.patient.dialysis_no
  723. )
  724. },
  725. processedDialysisSchedules: function(schedules, zone_options) {
  726. var zoneMap = {}
  727. var scheduleMap = {}
  728. for (let z_i = 0; z_i < zone_options.length; z_i++) {
  729. const zone = zone_options[z_i]
  730. if (zone.id == 0) {
  731. continue
  732. }
  733. scheduleMap[zone.id] = []
  734. }
  735. for (let index = 0; index < schedules.length; index++) {
  736. const schedule = schedules[index]
  737. scheduleMap[schedule.device_number.zone.id].push(schedule)
  738. }
  739. var zone_schedules = []
  740. for (let index = 0; index < zone_options.length; index++) {
  741. const zone = zone_options[index]
  742. if (zone.id == 0) {
  743. continue
  744. }
  745. var schedules = scheduleMap[zone.id]
  746. zone_schedules.push({ zone_id: zone.id, zone_name: zone.text, schedules: schedules })
  747. }
  748. return zone_schedules
  749. },
  750. getTime(date){
  751. date = new Date(date * 1000)
  752. var Y = date.getFullYear() + '-';
  753. var M = (date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1);
  754. var D = (date.getDate() < 10 ? '0'+date.getDate() : date.getDate());
  755. var h = (date.getHours() < 10 ? '0'+date.getHours() : date.getHours());
  756. var m = (date.getMinutes() < 10 ? '0'+date.getMinutes() : date.getMinutes());
  757. var s = (date.getSeconds() < 10 ? '0'+date.getSeconds() : date.getSeconds());
  758. let strDate = h + ':' + m;
  759. return strDate;
  760. },
  761. getDates(time){
  762. return moment(time * 1000).format('HH:mm:ss')
  763. }
  764. }
  765. }
  766. </script>
  767. <style style="stylesheet/scss" lang="scss" scoped>
  768. .details-bg {
  769. background: #fff;
  770. margin: 0 15px;
  771. }
  772. .printForm {
  773. .title {
  774. font-size: 30px;
  775. font-weight: 500;
  776. text-align: center;
  777. line-height: 60px;
  778. }
  779. .info {
  780. ul {
  781. display: -webkit-box;
  782. display: -moz-box;
  783. display: -ms-flexbox;
  784. display: -webkit-flex;
  785. display: flex;
  786. align-items: center;
  787. -moz-box-sizing: border-box;
  788. -webkit-box-sizing: border-box;
  789. -o-box-sizing: border-box;
  790. -ms-box-sizing: border-box;
  791. box-sizing: border-box;
  792. -webkit-justify-content: space-around;
  793. -moz-justify-content: space-around;
  794. -ms-justify-content: space-around;
  795. -o-justify-content: space-around;
  796. justify-content: space-around;
  797. li {
  798. display: flex;
  799. box-sizing: border-box;
  800. justify-content: space-around;
  801. .name {
  802. }
  803. .InputBox {
  804. padding: 0;
  805. border: none;
  806. border-bottom: 1px #e5e5e5 solid;
  807. width: 60px;
  808. outline: none;
  809. }
  810. }
  811. }
  812. }
  813. .printTable {
  814. tr {
  815. padding: 2px;
  816. th {
  817. padding: 6px 4px;
  818. }
  819. td {
  820. padding: 6px 4px;
  821. }
  822. }
  823. }
  824. }
  825. .loadingBox{
  826. display: flex;
  827. .patientBox{
  828. background: #fff;
  829. }
  830. .tip1{
  831. background: #4fc7cb;
  832. border-radius: 5px;
  833. text-align: center;
  834. font-size: 12px;
  835. display: inline-block;
  836. width: 60px;
  837. color: #fff;
  838. }
  839. .tip2{
  840. background: #ee8556;
  841. border-radius: 5px;
  842. text-align: center;
  843. font-size: 12px;
  844. display: inline-block;
  845. width: 60px;
  846. color: #fff;
  847. }
  848. .tip3{
  849. background: #409eff;
  850. border-radius: 5px;
  851. text-align: center;
  852. font-size: 12px;
  853. display: inline-block;
  854. width: 60px;
  855. color: #fff;
  856. }
  857. .tip4{
  858. background: #a8b3ba;
  859. border-radius: 5px;
  860. text-align: center;
  861. font-size: 12px;
  862. display: inline-block;
  863. width: 60px;
  864. color: #fff;
  865. }
  866. .tip5{
  867. background: #7bce91;
  868. border-radius: 5px;
  869. text-align: center;
  870. font-size: 12px;
  871. display: inline-block;
  872. width: 60px;
  873. color: #fff;
  874. }
  875. }
  876. </style>
  877. <style lang="scss">
  878. .loadingBox{
  879. .el-loading-spinner{
  880. top:10%;
  881. }
  882. .el-button--small, .el-button--small.is-round{
  883. padding:9px 10px;
  884. }
  885. .el-date-editor{
  886. .el-input__inner{
  887. padding-right:0px;
  888. }
  889. }
  890. .el-table td, .el-table th{
  891. text-align: center;
  892. }
  893. .el-table .cell{
  894. padding: 0;
  895. }
  896. }
  897. </style>