血透系统pad前端

TodayTab.vue 39KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020
  1. <template>
  2. <div v-loading="loading" id="today_panel">
  3. <div class="grid">
  4. <div class="list">
  5. <ul>
  6. <li @click="menuClick(1)">
  7. <img src="@/assets/record/2.png">
  8. <p>透析处方</p>
  9. </li>
  10. <li @click="menuClick(2)">
  11. <img src="@/assets/record/3.png">
  12. <p>接诊评估</p>
  13. </li>
  14. <li @click="menuClick(3)">
  15. <img src="@/assets/record/4.png">
  16. <p>透前评估</p>
  17. </li>
  18. <li @click="menuClick(4)">
  19. <img src="@/assets/record/5.png">
  20. <p>临时医嘱</p>
  21. </li>
  22. <li @click="menuClick(5)">
  23. <img src="@/assets/record/6.png">
  24. <p>双人核对</p>
  25. </li>
  26. </ul>
  27. </div>
  28. <div class="list">
  29. <ul>
  30. <li @click="menuClick(0)">
  31. <img src="@/assets/record/1.png">
  32. <p>透析上机</p>
  33. </li>
  34. <li @click="menuClick(6)">
  35. <img src="@/assets/record/7.png">
  36. <p>透析监测</p>
  37. </li>
  38. <li @click="menuClick(7)">
  39. <img src="@/assets/record/8.png">
  40. <p>透析下机</p>
  41. </li>
  42. <li @click="menuClick(8)">
  43. <img src="@/assets/record/9.png">
  44. <p>透后评估</p>
  45. </li>
  46. <li @click="menuClick(9)">
  47. <img src="@/assets/record/10.png">
  48. <p>治疗小结</p>
  49. </li>
  50. </ul>
  51. </div>
  52. </div>
  53. <div class="blueBorder"></div>
  54. <details-info title="基本信息" :patient="patient"
  55. :device_number="schedual.device_number == null || schedual.device_number == undefined ? '' : schedual.device_number.number"
  56. :step_data="stepData"></details-info>
  57. <div class="blueBorder"></div>
  58. <dialysis-prescription id="prescription" :prescription="prescription" :solution="solution" title="透析处方"
  59. :device_number_map="device_map"></dialysis-prescription>
  60. <div class="blueBorder"></div>
  61. <accepts-assessment id="accepts_assessment" :record="receiver_treatment_access" title="接诊评估"></accepts-assessment>
  62. <div class="blueBorder"></div>
  63. <assessment-before id="assessment_before" :record="predialysis_evaluation" ref="assessment_before"
  64. title="透前评估"></assessment-before>
  65. <div class="blueBorder"></div>
  66. <stat-order id="stat_order" ref="stat_order" title="临时医嘱" :doctor_map="admin_user_map" :advice_groups="advice_groups"></stat-order>
  67. <div class="blueBorder"></div>
  68. <dialysis-computer id="dialysis_computer" ref="dialysis_computer" title="透析上机 " :record="dialysis_order"
  69. :admin_map="admin_user_map" :device_number_map="device_number_map"></dialysis-computer>
  70. <div class="blueBorder"></div>
  71. <double-check id="double_check" ref="double_check" title="双人核对 " :record="double_check"></double-check>
  72. <div class="blueBorder"></div>
  73. <dialysis-monitoring id="monitoring" ref="monitoring" title="透析监测"></dialysis-monitoring>
  74. <div class="blueBorder"></div>
  75. <dialysis-off id="dialysis_off" ref="dialysis_off" title="透析下机 " :record="dialysis_order"
  76. :admin_map="admin_user_map"></dialysis-off>
  77. <div class="blueBorder"></div>
  78. <assessment-after id="assessment_after" ref="assessment_after" title="透后评估"
  79. :record="assessment_after_dislysis"></assessment-after>
  80. <div class="blueBorder"></div>
  81. <treatment-of id="treatment_of" ref="treatment_of" title="治疗小结" :record="treatment_summary"></treatment-of>
  82. <!-- <div class="blueBorder"></div>
  83. <operation-staff title="操作人员 "></operation-staff> -->
  84. <!-- 弹框 -->
  85. <!-- <van-popup v-show="false" title="长期处方" :overlay="true" @click-overlay="popupDidHide(0)" :close-on-click-overlay="false">
  86. <long-dialog @longSolution="closeDialog(0)" @closeLongDialog="closeDialog(0)" :patient_prop="patient" :solution_prop="solution" :machines_prop="devices" ref="long_dialog" ></long-dialog>
  87. </van-popup> -->
  88. <van-popup title="透析处方" v-model="menuList[1].showPopup" :overlay="true" :close-on-click-overlay="false">
  89. <prescription-dialog :patient_prop="patient" :solution_prop="solution" :machines_prop="devices"
  90. :prescription_prop="prescription" @finish="closePrescriptionDialog" :operators="operators"
  91. @close="closePrescriptionDialog" @prescription="prescriptionFunc" @longSolution="longSolutionFunc" ref="prescription_dialog"></prescription-dialog>
  92. </van-popup>
  93. <van-popup title="接诊评估" v-model="menuList[2].showPopup" :overlay="true" :close-on-click-overlay="false">
  94. <accepts-dialog :accepts="receiver_treatment_access" :patient_prop="patient" @finish="closeAcceptsAssessment"
  95. @close="closeAcceptsAssessment"></accepts-dialog>
  96. </van-popup>
  97. <van-popup title="透前评估" v-model="menuList[3].showPopup" :overlay="true" :close-on-click-overlay="false">
  98. <assessment-dialog :predialysis="predialysis_evaluation" :last_predialysis="last_predialysis_evaluation"
  99. :patient_prop="patient" @evaluation="update_evaluation" @close="closeAssessmentBefore"
  100. ref="assessment_dialog"></assessment-dialog>
  101. </van-popup>
  102. <van-popup title="临时医嘱" v-model="menuList[4].showPopup" :overlay="true" :close-on-click-overlay="false">
  103. <orders-dialog :patient_prop="patient" :advice_groups="advice_groups" :advice_list_prop="doctor_advices" :admin_users_prop="admin_users" @orderDialog="closeStatOrder" ref="orders_dialog" > </orders-dialog>
  104. </van-popup>
  105. <van-popup title="双人查对" v-model="menuList[5].showPopup" :overlay="true" :close-on-click-overlay="false">
  106. <double-dialog :patient_prop="patient" :record="double_check" :admin_users_prop="admin_users"
  107. @did_update="closeDoubleCheck" @close="closeDoubleCheck"></double-dialog>
  108. </van-popup>
  109. <van-popup title="透析上机" v-model="menuList[0].showPopup" :overlay="true" :close-on-click-overlay="false">
  110. <computer-dialog :schedule="schedual" :patient_prop="patient" :record="dialysis_order" :admins="admin_users"
  111. :device_numbers="device_numbers" :admin_map="admin_user_map"
  112. :device_number_map="device_number_map" @did_start="closeDialysisComputer"
  113. @close="closeDialysisComputer" ref="computer_dialog"></computer-dialog>
  114. </van-popup>
  115. <van-popup title="透析监测" v-model="menuList[6].showPopup" :overlay="true" :close-on-click-overlay="false">
  116. <monit-dialog :monitor_records="monitor_records" :last_monitor_record="last_monitor_record" :patient="patient" :order="dialysis_order"
  117. @did_add_monitor="didAddMonitor" @did_edit_monitor="didEditMonitor" @did_delete_monitor="didDelMonitor" @close="closeMonitoring"
  118. ref="monit_dialog"></monit-dialog>
  119. </van-popup>
  120. <van-popup title="透析下机" v-model="menuList[7].showPopup" :overlay="true" :close-on-click-overlay="false">
  121. <plane-dialog :patient_prop="patient" :record="dialysis_order" :admins="admin_users" :admin_map="admin_user_map"
  122. @did_off="closeDialysisOff" @close="closeDialysisOff" ref="plane_dialog"></plane-dialog>
  123. </van-popup>
  124. <van-popup title="透后评估" v-model="menuList[8].showPopup" :overlay="true" :close-on-click-overlay="false">
  125. <thoroug-dialog :patient_prop="patient" :record="assessment_after_dislysis"
  126. :last_record="last_assessment_after_dislysis" @did_update="closeAssessmentAfter"
  127. @close="closeAssessmentAfter" ref="thoroug_dialog"></thoroug-dialog>
  128. </van-popup>
  129. <van-popup title="治疗小结" v-model="menuList[9].showPopup" :overlay="true" :close-on-click-overlay="false">
  130. <treatment-dialog :patient_prop="patient" :record="treatment_summary" @did_update="closeTreatmentOf"
  131. @close="closeTreatmentOf" ref="treatment_dialog"></treatment-dialog>
  132. </van-popup>
  133. <!-- <div class="fixedNav" ref="fixed_nav" v-show="show_fixed_nav">
  134. <ul>
  135. <li @click="menuClick(1)">透析处方</li>
  136. <li @click="menuClick(2)">接诊评估</li>
  137. <li @click="menuClick(3)">透前评估</li>
  138. <li @click="menuClick(4)">临时医嘱</li>
  139. <li @click="menuClick(0)">透析上机</li>
  140. <li @click="menuClick(5)">双人核对</li>
  141. <li @click="menuClick(6)">透析监测</li>
  142. <li @click="menuClick(7)">透析下机</li>
  143. <li @click="menuClick(8)">透后评估</li>
  144. <li @click="menuClick(9)">治疗小结</li>
  145. </ul>
  146. </div> -->
  147. <el-button class="goTop" v-show="goTopShow" @click="goTop" type="primary" icon="el-icon-arrow-up" circle style="position:fixed;right:50px;bottom:50px;"></el-button>
  148. </div>
  149. </template>
  150. <script>
  151. import DetailsInfo from "./detailsInfo";
  152. import DialysisPrescription from "./dialysisPrescription";
  153. import PastData from "./pastData";
  154. import AcceptsAssessment from "./acceptsAssessment";
  155. import AssessmentBefore from "./assessmentBefore";
  156. import StatOrder from "./statOrder";
  157. import DialysisComputer from "./dialysisComputer";
  158. import DoubleCheck from "./doubleCheck";
  159. import DialysisMonitoring from "./dialysisMonitoring";
  160. import DialysisOff from "./dialysisOff";
  161. import AssessmentAfter from "./assessmentAfter";
  162. import TreatmentOf from "./treatmentOf";
  163. import OperationStaff from "./operationStaff";
  164. import LongDialog from "../dialog/LongDialog";
  165. import PrescriptionDialog from "../dialog/PrescriptionDialog";
  166. import AssessmentDialog from "../dialog/AssessmentDialog";
  167. import ThorougDialog from "../dialog/ThorougDialog";
  168. import AcceptsDialog from "../dialog/AcceptsDialog";
  169. import PlaneDialog from "../dialog/PlaneDialog";
  170. import TreatmentDialog from "../dialog/TreatmentDialog";
  171. import DoubleDialog from "../dialog/DoubleDialog";
  172. import OrdersDialog from "../dialog/OrdersDialog";
  173. import MonitDialog from "../dialog/MonitDialog";
  174. import ComputerDialog from "../dialog/ComputerDialog";
  175. import { dialysisGlobalConfig, getDialysisRecord } from "@/api/dialysis";
  176. import { parseTime } from "@/utils";
  177. export default {
  178. name: "TodayTab",
  179. components: {
  180. DetailsInfo,
  181. DialysisPrescription,
  182. PastData,
  183. AcceptsAssessment,
  184. AssessmentBefore,
  185. StatOrder,
  186. DialysisComputer,
  187. DoubleCheck,
  188. DialysisMonitoring,
  189. DialysisOff,
  190. AssessmentAfter,
  191. TreatmentOf,
  192. OperationStaff,
  193. LongDialog,
  194. PrescriptionDialog,
  195. AssessmentDialog,
  196. ThorougDialog,
  197. AcceptsDialog,
  198. PlaneDialog,
  199. TreatmentDialog,
  200. DoubleDialog,
  201. OrdersDialog,
  202. MonitDialog,
  203. ComputerDialog
  204. },
  205. data() {
  206. return {
  207. loading: true,
  208. // show_fixed_nav: false,
  209. patient_id: 0,
  210. date: 0,
  211. menuList: [
  212. { value: "2", label: " 透析处方", showPopup: false },
  213. { value: "3", label: " 接诊评估", showPopup: false },
  214. { value: "4", label: " 透前评估", showPopup: false },
  215. { value: "5", label: " 临时医嘱", showPopup: false },
  216. { value: "6", label: " 透析上机", showPopup: false },
  217. { value: "1", label: " 双人核对", showPopup: false },
  218. { value: "7", label: " 透析监测", showPopup: false },
  219. { value: "8", label: " 透析下机", showPopup: false },
  220. { value: "9", label: " 透后评估", showPopup: false },
  221. { value: "10", label: " 治疗小结", showPopup: false }
  222. ],
  223. operators: [], //操作人
  224. patient: {}, // 患者信息
  225. schedual: {}, // 患者排班信息
  226. prescription: {}, // 透析处方
  227. solution: {}, // 透析方案
  228. receiver_treatment_access: {}, // 接诊评估
  229. predialysis_evaluation: {}, // 透前评估
  230. last_predialysis_evaluation: {}, // 上次透前评估
  231. doctor_advices: [], // 临时医嘱
  232. advice_groups: [], // 对 doctor_advices 进行分组后的组列表,元素为 { group_no, start_time, advices:[advice object] }
  233. double_check: {}, // 双人核对
  234. assessment_after_dislysis: {}, // 透后评估
  235. last_assessment_after_dislysis: {}, // 上次透后评估
  236. treatment_summary: {}, // 治疗小结
  237. monitor_records: [], // 透析监测
  238. last_monitor_record: {
  239. id: 0,
  240. operate_time: new Date().getTime(),
  241. sodium_concentration: "",
  242. dialysate_temperature: ""
  243. }, // 上一次透析的监测记录
  244. dialysis_order: {}, // 透析记录
  245. admin_users: [], //系统用户列表
  246. devices: [], //设备
  247. device_numbers: [], // 床位号
  248. admin_user_map: {}, // {user_id: admin_user object}
  249. device_map: {}, // {device_id: device}
  250. device_number_map: {}, // {device_number_id: device_number}
  251. scrollTop: "",
  252. goTopShow: false
  253. };
  254. },
  255. computed: {
  256. stepData: function() {
  257. var steps = [
  258. { title: "透析处方", name: "prescription", value: 0 },
  259. { title: "接诊评估", name: "accepts_assessment", value: 0 },
  260. { title: "透前评估", name: "assessment_before", value: 0 },
  261. { title: "临时医嘱", name: "stat_order", value: 0 },
  262. { title: "透析上机", name: "dialysis_computer", value: 0 },
  263. { title: "双人核对", name: "double_check", value: 0 },
  264. { title: "透析监测", name: "dialysis_monitoring", value: 0 },
  265. { title: "透析下机", name: "dialysis_off", value: 0 },
  266. { title: "透后评估", name: "assessment_after", value: 0 },
  267. { title: "治疗小结", name: "treatment_of", value: 0 }
  268. ];
  269. if (!isNaN(this.prescription.id) && this.prescription.id > 0) {
  270. steps[0].value = 1;
  271. }
  272. if (
  273. !isNaN(this.receiver_treatment_access.id) &&
  274. this.receiver_treatment_access.id > 0
  275. ) {
  276. steps[1].value = 1;
  277. }
  278. if (
  279. typeof this.predialysis_evaluation.id != "undefined" &&
  280. !isNaN(this.predialysis_evaluation.id) &&
  281. this.predialysis_evaluation.id > 0
  282. ) {
  283. steps[2].value = 1;
  284. }
  285. if (this.doctor_advices.length > 0) {
  286. steps[3].value = 1;
  287. }
  288. if (!isNaN(this.dialysis_order.id) && this.dialysis_order.id > 0) {
  289. steps[4].value = 1;
  290. if (this.dialysis_order.stage == 2) {
  291. steps[7].value = 1;
  292. }
  293. }
  294. if (
  295. !isNaN(this.double_check.creater) &&
  296. this.double_check.creater > 0 &&
  297. !isNaN(this.double_check.modifier) &&
  298. this.double_check.modifier > 0
  299. ) {
  300. steps[5].value = 1;
  301. }
  302. if (this.monitor_records.length > 0) {
  303. steps[6].value = 1;
  304. }
  305. if (
  306. !isNaN(this.assessment_after_dislysis.id) &&
  307. this.assessment_after_dislysis.id > 0
  308. ) {
  309. steps[8].value = 1;
  310. }
  311. if (!isNaN(this.treatment_summary.id) && this.treatment_summary.id > 0) {
  312. steps[9].value = 1;
  313. }
  314. return steps;
  315. }
  316. },
  317. created() {
  318. var patient_id = this.$route.query.patient_id;
  319. var date = this.$route.query.date;
  320. this.patient_id = patient_id;
  321. this.date = date;
  322. this.requestDialysisRecord();
  323. },
  324. mounted() {
  325. window.addEventListener("scroll", this.handleScroll);
  326. },
  327. watch: {
  328. doctor_advices: function() {
  329. this.$refs.stat_order.setAdvices(this.doctor_advices);
  330. },
  331. monitor_records: function() {
  332. this.$refs.monitoring.setRecords(this.monitor_records);
  333. },
  334. $route: "requestDialysisRecord"
  335. },
  336. methods: {
  337. // handleScroll: function() {
  338. // var scrollTop =
  339. // window.pageYOffset ||
  340. // document.documentElement.scrollTop ||
  341. // document.body.scrollTop;
  342. // this.show_fixed_nav = scrollTop > 160;
  343. // },
  344. didAddMonitor(monitor) {
  345. this.monitor_records.push(monitor);
  346. this.monitor_records.sort((a, b) => b.operate_time - a.operate_time);
  347. // for (let index = 0; index < this.monitor_records.length; index++) {
  348. // const record = this.monitor_records[index];
  349. // if (record.operate_time <= monitor.operate_time) {
  350. // this.monitor_records.splice(index, 0, monitor)
  351. // break
  352. // }
  353. // }
  354. this.monitor_records.reverse();
  355. this.last_monitor_record = monitor;
  356. },
  357. didEditMonitor(monitor) {
  358. var mrl = this.monitor_records.length;
  359. var monitor_index = -1;
  360. for (let index = 0; index < mrl; index++) {
  361. if (this.monitor_records[index].id == monitor.id) {
  362. monitor_index = index;
  363. break;
  364. }
  365. }
  366. console.log(monitor);
  367. console.log(this.monitor_records[monitor_index]);
  368. this.monitor_records[monitor_index].arterial_pressure =
  369. monitor.arterial_pressure;
  370. this.monitor_records[monitor_index].blood_flow_volume =
  371. monitor.blood_flow_volume;
  372. this.monitor_records[monitor_index].breathing_rate =
  373. monitor.breathing_rate;
  374. this.monitor_records[monitor_index].dialysate_temperature =
  375. monitor.dialysate_temperature;
  376. this.monitor_records[monitor_index].diastolic_bp = monitor.diastolic_bp;
  377. this.monitor_records[monitor_index].displacement_quantity =
  378. monitor.displacement_quantity;
  379. this.monitor_records[monitor_index].dispose = monitor.dispose;
  380. this.monitor_records[monitor_index].ktv = monitor.ktv;
  381. this.monitor_records[monitor_index].monitor_date = monitor.monitor_date;
  382. this.monitor_records[monitor_index].monitoring_nurse =
  383. monitor.monitoring_nurse;
  384. this.monitor_records[monitor_index].operate_time = monitor.operate_time;
  385. this.monitor_records[monitor_index].pulse_frequency =
  386. monitor.pulse_frequency;
  387. this.monitor_records[monitor_index].replacement_rate =
  388. monitor.replacement_rate;
  389. this.monitor_records[monitor_index].result = monitor.result;
  390. this.monitor_records[monitor_index].sodium_concentration =
  391. monitor.sodium_concentration;
  392. this.monitor_records[monitor_index].symptom = monitor.symptom;
  393. this.monitor_records[monitor_index].systolic_bp = monitor.systolic_bp;
  394. this.monitor_records[monitor_index].transmembrane_pressure =
  395. monitor.transmembrane_pressure;
  396. this.monitor_records[monitor_index].ultrafiltration_rate =
  397. monitor.ultrafiltration_rate;
  398. this.monitor_records[monitor_index].ultrafiltration_volume =
  399. monitor.ultrafiltration_volume;
  400. this.monitor_records[monitor_index].venous_pressure =
  401. monitor.venous_pressure;
  402. this.monitor_records[monitor_index].diastolic_blood_pressure =
  403. monitor.diastolic_blood_pressure;
  404. this.monitor_records[monitor_index].systolic_blood_pressure =
  405. monitor.systolic_blood_pressure;
  406. this.monitor_records.sort((a, b) => b.operate_time - a.operate_time);
  407. // if (monitor_index >= 0) {
  408. // var record = this.monitor_records[monitor_index]
  409. //
  410. // this.monitor_records.splice(monitor_index, 1)
  411. // if(this.monitor_records.length == 0){
  412. // this.monitor_records.splice(0, 0, monitor)
  413. // }else {
  414. //
  415. // for (let index = 0; index < this.monitor_records.length; index++) {
  416. // const temp = this.monitor_records[index];
  417. // if (temp.operate_time <= monitor.operate_time) {
  418. // this.monitor_records.splice(index, 0, monitor)
  419. // break
  420. // }
  421. // }
  422. // }
  423. // }
  424. },
  425. didDelMonitor(record_id) {
  426. var mrl = this.monitor_records.length;
  427. for (let index = 0; index < mrl; index++) {
  428. if (this.monitor_records[index].id == record_id) {
  429. this.monitor_records.splice(index, 1);
  430. break;
  431. }
  432. }
  433. },
  434. menuClick: function(popupIndex) {
  435. this.index = popupIndex;
  436. if (popupIndex >= 0) {
  437. this.menuList[popupIndex].showPopup = true;
  438. }
  439. if (
  440. popupIndex == 1 &&
  441. typeof this.$refs.prescription_dialog != "undefined"
  442. ) {
  443. this.$refs.prescription_dialog.open();
  444. } else if (
  445. popupIndex == 3 &&
  446. typeof this.$refs.assessment_dialog != "undefined"
  447. ) {
  448. this.$refs.assessment_dialog.open();
  449. } else if (
  450. popupIndex == 4 &&
  451. typeof this.$refs.orders_dialog != "undefined"
  452. ) {
  453. // this.$refs.orders_dialog.open();
  454. } else if (
  455. popupIndex == 0 &&
  456. typeof this.$refs.computer_dialog != "undefined"
  457. ) {
  458. this.$refs.computer_dialog.open();
  459. } else if (
  460. popupIndex == 6 &&
  461. typeof this.$refs.monit_dialog != "undefined"
  462. ) {
  463. this.$refs.monit_dialog.open();
  464. } else if (
  465. popupIndex == 7 &&
  466. typeof this.$refs.plane_dialog != "undefined"
  467. ) {
  468. this.$refs.plane_dialog.open();
  469. } else if (
  470. popupIndex == 8 &&
  471. typeof this.$refs.thoroug_dialog != "undefined"
  472. ) {
  473. this.$refs.thoroug_dialog.open();
  474. } else if (
  475. popupIndex == 9 &&
  476. typeof this.$refs.treatment_dialog != "undefined"
  477. ) {
  478. this.$refs.treatment_dialog.open();
  479. }
  480. },
  481. popupDidHide: function(popupIndex) {
  482. this.index = -1;
  483. },
  484. closeDialog(index) {
  485. this.index = -1;
  486. this.menuList[index].showPopup = false;
  487. },
  488. refresh() {
  489. var dateStr = parseTime(this.$route.query.date, "{y}-{m}-{d}");
  490. var params = {
  491. patient_id: this.$route.query.patient_id,
  492. date: dateStr
  493. };
  494. getDialysisRecord(params).then(rs => {
  495. var resp = rs.data;
  496. console.log(resp);
  497. if (resp.state == 1) {
  498. var patient = resp.data.patient; // 患者信息
  499. var schedual = resp.data.schedual; // 患者排班信息
  500. var prescription = resp.data.prescription; // 透析处方
  501. var solution = resp.data.solution; // 透析方案
  502. var receiver_treatment_access = resp.data.receiver_treatment_access; // 接诊评估
  503. var predialysis_evaluation = resp.data.predialysis_evaluation; // 透前评估
  504. var doctor_advices = resp.data.doctor_advices; // 临时医嘱
  505. var double_check = resp.data.double_check; // 双人核对
  506. var assessment_after_dislysis = resp.data.assessment_after_dislysis; // 透后评估
  507. var treatment_summary = resp.data.treatment_summary; // 治疗小结
  508. var monitor_records = resp.data.monitor_records; // 透析监测
  509. var dialysis_order = resp.data.dialysis_order; // 透析记录
  510. var operators = resp.data.operators; // 操作人
  511. var last_predialysis_evaluation =
  512. resp.data.last_predialysis_evaluation; // 上一次透前评估
  513. var last_assessment_after_dislysis =
  514. resp.data.last_assessment_after_dislysis; // 上一次透前评估
  515. var last_monitor_record = resp.data.last_monitor_record;
  516. this.patient = patient;
  517. this.schedual = schedual == null ? {} : schedual;
  518. this.prescription = prescription == null ? { id: "" } : prescription;
  519. this.solution = solution == null ? { id: "" } : solution;
  520. this.receiver_treatment_access =
  521. receiver_treatment_access == null
  522. ? { id: "" }
  523. : receiver_treatment_access;
  524. this.predialysis_evaluation =
  525. predialysis_evaluation == null ? {} : predialysis_evaluation;
  526. this.last_predialysis_evaluation =
  527. last_predialysis_evaluation == null
  528. ? {}
  529. : last_predialysis_evaluation;
  530. this.doctor_advices = doctor_advices == null ? [] : doctor_advices;
  531. if (this.doctor_advices.length > 0) {
  532. var group = this.newAdviceGroupObject();
  533. var initGroupBlock = function(group, advice) {
  534. group.group_no = advice.groupno;
  535. // group.start_time = advice.start_time
  536. // group.advice_doctor = advice.advice_doctor
  537. // group.exec_staff = advice.execution_staff
  538. // group.exec_time = advice.execution_time
  539. // group.checker = advice.checker
  540. };
  541. for (let index = 0; index < this.doctor_advices.length; index++) {
  542. const advice = this.doctor_advices[index];
  543. if (advice.groupno == 0) {
  544. // 老版本的医嘱没有分组的概念,所以这一个 if 是解决这个问题的,将每个无分组的医嘱各自归为一组
  545. if (advice.parent_id > 0) {
  546. if (this.advice_groups.length > 0) {
  547. var parent_group = this.advice_groups[
  548. this.advice_groups.length - 1
  549. ];
  550. if (parent_group.advices.length > 0) {
  551. if (parent_group.advices[0].id == advice.parent_id) {
  552. parent_group.advices.push(advice);
  553. }
  554. }
  555. }
  556. continue;
  557. } else {
  558. if (group.group_no > 0) {
  559. this.advice_groups.push(group);
  560. group = this.newAdviceGroupObject();
  561. }
  562. initGroupBlock(group, advice);
  563. group.advices.push(advice);
  564. this.advice_groups.push(group);
  565. group = this.newAdviceGroupObject();
  566. continue;
  567. }
  568. }
  569. if (group.group_no > 0 && group.group_no != advice.groupno) {
  570. this.advice_groups.push(group);
  571. group = this.newAdviceGroupObject();
  572. }
  573. if (group.group_no == 0) {
  574. initGroupBlock(group, advice);
  575. }
  576. if (group.group_no == advice.groupno) {
  577. group.advices.push(advice);
  578. }
  579. }
  580. if (group.group_no > 0) {
  581. // 上述的算法会导致最后一组没有加到advice_groups,这里要手动加上
  582. this.advice_groups.push(group);
  583. }
  584. // console.log(this.advice_groups)
  585. }
  586. this.double_check = double_check == null ? { id: "" } : double_check;
  587. this.assessment_after_dislysis =
  588. assessment_after_dislysis == null
  589. ? { id: "" }
  590. : assessment_after_dislysis;
  591. this.last_assessment_after_dislysis =
  592. last_assessment_after_dislysis == null
  593. ? { id: "" }
  594. : last_assessment_after_dislysis;
  595. this.treatment_summary =
  596. treatment_summary == null ? { id: "" } : treatment_summary;
  597. this.monitor_records = monitor_records == null ? [] : monitor_records;
  598. this.last_monitor_record =
  599. last_monitor_record == null
  600. ? this.last_monitor_record
  601. : last_monitor_record;
  602. this.dialysis_order =
  603. dialysis_order == null ? { id: "" } : dialysis_order;
  604. this.operators = operators;
  605. this.$refs.stat_order.setAdvices(this.doctor_advices);
  606. this.$refs.monitoring.setRecords(this.monitor_records);
  607. this.title = patient.name;
  608. dialysisGlobalConfig().then(rs => {
  609. var res = rs.data;
  610. if (res.state == 1) {
  611. // console.log(res)
  612. // this.$refs.detail_menu.setGlobalConfig(res.data)
  613. this.admin_users = res.data.admin_users;
  614. this.devices = res.data.devices;
  615. this.device_numbers = res.data.device_numbers;
  616. var device_map = {};
  617. for (let index = 0; index < this.devices.length; index++) {
  618. const device = this.devices[index];
  619. device_map[device.id] = device;
  620. }
  621. this.device_map = device_map;
  622. var admin_map = {};
  623. for (let index = 0; index < this.admin_users.length; index++) {
  624. const admin = this.admin_users[index];
  625. admin_map[admin.id] = admin;
  626. }
  627. this.admin_user_map = admin_map;
  628. var device_number_map = {};
  629. for (let index = 0; index < this.device_numbers.length; index++) {
  630. const device_number = this.device_numbers[index];
  631. device_number_map[device_number.id] = device_number;
  632. }
  633. this.device_number_map = device_number_map;
  634. }
  635. this.loading = false;
  636. });
  637. } else {
  638. this.$toast({
  639. message: resp.msg
  640. });
  641. this.loading = false;
  642. }
  643. });
  644. },
  645. requestDialysisRecord() {
  646. var dateStr = parseTime(this.date, "{y}-{m}-{d}");
  647. var params = {
  648. patient_id: this.patient_id,
  649. date: dateStr
  650. };
  651. getDialysisRecord(params).then(rs => {
  652. var resp = rs.data;
  653. console.log(resp);
  654. if (resp.state == 1) {
  655. var patient = resp.data.patient; // 患者信息
  656. var schedual = resp.data.schedual; // 患者排班信息
  657. var prescription = resp.data.prescription; // 透析处方
  658. var solution = resp.data.solution; // 透析方案
  659. var receiver_treatment_access = resp.data.receiver_treatment_access; // 接诊评估
  660. var predialysis_evaluation = resp.data.predialysis_evaluation; // 透前评估
  661. var doctor_advices = resp.data.doctor_advices; // 临时医嘱
  662. var double_check = resp.data.double_check; // 双人核对
  663. var assessment_after_dislysis = resp.data.assessment_after_dislysis; // 透后评估
  664. var treatment_summary = resp.data.treatment_summary; // 治疗小结
  665. var monitor_records = resp.data.monitor_records; // 透析监测
  666. var dialysis_order = resp.data.dialysis_order; // 透析记录
  667. var operators = resp.data.operators; // 操作人
  668. var last_predialysis_evaluation =
  669. resp.data.last_predialysis_evaluation; // 上一次透前评估
  670. var last_assessment_after_dislysis =
  671. resp.data.last_assessment_after_dislysis; // 上一次透前评估
  672. var last_monitor_record = resp.data.last_monitor_record;
  673. this.patient = patient;
  674. this.schedual = schedual == null ? {} : schedual;
  675. this.prescription = prescription == null ? { id: "" } : prescription;
  676. this.solution = solution == null ? { id: "" } : solution;
  677. this.receiver_treatment_access =
  678. receiver_treatment_access == null
  679. ? { id: "" }
  680. : receiver_treatment_access;
  681. this.predialysis_evaluation =
  682. predialysis_evaluation == null ? {} : predialysis_evaluation;
  683. this.last_predialysis_evaluation =
  684. last_predialysis_evaluation == null
  685. ? {}
  686. : last_predialysis_evaluation;
  687. this.doctor_advices = doctor_advices == null ? [] : doctor_advices;
  688. if (this.doctor_advices.length > 0) {
  689. var group = this.newAdviceGroupObject();
  690. var initGroupBlock = function(group, advice) {
  691. group.group_no = advice.groupno;
  692. // group.start_time = advice.start_time
  693. // group.advice_doctor = advice.advice_doctor
  694. // group.exec_staff = advice.execution_staff
  695. // group.exec_time = advice.execution_time
  696. // group.checker = advice.checker
  697. };
  698. for (let index = 0; index < this.doctor_advices.length; index++) {
  699. const advice = this.doctor_advices[index];
  700. if (advice.groupno == 0) {
  701. // 老版本的医嘱没有分组的概念,所以这一个 if 是解决这个问题的,将每个无分组的医嘱各自归为一组
  702. if (advice.parent_id > 0) {
  703. if (this.advice_groups.length > 0) {
  704. var parent_group = this.advice_groups[
  705. this.advice_groups.length - 1
  706. ];
  707. if (parent_group.advices.length > 0) {
  708. if (parent_group.advices[0].id == advice.parent_id) {
  709. parent_group.advices.push(advice);
  710. }
  711. }
  712. }
  713. continue;
  714. } else {
  715. if (group.group_no > 0) {
  716. this.advice_groups.push(group);
  717. group = this.newAdviceGroupObject();
  718. }
  719. initGroupBlock(group, advice);
  720. group.advices.push(advice);
  721. this.advice_groups.push(group);
  722. group = this.newAdviceGroupObject();
  723. continue;
  724. }
  725. }
  726. if (group.group_no > 0 && group.group_no != advice.groupno) {
  727. this.advice_groups.push(group);
  728. group = this.newAdviceGroupObject();
  729. }
  730. if (group.group_no == 0) {
  731. initGroupBlock(group, advice);
  732. }
  733. if (group.group_no == advice.groupno) {
  734. group.advices.push(advice);
  735. }
  736. }
  737. if (group.group_no > 0) {
  738. // 上述的算法会导致最后一组没有加到advice_groups,这里要手动加上
  739. this.advice_groups.push(group);
  740. }
  741. // console.log(this.advice_groups)
  742. }
  743. this.double_check = double_check == null ? { id: "" } : double_check;
  744. this.assessment_after_dislysis =
  745. assessment_after_dislysis == null
  746. ? { id: "" }
  747. : assessment_after_dislysis;
  748. this.last_assessment_after_dislysis =
  749. last_assessment_after_dislysis == null
  750. ? { id: "" }
  751. : last_assessment_after_dislysis;
  752. this.treatment_summary =
  753. treatment_summary == null ? { id: "" } : treatment_summary;
  754. this.monitor_records = monitor_records == null ? [] : monitor_records;
  755. this.last_monitor_record =
  756. last_monitor_record == null
  757. ? this.last_monitor_record
  758. : last_monitor_record;
  759. this.dialysis_order =
  760. dialysis_order == null ? { id: "" } : dialysis_order;
  761. this.operators = operators;
  762. this.$refs.stat_order.setAdvices(this.doctor_advices);
  763. this.$refs.monitoring.setRecords(this.monitor_records);
  764. this.title = patient.name;
  765. dialysisGlobalConfig().then(rs => {
  766. var res = rs.data;
  767. if (res.state == 1) {
  768. // console.log(res)
  769. // this.$refs.detail_menu.setGlobalConfig(res.data)
  770. this.admin_users = res.data.admin_users;
  771. this.devices = res.data.devices;
  772. this.device_numbers = res.data.device_numbers;
  773. var device_map = {};
  774. for (let index = 0; index < this.devices.length; index++) {
  775. const device = this.devices[index];
  776. device_map[device.id] = device;
  777. }
  778. this.device_map = device_map;
  779. var admin_map = {};
  780. for (let index = 0; index < this.admin_users.length; index++) {
  781. const admin = this.admin_users[index];
  782. admin_map[admin.id] = admin;
  783. }
  784. this.admin_user_map = admin_map;
  785. var device_number_map = {};
  786. for (let index = 0; index < this.device_numbers.length; index++) {
  787. const device_number = this.device_numbers[index];
  788. device_number_map[device_number.id] = device_number;
  789. }
  790. this.device_number_map = device_number_map;
  791. }
  792. this.loading = false;
  793. });
  794. } else {
  795. this.$toast({
  796. message: resp.msg
  797. });
  798. this.loading = false;
  799. }
  800. });
  801. },
  802. newAdviceGroupObject: function() {
  803. return Object.assign(
  804. {},
  805. {
  806. group_no: 0,
  807. // advice_doctor: 0,
  808. // start_time: 0,
  809. advices: []
  810. // exec_staff: 0,
  811. // exec_time: 0,
  812. // checker: 0,
  813. }
  814. );
  815. },
  816. prescriptionFunc:function(val){
  817. this.prescription = val
  818. },
  819. longSolutionFunc:function(val){
  820. this.solution = val
  821. },
  822. closePrescriptionDialog: function() {
  823. this.closeDialog(1);
  824. this.scrollToView("prescription");
  825. },
  826. closeAcceptsAssessment: function() {
  827. this.closeDialog(2);
  828. this.scrollToView("accepts_assessment");
  829. },
  830. closeAssessmentBefore: function() {
  831. this.closeDialog(3);
  832. this.scrollToView("assessment_before");
  833. },
  834. update_evaluation: function(evaluation) {
  835. this.predialysis_evaluation = evaluation;
  836. this.closeAssessmentBefore();
  837. },
  838. closeStatOrder: function() {
  839. this.closeDialog(4);
  840. this.doctor_advices.push([])
  841. this.scrollToView("stat_order");
  842. },
  843. closeDialysisComputer: function() {
  844. this.closeDialog(0);
  845. this.scrollToView("dialysis_computer");
  846. },
  847. closeDoubleCheck: function() {
  848. this.closeDialog(5);
  849. this.scrollToView("double_check");
  850. },
  851. closeMonitoring: function() {
  852. this.closeDialog(6);
  853. this.scrollToView("monitoring");
  854. },
  855. closeDialysisOff: function() {
  856. this.closeDialog(7);
  857. this.scrollToView("dialysis_off");
  858. },
  859. closeAssessmentAfter: function() {
  860. this.closeDialog(8);
  861. this.scrollToView("assessment_after");
  862. },
  863. closeTreatmentOf: function() {
  864. this.closeDialog(9);
  865. this.scrollToView("treatment_of");
  866. },
  867. scrollToView: function(id) {
  868. document.body.scrollTop =
  869. document.querySelector("#" + id).offsetTop - 100;
  870. document.documentElement.scrollTop =
  871. document.querySelector("#" + id).offsetTop - 100;
  872. },
  873. handleScroll() {
  874. this.scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop;
  875. if (this.scrollTop > 50) {
  876. this.goTopShow = true;
  877. }else{
  878. this.goTopShow = false;
  879. }
  880. },
  881. goTop() {
  882. let timer = null,
  883. _that = this;
  884. cancelAnimationFrame(timer);
  885. timer = requestAnimationFrame(function fn() {
  886. if (_that.scrollTop > 0) {
  887. _that.scrollTop -= 50;
  888. document.body.scrollTop = document.documentElement.scrollTop =
  889. _that.scrollTop;
  890. timer = requestAnimationFrame(fn);
  891. } else {
  892. cancelAnimationFrame(timer);
  893. _that.goTopShow = false;
  894. }
  895. });
  896. },
  897. destroyed() {
  898. window.removeEventListener("scroll", this.handleScroll);
  899. }
  900. }
  901. };
  902. </script>
  903. <style style="stylesheet/scss" lang="scss" scoped>
  904. .today_panel {
  905. height: calc(100% - 63px);
  906. }
  907. .mainContent {
  908. position: relative;
  909. .grid {
  910. padding: 0.1rem 0 0.25rem 0;
  911. margin: 0.2rem 0 0 0;
  912. background: #fff;
  913. .list {
  914. ul {
  915. @include display-flex;
  916. @include align-items-center;
  917. @include text-align;
  918. @include justify-content-around;
  919. li {
  920. font-size: 0.24rem;
  921. color: #5d6b7a;
  922. margin-top: 0.35rem;
  923. p {
  924. line-height: 0.6rem;
  925. color: #34495e;
  926. font-size: 0.3rem;
  927. }
  928. img {
  929. width: 1rem;
  930. height: 1rem;
  931. }
  932. }
  933. }
  934. }
  935. }
  936. }
  937. .el-button.is-circle{
  938. padding: 18px!important;
  939. .el-icon-arrow-up{
  940. font-size: 20px!important;
  941. }
  942. }
  943. </style>