PatientBox.vue 26KB

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