"use strict";
|
const common_vendor = require("../../common/vendor.js");
|
const _sfc_main = {
|
__name: "report-detail",
|
setup(__props) {
|
const report = common_vendor.ref({
|
id: 1,
|
name: "心电图检查报告",
|
status: "normal",
|
// normal-正常 abnormal-异常
|
statusText: "正常",
|
checkTime: "2024-03-25 09:30",
|
reportTime: "2024-03-25 10:30",
|
department: "心内科",
|
doctor: "张医生",
|
result: "窦性心律,心率75次/分,各导联ST-T未见明显异常。",
|
images: [
|
"/static/report/ecg1.jpg",
|
"/static/report/ecg2.jpg"
|
],
|
advice: "建议定期复查,保持良好的生活习惯,适量运动。"
|
});
|
const previewImage = (index) => {
|
common_vendor.index.previewImage({
|
urls: report.value.images,
|
current: index
|
});
|
};
|
const downloadReport = () => {
|
common_vendor.index.showLoading({
|
title: "下载中..."
|
});
|
setTimeout(() => {
|
common_vendor.index.hideLoading();
|
common_vendor.index.showToast({
|
title: "下载成功",
|
icon: "success"
|
});
|
}, 1500);
|
};
|
const shareReport = () => {
|
common_vendor.index.share({
|
provider: "weixin",
|
scene: "WXSceneSession",
|
type: 1,
|
summary: `${report.value.name} - ${report.value.statusText}`,
|
success: (res) => {
|
common_vendor.index.__f__("log", "at pages/records/report-detail.vue:120", "分享成功:", res);
|
},
|
fail: (err) => {
|
common_vendor.index.__f__("error", "at pages/records/report-detail.vue:123", "分享失败:", err);
|
}
|
});
|
};
|
common_vendor.onMounted(() => {
|
var _a, _b;
|
const pages = getCurrentPages();
|
const page = pages[pages.length - 1];
|
const id = (_b = (_a = page.$page) == null ? void 0 : _a.options) == null ? void 0 : _b.id;
|
loadReport(id);
|
});
|
const loadReport = (id) => {
|
common_vendor.index.__f__("log", "at pages/records/report-detail.vue:140", "加载报告:", id);
|
};
|
return (_ctx, _cache) => {
|
var _a, _b;
|
return common_vendor.e({
|
a: common_vendor.t(report.value.name),
|
b: common_vendor.t(report.value.statusText),
|
c: common_vendor.n(report.value.status),
|
d: common_vendor.t(report.value.checkTime),
|
e: common_vendor.t(report.value.reportTime),
|
f: common_vendor.t(report.value.department),
|
g: common_vendor.t(report.value.doctor),
|
h: common_vendor.t(report.value.result),
|
i: (_a = report.value.images) == null ? void 0 : _a.length
|
}, ((_b = report.value.images) == null ? void 0 : _b.length) ? {
|
j: common_vendor.f(report.value.images, (image, index, i0) => {
|
return {
|
a: index,
|
b: image,
|
c: common_vendor.o(($event) => previewImage(index), index)
|
};
|
})
|
} : {}, {
|
k: common_vendor.t(report.value.advice),
|
l: common_vendor.o(downloadReport),
|
m: common_vendor.o(shareReport),
|
n: common_vendor.gei(_ctx, "")
|
});
|
};
|
}
|
};
|
wx.createPage(_sfc_main);
|
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/records/report-detail.js.map
|