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

fix:修复智库部分样式问题

上级 f922b4b8
......@@ -228,11 +228,9 @@
<div v-for="(sv, svIdx) in item.sourceViewDetails" :key="`${sv.report_id}-${sv.view_id}-${svIdx}`"
class="source-view-detail">
<div class="source-view-detail-title">
<span
class="source-view-detail-title-text"
<span class="source-view-detail-title-text"
:class="{ 'is-clickable-report': hasReportLinkForSourceView(sv) }"
@click.stop="handleOpenReportOriginalFromSource(sv)"
>{{ getSourceViewDisplayTitle(sv) }}</span>
@click.stop="handleOpenReportOriginalFromSource(sv)">{{ getSourceViewDisplayTitle(sv) }}</span>
<span class="source-view-detail-org" v-if="sv.thinktankName || sv.thinktankLogoUrl">
<img v-if="sv.thinktankLogoUrl" :src="sv.thinktankLogoUrl" alt="" />
<span class="source-view-detail-org-text">{{ sv.thinktankName }}</span>
......@@ -278,11 +276,10 @@
<div v-for="(sv, svIdx) in item.sourceViewDetails"
:key="`${sv.report_id}-${sv.view_id}-${svIdx}`" class="source-view-detail">
<div class="source-view-detail-title">
<span
class="source-view-detail-title-text"
<span class="source-view-detail-title-text"
:class="{ 'is-clickable-report': hasReportLinkForSourceView(sv) }"
@click.stop="handleOpenReportOriginalFromSource(sv)"
>{{ getSourceViewDisplayTitle(sv) }}</span>
@click.stop="handleOpenReportOriginalFromSource(sv)">{{ getSourceViewDisplayTitle(sv)
}}</span>
<span class="source-view-detail-org" v-if="sv.thinktankName || sv.thinktankLogoUrl">
<img v-if="sv.thinktankLogoUrl" :src="sv.thinktankLogoUrl" alt="" />
<span class="source-view-detail-org-text">{{ sv.thinktankName }}</span>
......@@ -1007,6 +1004,8 @@ onMounted(async () => {
flex-direction: column;
align-items: center;
overflow-y: auto;
height: 100vh;
.header {
......@@ -1197,7 +1196,9 @@ onMounted(async () => {
margin-top: 16px;
width: 1600px;
height: 1094px;
height: 950px;
margin-bottom: 100px;
.box1 {
width: 480px;
......
......@@ -39,10 +39,10 @@
</div>
</div>
<div class="box4-main-footer">
<div class="info">{{ opinionsTotal }}核心论点</div>
<div class="info">{{ opinionsTotal }}政策建议</div>
<div class="page-box">
<el-pagination :page-size="pageSize" background layout="prev, pager, next" :total="opinionsTotal"
@current-change="handleCurrentChange" :current-page="currentPage" />
<el-pagination :pager-count="4" :page-size="pageSize" background layout="prev, pager, next"
:total="opinionsTotal" @current-change="handleCurrentChange" :current-page="currentPage" />
</div>
</div>
</div>
......@@ -368,7 +368,7 @@ onMounted(async () => {
.left {
width: 506px;
gap: 12px;
gap: 8px;
display: flex;
flex-direction: column;
......@@ -406,19 +406,32 @@ onMounted(async () => {
width: 506px;
gap: 8px;
display: flex;
height: 28px;
align-items: flex-start;
margin-top: 4px;
padding-bottom: 0;
box-sizing: border-box;
overflow-x: auto;
overflow-y: hidden;
scrollbar-gutter: stable;
.tag {
height: 28px;
margin-bottom: 4px;
border: 1px solid rgb(230, 231, 232);
border-radius: 4px;
width: auto !important;
flex-shrink: 0;
/* 不被压缩 */
padding: 0px 8px;
display: flex;
cursor: pointer;
white-space: nowrap;
/* 强制不换行 */
&.tag-active {
border-color: rgb(5, 95, 194);
......@@ -426,6 +439,7 @@ onMounted(async () => {
.tag-text {
color: rgb(5, 95, 194);
}
}
......@@ -515,6 +529,8 @@ onMounted(async () => {
.box4-main-footer {
display: flex;
justify-content: space-between;
/* empty */
}
}
......
......@@ -73,8 +73,13 @@
<template v-else>
<div class="box5Chart">
<!-- 有数据后再挂载子组件:子组件仅在 onMounted 初始化,异步数据到达后需 v-if + key 强制重新挂载 -->
<WordCloudChart v-if="box5Data.length" :key="box5WordCloudKey" :data="box5Data" width="100%"
height="100%" />
<WordCloudChart
v-if="box5Data.length"
:key="box5WordCloudKey"
:data="box5Data"
width="432px"
height="272px"
/>
</div>
<div class="box5-footer">
<TipTab :text="REPORT_ANALYSIS_TIP_BOX5" />
......@@ -356,54 +361,21 @@ const handleClickReportAuthor = async (author) => {
const personId = author?.id;
if (!personId) return;
let personTypeList = [];
try {
personTypeList = JSON.parse(window.sessionStorage.getItem("personTypeList") || "[]");
} catch (e) {
personTypeList = [];
}
const params = { personId };
try {
const res = await getPersonSummaryInfo(params);
if (res.code !== 200 || !res.data) return;
const arr = personTypeList.filter((t) => {
const typeIdNum = Number(t.typeId);
const personTypeNum = Number(res.data.personType);
return !Number.isNaN(typeIdNum) && !Number.isNaN(personTypeNum) && typeIdNum === personTypeNum;
});
if (!arr.length) {
ElMessage.warning("找不到当前人员的类型值!");
return;
}
const personTypeName = arr[0]?.typeName || "";
let type = 0;
if (personTypeName === "科技企业领袖") {
type = 1;
} else if (personTypeName === "国会议员") {
type = 2;
} else if (personTypeName === "智库研究人员") {
type = 3;
} else {
ElMessage.warning("找不到当前人员的类型值!");
return;
const res = await getPersonSummaryInfo(params);
if (res.code !== 200 || !res.data) return;
window.sessionStorage.setItem("curTabName", author?.name || "");
const route = router.resolve({
path: "/characterPage",
query: {
personId
}
});
window.open(route.href, "_blank");
window.sessionStorage.setItem("curTabName", author?.name || "");
const route = router.resolve({
path: "/characterPage",
query: {
type,
personId
}
});
window.open(route.href, "_blank");
} catch (error) {
console.error("点击报告作者头像跳转失败", error);
}
};
const riskSignal = computed(() => {
const info = props.thinkInfo || {};
......@@ -921,10 +893,7 @@ onMounted(() => {
.box5-main {
width: 480px;
height: 361px;
padding-left: 31px;
padding-right: 32px;
padding-top: 26px;
padding-bottom: 43px;
padding: 24px 24px 65px 24px;
display: flex;
flex-direction: column;
box-sizing: border-box;
......@@ -932,8 +901,8 @@ onMounted(() => {
position: relative;
.box5Chart {
width: 418px;
height: 292px;
width: 100%;
height: 100%;
margin: 0 auto;
overflow: hidden;
}
......@@ -1023,6 +992,15 @@ onMounted(() => {
line-height: 24px;
letter-spacing: 0;
text-align: left;
/* 👇 下面是 两行文本超出省略 核心代码 */
display: -webkit-box;
-webkit-line-clamp: 2;
/* 限制显示 2 行 */
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
word-break: break-all;
}
.report-footer {
......@@ -1385,9 +1363,14 @@ onMounted(() => {
height: 80px;
display: flex;
justify-content: space-between;
align-items: center;
padding: 30px 5px;
box-sizing: border-box;
overflow: hidden;
.info {
flex: 1 1 auto;
min-width: 0;
color: rgba(132, 136, 142, 1);
font-family: Microsoft YaHei;
font-size: 14px;
......@@ -1396,6 +1379,23 @@ onMounted(() => {
letter-spacing: 0px;
text-align: left;
}
.page-box {
/* 最大 300px:允许变小,但绝不变大 */
flex: 0 1 300px;
width: 100%;
max-width: 300px;
min-width: 0;
display: flex;
justify-content: flex-end;
overflow: hidden;
}
.page-box :deep(.el-pagination) {
max-width: 100%;
min-width: 0;
overflow: hidden;
}
}
}
......
......@@ -237,7 +237,7 @@
<div class="title" v-html="highlightPolicyText(item.titleZh)"></div>
<div class="info">
<div class="text">
<span v-html="highlightPolicyText(`${item.reportDateDisplay}·${item.contentZh}`)"></span>
<span v-html="highlightPolicyText(`${item.reportDateDisplay}·${item.reportName}`)"></span>
</div>
<div class="more" @click="toDetail(item)">
......@@ -346,7 +346,7 @@ const getAreaTagColor = (name, idx = 0) =>
const POLICY_TRACKING_TIP_BOX1 =
"智库报告中政策建议的领域分布情况,数据来源:美国兰德公司官网";
const POLICY_TRACKING_TIP_BOX2 =
"智库报告中政策建议涉及领域分布情况,数据来源:美国兰德公司官网";
"智库报告中政策建议部门分布情况,数据来源:美国兰德公司官网";
const POLICY_TRACKING_TIP_BOX3 =
"智库报告热门研究领域变化趋势,数据来源:美国兰德公司官网";
......@@ -1221,7 +1221,7 @@ function mapPolicyRowToView(row) {
const toDetail = item => {
window.sessionStorage.setItem("curTabName", item.contentZh ?? item.content ?? "");
const route = router.resolve({
name: "ReportDetail",
name: "ReportOriginal",
params: {
id: item.reportId
}
......@@ -2110,7 +2110,7 @@ onMounted(async () => {
line-height: 22px;
letter-spacing: 0px;
text-align: left;
width: 1020px;
white-space: nowrap;
/* 强制不换行,保持一行 */
overflow: hidden;
......
......@@ -726,36 +726,15 @@ const handleClickPerson = async item => {
return !Number.isNaN(typeIdNum) && !Number.isNaN(personTypeNum) && typeIdNum === personTypeNum;
});
console.log("arr", arr);
const route = router.resolve({
path: "/characterPage",
query: {
if (arr && arr.length > 0) {
personTypeName = arr[0].typeName;
console.log("personTypeName", personTypeName);
if (personTypeName === "科技企业领袖") {
type = 1;
} else if (personTypeName === "国会议员") {
type = 2;
} else if (personTypeName === "智库研究人员") {
type = 3;
} else {
personTypeName = "";
ElMessage.warning("找不到当前人员的类型值!");
return;
personId: item.personId
}
window.sessionStorage.setItem("curTabName", item.name);
const route = router.resolve({
path: "/characterPage",
query: {
type: type, // type=1为科技企业领袖,2为国会议员,3为智库研究人员
personId: item.personId
}
});
window.open(route.href, "_blank");
} else {
personTypeName = "";
ElMessage.warning("找不到当前人员的类型值!");
return;
}
});
window.open(route.href, "_blank");
} else {
ElMessage.warning("找不到当前人员的类型值!");
return;
......@@ -779,9 +758,10 @@ onMounted(() => {
<style lang="scss" scoped>
.wrap {
width: 100%;
height: 100%;
height: 100vh;
display: flex;
gap: 16px;
overflow-y: auto;
.left {
margin-top: 16px;
......@@ -910,7 +890,7 @@ onMounted(() => {
.right {
width: 1104px;
/* 三栏:390 + 390 + 900,间距 16×2 */
height: 1712px;
height: 1732px;
margin-top: 16px;
display: flex;
flex-direction: column;
......@@ -1461,6 +1441,7 @@ onMounted(() => {
.box.box-core-researchers {
width: 1104px;
height: 900px;
margin-bottom: 90px;
flex-shrink: 0;
}
......
......@@ -48,7 +48,7 @@
<div class="card-item-title">{{ item.name }}</div>
<div class="card-item-time">
<span class="info-text">{{ item.times }} · {{ item.thinkTankName }} · {{ item.reportName }}</span>
<div class="card-open-image">
<div class="card-open-image" @click.stop="handleOpenReportOriginal(item)">
<img src="@/views/thinkTank/ThinkTankDetail/thinkDynamics/images/image open.png" alt="" />
</div>
</div>
......@@ -115,6 +115,17 @@ const emit = defineEmits(["filter-change", "page-change", "item-click"]);
const router = useRouter();
/** 打开报告原文:新标签页打开 /thinkTank/reportOriginal/:id(优先 reportId) */
const handleOpenReportOriginal = (item) => {
const reportId = item?.reportId || item?.report_id || item?.id
if (!reportId) return
const route = router.resolve({
name: "ReportOriginal",
params: { id: String(reportId) }
})
window.open(route.href, "_blank")
}
/** 政策建议关联法案:新标签页打开法案介绍页,billId 随接口 id 变化 */
const handleBillMoreClick = (bill) => {
const billId = bill?.id;
......
......@@ -200,7 +200,7 @@
<div id="box5Chart" class="box5-chart-canvas"></div>
</div>
<div class="source">
<TipTab :text="'智库报告数量变化趋势,数据来源:美国各智库官网'" />
<TipTab :text="'智库报告数量变化趋势,数据来源美国各智库官网'" />
</div>
<div class="chart-box">
<div class="btn-box" v-if="!isShowAiContentBox5" @mouseenter="handleSwitchAiContentShowBox5(true)">
......
......@@ -65,12 +65,8 @@
<pdf ref="leftPdfRef" :pdfUrl="reportUrlEnWithPage" class="pdf-pane-inner" />
</div>
<div class="pdf-pane-wrap" :class="{ 'is-full': !valueSwitch }" v-if="reportUrlWithPage">
<pdf
:key="`right-pdf-${valueSwitch ? 'split' : 'full'}`"
ref="rightPdfRef"
:pdfUrl="reportUrlWithPage"
class="pdf-pane-inner"
/>
<pdf :key="`right-pdf-${valueSwitch ? 'split' : 'full'}`" ref="rightPdfRef" :pdfUrl="reportUrlWithPage"
class="pdf-pane-inner" />
</div>
</div>
</div>
......@@ -287,7 +283,8 @@ onMounted(async () => {
<style lang="scss" scoped>
.wrap {
overflow-y: auto;
height: 100vh;
.header {
......@@ -340,6 +337,14 @@ onMounted(async () => {
line-height: 24px;
letter-spacing: 0px;
text-align: left;
/* 👇 下面是 两行文本超出省略 核心代码 */
display: -webkit-box;
-webkit-line-clamp: 1;
/* 限制显示 2 行 */
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
word-break: break-all;
}
.tag-box {
......@@ -469,8 +474,9 @@ onMounted(async () => {
margin: 0 auto;
background: rgb(255, 255, 255);
width: 1600px;
height: 928px;
overflow: hidden;
height: 948px;
margin-bottom: 86px;
border: 1px, solid, rgb(234, 236, 238);
box-shadow: 0 0 20px 0 rgba(25, 69, 130, 0.1);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论