提交 db41f3c5 authored 作者: 张伊明's avatar 张伊明

Merge branch 'master' of http://8.140.26.4:10003/caijian/risk-monitor into zym-dev

...@@ -19,6 +19,7 @@ node_modules ...@@ -19,6 +19,7 @@ node_modules
# Build outputs # Build outputs
dist dist
dist.rar dist.rar
dist.zip
dist-ssr dist-ssr
*.local *.local
......
差异被折叠。
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
"author": "", "author": "",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@antv/g6": "^4.8.24",
"@element-plus/icons-vue": "^2.3.1", "@element-plus/icons-vue": "^2.3.1",
"@kangc/v-md-editor": "^2.3.18", "@kangc/v-md-editor": "^2.3.18",
"@microsoft/fetch-event-source": "^2.0.1", "@microsoft/fetch-event-source": "^2.0.1",
......
<template> <template>
<div class="search-container" v-show="!isShow"> <div class="search-container" v-show="!isShow">
<div class="search-type-tabs" v-if="enableBillTypeSwitch"> <div class="search-type-tabs" v-if="enableBillTypeSwitch">
<div class="search-type-tab" :class="{ active: billSearchType === 'federal' }" <div
@click="handleChangeBillSearchType('federal')"> class="search-type-tab"
:class="{ active: billSearchType === 'federal' }"
@click="handleChangeBillSearchType('federal')"
>
联邦议会 联邦议会
</div> </div>
<div class="search-type-tab" :class="{ active: billSearchType === 'state' }" <div
@click="handleChangeBillSearchType('state')"> class="search-type-tab"
:class="{ active: billSearchType === 'state' }"
@click="handleChangeBillSearchType('state')"
>
州议会 州议会
</div> </div>
</div> </div>
<div class="search-main" :class="{ 'search-main-with-tabs': enableBillTypeSwitch }"> <div class="search-main" :class="{ 'search-main-with-tabs': enableBillTypeSwitch }">
<input v-model="store.searchBillText" :placeholder="placeholder" @keyup.enter="handleSearch" <input v-model="store.searchBillText" :placeholder="placeholder" @keyup.enter="handleSearch" class="search-input" />
class="search-input" />
<div class="search-btn" @click="handleSearch"> <div class="search-btn" @click="handleSearch">
<img src="@/assets/icons/search-icon.png" alt /> <img src="@/assets/icons/search-icon.png" alt />
搜索 搜索
...@@ -32,7 +37,7 @@ ...@@ -32,7 +37,7 @@
</div> </div>
</div> </div>
<div class="btn" @click="handleToPosi('position2')"> <div class="btn" @click="handleToPosi('position2')">
<div class="btn-text">咨询要闻</div> <div class="btn-text">资讯要闻</div>
<div class="btn-icon"> <div class="btn-icon">
<img src="@/assets/icons/arrow-right-icon.png" alt /> <img src="@/assets/icons/arrow-right-icon.png" alt />
</div> </div>
...@@ -62,14 +67,7 @@ import { useWrittingAsstaintStore } from "@/stores/writtingAsstaintStore"; ...@@ -62,14 +67,7 @@ import { useWrittingAsstaintStore } from "@/stores/writtingAsstaintStore";
const store = useWrittingAsstaintStore(); const store = useWrittingAsstaintStore();
const router = useRouter(); const router = useRouter();
const { const { countInfo, containerRef, placeholder, areaName, enableBillTypeSwitch, defaultBillSearchType } = defineProps({
countInfo,
containerRef,
placeholder,
areaName,
enableBillTypeSwitch,
defaultBillSearchType
} = defineProps({
countInfo: { countInfo: {
type: Array, type: Array,
default: () => [] default: () => []
...@@ -138,11 +136,9 @@ watchEffect(() => { ...@@ -138,11 +136,9 @@ watchEffect(() => {
if (isShow.value) { if (isShow.value) {
homeMainRef.value.classList.add("scroll-main"); homeMainRef.value.classList.add("scroll-main");
homeMainRef.value.classList.add("scrollHomeMain"); homeMainRef.value.classList.add("scrollHomeMain");
} else { } else {
homeMainRef.value.classList.remove("scroll-main"); homeMainRef.value.classList.remove("scroll-main");
homeMainRef.value.classList.remove("scrollHomeMain"); homeMainRef.value.classList.remove("scrollHomeMain");
} }
store.changeIsShowSearchBar(isShow.value); store.changeIsShowSearchBar(isShow.value);
......
...@@ -66,14 +66,14 @@ const handleClickToDetail = () => { ...@@ -66,14 +66,14 @@ const handleClickToDetail = () => {
display: flex; display: flex;
.header-icon { .header-icon {
width: 18px; width: 24px;
height: 18px; height: 24px;
margin-top: 13.7px; margin-top: 12px;
margin-left: 18.7px; margin-left: 17px;
} }
.header-title { .header-title {
margin-left: 21px; margin-left: 19px;
height: 48px; height: 48px;
padding: 0 16px; padding: 0 16px;
background: var(--color-main-active); background: var(--color-main-active);
......
...@@ -60,12 +60,12 @@ const props = defineProps({ ...@@ -60,12 +60,12 @@ const props = defineProps({
.header-icon { .header-icon {
width: 24px; width: 24px;
height: 24px; height: 24px;
margin-top: 12px; margin-top: 14px;
margin-left: 20px; margin-left: 19px;
} }
.header-title { .header-title {
margin-left: 16px; margin-left: 17px;
height: 48px; height: 48px;
color: var(--color-main-active); color: var(--color-main-active);
font-family: Source Han Sans CN; font-family: Source Han Sans CN;
......
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
<div class="box4"> <div class="box4">
<div class="box4-header"> <div class="box4-header">
<div class="header-icon"> <div class="header-icon">
<img src="./image1.png" alt="" /> <!-- <img src="./image1.png" alt="" /> -->
<img src="./message-icon.svg" alt="" />
</div> </div>
<div class="header-title"> <div class="header-title">
<slot name='title'>{{ "社交媒体" }}</slot> <slot name='title'>{{ "社交媒体" }}</slot>
......
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24.000000" height="24.000000" fill="none" customFrame="#000000">
<rect id="容器 1719" width="24.000000" height="24.000000" x="0.000000" y="0.000000" />
<path id="减去顶层" d="M16.9748 3.81112L16.9748 12.9003C16.9748 13.3866 16.6139 13.7103 16.0713 13.7103L6.11904 13.7103L2.5 16.9505L2.5 3.81112C2.5 3.32482 2.86074 3 3.40341 3L16.0713 3C16.614 3 16.9748 3.32482 16.9748 3.81112ZM7.02382 8.4C7.02382 7.90294 6.61874 7.5 6.11906 7.5C5.61937 7.5 5.21429 7.90294 5.21429 8.4C5.21429 8.89706 5.61937 9.3 6.11906 9.3C6.61874 9.3 7.02382 8.89706 7.02382 8.4ZM10.6428 8.4C10.6428 7.90294 10.2378 7.5 9.73807 7.5C9.23839 7.5 8.83331 7.90294 8.83331 8.4C8.83331 8.89706 9.23839 9.3 9.73807 9.3C10.2378 9.3 10.6428 8.89706 10.6428 8.4ZM13.3572 7.5C13.8568 7.5 14.2619 7.90294 14.2619 8.4C14.2619 8.89706 13.8568 9.3 13.3572 9.3C12.8575 9.3 12.4524 8.89706 12.4524 8.4C12.4524 7.90294 12.8575 7.5 13.3572 7.5ZM18.7843 8.04086L20.5952 8.04086C21.1364 8.04086 21.5 8.36507 21.5 8.85018L21.5 21L17.8809 17.7598L7.92723 17.7598C7.38459 17.7598 7.02242 17.4356 7.02242 16.9505L7.02242 15.3294L18.7843 15.3294L18.7843 8.04086Z" fill="rgb(5,95,194)" fill-rule="evenodd" />
</svg>
<template> <template>
<div class="box3"> <div class="news-wrapper">
<div class="box3-header"> <div class="news-header">
<div class="box3-header-left"> <div class="news-header-left">
<div class="box3-header-icon"> <div class="news-header-icon">
<img src="./image1.png" alt="" /> <img src="./news-icon.svg" alt="" />
</div> </div>
<div class="box3-header-title">{{ "新闻资讯" }}</div> <div class="news-header-title">{{ "新闻资讯" }}</div>
<div class="more" @click="handleToMoreNews">{{ "更多 +" }}</div> <div class="more" @click="handleToMoreNews">{{ "更多 +" }}</div>
</div> </div>
</div> </div>
<div class="box3-main"> <div class="news-main">
<div class="box3-item" v-for="(news, index) in newsList" :key="index" @click="handleToNewsAnalysis(news)"> <div class="news-item" v-for="(news, index) in newsList" :key="index" @click="handleToNewsAnalysis(news)">
<div class="left"> <div class="left">
<img :src="news[props.img] ? news[props.img] : DefaultIconNews" alt="" /> <img :src="news[props.img] ? news[props.img] : DefaultIconNews" alt="" />
</div> </div>
...@@ -63,7 +63,7 @@ const handleToNewsAnalysis = (item, index) => { ...@@ -63,7 +63,7 @@ const handleToNewsAnalysis = (item, index) => {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.box3 { .news-wrapper {
width: 792px !important; width: 792px !important;
height: 450px !important; height: 450px !important;
border-radius: 10px !important; border-radius: 10px !important;
...@@ -75,7 +75,7 @@ const handleToNewsAnalysis = (item, index) => { ...@@ -75,7 +75,7 @@ const handleToNewsAnalysis = (item, index) => {
overflow: hidden; overflow: hidden;
.box3-header { .news-header {
height: 48px !important; height: 48px !important;
border-bottom: 1px solid rgba(234, 236, 238, 1) !important; border-bottom: 1px solid rgba(234, 236, 238, 1) !important;
margin: 0 !important; margin: 0 !important;
...@@ -85,10 +85,10 @@ const handleToNewsAnalysis = (item, index) => { ...@@ -85,10 +85,10 @@ const handleToNewsAnalysis = (item, index) => {
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
.box3-header-left { .news-header-left {
display: flex !important; display: flex !important;
.box3-header-icon { .news-header-icon {
margin-left: 19px !important; margin-left: 19px !important;
margin-top: 14px !important; margin-top: 14px !important;
width: 24px !important; width: 24px !important;
...@@ -100,7 +100,7 @@ const handleToNewsAnalysis = (item, index) => { ...@@ -100,7 +100,7 @@ const handleToNewsAnalysis = (item, index) => {
} }
} }
.box3-header-title { .news-header-title {
margin-top: 11px !important; margin-top: 11px !important;
margin-left: 17px !important; margin-left: 17px !important;
height: 26px !important; height: 26px !important;
...@@ -127,13 +127,13 @@ const handleToNewsAnalysis = (item, index) => { ...@@ -127,13 +127,13 @@ const handleToNewsAnalysis = (item, index) => {
} }
} }
.box3-main { .news-main {
height: 401px; height: 401px;
overflow-y: auto; overflow-y: auto;
overflow-x: hidden; overflow-x: hidden;
padding: 6px 0; padding: 6px 0;
.box3-item { .news-item {
display: flex; display: flex;
height: 78px; height: 78px;
width: 749px; width: 749px;
......
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24.000000" height="24.000000" fill="none">
<rect id="新闻" width="24.000000" height="24.000000" x="0.000000" y="0.000000" />
<path id="矢量 463" d="M19.125 7.25L19.125 5.875C19.125 5.32272 18.6773 4.875 18.125 4.875L3.5 4.875C2.94772 4.875 2.5 5.32272 2.5 5.875L2.5 17.9375C2.5 18.5936 3.03141 19.125 3.6875 19.125L19.7188 19.125C20.7026 19.125 21.5 18.3276 21.5 17.3438L21.5 8.25C21.5 7.69772 21.0523 7.25 20.5 7.25L19.125 7.25ZM17.4999 17.9372L3.99997 17.9372L4.00008 6.0625L17.5001 6.0625L17.4999 17.9372ZM4.99994 8.4375L16.5001 8.4375L16.5001 9.625L4.99994 9.625L4.99994 8.4375ZM12 10.8125L16.5001 10.8125L16.5001 12L12 12L12 10.8125ZM12 13.1875L16.5001 13.1875L16.5001 14.375L12 14.375L12 13.1875ZM12 15.5625L15.3126 15.5625L15.3126 16.75L12 16.75L12 15.5625ZM4.99994 10.8125L10.8125 10.8125L10.8125 16.75L4.99994 16.75L4.99994 10.8125Z" fill="rgb(5,95,194)" fill-rule="nonzero" />
</svg>
<script setup lang="ts">
import "@/styles/container.scss"
import TextStyle from './textStyle.vue';
import ConstStyle from './constStyle.vue';
import { ElScrollbar, ElSpace } from "element-plus";
</script>
<template> <template>
<el-scrollbar> <el-scrollbar>
<div class="common-page"> <div class="common-page">
<el-space direction="vertical" :size="20" alignment="flex-start"> <el-space direction="vertical" :size="20" alignment="flex-start">
<div class="text-title-0-show">开发样式</div> <div class="text-title-0-show">开发样式</div>
<div class="text-title-1-show">样式变量</div> <div class="text-title-1-show">样式变量</div>
<const-style></const-style> <ConstStyle />
<div class="text-title-1-show">文字样式</div> <div class="text-title-1-show">文字样式</div>
<text-style></text-style> <TextStyle />
</el-space> </el-space>
</div> </div>
</el-scrollbar> </el-scrollbar>
</template> </template>
\ No newline at end of file
<script setup>
import "@/styles/container.scss"
import TextStyle from './textStyle.vue';
import ConstStyle from './constStyle.vue';
</script>
\ No newline at end of file
<template> <template>
<table style="width: 100%; border-collapse: collapse; border: 1px solid #ebeef5;"> <table style="width: 1600px; border-collapse: collapse; border: 1px solid #ebeef5;">
<!-- 表头 --> <!-- 表头 -->
<thead> <thead>
<tr class="text-title-2"> <tr class="text-title-2">
......
...@@ -8,6 +8,7 @@ import { withFallbackImage } from "./utils"; ...@@ -8,6 +8,7 @@ import { withFallbackImage } from "./utils";
import "./styles/scrollbar.css"; import "./styles/scrollbar.css";
import "./styles/elui.css"; import "./styles/elui.css";
import "./styles/main.css"; import "./styles/main.css";
import "./styles/common.scss"
import '@/assets/fonts/font.css' import '@/assets/fonts/font.css'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs' import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
......
...@@ -176,4 +176,13 @@ ...@@ -176,4 +176,13 @@
@extend .text-base; @extend .text-base;
color: var(--color-primary-90); color: var(--color-primary-90);
font-size: 12px; font-size: 12px;
}
.main-color{
color: rgb(5, 95, 194);
}
// 业务主色 高亮背景
.color-bg-active{
background: rgb(246, 250, 255);
} }
\ No newline at end of file
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
<script setup> <script setup>
import { onMounted, ref, computed } from "vue"; import { onMounted, ref, computed } from "vue";
// import HeaderMenu from "@/components/headerMenu.vue";
import RiskToday from './component/riskToday/index.vue' import RiskToday from './component/riskToday/index.vue'
import ScienceNews from './component/scienceNews/index.vue' import ScienceNews from './component/scienceNews/index.vue'
const input = ref('') const input = ref('')
......
...@@ -74,7 +74,12 @@ ...@@ -74,7 +74,12 @@
<span>美对华领域打压遏制最新动态</span> <span>美对华领域打压遏制最新动态</span>
</div> </div>
<div class="title-right-select"> <div class="title-right-select">
<el-select v-model="selectedFieldForLatest" placeholder="全部领域" class="field-select"> <el-select
v-model="selectedFieldForLatest"
@change="handleFieldChange"
placeholder="全部领域"
class="field-select"
>
<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>
</div> </div>
...@@ -131,7 +136,7 @@ ...@@ -131,7 +136,7 @@
<simple-pagination <simple-pagination
v-model:current-page="newsCurrentPage" v-model:current-page="newsCurrentPage"
:page-size="pageSize" :page-size="pageSize"
:total="newsList.length" :total="allNewsList.length"
@page-change="handleNewsPageChange" @page-change="handleNewsPageChange"
/> />
</div> </div>
...@@ -215,7 +220,7 @@ ...@@ -215,7 +220,7 @@
<div class="bottom-item"> <div class="bottom-item">
<div class="bottom-item-title"> <div class="bottom-item-title">
<img :src="icon4" alt="" /> <img :src="icon4" alt="" />
<span>美对领域打压遏制时间线</span> <span>美对领域打压遏制时间线</span>
</div> </div>
<el-select <el-select
v-model="selectedFieldTimeline" v-model="selectedFieldTimeline"
...@@ -408,6 +413,12 @@ const newsList = ref([]); ...@@ -408,6 +413,12 @@ const newsList = ref([]);
const newsCurrentPage = ref(1); const newsCurrentPage = ref(1);
const pageSize = ref(5); // 每页显示 5 条 const pageSize = ref(5); // 每页显示 5 条
const handleFieldChange = domainId => {
console.log("领域改变", domainId);
console.log("领域值 =>", selectedFieldForLatest.value);
getUSGovernmentLatestDynamicData();
};
// 总页数 // 总页数
const totalPages = computed(() => { const totalPages = computed(() => {
return Math.ceil(newsList.value.length / pageSize.value) || 1; return Math.ceil(newsList.value.length / pageSize.value) || 1;
...@@ -445,10 +456,11 @@ const handleNextPage = () => { ...@@ -445,10 +456,11 @@ const handleNextPage = () => {
const getUSGovernmentLatestDynamicData = async () => { const getUSGovernmentLatestDynamicData = async () => {
try { try {
const params = { const params = {
orgId: !!deptValueForLatest.value ? deptValueForLatest.value : null, domainId: !!selectedFieldForLatest.value ? selectedFieldForLatest.value : null,
pageSize: 50, pageSize: 50,
currentPage: newsCurrentPage.value currentPage: newsCurrentPage.value
}; };
console.log("领域值 =>", selectedFieldForLatest.value);
const res = await getUSGovernmentLatestDynamic(params); const res = await getUSGovernmentLatestDynamic(params);
if (res.code === 200 && res.data) { if (res.code === 200 && res.data) {
// 将接口数据转换为 newsList 需要的格式 // 将接口数据转换为 newsList 需要的格式
......
<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="20.000000" height="20.000000" fill="none" customFrame="#000000">
<rect id="容器 767" width="20.000000" height="20.000000" x="0.000000" y="0.000000" />
<circle id="椭圆 195" cx="10" cy="10" r="10" fill="rgb(231,243,255)" />
<path id="矩形 350" d="M5 9.5L13.5005 9.50017L13.501 10.4999L5.00042 10.4998L5 9.5Z" fill="rgb(5,95,194)" fill-rule="evenodd" />
<path id="矢量 610" d="M10 6L14 10L10 14" stroke="rgb(5,95,194)" stroke-width="1.000000" />
</svg>
...@@ -185,8 +185,8 @@ ...@@ -185,8 +185,8 @@
<simple-pagination <simple-pagination
v-model:current-page="rankCurrentPage" v-model:current-page="rankCurrentPage"
:page-size="pageSize" :page-size="rankingPageSize"
:total="rankingList.length" :total="allRankingList.length"
@page-change="handleRankPageChange" @page-change="handleRankPageChange"
/> />
</div> </div>
...@@ -195,7 +195,7 @@ ...@@ -195,7 +195,7 @@
<div class="bottom-item"> <div class="bottom-item">
<div class="bottom-item-title"> <div class="bottom-item-title">
<img :src="icon4" alt="" /> <img :src="icon4" alt="" />
<span>美政府部门对我打压遏制时间线</span> <span>美政府部门对华打压遏制历程</span>
</div> </div>
<div class="bottom-item-select"> <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'">
...@@ -210,7 +210,8 @@ ...@@ -210,7 +210,8 @@
</div> </div>
</div> </div>
<div class="bottom-content"> <div class="bottom-content">
<div class="timeline-container"> <CalendarHeatmap v-if="timelineData.length > 0" :timelineData="timelineData" />
<!-- <div class="timeline-container">
<div class="timeline-list"> <div class="timeline-list">
<div v-for="(dept, index) in timelineList" :key="index" class="dept-row"> <div v-for="(dept, index) in timelineList" :key="index" class="dept-row">
<div class="dept-info"> <div class="dept-info">
...@@ -266,7 +267,7 @@ ...@@ -266,7 +267,7 @@
<div class="timelineBar" :style="{ backgroundImage: `url(${timelineBg})` }"> <div class="timelineBar" :style="{ backgroundImage: `url(${timelineBg})` }">
<div ref="sliderChartRef" style="width: 100%; height: 100%; touch-action: none"></div> <div ref="sliderChartRef" style="width: 100%; height: 100%; touch-action: none"></div>
</div> </div>
</div> </div> -->
</div> </div>
</div> </div>
</div> </div>
...@@ -298,6 +299,7 @@ import { ...@@ -298,6 +299,7 @@ import {
getSanTypeList, getSanTypeList,
getThreeMonthSanctionProcess getThreeMonthSanctionProcess
} from "@/api/allGovernment.js"; } from "@/api/allGovernment.js";
import CalendarHeatmap from "./components/CalendarHeatmap.vue";
const router = useRouter(); const router = useRouter();
const activeDate = inject("activeDate"); const activeDate = inject("activeDate");
...@@ -318,9 +320,13 @@ const monthNum = computed(() => { ...@@ -318,9 +320,13 @@ const monthNum = computed(() => {
} }
}); });
// 全政府-美政府部门对我打压遏制时间线 // 全政府-美政府部门对我打压遏制时间线
const loadingHistory = ref(false); const loadingHistory = ref(false);
const timelineData = ref([])
const getUSGovernmentSanctionHistoryData = async () => { const getUSGovernmentSanctionHistoryData = async () => {
timelineData.value = [] // 初始化数据
loadingHistory.value = true; loadingHistory.value = true;
try { try {
const params = { const params = {
...@@ -339,74 +345,75 @@ const getUSGovernmentSanctionHistoryData = async () => { ...@@ -339,74 +345,75 @@ const getUSGovernmentSanctionHistoryData = async () => {
if (res.code === 200 && res.data) { if (res.code === 200 && res.data) {
// 如果返回的是 content 数组(分页结构)或直接是数组 // 如果返回的是 content 数组(分页结构)或直接是数组
const rawList = res.data.content || res.data; const rawList = res.data.content || res.data;
timelineData.value = res.data;
const grouped = {};
rawList.forEach(item => { // const grouped = {};
// 使用 orgName 进行分组,如果没有则显示未知部门 // rawList.forEach(item => {
const deptName = item.orgName || "未知部门"; // // 使用 orgName 进行分组,如果没有则显示未知部门
// const deptName = item.orgName || "未知部门";
if (!grouped[deptName]) {
grouped[deptName] = { // if (!grouped[deptName]) {
name: deptName, // grouped[deptName] = {
icon: item.orgLogoUrl, // name: deptName,
count: 0, // icon: item.orgLogoUrl,
events: [] // count: 0,
}; // events: []
} // };
grouped[deptName].count++; // }
// grouped[deptName].count++;
// 根据 status 映射红绿灯颜色
let level = ""; // // 根据 status 映射红绿灯颜色
if (item.status === 1) level = "red"; // let level = "";
else if (item.status === 2) level = "yellow"; // if (item.status === 1) level = "red";
else if (item.status === 3) level = "green"; // else if (item.status === 2) level = "yellow";
else if (item.status === 4) level = "white"; // else if (item.status === 3) level = "green";
// else if (item.status === 4) level = "white";
grouped[deptName].events.push({
date: item.endDate ? item.endDate.replace(/^(\d{4})-(\d{2})-(\d{2})$/, "$1年$2月$3日") : "", // grouped[deptName].events.push({
time: item.endDate, // date: item.endDate ? item.endDate.replace(/^(\d{4})-(\d{2})-(\d{2})$/, "$1年$2月$3日") : "",
content: item.name || item.summary, // time: item.endDate,
tags: item.techDomainList ? item.techDomainList.slice(0, 2) : [], // content: item.name || item.summary,
level: level, // tags: item.techDomainList ? item.techDomainList.slice(0, 2) : [],
sanctionId: item.sanctionId // level: level,
}); // sanctionId: item.sanctionId
}); // });
// });
//统计完成后生成新的数组
let fArr = []; // //统计完成后生成新的数组
rawList.forEach(item => { // let fArr = []
fArr.push(item.endDate); // rawList.forEach((item)=>{
}); // fArr.push(item.endDate)
// })
let timeLine = Object.values(grouped);
//重新遍历timeLine,根据日期数组额外增加数据 // let timeLine = Object.values(grouped);
timeLine.forEach(item => { // //重新遍历timeLine,根据日期数组额外增加数据
// 根据日期数组构建空数据 // timeLine.forEach((item) => {
const data = []; // // 根据日期数组构建空数据
for (let i = 0; i < fArr.length; i++) { // const data = []
const option = { // for (let i = 0; i < fArr.length; i++) {
date: fArr[i], // const option = {
noData: true // date: fArr[i],
}; // noData: true
data.push(option); // }
} // data.push(option)
item.events.forEach(ele => { // }
for (let m = 0; m < data.length; m++) { // item.events.forEach((ele) => {
if (ele.time == data[m].date && data[m].noData) { // for (let m = 0; m < data.length; m++) {
data[m] = ele; // if(ele.time == data[m].date && data[m].noData){
data[m].noData = false; // data[m] = ele
break; // data[m].noData = false
} // break
} // }
}); // }
item.events = data; // })
}); // item.events = data
// })
// timelineList.value = Object.values(grouped);
timelineList.value = timeLine; // // timelineList.value = Object.values(grouped);
console.log("timelineList", timelineList.value); // timelineList.value = timeLine
// console.log("timelineList", timelineList.value);
initSlider();
// initSlider();
} }
} catch (error) { } catch (error) {
console.error("获取制裁历程失败:", error); console.error("获取制裁历程失败:", error);
...@@ -419,6 +426,7 @@ const getUSGovernmentSanctionHistoryData = async () => { ...@@ -419,6 +426,7 @@ const getUSGovernmentSanctionHistoryData = async () => {
const loadingJointRank = ref(false); const loadingJointRank = ref(false);
const getUSGovernmentJointSanctionRankData = async () => { const getUSGovernmentJointSanctionRankData = async () => {
loadingJointRank.value = true; loadingJointRank.value = true;
const params = {};
try { try {
const res = await getUSGovernmentJointSanctionRank(); const res = await getUSGovernmentJointSanctionRank();
if (res.code === 200 && res.data) { if (res.code === 200 && res.data) {
...@@ -487,8 +495,8 @@ const updateDynamicListByPage = () => { ...@@ -487,8 +495,8 @@ const updateDynamicListByPage = () => {
}; };
const updateRankListByPage = () => { const updateRankListByPage = () => {
const start = (rankCurrentPage.value - 1) * pageSize.value; const start = (rankCurrentPage.value - 1) * rankingPageSize.value;
const end = start + pageSize.value; const end = start + rankingPageSize.value;
rankingList.value = allRankingList.value.slice(start, end); rankingList.value = allRankingList.value.slice(start, end);
}; };
// 点击科技要闻-跳转详情页 // 点击科技要闻-跳转详情页
...@@ -785,31 +793,7 @@ const fieldOptions = ref([ ...@@ -785,31 +793,7 @@ const fieldOptions = ref([
{ label: "其他", value: "99" } { label: "其他", value: "99" }
]); ]);
const methodOptions = ref([ const methodOptions = ref([]);
// { label: "全部制裁手段", value: "" },
// { label: "法案", value: "-1" },
// { label: "政令", value: "-2" },
// { label: "实体清单", value: "1" },
// { label: "特别国民指定清单", value: "2" },
// { label: "涉军企业", value: "3" },
// { label: "行业制裁识别清单", value: "4" },
// { label: "无法核实清单", value: "5" },
// { label: "军事最终用户清单", value: "6" },
// { label: "非SDN中国军工企业名单", value: "7" },
// { label: "拒绝往来人员清单", value: "8" },
// { label: "军事最终用途与最终用户规则", value: "9" },
// { label: "欧盟合并制裁清单", value: "10" },
// { label: "英国制裁清单", value: "11" },
// { label: "加拿大合并自主制裁清单", value: "12" },
// { label: "商业管制清单", value: "13" }
// { label: "232调查", value: "14" },
// { label: "Capta List (CAP) - Treasury Department", value: "15" },
// { label: "ITAR Debarred (DTC) - State Department", value: "16" },
// { label: "Nonproliferation Sanctions (ISN) - State Department", value: "17" },
// { label: "Non-SDN Menu-Based Sanctions List (NS-MBS List) - Treasury Department", value: "18" },
// { label: "Palestinian Legislative Council List (PLC) - Treasury Department", value: "19" },
// { label: "经验证最终用户清单", value: "20" }
]);
const handleGetSanList = async () => { const handleGetSanList = async () => {
const params = { const params = {
...@@ -825,16 +809,17 @@ const handleGetSanList = async () => { ...@@ -825,16 +809,17 @@ const handleGetSanList = async () => {
value: item.id value: item.id
}; };
}); });
methodValue.value = "";
} }
} catch (error) {} } catch (error) {}
}; };
watch( // watch(
() => methodValue.value, // () => methodValue.value,
val => { // val => {
getDepartmentListData(); // getDepartmentListData();
} // }
); // );
watch( watch(
() => deptValue.value, () => deptValue.value,
...@@ -847,6 +832,7 @@ const allDynamicData = ref([]); ...@@ -847,6 +832,7 @@ const allDynamicData = ref([]);
const dynamicList = ref([]); const dynamicList = ref([]);
const newsCurrentPage = ref(1); const newsCurrentPage = ref(1);
const pageSize = ref(5); // 每页显示 5 条 const pageSize = ref(5); // 每页显示 5 条
const rankingPageSize = ref(10);
const handleNewsPageChange = page => { const handleNewsPageChange = page => {
newsCurrentPage.value = page; newsCurrentPage.value = page;
...@@ -1662,7 +1648,7 @@ const prev = () => { ...@@ -1662,7 +1648,7 @@ const prev = () => {
// border-radius: 10px; // border-radius: 10px;
// border: 1px solid rgb(234, 236, 238); // border: 1px solid rgb(234, 236, 238);
border-bottom: 1px solid rgb(234, 236, 238); border-bottom: 1px solid rgb(234, 236, 238);
padding: 12px 24px; padding: 10px 24px;
margin-bottom: 12px; margin-bottom: 12px;
box-sizing: border-box; box-sizing: border-box;
......
...@@ -6,10 +6,16 @@ ...@@ -6,10 +6,16 @@
<img src="./assets/leftbtn.png" alt class="left-btn" @click="prev" :class="{ disabled: startIndex === 0 }" /> <img src="./assets/leftbtn.png" alt class="left-btn" @click="prev" :class="{ disabled: startIndex === 0 }" />
<div class="content"> <div class="content">
<div class="carousel-container" :style="{ transform: `translateX(-${startIndex * (307 + 16)}px)` }"> <div class="carousel-container" :style="{ transform: `translateX(-${startIndex * (307 + 16)}px)` }">
<div class="carousel-item" v-for="item, index in carouselList" :key="index"> <div class="carousel-item" v-for="(item, index) in carouselList" :key="index">
<div class="item-top"> <div class="item-top">
<div class="top-img"> <div class="top-img">
<img :src="ele" :class="{ img1: index !== 0 }" alt v-for="(ele, idx) in item.imageList" :key="idx" /> <img
:src="ele"
:class="{ img1: index !== 0 }"
alt
v-for="(ele, idx) in item.imageList"
:key="idx"
/>
</div> </div>
<div class="top-num">{{ item.count }}</div> <div class="top-num">{{ item.count }}</div>
</div> </div>
...@@ -20,13 +26,18 @@ ...@@ -20,13 +26,18 @@
:key="idxx"> :key="idxx">
{{ ele.industryName }} {{ ele.industryName }}
</div> --> </div> -->
<AreaTag v-for="ele, idxx in item.industryList" :key="idxx" :tagName="ele.industryName"></AreaTag> <AreaTag v-for="(ele, idxx) in item.industryList" :key="idxx" :tagName="ele.industryName"></AreaTag>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<img src="./assets/rightbtn.png" alt class="right-btn" @click="next" <img
:class="{ disabled: startIndex >= carouselList.length - 5 }" /> src="./assets/rightbtn.png"
alt
class="right-btn"
@click="next"
:class="{ disabled: startIndex >= carouselList.length - 5 }"
/>
</div> </div>
<!-- 排华联盟分布 --> <!-- 排华联盟分布 -->
...@@ -48,8 +59,13 @@ ...@@ -48,8 +59,13 @@
<div class="item" v-for="(item, index) in countList" :key="index"> <div class="item" v-for="(item, index) in countList" :key="index">
<div class="item-left"> <div class="item-left">
<img :src="item.image" alt /> <img :src="item.image" alt />
<el-tooltip effect="dark" :content="item.zhName" popper-class="common-prompt-popper" placement="top" <el-tooltip
:show-after="500"> effect="dark"
:content="item.zhName"
popper-class="common-prompt-popper"
placement="top"
:show-after="500"
>
<span>{{ item.zhName }}</span> <span>{{ item.zhName }}</span>
</el-tooltip> </el-tooltip>
</div> </div>
...@@ -91,13 +107,18 @@ ...@@ -91,13 +107,18 @@
<span>排华联盟最新动态</span> <span>排华联盟最新动态</span>
</div> </div>
<div class="news-content"> <div class="news-content">
<div class="item" v-for="item, index in newsList" :key="index"> <div class="item" v-for="(item, index) in newsList" :key="index">
<div class="item-title"> <div class="item-title">
<img :src="item.image || defaultImg" alt /> <img :src="item.image || defaultImg" alt />
<span @click="handleClick(item)">{{ item.title }}</span> <span @click="handleClick(item)">{{ item.title }}</span>
</div> </div>
<el-tooltip effect="dark" :content="item.content" popper-class="common-prompt-popper" placement="top" <el-tooltip
:show-after="500"> effect="dark"
:content="item.content"
popper-class="common-prompt-popper"
placement="top"
:show-after="500"
>
<div class="item-content">{{ item.content }}</div> <div class="item-content">{{ item.content }}</div>
</el-tooltip> </el-tooltip>
<div class="item-bottom"> <div class="item-bottom">
...@@ -106,7 +127,7 @@ ...@@ -106,7 +127,7 @@
:key="idx"> :key="idx">
<span>{{ ele.industryName }}</span> <span>{{ ele.industryName }}</span>
</div> --> </div> -->
<AreaTag v-for="ele, idx in item.industryList" :key="idx" :tagName="ele.industryName"></AreaTag> <AreaTag v-for="(ele, idx) in item.industryList" :key="idx" :tagName="ele.industryName"></AreaTag>
</div> </div>
<div class="bottom-right">{{ getTime(item.time) }}</div> <div class="bottom-right">{{ getTime(item.time) }}</div>
</div> </div>
...@@ -123,16 +144,26 @@ ...@@ -123,16 +144,26 @@
<div class="item-title"> <div class="item-title">
<div class="title-left"> <div class="title-left">
<div class="img-list"> <div class="img-list">
<img :src="ele.image || defaultImg" :class="{ img1: index !== 0 }" <img
@error="e => (e.target.src = defaultImg)" alt v-for="(ele, index) in item.countryList" :src="ele.image || defaultImg"
:key="index" /> :class="{ img1: index !== 0 }"
@error="e => (e.target.src = defaultImg)"
alt
v-for="(ele, index) in item.countryList"
:key="index"
/>
</div> </div>
<div class="left-content">{{ getContent(item.countryList) }}</div> <div class="left-content">{{ getContent(item.countryList) }}</div>
</div> </div>
<div class="title-right">{{ item.statementList?.length }}次合作</div> <div class="title-right">{{ item.statementList?.length }}次合作</div>
</div> </div>
<div class="item-content"> <div class="item-content">
<div class="content-list" v-for="(ele, idx) in item.statementList" :key="idx" @click="handleClick(ele)"> <div
class="content-list"
v-for="(ele, idx) in item.statementList"
:key="idx"
@click="handleClick(ele)"
>
<div class="list-left"> <div class="list-left">
<!-- <span>{{ getName(ele.industryList) }}</span> --> <!-- <span>{{ getName(ele.industryList) }}</span> -->
<AreaTag v-if="getName(ele.industryList)" :tagName="getName(ele.industryList)"></AreaTag> <AreaTag v-if="getName(ele.industryList)" :tagName="getName(ele.industryList)"></AreaTag>
...@@ -945,7 +976,7 @@ const initRightDonut = async () => { ...@@ -945,7 +976,7 @@ const initRightDonut = async () => {
value: res.data[i].amount, value: res.data[i].amount,
x: Math.random() * 10, x: Math.random() * 10,
y: Math.random() * 10, y: Math.random() * 10,
symbolSize: res.data[i].amount * 9, symbolSize: res.data[i].amount * 9
}; };
// 先判断data中是否包含上述数据 // 先判断data中是否包含上述数据
...@@ -985,8 +1016,8 @@ const initRightDonut = async () => { ...@@ -985,8 +1016,8 @@ const initRightDonut = async () => {
// text: 'Basic Graph' // text: 'Basic Graph'
}, },
tooltip: { tooltip: {
trigger: 'item', // 针对Graph的节点/边触发(必配,否则弹框不生效) trigger: "item", // 针对Graph的节点/边触发(必配,否则弹框不生效)
triggerOn: 'click', triggerOn: "click",
formatter: function (params) { formatter: function (params) {
// params.data 是当前点击节点的完整数据对象 // params.data 是当前点击节点的完整数据对象
const { name, value } = params.data; const { name, value } = params.data;
...@@ -1018,7 +1049,7 @@ const initRightDonut = async () => { ...@@ -1018,7 +1049,7 @@ const initRightDonut = async () => {
show: true show: true
}, },
edgeSymbol: ["circle", ""], edgeSymbol: ["circle", ""],
edgeSymbolSize: [4, 40], edgeSymbolSize: [4, 80],
edgeLabel: { edgeLabel: {
fontSize: 20 fontSize: 20
}, },
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
</template> </template>
<script setup> <script setup>
import NewsList from "@/components/NewsList/NewsList.vue"; import NewsList from "@/components/base/NewsList/index.vue";
import { ref, onMounted } from "vue"; import { ref, onMounted } from "vue";
import router from '@/router' import router from '@/router'
import { getCoopRestrictionNews, getCoopRestrictionSocial } from '@/api/coopRestriction/coopRestriction' import { getCoopRestrictionNews, getCoopRestrictionSocial } from '@/api/coopRestriction/coopRestriction'
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
</div> </div>
<!-- 资讯要问 --> <!-- 资讯要问 -->
<div class="ask" id="position2"> <div class="ask" id="position2">
<com-title title="咨询要闻" /> <com-title title="资讯要闻" />
<div class="ask-main"> <div class="ask-main">
<askPage /> <askPage />
</div> </div>
...@@ -52,8 +52,6 @@ ...@@ -52,8 +52,6 @@
<script setup> <script setup>
import { ref, onMounted, nextTick } from "vue"; import { ref, onMounted, nextTick } from "vue";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import HeaderMenu from "@/components/headerMenu.vue";
import headerInfo from "@/components/headerInfo.vue";
import comTitle from "./common/comTitle.vue"; import comTitle from "./common/comTitle.vue";
import newData from "./components/dataNew/index.vue"; import newData from "./components/dataNew/index.vue";
import askPage from "./components/askPage/index.vue"; import askPage from "./components/askPage/index.vue";
......
...@@ -410,7 +410,7 @@ ...@@ -410,7 +410,7 @@
</template> </template>
<script setup> <script setup>
// import NewsList from "@/components/NewsList/NewsList.vue"; // import NewsList from "@/components/base/NewsList/index.vue";
import { onMounted, ref, computed, watch, nextTick } from "vue"; import { onMounted, ref, computed, watch, nextTick } from "vue";
import router from "@/router"; import router from "@/router";
import { import {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论