drugReportDetails.js 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. "use strict";
  2. var common_vendor = require("../common/vendor.js");
  3. var api_drugReport = require("../api/drugReport.js");
  4. require("../common/request.js");
  5. const _sfc_main = {
  6. data() {
  7. return {
  8. statusBarHeight: common_vendor.index.getStorageSync("menuInfo").statusBarHeight,
  9. reportId: null,
  10. report: null
  11. };
  12. },
  13. onLoad(options) {
  14. this.reportId = options.reportId;
  15. },
  16. onShow() {
  17. this.getDrugReportById();
  18. },
  19. methods: {
  20. goBack() {
  21. common_vendor.index.navigateBack();
  22. },
  23. doPing() {
  24. common_vendor.index.navigateTo({
  25. url: "./drugReportPing?reportId=" + this.reportId
  26. });
  27. },
  28. getDrugReportById() {
  29. var data = { reportId: this.reportId };
  30. api_drugReport.getDrugReportById(data).then((res) => {
  31. if (res.code == 200) {
  32. this.report = res.data;
  33. }
  34. }, (err) => {
  35. });
  36. }
  37. }
  38. };
  39. function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  40. return common_vendor.e({
  41. a: $data.statusBarHeight,
  42. b: common_vendor.o(($event) => $options.goBack()),
  43. c: $data.report != null
  44. }, $data.report != null ? common_vendor.e({
  45. d: $data.statusBarHeight,
  46. e: $data.report.avatar == null ? "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/22cb9518a55040dea74d8f730551a7a2.jpg" : $data.report.avatar,
  47. f: common_vendor.t($data.report.doctorName),
  48. g: common_vendor.t($data.report.createTime),
  49. h: $data.report != null && $data.report.reportSummary != null && $data.report.reportSummary != ""
  50. }, $data.report != null && $data.report.reportSummary != null && $data.report.reportSummary != "" ? {
  51. i: common_vendor.t($data.report.reportSummary)
  52. } : {}, {
  53. j: $data.report != null && $data.report.reportAdvice != null && $data.report.reportAdvice != ""
  54. }, $data.report != null && $data.report.reportAdvice != null && $data.report.reportAdvice != "" ? {
  55. k: common_vendor.t($data.report.reportAdvice)
  56. } : {}) : {}, {
  57. l: $data.report.status == 1
  58. }, $data.report.status == 1 ? {
  59. m: common_vendor.o(($event) => $options.doPing())
  60. } : {});
  61. }
  62. var MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-7623f853"], ["__file", "E:/Project/2023/\u95EE\u8BCA\u5E73\u53F0/his_user_miniapp/pages_user/drugReportDetails.vue"]]);
  63. wx.createPage(MiniProgramPage);