FeedbackList.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  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. height: calc(100% - 60rpx);
  53. overflow-y: auto;
  54. background-color: #F6F7F8;
  55. .feedback-list {
  56. padding: 32rpx 40rpx 40rpx;
  57. background-color: #F6F7F8;
  58. .loop-list-item {
  59. min-height: 200rpx;
  60. margin-bottom: 24rpx;
  61. border-radius: 10rpx;
  62. background: #fff;
  63. padding: 30rpx 40rpx 20rpx;
  64. .item-content {
  65. .item-title{
  66. display: flex;
  67. justify-content: space-between;
  68. align-items: center;
  69. .title-company {
  70. padding: 12rpx 16rpx;
  71. border-radius: 8rpx;
  72. font-size: 24rpx;
  73. &.yellow {
  74. background-color: #fef5fa;
  75. color: #FD9F48;
  76. }
  77. &.blue {
  78. background-color: #e7f2fe;
  79. color: #1E92F0;
  80. }
  81. &.green {
  82. background-color: #e4f7f0;
  83. color: #00B578;
  84. }
  85. }
  86. }
  87. .part-line {
  88. border: 1px solid #EFEFEF;
  89. margin: 8rpx 0 18rpx;
  90. }
  91. .text-content {
  92. display: flex;
  93. flex-direction: column;
  94. .other-loop-item {
  95. margin-bottom: 10rpx;
  96. display: flex;
  97. align-items: center;
  98. font-size: 24rpx;
  99. font-weight: 350;
  100. .textTitle {
  101. color: #9B9B9B;
  102. margin-right: 24rpx;
  103. }
  104. .textValue {
  105. color: #3D3D3D;
  106. }
  107. &:last-child {
  108. margin-bottom: 0;
  109. }
  110. }
  111. }
  112. }
  113. }
  114. }
  115. }
  116. </style>