CardItemSeven.vue 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <template>
  2. <div class="SevenDetailBox">
  3. <ul v-if="!loading && listData.length > 0">
  4. <li v-for="(item, i) in listData" :key="i">
  5. <div class="content">
  6. <span>{{ item?.messageContent }}</span>
  7. </div>
  8. <span>{{ item?.createTime }}</span>
  9. </li>
  10. </ul>
  11. <p v-else style="text-align: center; padding: 20px 0px">
  12. <span>暂无回款记录</span>
  13. </p>
  14. </div>
  15. </template>
  16. <script setup lang="ts">
  17. import request from '@/config/axios'
  18. import { useUserStore } from '@/store/modules/user'
  19. const loading = ref<boolean>(false)
  20. const listData = ref([])
  21. const userStore = useUserStore()
  22. const year = 2023
  23. const queryContractMessageByPage = async (): Promise<void> => {
  24. loading.value = true
  25. const urlApi = `/contract-message/page`
  26. const sendData = {
  27. deptId: userStore.getUser.deptId,
  28. year: year,
  29. messageType: 2
  30. // managerId: userStore.getUser.id
  31. }
  32. const result = await request.get({ url: urlApi, params: sendData }, '/business')
  33. loading.value = false
  34. if (result.records && result.records.length > 0) {
  35. listData.value = result.records
  36. }
  37. }
  38. queryContractMessageByPage()
  39. </script>
  40. <style lang="scss" scoped>
  41. .SevenDetailBox {
  42. display: flex;
  43. height: calc(100% - 30px);
  44. padding-bottom: 15px;
  45. margin-bottom: 0;
  46. flex-direction: column;
  47. > ul {
  48. height: 0;
  49. flex-grow: 1;
  50. overflow-y: scroll;
  51. > li {
  52. display: flex;
  53. padding: 10px;
  54. font-size: 15px;
  55. border-bottom: 1px solid #e3e3e3;
  56. > div {
  57. flex: 1;
  58. color: #000000;
  59. white-space: nowrap;
  60. overflow: hidden;
  61. text-overflow: ellipsis;
  62. width: 0px;
  63. margin-right: 20px;
  64. }
  65. > span {
  66. color: #8a94a4;
  67. }
  68. }
  69. }
  70. }
  71. </style>