FeedbackList.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. <template>
  2. <view class="feedback-list-view">
  3. <pub-list-scroll ref="pubListScrollRef" @next="onScrollTolower" :loaded="loaded" :text="loadText" :status="status">
  4. <view class="no-data" v-if="!listArray || listArray.length == 0">
  5. <image mode="heightFix" src="/static/image/no-data.png" />
  6. 暂无数据
  7. </view>
  8. <view class="feedback-list" v-else>
  9. <view v-for="(item,index) in listArray" :key="index" class="loop-list-item" @click="onClick(item)">
  10. <view class="item-content">
  11. <view class="item-title">
  12. <view class="title-line">{{ item.title }}</view>
  13. <view class="title-company" :class="filterApplicationBgColor(item.fkzt)">{{ filterApplicationStatus(item.fkzt) }}</view>
  14. </view>
  15. <view class="part-line"></view>
  16. <view class="text-content">
  17. <view v-for="(textItem,textIndex) in item.formattedData" :key="textIndex" class="other-loop-item">
  18. <view class="textTitle">{{ textItem.title }}</view>
  19. <view class="textValue">{{ textItem.value }}</view>
  20. </view>
  21. </view>
  22. </view>
  23. </view>
  24. </view>
  25. </pub-list-scroll>
  26. </view>
  27. </template>
  28. <script setup lang="ts">
  29. import { defineProps,ref } from "vue";
  30. import { filterApplicationStatus,filterApplicationBgColor } from '@/lib/util'
  31. const emit = defineEmits(['click']) // 定义 success 事件,用于操作成功后的回调
  32. // 定义 props 类型
  33. const props = defineProps({
  34. listArray: {
  35. type: Object,
  36. default: () => {}
  37. }
  38. });
  39. const pubListScrollRef = ref(null)
  40. const loaded = ref(false)
  41. const loadText = ref('数据加载中...')
  42. const status = ref('loading')
  43. const onScrollTolower = ()=> {
  44. console.log("下一页了?")
  45. }
  46. const onClick = (item:any)=> {
  47. emit("click",item)
  48. }
  49. </script>
  50. <style lang="scss">
  51. .feedback-list-view {
  52. overflow-y: auto;
  53. background-color: #F6F7F8;
  54. height: 100%;
  55. .feedback-list {
  56. height: 100%;
  57. padding: 32rpx 40rpx 40rpx;
  58. background-color: #F6F7F8;
  59. .loop-list-item {
  60. min-height: 200rpx;
  61. margin-bottom: 24rpx;
  62. border-radius: 10rpx;
  63. background: #fff;
  64. padding: 30rpx 40rpx 20rpx;
  65. .item-content {
  66. .item-title{
  67. display: flex;
  68. justify-content: space-between;
  69. align-items: center;
  70. .title-company {
  71. padding: 12rpx 16rpx;
  72. border-radius: 8rpx;
  73. font-size: 24rpx;
  74. &.yellow {
  75. background-color: #fef5fa;
  76. color: #FD9F48;
  77. }
  78. &.blue {
  79. background-color: #e7f2fe;
  80. color: #1E92F0;
  81. }
  82. &.green {
  83. background-color: #e4f7f0;
  84. color: #00B578;
  85. }
  86. }
  87. }
  88. .part-line {
  89. border: 1px solid #EFEFEF;
  90. margin: 8rpx 0 18rpx;
  91. }
  92. .text-content {
  93. display: flex;
  94. flex-direction: column;
  95. .other-loop-item {
  96. margin-bottom: 10rpx;
  97. display: flex;
  98. align-items: center;
  99. font-size: 24rpx;
  100. font-weight: 350;
  101. .textTitle {
  102. color: #9B9B9B;
  103. margin-right: 24rpx;
  104. }
  105. .textValue {
  106. color: #3D3D3D;
  107. }
  108. &:last-child {
  109. margin-bottom: 0;
  110. }
  111. }
  112. }
  113. }
  114. }
  115. }
  116. }
  117. </style>