|
|
@@ -2,34 +2,11 @@
|
|
|
<CommonListPage
|
|
|
title="闽南民俗"
|
|
|
itemType="image-large-2"
|
|
|
- :detailsPage="[
|
|
|
- {
|
|
|
- page: '/pages/article/details',
|
|
|
- params: {
|
|
|
- modelId: 4,
|
|
|
- mainBodyColumnId: 245,
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- page: '/pages/article/details',
|
|
|
- params: {
|
|
|
- modelId: 4,
|
|
|
- mainBodyColumnId: 248,
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- page: '/pages/inhert/intangible/details',
|
|
|
- params: {},
|
|
|
- }
|
|
|
- ]"
|
|
|
+ detailsPage="custom"
|
|
|
showTotal
|
|
|
:dropDownNames="dropdownNames"
|
|
|
:load="loadData"
|
|
|
- :tabs="[
|
|
|
- { id: 245, text: '婚丧嫁娶' },
|
|
|
- { id: 248, text: '民俗节庆' },
|
|
|
- { id: 100, text: '非遗民俗' },
|
|
|
- ]"
|
|
|
+ @goCustomDetails="handleDetils"
|
|
|
/>
|
|
|
<!-- -->
|
|
|
</template>
|
|
|
@@ -39,6 +16,7 @@ import { ref } from 'vue';
|
|
|
import CommonListPage, { type DropDownNames } from '@/pages/article/common/CommonListPage.vue';
|
|
|
import CommonContent, { GetContentListParams } from '@/api/CommonContent';
|
|
|
import ProjectsContent from '@/api/inheritor/ProjectsContent';
|
|
|
+import { navTo } from '@/components/utils/PageAction';
|
|
|
|
|
|
const dropdownNames = ref<DropDownNames[]>([]);
|
|
|
|
|
|
@@ -49,30 +27,41 @@ async function loadData(
|
|
|
dropDownValues: number[],
|
|
|
tabSelect: number,
|
|
|
) {
|
|
|
- let res;
|
|
|
- switch (tabSelect) {
|
|
|
- case 100:
|
|
|
- res = await ProjectsContent.getContentList(new GetContentListParams()
|
|
|
- .setKeywords('民俗 ' + searchText)
|
|
|
- , page, pageSize);
|
|
|
- res.list.forEach((item) => {
|
|
|
- item.bottomTags = [
|
|
|
- item.levelText,
|
|
|
- item.ichTypeText,
|
|
|
- item.batchText,
|
|
|
- item.regionText,
|
|
|
- ]
|
|
|
- })
|
|
|
- break;
|
|
|
- case 0:
|
|
|
- default:
|
|
|
- res = await CommonContent.getContentList(new GetContentListParams()
|
|
|
- .setKeywords(searchText)
|
|
|
- .setModelId(4)
|
|
|
- .setMainBodyColumnId(tabSelect)
|
|
|
- , page, pageSize);
|
|
|
- break;
|
|
|
- }
|
|
|
+ const res = await CommonContent.getContentList(new GetContentListParams()
|
|
|
+ .setKeywords(searchText)
|
|
|
+ .setModelId(4)
|
|
|
+ .setMainBodyColumnId([ 245, 248 ])
|
|
|
+ , page, pageSize);
|
|
|
+ res.list.forEach((item) => {
|
|
|
+ item.pageType = 'news';
|
|
|
+ });
|
|
|
+
|
|
|
+ (await ProjectsContent.getContentList(new GetContentListParams()
|
|
|
+ .setKeywords('民俗 ' + searchText)
|
|
|
+ , 1, 20)).list.forEach((item) => {
|
|
|
+ item.pageType = 'intangible';
|
|
|
+ item.bottomTags = [
|
|
|
+ item.levelText,
|
|
|
+ item.ichTypeText,
|
|
|
+ item.batchText,
|
|
|
+ item.regionText,
|
|
|
+ ]
|
|
|
+ res.list.push(item);
|
|
|
+ });
|
|
|
return { list: res.list, total: res.total }
|
|
|
}
|
|
|
+
|
|
|
+function handleDetils(item: any) {
|
|
|
+ if (item.pageType == 'news') {
|
|
|
+ navTo('/pages/article/details', {
|
|
|
+ modelId: item.modelId,
|
|
|
+ mainBodyColumnId: item.mainBodyColumnId,
|
|
|
+ id: item.id,
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ navTo('/pages/inhert/intangible/details', {
|
|
|
+ id: item.id,
|
|
|
+ });
|
|
|
+ }
|
|
|
+}
|
|
|
</script>
|