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

PatientBox.vue 28KB

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