<template>
  <CommonListPage 
    title="重要相关老字号"
    itemType="article-common"
    detailsPage="/pages/inhert/intangible/details"
    :showTotal="false"
    :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.titlePrefix = `字号名称: ${p.fontName || ''}`;
    p.bottomTags = p.brandType;
  })
  return res;
}

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