<template>
  <CommonListPage 
    title="老字号"
    itemType="article-common"
    detailsPage="/pages/inhert/intangible/details"
    showTotal
    :dropDownNames="dropdownNames"
    :detailsParams="{
      mainBodyColumnId: 312,
      modelId: 17,
    }"
    :load="loadData" 
  />
</template>

<script setup lang="ts">
import CommonContent, { GetContentListParams } from '@/api/CommonContent';
import CommonListPage, { type DropDownNames } from '@/pages/article/common/CommonListPage.vue';
import { onMounted, ref } from 'vue';

const dropdownNames = ref<DropDownNames[]>([]);

async function loadData(
  page: number, 
  pageSize: number,
  searchText: string,
  dropDownValues: number[]
) {
  const res = (await CommonContent.getContentList(new GetContentListParams()
    .setModelId(17)
    .setMainBodyColumnId(312)
    .setKeywords(searchText)
    .setSelfValues({

    })
  , page, pageSize));
  res.list.forEach((p) => {
    p.desc = p.ichName as string;
    p.bottomTags = [
      p.levelText, 
      p.batchText,
      p.ichTypeText,
    ];
  })
  return res;
}

onMounted(async () => {
  
})
</script>
