|
@@ -0,0 +1,59 @@
|
|
|
|
|
+<template>
|
|
|
|
|
+ <CommonListPage
|
|
|
|
|
+ itemType="article-common"
|
|
|
|
|
+ :dropDownNames="dropdownNames"
|
|
|
|
|
+ :tabs="[
|
|
|
|
|
+ { id: 0, text: '创新发展' },
|
|
|
|
|
+ { id: 1, text: '研究成果' },
|
|
|
|
|
+ ]"
|
|
|
|
|
+ :detailsPage="{
|
|
|
|
|
+ 0: '/pages/doc/details',
|
|
|
|
|
+ 1: '/pages/article/details',
|
|
|
|
|
+ }"
|
|
|
|
|
+ :startTabIndex="startTab"
|
|
|
|
|
+ :load="loadData"
|
|
|
|
|
+ />
|
|
|
|
|
+</template>
|
|
|
|
|
+
|
|
|
|
|
+<script setup lang="ts">
|
|
|
|
|
+import { ref } from 'vue';
|
|
|
|
|
+import { GetContentListParams } from '@/api/CommonContent';
|
|
|
|
|
+import CommonListPage, { type DropDownNames } from '@/pages/article/common/CommonListPage.vue';
|
|
|
|
|
+import ResultContent from '@/api/research/ResultContent';
|
|
|
|
|
+import InnovationContent from '@/api/research/InnovationContent';
|
|
|
|
|
+
|
|
|
|
|
+const dropdownNames = ref<DropDownNames[]>([]);
|
|
|
|
|
+const startTab = ref(0);
|
|
|
|
|
+async function loadData(
|
|
|
|
|
+ page: number,
|
|
|
|
|
+ pageSize: number,
|
|
|
|
|
+ searchText: string,
|
|
|
|
|
+ dropDownValues: number[],
|
|
|
|
|
+ tabSelect: number,
|
|
|
|
|
+) {
|
|
|
|
|
+ let res;
|
|
|
|
|
+ switch (tabSelect) {
|
|
|
|
|
+ case 1:
|
|
|
|
|
+ res = (await ResultContent.getContentList(new GetContentListParams()
|
|
|
|
|
+ .setKeywords(searchText)
|
|
|
|
|
+ , page, pageSize))
|
|
|
|
|
+ break;
|
|
|
|
|
+ default:
|
|
|
|
|
+ case 0:
|
|
|
|
|
+ res = (await InnovationContent.getContentList(new GetContentListParams()
|
|
|
|
|
+ .setKeywords(searchText)
|
|
|
|
|
+ , page, pageSize));
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ res.list.forEach((item) => {
|
|
|
|
|
+ item.desc = item.from ? `来源:${item.from}` : '';
|
|
|
|
|
+ item.bottomTags = [
|
|
|
|
|
+ item.levelText,
|
|
|
|
|
+ item.mainBodyColumnName,
|
|
|
|
|
+ item.ichTypeText,
|
|
|
|
|
+ item.batchText,
|
|
|
|
|
+ ]
|
|
|
|
|
+ })
|
|
|
|
|
+ return res;
|
|
|
|
|
+}
|
|
|
|
|
+</script>
|