NavIgation.vue 16KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701
  1. <template>
  2. <div>
  3. <div class="grid">
  4. <div class="list">
  5. <ul>
  6. <li @click="showPrescription">
  7. <img src="@/assets/record/1.png" />
  8. <p>透析处方</p>
  9. </li>
  10. <li @click="showAccepts">
  11. <img src="@/assets/record/2.png" />
  12. <p>接诊评估</p>
  13. </li>
  14. <li @click="showAssessmentBefore">
  15. <img src="@/assets/record/3.png" />
  16. <p>透前评估</p>
  17. </li>
  18. <li @click="showDoctorAdviceDialog" class="newOrdersAdvice">
  19. <img src="@/assets/record/4.png" />
  20. <div>
  21. <p>临时医嘱</p>
  22. <span class="redpoint" v-if="getUnReadNum()">{{getUnReadNum()}}</span>
  23. </div>
  24. </li>
  25. <li @click="showDoubleCheck">
  26. <img src="@/assets/record/5.png" />
  27. <p>双人核对</p>
  28. </li>
  29. </ul>
  30. </div>
  31. <div class="list">
  32. <ul>
  33. <li @click="showComputerDialog">
  34. <img src="@/assets/record/6.png" />
  35. <p>透析上机</p>
  36. </li>
  37. <li @click="showMonitorDialog">
  38. <img src="@/assets/record/7.png" />
  39. <p>透析监测</p>
  40. </li>
  41. <li @click="showFinishDialog">
  42. <img src="@/assets/record/8.png" />
  43. <p>透析下机</p>
  44. </li>
  45. <li @click="showAssessmentAfterDialog">
  46. <img src="@/assets/record/9.png" />
  47. <p>透后评估</p>
  48. </li>
  49. <li @click="showrTeatmentSummary">
  50. <img src="@/assets/record/10.png" />
  51. <p>治疗小结</p>
  52. </li>
  53. </ul>
  54. </div>
  55. </div>
  56. <div class="middleLine"></div>
  57. <dialysis-prescription-dialog
  58. title="透析处方"
  59. ref="prescription"
  60. :patient="patient"
  61. :prescription="prescription"
  62. :solution="solution"
  63. @advice="adviceFunc"
  64. :niprocart_info="niprocart_info"
  65. :jms_info="jms_info"
  66. :fistula_needle_set_info="fistula_needle_set_info"
  67. :fistula_needle_set_16_info="fistula_needle_set_16_info"
  68. :hemoperfusion_info="hemoperfusion_info"
  69. :dialyser_sterilised_info="dialyser_sterilised_info"
  70. :filtryzer_info="filtryzer_info"
  71. :dialyzers_info="dialyzers_info"
  72. :injector_info="injector_info"
  73. :bloodlines_info="bloodlines_info"
  74. :tubingHemodialysis_info="tubingHemodialysis_info"
  75. :safe_package_info="safe_package_info"
  76. :aliquid_info="aliquid_info"
  77. :config="config"
  78. :admin_users="admin_users"
  79. :targetAdvices="longAdvices"
  80. :waitUploadAdvices="waitUploadAdvices"
  81. :is_open="is_open"
  82. :predialysis="predialysis_evaluation"
  83. :last_predialysis="last_predialysis_evaluation"
  84. :record="assessment_after_dislysis"
  85. :last_record="last_assessment_after_dislysis"
  86. :last_prescription="last_dialysis_prescribe"
  87. :dry_weight="last_dryWeight_dislysis"
  88. :schedual="temp_schedual"
  89. :stockType="stockType"
  90. :lastAssessment="lastAssessment"
  91. :mode_id="mode_id"
  92. ></dialysis-prescription-dialog>
  93. <double-check-dialog
  94. title="双人核对"
  95. ref="doubleCheck"
  96. :patient="patient"
  97. :predialysis_evaluation="predialysis_evaluation"
  98. :prescription="prescription"
  99. :double_check="double_check"
  100. :admin_users="admin_users"
  101. ></double-check-dialog>
  102. <accepts-treatment-dialog
  103. title="接诊评估"
  104. ref="accepts"
  105. :patient="patient"
  106. :receiver_treatment_access="receiver_treatment_access"
  107. ></accepts-treatment-dialog>
  108. <assessment-before-dislysis-dialog
  109. title="透前评估"
  110. ref="assessmentBefore"
  111. :patient="patient"
  112. :last_predialysis="last_predialysis_evaluation"
  113. :predialysis_evaluation="predialysis_evaluation"
  114. :admin_users="admin_users"
  115. :dry_weight="last_dryWeight_dislysis"
  116. :lastAssessment="lastAssessment"
  117. ></assessment-before-dislysis-dialog>
  118. <treatment-summary-dialog
  119. title="治疗小结"
  120. ref="treatmentSummary"
  121. :patient="patient"
  122. :treatment_summary="treatment_summary"
  123. ></treatment-summary-dialog>
  124. <doctor-advice-dialog
  125. title="临时医嘱"
  126. ref="doctor_advice"
  127. :doctor_advices="doctor_advices"
  128. :patient="patient"
  129. :admin_users="admin_users"
  130. :dialysis_order="dialysis_order"
  131. :his_is_open="his_is_open"
  132. ></doctor-advice-dialog>
  133. <computer-dialog
  134. title="透析上机"
  135. ref="computer_dialog"
  136. :dialysis_order="dialysis_order"
  137. :schedule="schedual"
  138. @monitor="add_monitor"
  139. :admins="admin_users"
  140. :device_numbers="device_numbers"
  141. :special_premission="special_premission"
  142. :patient="patient"
  143. ></computer-dialog>
  144. <monitor-dialog
  145. title="透析监测"
  146. ref="monitor_dialog"
  147. :monitors="monitor_records"
  148. @monitor="add_monitor"
  149. :patient="patient"
  150. ></monitor-dialog>
  151. <finish-dialog
  152. title="透析下机"
  153. ref="finish_dialog"
  154. :dialysis_order="dialysis_order"
  155. :schedule="schedual"
  156. :admins="admin_users"
  157. :prescription="prescription"
  158. @assessmentAfterDislysis="assessmentAfterDislysisFunc"
  159. :special_premission="special_premission"
  160. :patient="patient"
  161. ></finish-dialog>
  162. <assessment-after-dislysis
  163. title="透后评估"
  164. ref="assessment_after_dislysis"
  165. :assessment_after_dislysis="assessment_after_dislysis"
  166. :patient="patient"
  167. :dialysis_order="dialysis_order"
  168. ></assessment-after-dislysis>
  169. </div>
  170. </template>
  171. <script>
  172. import dialysisPrescriptionDialog from "./dialog/dialysisPrescriptionDialog";
  173. import doubleCheckDialog from "./dialog/doubleCheckDialog";
  174. import AssessmentAfterDislysis from "./dialog/AssessmentAfterDislysis";
  175. import acceptsTreatmentDialog from "./dialog/acceptsTreatmentDialog";
  176. import assessmentBeforeDislysisDialog from "./dialog/assessmentBeforeDislysisDialog";
  177. import MonitorDialog from "./dialog/monitor_dialog";
  178. import DoctorAdviceDialog from "./dialog/DoctorAdviceDialog";
  179. import treatmentSummaryDialog from "./dialog/treatmentSummaryDialog";
  180. import ComputerDialog from "./dialog/computer_dialog";
  181. import FinishDialog from "./dialog/finish_dialog";
  182. export default {
  183. name: "NavIgation",
  184. components: {
  185. dialysisPrescriptionDialog,
  186. doubleCheckDialog,
  187. AssessmentAfterDislysis,
  188. acceptsTreatmentDialog,
  189. assessmentBeforeDislysisDialog,
  190. treatmentSummaryDialog,
  191. MonitorDialog,
  192. DoctorAdviceDialog,
  193. ComputerDialog,
  194. FinishDialog
  195. },
  196. data() {
  197. return {
  198. temp_schedual: {},
  199. mode_id:1
  200. };
  201. },
  202. mounted() {},
  203. props: {
  204. mode_id:{
  205. type:Number
  206. },
  207. longAdvices: {
  208. // 临时医嘱
  209. type: Array,
  210. default: () => {
  211. return [];
  212. }
  213. },
  214. waitUploadAdvices: {
  215. // 临时医嘱
  216. type: Array,
  217. default: () => {
  218. return [];
  219. }
  220. },
  221. is_open: {
  222. // 临时医嘱
  223. type: Number,
  224. default: () => {
  225. return 0;
  226. }
  227. },his_is_open:{
  228. type: Number,
  229. default: () => {
  230. return 0;
  231. }
  232. },
  233. patient: {
  234. // 患者信息
  235. type: Object,
  236. default: () => {
  237. return { id: 0 };
  238. }
  239. },
  240. schedual: {
  241. // 患者排班信息
  242. type: Object,
  243. default: () => {
  244. return { id: 0 };
  245. }
  246. },
  247. prescription: {
  248. // 透析处方
  249. type: Object,
  250. default: () => {
  251. return { id: 0 };
  252. }
  253. },
  254. solution: {
  255. // 透析方案
  256. type: Object,
  257. default: () => {
  258. return { id: 0 };
  259. }
  260. }, system_prescribe: {
  261. // 系统透析方案
  262. type: Object,
  263. default: () => {
  264. return { id: 0 };
  265. }
  266. },
  267. receiver_treatment_access: {
  268. // 接诊评估
  269. type: Object,
  270. default: () => {
  271. return { id: 0 };
  272. }
  273. },
  274. predialysis_evaluation: {
  275. // 透前评估
  276. type: Object,
  277. default: () => {
  278. return { id: 0 };
  279. }
  280. },
  281. doctor_advices: {
  282. // 临时医嘱
  283. type: Array,
  284. default: () => {
  285. return [];
  286. }
  287. },
  288. double_check: {
  289. // 双人核对
  290. type: Object,
  291. default: () => {
  292. return { id: 0 };
  293. }
  294. },
  295. assessment_after_dislysis: {
  296. // 透后评估
  297. type: Object,
  298. default: () => {
  299. return { id: 0 };
  300. }
  301. },
  302. treatment_summary: {
  303. // 治疗小结
  304. type: Object,
  305. default: () => {
  306. return { id: 0 };
  307. }
  308. },
  309. monitor_records: {
  310. // 透析监测
  311. type: Array,
  312. default: () => {
  313. return [];
  314. }
  315. },
  316. dialysis_order: {
  317. // 透析记录
  318. type: Object,
  319. default: () => {
  320. return { id: 0 };
  321. }
  322. },
  323. admin_users: {
  324. // 系统用户列表
  325. type: Array,
  326. default: () => {
  327. return [];
  328. }
  329. },
  330. devices: {
  331. // 设备
  332. type: Array,
  333. default: () => {
  334. return [];
  335. }
  336. },
  337. device_numbers: {
  338. // 床位
  339. type: Array,
  340. default: () => {
  341. return [];
  342. }
  343. },
  344. niprocart_info: {
  345. type: Array,
  346. default: () => {
  347. return [];
  348. }
  349. },
  350. jms_info: {
  351. type: Array,
  352. default: () => {
  353. return [];
  354. }
  355. },
  356. fistula_needle_set_info: {
  357. type: Array,
  358. default: () => {
  359. return [];
  360. }
  361. },
  362. fistula_needle_set_16_info: {
  363. type: Array,
  364. default: () => {
  365. return [];
  366. }
  367. },
  368. hemoperfusion_info: {
  369. type: Array,
  370. default: () => {
  371. return [];
  372. }
  373. },
  374. dialyser_sterilised_info: {
  375. type: Array,
  376. default: () => {
  377. return [];
  378. }
  379. },
  380. filtryzer_info: {
  381. type: Array,
  382. default: () => {
  383. return [];
  384. }
  385. },
  386. dialyzers_info: {
  387. type: Array,
  388. default: () => {
  389. return [];
  390. }
  391. },
  392. injector_info: {
  393. type: Array,
  394. default: () => {
  395. return [];
  396. }
  397. },
  398. bloodlines_info: {
  399. type: Array,
  400. default: () => {
  401. return [];
  402. }
  403. },
  404. tubingHemodialysis_info: {
  405. type: Array,
  406. default: () => {
  407. return [];
  408. }
  409. },
  410. safe_package_info: {
  411. type: Array,
  412. default: () => {
  413. return [];
  414. }
  415. },
  416. aliquid_info: {
  417. type: Array,
  418. default: () => {
  419. return [];
  420. }
  421. },
  422. headNurses: {
  423. type: Array,
  424. default: () => {
  425. return [];
  426. }
  427. },
  428. config: {
  429. type: Object,
  430. default: () => {
  431. return { id: 0 };
  432. }
  433. },
  434. admin_user_map: {
  435. // {user_id: admin_user object}
  436. type: Object,
  437. default: () => {
  438. return {};
  439. }
  440. },
  441. device_map: {
  442. // {device_id: device object}
  443. type: Object,
  444. default: () => {
  445. return {};
  446. }
  447. },
  448. device_number_map: {
  449. // {device_number_id: device_number object}
  450. type: Object,
  451. default: () => {
  452. return {};
  453. }
  454. },
  455. last_predialysis_evaluation: {
  456. //最后一条透前
  457. type: Object,
  458. default: () => {
  459. return { id: 0 };
  460. }
  461. },
  462. last_monitor_record: {
  463. //最后一条监测记录
  464. type: Object,
  465. default: () => {
  466. return { id: 0 };
  467. }
  468. },
  469. last_assessment_after_dislysis: {
  470. //最后一条透后记录 (除了今天录的)
  471. type: Object,
  472. default: () => {
  473. return { id: 0 };
  474. }
  475. },
  476. last_dialysis_prescribe: {
  477. //最后一条透析处方(除了今天录的)
  478. type: Object,
  479. default: () => {
  480. return { id: 0 };
  481. }
  482. },
  483. last_dryWeight_dislysis: {
  484. //最后一条干体重 (除了今天录的)
  485. type: Object,
  486. default: () => {
  487. return { id: 0 };
  488. }
  489. },
  490. special_premission: {
  491. type: Array,
  492. default: () => {
  493. return [];
  494. }
  495. },
  496. stockType:{
  497. type:Array,
  498. default:()=>{
  499. return [];
  500. }
  501. },
  502. lastAssessment:{
  503. // 最后一条血管通路(处理今天录的)
  504. type: Object,
  505. default: () => {
  506. return { id: 0 };
  507. }
  508. }
  509. },
  510. methods: {
  511. getUnReadNum: function() {
  512. let doctorAdvice = [];
  513. for (let y = 0; y < this.doctor_advices.length; y++) {
  514. if (this.doctor_advices[y].execution_state == 2) {
  515. doctorAdvice.push(this.doctor_advices[y]);
  516. }
  517. }
  518. const sorted = this.groupBy(doctorAdvice, function(item) {
  519. return [item.groupno];
  520. });
  521. console.log(doctorAdvice);
  522. console.log(sorted.length);
  523. return sorted.length;
  524. },
  525. groupBy(array, f) {
  526. const groups = {};
  527. array.forEach(function(o) {
  528. const group = JSON.stringify(f(o));
  529. groups[group] = groups[group] || [];
  530. groups[group].push(o);
  531. });
  532. return Object.keys(groups).map(function(group) {
  533. return groups[group];
  534. });
  535. },
  536. setLastRecord: function(
  537. lastPredialysisEvaluation,
  538. lastMonitorRecord,
  539. lastAssessmentAfterDislysis,
  540. lastDialysisPrescribe,
  541. lastDryWeightDislysis,
  542. schedual,
  543. system_prescribe,
  544. ) {
  545. this.$refs.assessmentBefore.setLastRecord(
  546. lastPredialysisEvaluation,
  547. lastDryWeightDislysis,
  548. );
  549. this.$refs.prescription.setLastRecord(
  550. schedual,
  551. lastAssessmentAfterDislysis,
  552. lastPredialysisEvaluation,
  553. lastDialysisPrescribe,
  554. lastDryWeightDislysis,
  555. system_prescribe
  556. );
  557. this.temp_schedual = schedual
  558. console.log("排班列表2222222222222222",schedual)
  559. },
  560. add_monitor: function(monitor) {
  561. this.monitor_records.push(monitor);
  562. console.log(this.monitor_records);
  563. this.monitor_records.sort((a, b) => b.operate_time - a.operate_time);
  564. this.monitor_records.reverse();
  565. console.log(this.monitor_records);
  566. this.$refs.monitor_dialog.setRecords(this.monitor_records);
  567. },
  568. adviceFunc: function() {
  569. this.$emit("advice");
  570. },
  571. showMonitorDialog: function() {
  572. this.$refs.monitor_dialog.show();
  573. },
  574. showAssessmentAfterDialog: function() {
  575. this.$refs.assessment_after_dislysis.show(this.assessment_after_dislysis,this.last_assessment_after_dislysis);
  576. },
  577. showDoctorAdviceDialog: function() {
  578. this.$refs.doctor_advice.show(this.his_is_open);
  579. },
  580. showComputerDialog: function() {
  581. this.$refs.computer_dialog.show(this.dialysis_order);
  582. },
  583. showFinishDialog: function() {
  584. this.$refs.finish_dialog.show(this.dialysis_order);
  585. },
  586. showPrescription: function() {
  587. this.$refs.prescription.show(this.prescription,this.schedual,this.last_dialysis_prescribe,this.his_is_open);
  588. },
  589. showAccepts: function() {
  590. this.$refs.accepts.show(this.receiver_treatment_access);
  591. },
  592. showAssessmentBefore: function() {
  593. console.log(this.last_predialysis_evaluation)
  594. this.$refs.assessmentBefore.show(this.predialysis_evaluation,this.last_dryWeight_dislysis,this.last_predialysis_evaluation,this.lastAssessment);
  595. },
  596. showDoubleCheck: function() {
  597. this.$refs.doubleCheck.show();
  598. },
  599. showrTeatmentSummary: function() {
  600. this.$refs.treatmentSummary.show(this.treatment_summary);
  601. },
  602. assessmentAfterDislysisFunc: function(val) {
  603. this.assessment_after_dislysis = val;
  604. this.$refs.assessment_after_dislysis.setRecords(
  605. this.assessment_after_dislysis
  606. );
  607. this.$emit("assessmentAfterDislysis", this.assessment_after_dislysis);
  608. }
  609. }
  610. };
  611. </script>
  612. <style style="stylesheet/scss" lang="scss" scoped>
  613. .grid {
  614. padding: 10px 0 20px 0;
  615. .list {
  616. ul {
  617. @include display-flex;
  618. @include align-items-center;
  619. @include text-align;
  620. @include justify-content-around;
  621. cursor: pointer;
  622. li {
  623. font-size: 12px;
  624. color: #5d6b7a;
  625. margin-top: 20px;
  626. p {
  627. height: 30px;
  628. line-height: 30px;
  629. color: #34495e;
  630. font-size: 14px;
  631. }
  632. img {
  633. width: 50px;
  634. height: 50px;
  635. }
  636. }
  637. }
  638. }
  639. }
  640. .txsj {
  641. text-align: center;
  642. margin-bottom: 20px;
  643. }
  644. .redpoint {
  645. display: inline-block;
  646. height: 26px;
  647. width: 26px;
  648. line-height: 26px;
  649. text-align: center;
  650. font-size: 16px;
  651. border-radius: 20px;
  652. color: #fff;
  653. background: #f56c6c;
  654. position: absolute;
  655. top: -6px;
  656. right: -8px;
  657. border: 1px solid #fff;
  658. }
  659. .newOrdersAdvice {
  660. position: relative;
  661. }
  662. </style>