提交 b4fbff6f authored 作者: huhuiqing's avatar huhuiqing

翻页

上级 1dfb6405
...@@ -95,10 +95,12 @@ ...@@ -95,10 +95,12 @@
</div> </div>
<div class="box3-main-footer"> <div class="box3-main-footer">
<div class="info"> <div class="info">
{{ `共105项调查` }}
{{ total }}项调查
</div> </div>
<div class="page-box"> <div class="page-box">
<el-pagination :page-size="10" background layout="prev, pager, next" :total="120" /> <el-pagination :page-size="12" background layout="prev, pager, next" :total="total"
@current-change="handleCurrentChange" :current-page="currentPage" />
</div> </div>
</div> </div>
</div> </div>
...@@ -375,7 +377,12 @@ const majorOpinions = ref([ ...@@ -375,7 +377,12 @@ const majorOpinions = ref([
] ]
} }
]); ]);
// 处理页码改变事件
const currentPage = ref(1)
const handleCurrentChange = page => {
currentPage.value = page;
handleGetThinkDynamicsReport()
};
//获取报告主要观点 //获取报告主要观点
const handleGetThinkTankReportContent = async () => { const handleGetThinkTankReportContent = async () => {
try { try {
......
...@@ -630,8 +630,7 @@ function getDateYearsAgo(years) { ...@@ -630,8 +630,7 @@ function getDateYearsAgo(years) {
} }
const sort = ref(true) const sort = ref(true)
const currentPage = ref(1); const currentPage = ref(1)
const total = ref(0)
// 处理页码改变事件 // 处理页码改变事件
const handleCurrentChange = page => { const handleCurrentChange = page => {
currentPage.value = page; currentPage.value = page;
......
...@@ -375,10 +375,12 @@ ...@@ -375,10 +375,12 @@
</div> </div>
<div class="right-footer"> <div class="right-footer">
<div class="info"> <div class="info">
{{ `共1059篇智库报告` }}
{{ total }}项调查
</div> </div>
<div class="page-box"> <div class="page-box">
<el-pagination :page-size="12" background layout="prev, pager, next" :total="120" /> <el-pagination :page-size="12" background layout="prev, pager, next" :total="total"
@current-change="handleCurrentChange()" :current-page="currentPage" />
</div> </div>
</div> </div>
</div> </div>
...@@ -1181,12 +1183,18 @@ const curFooterList = ref([ ...@@ -1181,12 +1183,18 @@ const curFooterList = ref([
img: Img12 img: Img12
} }
]); ]);
const currentPage = ref(1);
const total = ref(0)
// 处理页码改变事件
const handleCurrentChange = page => {
currentPage.value = page;
handleGetetThinkTankReport()
};
//获取智库报告 //获取智库报告
const handleGetetThinkTankReport = async () => { const handleGetetThinkTankReport = async () => {
const params = { const params = {
currentPage: 1, currentPage: currentPage.value,
pageSize: 10, pageSize: 12,
researchTypeIds: selectedAreaList.value, researchTypeIds: selectedAreaList.value,
years: 2025 years: 2025
} }
...@@ -1195,6 +1203,7 @@ const handleGetetThinkTankReport = async () => { ...@@ -1195,6 +1203,7 @@ const handleGetetThinkTankReport = async () => {
console.log("智库报告", res); console.log("智库报告", res);
if (res.code === 200 && res.data) { if (res.code === 200 && res.data) {
curFooterList.value = res.data.content; curFooterList.value = res.data.content;
total.value = res.data.totalElements
} }
} catch (error) { } catch (error) {
console.error("获取智库报告error", error); console.error("获取智库报告error", error);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论