policy.vue 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <template>
  2. <!-- 文化概况 - 相关政策 -->
  3. <CommonListPage
  4. :title="'相关政策'"
  5. :prevPage="{ title: '文化概况' }"
  6. :dropDownNames="[]"
  7. :pageSize="8"
  8. :rowCount="1"
  9. :load="loadData"
  10. :loadDetail="loadDetail"
  11. :defaultImage="LawsImage"
  12. />
  13. </template>
  14. <script setup lang="ts">
  15. import { GetContentListParams } from '@/api/CommonContent';
  16. import PolicyContent from '@/api/introduction/PolicyContent';
  17. import LawsImage from '@/assets/images/inheritor/LawsTest.jpg'
  18. async function loadDetail(id: number, item: any) {
  19. return await PolicyContent.getContentDetail(id);
  20. }
  21. async function loadData(
  22. page: number,
  23. pageSize: number,
  24. selectedTag: number,
  25. searchText: string,
  26. dropDownValues: number[]
  27. ) {
  28. const res = await PolicyContent.getContentList(new GetContentListParams()
  29. .setKeywords(searchText)
  30. , page, pageSize);
  31. return {
  32. page: page,
  33. total: res.total,
  34. data: res.list.map((item, index) => {
  35. return {
  36. id: item.id,
  37. title: item.title,
  38. desc: item.desc,
  39. image: item.image,
  40. };
  41. }),
  42. }
  43. }
  44. </script>
  45. <style>
  46. </style>