提交 5a2524e0 authored 作者: coderBryanFu's avatar coderBryanFu

update

......@@ -66,7 +66,7 @@
</div>
<div class="subscription-box">
<h3>动态订阅</h3>
<h3>动态订阅1</h3>
<p>选择您感兴趣的研究领域,获取最新报告和相关书目。</p>
<el-button type="primary" style="width: 100%;">保存订阅设置</el-button>
</div>
......@@ -102,6 +102,7 @@ import { ref, reactive, onMounted } from 'vue';
import { useRouter } from 'vue-router'
import PolicyTab from '@/components/PolicyTab.vue'
import { getOverviewReport, getThinkTankResearchType } from '@/api'
import { mockReportList } from '../mockData';
const router = useRouter()
const activeTab = ref('report')
......@@ -132,24 +133,15 @@ const activeFilters = reactive({
const selectedDateRange = ref('last_year');
const selectedSort = ref('publish_time');
const reportList = ref([
{ id: 1, title: '中国对AI的转型产业政策', date: '2025年6月26日', source: '兰德科技智库', imageUrl: 'https://picsum.photos/600/320?random=1' },
{ id: 2, title: '中美对抗、竞争和合作将跨越人工智能通用领域的五个...', date: '2025年6月26日', source: '兰德科技智库', imageUrl: 'https://picsum.photos/600/320?random=2' },
{ id: 3, title: '中国、智慧城市和中东:地区和美国的选择', date: '2025年6月26日', source: '兰德科技智库', imageUrl: 'https://picsum.photos/600/320?random=3' },
{ id: 4, title: '中国对AI的转型产业政策', date: '2025年6月26日', source: '兰德科技智库', imageUrl: 'https://picsum.photos/600/320?random=4' },
{ id: 5, title: '中美经济竞争:复杂经济和地缘政治关系中的收益...', date: '2025年6月26日', source: '兰德科技智库', imageUrl: 'https://picsum.photos/600/320?random=5' },
{ id: 6, title: '中国、智慧城市和中东:留给地区和美国的选择', date: '2025年6月26日', source: '兰德科技智库', imageUrl: 'https://picsum.photos/600/320?random=6' },
{ id: 7, title: '中国对AI的转型产业政策', date: '2025年6月26日', source: '兰德科技智库', imageUrl: 'https://picsum.photos/600/320?random=7' },
{ id: 8, title: '中美对抗、竞争和合作将跨越人工智能通用领域的五个...', date: '2025年6月26日', source: '兰德科技智库', imageUrl: 'https://picsum.photos/600/320?random=8' },
{ id: 9, title: '中国、智慧城市和中东:地区和美国的选择', date: '2025年6月26日', source: '兰德科技智库', imageUrl: 'https://picsum.photos/600/320?random=9' },
]);
const reportList = ref([]);
const getReports = async () => {
const { data } = await getOverviewReport({
areas: activeFilters.regions,
researchTypeIds: activeFilters.researches,
})
reportList.value = data
// reportList.value = data
reportList.value = mockReportList
}
const handleReportClick = (report) => {
router.push({ name: 'ReportDetail', params: { id: report.id } })
......@@ -240,8 +232,8 @@ onMounted(() => {
/* --- Right Content Styles --- */
.main-content {
background-color: #fff;
padding: 20px;
/* background-color: #fff; */
/* padding: 20px; */
border-radius: 4px;
}
......@@ -309,6 +301,8 @@ onMounted(() => {
.report-card {
cursor: pointer;
border-radius: 10px;
padding: 10px;
transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
......@@ -340,7 +334,6 @@ onMounted(() => {
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
min-height: 42px; /* 2 lines * 1.4 line-height * 15px font-size */
}
.card-meta {
......
<template>
<div class="think-tank-card" @click="handleClick">
<div class="card-header">
<div class="logo-box">
<el-image
:src="tank.logo || 'https://via.placeholder.com/60'"
:alt="tank.name"
fit="contain"
>
<template #error>
<div class="image-slot">
<el-icon><Picture /></el-icon>
</div>
</template>
</el-image>
</div>
<div class="rank-badge" v-if="index !== undefined">
<span class="rank-text">No.{{ index + 1 }}</span>
</div>
</div>
<div class="title-row">
<div class="tank-name" :title="tank.name">{{ tank.name }}</div>
<div class="tank-country">{{ tank.country }}</div>
</div>
<div class="tank-description" :title="tank.describe">
{{ tank.describe }}
</div>
<div class="tank-tags">
<span
v-for="(tag, idx) in tank.tags"
:key="tag"
class="custom-tag"
:class="idx % 2 === 0 ? 'tag-blue' : 'tag-red'"
>
{{ tag }}
</span>
</div>
</div>
</template>
<script setup>
import { Picture } from '@element-plus/icons-vue' // 引入图标用于图片加载失败占位
const props = defineProps({
tank: {
type: Object,
required: true
},
// 新增 index用于显示 No.1, No.2 等排名
index: {
type: Number,
default: 0
}
})
const emit = defineEmits(['click'])
const handleClick = () => {
emit('click', props.tank)
}
</script>
<style scoped lang="scss">
.think-tank-card {
background: #ffffff;
border-radius: 12px; // 更圆润的角
padding: 16px;
width: 280px; // 稍微加宽以匹配设计图比例,可根据父容器自适应
// border: 1px solid #e4e7ed; // 设计图看起来边框很淡,或者主要是阴影
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.05);
display: flex;
flex-direction: column;
cursor: pointer;
position: relative;
transition: all 0.3s ease;
overflow: hidden; // 确保排名背景不溢出
&:hover {
transform: translateY(-2px);
box-shadow: 0 6px 16px 0 rgba(0, 0, 0, 0.1);
}
}
/* --- 顶部区域 --- */
.card-header {
display: flex;
justify-content: space-between;
align-items: flex-start;
margin-bottom: 12px;
position: relative;
}
.logo-box {
width: 48px;
height: 48px;
// 设计图中Logo是自适应显示的,取消了灰底
display: flex;
align-items: center;
justify-content: center;
.el-image {
width: 100%;
height: 100%;
border-radius: 4px;
display: block; // 消除图片底部间隙
}
.image-slot {
width: 100%;
height: 100%;
background: #f5f7fa;
display: flex;
justify-content: center;
align-items: center;
color: #909399;
}
}
/* 排名条样式 */
.rank-badge {
/* 绝对定位到右上角,或者利用Flex布局 */
position: absolute;
right: -16px; /* 抵消父级padding */
top: -6px; /* 微调垂直位置 */
height: 32px;
padding-left: 30px; /* 渐变过度区 */
padding-right: 16px;
display: flex;
align-items: center;
justify-content: flex-end;
/* 核心:背景渐变从透明到淡红色 */
background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(206, 126, 126, 0.15) 40%, rgba(199, 58, 58, 0.15) 100%);
.rank-text {
font-family: 'Impact', sans-serif, 'Arial Black'; /* 选用粗体字体 */
font-size: 20px;
font-style: italic;
color: #b54646; /* 暗红色字体 */
letter-spacing: 1px;
}
}
/* --- 标题行 --- */
.title-row {
display: flex;
justify-content: space-between;
align-items: baseline; /* 文字基线对齐 */
margin-bottom: 12px;
}
.tank-name {
font-size: 16px;
font-weight: 700;
color: #303133;
line-height: 1.4;
margin-right: 8px;
/* 防止名字太长换行导致布局崩坏,可按需开启截断 */
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.tank-country {
font-size: 13px;
color: #909399;
flex-shrink: 0;
}
/* --- 描述文本 --- */
.tank-description {
font-size: 13px;
color: #606266;
line-height: 1.6;
margin-bottom: 16px;
min-height: 63px; /* 预留3行高度,保证卡片高度一致 */
/* 3行省略号 */
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
overflow: hidden;
text-overflow: ellipsis;
}
/* --- 底部标签 --- */
.tank-tags {
display: flex;
gap: 8px;
margin-top: auto; /* 推到底部 */
}
/* 自定义标签样式,模拟设计图 */
.custom-tag {
padding: 2px 8px;
border-radius: 4px;
font-size: 12px;
border: 1px solid transparent; // 预留边框位置
&.tag-blue {
background-color: #e6f1fc; /* 淡蓝背景 */
color: #409eff; /* 蓝色文字 */
border-color: #d9ecff;
}
&.tag-red {
background-color: #fef0f0; /* 淡红背景 */
color: #f56c6c; /* 红色文字 */
border-color: #fde2e2;
}
}
</style>
\ No newline at end of file
......@@ -52,21 +52,13 @@
<!-- 智库展示区域 -->
<div class="think-tanks-section">
<div v-for="tank in thinkTanks" :key="tank.id" class="think-tank-card" @click="handleClick(tank)">
<div class="tank-header">
<div class="tank-logo">
<el-image :src="$withFallbackImage(tank.logo, tank.id)" :alt="tank.name" />
</div>
<div class="tank-country">{{ tank.country }}</div>
</div>
<div class="tank-name">{{ tank.name }}</div>
<div class="tank-description" :title="tank.describe">{{ tank.describe }}</div>
<div class="tank-tags">
<el-tag v-for="tag in tank.tags" :key="tag" type="primary" size="small">
{{ tag }}
</el-tag>
</div>
</div>
<ThinkTankCard
v-for="(tank, index) in thinkTanks"
:key="tank.id"
:tank="tank"
:index="index"
@click="handleClick"
/>
<div class="view-all">
<span class="view-all-link">查看全部智库 ></span>
......@@ -99,9 +91,10 @@
<div class="right-section">
<div class="signal-header">
<el-icon class="signal-icon"><Warning /></el-icon>
<span class="signal-title">风险信号</span>
<el-badge :value="5" class="signal-badge" />
<span class="more-link">更多 ></span>
<div class="signal-title-box">
<span class="signal-title">风险信号</span>
<el-badge :value="5" class="signal-badge" />
</div>
</div>
<div class="signal-list">
......@@ -117,8 +110,7 @@
</div>
<el-button type="primary" class="process-btn" block>
<el-icon><Setting /></el-icon>
风险处理
查看更多
</el-button>
</div>
</div>
......@@ -185,17 +177,16 @@
import { ref, onMounted, nextTick } from "vue";
import { Search, Location, Warning, Setting } from "@element-plus/icons-vue";
import * as echarts from "echarts";
import ReportList from "@/components/ReportList.vue";
import ReportList from "@/views/thinkTank/components/ReportList.vue";
import { useRouter } from "vue-router";
import rand from "@/assets/images/rand.png";
import brookings from "@/assets/images/brookings.png";
import mit from "@/assets/images/mit.png";
import itif from "@/assets/images/itif.png";
import mckinsley from "@/assets/images/mckinsey.png";
import { mockThinkTankList } from "./mockData";
import { getThinkTankList } from "@/api";
import ClickableCard from "@/views/finance/components/link.vue";
import DivideHeader from "@/components/DivideHeader.vue";
import DataOverview from "./components/DataOverview.vue";
import ThinkTankCard from "./components/ThinkTankCard.vue";
import News1 from "@/views/bill/billHome/assets/images/news1.png";
import News2 from "@/views/bill/billHome/assets/images/news2.png";
import News3 from "@/views/bill/billHome/assets/images/news3.png";
......@@ -498,7 +489,8 @@ const thinkTanks = ref([]);
const getThinkTanks = async () => {
const { data } = await getThinkTankList();
thinkTanks.value = data;
// thinkTanks.value = data;
thinkTanks.value = [...mockThinkTankList];
};
const handleClick = tank => {
router.push({ name: "ThinkTankDetail", params: { id: tank.id } });
......@@ -539,7 +531,7 @@ onMounted(() => {
}
.tech-think-tank {
max-width: 1400px;
max-width: 1650px;
margin: 0 auto;
margin-top: 31px;
padding: 20px;
......@@ -950,12 +942,14 @@ onMounted(() => {
background: white;
border-radius: 2px;
padding: 20px;
padding-top: 0px;
}
.signal-header {
display: flex;
align-items: center;
margin-bottom: 20px;
display: flex;
margin-bottom: 15px;
}
.signal-icon {
......@@ -963,6 +957,13 @@ onMounted(() => {
margin-right: 2px;
}
.signal-title-box {
display: flex;
background-color: #C05052;
padding: 10px;
color: #fff;
margin-left: 20px;
}
.signal-title {
font-weight: 500;
margin-right: 8px;
......@@ -972,11 +973,6 @@ onMounted(() => {
margin-right: auto;
}
.more-link {
color: #409eff;
font-size: 14px;
cursor: pointer;
}
.signal-list {
margin-bottom: 40px;
......@@ -1036,86 +1032,12 @@ onMounted(() => {
justify-content: flex-start;
}
.think-tank-card {
background: white;
border-radius: 8px;
padding: 12px;
border: 1px solid #e4e7ed;
width: 220px;
// height: 180px;
flex-shrink: 0;
display: flex;
flex-direction: column;
cursor: pointer;
}
.tank-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 15px;
}
.tank-logo {
width: 60px;
height: 60px;
background: #f0f0f0;
border-radius: 8px;
margin-right: 15px;
display: flex;
align-items: center;
justify-content: center;
.el-image {
width: 100%;
height: 100%;
border-radius: 8px;
object-fit: contain;
}
}
.tank-logo img {
width: 100%;
height: 100%;
object-fit: contain;
}
.tank-country {
background: #f0f0f0;
padding: 4px 8px;
border-radius: 4px;
font-size: 12px;
color: #666;
}
.tank-name {
font-size: 16px;
font-weight: 500;
margin-bottom: 10px;
color: #333;
}
.tank-description {
font-size: 12px;
color: #666;
flex: 1;
overflow: hidden;
display: -webkit-box;
text-overflow: ellipsis;
margin-bottom: 5px;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
}
.tank-tags {
display: flex;
gap: 8px;
flex-wrap: wrap;
margin-top: auto;
}
.view-all {
text-align: center;
width: 180px;
width: 110px;
border-radius: 10px;
box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
padding: 0 5px;
background: #fff;
display: flex;
......
import rand from "@/assets/images/rand.png";
import brookings from "@/assets/images/brookings.png";
import mit from "@/assets/images/mit.png";
import itif from "@/assets/images/itif.png";
import mckinsley from "@/assets/images/mckinsey.png";
import report1 from "./assets/矩形 196.png";
import report2 from "./assets/矩形 196 (1).png";
import report3 from "./assets/矩形 196 (2).png";
import report4 from "./assets/矩形 196 (3).png";
import report5 from "./assets/矩形 196 (4).png";
import report6 from "./assets/矩形 196 (5).png";
import report7 from "./assets/矩形 196 (6).png";
import report8 from "./assets/矩形 196 (7).png";
import report9 from "./assets/矩形 196 (8).png";
import report10 from "./assets/矩形 196 (9).png";
import report11 from "./assets/矩形 196 (10).png";
import report12 from "./assets/矩形 196 (11).png";
export const mockThinkTankList = [
{
"id": 1,
"name": "兰德科技智库",
"describe": "全球顶尖政策研究机构,专注于国家安全、科技政策、医疗卫生、能源政策、公共安全等领域的研究。",
"country": "美国",
"tags": [
"国家安全",
"科技政策"
],
"logo": rand
},
{
"id": 2,
"name": "布鲁金斯学会",
"describe": "专注于全球经济与发展、外交政策、都市政策、治理研究等领域,是美国最具影响力的智库之一。",
"country": "美国",
"tags": [
"经济政策",
"公共政策"
],
"logo": brookings
},
{
"id": 3,
"name": "麦肯锡全球研究院",
"describe": "专注于国际安全、国防、区域研究、能源与气候变化等领域,以其强硬的安全政策立场著称。",
"country": "美国",
"tags": [
"国际安全",
"国防政策"
],
"logo": mckinsley
},
{
"id": 4,
"name": "麻省理工学院科技评论",
"describe": "全球顶尖政策研究机构,专注于国家安全、科技政策、医疗卫生、能源政策、公共安全等领域的研究。",
"country": "美国",
"tags": [
"公共政策",
"国际关系"
],
"logo": mit
},
{
"id": 5,
"name": "信息技术与创新基金会",
"describe": "专注于国内外公共政策、国际关系等领域,是美国最具影响力的官方智库之一。",
"country": "美国",
"tags": [
"国家安全",
"科技政策"
],
"logo": itif
}
]
export const mockReportList = [
{
"id": 1,
"name": "中国对AI的转型产业政策",
"times": "2025-06-26",
"thinkTankName": "兰德科技智库",
imageUrl: report1
},
{
"id": 2,
"name": "中美对抗、竞争和合作跨越人工智能通用领域...",
"times": "2025-06-26",
"thinkTankName": "兰德科技智库",
imageUrl: report2
},
{
"id": 3,
"name": "中国、智慧城市和中东:地区和美国的选择",
"times": "2025-06-26",
"thinkTankName": "兰德科技智库",
imageUrl: report3
},
{
"id": 4,
"name": "中国对AI的转型产业政策",
"times": "2025-06-26",
"thinkTankName": "兰德科技智库",
imageUrl: report4
},
{
"id": 5,
"name": "中美经济竞争:复杂经济和地缘政治关系中的...",
"times": "2025-06-26",
"thinkTankName": "兰德科技智库",
imageUrl: report5
},
{
"id": 6,
"name": "中国、智慧城市和中东:留给地区和美国的选择",
"times": "2025-06-26",
"thinkTankName": "兰德科技智库",
imageUrl: report6
},
{
"id": 7,
"name": "中国对AI的转型产业政策",
"times": "2025-06-26",
"thinkTankName": "兰德科技智库",
imageUrl: report7
},
{
"id": 8,
"name": "中美对抗、竞争和合作跨越人工智能通用领域...",
"times": "2025-06-26",
"thinkTankName": "兰德科技智库",
imageUrl: report8
},
{
"id": 9,
"name": "中国、智慧城市和中东:地区和美国的选择",
"times": "2025-06-26",
"thinkTankName": "兰德科技智库",
imageUrl: report9
},
{
"id": 10,
"name": "中国对AI的转型产业政策",
"times": "2025-06-26",
"thinkTankName": "兰德科技智库",
imageUrl: report10
},
{
"id": 11,
"name": "中美对抗、竞争和合作跨越人工智能通用领域...",
"times": "2025-06-26",
"thinkTankName": "兰德科技智库",
imageUrl: report11
},
{
"id": 12,
"name": "中国、智慧城市和中东:地区和美国的选择",
"times": "2025-06-26",
"thinkTankName": "兰德科技智库",
imageUrl: report12
}
]
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论