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

feat:智库bug修改

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