提交 fb3af8fe authored 作者: 朱政's avatar 朱政

feat:核心论点分页宽度调整

上级 dc99c723
流水线 #339 已通过 于阶段
in 4 分 7 秒
......@@ -1611,9 +1611,9 @@ onMounted(() => {
.page-box {
/* 最大 300px:允许变小,但绝不变大 */
flex: 0 1 300px;
flex: 0 1 600px;
width: 100%;
max-width: 300px;
max-width: 600px;
min-width: 0;
display: flex;
justify-content: flex-end;
......@@ -1621,7 +1621,7 @@ onMounted(() => {
}
.page-box :deep(.el-pagination) {
max-width: 100%;
min-width: 0;
overflow: hidden;
}
......
......@@ -105,6 +105,11 @@ const handleGetThinkTankReportSummary = async () => {
if (res.code === 200 && res.data) {
reportUrl.value = res.data.reportUrl;
thinkInfo.value = res.data;
const title = String(res.data.name || "").trim();
if (title) {
document.title = title;
window.sessionStorage.setItem("curTabName", title);
}
console.log(reportUrl.value, "reportUrl.value");
}
} catch (error) {
......
......@@ -459,7 +459,7 @@ const handleGetThinkTankReportIndustryCloud = async () => {
}));
// 该接口数据用于「报告关键词云」
box5Data.value = data;
console.log("box5Data", box5Data.value);
console.log("box5Data", box5Data.value);
if (data.length) {
box5WordCloudKey.value += 1;
}
......@@ -1377,9 +1377,9 @@ onMounted(() => {
.page-box {
/* 最大 300px:允许变小,但绝不变大 */
flex: 0 1 300px;
flex: 0 1 600px;
width: 100%;
max-width: 300px;
max-width: 600px;
min-width: 0;
display: flex;
justify-content: flex-end;
......@@ -1387,7 +1387,7 @@ onMounted(() => {
}
.page-box :deep(.el-pagination) {
max-width: 100%;
min-width: 0;
overflow: hidden;
}
......
......@@ -72,8 +72,8 @@
</div> -->
<AnalysisBox title="项目报告" :showAllBtn="true">
<div class="box2-main">
<div class="box2-item" v-for="(report, idx) in reportList" :key="idx">
<div class="box2-item-content">
<div class="box2-item" v-for="(report, idx) in reportList" :key="report.id || idx">
<div class="box2-item-content" @click="handleClickProjectReport(report)">
<div class="left"><img :src="report.imgUrl" alt="" /></div>
<div class="right-content">
<div class="report-title">{{ report.nameZh }}</div>
......@@ -222,7 +222,7 @@ const getOpinionExpandKey = (item, index) => {
}
return `idx-${index}`;
};
const reportList = ref({});
const reportList = ref([]);
const formatDate = (dateStr) => {
if (!dateStr) return "";
const date = new Date(dateStr)
......@@ -237,12 +237,29 @@ const handleGetThinkTankReport = async () => {
const res = await getThinkTankProjectRelated(router.currentRoute._value.params.id);
console.log("报告全局信息", res);
if (res.code === 200 && res.data) {
reportList.value = res.data;
reportList.value = Array.isArray(res.data) ? res.data : [];
}
} catch (error) {
console.error("获取相关报告error", error);
}
};
/** 新标签页打开智库报告详情 /thinkTank/reportDetail/:id */
const handleClickProjectReport = (report) => {
const id = report?.id;
if (!id) {
ElMessage.warning("报告 id 为空,无法跳转");
return;
}
const reportTitle = String(report?.nameZh || report?.name || "").trim();
const route = router.resolve({
name: "ReportDetail",
params: { id: String(id) },
query: reportTitle ? { name: reportTitle } : {}
});
window.open(route.href, "_blank");
};
const handleClickReportAuthor = async (author) => {
const personId = author?.personId;
if (!personId) return;
......@@ -807,6 +824,7 @@ onMounted(() => {
height: 90px;
margin-top: 7px;
display: flex;
cursor: pointer;
.left {
width: 56px;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论