提交 3d27f2af authored 作者: coderBryanFu's avatar coderBryanFu

update

上级 5aa089fb
......@@ -79,11 +79,11 @@
</div>
<div class="text-item-content">
<div v-for="(item, index) in dynamicList" :key="index" class="dynamic-item">
<img :src="defaultImg" alt="" class="item-icon" />
<img :src="item.logoUrl ? item.logoUrl : defaultImg" alt="" class="item-icon" />
<div class="item-right">
<div class="dynamic-item-header">
<span class="item-title" @click="handleNewsClick(item)">{{ item.title }}</span>
<span class="item-date">{{ item.date }} · {{ item.orgName }}</span>
<span class="item-date">{{ item.date }}</span>
</div>
<el-tooltip
effect="dark"
......@@ -164,12 +164,12 @@
<span>美政府部门对我打压遏制时间线</span>
</div>
<div class="bottom-item-select">
<div class="select-btn" :class="{ active: measureType === 'history' }" @click="measureType = 'history'">
<!-- <div class="select-btn" :class="{ active: measureType === 'history' }" @click="measureType = 'history'">
历史举措
</div>
<div class="select-btn" :class="{ active: measureType === 'future' }" @click="measureType = 'future'">
未来举措
</div>
</div> -->
<el-select v-model="selectedField" placeholder="全部领域" class="field-select">
<el-option v-for="item in fieldOptions" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
......@@ -277,12 +277,18 @@ const getUSGovernmentSanctionHistoryData = async () => {
loadingHistory.value = true;
try {
const params = {
onlyHistory: measureType.value === "history",
onlyFuture: measureType.value === "future",
field: selectedField.value || null
// onlyHistory: measureType.value === "history",
// onlyFuture: measureType.value === "future",
onlyHistory: false,
onlyFuture: true,
field: selectedField.value || null,
startDate: new Date(),
endDate: new Date(new Date().setMonth(new Date().getMonth() + 3))
};
const res = await getUSGovernmentSanctionHistory(params);
console.log('遏制时间线', res);
if (res.code === 200 && res.data) {
// 如果返回的是 content 数组(分页结构)或直接是数组
const rawList = res.data.content || res.data;
......@@ -361,6 +367,8 @@ const getUSGovernmentLatestDynamicData = async () => {
try {
const res = await getUSGovernmentLatestDynamic();
if (res.code === 200 && res.data) {
console.log("美政府部门打压遏制最新动态", res);
dynamicList.value = res.data.map(item => ({
title: item.orgName ? `${item.orgName}${item.title}` : item.title,
date: item.time ? item.time.replace(/^(\d{4})-(\d{2})-(\d{2})$/, "$1年$2月$3日") : "",
......@@ -368,7 +376,8 @@ const getUSGovernmentLatestDynamicData = async () => {
content: item.content || item.title,
tags: item.industrylist || [],
id: item.id,
orgName: item.orgName || ""
orgName: item.orgName || "",
logoUrl: item.logoUrl
}));
}
} catch (error) {
......@@ -777,12 +786,15 @@ const initSlider = () => {
// 设定总范围:2010年1月1日 - 当前年份年底
const currentYear = new Date().getFullYear();
const rangeMin = new Date(2018, 0, 1).getTime();
const rangeMax = new Date(currentYear, 11, 31).getTime();
const rangeMin = new Date().setHours(0, 0, 0, 0);
const rangeMax = new Date(new Date().setMonth(new Date().getMonth() + 12)).setHours(0, 0, 0, 0);
// 设定默认选中范围:2025-01-01 到 2025-04-25
const defaultStart = new Date(2025, 0, 1).getTime();
const defaultEnd = new Date(2025, 3, 25).getTime();
// const defaultStart = new Date(2025, 0, 1).getTime();
// const defaultEnd = new Date(2025, 3, 25).getTime();
const defaultStart = new Date().setHours(0, 0, 0, 0);
const defaultEnd = new Date(new Date().setMonth(new Date().getMonth() + 3)).setHours(0, 0, 0, 0);
// 初始化 dateRange 为默认选中范围
dateRange.value = [defaultStart, defaultEnd];
......@@ -1060,9 +1072,9 @@ const prev = () => {
background-size: 358px 358px;
background-repeat: no-repeat;
background-position: center;
filter: blur(20px);
// filter: blur(20px);
z-index: 0;
opacity: 0.8;
// opacity: 0.8;
// background-color: rgba(5, 33, 77, 0.7); // 调整为更明显的深蓝色
&::after {
......@@ -1072,7 +1084,9 @@ const prev = () => {
left: 0;
width: 100%;
height: 100%;
background: linear-gradient(90deg, rgba(5, 33, 77, 1) 0%, rgba(5, 33, 77, 0) 50%, rgba(5, 33, 77, 1) 100%);
// background: linear-gradient(90deg, rgba(5, 33, 77, 1) 0%, rgba(5, 33, 77, 0) 50%, rgba(5, 33, 77, 1) 100%);
// background: linear-gradient(180deg, rgba(34, 41, 52, 0.8) 0%, rgba(34, 41, 52, 0.4) 100%);
backdrop-filter: blur(100px);
background: linear-gradient(180deg, rgba(34, 41, 52, 0.8) 0%, rgba(34, 41, 52, 0.4) 100%);
}
}
......
......@@ -62,7 +62,6 @@
class="risk-signals-item"
v-for="(item, index) in warningList"
:key="index"
@click="handleClickToDetailO(item)"
@mouseenter="onMouseEnter(item, index)"
@mouseleave="onMouseLeave"
:class="['risk-signals-item', { 'risk-signals-item-hightLight': riskSignalActiveIndex === index }]"
......@@ -133,18 +132,23 @@
<div class="carousel-bottom">
<div class="left">
{{
News.hotspotDate +
" " +
(News.hotspotOrgName ? News.hotspotOrgName : "暂无发布机构数据")
}}
{{ News.hotspotDate }}
</div>
<div class="right">
<div v-for="tag in News.domainList" class="tag">
<div v-for="(tag, index) in News.domainList" :key="index" class="tag">
{{ tag.name }}
</div>
</div>
</div>
<div class="carousel-footer">
<div class="footer-left">
<div class="type">{{ News.hotspotType +'——' }}</div>
<div class="text">{{ News.eventTitle }}</div>
</div>
<div class="footer-right">
<img src="@/assets/icons/arrow-right.png" alt="">
</div>
</div>
</div>
</el-carousel-item>
</el-carousel>
......@@ -569,10 +573,6 @@ const handleClickToDetail = () => {
};
// 查看详情 传递参数
const handleClickToDetailO = item => {
// window.sessionStorage.setItem("billId", item.billId);
// window.sessionStorage.setItem("curTabName", item.name || item.signalTitle);
// const route = router.resolve("/billLayout?billId=" + item.billId);
// window.open(route.href, "_blank");
window.sessionStorage.setItem("curTabName", item.signalTitle);
// console.log("item", item);
let curRoute;
......@@ -665,7 +665,7 @@ const onMouseEnter = (item, index) => {
};
const onMouseLeave = () => {
currentHoveredSignalId.value = null;
// currentHoveredSignalId.value = null;
timer2 = setInterval(() => {
if (riskSignalActiveIndex.value < warningList.value.length - 1) {
riskSignalActiveIndex.value++;
......@@ -1457,7 +1457,7 @@ onUnmounted(() => {
.news-carousel-content {
width: 664px;
margin-top: 16px;
height: 270px;
height: 210px;
/* 调整为可用空间 */
overflow-y: auto;
color: rgba(95, 101, 108, 1);
......@@ -1514,6 +1514,55 @@ onUnmounted(() => {
}
}
}
.carousel-footer {
margin-top: 10px;
width: 664px;
height: 42px;
box-sizing: border-box;
border: 1px solid rgba(231, 243, 255, 1);
border-radius: 50px;
background: rgba(246, 250, 255, 1);
display: flex;
padding: 0 13px;
align-items: center;
justify-content: space-between;
cursor: pointer;
.footer-left {
display: flex;
.type {
color: var(--color-main-active);
font-family: Source Han Sans CN;
font-style: bold;
font-size: 16px;
font-weight: 400;
line-height: 24px;
letter-spacing: 0px;
text-align: left;
}
.text {
width: 500px;
color: var(--color-main-active);
font-family: Source Han Sans CN;
font-style: Regular;
font-size: 16px;
font-weight: 400;
line-height: 24px;
letter-spacing: 0px;
text-align: left;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
.footer-right {
width: 12px;
height: 11px;
img {
width: 100%;
height: 100%;
}
}
}
}
}
......
......@@ -30,13 +30,14 @@
<div class="box-header">
<div class="icon"></div>
<div class="title">{{ "新闻内容" }}</div>
<div class="header-right">
<div class="header-right" @click="handleWarning">
<div class="mask"></div>
<el-switch v-model="highlightEntities" />
高亮实体
</div>
</div>
<div class="box1-main">
<div class="main-header">
<!-- <div class="main-header">
<div class="main-header-left">{{ "原文" }}</div>
<div class="main-header-center"></div>
<div class="main-header-right">
......@@ -45,7 +46,7 @@
<img src="./assets/images/arrow-down.png" alt="" />
</div>
</div>
</div>
</div> -->
<div class="main-content">
<!-- {{ newsContentInfo.newsContent }} -->
{{
......@@ -69,8 +70,14 @@
<div class="title">{{ "相关新闻" }}</div>
</div>
<div class="box2-main">
<div class="news-list">
<NewsList :list-data="customNewsData" />
<div class="box2-item" v-for="(item, index) in relevantNews" :key="index">
<div class="box2-item-left">
<img :src="item.newsImage" alt="" />
</div>
<div class="box2-item-right">
<div class="title">{{ item.newsTitle }}</div>
<div class="info">{{ item.newsDate + " · " + item.newsOrg }}</div>
</div>
</div>
</div>
</div>
......@@ -88,6 +95,7 @@ import NewsList from "@/views/exportControl/components/news.vue";
import newsImg from "@/assets/images/img-news.png";
import openIcon from "@/assets/images/icon-open.png";
import dotIcon from "@/assets/images/dot.png";
import { ElMessage } from "element-plus";
const route = useRoute();
......@@ -186,8 +194,60 @@ const handleGetNewsEvent = async () => {
}
};
const handleWarning = () => {
ElMessage.warning("当前功能正在开发中,敬请期待!");
return;
};
// 相关新闻
const customNewsData = ref([]);
const relevantNews = ref([
{
newsImage: null,
newsTitle: "美国将6家中企列入实体清单,合肥宝龙达被移出!",
newsETitle: null,
newsDateTime: null,
newsDate: "2025-01-08",
newsOrg: "芯智讯",
industryList: null,
newsSrc: null,
newsId: null
},
{
newsImage: null,
newsTitle: "美国将39家中企列入“实体清单”,还有42个实体被列入SDN名单!",
newsETitle: null,
newsDateTime: null,
newsDate: "2024-08-24",
newsOrg: "芯智讯",
industryList: null,
newsSrc: null,
newsId: null
},
{
newsImage: null,
newsTitle: "美国商务部实体清单新增列6个实体,包括2家中国企业",
newsETitle: null,
newsDateTime: null,
newsDate: "2024-07-05",
newsOrg: "贸易与合规",
industryList: null,
newsSrc: null,
newsId: null
},
{
newsImage: null,
newsTitle: "近日美国商务部新增实体清单条目,涉及多家中国实体",
newsETitle: null,
newsDateTime: null,
newsDate: "2024-02-29",
newsOrg: "贸易与投资便利化促进会",
industryList: null,
newsSrc: null,
newsId: null
}
]);
const handleGetRelationNews = async () => {
const params = {
newsId: route.query.newsId
......@@ -196,14 +256,16 @@ const handleGetRelationNews = async () => {
const res = await getRelationNews(params);
console.log("相关新闻", res);
if (res.code === 200 && res.data) {
relevantNews.value = res.data
} else {
customNewsData.value = [];
relevantNews.value = [];
}
} catch (error) {
customNewsData.value = [];
relevantNews.value = [];
}
};
onMounted(() => {
handleGetNewsSummary();
handleGetNewsContent();
......@@ -346,6 +408,15 @@ onMounted(() => {
position: absolute;
top: 18px;
right: 37px;
cursor: pointer;
.mask {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
z-index: 9999;
}
}
}
.left {
......@@ -437,10 +508,65 @@ onMounted(() => {
width: 520px;
.box2 {
width: 520px;
height: 400px;
height: 600px;
border: 1px solid rgba(234, 236, 238, 1);
border-radius: 10px;
background: rgba(255, 255, 255, 1);
.box2-main {
width: 483px;
height: 520px;
margin: 0 auto;
overflow: hidden;
overflow-y: auto;
.box2-item {
width: 483px;
height: 60px;
display: flex;
margin-bottom: 8px;
.box2-item-left {
margin-left: 8px;
margin-top: 6px;
width: 64px;
height: 48px;
img {
width: 100%;
height: 100%;
}
}
.box2-item-right {
width: 395px;
height: 48px;
margin-left: 14px;
margin-top: 5px;
.title {
width: 395px;
height: 24px;
color: rgba(59, 65, 75, 1);
font-family: Microsoft YaHei;
font-style: Bold;
font-size: 16px;
font-weight: 700;
line-height: 24px;
letter-spacing: 0px;
text-align: left;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.info {
height: 24px;
color: rgba(95, 101, 108, 1);
font-family: Source Han Sans CN;
font-style: Regular;
font-size: 16px;
font-weight: 400;
line-height: 24px;
letter-spacing: 0px;
text-align: left;
}
}
}
}
}
}
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论