普兆健康管家前端代码仓库
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.

115 lines
3.0 KiB

  1. <template>
  2. <view class="page__view">
  3. <navbar title="选择对比的报告" leftClick @leftClick="$utils.navigateBack" color="#191919" bgColor="#FFFFFF" />
  4. <view class="main">
  5. <reportRecordCard
  6. v-for="(item, index) in list"
  7. :key="item.id"
  8. :data="item"
  9. @select="onSelect(index, $event)"
  10. ></reportRecordCard>
  11. </view>
  12. <view class="flex bottom">
  13. <button class="btn" @click="onCompare">开始对比</button>
  14. </view>
  15. </view>
  16. </template>
  17. <script>
  18. import mixinsList from '@/mixins/list.js'
  19. import reportRecordCard from './reportRecordCard.vue';
  20. export default {
  21. mixins: [mixinsList],
  22. components: {
  23. reportRecordCard,
  24. },
  25. data() {
  26. return {
  27. queryParams: {
  28. pageNo: 1,
  29. pageSize: 10,
  30. // todo
  31. status: 1,
  32. },
  33. // todo
  34. mixinsListApi: '',
  35. }
  36. },
  37. methods: {
  38. // todo: delete
  39. getData() {
  40. console.log('getData')
  41. this.list = [
  42. { id: '001', createTime: '2025-05-21', status: 1, score: 65, change: 0.2, tag: '正常' },
  43. { id: '002', createTime: '2025-05-20', status: 1, score: 65, change: 0.2, tag: '正常' },
  44. { id: '003', createTime: '2025-05-19', status: 1, score: 65, change: 0.2, tag: '正常' },
  45. { id: '004', createTime: '2025-05-18', status: 1, score: 65, change: 0.2, tag: '正常' },
  46. { id: '005', createTime: '2025-05-17', status: 1, score: 65, change: 0.2, tag: '正常' },
  47. { id: '006', createTime: '2025-05-16', status: 1, score: 65, change: 0.2, tag: '正常' },
  48. { id: '007', createTime: '2025-05-15', status: 1, score: 65, change: 0.2, tag: '正常' },
  49. { id: '008', createTime: '2025-05-14', status: 1, score: 65, change: 0.2, tag: '正常' },
  50. { id: '009', createTime: '2025-05-13', status: 1, score: 65, change: 0.2, tag: '正常' },
  51. ]
  52. },
  53. onSelect(index, selected) {
  54. console.log('onSelect', index, selected)
  55. this.list[index].selected = selected
  56. // todo limit two
  57. },
  58. onCompare() {
  59. // todo
  60. let selectedIds = ['001', '002']
  61. this.$utils.navigateTo(`/pages_order/report/compare/result?ids=${JSON.stringify(selectedIds)}`)
  62. },
  63. },
  64. }
  65. </script>
  66. <style scoped lang="scss">
  67. .page__view {
  68. width: 100vw;
  69. min-height: 100vh;
  70. background-color: $uni-bg-color;
  71. position: relative;
  72. /deep/ .nav-bar__view {
  73. position: fixed;
  74. top: 0;
  75. left: 0;
  76. }
  77. }
  78. .main {
  79. padding: calc(var(--status-bar-height) + 128rpx) 32rpx 272rpx 32rpx;
  80. }
  81. .bottom {
  82. width: 100%;
  83. position: fixed;
  84. left: 0;
  85. bottom: 0;
  86. padding: 24rpx 40rpx 92rpx 40rpx;
  87. box-sizing: border-box;
  88. background: #FFFFFF;
  89. column-gap: 16rpx;
  90. .btn {
  91. width: 100%;
  92. padding: 16rpx 0;
  93. font-family: PingFang SC;
  94. font-size: 36rpx;
  95. font-weight: 500;
  96. line-height: 1;
  97. color: #FFFFFF;
  98. background-image: linear-gradient(to right, #4B348F, #845CFA);
  99. border-radius: 41rpx;
  100. }
  101. }
  102. </style>