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

dialysisIndex.vue 29KB

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