FeedbackList.vue 4.8 KB

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