result.vue 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <template>
  2. <!-- 传播交流 - 研究成果 -->
  3. <CommonListPage
  4. :title="'研究成果'"
  5. :prevPage="{ title: '理论研究' }"
  6. :dropDownNames="[]"
  7. :showSearch="true"
  8. :tagsData="tagsData"
  9. :pageSize="8"
  10. :defaultSelectTag="269"
  11. :load="loadData"
  12. :loadDetail="loadDetail"
  13. />
  14. </template>
  15. <script setup lang="ts">
  16. import { ref } from 'vue';
  17. import { GetContentListParams } from '@/api/CommonContent';
  18. import ResultContent from '@/api/research/ResultContent';
  19. async function loadDetail(id: number, item: any) {
  20. return await ResultContent.getContentDetail(id);
  21. }
  22. async function loadData(
  23. page: number,
  24. pageSize: number,
  25. selectedTag: number,
  26. searchText: string,
  27. dropDownValues: number[]
  28. ) {
  29. const res = await ResultContent.getContentList(new GetContentListParams().setSelfValues({
  30. mainBodyColumnId: selectedTag,
  31. keywords: searchText,
  32. }), page, pageSize);
  33. return {
  34. page: page,
  35. total: res.total,
  36. data: res.list.map((item, index) => {
  37. return {
  38. id: item.id,
  39. title: item.title,
  40. desc: item.desc,
  41. image: item.image,
  42. };
  43. }),
  44. }
  45. }
  46. //子分类
  47. const tagsData = ref([
  48. { id: 269, name: '全部' },
  49. { id: 270, name: '文献' },
  50. { id: 271, name: '著作' },
  51. ]);
  52. </script>
  53. <style>
  54. </style>