提交 a1df7e9b authored 作者: 张伊明's avatar 张伊明
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div id="app"> <div id="app">
<div class="pro-wrapper"> <div class="pro-wrapper">
<div class="home-page"> <div class="home-page">
<div class="navbar"> <!-- <div class="navbar">
<div class="nav-content"> <div class="nav-content">
<div class="nav-left"> <div class="nav-left">
<div class="icon"> <div class="icon">
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
<div class="bottom-line" v-if="homeActiveTitleIndex === index"></div> <div class="bottom-line" v-if="homeActiveTitleIndex === index"></div>
</div> </div>
</div> </div>
</div> </div>
<div class="nav-right"> <div class="nav-right">
<div class="search-box"> <div class="search-box">
...@@ -49,8 +50,8 @@ ...@@ -49,8 +50,8 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div> -->
<NavBarV2/>
<div class="main-container"> <div class="main-container">
<router-view /> <router-view />
</div> </div>
......
<template>
<div class="analysis-box-wrapper" :style="{ width: width ? width : '100%', height: height ? height : '100%' }">
<div class="wrapper-header">
<div class="header-icon"></div>
<div class="header-title">{{ title }}</div>
<div class="header-right">
<div class="header-right-btn" @click="handleSave" v-if="showAllBtn">
<img src="@/assets/icons/box-header-icon1.png" alt="">
</div>
<div class="header-right-btn" @click="handleDownload">
<img src="@/assets/icons/box-header-icon2.png" alt="">
</div>
<div class="header-right-btn" @click="handleCollect">
<img src="@/assets/icons/box-header-icon3.png" alt="">
</div>
</div>
</div>
<div class="wrapper-main">
<slot></slot>
</div>
</div>
</template>
<script setup>
import { ref, computed } from 'vue'
const props = defineProps({
title: {
type: String,
default: ''
},
width: {
type: String,
default: ''
},
height: {
type: String,
default: ''
},
showAllBtn: {
type: Boolean,
default: true
}
})
const handleSave = () => {
alert('save')
}
const handleDownload = () => {
alert('download')
}
const handleCollect = () => {
alert('collect')
}
</script>
<style lang="scss" scoped>
.analysis-box-wrapper {
border: 1px solid rgba(234, 236, 238, 1);
border-radius: 10px;
box-shadow: 0px 0px 20px 0px rgba(25, 69, 130, 0.1);
background: rgba(255, 255, 255, 1);
.wrapper-header {
height: 45px;
display: flex;
box-sizing: border-box;
position: relative;
.header-icon {
margin-top: 18px;
width: 8px;
height: 20px;
background: var(--color-main-active);
border-radius: 0 4px 4px 0;
}
.header-title {
margin-left: 14px;
margin-top: 14px;
height: 26px;
color: var(--color-main-active);
font-family: Source Han Sans CN;
font-style: Bold;
font-size: 20px;
font-weight: 700;
line-height: 26px;
letter-spacing: 0px;
}
.header-right {
position: absolute;
top: 14px;
right: 12px;
height: 28px;
display: flex;
justify-content: flex-end;
gap: 4px;
.header-right-btn {
width: 28px;
height: 28px;
cursor: pointer;
img {
width: 100%;
height: 100%;
}
}
}
}
.wrapper-main {
height: calc(100% - 45px);
overflow: hidden;
overflow-y: auto;
box-sizing: border-box;
padding: 5px 10px;
}
}
</style>
<template>
<div class="overview-box-wrapper" :style="{ width: width ? width : '640px', height: height ? height : '415px' }">
<div class="wrapper-header">
<div class="header-icon"></div>
<div class="header-title">{{ title }}</div>
<div class="header-right">
<div class="header-right-btn" @click="handleSave">
<img src="@/assets/icons/box-header-icon1.png" alt="">
</div>
<div class="header-right-btn" @click="handleDownload">
<img src="@/assets/icons/box-header-icon2.png" alt="">
</div>
<div class="header-right-btn" @click="handleCollect">
<img src="@/assets/icons/box-header-icon3.png" alt="">
</div>
</div>
</div>
<div class="wrapper-main">
<slot></slot>
</div>
</div>
</template>
<script setup>
import { ref, computed } from 'vue'
const props = defineProps({
title: {
type: String,
default: ''
},
width: {
type: String,
default: ''
},
height: {
type: String,
default: ''
}
})
const handleSave = () => {
alert('save')
}
const handleDownload = () => {
alert('download')
}
const handleCollect = () => {
alert('collect')
}
</script>
<style lang="scss" scoped>
.overview-box-wrapper {
border: 1px solid rgba(234, 236, 238, 1);
border-radius: 10px;
box-shadow: 0px 0px 20px 0px rgba(25, 69, 130, 0.1);
background: rgba(255, 255, 255, 1);
.wrapper-header {
height: 45px;
display: flex;
box-sizing: border-box;
.header-icon {
margin-top: 18px;
width: 8px;
height: 20px;
background: var(--color-main-active);
border-radius: 0 4px 4px 0;
}
.header-title {
margin-left: 14px;
margin-top: 14px;
height: 26px;
color: var(--color-main-active);
font-family: Source Han Sans CN;
font-style: Bold;
font-size: 20px;
font-weight: 700;
line-height: 26px;
letter-spacing: 0px;
}
.header-right {
position: absolute;
top: 14px;
right: 12px;
height: 28px;
display: flex;
justify-content: flex-end;
gap: 4px;
.header-right-btn {
width: 28px;
height: 28px;
img {
width: 100%;
height: 100%;
}
}
}
}
.wrapper-main {
height: calc(100% - 45px);
overflow: hidden;
overflow-y: auto;
box-sizing: border-box;
padding: 5px 10px;
}
}
</style>
<template>
<div class="navbarV2">
<div class="nav-content">
<div class="nav-left" :class="{ 'flex-start': isShowSearchBar }">
<div class="icon">
<img v-show="!isShowSearchBar" src="@/assets/icons/overview/logo.png" alt="" />
<img v-show="isShowSearchBar" src="@/assets/icons/overview/logo-white.png" alt="" />
</div>
<SearchBar v-show="isShowSearchBar" />
<div class="title-box" v-show="!isShowSearchBar">
<!-- <div class="title-box" v-if="false"> -->
<div
class="title"
v-for="(item, index) in homeTitleList"
:key="index"
@mouseenter="handleShowMenu(index, true)"
@mouseleave="handleShowMenu(index, false)"
@click="handleClickTitle(item)"
>
<div class="text" :class="{ textActive: homeActiveTitleIndex === index }">
{{ item.name }}
</div>
<div class="bottom-line" v-if="homeActiveTitleIndex === index"></div>
</div>
</div>
</div>
<div class="nav-right">
<div class="info-box" @click="handleClickToolBox">
<div class="mail">
<img src="@/assets/icons/overview/mail.png" alt="" />
</div>
<div class="user">
<img src="@/assets/icons/overview/user.png" alt="" />
</div>
<div class="name">{{ "管理员" }}</div>
</div>
</div>
<div class="menu-box" v-if="isShowMenu" @mouseenter="handleHoverMenu(true)" @mouseleave="handleHoverMenu(false)">
<div class="menu-content">
<div class="menu-item" v-for="(item, index) in menuList" :key="index" @click="handleToModule(item)">
<div class="icon">
<img :src="item.icon" alt="" />
</div>
<div class="title">{{ item.title }}</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script setup>
import { ref, computed, onMounted, watchEffect } from "vue";
import { useRouter } from "vue-router";
import { useRoute } from "vue-router";
import { getPersonType } from "@/api/common/index";
import Menu1 from "@/assets/icons/overview/menu1.png";
import Menu2 from "@/assets/icons/overview/menu2.png";
import Menu3 from "@/assets/icons/overview/menu3.png";
import Menu4 from "@/assets/icons/overview/menu4.png";
import Menu5 from "@/assets/icons/overview/menu5.png";
import Menu6 from "@/assets/icons/overview/menu6.png";
import Menu7 from "@/assets/icons/overview/menu7.png";
import Menu8 from "@/assets/icons/overview/menu8.png";
import Menu9 from "@/assets/icons/overview/menu9.png";
import Menu10 from "@/assets/icons/overview/menu10.png";
import Menu11 from "@/assets/icons/overview/menu11.png";
import Menu12 from "@/assets/icons/overview/menu12.png";
import { ElMessage } from "element-plus";
import { useWrittingAsstaintStore } from "@/stores/writtingAsstaintStore";
const store = useWrittingAsstaintStore();
let isShowSearchBar = computed(() => {
return store.isShowSearchBar;
});
const router = useRouter();
const personTypeList = ref([]);
// 获取人物类别
const handleGetPersonType = async () => {
try {
const res = await getPersonType();
console.log("res", res);
if (res.code === 200) {
personTypeList.value = res.data;
} else {
personTypeList.value = [];
}
window.sessionStorage.setItem("personTypeList", JSON.stringify(personTypeList.value));
} catch (error) {}
};
// 概览页标题列表
const homeTitleList = ref([
{
name: "中美科技博弈",
path: "/ZMOverView",
disabled: false
},
{
name: "主要国家科技动向感知",
path: "",
disabled: true
},
{
name: "主要国家竞争科技安全",
path: "",
disabled: true
}
]);
const homeActiveTitleIndex = ref(0);
const isShowMenu = ref(false);
const handleShowMenu = (index, isShow) => {
if (index === 0) {
isShowMenu.value = isShow;
}
};
const handleHoverMenu = isShow => {
isShowMenu.value = isShow;
};
const menuList = ref([
{
title: "中美科技博弈概览",
icon: Menu1,
path: "/ZMOverView"
},
{
title: "科技法案",
icon: Menu2,
path: "/billHome"
},
{
title: "科技政令",
icon: Menu3,
path: "/decree"
},
{
title: "美国科技智库",
icon: Menu4,
path: "/thinkTank"
},
{
title: "出口管制",
icon: Menu5,
path: "/exportControl"
},
{
title: "科研合作限制",
icon: Menu6,
path: "/cooperationRestrictions"
},
{
title: "投融资限制",
icon: Menu7,
path: "/finance"
},
{
title: "市场准入限制",
icon: Menu8,
path: "/marketAccessRestrictions"
},
{
title: "规则限制",
icon: Menu9,
path: "/ruleRestrictions"
},
{
title: "美国科技人物观点",
icon: Menu10,
path: "/technologyFigures"
},
{
title: "美国主要创新主体动向",
icon: Menu11,
path: "/innovationSubject"
},
{
title: "美国科研资助体系",
icon: Menu12,
path: "/scientificFunding"
}
]);
const handleToModule = item => {
const curRoute = router.resolve({
path: item.path
});
window.open(curRoute.href, "_blank");
};
const searchText = ref("");
const handleSearch = () => {
const curRoute = router.resolve({
path: "/searchResults",
query: {
searchText: searchText.value
}
});
window.open(curRoute.href, "_blank");
};
const handleClickTitle = item => {
if (item.name === "主要国家科技动向感知" || item.name === "主要国家竞争科技安全") {
ElMessage.warning("当前功能正在开发中,敬请期待!");
}
};
const handleClickToolBox = () => {
ElMessage.warning("当前功能正在开发中,敬请期待!");
};
onMounted(() => {
handleGetPersonType();
});
</script>
<style lang="scss" scoped>
.navbarV2 {
width: 100%;
// height: 64px;
border-bottom: 1px solid rgba(234, 236, 238, 1);
box-shadow: 0px 0px 20px 0px rgba(25, 69, 130, 0.1);
background: linear-gradient(180deg, rgba(246, 250, 255, 0.8) 0%, rgba(255, 255, 255, 0.8) 100%);
padding: 12px 0;
.nav-content {
width: 1600px;
margin: 0 auto;
display: flex;
justify-content: space-between;
position: relative;
align-items: flex-start;
.nav-left {
display: flex;
align-items: center;
&.flex-start {
align-items: flex-start;
.icon {
flex-shrink: 0;
width: 48px;
height: 48px;
border-radius: 50%;
background: rgb(5, 95, 194);
display: flex;
align-items: center;
justify-content: center;
img {
width: 29px;
height: 30px;
}
}
}
.icon {
width: 29px;
height: 30px;
margin-right: 17px;
img {
width: 100%;
height: 100%;
}
}
.title-box {
display: flex;
gap: 30px;
.title {
cursor: pointer;
position: relative;
&:hover {
.text {
color: var(--color-main-active);
}
}
.text {
color: rgba(59, 65, 75, 1);
font-family: YouSheBiaoTiHei;
font-style: Regular;
font-size: 30px;
font-weight: 400;
letter-spacing: 0px;
}
.textActive {
color: var(--color-main-active);
}
.bottom-line {
position: absolute;
bottom: -15px;
width: 90%;
height: 20px;
margin-top: 9px;
&::after {
display: block;
content: "";
width: 50%;
height: 4px;
background: var(--color-main-active);
position: absolute;
bottom: 2px;
left: 0;
right: 0;
margin: 0 auto;
}
}
}
}
}
.nav-right {
display: flex;
justify-content: flex-end;
gap: 21px;
.info-box {
display: flex;
justify-content: flex-end;
align-items: center;
.mail {
width: 32px;
height: 32px;
margin-right: 14px;
cursor: pointer;
img {
width: 100%;
height: 100%;
}
}
.user {
width: 32px;
height: 32px;
margin-right: 11px;
cursor: pointer;
img {
width: 100%;
height: 100%;
}
}
.name {
width: 48px;
height: 30px;
color: rgba(59, 65, 75, 1);
font-family: Microsoft YaHei;
font-style: Regular;
font-size: 16px;
font-weight: 400;
line-height: 30px;
letter-spacing: 0px;
}
}
}
.menu-box {
position: absolute;
z-index: 999999;
width: 713px;
height: 413px;
top: 52px;
left: 0;
box-sizing: border-box;
border: 1px solid rgba(255, 255, 255, 1);
border-radius: 10px;
backdrop-filter: blur(30px);
box-shadow: 0px 0px 20px 0px rgba(25, 69, 130, 0.1);
background: rgba(255, 255, 255, 0.8);
.menu-content {
width: 562px;
height: 348px;
margin-top: 8px;
margin-left: 72px;
display: flex;
flex-wrap: wrap;
.menu-item {
margin-top: 36px;
width: 280px;
height: 24px;
display: flex;
cursor: pointer;
&:hover {
.title {
color: var(--color-main-active);
font-size: 20px;
}
}
.icon {
width: 24px;
height: 24px;
img {
width: 100%;
height: 100%;
}
}
.title {
margin-left: 16px;
height: 24px;
color: rgba(59, 65, 75, 1);
font-family: Microsoft YaHei;
font-style: Bold;
font-size: 18px;
font-weight: 700;
line-height: 24px;
letter-spacing: 0px;
text-align: left;
}
}
}
}
}
}
</style>
<template>
<div class="news-box">
<div class="box3-header">
<div class="box3-header-left">
<div class="box3-header-icon">
<img src="@/assets/images/box3-header-icon.png" alt="" />
</div>
<div class="box3-header-title">{{ "新闻资讯" }}</div>
<div class="more" @click="handleToMoreNews">{{ "更多 +" }}</div>
</div>
</div>
<div class="box3-main">
<div class="box3-item" v-for="(news, index) in list.slice(0,5)" :key="index" @click="handleClickToNewsDetail(news)">
<div class="left">
<img
:src="getProxyUrl(news.newsImage) || defaultImg"
alt=""
referrerpolicy="no-referrer"
@error="e => (e.target.src = errImg||News1)"
/>
</div>
<div class="right">
<div class="right-top">
<div class="title">{{ news.newsTitle||news.title }}</div>
<div class="time">
{{ news.newsDate ? news.newsDate.slice(5) : "" }} {{ news.newsOrg ? "-" + news.newsOrg : "" }}
</div>
</div>
<div class="right-footer">{{ news.newsContent||news.description }}</div>
</div>
</div>
</div>
</div>
</template>
<script setup>
import router from "@/router/index";
import News1 from "@/assets/images/news1.png"; // 错误图片
import defaultNew from "@/assets/images/default-icon-news.png"; // 默认图片
let { list,errImg,defaultImg } = defineProps({
list: {
type: Array,
default: () => []
},
defaultImg: {
type: String,
default: defaultNew
},
errImg: {
type: String,
default: ''
}
});
// 处理图片代理
const getProxyUrl = url => {
if (!url) return "";
const urlStr = String(url);
// 排除非 http 开头(相对路径)、已经是代理链接、或者是本地链接
if (
!urlStr.startsWith("http") ||
urlStr.includes("images.weserv.nl") ||
urlStr.includes("localhost") ||
urlStr.includes("127.0.0.1")
) {
return url;
}
// 移除协议头 http:// 或 https://
const cleanUrl = urlStr.replace(/^https?:\/\//i, "");
return `https://images.weserv.nl/?url=${encodeURIComponent(cleanUrl)}`;
};
const handleClickToNewsDetail = news => {
const route = router.resolve({
path: "/newsAnalysis",
query: {
newsId: news.newsId
}
});
window.open(route.href, "_blank");
};
// 查看更多新闻资讯
const handleToMoreNews = () => {
const route = router.resolve("/newsBrief");
window.open(route.href, "_blank");
};
</script>
<style lang="scss" scoped>
.news-box {
width: 792px;
height: 450px;
border-radius: 10px;
box-shadow: 0px 0px 15px 0px rgba(25, 69, 130, 0.2);
background: rgba(255, 255, 255, 1);
.box3-header {
height: 48px;
border-bottom: 1px solid rgba(240, 242, 244, 1);
margin: 0 auto;
display: flex;
justify-content: space-between;
position: relative;
.box3-header-left {
display: flex;
.box3-header-icon {
margin-left: 21px;
margin-top: 16px;
width: 19px;
height: 19px;
img {
width: 100%;
height: 100%;
}
}
.box3-header-title {
margin-top: 11px;
margin-left: 20px;
height: 26px;
color: var(--color-main-active);
font-family: Microsoft YaHei;
font-size: 20px;
font-weight: 700;
line-height: 26px;
}
}
.more {
width: 49px;
height: 24px;
position: absolute;
top: 14px;
right: 27px;
color: rgba(20, 89, 187, 1);
font-family: Microsoft YaHei;
font-size: 16px;
font-weight: 400;
line-height: 24px;
cursor: pointer;
}
}
.box3-main {
height: 402px;
overflow-y: auto;
overflow-x: hidden;
padding: 6px 0;
.box3-item {
display: flex;
height: 77px;
width: 749px;
margin-left: 21px;
border-bottom: 1px solid rgba(240, 242, 244, 1);
cursor: pointer;
&:hover {
background: var(--color-bg-hover);
}
.left {
width: 72px;
height: 48px;
margin-top: 15px;
img {
width: 100%;
height: 100%;
border-radius: 4px;
}
}
.right {
width: 657px;
margin-left: 20px;
.right-top {
width: 657px;
display: flex;
justify-content: space-between;
&:hover {
text-decoration: underline;
color: var(--color-main-active);
.title {
color: var(--color-main-active);
}
}
.title {
margin-top: 13px;
width: 500px;
height: 24px;
color: rgba(59, 65, 75, 1);
font-family: Microsoft YaHei;
font-size: 16px;
font-weight: 700;
line-height: 24px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.time {
width: 157px;
text-align: right;
height: 22px;
margin-top: 19px;
color: rgba(95, 101, 108, 1);
font-family: Microsoft YaHei;
font-size: 14px;
font-weight: 400;
line-height: 22px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
.right-footer {
width: 657px;
height: 24px;
color: rgba(59, 65, 75, 1);
font-family: Microsoft YaHei;
font-size: 16px;
font-weight: 400;
line-height: 24px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
}
}
}
</style>
<template>
<div class="search-box">
<div class="search-header-container">
<div class="home-main-header-center">
<el-input
v-model="store.searchBillText"
@keyup.enter="handleSearch"
style="width: 680px; height: 100%"
:placeholder="store.searchData.placeholder"
/>
<div class="search">
<div class="search-icon">
<img src="@/assets/icons/search-icon.png" alt="" />
</div>
<div class="search-text" @click="handleSearch">搜索</div>
</div>
</div>
<div class="home-main-header-btn-box">
<div class="btn" @click="handleToPosi('position1')">
<div class="btn-text">{{ "最新动态" }}</div>
<div class="btn-icon">
<img src="@/assets/icons/arrow-right-icon.png" alt="" />
</div>
</div>
<div class="btn" @click="handleToPosi('position2')">
<div class="btn-text">{{ "资讯要闻" }}</div>
<div class="btn-icon">
<img src="@/assets/icons/arrow-right-icon.png" alt="" />
</div>
</div>
<div class="btn" @click="handleToPosi('position3')">
<div class="btn-text">{{ "数据总览" }}</div>
<div class="btn-icon">
<img src="@/assets/icons/arrow-right-icon.png" alt="" />
</div>
</div>
<div class="btn" @click="handleToPosi('position4')">
<div class="btn-text">{{ "资源库" }}</div>
<div class="btn-icon">
<img src="@/assets/icons/arrow-right-icon.png" alt="" />
</div>
</div>
</div>
</div>
</div>
</template>
<script setup>
import { onMounted, ref, computed, onUnmounted, nextTick, watch, watchEffect } from "vue";
import router from "@/router/index";
import { useWrittingAsstaintStore } from "@/stores/writtingAsstaintStore";
const store = useWrittingAsstaintStore();
const handleSearch = () => {
window.sessionStorage.setItem("curTabName", `搜索-${store.searchBillText}`);
const curRoute = router.resolve({
path: "/searchResults",
query: {
searchText: store.searchBillText,
areaName: store.searchData.areaName
}
});
window.open(curRoute.href, "_blank");
};
let containerRef = computed(() => store.searchData.containerRef);
const handleToPosi = id => {
const element = document.getElementById(id);
if (element && containerRef.value) {
// 2. 使用 nextTick 等待 DOM 布局(如高度切换)完成后再进行坐标计算
nextTick(() => {
const containerRect = containerRef.value.getBoundingClientRect();
const elementRect = element.getBoundingClientRect();
// 使用 getBoundingClientRect 计算元素相对于容器顶部的绝对距离
const top = elementRect.top - containerRect.top + containerRef.value.scrollTop;
containerRef.value.scrollTo({
top: top,
behavior: "smooth"
});
});
}
};
</script>
<style lang="scss" scoped>
.search-box {
width: 100%;
// background: #fff;
// box-shadow: 0px 0px 15px 0px rgba(22, 119, 255, 0.1);
.search-header-container {
width: 100%;
margin: 0 auto;
// padding: 16px 0px 16px 0px;
}
.home-main-header-center {
// margin-top: 20px;
// margin-left: 200px;
width: 800px;
height: 48px;
border-radius: 10px;
// box-shadow: 0px 0px 15px 0px rgba(22, 119, 255, 0.1);
border: 1px solid var(--color-primary-35);
background: rgba(255, 255, 255, 1);
box-sizing: border-box;
padding: 1px;
position: relative;
&:hover {
border: 1px solid var(--color-main-active);
}
.search {
position: absolute;
right: -1px;
top: 0px;
width: 120px;
height: 46px;
border-radius: 10px;
background: var(--color-main-active);
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
.search-icon {
width: 18px;
height: 18px;
img {
width: 100%;
height: 100%;
}
}
.search-text {
margin-left: 8px;
height: 22px;
color: #fff;
font-family: Microsoft YaHei;
font-size: 16px;
font-weight: 400;
line-height: 22px;
}
}
}
.home-main-header-btn-box {
margin-top: 16px;
// margin-left: 200px;
display: flex;
gap: 16px;
.btn {
display: flex;
align-items: center;
gap: 9px;
width: 140px;
height: 36px;
border: 1px solid #aed6ff;
box-sizing: border-box;
border-radius: 24px;
background: #e7f3ff;
cursor: pointer;
position: relative;
&:hover {
background: #cae3fc;
}
.btn-text {
width: 80px;
color: var(--color-main-active);
font-family: Microsoft YaHei;
font-size: 20px;
font-weight: 400;
line-height: 48px;
margin-left: 24px;
text-align: center;
}
.btn-icon {
position: absolute;
top: 10px;
right: 19px;
width: 6px;
height: 12px;
img {
width: 100%;
height: 100%;
}
}
}
}
}
</style>
<template>
<div class="search-container" v-show="!isShow">
<div class="search-main">
<input v-model="store.searchBillText" :placeholder="placeholder" @keyup.enter="handleSearch" class="search-input" />
<div class="search-btn" @click="handleSearch">
<img src="@/assets/icons/search-icon.png" alt />
搜索
</div>
</div>
<div class="search-center" v-if="countInfo.length">
<div class="search-item" v-for="info in countInfo">
<div class="search-item-num">{{ info.count }}</div>
<div class="search-item-name">{{ info.name }}</div>
</div>
</div>
<div class="search-bottom">
<div class="btn" @click="handleToPosi('position1')">
<div class="btn-text">最新动态</div>
<div class="btn-icon">
<img src="@/assets/icons/arrow-right-icon.png" alt />
</div>
</div>
<div class="btn" @click="handleToPosi('position2')">
<div class="btn-text">咨询要闻</div>
<div class="btn-icon">
<img src="@/assets/icons/arrow-right-icon.png" alt />
</div>
</div>
<div class="btn" @click="handleToPosi('position3')">
<div class="btn-text">数据总览</div>
<div class="btn-icon">
<img src="@/assets/icons/arrow-right-icon.png" alt />
</div>
</div>
<div class="btn" @click="handleToPosi('position4')">
<div class="btn-text">资源库</div>
<div class="btn-icon">
<img src="@/assets/icons/arrow-right-icon.png" alt />
</div>
</div>
</div>
</div>
</template>
<script setup>
import { ref, nextTick, watchEffect, onMounted } from "vue";
import { useContainerScroll } from "@/hooks/useScrollShow";
import { useRouter } from "vue-router";
import { useWrittingAsstaintStore } from "@/stores/writtingAsstaintStore";
const store = useWrittingAsstaintStore();
const router = useRouter();
let { countInfo, containerRef, placeholder, areaName } = defineProps({
countInfo: {
type: Array,
default: () => []
},
containerRef: {
type: Object,
default: {}
},
placeholder: {
type: String,
default: ""
},
areaName: {
type: String,
default: "法案"
}
});
const handleSearch = () => {
window.sessionStorage.setItem("curTabName", `搜索-${store.searchBillText}`);
if (!areaName) return;
const curRoute = router.resolve({
path: "/searchResults",
query: {
searchText: store.searchBillText,
areaName: areaName
}
});
window.open(curRoute.href, "_blank");
};
let homeMainRef = ref(containerRef);
const { isShow } = useContainerScroll(homeMainRef);
watchEffect(() => {
if (isShow.value) {
homeMainRef.value.classList.add("scroll-main");
homeMainRef.value.classList.add("scrollHomeMain");
} else {
homeMainRef.value.classList.remove("scroll-main");
homeMainRef.value.classList.remove("scrollHomeMain");
}
store.changeIsShowSearchBar(isShow.value);
});
store.setSearchData({ placeholder, areaName,containerRef:homeMainRef });
// 锚点跳转
const handleToPosi = id => {
const element = document.getElementById(id);
if (element && homeMainRef.value) {
// 如果当前还未显示吸顶搜索栏,先强制切换状态以稳定布局
if (!isShow.value) {
isShow.value = true;
}
// 使用 nextTick 确保 DOM 状态更新(高度变化生效)后再计算
nextTick(() => {
const containerRect = homeMainRef.value.getBoundingClientRect();
const elementRect = element.getBoundingClientRect();
// 使用 getBoundingClientRect 计算元素相对于容器顶部的绝对距离,不受嵌套布局影响
const top = elementRect.top - containerRect.top + homeMainRef.value.scrollTop;
homeMainRef.value.scrollTo({
top: top,
behavior: "smooth"
});
});
}
};
</script>
<style lang="scss" scoped>
.search-container {
width: 960px;
height: 168px;
margin: 0 auto 68px auto;
.search-center {
width: 688px;
height: 48px;
margin: 0 auto;
margin-top: 36px;
display: flex;
justify-content: space-between;
.search-item {
width: 130px;
height: 57px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
.search-item-num {
font-family: Microsoft YaHei;
font-style: Bold;
font-size: 36px;
font-weight: 700;
line-height: 22px;
letter-spacing: 0px;
text-align: center;
color: rgba(5, 95, 194, 1);
}
.search-item-name {
font-family: Microsoft YaHei;
font-style: Regular;
font-size: 16px;
font-weight: 400;
line-height: 24px;
letter-spacing: 0px;
text-align: center;
color: rgba(95, 101, 108, 1);
}
}
}
.search-main {
display: flex;
padding-right: 3px;
align-items: center;
justify-content: space-between;
box-shadow: 0px 0px 20px 0px rgba(25, 69, 130, 0.1);
width: 960px;
height: 48px;
background-color: rgba(255, 255, 255, 0.65);
border-radius: 10px;
border: 1px solid #fff;
&:hover {
border: 1px solid var(--color-main-active);
}
.search-input {
border: none;
outline: none;
width: 838px;
height: 48px;
background-color: transparent;
font-size: 14px;
padding: 12px 16px;
font-weight: 400;
font-family: "Microsoft YaHei";
line-height: 22px;
color: rgba(59, 65, 75, 1);
&::placeholder {
color: #a8abb2;
}
}
.search-btn {
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
width: 120px;
height: 46px;
margin-right: -3px;
border-radius: 8px;
background-color: rgb(5, 95, 194);
font-size: 16px;
font-weight: 400;
font-family: "Microsoft YaHei";
line-height: 22px;
color: #fff;
img {
width: 18px;
height: 18px;
margin-right: 8px;
}
}
}
.search-bottom {
width: 688px;
height: 48px;
margin: 0 auto;
margin-top: 36px;
display: flex;
justify-content: space-between;
// gap: 16px;
.btn {
display: flex;
align-items: center;
gap: 9px;
width: 160px;
height: 48px;
border: 1px solid #aed6ff;
box-sizing: border-box;
border-radius: 24px;
background: #e7f3ff;
cursor: pointer;
position: relative;
&:hover {
background: #cae3fc;
}
.btn-text {
width: 80px;
color: var(--color-main-active);
font-family: Microsoft YaHei;
font-size: 20px;
font-weight: 400;
line-height: 48px;
margin-left: 36px;
text-align: center;
}
.btn-icon {
position: absolute;
top: 16px;
right: 19px;
width: 6px;
height: 12px;
img {
width: 100%;
height: 100%;
}
}
}
}
}
</style>
<template>
<div class="tag-wrapper" :class="classObject">
{{ tagName }}
</div>
</template>
<script setup>
import { ref, computed, onMounted } from 'vue'
const props = defineProps({
tagName: {
type: String,
default: '标签名称'
}
})
const classObject = computed(() => ({
'tag1': props.tagName === '人工智能',
'tag2': props.tagName === '生物科技',
'tag3': props.tagName === '新一代通信网络',
'tag4': props.tagName === '量子科技',
'tag5': props.tagName === '新能源',
'tag6': props.tagName === '集成电路',
'tag7': props.tagName === '海洋',
'tag8': props.tagName === '先进制造',
'tag9': props.tagName === '新材料',
'tag10': props.tagName === '航空航天',
'tag11': props.tagName === '太空',
'tag12': props.tagName === '深海',
'tag13': props.tagName === '极地',
'tag14': props.tagName === '核',
'tag15': props.tagName === '其他',
}))
</script>
<style lang="scss" scoped>
.tag-wrapper {
height: 24px;
padding: 0 8px;
line-height: 24px;
text-align: center;
font-family: Microsoft YaHei;
font-style: Regular;
font-size: 14px;
font-weight: 400;
letter-spacing: 0px;
box-sizing: border-box;
border-radius: 4px;
}
.tag1 {
border: 1px solid rgba(255, 163, 158, 1);
background: rgba(255, 241, 240, 1);
color: rgba(245, 34, 45, 1);
}
.tag2 {
border: 1px solid rgba(135, 232, 222, 1);
background: rgba(230, 255, 251, 1);
color: rgba(19, 168, 168, 1);
}
.tag3 {
border: 1px solid rgba(174, 214, 255, 1);
background: rgba(246, 250, 255, 1);
color: rgba(5, 95, 194, 1);
}
.tag4 {
border: 1px solid rgba(211, 173, 247, 1);
background: rgba(249, 240, 255, 1);
color: rgba(114, 46, 209, 1);
}
.tag5 {
border: 1px solid rgba(183, 235, 143, 1);
background: rgba(246, 255, 237, 1);
color: rgba(82, 196, 26, 1);
}
.tag6 {
border: 1px solid rgba(145, 202, 255, 1);
background: rgba(230, 244, 255, 1);
color: rgba(22, 119, 255, 1);
}
.tag7 {
border: 1px solid rgba(156, 207, 245, 1);
background: rgba(241, 247, 250, 1);
color: rgba(15, 120, 199, 1);
}
.tag8 {
border: 1px solid rgba(255, 229, 143, 1);
background: rgba(255, 251, 230, 1);
color: rgba(250, 173, 20, 1);
}
.tag9 {
border: 1px solid rgba(255, 213, 145, 1);
background: rgba(255, 247, 230, 1);
color: rgba(250, 140, 22, 1);
}
.tag10 {
border: 1px solid rgba(173, 198, 255, 1);
background: rgba(240, 245, 255, 1);
color: rgba(47, 84, 235, 1);
}
.tag11 {
border: 1px solid rgba(173, 198, 255, 1);
background: rgba(240, 245, 255, 1);
color: rgba(47, 84, 235, 1);
}
.tag12 {
border: 1px solid rgba(116, 146, 203, 1);
background: rgba(230, 244, 255, 1);
color: rgba(73, 104, 161, 1);
}
.tag13 {
border: 1px solid rgba(214, 228, 255, 1);
background: rgba(240, 245, 255, 1);
color: rgba(133, 165, 255, 1);
}
.tag14 {
border: 1px solid rgba(255, 187, 150, 1);
background: rgba(255, 242, 232, 1);
color: rgba(250, 84, 28, 1);
}
.tag15 {
border: 1px solid rgba(183, 235, 143, 1);
background: rgba(246, 255, 237, 1);
color: rgba(82, 196, 26, 1);
}
</style>
\ No newline at end of file
<template>
<div class="left-btn-wrapper">
<img src="@/assets/images/icon/card-btn-left.png" alt="">
</div>
</template>
<script setup>
</script>
<style lang="scss" scoped>
.left-btn-wrapper {
width: 24px;
height: 48px;
img {
width: 100%;
height: 100%;
}
}
</style>
\ No newline at end of file
<template>
<div class="right-btn-wrapper">
<img src="@/assets/images/icon/card-btn-right.png" alt="">
</div>
</template>
<script setup>
</script>
<style lang="scss" scoped>
.right-btn-wrapper {
width: 24px;
height: 48px;
img {
width: 100%;
height: 100%;
}
}
</style>
\ No newline at end of file
...@@ -28,6 +28,7 @@ export function useContainerScroll(containerRef, options = {}) { ...@@ -28,6 +28,7 @@ export function useContainerScroll(containerRef, options = {}) {
lastScrollTop.value = currentScrollTop lastScrollTop.value = currentScrollTop
ticking.value = false ticking.value = false
} }
const handleScroll = () => { const handleScroll = () => {
...@@ -42,6 +43,7 @@ export function useContainerScroll(containerRef, options = {}) { ...@@ -42,6 +43,7 @@ export function useContainerScroll(containerRef, options = {}) {
} }
onMounted(() => { onMounted(() => {
console.log('containerRef', containerRef)
const container = containerRef.value const container = containerRef.value
if (container) { if (container) {
container.addEventListener('scroll', handleScroll, { passive: true }) container.addEventListener('scroll', handleScroll, { passive: true })
......
...@@ -12,6 +12,12 @@ import "./styles/main.css"; ...@@ -12,6 +12,12 @@ import "./styles/main.css";
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'
import AreaTag from '@/components/areaTag.vue'
import leftBtn from "@/components/pageBtn/leftBtn.vue";
import rightBtn from "@/components/pageBtn/rightBtn.vue";
import OverviewBox from '@/components/BoxBackground/overviewBox.vue'
import AnalysisBox from '@/components/BoxBackground/analysisBox.vue'
// 引入 Pinia 实例 // 引入 Pinia 实例
import pinia from './stores' import pinia from './stores'
const app = createApp(App); const app = createApp(App);
...@@ -29,4 +35,9 @@ app.use(ElementPlus, { ...@@ -29,4 +35,9 @@ app.use(ElementPlus, {
}) })
app.use(pinia) // 挂载 Pinia app.use(pinia) // 挂载 Pinia
app.component("CardTitle", CardTitle); app.component("CardTitle", CardTitle);
app.component('AreaTag', AreaTag)
app.component('leftBtn', leftBtn)
app.component('rightBtn', rightBtn)
app.component('OverviewBox', OverviewBox)
app.component('AnalysisBox', AnalysisBox)
app.mount("#app"); app.mount("#app");
...@@ -42,7 +42,15 @@ export const useWrittingAsstaintStore = defineStore('writtingAsstaint', { ...@@ -42,7 +42,15 @@ export const useWrittingAsstaintStore = defineStore('writtingAsstaint', {
], ],
// 内部控制器 // 内部控制器
abortController: null abortController: null,
isShowSearchBar: false,
searchBillText:'',
searchData:{
placeholder:'',
areaName:'',
containerRef:null
},
}), }),
getters: { getters: {
...@@ -60,7 +68,15 @@ export const useWrittingAsstaintStore = defineStore('writtingAsstaint', { ...@@ -60,7 +68,15 @@ export const useWrittingAsstaintStore = defineStore('writtingAsstaint', {
toggleEditMode() { toggleEditMode() {
this.isEditMode = !this.isEditMode this.isEditMode = !this.isEditMode
}, },
// 设置navbar是否显示搜索框
changeIsShowSearchBar(value){
this.isShowSearchBar = value
},
setSearchData({placeholder,areaName,containerRef}){
this.searchData.placeholder = placeholder
this.searchData.areaName = areaName
this.searchData.containerRef = containerRef
},
resetGenerateState() { resetGenerateState() {
this.isGenerating = false; this.isGenerating = false;
this.isShowProcess = false; this.isShowProcess = false;
......
...@@ -60,6 +60,7 @@ ...@@ -60,6 +60,7 @@
<el-select <el-select
v-model="methodValue" v-model="methodValue"
placeholder="全部制裁手段" placeholder="全部制裁手段"
placement="bottom-end"
class="custom-select" class="custom-select"
@change="getUSChinaSanctionTrendData" @change="getUSChinaSanctionTrendData"
> >
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<img class="icon" src="../../assets/icons/title-icon1.png" /> <img class="icon" src="../../assets/icons/title-icon1.png" />
<img class="text" src="../../assets/icons/title-text1.svg" /> <img class="text" src="../../assets/icons/title-text1.svg" />
</div> </div>
<div style="display: flex; height: 650px; width: 100%"> <div style="display: flex; height: 650px; width: 100%;padding-top: 24px;">
<div style="width: 50%"> <div style="width: 50%">
<div <div
style=" style="
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
</div> </div>
</div> </div>
<div style="width: 672px; height: 486px; padding-top: 50px" id="char"></div> <div style="width: 100%; height: 620px; padding-top: 24px" id="char"></div>
</div> </div>
<div style="width: 778px; height: 620px; overflow: auto"> <div style="width: 778px; height: 620px; overflow: auto">
<el-table <el-table
...@@ -53,7 +53,8 @@ ...@@ -53,7 +53,8 @@
> >
<!-- 自定义展开图标 --> <!-- 自定义展开图标 -->
<el-table-column prop="targetName" label="指标名称" width="350" /> <el-table-column prop="targetName" label="指标名称" width="350" >
</el-table-column>
<el-table-column prop="usScore" label="美国"> <el-table-column prop="usScore" label="美国">
<template #default="scope"> <template #default="scope">
<div style="display: flex"> <div style="display: flex">
...@@ -79,7 +80,7 @@ ...@@ -79,7 +80,7 @@
<el-table-column prop="chinaScore" label="中国"> <el-table-column prop="chinaScore" label="中国">
<template #default="scope"> <template #default="scope">
<div style="display: flex"> <div style="display: flex">
<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.chinaScore" :percentage="scope.row.chinaScore"
:stroke-width="20" :stroke-width="20"
...@@ -998,19 +999,20 @@ const handleClickBottomBtn = () => { ...@@ -998,19 +999,20 @@ const handleClickBottomBtn = () => {
/* 自定义未展开图标 */ /* 自定义未展开图标 */
:deep(.el-table__expand-icon) { :deep(.el-table__expand-icon) {
background-image: url("./icon/arrowDown.png"); background-image: url("./icon/arrowRight.png");
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: contain; // background-size: contain;
width: 24px; margin-left: 16px;
height: 24px; margin-top: 4px;
cursor: pointer; cursor: pointer;
transition: transform 0.3s; transition: transform 0.1s;
} }
/* 自定义展开图标 */ /* 自定义展开图标 */
:deep(.el-table__expand-icon--expanded) { :deep(.el-table__expand-icon--expanded) {
background-image: url("./icon/arrowDown.png"); background-image: url("./icon/arrowRight.png");
transform: rotate(270deg) !important; transform-origin:center;
transform: rotate(90deg) !important;
} }
/* 自定义表头背景颜色 */ /* 自定义表头背景颜色 */
...@@ -1043,7 +1045,7 @@ const handleClickBottomBtn = () => { ...@@ -1043,7 +1045,7 @@ const handleClickBottomBtn = () => {
} }
:deep(.el-table .el-table__cell) { :deep(.el-table .el-table__cell) {
padding-left: 5px; padding-left: 1px;
padding-right: 5px; padding-right: 1px;
} }
</style> </style>
...@@ -17,7 +17,7 @@ const radarChart = (nameList, valueList) => { ...@@ -17,7 +17,7 @@ const radarChart = (nameList, valueList) => {
const option = { const option = {
title: { text: '' }, title: { text: '' },
radar: { radar: {
radius: '75%', // 雷达图本身占容器 75% radius: '70%', // 雷达图本身占容器 75%
indicator: nameList.map(name => ({ indicator: nameList.map(name => ({
name: name, name: name,
max: maxValue * 1.2 // 设置最大值为数据最大值的120% max: maxValue * 1.2 // 设置最大值为数据最大值的120%
...@@ -25,13 +25,14 @@ const radarChart = (nameList, valueList) => { ...@@ -25,13 +25,14 @@ const radarChart = (nameList, valueList) => {
axisName: { axisName: {
color: '#ffffff', color: '#ffffff',
fontSize: 18, fontSize: 18,
lineHeight: 24,
fontWeight: 700, fontWeight: 700,
backgroundColor: '#0560C3', backgroundColor: '#0560C3',
borderRadius: 20, borderRadius: 20,
padding: [8, 20], padding: [8, 12],
formatter: function (txt) { formatter: function (txt) {
const len = txt.length; const len = txt.length;
if (len <= 5) return txt; if (len <= 8) return txt;
const br = Math.ceil(len / 2); const br = Math.ceil(len / 2);
return txt.substring(0, br) + '\n' + txt.substring(br); return txt.substring(0, br) + '\n' + txt.substring(br);
} }
......
...@@ -1215,9 +1215,16 @@ onUnmounted(() => { ...@@ -1215,9 +1215,16 @@ onUnmounted(() => {
display: flex; display: flex;
cursor: pointer; cursor: pointer;
&:hover { // &:hover {
background: var(--color-bg-hover); // //background: var(--color-bg-hover);
} // .item-right {
// .text{
// color:var(--color-main-active);
// }
// }
// }
.itemLeftStatus1 { .itemLeftStatus1 {
color: rgba(245, 34, 45, 1) !important; color: rgba(245, 34, 45, 1) !important;
...@@ -1291,11 +1298,11 @@ onUnmounted(() => { ...@@ -1291,11 +1298,11 @@ onUnmounted(() => {
width: 780px; width: 780px;
display: flex; display: flex;
cursor: pointer; cursor: pointer;
background: var(--color-bg-hover); // background: var(--color-bg-hover);
&:hover { // &:hover {
background: var(--color-bg-hover); // background: var(--color-bg-hover);
} // }
.itemLeftStatus1 { .itemLeftStatus1 {
color: rgba(245, 34, 45, 1) !important; color: rgba(245, 34, 45, 1) !important;
...@@ -1341,6 +1348,7 @@ onUnmounted(() => { ...@@ -1341,6 +1348,7 @@ onUnmounted(() => {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
text-decoration: underline;
} }
.time { .time {
......
<template> <template>
<div class="home-wrapper"> <div class="home-wrapper">
<div class="search-header" v-show="isShow"> <div class="search-header" v-show="false">
<div class="search-header-container"> <div class="search-header-container">
<div class="home-main-header-center"> <div class="home-main-header-center">
<el-input <el-input
v-model="searchBillText" v-model="searchBillText"
...@@ -57,7 +56,13 @@ ...@@ -57,7 +56,13 @@
</div> </div>
</div> --> </div> -->
<div class="home-main"> <div class="home-main">
<div class="home-main-header"> <SearchContainer
v-if="containerRef"
placeholder="搜索科技法案"
:containerRef="containerRef"
areaName="法案"
/>
<div class="home-main-header" v-if="false">
<div class="home-main-header-center" v-show="!isShow"> <div class="home-main-header-center" v-show="!isShow">
<el-input <el-input
v-model="searchBillText" v-model="searchBillText"
...@@ -164,19 +169,9 @@ ...@@ -164,19 +169,9 @@
{{ bill.billName }} {{ bill.billName }}
</div> </div>
<div class="box1-main-left-info"> <div class="box1-main-left-info">
<div <AreaTag v-for="(item, index) in bill.hylyList"
class="info-box" :key="index" :tagName="item.industryName"></AreaTag>
:class="{
info1: index === 0,
info2: index === 1,
info3: index === 2,
info4: index === 3
}"
v-for="(item, index) in bill.hylyList"
:key="index"
>
{{ item.industryName }}
</div>
</div> </div>
<div class="box1-main-left-info1"> <div class="box1-main-left-info1">
<div class="info1-box"> <div class="info1-box">
...@@ -272,46 +267,7 @@ ...@@ -272,46 +267,7 @@
</div> </div>
<DivideHeader id="position2" class="divide2" :titleText="'资讯要闻'"></DivideHeader> <DivideHeader id="position2" class="divide2" :titleText="'资讯要闻'"></DivideHeader>
<div class="center-center"> <div class="center-center">
<div class="box3"> <NewsList :list="newsList.slice(0, 5)"/>
<div class="box3-header">
<div class="box3-header-left">
<div class="box3-header-icon">
<img src="./assets/images/box3-header-icon.png" alt="" />
</div>
<div class="box3-header-title">{{ "新闻资讯" }}</div>
<div class="more" @click="handleToMoreNews">{{ "更多 +" }}</div>
</div>
</div>
<div class="box3-main">
<div
class="box3-item"
v-for="(news, index) in newsList.slice(0, 5)"
:key="index"
@click="handleClickToNewsDetail(news)"
>
<div class="left">
<img
:src="getProxyUrl(news.newsImage) || defaultNew"
alt=""
referrerpolicy="no-referrer"
@error="e => (e.target.src = News1)"
/>
</div>
<div class="right">
<div class="right-top">
<div class="title">{{ news.newsTitle }}</div>
<div class="time">
{{ news.newsDate ? news.newsDate.slice(5) : "" }} - {{ news.newsOrg }}
</div>
</div>
<div class="right-footer">{{ news.newsContent }}</div>
<!-- <CommonPrompt :content="news.newsContent">
<div class="right-footer">{{ news.newsContent }}</div>
</CommonPrompt> -->
</div>
</div>
</div>
</div>
<div class="box4"> <div class="box4">
<div class="box4-header"> <div class="box4-header">
<div class="header-icon"> <div class="header-icon">
...@@ -395,7 +351,7 @@ ...@@ -395,7 +351,7 @@
}" }"
> >
<el-empty v-if="!box5HasData" description="暂无数据" :image-size="100" /> <el-empty v-if="!box5HasData" description="暂无数据" :image-size="100" />
<div v-else id="box5Chart" style="width: 100%; height: 100%;"></div> <div v-else id="box5Chart" style="width: 100%; height: 100%"></div>
</div> </div>
</div> </div>
<div class="box6"> <div class="box6">
...@@ -836,6 +792,7 @@ import Ghd from "@/assets/icons/ghd.png"; ...@@ -836,6 +792,7 @@ import Ghd from "@/assets/icons/ghd.png";
import Mzd from "@/assets/icons/mzd.png"; import Mzd from "@/assets/icons/mzd.png";
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
import AreaTag from "@/components/areaTag.vue";
const searchBillText = ref(""); const searchBillText = ref("");
...@@ -1119,7 +1076,7 @@ const handleGetNews = async () => { ...@@ -1119,7 +1076,7 @@ const handleGetNews = async () => {
const res = await getNews(params); const res = await getNews(params);
console.log("新闻资讯", res); console.log("新闻资讯", res);
if (res.code === 200) { if (res.code === 200) {
newsList.value = res.data; newsList.value = res.data||[];
} }
} catch (error) {} } catch (error) {}
}; };
...@@ -1875,8 +1832,9 @@ onUnmounted(() => { ...@@ -1875,8 +1832,9 @@ onUnmounted(() => {
.scrollHomeBox { .scrollHomeBox {
height: calc(100% - 144px); height: calc(100% - 144px);
} }
.home-top-bg{ .home-top-bg {
background: url("./assets/images/background.png"),linear-gradient(180.00deg, rgba(229, 241, 254, 1) 0%,rgba(246, 251, 255, 0) 30%); background:
url("./assets/images/background.png"), linear-gradient(180deg, rgba(229, 241, 254, 1) 0%, rgba(246, 251, 255, 0) 30%);
background-size: 100% 100%; background-size: 100% 100%;
position: absolute; position: absolute;
width: 100%; width: 100%;
...@@ -1916,7 +1874,7 @@ onUnmounted(() => { ...@@ -1916,7 +1874,7 @@ onUnmounted(() => {
box-sizing: border-box; box-sizing: border-box;
padding: 1px; padding: 1px;
position: relative; position: relative;
border: 1px solid rgba(255,255,255,1); border: 1px solid rgba(255, 255, 255, 1);
&:hover { &:hover {
border: 1px solid var(--color-main-active); border: 1px solid var(--color-main-active);
} }
...@@ -2147,42 +2105,6 @@ onUnmounted(() => { ...@@ -2147,42 +2105,6 @@ onUnmounted(() => {
margin-top: 17px; margin-top: 17px;
display: flex; display: flex;
gap: 8px; gap: 8px;
.info-box {
max-width: 80px;
height: 24px;
text-align: center;
overflow: hidden;
padding: 0 8px;
box-sizing: border-box;
border: 1px solid rgba(186, 224, 255, 1);
border-radius: 4px;
background: rgba(230, 244, 255, 1);
color: rgba(22, 119, 255, 1);
font-family: Microsoft YaHei;
font-size: 14px;
font-weight: 400;
line-height: 24px;
}
.info1 {
border: 1px solid rgba(135, 232, 222, 1);
background: rgba(230, 255, 251, 1);
color: rgba(19, 168, 168, 1);
}
.info2 {
border: 1px solid rgba(186, 224, 255, 1);
background: rgba(230, 244, 255, 1);
color: rgba(22, 119, 255, 1);
}
.info3 {
border: 1px solid rgba(255, 229, 143, 1);
background: rgba(255, 251, 230, 1);
color: rgba(250, 173, 20, 1);
}
.info4 {
border: 1px solid rgba(255, 163, 158, 1);
background: rgba(255, 241, 240, 1);
color: rgba(245, 34, 45, 1);
}
} }
.box1-main-left-info1 { .box1-main-left-info1 {
margin-top: 25px; margin-top: 25px;
......
<template> <template>
<div class="ask-page"> <div class="ask-page">
<div class="left"> <div class="left">
<div class="left-title">
<NewsList :list="leftList" :errImg="defaultNews"/>
<!-- <div class="left-title">
<img src="./assets/icon01.png" alt=""> <img src="./assets/icon01.png" alt="">
<div class="tit">新闻资讯</div> <div class="tit">新闻资讯</div>
<div class="more" @click="handleToMoreNews">更多 +</div> <div class="more" @click="handleToMoreNews">更多 +</div>
...@@ -23,7 +26,7 @@ ...@@ -23,7 +26,7 @@
<div class="time">{{ item.time }}</div> <div class="time">{{ item.time }}</div>
</div> </div>
</div> </div>
</div> </div> -->
</div> </div>
<div class="right"> <div class="right">
<div class="right-title"> <div class="right-title">
...@@ -92,13 +95,14 @@ const getCoopRestrictionNewsData = async () => { ...@@ -92,13 +95,14 @@ const getCoopRestrictionNewsData = async () => {
try { try {
const res = await getCoopRestrictionNews({ moduleId: "0106" }); const res = await getCoopRestrictionNews({ moduleId: "0106" });
if (res && res.code === 200) { if (res && res.code === 200) {
leftList.value = (res.data || []).map(item => ({ leftList.value = res.data || []
id: item.newsId, // leftList.value = (res.data || []).map(item => ({
title: item.newsTitle, // id: item.newsId,
content: item.newsContent, // title: item.newsTitle,
time: `${item.newsDate}${item.newsOrg ? ' · ' + item.newsOrg : ''}`, // content: item.newsContent,
image: item.newsImage // time: `${item.newsDate}${item.newsOrg ? ' · ' + item.newsOrg : ''}`,
})); // image: item.newsImage
// }));
} }
} catch (error) { } catch (error) {
console.error("获取合作限制新闻资讯数据失败:", error); console.error("获取合作限制新闻资讯数据失败:", error);
......
<template> <template>
<div class="coop-page"> <div class="coop-page">
<!-- 吸顶简易搜索框 --> <!-- 吸顶简易搜索框 -->
<div class="search-header" v-show="isShow">
<div class="home-main-header-center">
<input v-model="input" class="search-input" placeholder="搜索合作限制" />
<div class="search-btn-small" @click="handleSearch">
<div class="search-icon">
<img src="./assets/icons/search-icon.png" alt="" />
</div>
<div class="search-text">搜索</div>
</div>
</div>
<div class="home-main-header-btn-box">
<div class="btn" @click="handleToPosi('position1')">
<div class="btn-text">最新动态</div>
<div class="btn-icon">
<img src="@/assets/icons/arrow-right-icon.png" alt="" />
</div>
</div>
<div class="btn" @click="handleToPosi('position2')">
<div class="btn-text">咨询要闻</div>
<div class="btn-icon">
<img src="@/assets/icons/arrow-right-icon.png" alt="" />
</div>
</div>
<div class="btn" @click="handleToPosi('position3')">
<div class="btn-text">数据总览</div>
<div class="btn-icon">
<img src="@/assets/icons/arrow-right-icon.png" alt="" />
</div>
</div>
<div class="btn" @click="handleToPosi('position4')">
<div class="btn-text">资源库</div>
<div class="btn-icon">
<img src="@/assets/icons/arrow-right-icon.png" alt="" />
</div>
</div>
</div>
</div>
<!-- 面包屑 --> <!-- 面包屑 -->
<!-- <div class="breadcrumb" v-show="!isShow"> <!-- <div class="breadcrumb" v-show="!isShow">
...@@ -51,55 +14,13 @@ ...@@ -51,55 +14,13 @@
<!-- 主页面 --> <!-- 主页面 -->
<div class="main-content" ref="homeMainRef" :class="{ 'scroll-main': isShow }"> <div class="main-content" ref="homeMainRef" :class="{ 'scroll-main': isShow }">
<!-- 搜索栏部分 --> <!-- 搜索栏部分 -->
<div class="search" v-show="!isShow"> <SearchContainer
<div class="search-main"> v-if="homeMainRef"
<input v-model="input" placeholder="搜索合作限制" class="search-input" /> placeholder="搜索合作限制"
<div class="search-btn"> :containerRef="homeMainRef"
<img src="./assets/icons/search-icon.png" alt="" /> areaName=""
搜索 />
</div>
</div>
<!-- <div class="search-center">
<div class="search-item">
<div class="search-item-num">32</div>
<div class="search-item-name">相关法案</div>
</div>
<div class="search-item">
<div class="search-item-num">9</div>
<div class="search-item-name">相关政令</div>
</div>
<div class="search-item">
<div class="search-item-num">41</div>
<div class="search-item-name">相关政府公告</div>
</div>
</div> -->
<div class="search-bottom">
<div class="btn" @click="handleToPosi('position1')">
<div class="btn-text">最新动态</div>
<div class="btn-icon">
<img src="@/assets/icons/arrow-right-icon.png" alt="" />
</div>
</div>
<div class="btn" @click="handleToPosi('position2')">
<div class="btn-text">咨询要闻</div>
<div class="btn-icon">
<img src="@/assets/icons/arrow-right-icon.png" alt="" />
</div>
</div>
<div class="btn" @click="handleToPosi('position3')">
<div class="btn-text">数据总览</div>
<div class="btn-icon">
<img src="@/assets/icons/arrow-right-icon.png" alt="" />
</div>
</div>
<div class="btn" @click="handleToPosi('position4')">
<div class="btn-text">资源库</div>
<div class="btn-icon">
<img src="@/assets/icons/arrow-right-icon.png" alt="" />
</div>
</div>
</div>
</div>
<!-- 最新动态 --> <!-- 最新动态 -->
<div class="newdata" id="position1"> <div class="newdata" id="position1">
<com-title title="最新动态" /> <com-title title="最新动态" />
......
...@@ -2,7 +2,70 @@ ...@@ -2,7 +2,70 @@
<div class="introduction-wrap"> <div class="introduction-wrap">
<div class="left"> <div class="left">
<div class="box1"> <div class="box1">
<div class="box-header"> <analysis-box title="基本信息" :showAllBtn="false">
<div class="box1-main">
<div class="box1-main-left" v-if="basicInfo.img">
<img :src="basicInfo.img" alt="" />
</div>
<div v-else class="box1-main-left-img-mock">
<img class="img-mock-badge-img" src="./assets/images/badge.png">
<p class="img-mock-badge-title">{{ basicInfo.eName }}</p>
<p class="img-mock-badge-org">The White House</p>
</div>
<div class="box1-main-right">
<div class="item">
<div class="item-left">{{ "政令全称:" }}</div>
<div class="item-right">{{ basicInfo.name }}</div>
</div>
<div class="item">
<div class="item-left">{{ "英文全称:" }}</div>
<div class="item-right text" v-if="basicInfo.eName?.length < 60">
{{ basicInfo.eName }}
</div>
<el-popover v-else effect="dark" :width="500" :content="basicInfo.eName" placement="top-start">
<template #reference>
<div class="item-right text">
{{ basicInfo.eName }}
</div>
</template>
</el-popover>
</div>
<div class="item">
<div class="item-left">{{ "相关领域:" }}</div>
<div class="item-right tag-box">
<div class="tag" v-for="(area, index) in basicInfo.areaList" :key="index">
{{ area.industryName }}
</div>
</div>
</div>
<div class="item">
<div class="item-left">{{ "签署时间:" }}</div>
<div class="item-right text">{{ basicInfo.signTime }}</div>
</div>
<div class="item">
<div class="item-left">{{ "发布机构:" }}</div>
<div class="item-right text">
{{ basicInfo.proposeOrgName }}
</div>
</div>
<div class="item">
<div class="item-left">{{ "政令编号:" }}</div>
<div class="item-right text">
{{ basicInfo.bh }}
</div>
</div>
<div class="item">
<div class="item-left">{{ "执行期限:" }}</div>
<div class="item-right text">
{{ basicInfo.deadline + " 天" }}
</div>
</div>
</div>
</div>
</analysis-box>
<!-- <div class="box-header">
<div class="header-left"> <div class="header-left">
</div> </div>
...@@ -76,10 +139,31 @@ ...@@ -76,10 +139,31 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div> -->
</div> </div>
<div class="box2"> <div class="box2">
<div class="box-header"> <analysis-box title="主要指令" :showAllBtn="false">
<div class="box2-main">
<el-empty v-if="!curmajorList.length" description="暂无数据" :image-size="100" />
<div class="box2-item" v-for="(item, index) in curmajorList" :key="index">
<div class="id">{{ index + 1 }}</div>
<div class="title">{{ item.content }}</div>
<!-- <div class="open">
<img src="./assets/images/open-icon.png" alt="" />
</div> -->
</div>
</div>
<div class="box2-footer">
<div class="box2-footer-left">{{ `共 ${majorListNum} 项` }}</div>
<div class="box2-footer-right">
<el-pagination @current-change="handleCurrentChange" :page-size="5" background layout="prev, pager, next"
:total="majorListNum" />
</div>
</div>
</analysis-box>
<!-- <div class="box-header">
<div class="header-left"></div> <div class="header-left"></div>
<div class="title">主要指令</div> <div class="title">主要指令</div>
<div class="header-right"> <div class="header-right">
...@@ -96,23 +180,76 @@ ...@@ -96,23 +180,76 @@
<div class="box2-item" v-for="(item, index) in curmajorList" :key="index"> <div class="box2-item" v-for="(item, index) in curmajorList" :key="index">
<div class="id">{{ index + 1 }}</div> <div class="id">{{ index + 1 }}</div>
<div class="title">{{ item.content }}</div> <div class="title">{{ item.content }}</div>
<!-- <div class="open">
<img src="./assets/images/open-icon.png" alt="" />
</div> -->
</div> </div>
</div> </div>
<div class="box2-footer"> <div class="box2-footer">
<div class="box2-footer-left">{{ `共 ${majorListNum} 项` }}</div> <div class="box2-footer-left">{{ `共 ${majorListNum} 项` }}</div>
<div class="box2-footer-right"> <div class="box2-footer-right">
<el-pagination @current-change="handleCurrentChange" :page-size="5" background <el-pagination @current-change="handleCurrentChange" :page-size="5" background layout="prev, pager, next"
layout="prev, pager, next" :total="majorListNum" /> :total="majorListNum" />
</div>
</div> </div>
</div> -->
</div> </div>
</div> </div>
<div class="right"> <div class="right">
<div class="box3"> <div class="box3">
<div class="box-header"> <analysis-box title="发布机构" :showAllBtn="false">
<div class="box3-top">
<div class="box3-top-top" @click="handleToInstitution(box3TopTopData)">
<div class="left">
<img :src="box3TopTopData.logo ? box3TopTopData.logo : DefaultIcon2" alt="" />
</div>
<div class="right">
<div class="name">{{ box3TopTopData.name + " >" }}</div>
<div class="ename">{{ box3TopTopData.eName }}</div>
</div>
<!-- <div class="more">
<div class="text">{{ "查看官网" }}</div>
<div class="icon">
<img src="./assets/images/open-icon.png" alt="" />
</div>
</div> -->
</div>
<div class="box3-top-bottom">
<div class="box3-top-bottom-header">
<div class="icon">
<img src="./assets/images/box3-icon1.png" alt="" />
</div>
<div class="text">{{ "关键人物" }}</div>
</div>
<div class="box3-top-bottom-main">
<div class="box3-top-bottom-item" v-for="(item, index) in box3TopBottomData" :key="index">
<div class="box3-top-bottom-item-left">
<img :src="item.avatar ? item.avatar : DefaultIcon1" alt="" />
</div>
<div class="box3-top-bottom-item-right">
<div class="name">{{ item.name }}</div>
<div class="position">{{ item.job }}</div>
</div>
</div>
</div>
</div>
</div>
<div class="box3-bottom">
<div class="box3-bottom-header">
<div class="header-icon">
<img src="./assets/images/box3-bottom-header-icon.png" alt="" />
</div>
<div class="header-title">{{ "机构动态" }}</div>
</div>
<div class="box3-bottom-main">
<el-timeline style="max-width: 500px">
<el-timeline-item :timestamp="item.newsDate" placement="top"
v-for="(item, index) in eventList?.slice(0, 3)" :key="index">
<div class="timeline-content">
{{ item.newsContent }}
</div>
</el-timeline-item>
</el-timeline>
</div>
</div>
</analysis-box>
<!-- <div class="box-header">
<div class="header-left"></div> <div class="header-left"></div>
<div class="title">发布机构</div> <div class="title">发布机构</div>
<div class="header-right"> <div class="header-right">
...@@ -133,12 +270,6 @@ ...@@ -133,12 +270,6 @@
<div class="name">{{ box3TopTopData.name + " >" }}</div> <div class="name">{{ box3TopTopData.name + " >" }}</div>
<div class="ename">{{ box3TopTopData.eName }}</div> <div class="ename">{{ box3TopTopData.eName }}</div>
</div> </div>
<!-- <div class="more">
<div class="text">{{ "查看官网" }}</div>
<div class="icon">
<img src="./assets/images/open-icon.png" alt="" />
</div>
</div> -->
</div> </div>
<div class="box3-top-bottom"> <div class="box3-top-bottom">
<div class="box3-top-bottom-header"> <div class="box3-top-bottom-header">
...@@ -170,14 +301,14 @@ ...@@ -170,14 +301,14 @@
<div class="box3-bottom-main"> <div class="box3-bottom-main">
<el-timeline style="max-width: 500px"> <el-timeline style="max-width: 500px">
<el-timeline-item :timestamp="item.newsDate" placement="top" <el-timeline-item :timestamp="item.newsDate" placement="top"
v-for="(item, index) in eventList?.slice(0,3)" :key="index"> v-for="(item, index) in eventList?.slice(0, 3)" :key="index">
<div class="timeline-content"> <div class="timeline-content">
{{ item.newsContent }} {{ item.newsContent }}
</div> </div>
</el-timeline-item> </el-timeline-item>
</el-timeline> </el-timeline>
</div> </div>
</div> </div> -->
</div> </div>
</div> </div>
</div> </div>
...@@ -198,6 +329,7 @@ import { ...@@ -198,6 +329,7 @@ import {
import DefaultIcon1 from "@/assets/icons/default-icon1.png"; import DefaultIcon1 from "@/assets/icons/default-icon1.png";
import DefaultIcon2 from "@/assets/icons/default-icon2.png"; import DefaultIcon2 from "@/assets/icons/default-icon2.png";
import AnalysisBox from "@/components/BoxBackground/analysisBox.vue";
const route = useRoute(); const route = useRoute();
const decreeId = ref(route.query.id); const decreeId = ref(route.query.id);
...@@ -444,9 +576,9 @@ onMounted(() => { ...@@ -444,9 +576,9 @@ onMounted(() => {
margin-top: 16px; margin-top: 16px;
width: 1064px; width: 1064px;
height: 414px; height: 414px;
border-radius: 10px; // border-radius: 10px;
box-shadow: 0px 0px 15px 0px rgba(60, 87, 126, 0.2); // box-shadow: 0px 0px 15px 0px rgba(60, 87, 126, 0.2);
background: rgba(255, 255, 255, 1); // background: rgba(255, 255, 255, 1);
.box1-main { .box1-main {
display: flex; display: flex;
...@@ -461,7 +593,8 @@ onMounted(() => { ...@@ -461,7 +593,8 @@ onMounted(() => {
// height: 100%; // height: 100%;
} }
} }
.box1-main-left-img-mock{
.box1-main-left-img-mock {
width: 240px; width: 240px;
height: 332px; height: 332px;
margin-left: 24px; margin-left: 24px;
...@@ -470,17 +603,20 @@ onMounted(() => { ...@@ -470,17 +603,20 @@ onMounted(() => {
align-items: center; align-items: center;
flex-direction: column; flex-direction: column;
padding: 16px; padding: 16px;
.img-mock-badge-img{
.img-mock-badge-img {
width: 80px; width: 80px;
height: 80px; height: 80px;
} }
.img-mock-badge-title{
.img-mock-badge-title {
text-align: center; text-align: center;
font-size: 20px; font-size: 20px;
line-height: 28px; line-height: 28px;
color: #fff; color: #fff;
} }
.img-mock-badge-org{
.img-mock-badge-org {
text-align: center; text-align: center;
font-size: 14px; font-size: 14px;
color: #fff; color: #fff;
...@@ -543,9 +679,9 @@ onMounted(() => { ...@@ -543,9 +679,9 @@ onMounted(() => {
margin-top: 16px; margin-top: 16px;
width: 1064px; width: 1064px;
height: 415px; height: 415px;
border-radius: 10px; // border-radius: 10px;
box-shadow: 0px 0px 15px 0px rgba(60, 87, 126, 0.2); // box-shadow: 0px 0px 15px 0px rgba(60, 87, 126, 0.2);
background: rgba(255, 255, 255, 1); // background: rgba(255, 255, 255, 1);
.box2-main { .box2-main {
margin-left: 22px; margin-left: 22px;
...@@ -631,9 +767,9 @@ onMounted(() => { ...@@ -631,9 +767,9 @@ onMounted(() => {
margin-top: 16px; margin-top: 16px;
width: 520px; width: 520px;
height: 845px; height: 845px;
border-radius: 10px; // border-radius: 10px;
box-shadow: 0px 0px 15px 0px rgba(60, 87, 126, 0.2); // box-shadow: 0px 0px 15px 0px rgba(60, 87, 126, 0.2);
background: rgba(255, 255, 255, 1); // background: rgba(255, 255, 255, 1);
.box3-top { .box3-top {
margin-top: 2px; margin-top: 2px;
......
<template> <template>
<div class="home-wrapper"> <div class="home-wrapper">
<div class="search-header" v-show="isShow">
<div class="home-main-header-center">
<el-input
v-model="searchExportControlText"
@keyup.enter="handleSearch"
style="width: 800px; height: 100%"
placeholder="搜索出口管制"
/>
<div class="search">
<div class="search-icon">
<img src="@/assets/icons/search-icon.png" alt="" />
</div>
<div class="search-text" @click="handleSearch">搜索</div>
</div>
</div>
<div class="home-main-header-btn-box">
<div class="btn" @click="handleToPosi('position1')">
<div class="btn-text">{{ "最新动态" }}</div>
<div class="btn-icon">
<img src="@/assets/icons/arrow-right-icon.png" alt="" />
</div>
</div>
<div class="btn" @click="handleToPosi('position2')">
<div class="btn-text">{{ "资讯要闻" }}</div>
<div class="btn-icon">
<img src="@/assets/icons/arrow-right-icon.png" alt="" />
</div>
</div>
<div class="btn" @click="handleToPosi('position3')">
<div class="btn-text">{{ "数据总览" }}</div>
<div class="btn-icon">
<img src="@/assets/icons/arrow-right-icon.png" alt="" />
</div>
</div>
<div class="btn" @click="handleToPosi('position4')">
<div class="btn-text">{{ "资源库" }}</div>
<div class="btn-icon">
<img src="@/assets/icons/arrow-right-icon.png" alt="" />
</div>
</div>
</div>
</div>
<!-- <div class="home-header" v-show="!isShow"> <!-- <div class="home-header" v-show="!isShow">
<div class="header-left"> <div class="header-left">
<HeaderMenu></HeaderMenu> <HeaderMenu></HeaderMenu>
...@@ -50,43 +9,15 @@ ...@@ -50,43 +9,15 @@
<headerInfo curTitleName="出口管制"></headerInfo> <headerInfo curTitleName="出口管制"></headerInfo>
</div> </div>
</div> --> </div> -->
<div class="home-main" ref="homeMainRef" :class="{ 'scroll-main': isShow }"> <div class="home-main" ref="homeMainRef" >
<div class="home-main-header"> <div class="home-main-header">
<div class="home-main-header-center" v-show="!isShow"> <SearchContainer
<el-input v-model="searchExportControlText" style="width: 800px; height: 100%" placeholder="搜索出口管制" /> style="margin-bottom: 0; margin-top: 48px; height: fit-content"
<div class="search"> v-if="homeMainRef"
<div class="search-icon"> placeholder="搜索出口管制"
<img src="@/assets/icons/search-icon.png" alt="" /> :containerRef="homeMainRef"
</div> areaName="实体清单"
<div class="search-text" @click="handleSearch">搜索</div> />
</div>
</div>
<div class="home-main-header-btn-box" v-show="!isShow">
<div class="btn" @click="handleToPosi('position1')">
<div class="btn-text">{{ "最新动态" }}</div>
<div class="btn-icon">
<img src="@/assets/icons/arrow-right-icon.png" alt="" />
</div>
</div>
<div class="btn" @click="handleToPosi('position2')">
<div class="btn-text">{{ "资讯要闻" }}</div>
<div class="btn-icon">
<img src="@/assets/icons/arrow-right-icon.png" alt="" />
</div>
</div>
<div class="btn" @click="handleToPosi('position3')">
<div class="btn-text">{{ "数据总览" }}</div>
<div class="btn-icon">
<img src="@/assets/icons/arrow-right-icon.png" alt="" />
</div>
</div>
<div class="btn" @click="handleToPosi('position4')">
<div class="btn-text">{{ "资源库" }}</div>
<div class="btn-icon">
<img src="@/assets/icons/arrow-right-icon.png" alt="" />
</div>
</div>
</div>
<div class="home-main-header-footer-info"> <div class="home-main-header-footer-info">
<InfoCard <InfoCard
v-for="(item, index) in infoList" v-for="(item, index) in infoList"
...@@ -253,7 +184,8 @@ ...@@ -253,7 +184,8 @@
<el-row :gutter="15" style="width: 1600px; margin: 0 auto; height: 528px; margin-top: 64px"> <el-row :gutter="15" style="width: 1600px; margin: 0 auto; height: 528px; margin-top: 64px">
<CustomTitle id="position2" title="资讯要闻" /> <CustomTitle id="position2" title="资讯要闻" />
<el-col :span="12"> <el-col :span="12">
<custom-container title="新闻资讯" :titleIcon="newsIcon" height="450px"> <NewsList :list="newsList" :defaultImg="newsImg" />
<!-- <custom-container title="新闻资讯" :titleIcon="newsIcon" height="450px">
<template #header-right> <template #header-right>
<el-button type="primary" link @click="handleToMoreNews"> <el-button type="primary" link @click="handleToMoreNews">
{{ "更多 +" }} {{ "更多 +" }}
...@@ -265,7 +197,7 @@ ...@@ -265,7 +197,7 @@
<NewsList :list-data="newsList" @item-click="item => handleNewsInfoClick(item)" /> <NewsList :list-data="newsList" @item-click="item => handleNewsInfoClick(item)" />
</div> </div>
</template> </template>
</custom-container> </custom-container> -->
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<custom-container title="社交媒体" :titleIcon="dialogIcon" height="450px"> <custom-container title="社交媒体" :titleIcon="dialogIcon" height="450px">
...@@ -740,7 +672,9 @@ import CustomContainer from "@/components/Container/index.vue"; ...@@ -740,7 +672,9 @@ import CustomContainer from "@/components/Container/index.vue";
import ClickableCard from "./components/link.vue"; import ClickableCard from "./components/link.vue";
import InfoCard from "./components/info.vue"; import InfoCard from "./components/info.vue";
import CustomTitle from "./components/title.vue"; import CustomTitle from "./components/title.vue";
import NewsList from "./components/news.vue"; // import NewsList from "./components/news.vue";
import newsImg from "@/assets/images/news-img.png";
import MessageBubble from "./components/dialog.vue"; import MessageBubble from "./components/dialog.vue";
import CommonPrompt from "./commonPrompt/index.vue"; import CommonPrompt from "./commonPrompt/index.vue";
import RuleSubsidiaryDialog from "./components/RuleSubsidiaryDialog.vue"; import RuleSubsidiaryDialog from "./components/RuleSubsidiaryDialog.vue";
......
...@@ -8,9 +8,16 @@ ...@@ -8,9 +8,16 @@
<headerInfo curTitleName="投融资限制"></headerInfo> <headerInfo curTitleName="投融资限制"></headerInfo>
</div> </div>
</div> --> </div> -->
<div class="home-main"> <div class="home-main" ref="containerRef">
<div class="home-main-header"> <div class="home-main-header">
<div class="home-main-header-center"> <div class="home-main-header-center">
<SearchContainer
style="margin-bottom: 0; height: fit-content"
v-if="containerRef"
placeholder="搜索投融资限制政策"
:containerRef="containerRef"
areaName=""
/>
<!-- <el-input <!-- <el-input
v-model="searchKey" v-model="searchKey"
style="width: 100%; height: 48px" style="width: 100%; height: 48px"
...@@ -18,13 +25,13 @@ ...@@ -18,13 +25,13 @@
placeholder="搜索出口管制调查" placeholder="搜索出口管制调查"
:suffix-icon="Search" :suffix-icon="Search"
/> --> /> -->
<el-input v-model="searchKey" style="width: 800px; height: 100%" placeholder="搜索出口管制政策" /> <!-- <el-input v-model="searchKey" style="width: 800px; height: 100%" placeholder="搜索出口管制政策" />
<div class="search"> <div class="search">
<div class="search-icon"> <div class="search-icon">
<img src="@/assets/icons/search-icon.png" alt="" /> <img src="@/assets/icons/search-icon.png" alt="" />
</div> </div>
<div class="search-text">搜索</div> <div class="search-text">搜索</div>
</div> </div> -->
</div> </div>
<!-- <div class="home-main-header-footer"> <!-- <div class="home-main-header-footer">
<div class="home-main-header-footer-item"> <div class="home-main-header-footer-item">
...@@ -40,7 +47,7 @@ ...@@ -40,7 +47,7 @@
<div class="item-footer">关键和新型技术清单</div> <div class="item-footer">关键和新型技术清单</div>
</div> </div>
</div> --> </div> -->
<div class="home-main-header-btn-box"> <!-- <div class="home-main-header-btn-box">
<div class="btn" @click="scrollToTop('position1')"> <div class="btn" @click="scrollToTop('position1')">
<div class="btn-text">{{ "最新动态" }}</div> <div class="btn-text">{{ "最新动态" }}</div>
<div class="btn-icon"> <div class="btn-icon">
...@@ -65,7 +72,7 @@ ...@@ -65,7 +72,7 @@
<img src="@/assets/icons/arrow-right-icon.png" alt="" /> <img src="@/assets/icons/arrow-right-icon.png" alt="" />
</div> </div>
</div> </div>
</div> </div> -->
<!-- <div class="home-main-header-footer-link"> <!-- <div class="home-main-header-footer-link">
<ClickableCard text="最新动态" @click="scrollToTop('position1')" target="_blank" /> <ClickableCard text="最新动态" @click="scrollToTop('position1')" target="_blank" />
<ClickableCard text="资讯要闻" @click="scrollToTop('position2')" target="_blank" /> <ClickableCard text="资讯要闻" @click="scrollToTop('position2')" target="_blank" />
...@@ -177,7 +184,9 @@ ...@@ -177,7 +184,9 @@
<el-row :gutter="20" style="width: 1600px; margin: 0 auto"> <el-row :gutter="20" style="width: 1600px; margin: 0 auto">
<CustomTitle id="position2" title="资讯要闻" style="margin-top: 64px" /> <CustomTitle id="position2" title="资讯要闻" style="margin-top: 64px" />
<el-col :span="12"> <el-col :span="12">
<custom-container title="新闻资讯" :titleIcon="newsIcon" height="450px"> <NewsList :list="customNewsData" />
<!-- <custom-container title="新闻资讯" :titleIcon="newsIcon" height="450px">
<template #header-right> <template #header-right>
<el-button type="primary" link @click="handleToMoreNews"> <el-button type="primary" link @click="handleToMoreNews">
{{ "更多 +" }} {{ "更多 +" }}
...@@ -189,7 +198,7 @@ ...@@ -189,7 +198,7 @@
<NewsList :list-data="customNewsData" /> <NewsList :list-data="customNewsData" />
</div> </div>
</template> </template>
</custom-container> </custom-container> -->
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<custom-container title="社交媒体" :titleIcon="dialogIcon" height="450px"> <custom-container title="社交媒体" :titleIcon="dialogIcon" height="450px">
...@@ -530,7 +539,7 @@ import CustomContainer from "@/components/Container/index.vue"; ...@@ -530,7 +539,7 @@ import CustomContainer from "@/components/Container/index.vue";
import ClickableCard from "./components/link.vue"; import ClickableCard from "./components/link.vue";
import InfoCard from "./components/info.vue"; import InfoCard from "./components/info.vue";
import CustomTitle from "./components/title.vue"; import CustomTitle from "./components/title.vue";
import NewsList from "./components/news.vue"; // import NewsList from "./components/news.vue";
import MessageBubble from "./components/dialog.vue"; import MessageBubble from "./components/dialog.vue";
import trumpAvatar from "@/assets/images/icon-trump.png"; import trumpAvatar from "@/assets/images/icon-trump.png";
...@@ -590,7 +599,7 @@ const handleToMoreNews = () => { ...@@ -590,7 +599,7 @@ const handleToMoreNews = () => {
const route = router.resolve("/newsBrief"); const route = router.resolve("/newsBrief");
window.open(route.href, "_blank"); window.open(route.href, "_blank");
}; };
let containerRef = ref(null);
const billList = ref([]); const billList = ref([]);
const curBillListIndex = ref(0); const curBillListIndex = ref(0);
...@@ -648,38 +657,38 @@ const entityList = ref([ ...@@ -648,38 +657,38 @@ const entityList = ref([
const customNewsData = ref([ const customNewsData = ref([
{ {
image: newsImg, newsImage: newsImg,
title: "美国智库激辩人工智能监管路径", title: "美国智库激辩人工智能监管路径",
time: "11-4", newsDate: "11-4",
source: "华盛顿邮报", newsOrg: "华盛顿邮报",
description: "各方就AI监管模式展开讨论。有观点认为碎片化州级监管比全面联邦法规更灵活,也有分析..." description: "各方就AI监管模式展开讨论。有观点认为碎片化州级监管比全面联邦法规更灵活,也有分析..."
}, },
{ {
image: newsImg, newsImage: newsImg,
title: "美国智库激辩人工智能监管路径", title: "美国智库激辩人工智能监管路径",
time: "11-4", newsDate: "11-4",
source: "华盛顿邮报", newsOrg: "华盛顿邮报",
description: "各方就AI监管模式展开讨论。有观点认为碎片化州级监管比全面联邦法规更灵活,也有分析..." description: "各方就AI监管模式展开讨论。有观点认为碎片化州级监管比全面联邦法规更灵活,也有分析..."
}, },
{ {
image: newsImg, newsImage: newsImg,
title: "美国智库激辩人工智能监管路径", title: "美国智库激辩人工智能监管路径",
time: "11-4", newsDate: "11-4",
source: "华盛顿邮报", newsOrg: "华盛顿邮报",
description: "各方就AI监管模式展开讨论。有观点认为碎片化州级监管比全面联邦法规更灵活,也有分析..." description: "各方就AI监管模式展开讨论。有观点认为碎片化州级监管比全面联邦法规更灵活,也有分析..."
}, },
{ {
image: newsImg, newsImage: newsImg,
title: "美国智库激辩人工智能监管路径", title: "美国智库激辩人工智能监管路径",
time: "11-4", newsDate: "11-4",
source: "华盛顿邮报", newsOrg: "华盛顿邮报",
description: "各方就AI监管模式展开讨论。有观点认为碎片化州级监管比全面联邦法规更灵活,也有分析..." description: "各方就AI监管模式展开讨论。有观点认为碎片化州级监管比全面联邦法规更灵活,也有分析..."
}, },
{ {
image: newsImg, newsImage: newsImg,
title: "美国智库激辩人工智能监管路径", title: "美国智库激辩人工智能监管路径",
time: "11-4", newsDate: "11-4",
source: "华盛顿邮报", newsOrg: "华盛顿邮报",
description: "各方就AI监管模式展开讨论。有观点认为碎片化州级监管比全面联邦法规更灵活,也有分析..." description: "各方就AI监管模式展开讨论。有观点认为碎片化州级监管比全面联邦法规更灵活,也有分析..."
} }
]); ]);
...@@ -1702,52 +1711,7 @@ onMounted(async () => { ...@@ -1702,52 +1711,7 @@ onMounted(async () => {
line-height: 30px; line-height: 30px;
margin-top: 43px; margin-top: 43px;
} }
.home-main-header-center {
margin: 0 auto;
margin-top: 20px;
width: 800px;
height: 48px;
border-radius: 10px;
box-shadow: 0px 0px 15px 0px rgba(22, 119, 255, 0.1);
background: rgba(255, 255, 255, 1);
box-sizing: border-box;
padding: 1px;
position: relative;
border: 1px solid transparent;
&:hover {
border: 1px solid var(--color-main-active);
}
.search {
position: absolute;
right: -1px;
top: 0px;
width: 120px;
height: 46px;
border-radius: 10px;
background: var(--color-main-active);
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
.search-icon {
width: 18px;
height: 18px;
img {
width: 100%;
height: 100%;
}
}
.search-text {
margin-left: 8px;
height: 22px;
color: #fff;
font-family: Microsoft YaHei;
font-size: 16px;
font-weight: 400;
line-height: 22px;
}
}
}
.home-main-header-footer { .home-main-header-footer {
margin-top: 38px; margin-top: 38px;
width: 700px; width: 700px;
......
差异被折叠。
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论