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

合并分支 'dev_hhq' 到 'master'

Dev hhq 查看合并请求 !105
import request from "@/api/request.js";
// 中美博弈概览V2:最新风险动态统计
export function getLatestRiskUpdates(params) {
return request({
method: 'GET',
url: `/api/rivalryIndexV2/LatestRiskUpdates`,
params: params
})
}
// 中美博弈概览V2:最新风险信号
export function getLatestRisks() {
return request({
method: 'GET',
url: `/api/rivalryIndexV2/LatestRisks`,
})
}
// 中美博弈概览V2:美对华制裁措施数量趋势
export function geDomainContainmentTrend(params) {
return request({
method: 'GET',
url: `/api/rivalryIndexV2/DomainContainmentTrend`,
params: params
})
}
// 中美博弈概况:获取榜单字典
export function getChartDict() {
return request({
method: 'GET',
url: `/api/union/summary/chartDict`,
})
}
// 中美博弈概况:中美科技实力对比
export function getCompare(id) {
return request({
method: 'GET',
url: `/api/union/summary/compare/${id}`,
})
}
// 中美博弈分析
export function getTechnologyGameAnalysis() {
return request({
method: 'GET',
url: `/api/rivalryIndexV2/TechnologyGameAnalysis`,
})
}
//中美博弈概览V7:美国政府部门对华制裁最新动态
export function getGovernmentSanctionsDynamics() {
return request({
method: 'GET',
url: `/api/rivalryIndex/governmentSanctionsDynamics`,
})
}
\ No newline at end of file
...@@ -20,13 +20,8 @@ ...@@ -20,13 +20,8 @@
</div> </div>
</div> </div>
<img :src="leftBtn" alt="" class="left-btn" @click="prev" :class="{ disabled: currentIndex === 0 }" /> <img :src="leftBtn" alt="" class="left-btn" @click="prev" :class="{ disabled: currentIndex === 0 }" />
<img <img :src="rightBtn" alt="" class="right-btn" @click="next"
:src="rightBtn" :class="{ disabled: currentIndex >= cardList.length - 5 }" />
alt=""
class="right-btn"
@click="next"
:class="{ disabled: currentIndex >= cardList.length - 5 }"
/>
</div> </div>
<div class="main-charts"> <div class="main-charts">
<div class="charts-title"> <div class="charts-title">
...@@ -35,13 +30,15 @@ ...@@ -35,13 +30,15 @@
<span>美对华制裁措施数量趋势</span> <span>美对华制裁措施数量趋势</span>
</div> </div>
<div class="title-right"> <div class="title-right">
<el-select v-model="fieldValue" placeholder="全部领域" class="custom-select" @change="getUSChinaSanctionTrendData"> <el-select v-model="fieldValue" placeholder="全部领域" class="custom-select"
@change="getUSChinaSanctionTrendData">
<el-option v-for="item in fieldOptions" :key="item.value" :label="item.label" :value="item.value" /> <el-option v-for="item in fieldOptions" :key="item.value" :label="item.label" :value="item.value" />
</el-select> </el-select>
<el-select v-model="deptValue" placeholder="全部部门" class="custom-select" @change="getUSChinaSanctionTrendData"> <el-select v-model="deptValue" placeholder="全部部门" class="custom-select" @change="getUSChinaSanctionTrendData">
<el-option label="全部部门" value="" /> <el-option label="全部部门" value="" />
</el-select> </el-select>
<el-select v-model="methodValue" placeholder="全部制裁手段" class="custom-select" @change="getUSChinaSanctionTrendData"> <el-select v-model="methodValue" placeholder="全部制裁手段" class="custom-select"
@change="getUSChinaSanctionTrendData">
<el-option v-for="item in methodOptions" :key="item.value" :label="item.label" :value="item.value" /> <el-option v-for="item in methodOptions" :key="item.value" :label="item.label" :value="item.value" />
</el-select> </el-select>
</div> </div>
...@@ -64,13 +61,8 @@ ...@@ -64,13 +61,8 @@
<span class="item-title" @click="handleNewsClick(item)">{{ item.title }}</span> <span class="item-title" @click="handleNewsClick(item)">{{ item.title }}</span>
<span class="item-date">{{ item.date }} · {{ item.type }}</span> <span class="item-date">{{ item.date }} · {{ item.type }}</span>
</div> </div>
<el-tooltip <el-tooltip effect="dark" :content="item.content" popper-class="common-prompt-popper" placement="top"
effect="dark" :show-after="500">
:content="item.content"
popper-class="common-prompt-popper"
placement="top"
:show-after="500"
>
<div class="dynamic-item-body"> <div class="dynamic-item-body">
{{ item.content }} {{ item.content }}
</div> </div>
...@@ -94,13 +86,7 @@ ...@@ -94,13 +86,7 @@
<div class="ranking-header"> <div class="ranking-header">
<div class="header-left"> <div class="header-left">
<div class="dept-icons"> <div class="dept-icons">
<img <img v-for="(dept, dIndex) in rank.depts" :key="dIndex" :src="defaultImg" alt="" class="dept-icon" />
v-for="(dept, dIndex) in rank.depts"
:key="dIndex"
:src="defaultImg"
alt=""
class="dept-icon"
/>
</div> </div>
<span class="dept-names">{{ rank.depts.join(" / ") }}</span> <span class="dept-names">{{ rank.depts.join(" / ") }}</span>
</div> </div>
...@@ -114,13 +100,8 @@ ...@@ -114,13 +100,8 @@
<span class="item-type" :class="item.type === '法案' ? 'type-bill' : 'type-order'">{{ <span class="item-type" :class="item.type === '法案' ? 'type-bill' : 'type-order'">{{
item.type item.type
}}</span> }}</span>
<el-tooltip <el-tooltip effect="dark" :content="item.title" popper-class="common-prompt-popper" placement="top"
effect="dark" :show-after="500">
:content="item.title"
popper-class="common-prompt-popper"
placement="top"
:show-after="500"
>
<span class="item-title">{{ item.title }}</span> <span class="item-title">{{ item.title }}</span>
</el-tooltip> </el-tooltip>
</div> </div>
...@@ -171,13 +152,8 @@ ...@@ -171,13 +152,8 @@
<div class="light" :class="{ active: event.level === 'red', red: true }"></div> <div class="light" :class="{ active: event.level === 'red', red: true }"></div>
</div> </div>
</div> </div>
<el-tooltip <el-tooltip effect="dark" :content="event.content" popper-class="common-prompt-popper" placement="top"
effect="dark" :show-after="500">
:content="event.content"
popper-class="common-prompt-popper"
placement="top"
:show-after="500"
>
<div class="event-content">{{ event.content }}</div> <div class="event-content">{{ event.content }}</div>
</el-tooltip> </el-tooltip>
<div class="event-tags"> <div class="event-tags">
...@@ -212,7 +188,7 @@ import icon4 from "../../assets/icon4.png"; ...@@ -212,7 +188,7 @@ import icon4 from "../../assets/icon4.png";
import timelineBg from "../../assets/timeline.png"; import timelineBg from "../../assets/timeline.png";
import defaultImg from "../../../../assets/images/default-icon2.png"; import defaultImg from "../../../../assets/images/default-icon2.png";
// 传递接口 // 传递接口
import { getAllGovernmentList, getUSChinaSanctionTrend, getUSGovernmentLatestDynamic,getUSGovernmentJointSanctionRank,getUSGovernmentSanctionHistory } from "@/api/allGovernment.js"; import { getAllGovernmentList, getUSChinaSanctionTrend, getUSGovernmentLatestDynamic, getUSGovernmentJointSanctionRank, getUSGovernmentSanctionHistory } from "@/api/allGovernment.js";
const router = useRouter(); const router = useRouter();
...@@ -1102,10 +1078,12 @@ const prev = () => { ...@@ -1102,10 +1078,12 @@ const prev = () => {
.content-wrapper { .content-wrapper {
width: 1666px; width: 1666px;
height: 2132px; height: 2132px;
.main-content { .main-content {
width: 100%; width: 100%;
position: relative; position: relative;
margin-bottom: 16px; margin-bottom: 16px;
.cards-mask { .cards-mask {
width: 100%; width: 100%;
overflow: hidden; // 仅在这里隐藏超出部分,不影响外层的按钮 overflow: hidden; // 仅在这里隐藏超出部分,不影响外层的按钮
...@@ -1131,6 +1109,7 @@ const prev = () => { ...@@ -1131,6 +1109,7 @@ const prev = () => {
border: 1px solid rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.1);
box-shadow: 0 0 20px rgba(25, 69, 130, 0.1); box-shadow: 0 0 20px rgba(25, 69, 130, 0.1);
cursor: pointer; cursor: pointer;
.card-bg { .card-bg {
position: absolute; position: absolute;
top: 0; top: 0;
...@@ -1144,6 +1123,7 @@ const prev = () => { ...@@ -1144,6 +1123,7 @@ const prev = () => {
z-index: 0; z-index: 0;
opacity: 0.8; opacity: 0.8;
background-color: rgba(5, 33, 77, 0.7); // 调整为更明显的深蓝色 background-color: rgba(5, 33, 77, 0.7); // 调整为更明显的深蓝色
&::after { &::after {
content: ""; content: "";
position: absolute; position: absolute;
...@@ -1214,11 +1194,13 @@ const prev = () => { ...@@ -1214,11 +1194,13 @@ const prev = () => {
cursor: pointer; cursor: pointer;
z-index: 10; z-index: 10;
transition: opacity 0.3s; transition: opacity 0.3s;
&.disabled { &.disabled {
opacity: 0.3; opacity: 0.3;
cursor: not-allowed; cursor: not-allowed;
} }
} }
.right-btn { .right-btn {
width: 24px; width: 24px;
height: 48px; height: 48px;
...@@ -1229,12 +1211,14 @@ const prev = () => { ...@@ -1229,12 +1211,14 @@ const prev = () => {
cursor: pointer; cursor: pointer;
z-index: 10; z-index: 10;
transition: opacity 0.3s; transition: opacity 0.3s;
&.disabled { &.disabled {
opacity: 0.3; opacity: 0.3;
cursor: not-allowed; cursor: not-allowed;
} }
} }
} }
.main-charts { .main-charts {
width: 1601px; width: 1601px;
height: 500px; height: 500px;
...@@ -1244,6 +1228,7 @@ const prev = () => { ...@@ -1244,6 +1228,7 @@ const prev = () => {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
margin-bottom: 22px; margin-bottom: 22px;
.charts-title { .charts-title {
width: 100%; width: 100%;
height: 48px; height: 48px;
...@@ -1254,14 +1239,17 @@ const prev = () => { ...@@ -1254,14 +1239,17 @@ const prev = () => {
padding-right: 35px; padding-right: 35px;
box-sizing: border-box; box-sizing: border-box;
background: linear-gradient(180deg, rgba(231, 243, 255, 1) 0%, rgba(231, 243, 255, 0) 100%); background: linear-gradient(180deg, rgba(231, 243, 255, 1) 0%, rgba(231, 243, 255, 0) 100%);
.title-left { .title-left {
display: flex; display: flex;
align-items: center; align-items: center;
img { img {
width: 18px; width: 18px;
height: 18px; height: 18px;
margin-right: 14px; margin-right: 14px;
} }
span { span {
font-family: YouSheBiaoTiHei; font-family: YouSheBiaoTiHei;
font-size: 24px; font-size: 24px;
...@@ -1270,29 +1258,36 @@ const prev = () => { ...@@ -1270,29 +1258,36 @@ const prev = () => {
color: rgb(5, 95, 194); color: rgb(5, 95, 194);
} }
} }
.title-right { .title-right {
display: flex; display: flex;
height: 48px; height: 48px;
align-items: end; align-items: end;
gap: 12px; gap: 12px;
padding-right: 17px; padding-right: 17px;
.custom-select { .custom-select {
width: 160px; width: 160px;
:deep(.el-input) { :deep(.el-input) {
height: 32px; height: 32px;
.el-input__wrapper { .el-input__wrapper {
background-color: #fff; background-color: #fff;
box-shadow: 0 0 0 1px #dcdfe6 inset; box-shadow: 0 0 0 1px #dcdfe6 inset;
border-radius: 4px; border-radius: 4px;
padding: 0 12px; padding: 0 12px;
height: 32px; height: 32px;
&:hover { &:hover {
box-shadow: 0 0 0 1px #c0c4cc inset; box-shadow: 0 0 0 1px #c0c4cc inset;
} }
&.is-focus { &.is-focus {
box-shadow: 0 0 0 1px #409eff inset; box-shadow: 0 0 0 1px #409eff inset;
} }
} }
.el-input__inner { .el-input__inner {
font-family: "Microsoft YaHei"; font-family: "Microsoft YaHei";
font-size: 16px; font-size: 16px;
...@@ -1300,6 +1295,7 @@ const prev = () => { ...@@ -1300,6 +1295,7 @@ const prev = () => {
color: rgb(95, 101, 108); color: rgb(95, 101, 108);
height: 32px; height: 32px;
line-height: 24px; line-height: 24px;
&::placeholder { &::placeholder {
color: rgb(95, 101, 108); color: rgb(95, 101, 108);
} }
...@@ -1308,29 +1304,34 @@ const prev = () => { ...@@ -1308,29 +1304,34 @@ const prev = () => {
} }
} }
} }
.charts-content { .charts-content {
flex: 1; flex: 1;
width: 100%; width: 100%;
padding: 20px 40px 20px 40px; padding: 20px 40px 20px 40px;
box-sizing: border-box; box-sizing: border-box;
.chart-container { .chart-container {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
} }
} }
.main-text { .main-text {
width: 1601px; width: 1601px;
height: 700px; height: 700px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin-bottom: 16px; margin-bottom: 16px;
.text-item { .text-item {
width: 792px; width: 792px;
height: 700px; height: 700px;
border-radius: 10px; border-radius: 10px;
background-color: rgba(255, 255, 255, 0.65); background-color: rgba(255, 255, 255, 0.65);
box-shadow: 0 0 20px rgba(25, 69, 130, 0.1); box-shadow: 0 0 20px rgba(25, 69, 130, 0.1);
.text-item-title { .text-item-title {
width: 100%; width: 100%;
height: 48px; height: 48px;
...@@ -1340,11 +1341,13 @@ const prev = () => { ...@@ -1340,11 +1341,13 @@ const prev = () => {
padding-left: 17px; padding-left: 17px;
box-sizing: border-box; box-sizing: border-box;
background: linear-gradient(180deg, rgba(231, 243, 255, 1) 0%, rgba(231, 243, 255, 0) 100%); background: linear-gradient(180deg, rgba(231, 243, 255, 1) 0%, rgba(231, 243, 255, 0) 100%);
img { img {
width: 18px; width: 18px;
height: 18px; height: 18px;
margin-right: 14px; margin-right: 14px;
} }
span { span {
font-family: YouSheBiaoTiHei; font-family: YouSheBiaoTiHei;
font-size: 24px; font-size: 24px;
...@@ -1353,32 +1356,38 @@ const prev = () => { ...@@ -1353,32 +1356,38 @@ const prev = () => {
color: rgb(5, 95, 194); color: rgb(5, 95, 194);
} }
} }
.text-item-content { .text-item-content {
width: 100%; width: 100%;
height: 652px; height: 652px;
padding: 6px 27px 22px 27px; padding: 6px 27px 22px 27px;
box-sizing: border-box; box-sizing: border-box;
overflow-y: auto; overflow-y: auto;
.dynamic-item { .dynamic-item {
display: flex; display: flex;
padding: 16px 0; padding: 16px 0;
border-bottom: 1px solid rgba(0, 0, 0, 0.05); border-bottom: 1px solid rgba(0, 0, 0, 0.05);
&:last-child { &:last-child {
border-bottom: none; border-bottom: none;
} }
.item-icon { .item-icon {
width: 24px; width: 24px;
height: 24px; height: 24px;
margin-right: 12px; margin-right: 12px;
margin-top: 3px; margin-top: 3px;
} }
.item-right { .item-right {
flex: 1; flex: 1;
min-width: 0;
.dynamic-item-header { .dynamic-item-header {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: flex-start;
.item-title { .item-title {
cursor: pointer; cursor: pointer;
font-family: "Microsoft YaHei"; font-family: "Microsoft YaHei";
...@@ -1393,6 +1402,7 @@ const prev = () => { ...@@ -1393,6 +1402,7 @@ const prev = () => {
min-width: 0; min-width: 0;
margin-right: 12px; margin-right: 12px;
} }
.item-date { .item-date {
font-family: "Microsoft YaHei"; font-family: "Microsoft YaHei";
font-size: 16px; font-size: 16px;
...@@ -1403,6 +1413,7 @@ const prev = () => { ...@@ -1403,6 +1413,7 @@ const prev = () => {
white-space: nowrap; white-space: nowrap;
} }
} }
.dynamic-item-body { .dynamic-item-body {
font-family: "Microsoft YaHei"; font-family: "Microsoft YaHei";
font-size: 16px; font-size: 16px;
...@@ -1416,10 +1427,12 @@ const prev = () => { ...@@ -1416,10 +1427,12 @@ const prev = () => {
white-space: nowrap; white-space: nowrap;
cursor: pointer; cursor: pointer;
} }
.dynamic-item-tags { .dynamic-item-tags {
display: flex; display: flex;
gap: 8px; gap: 8px;
margin-top: 5px; margin-top: 5px;
.tag { .tag {
padding: 2px 8px; padding: 2px 8px;
border-radius: 4px; border-radius: 4px;
...@@ -1427,31 +1440,37 @@ const prev = () => { ...@@ -1427,31 +1440,37 @@ const prev = () => {
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
line-height: 20px; line-height: 20px;
&.tag-blue { &.tag-blue {
color: #2f79c4; color: #2f79c4;
background: rgba(47, 121, 196, 0.1); background: rgba(47, 121, 196, 0.1);
border: 1px solid rgba(47, 121, 196, 0.3); border: 1px solid rgba(47, 121, 196, 0.3);
} }
&.tag-green { &.tag-green {
color: #52c41a; color: #52c41a;
background: rgba(82, 196, 26, 0.1); background: rgba(82, 196, 26, 0.1);
border: 1px solid rgba(82, 196, 26, 0.3); border: 1px solid rgba(82, 196, 26, 0.3);
} }
&.tag-red { &.tag-red {
color: #fa541c; color: #fa541c;
background: rgba(250, 84, 28, 0.1); background: rgba(250, 84, 28, 0.1);
border: 1px solid rgba(250, 84, 28, 0.3); border: 1px solid rgba(250, 84, 28, 0.3);
} }
&.tag-orange { &.tag-orange {
color: #fa8c16; color: #fa8c16;
background: rgba(250, 140, 22, 0.1); background: rgba(250, 140, 22, 0.1);
border: 1px solid rgba(250, 140, 22, 0.3); border: 1px solid rgba(250, 140, 22, 0.3);
} }
&.tag-purple { &.tag-purple {
color: #722ed1; color: #722ed1;
background: rgba(114, 46, 209, 0.1); background: rgba(114, 46, 209, 0.1);
border: 1px solid rgba(114, 46, 209, 0.3); border: 1px solid rgba(114, 46, 209, 0.3);
} }
&.tag-cyan { &.tag-cyan {
color: #13c2c2; color: #13c2c2;
background: rgba(19, 194, 194, 0.1); background: rgba(19, 194, 194, 0.1);
...@@ -1462,12 +1481,14 @@ const prev = () => { ...@@ -1462,12 +1481,14 @@ const prev = () => {
} }
} }
} }
.text-item-contentOther { .text-item-contentOther {
width: 100%; width: 100%;
height: 652px; height: 652px;
padding: 10px 30px 22px 27px; padding: 10px 30px 22px 27px;
box-sizing: border-box; box-sizing: border-box;
overflow-y: auto; overflow-y: auto;
.ranking-card { .ranking-card {
width: 100%; width: 100%;
border-radius: 10px; border-radius: 10px;
...@@ -1475,29 +1496,36 @@ const prev = () => { ...@@ -1475,29 +1496,36 @@ const prev = () => {
padding: 12px 24px; padding: 12px 24px;
margin-bottom: 12px; margin-bottom: 12px;
box-sizing: border-box; box-sizing: border-box;
&:last-child { &:last-child {
margin-bottom: 0; margin-bottom: 0;
} }
.ranking-header { .ranking-header {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
margin-bottom: 12px; margin-bottom: 12px;
.header-left { .header-left {
display: flex; display: flex;
align-items: center; align-items: center;
.dept-icons { .dept-icons {
display: flex; display: flex;
margin-right: 12px; margin-right: 12px;
.dept-icon { .dept-icon {
width: 24px; width: 24px;
height: 24px; height: 24px;
margin-right: -8px; // 图标叠加效果 margin-right: -8px; // 图标叠加效果
&:last-child { &:last-child {
margin-right: 0; margin-right: 0;
} }
} }
} }
.dept-names { .dept-names {
font-family: "Microsoft YaHei"; font-family: "Microsoft YaHei";
font-size: 16px; font-size: 16px;
...@@ -1506,6 +1534,7 @@ const prev = () => { ...@@ -1506,6 +1534,7 @@ const prev = () => {
color: rgb(59, 65, 75); color: rgb(59, 65, 75);
} }
} }
.header-right { .header-right {
.joint-count { .joint-count {
font-family: "Microsoft YaHei"; font-family: "Microsoft YaHei";
...@@ -1516,19 +1545,23 @@ const prev = () => { ...@@ -1516,19 +1545,23 @@ const prev = () => {
} }
} }
} }
.ranking-body { .ranking-body {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 8px; gap: 8px;
.ranking-item { .ranking-item {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
.item-left { .item-left {
display: flex; display: flex;
align-items: center; align-items: center;
flex: 1; flex: 1;
overflow: hidden; overflow: hidden;
.item-type { .item-type {
padding: 2px 8px; padding: 2px 8px;
border-radius: 4px; border-radius: 4px;
...@@ -1539,17 +1572,20 @@ const prev = () => { ...@@ -1539,17 +1572,20 @@ const prev = () => {
margin-right: 13px; margin-right: 13px;
white-space: nowrap; white-space: nowrap;
flex-shrink: 0; flex-shrink: 0;
&.type-bill { &.type-bill {
color: #2f79c4; color: #2f79c4;
background: rgba(47, 121, 196, 0.1); background: rgba(47, 121, 196, 0.1);
// border: 1px solid rgba(47, 121, 196, 0.3); // border: 1px solid rgba(47, 121, 196, 0.3);
} }
&.type-order { &.type-order {
color: #2f79c4; color: #2f79c4;
background: rgba(47, 121, 196, 0.1); background: rgba(47, 121, 196, 0.1);
// border: 1px solid rgba(47, 121, 196, 0.3); // border: 1px solid rgba(47, 121, 196, 0.3);
} }
} }
.item-title { .item-title {
font-family: "Microsoft YaHei"; font-family: "Microsoft YaHei";
font-size: 16px; font-size: 16px;
...@@ -1562,6 +1598,7 @@ const prev = () => { ...@@ -1562,6 +1598,7 @@ const prev = () => {
cursor: pointer; cursor: pointer;
} }
} }
.item-date { .item-date {
font-family: "Microsoft YaHei"; font-family: "Microsoft YaHei";
font-size: 16px; font-size: 16px;
...@@ -1575,16 +1612,19 @@ const prev = () => { ...@@ -1575,16 +1612,19 @@ const prev = () => {
} }
} }
} }
.text-item:last-child { .text-item:last-child {
padding-bottom: 22px; padding-bottom: 22px;
} }
} }
.main-bottom { .main-bottom {
width: 100%; width: 100%;
height: 700px; height: 700px;
border-radius: 10px; border-radius: 10px;
background-color: rgba(255, 255, 255, 0.65); background-color: rgba(255, 255, 255, 0.65);
box-shadow: 0 0 20px rgba(25, 69, 130, 0.1); box-shadow: 0 0 20px rgba(25, 69, 130, 0.1);
.bottom-item { .bottom-item {
width: 100%; width: 100%;
height: 48px; height: 48px;
...@@ -1595,14 +1635,17 @@ const prev = () => { ...@@ -1595,14 +1635,17 @@ const prev = () => {
padding-right: 35px; padding-right: 35px;
box-sizing: border-box; box-sizing: border-box;
background: linear-gradient(180deg, rgba(231, 243, 255, 1) 0%, rgba(231, 243, 255, 0) 100%); background: linear-gradient(180deg, rgba(231, 243, 255, 1) 0%, rgba(231, 243, 255, 0) 100%);
.bottom-item-title { .bottom-item-title {
display: flex; display: flex;
align-items: center; align-items: center;
img { img {
width: 18px; width: 18px;
height: 18px; height: 18px;
margin-right: 14px; margin-right: 14px;
} }
span { span {
font-family: YouSheBiaoTiHei; font-family: YouSheBiaoTiHei;
font-size: 24px; font-size: 24px;
...@@ -1611,11 +1654,13 @@ const prev = () => { ...@@ -1611,11 +1654,13 @@ const prev = () => {
color: rgb(5, 95, 194); color: rgb(5, 95, 194);
} }
} }
.bottom-item-select { .bottom-item-select {
display: flex; display: flex;
height: 48px; height: 48px;
align-items: end; align-items: end;
gap: 8px; gap: 8px;
.select-btn { .select-btn {
padding: 4px 16px; padding: 4px 16px;
border-radius: 4px; border-radius: 4px;
...@@ -1627,6 +1672,7 @@ const prev = () => { ...@@ -1627,6 +1672,7 @@ const prev = () => {
color: rgb(95, 101, 108); color: rgb(95, 101, 108);
cursor: pointer; cursor: pointer;
background-color: #fff; background-color: #fff;
// transition: all 0.3s; // transition: all 0.3s;
&.active { &.active {
color: rgb(5, 95, 194); color: rgb(5, 95, 194);
...@@ -1634,8 +1680,10 @@ const prev = () => { ...@@ -1634,8 +1680,10 @@ const prev = () => {
background-color: rgba(231, 243, 255, 1); background-color: rgba(231, 243, 255, 1);
} }
} }
.field-select { .field-select {
width: 160px; width: 160px;
:deep(.el-input) { :deep(.el-input) {
.el-input__wrapper { .el-input__wrapper {
height: 32px; height: 32px;
...@@ -1643,6 +1691,7 @@ const prev = () => { ...@@ -1643,6 +1691,7 @@ const prev = () => {
box-sizing: border-box; box-sizing: border-box;
background-color: transparent; background-color: transparent;
border-radius: 4px; border-radius: 4px;
.el-input__inner { .el-input__inner {
height: 32px; height: 32px;
line-height: 32px; line-height: 32px;
...@@ -1650,6 +1699,7 @@ const prev = () => { ...@@ -1650,6 +1699,7 @@ const prev = () => {
font-size: 16px; font-size: 16px;
font-weight: 400; font-weight: 400;
color: rgb(95, 101, 108); color: rgb(95, 101, 108);
&::placeholder { &::placeholder {
color: rgb(95, 101, 108); color: rgb(95, 101, 108);
} }
...@@ -1659,11 +1709,13 @@ const prev = () => { ...@@ -1659,11 +1709,13 @@ const prev = () => {
} }
} }
} }
.bottom-content { .bottom-content {
width: 100%; width: 100%;
height: calc(100% - 48px); height: calc(100% - 48px);
padding: 14px 23px 19px 23px; padding: 14px 23px 19px 23px;
box-sizing: border-box; box-sizing: border-box;
.timeline-container { .timeline-container {
width: 100%; width: 100%;
height: 100%; height: 100%;
...@@ -1679,9 +1731,11 @@ const prev = () => { ...@@ -1679,9 +1731,11 @@ const prev = () => {
overflow: auto; overflow: auto;
padding-right: 8px; padding-right: 8px;
padding-bottom: 8px; padding-bottom: 8px;
.dept-row { .dept-row {
display: flex; display: flex;
margin-bottom: 8px; margin-bottom: 8px;
&:last-child { &:last-child {
margin-bottom: 0; margin-bottom: 0;
} }
...@@ -1712,6 +1766,7 @@ const prev = () => { ...@@ -1712,6 +1766,7 @@ const prev = () => {
color: rgb(59, 65, 75); color: rgb(59, 65, 75);
line-height: 24px; line-height: 24px;
} }
.dept-count { .dept-count {
font-family: "Microsoft YaHei"; font-family: "Microsoft YaHei";
font-size: 16px; font-size: 16px;
...@@ -1728,18 +1783,23 @@ const prev = () => { ...@@ -1728,18 +1783,23 @@ const prev = () => {
align-items: center; align-items: center;
gap: 8px; gap: 8px;
overflow-x: auto; overflow-x: auto;
// 启用滚动条 // 启用滚动条
&::-webkit-scrollbar { &::-webkit-scrollbar {
height: 6px; /* 横向滚动条高度 */ height: 6px;
/* 横向滚动条高度 */
display: block; display: block;
} }
&::-webkit-scrollbar-thumb { &::-webkit-scrollbar-thumb {
background: rgba(0, 0, 0, 0.2); background: rgba(0, 0, 0, 0.2);
border-radius: 3px; border-radius: 3px;
} }
&::-webkit-scrollbar-track { &::-webkit-scrollbar-track {
background: transparent; background: transparent;
} }
scrollbar-width: thin; scrollbar-width: thin;
scrollbar-color: rgba(0, 0, 0, 0.2) transparent; scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
padding-bottom: 4px; // 给滚动条留出空间 padding-bottom: 4px; // 给滚动条留出空间
...@@ -1764,14 +1824,38 @@ const prev = () => { ...@@ -1764,14 +1824,38 @@ const prev = () => {
left: 0; left: 0;
width: 100%; width: 100%;
height: 3px; height: 3px;
&.line-blue { background-color: #2f79c4; }
&.line-green { background-color: rgb(33, 129, 57); } &.line-blue {
&.line-red { background-color: rgb(206, 79, 81); } background-color: #2f79c4;
&.line-orange { background-color: #fa8c16; } }
&.line-yellow { background-color: rgb(232, 189, 11); }
&.line-purple { background-color: #722ed1; } &.line-green {
&.line-cyan { background-color: #13c2c2; } background-color: rgb(33, 129, 57);
&.line-default { background-color: rgb(234, 236, 238); } }
&.line-red {
background-color: rgb(206, 79, 81);
}
&.line-orange {
background-color: #fa8c16;
}
&.line-yellow {
background-color: rgb(232, 189, 11);
}
&.line-purple {
background-color: #722ed1;
}
&.line-cyan {
background-color: #13c2c2;
}
&.line-default {
background-color: rgb(234, 236, 238);
}
} }
.event-header { .event-header {
...@@ -1804,9 +1888,11 @@ const prev = () => { ...@@ -1804,9 +1888,11 @@ const prev = () => {
&.green.active { &.green.active {
background-color: rgb(33, 129, 57); background-color: rgb(33, 129, 57);
} }
&.yellow.active { &.yellow.active {
background-color: rgb(232, 189, 11); background-color: rgb(232, 189, 11);
} }
&.red.active { &.red.active {
background-color: rgb(206, 79, 81); background-color: rgb(206, 79, 81);
} }
...@@ -1853,26 +1939,31 @@ const prev = () => { ...@@ -1853,26 +1939,31 @@ const prev = () => {
background: rgba(230, 244, 255, 1); background: rgba(230, 244, 255, 1);
border-color: rgba(186, 224, 255, 1); border-color: rgba(186, 224, 255, 1);
} }
&.tag-green { &.tag-green {
color: rgba(56, 158, 13, 1); color: rgba(56, 158, 13, 1);
background: rgba(246, 255, 237, 1); background: rgba(246, 255, 237, 1);
border-color: rgba(217, 247, 190, 1); border-color: rgba(217, 247, 190, 1);
} }
&.tag-red { &.tag-red {
color: rgba(245, 34, 45, 1); color: rgba(245, 34, 45, 1);
background: rgba(255, 241, 240, 1); background: rgba(255, 241, 240, 1);
border-color: rgba(255, 163, 158, 1); border-color: rgba(255, 163, 158, 1);
} }
&.tag-orange { &.tag-orange {
color: rgba(250, 140, 22, 1); color: rgba(250, 140, 22, 1);
background: rgba(255, 247, 230, 1); background: rgba(255, 247, 230, 1);
border-color: rgba(255, 213, 145, 1); border-color: rgba(255, 213, 145, 1);
} }
&.tag-purple { &.tag-purple {
color: rgba(114, 46, 209, 1); color: rgba(114, 46, 209, 1);
background: rgba(249, 240, 255, 1); background: rgba(249, 240, 255, 1);
border-color: rgba(211, 173, 247, 1); border-color: rgba(211, 173, 247, 1);
} }
&.tag-cyan { &.tag-cyan {
color: rgba(19, 194, 194, 1); color: rgba(19, 194, 194, 1);
background: rgba(230, 255, 251, 1); background: rgba(230, 255, 251, 1);
...@@ -1889,10 +1980,12 @@ const prev = () => { ...@@ -1889,10 +1980,12 @@ const prev = () => {
width: 100%; width: 100%;
height: 552px; height: 552px;
overflow-y: auto; overflow-y: auto;
&::-webkit-scrollbar { &::-webkit-scrollbar {
display: none; display: none;
} }
} }
.timelineBar { .timelineBar {
width: 100%; width: 100%;
height: 51px; height: 51px;
...@@ -1918,6 +2011,7 @@ const prev = () => { ...@@ -1918,6 +2011,7 @@ const prev = () => {
line-height: 30px !important; line-height: 30px !important;
color: #fff !important; color: #fff !important;
border: none !important; border: none !important;
.el-popper__arrow::before { .el-popper__arrow::before {
background-color: rgb(59, 65, 75) !important; background-color: rgb(59, 65, 75) !important;
border-color: rgb(59, 65, 75) !important; border-color: rgb(59, 65, 75) !important;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<div class="timeline-box"> <div class="timeline-box">
<div class="line" style="width:100vw ;" /> <div class="line" style="width:100vw ;" />
<!-- 一次性渲染全部节点 --> <!-- 一次性渲染全部节点 -->
<div v-for="(item, i) in data" :key="item[idKey]" class="node" :style="leftStyle(i)"> <div v-for="(item, i) in showList" :key="item[idKey]" class="node" :style="leftStyle(i)">
<!-- 圆环 --> <!-- 圆环 -->
<div class="dot" :class="linePos(item)" :style="{ '--i': item.unit === '中国' ? ' #E29697' : '#69A0DA' }" /> <div class="dot" :class="linePos(item)" :style="{ '--i': item.unit === '中国' ? ' #E29697' : '#69A0DA' }" />
...@@ -22,20 +22,21 @@ ...@@ -22,20 +22,21 @@
<!-- 卡片 --> <!-- 卡片 -->
<div class="card" :class="[cardPos(item), 'right-side']" @click="$emit('click-card', item)"> <div class="card" :class="[cardPos(item), 'right-side']" @click="$emit('click-card', item)">
<div style="justify-content: space-between;display: flex;width: 300px;"> <div style="justify-content: space-between;display: flex;width: 300px;">
<div class="tag">{{ item.tag }}</div> <div class="tag">{{ item.eventStrategy }}</div>
<img :src="`/icon/${item.unit}.png`" class="icon"></img> <img :src="item.eventCountryImg" class="icon"
style="border-radius: 14px;height: 28px;width: 28px;;"></img>
</div> </div>
<div class="title" :style="{ <div class="title" :style="{
}">{{ item.title }}</div> }">{{ item.eventName }}</div>
<div class="time">{{ item.time }}</div> <div class="time">{{ item.eventDate }}</div>
<!-- <div class="title" :style="{ <!-- <div class="title" :style="{
color: item.unit === '中国' ? ' #CF4F51' : '' color: item.unit === '中国' ? ' #CF4F51' : ''
}">{{ item.title }}</div> }">{{ item.title }}</div>
<div class="time">{{ item.time }}</div> --> <div class="time">{{ item.time }}</div> -->
<div class="content">{{ item.content }}</div> <div class="content">{{ item.eventDesc }}</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -85,7 +86,7 @@ export default { ...@@ -85,7 +86,7 @@ export default {
}, },
/* 卡片上下位置:unit=0 -> 下侧,其余 -> 上侧 */ /* 卡片上下位置:unit=0 -> 下侧,其余 -> 上侧 */
cardPos(item) { cardPos(item) {
return item.unit === '中国' ? 'down' : 'up'; return item.eventType === '反制措施' ? 'down' : 'up';
}, },
/* 延伸线方向 = 卡片方向 */ /* 延伸线方向 = 卡片方向 */
linePos(item) { linePos(item) {
...@@ -278,7 +279,7 @@ export default { ...@@ -278,7 +279,7 @@ export default {
width: 120px; width: 120px;
height: 28px; height: 28px;
/* 自动布局 */ /* 自动布局 */
display: flex; /* display: flex; */
flex-direction: row; flex-direction: row;
justify-content: flex-start; justify-content: flex-start;
align-items: flex-start; align-items: flex-start;
...@@ -303,7 +304,7 @@ export default { ...@@ -303,7 +304,7 @@ export default {
width: 120px; width: 120px;
height: 28px; height: 28px;
/* 自动布局 */ /* 自动布局 */
display: flex; /* display: flex; */
flex-direction: row; flex-direction: row;
justify-content: flex-start; justify-content: flex-start;
align-items: flex-start; align-items: flex-start;
...@@ -346,9 +347,23 @@ export default { ...@@ -346,9 +347,23 @@ export default {
line-height: 24px; line-height: 24px;
letter-spacing: 0px; letter-spacing: 0px;
text-align: justify; text-align: justify;
width: 300px;
/* 设置一个固定的宽度 */
height: 100px;
/* 设置一个固定的高度,确保只显示 5 行 */
font-size: 16px;
/* 设置字体大小 */
line-height: 20px;
/* 设置行高 */
overflow: hidden; overflow: hidden;
/* 隐藏超出部分 */
display: -webkit-box; display: -webkit-box;
/* 使用 Webkit 的 box 模型 */
-webkit-line-clamp: 3;
/* 限制为 5 行 */
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
-webkit-line-clamp: 6; /* 垂直排列内容 */
text-overflow: ellipsis;
/* 超出部分显示省略号 */
} }
</style> </style>
\ No newline at end of file
...@@ -9,18 +9,12 @@ ...@@ -9,18 +9,12 @@
<div style="display: flex; height: 650px; width: 100%"> <div style="display: flex; height: 650px; width: 100%">
<div style="width: 50%"> <div style="width: 50%">
<div <div
style=" style="display: flex; justify-content: space-between; margin-right: 50px; line-height: 32px;align-items: center;">
display: flex;
justify-content: space-between;
margin-right: 50px;
line-height: 32px;
align-items: center;
"
>
<div style="display: flex; margin-left: 50px"> <div style="display: flex; margin-left: 50px">
数据来源: 数据来源:
<el-select class="select-item" size="default" style="margin-left: 15px; width: 240px; height: 32px"> <el-select class="select-item" size="default" style="margin-left: 15px; width: 240px; height: 32px"
<el-option label="国家创新指数报告" value="last_year" /> v-model="origin" @change="handleGetCompare()">
<el-option :value="value.id" :label="value.name" v-for="value in originList" />
</el-select> </el-select>
</div> </div>
<div style="display: flex"> <div style="display: flex">
...@@ -33,30 +27,22 @@ ...@@ -33,30 +27,22 @@
<div style="width: 672px; height: 486px; padding-top: 50px" id="char"></div> <div style="width: 672px; height: 486px; padding-top: 50px" id="char"></div>
</div> </div>
<div style="width: 50%"> <div style="width: 50%; height: 620px;overflow: auto;">
<el-table :data="tableData" style="width: 100%; margin-bottom: 20px" row-key="id" border default-expand-all> <el-table :data="tableData" style="width: 100%; margin-bottom: 20px" row-key="id" border default-expand-all>
<el-table-column prop="name" label="指标名称" sortable width="350" /> <el-table-column prop="targetName" label="指标名称" sortable width="350" />
<el-table-column prop="percent" label="中国"> <el-table-column prop="chinaScore" label="中国">
<template #default="scope"> <template #default="scope">
<div class="progress-wrapper left" :style="{ '--i': '40px', '--j': '-20px', marginLeft: '20px' }"> <div class="progress-wrapper left" :style="{ '--i': '40px', '--j': '-20px', marginLeft: '20px' }">
<el-progress <el-progress :percentage="scope.row.chinaScore" :stroke-width="20" class="left-progress"
:percentage="scope.row.percent[0]" :show-text="false" />
:stroke-width="20"
class="left-progress"
:show-text="false"
/>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="percent" label="美国"> <el-table-column prop="usScore" label="美国">
<template #default="scope"> <template #default="scope">
<div class="progress-wrapper right" :style="{ '--i': '40px', marginRight: '20px' }"> <div class="progress-wrapper right" :style="{ '--i': '40px', marginRight: '20px' }">
<el-progress <el-progress :percentage="scope.row.usScore" :stroke-width="20" class="right-progress"
:percentage="scope.row.percent[0]" :show-text="false" />
:stroke-width="20"
class="right-progress"
:show-text="false"
/>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
...@@ -74,19 +60,13 @@ ...@@ -74,19 +60,13 @@
</div> </div>
</div> </div>
<div class="btn-box"> <div class="btn-box">
<div <div v-for="(value, index) in btnList" class="btn-item" :style="{
v-for="(value, index) in btnList"
class="btn-item"
:style="{
background: value.background background: value.background
}" }">
>
<img :src="`/public/icon/ZM/btn-icon-${index}.png`" style="width: 22px; height: 19px; margin: 0 22px" /> <img :src="`/public/icon/ZM/btn-icon-${index}.png`" style="width: 22px; height: 19px; margin: 0 22px" />
{{ value.text }} {{ value.text }}
<img <img :src="`/public/icon/ZM/btn-icon-arrow.png`"
:src="`/public/icon/ZM/btn-icon-arrow.png`" style="margin-left: auto; margin-right: 22px; width: 13px; height: 12px" />
style="margin-left: auto; margin-right: 22px; width: 13px; height: 12px"
/>
</div> </div>
</div> </div>
</div> </div>
...@@ -98,12 +78,9 @@ import * as echarts from "echarts"; ...@@ -98,12 +78,9 @@ import * as echarts from "echarts";
import Timeline from "./Timeline.vue"; import Timeline from "./Timeline.vue";
import tableShow from "./tableShow.vue"; import tableShow from "./tableShow.vue";
import {
getTechnologyGameAnalysis,
getDomainContainmentRanking,
getDomainContainmentTimeline
} from "@/api/zmOverview/allDomains";
import radarChart from "./radarChart3.js"; import radarChart from "./radarChart3.js";
import { getCompare, getChartDict, getTechnologyGameAnalysis } from '@/api/zmOverview/risk/index.js'
const course = ref([ const course = ref([
{ {
time: "2025-01-15", time: "2025-01-15",
...@@ -158,75 +135,86 @@ const course = ref([ ...@@ -158,75 +135,86 @@ const course = ref([
} }
]); ]);
// 处理时间线数据的方法 const originList = ref([])
const processTimelineData = rawData => { const origin = ref('')
if (!rawData || !Array.isArray(rawData) || rawData.length === 0) { //数据来源
return []; const handleGetChartDict = async () => {
}
return rawData.map(item => {
// 根据eventType确定unit值
let unit = "";
if (item.eventType === "反制措施") {
unit = "中国";
} else if (item.eventType === "行政令") {
unit = "美国";
} else {
// 如果有其他类型,可以根据需要设定默认值或保持原有值
unit = item.eventOrg || ""; // 使用eventOrg作为备选
}
return {
time: item.eventDate || "",
title: item.eventName || "",
content: item.eventDesc || "",
unit: unit,
tag: item.eventStrategy || "",
// 保留其他原始字段
eventId: item.eventId,
eventOrg: item.eventOrg,
eventType: item.eventType,
eventCountryImg: item.eventCountryImg
};
});
};
// 获取技术博弈分析数据
const handleGetTechnologyGameAnalysis = async () => {
try { try {
const res = await getTechnologyGameAnalysis();
console.log("技术博弈分析数据", res);
const res = await getChartDict();
console.log("数据来源", res);
if (res.code === 200 && res.data) { if (res.code === 200 && res.data) {
// 处理返回的数据结构 originList.value = res.data
const processedData = processTimelineData(res.data); origin.value = res.data[0].id
course.value = processedData;
} }
} catch (error) { } catch (error) {
console.error("获取技术博弈分析数据失败:", error); console.error("获取数据来源error", error);
// 设置默认空数组
course.value = [];
} }
}; };
//中美科技实力对比
const handleGetCompare = async () => {
try {
onMounted(() => { const res = await getCompare(origin.value);
console.log("中美科技实力对比", res);
if (res.code === 200 && res.data) {
tableData.value = res.data
const secondLevelData = res.data[0].children;
const indicatorNames = secondLevelData.map(item => item.targetName);
const chinaScores = secondLevelData.map(item => item.chinaScore);
const usScores = secondLevelData.map(item => item.usScore);
const dom = document.getElementById("char"); const dom = document.getElementById("char");
const myChart = echarts.init(dom); const myChart = echarts.init(dom);
const radarOption = {
// 2. 传入容器,生成配置 indicatorNames: indicatorNames,
const option = radarChart( data: [
["创新资源", "知识创造", "企业创新", "创新绩效", "创新环境"], chinaScores,
[ usScores
[4200, 3000, 20000, 35000, 50000, 18000],
[1000, 42000, 32000, 35000, 50000, 18000]
] ]
};
const option = radarChart(
radarOption.indicatorNames, radarOption.data
); );
myChart.setOption(option); myChart.setOption(option);
console.log(radarOption)
}
} catch (error) {
console.error("获取中美科技实力对比error", error);
}
};
//中美博弈概览V2:领域打压遏制时间线
const handlegetTechnologyGameAnalysis = async () => {
try {
// setChart(option, "char7"); const res = await getTechnologyGameAnalysis();
// 获取时间线数据 console.log("中美科技博弈分析", res);
handleGetTechnologyGameAnalysis(); if (res.code === 200 && res.data) {
course.value = res.data
}
} catch (error) {
console.error("获取中美科技博弈分析error", error);
}
};
onMounted(async () => {
await handleGetChartDict()
await handleGetCompare()
await handlegetTechnologyGameAnalysis()
// const dom = document.getElementById("char");
// const myChart = echarts.init(dom);
// // 2. 传入容器,生成配置
// const option = radarChart(
// ["创新资源", "知识创造", "企业创新", "创新绩效", "创新环境"],
// [
// [4200, 3000, 20000, 35000, 50000, 18000],
// [1000, 42000, 32000, 35000, 50000, 18000]
// ]
// );
// myChart.setOption(option);
// // setChart(option, "char7");
}); });
const tableData = ref([ const tableData = ref([
...@@ -348,6 +336,7 @@ const btnList = ref([ ...@@ -348,6 +336,7 @@ const btnList = ref([
width: 1600px; width: 1600px;
height: 1600px; height: 1600px;
margin: 0 auto; margin: 0 auto;
.card-box { .card-box {
width: 1600px; width: 1600px;
height: 700px; height: 700px;
......
...@@ -34,7 +34,7 @@ let instance = null ...@@ -34,7 +34,7 @@ let instance = null
/* 配置项 */ /* 配置项 */
const makeOption = () => { const makeOption = () => {
const p = Math.min(100, Math.max(0, props.percent)) / 100 const p = Math.min(100, Math.max(0, props.percent)) / 100
console.log(props.color, 'colorcolorcolor') // console.log(props, 'colorcolorcolor')
return { return {
series: [{ series: [{
type: 'liquidFill', type: 'liquidFill',
...@@ -73,8 +73,8 @@ const makeOption = () => { ...@@ -73,8 +73,8 @@ const makeOption = () => {
formatter: function () { formatter: function () {
const change = props.data.change; const change = props.data.change;
const unit = props.data.unit; const unit = props.data.unit;
if (change === '无新增') { if (change === 0) {
return `{noChange|${change}}\n{b|共${props.data.count}${unit}}` return `{num|${'无新增'}}`
} }
return `{num|${change}}{unit| ${unit}}\n{b|共${props.data.count}${unit}}` return `{num|${change}}{unit| ${unit}}\n{b|共${props.data.count}${unit}}`
}, },
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
{{ sections[index].title }} {{ sections[index].title }}
</div> </div>
<div style="width: 50px; color: #ffffff"> <div style="width: 50px; color: #ffffff">
{{ sections[index].date }} {{ sections[index].date.slice(-5) }}
</div> </div>
</div> </div>
</div> </div>
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<img class="section-title" src="./icon/title-icon-2.png" /> <img class="section-title" src="./icon/title-icon-2.png" />
<div>风险信号</div> <div>风险信号</div>
<div class="num">12</div> <div class="num">{{ riskTotal }}</div>
<div class="manage-btn" @click="handleToRiskManage"> <div class="manage-btn" @click="handleToRiskManage">
风险信号管理 > 风险信号管理 >
</div> </div>
...@@ -74,22 +74,22 @@ ...@@ -74,22 +74,22 @@
<div class="carousel-title"> <div class="carousel-title">
<div> <div>
<div class="title-text"> <div class="title-text">
{{ News.title }} {{ News.hotspotTitle }}
</div> </div>
<div class="title-tag"> <div class="title-tag">
{{ News.category }} {{ News.hotspotType }}
</div> </div>
</div> </div>
<img src="./icon/矩形 295.png" style="width: 96px; height: 96px" /> <img :src="News.hotspotPicture" style="width: 96px; height: 96px" />
</div> </div>
<div style="/* 矩形 351 */ width: 664px; height: 1px; background: rgba(234, 236, 238, 1)"></div> <div style="/* 矩形 351 */ width: 664px; height: 1px; background: rgba(234, 236, 238, 1)"></div>
<div class="news-carousel-content">{{ News.content }}</div> <div class="news-carousel-content">{{ News.hotspotDesc }}</div>
<div class="carousel-bottom"> <div class="carousel-bottom">
<div class="left">{{ News.date + News.source }}</div> <div class="left">{{ News.hotspotDate + News.hotspotOrgName }}</div>
<div class="right"> <div class="right">
<div v-for="tag in News.tags" class="tag"> <div v-for="tag in News.domainList" class="tag">
{{ tag }} {{ tag.name }}
</div> </div>
</div> </div>
</div> </div>
...@@ -105,9 +105,10 @@ ...@@ -105,9 +105,10 @@
<script setup> <script setup>
import { color } from "echarts"; import { color } from "echarts";
import { onMounted, ref, computed } from "vue"; import { onMounted, ref, computed, onBeforeUnmount } from "vue";
import WaveBall from "./WaveBall.vue"; import WaveBall from "./WaveBall.vue";
import { getBillRiskSignal } from "@/api/bill/billHome"; import { getBillRiskSignal } from "@/api/bill/billHome";
import { getLatestRiskUpdates, getLatestRisks } from '@/api/zmOverview/risk/index.js'
const sectionTab = [ const sectionTab = [
{ {
textColor: "rgba(9, 88, 217, 1)", textColor: "rgba(9, 88, 217, 1)",
...@@ -148,14 +149,14 @@ const sections = ref([ ...@@ -148,14 +149,14 @@ const sections = ref([
date: "12-18", date: "12-18",
waveBall: [ waveBall: [
{ {
percent: 30, // 估算的百分比 percent: 0, // 估算的百分比
count: 1626, count: 1626,
change: "+3", change: "+3",
unit: "项", unit: "项",
title: "法案(提出)" title: "法案(提出)"
}, },
{ {
percent: 20, // 估算的百分比 percent: 0, // 估算的百分比
count: 69, count: 69,
change: "+2", change: "+2",
unit: "个", unit: "个",
...@@ -168,14 +169,14 @@ const sections = ref([ ...@@ -168,14 +169,14 @@ const sections = ref([
date: "12-19", date: "12-19",
waveBall: [ waveBall: [
{ {
percent: 10, // 估算的百分比 percent: 0, // 估算的百分比
count: 128, count: 128,
change: "+1", change: "+1",
unit: "次", unit: "次",
title: "实体清单" title: "实体清单"
}, },
{ {
percent: 20, // 估算的百分比 percent: 0, // 估算的百分比
count: 69, count: 69,
change: "+1", change: "+1",
unit: "次", unit: "次",
...@@ -188,15 +189,15 @@ const sections = ref([ ...@@ -188,15 +189,15 @@ const sections = ref([
date: "12-15", date: "12-15",
waveBall: [ waveBall: [
{ {
percent: 15, // 估算的百分比 percent: 0, // 估算的百分比
count: 35, count: 0,
change: "+1", change: "+1",
unit: "次", unit: "次",
title: "SDN" title: "SDN"
}, },
{ {
percent: 5, // 估算的百分比 percent: 0, // 估算的百分比
count: 28, count: 0,
change: "+1", change: "+1",
unit: "家", unit: "家",
title: "涉军企业" title: "涉军企业"
...@@ -208,22 +209,22 @@ const sections = ref([ ...@@ -208,22 +209,22 @@ const sections = ref([
date: "12-15", date: "12-15",
waveBall: [ waveBall: [
{ {
percent: 3, // 估算的百分比 percent: 0, // 估算的百分比
count: 215, count: 0,
change: "+1", change: "+1",
unit: "次", unit: "次",
title: "337调查" title: "337调查"
}, },
{ {
percent: 3, // 估算的百分比 percent: 0, // 估算的百分比
count: 14, count: 0,
change: "无新增", change: "无新增",
unit: "次", unit: "次",
title: "230调查" title: "230调查"
}, },
{ {
percent: 3, // 估算的百分比 percent: 0, // 估算的百分比
count: 9, count: 0,
change: "无新增", change: "无新增",
unit: "次", unit: "次",
title: "301调查" title: "301调查"
...@@ -231,21 +232,117 @@ const sections = ref([ ...@@ -231,21 +232,117 @@ const sections = ref([
] ]
} }
]); ]);
// 风险信号
const warningList = ref([]); // 最新风险动态统计
// 获取法案风险信号 const handleGetLatestRiskUpdates = async () => {
const handlegetBillRiskSignal = async () => {
const params = {
moduleId: "0100"
};
try { try {
const res = await getBillRiskSignal(params); const params = {
console.log("法案风险信号", res); currentDate: '本周'
if (res.code === 200) { }
warningList.value = res.data; const res = await getLatestRiskUpdates(params);
console.log("最新风险动态统计", res);
if (res.code === 200 && res.data) {
sections.value = [
{
title: res.data.policiesRegulations.hotspotTitle,
date: res.data.policiesRegulations.hotspotDate,
waveBall: [
{
percent: 30, // 估算的百分比
count: res.data.bill.total,
change: res.data.bill.dailyIncrement,
unit: "项",
title: "法案(提出)"
},
{
percent: 20, // 估算的百分比
count: res.data.administrativeOrder.total,
change: res.data.administrativeOrder.dailyIncrement,
unit: "个",
title: "政令"
}
]
},
{
title: res.data.exportControl.hotspotTitle,
date: res.data.exportControl.hotspotDate,
waveBall: [
{
percent: 10, // 估算的百分比
count: res.data.Entities.total,
change: res.data.Entities.dailyIncrement,
unit: "次",
title: "实体清单"
},
{
percent: 20, // 估算的百分比
count: res.data.CCL.total,
change: res.data.CCL.dailyIncrement,
unit: "次",
title: "CCL"
}
]
},
{
title: res.data.investmentFinancingRestrictions.hotspotTitle,
date: res.data.investmentFinancingRestrictions.hotspotDate,
waveBall: [
{
percent: 15, // 估算的百分比
count: res.data.SDN.total,
change: res.data.SDN.dailyIncrement,
unit: "次",
title: "SDN"
},
{
percent: 5, // 估算的百分比
count: res.data.militaryInvolvement.total,
change: res.data.militaryInvolvement.dailyIncrement,
unit: "家",
title: "涉军企业"
}
]
},
{
title: res.data.marketAccess.hotspotTitle,
date: res.data.marketAccess.hotspotDate,
waveBall: [
{
percent: 3, // 估算的百分比
count: res.data['337Survey'].total,
change: res.data['337Survey'].dailyIncrement,
unit: "次",
title: "337调查"
},
{
percent: 3, // 估算的百分比
count: res.data['232Survey'].total,
change: res.data['232Survey'].dailyIncrement,
unit: "次",
title: "230调查"
},
{
percent: 3, // 估算的百分比
count: res.data['301Survey'].total,
change: res.data['301Survey'].dailyIncrement,
unit: "次",
title: "301调查"
}
]
}
]
console.log(sections.value, 'sections.value')
}
} catch (error) {
console.error("获取最新风险动态统计error", error);
} }
} catch (error) { }
}; };
// 风险信号
const warningList = ref([]);
const riskTotal = ref(0)
const hotNewsList = ref([ const hotNewsList = ref([
{ {
title: "美国白宫发布关于进一步延长TikTok执法宽限期的行政令", title: "美国白宫发布关于进一步延长TikTok执法宽限期的行政令",
...@@ -266,6 +363,24 @@ const hotNewsList = ref([ ...@@ -266,6 +363,24 @@ const hotNewsList = ref([
tags: ['人工智能', '通信网络'] tags: ['人工智能', '通信网络']
} }
]); ]);
//最新风险信号
const handleGetLatestRisks = async () => {
try {
const res = await getLatestRisks();
console.log("最新风险信号", res);
if (res.code === 200 && res.data) {
warningList.value = res.data.riskVOS
hotNewsList.value = res.data.hotspotVOS
riskTotal.value = res.data.riskCount
console.log(hotNewsList.value, 'hotNewsList.value')
}
} catch (error) {
console.error("获取最新风险信号error", error);
}
};
const curNews = ref({}); const curNews = ref({});
const carouselRef = ref(null); const carouselRef = ref(null);
const curHotNewsListIndex = ref(0); const curHotNewsListIndex = ref(0);
...@@ -289,11 +404,16 @@ const handleSwithCurNews = name => { ...@@ -289,11 +404,16 @@ const handleSwithCurNews = name => {
carouselRef.value.next(); carouselRef.value.next();
} }
}; };
onMounted(() => { onMounted(async () => {
// 这里可以添加从后端获取数据的代码
handlegetBillRiskSignal(); await handleGetLatestRiskUpdates()
await handleGetLatestRisks()
console.log("页面加载完成,可以获取数据了"); console.log("页面加载完成,可以获取数据了");
}); });
// onBeforeUnmount(() => {
// andleGetLatestRiskUpdates()
// });
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
...@@ -344,6 +464,7 @@ onMounted(() => { ...@@ -344,6 +464,7 @@ onMounted(() => {
text-align: left; text-align: left;
display: flex; display: flex;
align-items: center; align-items: center;
img { img {
/* 矢量 347 */ /* 矢量 347 */
width: 22px; width: 22px;
...@@ -375,8 +496,10 @@ onMounted(() => { ...@@ -375,8 +496,10 @@ onMounted(() => {
} }
.manage-btn { .manage-btn {
margin-left: auto; /* 推到最右侧 */ margin-left: auto;
margin-right: 16px; /* 适当的右边距 */ /* 推到最右侧 */
margin-right: 16px;
/* 适当的右边距 */
padding: 4px 12px; padding: 4px 12px;
border-radius: 20px; border-radius: 20px;
background-color: rgba(206, 79, 81, 0.1); background-color: rgba(206, 79, 81, 0.1);
...@@ -430,7 +553,7 @@ onMounted(() => { ...@@ -430,7 +553,7 @@ onMounted(() => {
font-style: Bold; font-style: Bold;
font-size: 20px; font-size: 20px;
font-weight: 700; font-weight: 700;
line-height: 26px; // line-height: 26px;
letter-spacing: 0px; letter-spacing: 0px;
text-align: center; text-align: center;
display: flex; display: flex;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论