list.vue 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <template>
  2. <CommonListPage
  3. title="保护单位"
  4. itemType="simple-text"
  5. detailsPage="disabled"
  6. showTotal
  7. :dropDownNames="dropdownNames"
  8. :detailsParams="{
  9. mainBodyColumnId: UnitContent.mainBodyColumnId,
  10. modelId: UnitContent.modelId,
  11. }"
  12. :load="loadData"
  13. />
  14. </template>
  15. <script setup lang="ts">
  16. import { onMounted, ref } from 'vue';
  17. import { GetContentListParams } from '@/api/CommonContent';
  18. import UnitContent from '@/api/inheritor/UnitContent';
  19. import CommonListPage, { type DropDownNames } from '@/pages/article/common/CommonListPage.vue';
  20. const dropdownNames = ref<DropDownNames[]>([]);
  21. async function loadData(
  22. page: number,
  23. pageSize: number,
  24. searchText: string,
  25. dropDownValues: number[]
  26. ) {
  27. const res = (await UnitContent.getContentList(new GetContentListParams()
  28. .setKeywords(searchText)
  29. , page, pageSize));
  30. res.list.forEach((p) => {
  31. p.desc = '';
  32. p.bottomTags = [
  33. p.levelText,
  34. p.ichTypeText,
  35. p.batchText,
  36. p.regionText,
  37. ] as string[];
  38. })
  39. return res;
  40. }
  41. onMounted(async () => {
  42. })
  43. </script>