report-upload-card.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <template>
  2. <view class="report-upload-card" @click="handleClick">
  3. <view class="report-upload-left">
  4. <text class="report-upload-icon">{{ icon }}</text>
  5. </view>
  6. <view class="report-upload-right">
  7. <text class="report-upload-title">{{ title }}</text>
  8. <text class="report-upload-desc">{{ desc }}</text>
  9. <view class="report-upload-tags" v-if="tags && tags.length > 0">
  10. <text class="tag" v-for="(t, idx) in tags" :key="idx">{{ t }}</text>
  11. </view>
  12. </view>
  13. <text class="report-upload-arrow">›</text>
  14. </view>
  15. </template>
  16. <script>
  17. export default {
  18. name: 'ReportUploadCard',
  19. props: {
  20. title: { type: String, default: '上传健康报告' },
  21. desc: { type: String, default: '上传体检报告或肠道检测报告,解读分析,获取个性化营养方案' },
  22. tags: { type: Array, default: function() { return ['体检报告', '肠道检测', '解读'] } },
  23. icon: { type: String, default: '📋' }
  24. },
  25. methods: {
  26. handleClick: function() {
  27. this.$emit('click')
  28. }
  29. }
  30. }
  31. </script>
  32. <style scoped>
  33. .report-upload-card {
  34. display: flex;
  35. flex-direction: row;
  36. align-items: center;
  37. background: linear-gradient(135deg, #E8F5E9, #F1F8E9);
  38. border-radius: 20rpx;
  39. padding: 28rpx 24rpx;
  40. box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
  41. }
  42. .report-upload-left {
  43. width: 100rpx;
  44. height: 100rpx;
  45. background: rgba(255,255,255,0.7);
  46. border-radius: 20rpx;
  47. display: flex;
  48. align-items: center;
  49. justify-content: center;
  50. margin-right: 20rpx;
  51. flex-shrink: 0;
  52. }
  53. .report-upload-icon {
  54. font-size: 52rpx;
  55. }
  56. .report-upload-right {
  57. flex: 1;
  58. }
  59. .report-upload-title {
  60. font-size: 30rpx;
  61. font-weight: bold;
  62. color: #2E7D32;
  63. display: block;
  64. margin-bottom: 6rpx;
  65. }
  66. .report-upload-desc {
  67. font-size: 22rpx;
  68. color: #558B2F;
  69. line-height: 1.5;
  70. display: block;
  71. margin-bottom: 10rpx;
  72. }
  73. .report-upload-tags {
  74. display: flex;
  75. flex-direction: row;
  76. flex-wrap: wrap;
  77. gap: 10rpx;
  78. }
  79. .report-upload-tags .tag {
  80. font-size: 20rpx;
  81. color: #33691E;
  82. background: rgba(255,255,255,0.6);
  83. padding: 4rpx 14rpx;
  84. border-radius: 20rpx;
  85. }
  86. .report-upload-arrow {
  87. font-size: 40rpx;
  88. color: #A5D6A7;
  89. margin-left: 12rpx;
  90. }
  91. </style>