weightTable.vue 1.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <template>
  2. <view class="chartwarp">
  3. <view class="uni-container">
  4. <uni-table ref="table" :loading="loading" border stripe emptyText="暂无更多数据">
  5. <uni-tr>
  6. <uni-th width="110" align="center">日期</uni-th>
  7. <uni-th width="80" align="center">透前体重</uni-th>
  8. <uni-th width="80" align="center">透后体重</uni-th>
  9. <uni-th width="80" align="center">干体重</uni-th>
  10. </uni-tr>
  11. <uni-tr v-for="(item, index) in record" :key="index">
  12. <uni-td>{{ item.assessment_date }}</uni-td>
  13. <uni-td align="center">{{ item.weight_before }}</uni-td>
  14. <uni-td align="center">{{ item.weight_after }}</uni-td>
  15. <uni-td align="center">{{ item.dry_weight }}</uni-td>
  16. </uni-tr>
  17. </uni-table>
  18. <view class="uni-pagination-box">
  19. <!-- <uni-pagination show-icon :page-size="pageSize" :current="pageCurrent" :total="total"
  20. @change="change" /> -->
  21. </view>
  22. </view>
  23. </view>
  24. </template>
  25. <script>
  26. export default {
  27. props: {
  28. record: Array
  29. },
  30. data() {
  31. return {
  32. searchVal: '',
  33. tableData: [],
  34. // 每页数据量
  35. pageSize: 10,
  36. // 当前页
  37. pageCurrent: 1,
  38. // 数据总量
  39. total: 0,
  40. loading: false
  41. }
  42. },
  43. onShow() {
  44. },
  45. methods(){
  46. }
  47. }
  48. </script>
  49. <style>
  50. page {
  51. height: 100%;
  52. background-color: #f3f3f9;
  53. }
  54. .chartwarp {
  55. margin-top: 30rpx;
  56. }
  57. .uni-group {
  58. display: flex;
  59. align-items: center;
  60. }
  61. </style>
  62. <style lang="scss" scoped>
  63. /deep/.chartwarp {
  64. .uni-container {
  65. .uni-table-tr {
  66. .uni-table-th {
  67. background: #f6f6f6;
  68. }
  69. }
  70. }
  71. }
  72. /deep/ .uni-table-th{
  73. background: #f6f6f6;
  74. }
  75. </style>