InspectionDetail.uvue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. <template>
  2. <scroll-view scroll-y class="container">
  3. <!-- 标题Banner -->
  4. <view class="banner">
  5. <text class="banner-title">📝 报告详情</text>
  6. </view>
  7. <!-- 报告基础信息 -->
  8. <view class="section">
  9. <text class="section-title">检查信息</text>
  10. <view class="info-item"><text>项目名称:</text><text>{{ report.name }}</text></view>
  11. <view class="info-item"><text>检查医生:</text><text>{{ report.doctor }}</text></view>
  12. <view class="info-item"><text>开单时间:</text><text>{{ report.applyDate }}</text></view>
  13. <view class="info-item"><text>报告时间:</text><text>{{ report.reportDate }}</text></view>
  14. </view>
  15. <!-- 检查结果 -->
  16. <view class="section">
  17. <text class="section-title">检查结果</text>
  18. <text class="section-content">{{ report.result }}</text>
  19. </view>
  20. <!-- 结论建议 -->
  21. <view class="section">
  22. <text class="section-title">医生结论</text>
  23. <text class="section-content">{{ report.conclusion }}</text>
  24. </view>
  25. <!-- 按钮 -->
  26. <view class="footer-btn">
  27. <button class="main-btn" @click="goBack">返回上一页</button>
  28. </view>
  29. </scroll-view>
  30. </template>
  31. <script setup>
  32. import {
  33. ref,
  34. onMounted
  35. } from 'vue'
  36. import {
  37. onLoad
  38. } from '@dcloudio/uni-app'
  39. const report = ref({
  40. id: null,
  41. name: '',
  42. doctor: '',
  43. applyDate: '',
  44. reportDate: '',
  45. result: '',
  46. conclusion: ''
  47. })
  48. onLoad((options) => {
  49. const reportId = options.id
  50. // 模拟数据加载,建议替换为后端接口请求
  51. if (reportId === '1') {
  52. report.value = {
  53. id: 1,
  54. name: '胸部CT检查',
  55. doctor: '张医生',
  56. applyDate: '2025-06-10 09:15',
  57. reportDate: '2025-06-10 17:30',
  58. result: '影像显示右肺下叶有小结节,建议定期复查。',
  59. conclusion: '建议每年复查一次,观察结节变化,保持良好作息。'
  60. }
  61. } else {
  62. report.value = {
  63. id: 2,
  64. name: '血常规检验',
  65. doctor: '李医生',
  66. applyDate: '2025-06-08 10:00',
  67. reportDate: '2025-06-08 13:40',
  68. result: '白细胞数量正常,红细胞轻微偏低,血红蛋白正常。',
  69. conclusion: '注意饮食营养,必要时补铁,定期复查。'
  70. }
  71. }
  72. })
  73. const goBack = () => {
  74. uni.navigateBack()
  75. }
  76. </script>
  77. <style scoped>
  78. .container {
  79. padding: 40rpx;
  80. background-color: #f5f7fa;
  81. min-height: 100vh;
  82. box-sizing: border-box;
  83. }
  84. .banner {
  85. background: linear-gradient(135deg, #2193b0, #6dd5ed);
  86. border-radius: 24rpx;
  87. padding: 40rpx 30rpx;
  88. margin-bottom: 40rpx;
  89. box-shadow: 0 8rpx 16rpx rgba(33, 147, 176, 0.3);
  90. }
  91. .banner-title {
  92. color: white;
  93. font-size: 36rpx;
  94. font-weight: bold;
  95. text-align: center;
  96. }
  97. .section {
  98. background-color: #fff;
  99. border-radius: 20rpx;
  100. padding: 30rpx;
  101. margin-bottom: 30rpx;
  102. box-shadow: 0 6rpx 16rpx rgba(0, 0, 0, 0.05);
  103. }
  104. .section-title {
  105. font-size: 32rpx;
  106. color: #333;
  107. font-weight: bold;
  108. margin-bottom: 20rpx;
  109. display: block;
  110. }
  111. .info-item {
  112. display: flex;
  113. justify-content: space-between;
  114. font-size: 28rpx;
  115. color: #666;
  116. margin-bottom: 18rpx;
  117. }
  118. .section-content {
  119. font-size: 28rpx;
  120. color: #444;
  121. line-height: 1.8;
  122. white-space: pre-line;
  123. }
  124. .footer-btn {
  125. margin-top: 40rpx;
  126. display: flex;
  127. justify-content: center;
  128. }
  129. .main-btn {
  130. width: 80%;
  131. padding: 28rpx 0;
  132. font-size: 30rpx;
  133. color: #fff;
  134. border: none;
  135. border-radius: 100rpx;
  136. background: linear-gradient(to right, #36d1dc, #5b86e5);
  137. box-shadow: 0 10rpx 24rpx rgba(91, 134, 229, 0.3);
  138. }
  139. </style>