FeedbackList.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  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 feedback-no" 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">{{ filterApplicationType(item.fklx) }}</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. <view class="footnote_content">
  26. <view>本服务由重庆两江新区社会发展局提供</view>
  27. <view class="footnote_phone">服务咨询热线:<view class="phone_text" @click="makeCall">023-67685085</view></view>
  28. </view>
  29. </pub-list-scroll>
  30. </view>
  31. </template>
  32. <script setup lang="ts">
  33. import { defineProps,ref } from "vue";
  34. import {
  35. filterApplicationStatus,
  36. filterApplicationType,
  37. filterApplicationBgColor,
  38. } from '@/lib/util'
  39. const emit = defineEmits(['click','nextPage']) // 定义 success 事件,用于操作成功后的回调
  40. // 定义 props 类型
  41. const props = defineProps({
  42. listArray: {
  43. type: Object,
  44. default: () => {}
  45. },
  46. status: {
  47. type: String,
  48. default: "loading"
  49. }
  50. });
  51. const pubListScrollRef = ref(null)
  52. const loaded = ref(false)
  53. const loadText = ref('数据加载中...')
  54. const onScrollTolower = ()=> {
  55. console.log("下一页了?")
  56. emit("nextPage")
  57. }
  58. const onClick = (item:any)=> {
  59. emit("click",item)
  60. }
  61. const makeCall = ()=> {
  62. window.location.href = 'tel:023-67685085';
  63. }
  64. </script>
  65. <style lang="scss">
  66. .feedback-list-view {
  67. background-color: #F6F7F8;
  68. height: 100%;
  69. .feedback-list {
  70. padding: 32rpx 40rpx 0rpx;
  71. background-color: #F6F7F8;
  72. .loop-list-item {
  73. min-height: 200rpx;
  74. margin-bottom: 24rpx;
  75. border-radius: 10rpx;
  76. background: #fff;
  77. padding: 14rpx 0 20rpx;
  78. .item-content {
  79. .item-title{
  80. padding: 0 20rpx;
  81. display: flex;
  82. justify-content: space-between;
  83. align-items: center;
  84. .title-line {
  85. font-weight: 600;
  86. font-size: 28rpx;
  87. color: #363A44;
  88. }
  89. .title-company {
  90. padding: 12rpx 20rpx;
  91. border-radius: 8rpx;
  92. font-size: 24rpx;
  93. &.yellow {
  94. background-color: #FEF6ED;
  95. color: #FD9F48;
  96. }
  97. &.blue {
  98. background-color: #EDF2FD;
  99. color: #1E92F0;
  100. }
  101. &.green {
  102. background-color: #E8F7F1;
  103. color: #00B578;
  104. }
  105. }
  106. }
  107. .part-line {
  108. border-top: 1px solid #EFEFEF;
  109. margin: 10rpx 0 20rpx;
  110. }
  111. .text-content {
  112. padding: 0 20rpx;
  113. display: flex;
  114. flex-direction: column;
  115. .other-loop-item {
  116. margin-bottom: 10rpx;
  117. display: flex;
  118. align-items: center;
  119. font-size: 28rpx;
  120. font-weight: 400;
  121. .textTitle {
  122. color: #9B9B9B;
  123. margin-right: 24rpx;
  124. }
  125. .textValue {
  126. color: #363A44;
  127. }
  128. &:last-child {
  129. margin-bottom: 0;
  130. }
  131. }
  132. }
  133. }
  134. }
  135. }
  136. .feedback-no {
  137. height: calc(100vh - 210px);
  138. }
  139. ::v-deep .scroll-view {
  140. height: calc(100%);
  141. background-color: transparent !important;
  142. }
  143. ::v-deep .no-data {
  144. margin-top: 0;
  145. padding-top: 160rpx;
  146. }
  147. }
  148. .footnote_content {
  149. background-color: #F6F7F8;
  150. @include flex-center;
  151. height: 136rpx;
  152. flex-direction: column;
  153. font-weight: 400;
  154. font-size: 24rpx;
  155. color: #B3B5B9;
  156. line-height: 40rpx;
  157. .footnote_phone {
  158. display: flex;
  159. .phone_text {
  160. color: #1E92F0;
  161. }
  162. }
  163. }
  164. </style>