提交 698a46f6 authored 作者: 胡卉清's avatar 胡卉清

合并分支 'dev_hhq' 到 'master'

Dev hhq 查看合并请求 !106
...@@ -102,8 +102,8 @@ export default { ...@@ -102,8 +102,8 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
width: 100%; width: 100%;
padding: 0 40px; /* padding: 0 40px; */
width: 1500px; width: 1600px;
overflow: auto; overflow: auto;
} }
...@@ -156,7 +156,7 @@ export default { ...@@ -156,7 +156,7 @@ export default {
.line { .line {
position: absolute; position: absolute;
left: 0; left: 10px;
right: 0; right: 0;
top: 50%; top: 50%;
height: 6px; height: 6px;
......
...@@ -74,7 +74,7 @@ const makeOption = () => { ...@@ -74,7 +74,7 @@ const makeOption = () => {
const change = props.data.change; const change = props.data.change;
const unit = props.data.unit; const unit = props.data.unit;
if (change === 0) { if (change === 0) {
return `{num|${'无新增'}}` return `{noChange|${'无新增'}}\n{b|共${props.data.count}${unit}}`
} }
return `{num|${change}}{unit| ${unit}}\n{b|共${props.data.count}${unit}}` return `{num|${change}}{unit| ${unit}}\n{b|共${props.data.count}${unit}}`
}, },
...@@ -86,7 +86,7 @@ const makeOption = () => { ...@@ -86,7 +86,7 @@ const makeOption = () => {
padding: [-4, 0, 8, 0] padding: [-4, 0, 8, 0]
}, },
noChange: { noChange: {
fontSize: 24, fontSize: 20,
fontWeight: 'bold', fontWeight: 'bold',
color: `${props.color[5]}`, color: `${props.color[5]}`,
padding: [0, 0, 8, 0] padding: [0, 0, 8, 0]
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
width: sections[index].waveBall.length === 2 ? '350px' : '503px', width: sections[index].waveBall.length === 2 ? '350px' : '503px',
background: section.background background: section.background
}"> }">
<img class="section-title" :src="`/public/icon/riskToday/title-` + (index + 1) + `.png`" /> <img class="section-title" :src="section.title" />
<div class="stats"> <div class="stats">
<div v-for="value in sections[index].waveBall"> <div v-for="value in sections[index].waveBall">
<WaveBall :percent="value.percent" :data="value" :color="section.waterColor" :size="128" /> <WaveBall :percent="value.percent" :data="value" :color="section.waterColor" :size="128" />
...@@ -39,7 +39,8 @@ ...@@ -39,7 +39,8 @@
</div> </div>
</div> </div>
<div style="display: flex"> <div style="display: flex">
<div class="risk-signals"> <!-- 风险信号列表 -->
<div class="risk-signals" ref="riskSignalsRef">
<div class="risk-signals-item" v-for="(item, index) in warningList" :key="index" <div class="risk-signals-item" v-for="(item, index) in warningList" :key="index"
@click="handleClickToDetailO(item)"> @click="handleClickToDetailO(item)">
<div class="item-left" :class="{ <div class="item-left" :class="{
...@@ -70,7 +71,7 @@ ...@@ -70,7 +71,7 @@
<el-carousel ref="carouselRef" style="height: 443px; width: 664px" :autoplay="true" :interval="30000" <el-carousel ref="carouselRef" style="height: 443px; width: 664px" :autoplay="true" :interval="30000"
arrow="never" indicator-position="none" @change="handleCarouselChange"> arrow="never" indicator-position="none" @change="handleCarouselChange">
<el-carousel-item v-for="(News, NewsIndex) in hotNewsList" :key="NewsIndex"> <el-carousel-item v-for="(News, NewsIndex) in hotNewsList" :key="NewsIndex">
<div class="carousel-item"> <div class="carousel-item" @click="toDetaile(News.id, News.HotspotType)">
<div class="carousel-title"> <div class="carousel-title">
<div> <div>
<div class="title-text"> <div class="title-text">
...@@ -105,17 +106,21 @@ ...@@ -105,17 +106,21 @@
<script setup> <script setup>
import { color } from "echarts"; import { color } from "echarts";
import { onMounted, ref, computed, onBeforeUnmount } from "vue"; import { onMounted, ref, onUnmounted, onBeforeUnmount } from "vue";
import WaveBall from "./WaveBall.vue"; import WaveBall from "./WaveBall.vue";
import { getBillRiskSignal } from "@/api/bill/billHome";
import { getLatestRiskUpdates, getLatestRisks } from '@/api/zmOverview/risk/index.js' import { getLatestRiskUpdates, getLatestRisks } from '@/api/zmOverview/risk/index.js'
import router from "@/router/index";
import icon1 from './icon/title-1.png'
import icon2 from './icon/title-2.png'
import icon3 from './icon/title-3.png'
import icon4 from './icon/title-4.png'
const sectionTab = [ const sectionTab = [
{ {
textColor: "rgba(9, 88, 217, 1)", textColor: "rgba(9, 88, 217, 1)",
background: "linear-gradient(180.00deg, rgba(9, 88, 217, 1),rgba(9, 88, 217, 0.5) 100%)", background: "linear-gradient(180.00deg, rgba(9, 88, 217, 1),rgba(9, 88, 217, 0.5) 100%)",
borderColor: "rgba(186, 224, 255, 1)", borderColor: "rgba(186, 224, 255, 1)",
waterColor: ["#4E92F4", "#5993EE", "#8EB3ED", "#77A2EB", "#ffffff", "#ffffff"], waterColor: ["#4E92F4", "#5993EE", "#8EB3ED", "#77A2EB", "#ffffff", "#ffffff"],
title: "政策法规" title: icon1
}, },
{ {
textColor: "rgba(9, 88, 217, 1)", textColor: "rgba(9, 88, 217, 1)",
...@@ -123,7 +128,7 @@ const sectionTab = [ ...@@ -123,7 +128,7 @@ const sectionTab = [
borderColor: "rgba(186, 224, 255, 1)", borderColor: "rgba(186, 224, 255, 1)",
waterColor: ["#4AB9BA", "#5DBFC1", "#86CCCF", "#8DD0D2", "#ffffff", "#ffffff"], waterColor: ["#4AB9BA", "#5DBFC1", "#86CCCF", "#8DD0D2", "#ffffff", "#ffffff"],
title: "出口管制" title: icon2
}, },
{ {
textColor: "rgba(9, 88, 217, 1)", textColor: "rgba(9, 88, 217, 1)",
...@@ -131,7 +136,7 @@ const sectionTab = [ ...@@ -131,7 +136,7 @@ const sectionTab = [
borderColor: "rgba(186, 224, 255, 1)", borderColor: "rgba(186, 224, 255, 1)",
waterColor: ["#EF797B", "#ED8C8E", "#EAB0B2", "#E7ABAC", "#ffffff", "#ffffff"], waterColor: ["#EF797B", "#ED8C8E", "#EAB0B2", "#E7ABAC", "#ffffff", "#ffffff"],
title: "投融资限制" title: icon3
}, },
{ {
textColor: "rgba(9, 88, 217, 1)", textColor: "rgba(9, 88, 217, 1)",
...@@ -139,7 +144,7 @@ const sectionTab = [ ...@@ -139,7 +144,7 @@ const sectionTab = [
borderColor: "rgba(186, 224, 255, 1)", borderColor: "rgba(186, 224, 255, 1)",
waterColor: ["#EFA04F", "#EDA969", "#EABA8C", "#E7AF7A", "#ffffff", "#ffffff"], waterColor: ["#EFA04F", "#EDA969", "#EABA8C", "#E7AF7A", "#ffffff", "#ffffff"],
title: "市场准入" title: icon4
} }
]; ];
// 模拟从后端获取的数据 // 模拟从后端获取的数据
...@@ -367,7 +372,6 @@ const hotNewsList = ref([ ...@@ -367,7 +372,6 @@ const hotNewsList = ref([
//最新风险信号 //最新风险信号
const handleGetLatestRisks = async () => { const handleGetLatestRisks = async () => {
try { try {
const res = await getLatestRisks(); const res = await getLatestRisks();
console.log("最新风险信号", res); console.log("最新风险信号", res);
if (res.code === 200 && res.data) { if (res.code === 200 && res.data) {
...@@ -391,12 +395,86 @@ const handleCarouselChange = index => { ...@@ -391,12 +395,86 @@ const handleCarouselChange = index => {
} }
}; };
// 查看详情
const handleClickToDetail = () => {
window.sessionStorage.setItem("billId", curBill.value.billId);
window.sessionStorage.setItem("curTabName", curBill.value.billName);
const route = router.resolve({
path: "/billLayout",
query: {
billId: curBill.value.billId
}
});
console.log(route);
window.open(route.href, "_blank");
};
// 查看详情 传递参数
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");
};
const handleToRiskManage = () => { const handleToRiskManage = () => {
// 这里的路由路径请根据实际情况修改 // 这里的路由路径请根据实际情况修改
// router.push('/riskSignalManage'); // router.push('/riskSignalManage');
console.log('跳转到风险信号管理'); console.log('跳转到风险信号管理');
}; };
const toDetaile = (id, type) => {
if (type === '法案') {
let path = "/billLayout/bill/introduction";
let query = { billId: id };
const { href } = router.resolve({ path, query });
window.open(href, "_blank");
} else if (type === '政令') {
const route = router.resolve({
path: "/decreeLayout/overview/introduction",
query: {
id: id
}
});
window.open(route.href, "_blank");
} else if (type === '实体清单' || type === 'CCL') {
const route = router.resolve({
path: "/exportControl/singleSanction",
query: {
id: id
}
});
window.open(route.href, "_blank");
} else if (type === '337') {
const curRoute = router.resolve({
path: "/marketSingleCaseLayout/overview",
query: {
id: "337",
searchId: id
}
});
window.open(curRoute.href, "_blank");
} else if (type === '203') {
const curRoute = router.resolve({
path: "/marketSingleCaseLayout/overview",
query: {
id: "203",
searchId: id
}
});
window.open(curRoute.href, "_blank");
} else if (type === '301') {
const curRoute = router.resolve({
path: "/marketSingleCaseLayout/overview",
query: {
id: "301",
searchId: id
}
});
window.open(curRoute.href, "_blank");
}
//type=涉军企业和SDN未对接
}
const handleSwithCurNews = name => { const handleSwithCurNews = name => {
if (name === "left") { if (name === "left") {
carouselRef.value.prev(); carouselRef.value.prev();
...@@ -404,12 +482,37 @@ const handleSwithCurNews = name => { ...@@ -404,12 +482,37 @@ const handleSwithCurNews = name => {
carouselRef.value.next(); carouselRef.value.next();
} }
}; };
const riskSignalsRef = ref(null); // 引用risk-signals容器
let intervalId;
onMounted(async () => { onMounted(async () => {
await handleGetLatestRiskUpdates() await handleGetLatestRiskUpdates()
await handleGetLatestRisks() await handleGetLatestRisks()
console.log("页面加载完成,可以获取数据了"); const scrollInterval = 2000; // 每隔2秒滚动一次
let currentScroll = 0;
intervalId = setInterval(() => {
if (riskSignalsRef.value) {
const scrollHeight = riskSignalsRef.value.scrollHeight; // 内容总高度
const clientHeight = riskSignalsRef.value.clientHeight; // 可视区域高度
console.log(scrollHeight, clientHeight)
// 如果滚动到底,则回到顶部
if (currentScroll + clientHeight >= scrollHeight) {
currentScroll = 0;
riskSignalsRef.value.scrollTop = currentScroll;
} else {
currentScroll += 10; // 调整这个值可以改变滚动速度
riskSignalsRef.value.scrollTop = currentScroll;
}
}
}, scrollInterval);
});
onUnmounted(() => {
clearInterval(intervalId); // 清除定时器
}); });
// onBeforeUnmount(() => { // onBeforeUnmount(() => {
// andleGetLatestRiskUpdates() // andleGetLatestRiskUpdates()
...@@ -785,32 +888,29 @@ onMounted(async () => { ...@@ -785,32 +888,29 @@ onMounted(async () => {
.title-text { .title-text {
/* 美国白宫发布关于进一步延长TikTok执法宽限期的行政令 */ /* 美国白宫发布关于进一步延长TikTok执法宽限期的行政令 */
width: 547px; width: 547px;
height: 26px; // height: 26px;
} }
.title-tag { .title-tag {
/* 容器 1563 */ /* 移除固定 width */
width: 190px;
height: 30px; height: 30px;
margin-top: 12px; padding: 0 12px;
/* 自动布局 */ /* 左右内边距控制最小宽度 */
display: flex; display: inline-flex;
flex-direction: row; /* ✅ 关键:inline + flex */
justify-content: flex-start; justify-content: center;
align-items: flex-start; /* 水平居中 */
gap: 10; align-items: center;
padding: 0px 12px 0px 12px; /* 垂直居中 */
border-radius: 20px; border-radius: 20px;
background: rgba(206, 79, 81, 0.1); background: rgba(206, 79, 81, 0.1);
color: rgba(206, 79, 81, 1); color: rgba(206, 79, 81, 1);
font-family: Microsoft YaHei; font-family: Microsoft YaHei;
font-style: Regular;
font-size: 16px; font-size: 16px;
font-weight: 400; font-weight: 400;
line-height: 30px; white-space: nowrap;
letter-spacing: 0px; /* 防止文字换行 */
text-align: justify; box-sizing: border-box;
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论