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

PatientBox.vue 28KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938
  1. <template>
  2. <div>
  3. <!-- <router-link to="/dialysis/details"> -->
  4. <div
  5. class="patient"
  6. v-for="schedule in schedules"
  7. v-if="schedule.patient"
  8. :class="borderColor(schedule)"
  9. @click.stop="detailAction(schedule)"
  10. :key="schedule.id"
  11. >
  12. <div class="kehu">
  13. <div class="tx">
  14. <img
  15. :src="
  16. schedule.patient.avatar.length > 0
  17. ? schedule.patient.avatar
  18. : '../../assets/home/analyze.png'
  19. "
  20. alt=""
  21. />
  22. <div>
  23. <div class="right">
  24. <h3 class="name">
  25. {{ schedule.patient.name
  26. }}<span class="yc" v-show="isAbnormal(schedule)">异常</span>
  27. </h3>
  28. <span class="num"
  29. >{{ genderText(schedule) }} | {{ getAge(schedule) }} 岁</span
  30. >
  31. <div
  32. style="
  33. margin-left: 10px;
  34. font-size: 12px;
  35. color: #34495e;
  36. margin-right: 5px;
  37. "
  38. v-if="
  39. schedule.assessment_before_dislysis && patientStateVal == 1
  40. "
  41. >
  42. 签到时间:{{
  43. getTime(schedule.assessment_before_dislysis.created_time)
  44. }}
  45. </div>
  46. </div>
  47. <div
  48. style="
  49. margin-top: 5px;
  50. text-align: left;
  51. height: 24px;
  52. min-width: 205px;
  53. "
  54. >
  55. <span
  56. class="tip1"
  57. v-if="
  58. schedule.prescription == null ||
  59. schedule.prescription.creater == 0
  60. "
  61. @click.stop="open(schedule)"
  62. >
  63. 开处方
  64. </span>
  65. <span
  66. class="tip2"
  67. v-if="
  68. schedule.treatment_summary == null ||
  69. schedule.treatment_summary.dialysis_summary == ''
  70. "
  71. @click.stop="open1(schedule)"
  72. >
  73. 开小结
  74. </span>
  75. <span class="online" v-show="computeState(schedule) != 4">
  76. <span :class="stateColor(schedule)">{{
  77. stateText(schedule)
  78. }}</span>
  79. </span>
  80. </div>
  81. </div>
  82. <!-- v-if="schedule.patient.troble_shoot == 1" -->
  83. <div class="difficult" v-if="schedule.patient.troble_shoot == 1">
  84. 疑难内瘘
  85. </div>
  86. <!-- <div style="height:24px;margin-right: 10px;">
  87. <div class="online" v-show="computeState(schedule) != 4">
  88. <p :class="stateColor(schedule)">{{ stateText(schedule) }}</p>
  89. </div>
  90. </div> -->
  91. <!-- <div style="margin-top:13px;font-size:12px;color:#34495e;margin-right: 5px;" v-if="schedule.assessment_before_dislysis && patientStateVal == 1">签到时间:{{ getTime(schedule.assessment_before_dislysis.created_time) }}</div> -->
  92. </div>
  93. </div>
  94. <div class="dislysisInfo">
  95. <p>
  96. 体重(前/后kg):
  97. {{
  98. schedule.assessment_before_dislysis
  99. ? schedule.assessment_before_dislysis.weight_before
  100. : ""
  101. }}
  102. <span
  103. v-if="
  104. schedule.assessment_after_dislysis &&
  105. schedule.assessment_after_dislysis.weight_after > 0
  106. "
  107. >/{{
  108. schedule.assessment_after_dislysis
  109. ? schedule.assessment_after_dislysis.weight_after
  110. : ""
  111. }}</span
  112. >
  113. </p>
  114. <p>
  115. 目标超滤量:
  116. <span
  117. v-if="
  118. schedule.prescription &&
  119. schedule.prescription.target_ultrafiltration > 0
  120. "
  121. >{{
  122. schedule.prescription
  123. ? schedule.prescription.target_ultrafiltration
  124. : ""
  125. }}</span
  126. >
  127. </p>
  128. <p
  129. :title="
  130. schedule.prescription
  131. ? schedule.prescription.dialyzer_perfusion_apparatus
  132. : ''
  133. "
  134. >
  135. 透析器/灌流器:{{
  136. schedule.prescription
  137. ? schedule.prescription.dialyzer_perfusion_apparatus
  138. : ""
  139. }}
  140. <span v-if="schedule.prescription != null">{{
  141. schedule.prescription
  142. ? schedule.prescription.dialysis_dialyszers
  143. : ""
  144. }}</span>
  145. <span
  146. v-if="
  147. schedule.prescription != null &&
  148. schedule.prescription.dialysis_irrigation != ''
  149. "
  150. >/</span
  151. >
  152. <span v-if="schedule.prescription != null">{{
  153. schedule.prescription
  154. ? schedule.prescription.dialysis_irrigation
  155. : ""
  156. }}</span>
  157. </p>
  158. </div>
  159. <div
  160. class="function"
  161. :class="functionColor(schedule)"
  162. :id="modeColor(schedule.mode_id)"
  163. >
  164. <ul>
  165. <li>
  166. <span class="iconfont" :id="modeColor(schedule.mode_id)"
  167. >&#xe6f5;</span
  168. >班次 :
  169. {{ timeTypeText(schedule) }}
  170. </li>
  171. <li>
  172. <span class="iconfont" :id="modeColor(schedule.mode_id)"
  173. >&#xe6de;</span
  174. >床位号 :
  175. {{ schedule.device_number.number }}
  176. </li>
  177. <li>
  178. <span class="iconfont" :id="modeColor(schedule.mode_id)"
  179. >&#xe6f6;</span
  180. >透析模式 :
  181. {{
  182. schedule.mode_id &&
  183. $store.getters.treatment_mode[schedule.mode_id]
  184. ? $store.getters.treatment_mode[schedule.mode_id].name
  185. : ""
  186. }}
  187. </li>
  188. </ul>
  189. </div>
  190. </div>
  191. <!-- </router-link> -->
  192. <dialysis-prescription-dialog
  193. title="透析处方"
  194. ref="prescription"
  195. :patient="patient"
  196. :prescription="prescription"
  197. :solution="solution"
  198. @advice="adviceFunc"
  199. :niprocart_info="niprocart_info"
  200. :jms_info="jms_info"
  201. :fistula_needle_set_info="fistula_needle_set_info"
  202. :fistula_needle_set_16_info="fistula_needle_set_16_info"
  203. :hemoperfusion_info="hemoperfusion_info"
  204. :dialyser_sterilised_info="dialyser_sterilised_info"
  205. :filtryzer_info="filtryzer_info"
  206. :dialyzers_info="dialyzers_info"
  207. :injector_info="injector_info"
  208. :bloodlines_info="bloodlines_info"
  209. :tubingHemodialysis_info="tubingHemodialysis_info"
  210. :safe_package_info="safe_package_info"
  211. :aliquid_info="aliquid_info"
  212. :config="config"
  213. :admin_users="admin_users"
  214. :targetAdvices="longAdvices"
  215. :waitUploadAdvices="waitUploadAdvices"
  216. :is_open="is_open"
  217. :predialysis="predialysis_evaluation"
  218. :last_predialysis="lastPredialysisEvaluation"
  219. :record="assessment_after_dislysis"
  220. :last_record="lastAssessmentAfterDislysis"
  221. :last_prescription="lastDialysisPrescribe"
  222. :dry_weight="lastDryWeightDislysis"
  223. :schedual="temp_schedual"
  224. :date="date"
  225. :stockType="stockType"
  226. ></dialysis-prescription-dialog>
  227. <treatment-summary-dialog
  228. title="治疗小结"
  229. ref="treatmentSummary"
  230. :patient="patient"
  231. :treatment_summary="treatment_summary"
  232. ></treatment-summary-dialog>
  233. </div>
  234. </template>
  235. <script>
  236. import { parseTime } from "@/utils";
  237. import { jsGetAge } from "@/utils/tools";
  238. import dialysisPrescriptionDialog from "../dialysis/details/dialog/dialysisPrescriptionDialog";
  239. import treatmentSummaryDialog from "../dialysis/details/dialog/treatmentSummaryDialog";
  240. import {
  241. getDialysisScheduleDetail,
  242. getLongAdvice,
  243. } from "@/api/dialysis_record";
  244. export default {
  245. name: "PatientBox",
  246. components: {
  247. dialysisPrescriptionDialog,
  248. treatmentSummaryDialog,
  249. },
  250. data() {
  251. return {
  252. patients: [
  253. {
  254. state: 2,
  255. yc: false,
  256. name: "张三",
  257. sex: "女",
  258. age: 90,
  259. },
  260. {
  261. state: 3,
  262. yc: true,
  263. name: "张三",
  264. sex: "女",
  265. age: 90,
  266. },
  267. {
  268. state: 4,
  269. yc: true,
  270. name: "张三",
  271. sex: "女",
  272. age: 90,
  273. },
  274. {
  275. state: 1,
  276. yc: true,
  277. name: "张三",
  278. sex: "女",
  279. age: 90,
  280. },
  281. ],
  282. //
  283. longAdvices: [],
  284. waitUploadAdvices: [],
  285. is_open: 0,
  286. targetAdvices: [],
  287. patient: { id: 0 }, // 患者信息
  288. schedual: { id: 0 }, // 患者排班信息
  289. prescription: { id: 0 }, // 透析处方
  290. solution: { id: 0 }, // 透析方案
  291. system_prescribe: { id: 0 },
  292. receiver_treatment_access: { id: 0 }, // 接诊评估
  293. predialysis_evaluation: { id: 0 }, // 透前评估
  294. doctor_advices: [], // 临时医嘱
  295. double_check: { id: 0 }, // 双人核对
  296. assessment_after_dislysis: { id: 0 }, // 透后评估
  297. treatment_summary: { id: 0 }, // 治疗小结
  298. monitor_records: [], // 透析监测
  299. dialysis_order: { id: 0 }, // 透析记录
  300. admin_users: [], // 系统用户列表
  301. devices: [], // 设备
  302. device_numbers: [], // 床位号
  303. admin_user_map: {}, // {user_id: admin_user object}
  304. device_map: {}, // {device_id: device}
  305. device_number_map: {}, // {device_number_id: device_number}
  306. niprocart_info: [],
  307. jms_info: [],
  308. fistula_needle_set_info: [],
  309. fistula_needle_set_16_info: [],
  310. hemoperfusion_info: [],
  311. dialyser_sterilised_info: [],
  312. filtryzer_info: [],
  313. dialyzers_info: [],
  314. injector_info: [],
  315. bloodlines_info: [],
  316. tubingHemodialysis_info: [],
  317. safe_package_info: [],
  318. aliquid_info: [],
  319. config: {},
  320. lastPredialysisEvaluation: { id: 0 },
  321. lastMonitorRecord: { id: 0 },
  322. lastAssessmentAfterDislysis: { id: 0 },
  323. lastDryWeightDislysis: { id: 0 },
  324. headNurses: [],
  325. lastDialysisPrescribe: { id: 0 },
  326. temp_schedual: null,
  327. date: "",
  328. modedata: 0,
  329. stockType: [],
  330. };
  331. },
  332. props: {
  333. schedules: {
  334. type: Array,
  335. },
  336. patientStateVal: Number,
  337. },
  338. methods: {
  339. stateColor: function (schedual) {
  340. var state = this.computeState(schedual);
  341. if (state == 1) {
  342. return "blue";
  343. } else if (state == 2) {
  344. return "gray";
  345. } else if (state == 3) {
  346. return "red";
  347. } else {
  348. return "blue";
  349. }
  350. },
  351. functionColor: function (schedual) {
  352. var state = this.computeState(schedual);
  353. if (state == 1 || state == 3) {
  354. return "blue";
  355. } else if (state == 2) {
  356. return "gray";
  357. } else {
  358. return "blue";
  359. }
  360. },
  361. borderColor: function (schedual) {
  362. var yc = this.isAbnormal(schedual);
  363. if (yc == true) {
  364. return "red";
  365. } else {
  366. return "gray";
  367. }
  368. },
  369. stateText: function (schedual) {
  370. var state = this.computeState(schedual);
  371. if (state == 1) {
  372. return "已上机";
  373. } else if (state == 2) {
  374. return "已下机";
  375. } else if (state == 3) {
  376. return "监测中";
  377. } else {
  378. // return schedual.patient.gender == 1 ? "男" : "女"
  379. return "未上机";
  380. }
  381. },
  382. computeState: function (schedual) {
  383. if (schedual.dialysis_order == null) {
  384. // 未上机
  385. return 4;
  386. } else if (schedual.dialysis_order.stage == 2) {
  387. // 已下机
  388. return 2;
  389. } else if (
  390. schedual.dialysis_order.stage == 1 &&
  391. schedual.monitoring_records != null &&
  392. schedual.monitoring_records.length > 1
  393. ) {
  394. // 监测中
  395. return 3;
  396. } else {
  397. return 1;
  398. }
  399. },
  400. orderState: function (schedual) {
  401. if (schedual.dialysis_order == null) {
  402. // 未上机
  403. return 4;
  404. } else if (schedual.dialysis_order.stage == 2) {
  405. // 已下机
  406. return 2;
  407. } else if (
  408. schedual.dialysis_order.stage == 1 &&
  409. schedual.monitoring_records != null &&
  410. schedual.monitoring_records.length > 1
  411. ) {
  412. // 监测中
  413. return 3;
  414. } else {
  415. return 1;
  416. }
  417. },
  418. isAbnormal: function (schedual) {
  419. return false; // schedual.yc;
  420. },
  421. timeTypeText: function (schedual) {
  422. if (schedual.schedule_type == 1) {
  423. return "上午";
  424. } else if (schedual.schedule_type == 2) {
  425. return "下午";
  426. } else {
  427. return "晚上";
  428. }
  429. },
  430. genderText: function (schedual) {
  431. if (schedual.patient.gender == 0) {
  432. return "未知";
  433. } else if (schedual.patient.gender == 1) {
  434. return "男";
  435. } else {
  436. return "女";
  437. }
  438. },
  439. age: function (schedual) {
  440. if (schedual.patient.birthday == 0) {
  441. return "";
  442. } else {
  443. return jsGetAge(
  444. parseTime(schedual.patient.birthday, "{y}-{m}-{d}"),
  445. "-"
  446. );
  447. }
  448. // var now = new Date()
  449. // var nowYear = parseTime(now, "{y}")
  450. // var birthdayYear = parseTime(schedual.patient.birthday, "{y}")
  451. // // console.log(nowYear)
  452. // // console.log(birthdayYear)
  453. // return nowYear - birthdayYear
  454. },
  455. getAge: function (val) {
  456. var thisLen = val.patient.id_card_no.length;
  457. var birth = "";
  458. if (thisLen == 15) {
  459. birth = "19" + val.patient.id_card_no.substr(6, 6);
  460. } else {
  461. birth = val.patient.id_card_no.substr(6, 8);
  462. }
  463. var birthtwo =
  464. birth.substr(0, 4) +
  465. "-" +
  466. birth.substr(4, 2) +
  467. "-" +
  468. birth.substr(6, 2);
  469. var age = jsGetAge(birthtwo, "-");
  470. return age;
  471. },
  472. detailAction: function (schedual) {
  473. var patient_id = schedual.patient_id;
  474. var date = schedual.schedule_date;
  475. this.$router.push({
  476. path: "/dialysis/details",
  477. query: {
  478. patient_id: patient_id,
  479. date: date,
  480. patient_name: schedual.patient.name,
  481. mode_id: schedual.mode_id,
  482. },
  483. });
  484. },
  485. //
  486. getScheduleDetail: function () {
  487. var dateStr = parseTime(this.date, "{y}-{m}-{d}");
  488. this.doctor_advices = [];
  489. getDialysisScheduleDetail(this.patient_id, dateStr).then((rs) => {
  490. var resp = rs.data;
  491. if (resp.state == 1) {
  492. var patient = resp.data.patient; // 患者信息
  493. var schedual = resp.data.schedual; // 患者排班信息
  494. var prescription = resp.data.prescription; // 透析处方
  495. if (prescription != null) {
  496. if (prescription.body_fluid == -2) {
  497. prescription.body_fluid = 0;
  498. }
  499. }
  500. console.log("透析处方323332323223323223", prescription);
  501. var solution = resp.data.solution; // 透析方案
  502. var receiver_treatment_access = resp.data.receiver_treatment_access; // 接诊评估
  503. console.log("receiver_treatment_access", receiver_treatment_access);
  504. var predialysis_evaluation = resp.data.predialysis_evaluation; // 透前评估
  505. console.log("透前评估", predialysis_evaluation);
  506. if (predialysis_evaluation != null) {
  507. if (predialysis_evaluation.blood_access_part_id == -2) {
  508. predialysis_evaluation.blood_access_part_id = 0;
  509. }
  510. }
  511. var doctor_advices = resp.data.doctor_advices; // 临时医嘱
  512. var double_check = resp.data.double_check; // 双人核对
  513. var assessment_after_dislysis = resp.data.assessment_after_dislysis; // 透后评估
  514. var treatment_summary = resp.data.treatment_summary; // 治疗小结
  515. var monitor_records = resp.data.monitor_records; // 透析监测
  516. var dialysis_order = resp.data.dialysis_order; // 透析记录
  517. var niprocart_info = resp.data.niprocart_info;
  518. var jms_info = resp.data.jms_info;
  519. var fistula_needle_set_info = resp.data.fistula_needle_set_info;
  520. var fistula_needle_set_16_info = resp.data.fistula_needle_set_16_info;
  521. var hemoperfusion_info = resp.data.hemoperfusion_info;
  522. var dialyser_sterilised_info = resp.data.dialyser_sterilised_info;
  523. var filtryzer_info = resp.data.filtryzer_info;
  524. var dialyzers_info = resp.data.dialyzers_info;
  525. var injector_info = resp.data.injector_info;
  526. var bloodlines_info = resp.data.bloodlines_info;
  527. var tubingHemodialysis_info = resp.data.tubingHemodialysis_info;
  528. var safe_package_info = resp.data.safe_package_info;
  529. var aliquid_info = resp.data.aliquid_info;
  530. var lastPredialysisEvaluation = resp.data.lastPredialysisEvaluation;
  531. console.log("上次透前评估", 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 =
  539. resp.data.lastAssessmentAfterDislysis;
  540. var lastDialysisPrescribe = resp.data.lastDialysisPrescribe;
  541. var lastDryWeightDislysis = resp.data.lastDryWeightDislysis;
  542. var system_prescribe = resp.data.system_prescribe;
  543. var stockType = resp.data.stockType;
  544. this.stockType = stockType;
  545. console.log("元单快乐222222", this.stockType);
  546. this.$refs.prescription.setLastRecord(
  547. schedual,
  548. lastAssessmentAfterDislysis,
  549. lastPredialysisEvaluation,
  550. lastDialysisPrescribe,
  551. lastDryWeightDislysis,
  552. system_prescribe
  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.headNurses = headNurses;
  562. this.system_prescribe = system_prescribe;
  563. this.niprocart_info = niprocart_info;
  564. this.jms_info = jms_info;
  565. this.fistula_needle_set_info = fistula_needle_set_info;
  566. this.fistula_needle_set_16_info = fistula_needle_set_16_info;
  567. this.hemoperfusion_info = hemoperfusion_info;
  568. this.dialyser_sterilised_info = dialyser_sterilised_info;
  569. this.filtryzer_info = filtryzer_info;
  570. this.dialyzers_info = dialyzers_info;
  571. this.injector_info = injector_info;
  572. this.bloodlines_info = bloodlines_info;
  573. this.tubingHemodialysis_info = tubingHemodialysis_info;
  574. this.safe_package_info = safe_package_info;
  575. this.aliquid_info = aliquid_info;
  576. this.config = config;
  577. this.patient = patient;
  578. this.schedual = schedual == null ? { id: 0 } : schedual;
  579. this.prescription = prescription == null ? { id: 0 } : prescription;
  580. console.log("this.prescription", this.prescription);
  581. this.solution = solution == null ? { id: 0 } : solution;
  582. console.log("this.solution", this.solution);
  583. this.receiver_treatment_access =
  584. receiver_treatment_access == null
  585. ? { id: 0 }
  586. : receiver_treatment_access;
  587. this.predialysis_evaluation =
  588. predialysis_evaluation == null ? { id: 0 } : predialysis_evaluation;
  589. this.doctor_advices = doctor_advices == null ? [] : doctor_advices;
  590. this.double_check = double_check == null ? { id: 0 } : double_check;
  591. this.assessment_after_dislysis =
  592. assessment_after_dislysis == null
  593. ? { id: 0 }
  594. : assessment_after_dislysis;
  595. this.treatment_summary =
  596. treatment_summary == null ? { id: 0 } : treatment_summary;
  597. this.monitor_records = monitor_records == null ? [] : monitor_records;
  598. this.dialysis_order =
  599. dialysis_order == null ? { id: 0 } : dialysis_order;
  600. // this.$refs.stat_order.setAdvices(this.doctor_advices)
  601. // this.$refs.monitoring.setRecords(this.monitor_records)
  602. this.admin_users = resp.data.doctors;
  603. this.devices = resp.data.devices;
  604. this.device_numbers = resp.data.device_numbers;
  605. var device_map = {};
  606. for (let index = 0; index < this.devices.length; index++) {
  607. const device = this.devices[index];
  608. device_map[device.id] = device;
  609. }
  610. this.device_map = device_map;
  611. var admin_map = {};
  612. for (let index = 0; index < this.admin_users.length; index++) {
  613. const admin = this.admin_users[index];
  614. admin_map[admin.id] = admin;
  615. }
  616. this.admin_user_map = admin_map;
  617. var device_number_map = {};
  618. for (let index = 0; index < this.device_numbers.length; index++) {
  619. const device_number = this.device_numbers[index];
  620. device_number_map[device_number.id] = device_number;
  621. }
  622. this.device_number_map = device_number_map;
  623. this.getLongAdvice();
  624. } else {
  625. this.$message.error(resp.msg);
  626. }
  627. if (this.lastDialysisPrescribe != null) {
  628. delete this.lastDialysisPrescribe.target_ultrafiltration;
  629. }
  630. if (this.solution != null) {
  631. delete this.solution.target_ultrafiltration;
  632. }
  633. });
  634. },
  635. getLongAdvice() {
  636. let params = {
  637. patient_id: this.patient_id,
  638. };
  639. getLongAdvice(params).then((rs) => {
  640. var resp = rs.data;
  641. if (resp.state == 1) {
  642. var status = parseInt(resp.data.status);
  643. switch (status) {
  644. case 2:
  645. var totalAdvice = resp.data.advices;
  646. var longAdvicesTwo = resp.data.advices_two;
  647. var waitUploadAdvices = [];
  648. for (let i = 0; i < totalAdvice.length; i++) {
  649. totalAdvice[i]["isCheck"] = 1;
  650. }
  651. for (let i = 0; i < totalAdvice.length; i++) {
  652. for (let a = 0; a < longAdvicesTwo.length; a++) {
  653. if (
  654. totalAdvice[i].template_id ==
  655. longAdvicesTwo[a].template_id &&
  656. totalAdvice[i].frequency_type ==
  657. longAdvicesTwo[a].frequency_type
  658. ) {
  659. totalAdvice[i]["isCheck"] = 0;
  660. }
  661. }
  662. }
  663. for (let i = 0; i < totalAdvice.length; i++) {
  664. if (totalAdvice[i].isCheck == 1) {
  665. waitUploadAdvices.push(totalAdvice[i]);
  666. }
  667. }
  668. this.is_open = resp.data.is_open_remind;
  669. this.longAdvices = totalAdvice;
  670. this.waitUploadAdvices = waitUploadAdvices;
  671. break;
  672. }
  673. } else {
  674. this.$message.error(resp.msg);
  675. }
  676. });
  677. },
  678. adviceFunc: function () {
  679. this.$emit("advice");
  680. },
  681. open(schedual) {
  682. this.date = schedual.schedule_date;
  683. this.patient_id = schedual.patient_id;
  684. this.modedata = 1;
  685. this.getScheduleDetail();
  686. // this.getLongAdvice()
  687. this.$refs.prescription.show(this.prescription, schedual);
  688. },
  689. open1(schedual) {
  690. this.date = schedual.schedule_date;
  691. this.patient_id = schedual.patient_id;
  692. this.getScheduleDetail();
  693. this.getLongAdvice();
  694. this.$refs.treatmentSummary.show(this.treatment_summary, this.date);
  695. },
  696. getTime(date) {
  697. date = new Date(date * 1000);
  698. var Y = date.getFullYear() + "-";
  699. var M =
  700. date.getMonth() + 1 < 10
  701. ? "0" + (date.getMonth() + 1)
  702. : date.getMonth() + 1;
  703. var D = date.getDate() < 10 ? "0" + date.getDate() : date.getDate();
  704. var h = date.getHours() < 10 ? "0" + date.getHours() : date.getHours();
  705. var m =
  706. date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes();
  707. var s =
  708. date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds();
  709. let strDate = h + ":" + m;
  710. return strDate;
  711. },
  712. modeColor(id) {
  713. if (id == 1) {
  714. } else if (id == 2) {
  715. return "modeRed";
  716. } else if (id == 3) {
  717. return "modePurple";
  718. }
  719. },
  720. },
  721. };
  722. </script>
  723. <style style="stylesheet/scss" lang="scss" scoped>
  724. .patient {
  725. border: 1px #e5e5ee solid;
  726. padding: 9px 0;
  727. margin: 0 15px 15px 0;
  728. float: left;
  729. width: 360px;
  730. cursor: pointer;
  731. .function {
  732. padding: 15px 5px 0 5px;
  733. color: #7b8a97;
  734. ul {
  735. @include display-flex;
  736. @include align-items-center;
  737. @include text-align;
  738. @include justify-content-between;
  739. li {
  740. font-size: 13px;
  741. @include display-flex;
  742. @include align-items-center;
  743. .iconfont {
  744. margin: 0 5px 0 0;
  745. font-size: 18px;
  746. }
  747. }
  748. }
  749. }
  750. .blue {
  751. color: $main-color;
  752. .iconfont {
  753. color: $main-color;
  754. }
  755. }
  756. .kehu {
  757. @include display-flex;
  758. // @include align-items-center;
  759. @include text-align;
  760. @include justify-content-between;
  761. // border-bottom: 1px #e5e5e5 solid;
  762. padding: 0 0 10px 20px;
  763. .tx {
  764. @include display-flex;
  765. // @include align-items-center;
  766. width: 100%;
  767. img {
  768. width: 45px;
  769. height: 45px;
  770. border-radius: 50%;
  771. float: left;
  772. margin: 0 15px 0 0;
  773. }
  774. .right {
  775. // float: left;
  776. // text-align: left;
  777. display: flex;
  778. align-items: center;
  779. margin-top: 6px;
  780. .name {
  781. font-size: 15px;
  782. color: #34495e;
  783. font-weight: bold;
  784. height: 20px;
  785. line-height: 20px;
  786. margin-right: 10px;
  787. .yc {
  788. background: #ff7979;
  789. color: #fff;
  790. height: 19px;
  791. line-height: 19px;
  792. font-size: 12px;
  793. width: 37px;
  794. border-radius: 4px;
  795. display: inline-block;
  796. text-align: center;
  797. margin-left: 6px;
  798. }
  799. }
  800. .num {
  801. font-size: 13px;
  802. color: #7b8a97;
  803. }
  804. }
  805. .tip1 {
  806. background: #4fc7cb;
  807. border-radius: 5px;
  808. text-align: center;
  809. font-size: 12px;
  810. display: inline-block;
  811. width: 60px;
  812. color: #fff;
  813. width: 65px;
  814. height: 24px;
  815. line-height: 24px;
  816. }
  817. .tip2 {
  818. background: #7bce91;
  819. border-radius: 5px;
  820. text-align: center;
  821. font-size: 12px;
  822. display: inline-block;
  823. width: 60px;
  824. color: #fff;
  825. width: 65px;
  826. height: 24px;
  827. line-height: 24px;
  828. }
  829. }
  830. .online {
  831. text-align: center;
  832. width: 30%;
  833. // border-left: 1px #e5e5e5 solid;
  834. span {
  835. background: #c6cdd2;
  836. color: #fff;
  837. width: 65px;
  838. height: 24px;
  839. line-height: 24px;
  840. border-radius: 4px;
  841. margin: 0 auto;
  842. font-size: 12px;
  843. margin-top: 4px;
  844. display: inline-block;
  845. }
  846. .blue {
  847. background: $main-color;
  848. }
  849. .red {
  850. background: #f18f68;
  851. }
  852. .green {
  853. background: #5bd18b;
  854. }
  855. .gray {
  856. background: #a8b3ba;
  857. }
  858. .lightGray {
  859. background: #c6cdd2;
  860. }
  861. .time {
  862. font-size: 26px;
  863. color: #34495e;
  864. }
  865. }
  866. }
  867. .dislysisInfo {
  868. color: rgb(123, 138, 151);
  869. border-bottom: 1px solid rgb(229, 229, 229);
  870. padding-left: 80px;
  871. > p {
  872. margin-bottom: 5px;
  873. overflow: hidden;
  874. text-overflow: ellipsis;
  875. white-space: nowrap;
  876. }
  877. }
  878. }
  879. .red {
  880. border: 1px #ff7979 solid;
  881. }
  882. #modeRed {
  883. color: #ed5555;
  884. }
  885. #modePurple {
  886. color: #53b86e;
  887. }
  888. .difficult {
  889. width: 71px;
  890. height: 25px;
  891. font-size: 12px;
  892. border-radius: 0 0 0 30px;
  893. background: #78d660;
  894. text-align: center;
  895. line-height: 25px;
  896. position: relative;
  897. bottom: 10px;
  898. left: 3px;
  899. color: white;
  900. }
  901. </style>