提交 148f801f authored 作者: 朱政's avatar 朱政

feat:智库bug修改

上级 2754fd01
流水线 #555 已通过 于阶段
in 2 分 0 秒
......@@ -180,7 +180,8 @@ export function getThinkTankTestimoniesByThinkTankId(params) {
params: {
pageNum: params.pageNum,
pageSize: params.pageSize,
sortField: params.sortField,
sortOrder: params.sortOrder,
domainIds: params.domainIds,
startDate: params.startDate,
endDate: params.endDate,
......
......@@ -15,7 +15,7 @@ const thinktankRoutes = [
name: "thinkTank",
component: thinkTank,
meta: {
title: "科技智库概览",
title: "美国科技智库概览",
isShowHeader: true
}
},
......
......@@ -658,13 +658,16 @@ watch(currentPage, () => {
.title {
font-size: 20px;
width: 950px;
max-width: 950px;
font-weight: 700;
font-family: "Microsoft YaHei";
line-height: 26px;
color: rgb(59, 65, 75);
margin-bottom: 9px;
cursor: pointer;
white-space: normal;
overflow-wrap: anywhere;
word-break: break-word;
}
.content {
......
......@@ -248,7 +248,7 @@ const handleDownloadDocument = async () => {
display: flex;
img {
width: 72px;
width: 178px;
height: 88px;
}
......
......@@ -68,11 +68,11 @@
<div class="info-content">
<div class="info-item">
<div class="info-text">{{ "相关领域:" }}</div>
<div class="info-right" v-if="box1DataItem && box1DataItem.domains">
<div class="info-right" v-if="hasDomainTags">
<div class="tag-box">
<div class="tag" v-for="(item, index) in box1DataItem.domains" :key="index" v-show="item">{{
item.industryName
}}</div>
<div class="tag" v-for="(name, index) in domainTags" :key="name + '-' + index">
{{ name }}
</div>
</div>
</div>
</div>
......@@ -155,6 +155,12 @@ const activeItemIndex = ref(0);
const pageSize = ref(10);
// 当前选中 item 的数据
const box1DataItem = ref(null);
const domainTags = computed(() => {
const domains = box1DataItem.value?.domains;
const list = Array.isArray(domains) ? domains : [];
return list.map((d) => d?.industryName).filter(Boolean);
});
const hasDomainTags = computed(() => domainTags.value.length > 0);
// 整个页面容器,用于分页后滚回 wrap 顶部
const wrapRef = ref(null);
const reportUrl = ref("");
......
......@@ -963,7 +963,7 @@ onMounted(() => {
display: flex;
.left {
width: 56px;
width: 150px;
height: 74px;
margin-top: 8px;
......
......@@ -2075,7 +2075,7 @@ onMounted(async () => {
display: flex;
.item-left {
width: 57px;
width: 156px;
height: 77px;
img {
......
......@@ -29,10 +29,10 @@ const getPieChart = (data) => {
alignTo: 'edge',
formatter: params => {
const name = params.name || "";
const value = params.value ?? "";
const percent = params.percent != null ? Math.round(params.percent) : 0;
const value = Number(params.value ?? 0) || 0;
const percent = params.percent != null ? Number(params.percent).toFixed(2) : "0.00";
return `{name|${name}}\n{time| ${percent}%}`;
return `{name|${name}}\n{time|${value} ${percent}%}`;
},
minMargin: 10,
edgeDistance: 20,
......
......@@ -415,6 +415,9 @@ const handleGetThinkDynamicsReport = async (payload) => {
thinkTankId,
pageNum: Math.max(0, (currentPage.value || 1)),
pageSize: 10,
// 国会听证会:排序语义与其它资源库相反(正序→desc,倒序→asc)
sortField: "createTime",
sortOrder: sort.value === true ? "desc" : "asc",
domainIds,
startDate,
......
......@@ -474,7 +474,7 @@ onMounted(async () => {
display: inline-flex;
position: absolute;
left: 277px;
right: -8px;
bottom: 208px;
background-color: rgba(255, 77, 79, 1);
align-items: center;
......
......@@ -332,7 +332,7 @@ const handleYearGroupChange = (val) => {
.card-item-img {
width: 56px;
width: 156px;
height: 77px;
margin-right: 22px;
flex-shrink: 0;
......
......@@ -14,7 +14,7 @@
<div class="home-main-header-center">
<SearchContainer class="think-tank-search" style="margin-bottom: 0; margin-top: 51px; height: fit-content;"
v-if="containerRef" placeholder="搜索智库、报告或政策建议" :containerRef="containerRef" areaName="智库" />
v-if="containerRef" placeholder="搜索智库、报告或政策建议" :containerRef="containerRef" areaName="智库报告" />
<!-- <el-input v-model="searchThinktankText" @keyup.enter="handleSearch"
style="width: 838px; height: 100%" placeholder="搜索智库报告" />
<div class="search">
......@@ -208,16 +208,11 @@
</el-carousel-item>
</el-carousel>
</OverviewMainBox>
<RiskSignal :list="warningList" @more-click="handleToMoreRiskSignal" postDate="time" name="title" riskLevel="status"
@item-click="handleRiskSignalItemToManage" />
<RiskSignalOverviewDetailDialog
v-model="isRiskDetailVisible"
:row="riskOverviewDetailRow"
name-field="title"
post-date-field="time"
risk-level-field="status"
/>
<RiskSignal :list="warningList" @more-click="handleToMoreRiskSignal" postDate="time" name="title"
riskLevel="status" @item-click="handleRiskSignalItemToManage" />
<RiskSignalOverviewDetailDialog v-model="isRiskDetailVisible" :row="riskOverviewDetailRow" name-field="title"
post-date-field="time" risk-level-field="status" />
</div>
<DivideHeader id="position2" class="divide-header" :titleText="'资讯要闻'"></DivideHeader>
<div class="center-center">
......@@ -354,7 +349,11 @@
</div>
</div>
<div class="box8-main">
<div class="box8-main" :class="{ 'box8-main--empty': !hasBox8Data }">
<template v-if="!hasBox8Data">
<el-empty class="box8-el-empty" description="暂无数据" :image-size="100" />
</template>
<template v-else>
<div class="box8-main-item">
<div class="box8-item" v-for="(item, index) in box8Data" :key="index"
@click="handleBox8ToDataLibrary(item)">
......@@ -362,21 +361,14 @@
:class="{ itemBold1: index === 0, itemBold2: index === 1, itemBold3: index === 2 }">
{{ index + 1 }}
</div>
<!-- <el-popover effect="dark" :content="item.clause" placement="top-start">
<template #reference> -->
<div class="item-center"
:class="{ itemBold1: index === 0, itemBold2: index === 1, itemBold3: index === 2 }">
{{ item.clause }}
</div>
<!-- </template>
</el-popover> -->
<!-- <div class="item-right">{{ `${item.count}份报告 >` }}</div> -->
<div class="item-count">{{ item.count + "份报告 >" }}</div>
</div>
</div>
</template>
</div>
</div>
</div>
......@@ -1646,6 +1638,11 @@ const box8Data = ref([
// }
]);
const hasBox8Data = computed(() => {
const list = box8Data.value;
return Array.isArray(list) && list.length > 0;
});
const box8selectetedYear = ref(1);
const box8YearList = ref([
{
......@@ -1867,7 +1864,7 @@ const handleResourceLibrarySortChange = () => {
} else if (activeCate.value === "政策建议") {
handleGetThinkTankPolicyAdvice();
} else if (activeCate.value === "国会听证会") {
return;
handleGetThinkTankHearings();
} else {
handleGetetThinkTankReport();
}
......@@ -1882,6 +1879,7 @@ const toggleResourceLibrarySortPrefix = () => {
handleGetThinkTankPolicyAdvice();
} else if (activeCate.value === "国会听证会") {
congressResourceSort.value = congressResourceSort.value === true ? false : true;
handleGetThinkTankHearings();
} else {
sort.value = sort.value === true ? false : true;
handleGetetThinkTankReport();
......@@ -1974,6 +1972,9 @@ const handleGetThinkTankHearings = async () => {
pageNum: congressCurrentPage.value,
pageSize: 10,
sortFun: congressResourceSort.value === true,
// 国会听证会:排序语义与其它资源库相反(正序→desc,倒序→asc)
sortField: "createTime",
sortOrder: congressResourceSort.value === true ? "desc" : "asc",
domainIds: (() => {
const areas = stripAllAreaForRequest(congressSelectedAreaList.value);
const allAreaIds = (areaList.value || []).map((a) => a.id);
......@@ -2640,7 +2641,7 @@ onBeforeUnmount(() => {
display: inline-flex;
position: absolute;
left: 233px;
right: -8px;
bottom: 208px;
background-color: rgba(255, 77, 79, 1);
align-items: center;
......@@ -4166,6 +4167,22 @@ onBeforeUnmount(() => {
height: 412px;
&.box8-main--empty {
display: flex;
align-items: center;
justify-content: center;
padding: 24px;
:deep(.el-empty__image) {
margin-bottom: 0;
}
}
.box8-el-empty {
padding: 0;
margin: 0;
}
.box8-main-item {
margin: 0 auto;
margin-top: 5px;
......@@ -4613,6 +4630,7 @@ onBeforeUnmount(() => {
<style lang="scss">
/* 弹窗打开时禁用轮播箭头穿透(样式仅作用于智库页结构) */
.home-main.is-risk-detail-open {
.box1-left,
.box1-right {
pointer-events: none;
......
......@@ -37,10 +37,11 @@ const getPieChart = (data) => {
alignTo: 'edge',
formatter: params => {
const name = params.name || "";
const value = params.value ?? "";
const percent = params.percent != null ? Math.round(params.percent) : 0;
const value = Number(params.value ?? 0) || 0;
const percent = params.percent != null ? Number(params.percent).toFixed(2) : "0.00";
return `{name|${name}}\n{time| ${percent}%}`;
// 第二行:数值 + 百分比(同一行、同一文字样式),保持与旧版一致的两行结构
return `{name|${name}}\n{time|${value}${percent}%}`;
},
minMargin: 5,
edgeDistance: 10,
......
const getSankeyChart = (nodes, links) => {
const formatAmountWan = (v) => {
const n = Number(v)
if (!Number.isFinite(n)) return '0.00万'
return `${n.toFixed(2)}万`
}
const option = {
tooltip: {
trigger: 'item',
backgroundColor: 'rgba(255, 255, 255, 0.95)',
borderColor: 'rgba(234, 236, 238, 1)',
borderWidth: 1,
textStyle: {
color: 'rgb(59, 65, 75)',
fontFamily: 'Microsoft YaHei',
fontSize: 14,
lineHeight: 22
},
formatter: function (params) {
// 仅对连线展示资金金额;节点保持默认名称提示
if (params?.dataType === 'edge') {
const amount = formatAmountWan(params?.data?.value)
return `资金金额:${amount}`
}
return params?.name ?? ''
}
},
series: {
type: 'sankey',
layout: 'none',
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论