普兆健康管家前端代码仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

109 lines
2.3 KiB

  1. <template>
  2. <view class="card">
  3. <view class="flex top">
  4. <view class="left">
  5. <view class="title">健康报告</view>
  6. <view class="time">{{ $dayjs(data.createTime).format('YYYY-MM-DD') }}</view>
  7. </view>
  8. <view class="flex right">
  9. <!-- 未完成的检测 -->
  10. <template v-if="data.status == 0">
  11. <button class="btn" @click="jumpToContinueAnswer">去完成</button>
  12. </template>
  13. <!-- 已完成的检测 -->
  14. <template v-else>
  15. <button class="btn" @click="jumpToCompare">报告对比</button>
  16. <button class="btn" @click="jumpToReport">查看方案</button>
  17. </template>
  18. </view>
  19. </view>
  20. <view class="bottom">
  21. <reportScoreView :data="data"></reportScoreView>
  22. </view>
  23. </view>
  24. </template>
  25. <script>
  26. import reportScoreView from './reportScoreView.vue'
  27. export default {
  28. components: {
  29. reportScoreView,
  30. },
  31. props: {
  32. data: {
  33. type: Object,
  34. default() {
  35. return {}
  36. }
  37. }
  38. },
  39. data() {
  40. return {
  41. }
  42. },
  43. methods: {
  44. jumpToCompare() {
  45. this.$utils.navigateTo('/pages_order/report/compare/select')
  46. },
  47. jumpToReport() {
  48. this.$utils.navigateTo(`/pages_order/report/result/index?id=${this.data.id}`)
  49. },
  50. jumpToContinueAnswer() {
  51. // todo
  52. },
  53. },
  54. }
  55. </script>
  56. <style scoped lang="scss">
  57. .card {
  58. margin-top: 32rpx;
  59. padding: 32rpx;
  60. background-image: linear-gradient(#FAFAFF, #F3F3F3);
  61. border: 2rpx solid #FFFFFF;
  62. border-radius: 32rpx;
  63. }
  64. .top {
  65. justify-content: space-between;
  66. .left {
  67. .title {
  68. font-size: 36rpx;
  69. font-weight: 600;
  70. line-height: 1.2;
  71. font-family: PingFang SC;
  72. color: #252545;
  73. }
  74. .time {
  75. margin-top: 4rpx;
  76. font-size: 28rpx;
  77. font-weight: 400;
  78. line-height: 1.4;
  79. font-family: PingFang SC;
  80. color: #393939;
  81. }
  82. }
  83. .right {
  84. .btn {
  85. padding: 8rpx 24rpx;
  86. font-size: 28rpx;
  87. font-weight: 400;
  88. line-height: 1.5;
  89. font-family: PingFang SC;
  90. color: #252545;
  91. border: 2rpx solid #252545;
  92. border-radius: 30rpx;
  93. }
  94. .btn + .btn {
  95. margin-left: 24rpx;
  96. }
  97. }
  98. }
  99. .bottom {
  100. margin-top: 24rpx;
  101. }
  102. </style>