PatientBox.vue 26KB

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