list.vue 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <template>
  2. <view>
  3. <block v-if="datainfo.length>0">
  4. <!-- 康养 -->
  5. <block v-if="type=='health'">
  6. <view class="healthlist flexc" v-for="(ite,idx) in datainfo" :key="idx">
  7. <view class="hlbox flex1">
  8. <view class="tit overtwo">吃粗粮能够降血脂吗?这三种吃法让血糖不降反增</view>
  9. <view class="flexc">
  10. <view class="txt">2024-11-14</view>
  11. <view class="flexc">
  12. <image :src="eye" class="eyeimg"></image>
  13. <view class="txt">1361</view>
  14. </view>
  15. </view>
  16. </view>
  17. <image :src="noiconpimg" class="hrimg"></image>
  18. </view>
  19. </block>
  20. <view class="shax">{{wtdt}}</view>
  21. </block>
  22. <!-- 无数据 -->
  23. <view class="nodata" v-else>
  24. <image :src="noiconpimg"></image>
  25. <view>
  26. 暂无数据
  27. </view>
  28. </view>
  29. </view>
  30. </template>
  31. <script>
  32. import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
  33. import config from '@/config'
  34. export default{
  35. props:{
  36. datainfo: {
  37. type: Array,
  38. default () {
  39. return []
  40. }
  41. },
  42. wtdt:{
  43. type:String,
  44. default () {
  45. return ''
  46. }
  47. },
  48. type:{
  49. type:String,
  50. default () {
  51. return 0
  52. }
  53. },
  54. },
  55. data(){
  56. return{
  57. noiconpimg:require("@/static/nodata.png"),
  58. eye:require('@/static/images/eye.png'),
  59. }
  60. },
  61. mounted() {
  62. },
  63. methods:{
  64. checkPermi, checkRole,
  65. getDetail(e){
  66. this.$emit('getDetail',e)
  67. },
  68. }
  69. }
  70. </script>
  71. <style lang="scss" scoped>
  72. .flex{display: flex;}
  73. .flexc{display: flex;align-items: center;}
  74. .mb10{margin-bottom: 20rpx;}
  75. .healthlist{
  76. padding:26rpx 22rpx;border-bottom: 2rpx solid #E5E5E5;
  77. .hlbox{
  78. .tit{font-weight: bold;font-size: 28rpx;color: #272727;line-height:48rpx;margin-bottom: 10rpx;}
  79. .txt{font-weight: 500;line-height: 36rpx;font-size: 22rpx;color: #AAAAAA;}
  80. .eyeimg{width: 24rpx;height: 18rpx;margin-right: 10rpx;margin-left: 34rpx;}
  81. }
  82. .hrimg{width: 210rpx;height: 138rpx;flex: 0 0 auto;margin-left: 36rpx;}
  83. }
  84. // 无数据
  85. .nodata{display: flex;flex-direction: column;align-items: center;
  86. image{width: 440rpx;height: 440rpx;}
  87. view{font-size: 30rpx;color: #666666;font-weight: bold;}
  88. }
  89. </style>