提交 48010a36 authored 作者: coderBryanFu's avatar coderBryanFu

feat:更新搜索模块,更新数据资源库

上级 ae9116f2
......@@ -53,7 +53,7 @@
</div>
</div>
</div>
<div class="menu-box" v-show="isShowMenu" @mouseenter="handleHoverMenu(true)"
<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, 1)">
......@@ -64,9 +64,9 @@
</div>
</div>
</div>
<div class="tool-box" v-show="isShowTool" @mouseenter="handleHoverTool(true)"
<div class="tool-box" v-if="isShowTool" @mouseenter="handleHoverTool(true)"
@mouseleave="handleHoverTool(false)">
<div class="menu-content">
<div class="tool-content">
<div class="menu-item" v-for="(item, index) in toolList" :key="index" @click="handleToModule(item, 2)">
<div class="icon">
<img :src="item.icon" alt="" />
......@@ -805,23 +805,6 @@ onMounted(() => {
}
.menu-box {
// position: absolute;
// z-index: 999999999;
// width: 713px;
// height: 413px;
// top: 52px;
// left: 0;
// box-sizing: border-box;
// border-radius: 10px;
// backdrop-filter: blur(10px);
// -webkit-backdrop-filter: blur(10px);
// box-shadow: 0px 8px 32px 0px rgba(31, 38, 135, 0.15);
// background: rgba(255, 255, 255, 0.25);
// backdrop-filter: blur(10px);
// -webkit-backdrop-filter: blur(10px);
// border: 1px solid rgba(255, 255, 255, 0.3);
// background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.2) 100%);
// box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.2);
position: absolute;
z-index: 999999;
width: 713px;
......@@ -902,21 +885,17 @@ onMounted(() => {
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;
.tool-content {
width: 130px;
height: 120px;
margin-top: 8px;
margin-left: 72px;
.menu-item {
margin-top: 36px;
width: 280px;
width: 100%;
height: 24px;
display: flex;
cursor: pointer;
&:hover {
.title {
color: var(--color-main-active);
......
import { useRouter } from "vue-router";
const router = useRouter()
// 跳转法案详情
export const goToBill = (id, tabName) => {
window.sessionStorage.setItem("billId", id);
window.sessionStorage.setItem("curTabName", tabName);
const route = router.resolve({
path: "/billLayout",
query: {
billId: id
}
});
window.open(route.href, "_blank");
};
// 跳转政令详情
export const goToDecree = (id, tabName) => {
window.sessionStorage.setItem("decreeId", id);
window.sessionStorage.setItem("curTabName", tabName);
const route = router.resolve({
path: "/decreeLayout",
query: {
id: id
}
});
window.open(route.href, "_blank");
};
// 跳转智库
export const goToThinkTank = (id, tabName) => {
window.sessionStorage.setItem("curTabName", tabName);
const route = router.resolve({
name: "ReportDetail",
params: {
id: id
}
});
window.open(route.href, "_blank");
}
// 跳转机构详情
export const goToInstitution = (id, tabName) => {
window.sessionStorage.setItem('curTabName', tabName)
const curRoute = router.resolve({
path: "/institution",
query: {
id: id
}
});
window.open(curRoute.href, "_blank");
}
\ No newline at end of file
<template>
<div class="wrapper">
<div class="wrapper" ref="container" v-loading="isLoading" element-loading-text="数据加载中,请稍候...">
<div class="header">
<div class="search-box">
<div class="left">
<div class="icon">
<img src="./assets/images/search-icon1.png" alt="" />
</div>
<el-input v-model="keyword" :border="false" style="width: 900px" @keyup.enter="handleSearch" />
<el-input v-model="keyword" :border="false" style="width: 900px" @keyup.enter="handleSearch(true)" />
</div>
<div class="right" @click="handleToAi">
<img src="./assets/images/ai-icon.png" alt="" />
......@@ -14,13 +14,8 @@
</div>
<div class="tab-box">
<div class="tab-left">
<div
class="tab"
:class="{ tabActive: activeTabId === item.id }"
v-for="(item, index) in tabList"
:key="index"
@click="handleClickTab(item.name, item.id)"
>
<div class="tab" :class="{ tabActive: activeTabId === item.id }" v-for="(item, index) in tabList" :key="index"
@click="handleClickTab(item.name, item.id)">
{{ item.name }}
</div>
</div>
......@@ -32,21 +27,15 @@
</div> -->
</div>
<div class="tag-box">
<div
class="tag"
:class="{ tagActive: item.selected }"
@click="handleClickDomains(item)"
v-for="item in domains"
:key="item.id"
>
<div class="tag" :class="{ tagActive: item.selected }" @click="handleClickDomains(item)" v-for="item in domains"
:key="item.id">
{{ item.name }}
</div>
</div>
<div class="info-box">
<div class="info-left">
<div class="text-box">
搜索结果<span class="text-1">{{ totalNum }}</span
>
搜索结果<span class="text-1">{{ totalNum }}</span>
</div>
<div class="text-box">
搜索关键词:<span class="text-2">{{ keyword }}</span>
......@@ -55,14 +44,14 @@
当前领域:<span class="text-2">{{ curArea }}</span>
</div> -->
</div>
<!-- <div class="info-right">
<el-select v-model="selectTime" placeholder="选择时间" style="width: 125px">
<el-option v-for="item in timeList" :key="item.value" :label="item.label" :value="item.value" />
<div class="info-right">
<el-select v-model="selectOrder" placeholder="请选择排序条件" style="width: 125px" @change="handleOrderChange">
<el-option v-for="item in orderList" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
<el-select v-model="selectRelation" placeholder="选择相关度" style="width: 125px">
<!-- <el-select v-model="selectRelation" placeholder="选择相关度" style="width: 125px">
<el-option v-for="item in relationList" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</div> -->
</el-select> -->
</div>
</div>
<!-- <div class="summary-box">
<div class="summary-header">
......@@ -86,7 +75,7 @@
</div>
</div> -->
</div>
<div class="main" v-if="curArea !== '实体清单'">
<div class="main" v-if="curArea !== '实体清单'" >
<div class="item" v-for="(item, index) in searchResults" :key="index" @click="handleToPage(item)">
<div class="item-left" v-if="item.img">
<img :src="item?.img" alt="" />
......@@ -102,8 +91,9 @@
</div>
</div>
</div>
<el-empty v-if="!searchResults.length"></el-empty>
</div>
<div class="main1" v-if="curArea === '实体清单'">
<div class="main1" v-if="curArea === '实体清单'" >
<div class="item" v-for="(item, index) in searchResults" :key="index" @click="handleToPage(item)">
<div class="main-header">
<div class="title" v-html="item?.originalTitle"></div>
......@@ -112,7 +102,7 @@
</div>
</div>
<div class="entity-box">
<div class="entity" v-for="val,idx in item.sanctionList" :key="idx" @click.prevent="handleCompClick(val)">
<div class="entity" v-for="val, idx in item.sanctionList" :key="idx">
<div class="icon">
<img src="./assets/images/warning.png" alt="">
</div>
......@@ -122,16 +112,11 @@
<div class="content" v-html="item?.originalDescription"></div>
<div class="time" v-if="item.date">{{ item?.date }}</div>
</div>
<el-empty v-if="!searchResults.length"></el-empty>
</div>
<div class="footer">
<el-pagination
@current-change="handleChangeCurrentPage"
:size="pageSize"
:current-page="currentPage"
background
layout="prev, pager, next"
:total="totalNum"
/>
<el-pagination @current-change="handleChangeCurrentPage" :size="pageSize" :current-page="currentPage" background
layout="prev, pager, next" :total="totalNum < 500 ? totalNum : 500" />
</div>
</div>
</template>
......@@ -148,10 +133,43 @@ import Img3 from "./assets/images/img3.png";
import { ElMessage } from "element-plus";
const route = useRoute();
const container = ref(null)
const isLoading = ref(false)
const selectTime = ref("全部时间");
const selectOrder = ref(2);
const selectRelation = ref("相关度优先");
const handleOrderChange = () => {
// alert(selectOrder.value)
currentPage.value = 1
handleSearch(true)
}
const orderList = ref([
{
label: "按时间倒序",
value: 2
},
{
label: "按评分倒序",
value: 0
},
]);
const relationList = ref([
{
label: "相关度优先",
value: "相关度优先"
},
{
label: "相关度优先1",
value: "相关度优先1"
},
{
label: "相关度优先2",
value: "相关度优先2"
}
]);
const keyword = ref("");
const tabList = ref([
......@@ -167,17 +185,30 @@ const tabList = ref([
name: "政令",
id: 2
},
{
name: "智库",
id: 3
},
// {
// name: "智库",
// id: 3
// },
{
name: "智库报告",
id: 4
},
{
name: "实体清单",
id: 5
// id: 5,
id: 10,
},
{
name: "商业管制清单",
id: 11
},
{
name: "SDN清单",
id: 14
},
{
name: "涉军企业清单",
id: 15
},
{
name: "人物",
......@@ -205,39 +236,10 @@ const handleClickTab = (name, id) => {
curArea.value = name;
domains.value = [];
selectedDomains.value = [];
handleSearch();
currentPage.value = 1
handleSearch(true);
};
const timeList = ref([
{
label: "全部时间",
value: "全部时间"
},
{
label: "2025年",
value: "2025年"
},
{
label: "2024年",
value: "2024年"
}
]);
const relationList = ref([
{
label: "相关度优先",
value: "相关度优先"
},
{
label: "相关度优先1",
value: "相关度优先1"
},
{
label: "相关度优先2",
value: "相关度优先2"
}
]);
// 关联检索
const relatedSearchList = ref([
"金融制度是如何建立的?",
......@@ -263,7 +265,11 @@ const totalNum = ref(0);
const handleChangeCurrentPage = page => {
currentPage.value = page;
handleSearch();
container.value?.scrollTo({
top: 0,
behavior: 'smooth' // 平滑滚动
})
handleSearch(false);
};
const domains = ref([
......@@ -282,8 +288,11 @@ const handleClickDomains = domain => {
return item.selected;
})
.map(item => item.name);
console.log("selectedDomains", selectedDomains.value);
handleSearch();
// 页码初始化为1
currentPage.value = 1
handleSearch(true);
};
function highlightText(text, keyword) {
......@@ -293,22 +302,25 @@ function highlightText(text, keyword) {
return text.replace(regex, '<span style="color: red; font-weight: bold;">$1</span>');
}
const handleSearch = async () => {
const handleSearch = async (isShowResultTip) => {
isLoading.value = true
let params;
if (activeTabId.value) {
params = {
size: pageSize.value,
page: currentPage.value,
keyword: keyword.value, // "出口"
keyword: keyword.value,
type: activeTabId.value == 100 ? '' : activeTabId.value,
domains: selectedDomains.value
domains: selectedDomains.value,
sort: selectOrder.value
};
} else {
params = {
size: pageSize.value,
page: currentPage.value,
keyword: keyword.value, // "出口"
domains: selectedDomains.value
keyword: keyword.value,
domains: selectedDomains.value,
sort: selectOrder.value
};
}
try {
......@@ -321,23 +333,37 @@ const handleSearch = async () => {
id,
selected: false
}));
}
}
searchResults.value = res.data.records;
searchResults.value.forEach(item => {
item.titleText = item.originalTitle
item.originalTitle = highlightText(item.originalTitle, keyword.value);
item.originalDescription = highlightText(item.originalDescription, keyword.value);
});
totalNum.value = res.data.total;
totalNum.value = res.data.total
if (totalNum.value) {
ElMessage.success(`共计搜索到${totalNum.value}条结果`);
if (isShowResultTip) {
ElMessage.success(`共计搜索到${totalNum.value}条结果`);
}
} else {
ElMessage.warning(`共计搜索到${totalNum.value}条结果`);
if (isShowResultTip) {
ElMessage.warning(`共计搜索到${totalNum.value}条结果`);
}
}
} else {
ElMessage.warning("当前条件共搜索到0条结果!");
if (isShowResultTip) {
ElMessage.warning("当前条件共搜索到0条结果!");
}
}
} catch (error) {}
} catch (error) {
console.error('error', error);
} finally {
isLoading.value = false
}
};
const handleToPage = async item => {
......@@ -392,9 +418,13 @@ const handleToPage = async item => {
ElMessage.warning("获取人物全局信息错误");
return;
}
} catch (error) {}
} catch (error) { }
}
window.sessionStorage.setItem("curTabName", item.titleText);
// window.sessionStorage.setItem(
// "curTabName",
// item.date + item.title
// );
let curRoute;
switch (item.typeStr) {
case "法案":
......@@ -430,42 +460,109 @@ const handleToPage = async item => {
});
break;
case "实体清单":
if (!item.organizationId) {
ElMessage.warning('当前条目没有相关实体,无法跳转')
return
}
curRoute = router.resolve({
name: "companyPages",
params: {
id: item.organizationId
}
});
break;
case "商业管制清单":
if (!item.organizationId) {
ElMessage.warning('当前条目没有相关实体,无法跳转')
return
}
curRoute = router.resolve({
name: "companyPages",
params: {
id: item.organizationId
}
});
break;
case "SDN清单":
if (!item.organizationId) {
ElMessage.warning('当前条目没有相关实体,无法跳转')
return
}
curRoute = router.resolve({
name: "companyPages",
params: {
id: item.organizationId
}
});
break;
case "涉军企业清单":
if (!item.organizationId) {
ElMessage.warning('当前条目没有相关实体,无法跳转')
return
}
curRoute = router.resolve({
name: "companyPages",
params: {
id: item.organizationId
}
});
break;
case "实体清单事件":
curRoute = router.resolve({
path: "/exportControl/singleSanction",
query: {
id: item.id
id: item.id,
sanTypeId: 2,
date: item.date
}
});
break;
// case "人物":
// curRoute = router.resolve({
// path: "/decreeLayout",
// query: {
// id: id
// }
// });
// break;
break
case "商业管制清单事件":
curRoute = router.resolve({
path: "/exportControl/singleSanction",
query: {
id: item.id,
sanTypeId: 2,
date: item.date
}
});
break
case "SDN清单事件":
curRoute = router.resolve({
path: "/exportControl/singleSanction",
query: {
id: item.id,
sanTypeId: 2,
date: item.date
}
});
break
case "涉军企业清单事件":
curRoute = router.resolve({
path: "/exportControl/singleSanction",
query: {
id: item.id,
sanTypeId: 2,
date: item.date
}
});
break
case "机构":
curRoute = router.resolve({
path: "/newsModeule/" + item.id
path: "/institution",
query: {
id: item.id
}
});
break;
case "新闻":
curRoute = router.resolve({
name: "newsDetail",
query: {
newsId: item.id
params: {
id: item.id
}
});
break;
// case "社媒":
// curRoute = router.resolve({
// path: "/decreeLayout",
// query: {
// id: id
// }
// });
// break;
}
window.open(curRoute.href, "_blank");
......@@ -487,15 +584,9 @@ onMounted(() => {
case "政令":
activeTabId.value = 2;
break;
case "智库":
activeTabId.value = 3;
break;
case "智库报告":
activeTabId.value = 4;
break;
case "社媒":
activeTabId.value = 9;
break;
case "人物":
activeTabId.value = 6;
break;
......@@ -505,14 +596,24 @@ onMounted(() => {
case "新闻":
activeTabId.value = 8;
break;
default:
activeTabId.value = 5;
case "实体清单":
activeTabId.value = 10;
break;
case "商业管制清单":
activeTabId.value = 11;
break;
case "SDN清单":
activeTabId.value = 14;
break;
case "SDN清单":
activeTabId.value = 15;
break;
}
} else {
curArea.value = "全部"
activeTabId.value = 100;
}
handleSearch();
handleSearch(true);
});
const handleToAi = () => {
......@@ -543,8 +644,10 @@ const handleCompClick = item => {
background: url("../assets/images/background.png") no-repeat;
background-size: 100% 100%;
overflow-y: auto;
.header {
margin-top: 24px;
// position: sticky;
// top: 24px;
.header-right {
......@@ -552,6 +655,7 @@ const handleCompClick = item => {
width: 360px;
top: 134px;
left: 1300px;
.header-right-header {
height: 30px;
color: rgba(59, 65, 75, 1);
......@@ -562,9 +666,11 @@ const handleCompClick = item => {
letter-spacing: 0px;
text-align: left;
}
.header-right-main {
margin-top: 24px;
height: 300px;
.header-right-main-item {
width: 360px;
height: 40px;
......@@ -574,19 +680,24 @@ const handleCompClick = item => {
gap: 8px;
margin-bottom: 8px;
cursor: pointer;
&:hover {
background: rgb(234, 234, 234);
}
.icon {
width: 16px;
height: 16px;
img {
width: 100%;
height: 100%;
}
margin-left: 16px;
margin-top: 12px;
}
.text {
font-family: Microsoft YaHei;
font-size: 16px;
......@@ -597,8 +708,10 @@ const handleCompClick = item => {
}
}
}
.search-box {
display: flex;
.left {
margin-left: 240px;
width: 960px;
......@@ -609,44 +722,52 @@ const handleCompClick = item => {
box-shadow: 0px 0px 20px 0px rgba(25, 69, 130, 0.1);
background: rgba(255, 255, 255, 0.65);
display: flex;
&:hover {
border: 1px solid var(--color-main-active);
}
.icon {
width: 20px;
height: 20px;
margin-top: 14px;
margin-left: 16px;
margin-right: 10px;
img {
width: 100%;
height: 100%;
}
}
}
.right {
margin-left: 2px;
margin-top: -16px;
width: 80px;
height: 80px;
cursor: pointer;
img {
width: 100%;
height: 100%;
}
}
}
.tab-box {
margin-top: 12px;
height: 48px;
display: flex;
margin-left: 240px;
.tab-left {
width: 726px;
width: 1000px;
height: 48px;
display: flex;
justify-content: flex-start;
gap: 32px;
gap: 24px;
.tab {
color: rgba(59, 65, 75, 1);
font-family: Microsoft YaHei;
......@@ -656,10 +777,12 @@ const handleCompClick = item => {
box-sizing: border-box;
border-bottom: 3px solid transparent;
cursor: pointer;
&:hover {
color: var(--color-main-active);
}
}
.tabActive {
color: var(--color-main-active);
font-size: 18px;
......@@ -667,6 +790,7 @@ const handleCompClick = item => {
border-bottom: 3px solid var(--color-main-active);
}
}
.tab-right {
margin-left: 74px;
width: 120px;
......@@ -678,6 +802,7 @@ const handleCompClick = item => {
display: flex;
justify-content: center;
gap: 8px;
.text {
margin-top: 4px;
height: 24px;
......@@ -687,10 +812,12 @@ const handleCompClick = item => {
font-weight: 700;
line-height: 24px;
}
.icon {
margin-top: 3px;
width: 8px;
height: 5px;
img {
width: 100%;
height: 100%;
......@@ -698,6 +825,7 @@ const handleCompClick = item => {
}
}
}
.tag-box {
margin-top: 16px;
width: 908px;
......@@ -707,6 +835,7 @@ const handleCompClick = item => {
flex-wrap: wrap;
gap: 12px;
margin-left: 240px;
.tag {
height: 32px;
line-height: 30px;
......@@ -721,12 +850,14 @@ const handleCompClick = item => {
font-weight: 400;
cursor: pointer;
}
.tagActive {
color: var(--color-main-active);
border: 1px solid var(--color-main-active);
background: rgba(231, 243, 255, 1);
}
}
.info-box {
margin-top: 26px;
margin-left: 240px;
......@@ -734,9 +865,11 @@ const handleCompClick = item => {
height: 32px;
display: flex;
justify-content: space-between;
.info-left {
display: flex;
gap: 24px;
.text-box {
height: 32px;
line-height: 32px;
......@@ -744,12 +877,14 @@ const handleCompClick = item => {
font-size: 16px;
font-weight: 400;
color: rgba(59, 65, 75, 1);
.text-1 {
color: var(--color-main-active);
font-weight: 700;
font-size: 20px;
margin: 0 5px;
}
.text-2 {
color: var(--color-main-active);
font-size: 18px;
......@@ -757,11 +892,13 @@ const handleCompClick = item => {
}
}
}
.info-right {
display: flex;
gap: 13px;
}
}
.summary-box {
width: 960px;
height: 260px;
......@@ -771,16 +908,19 @@ const handleCompClick = item => {
border: 1px solid rgba(231, 243, 255, 1);
border-radius: 10px;
background: linear-gradient(180deg, rgba(246, 250, 255, 1), rgba(246, 250, 255, 0) 100%);
.summary-header {
width: 135px;
height: 32px;
margin-top: 16px;
margin-left: 24px;
img {
width: 100%;
height: 100%;
}
}
.summary-content {
width: 912px;
height: 180px;
......@@ -795,11 +935,13 @@ const handleCompClick = item => {
}
}
}
.main {
width: 913px;
// height: 1464px;
margin-top: 36px;
margin-left: 240px;
.item {
width: 913px;
min-height: 108px;
......@@ -809,17 +951,21 @@ const handleCompClick = item => {
border-bottom: 1px solid rgba(234, 236, 238, 1);
display: flex;
cursor: pointer;
&:hover {
background: var(--color-bg-hover);
}
.item-left {
width: 170px;
height: 115px;
img {
width: 100%;
height: 100%;
}
}
.item-right {
// width: 731px;
flex: 1;
......@@ -835,7 +981,11 @@ const handleCompClick = item => {
line-height: 24px;
letter-spacing: 0px;
text-align: left;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.content {
margin-top: 10px;
min-height: 0;
......@@ -849,9 +999,11 @@ const handleCompClick = item => {
text-align: left;
overflow: hidden;
}
.item-right-footer {
margin-top: 10px;
display: flex;
.time {
height: 24px;
color: rgba(132, 136, 142, 1);
......@@ -863,6 +1015,7 @@ const handleCompClick = item => {
text-align: left;
margin-right: 16px;
}
.tag {
height: 24px;
line-height: 24px;
......@@ -870,16 +1023,19 @@ const handleCompClick = item => {
padding: 0 8px;
border-radius: 4px;
}
.tag1 {
border: 1px solid rgba(255, 204, 199, 1);
background: rgba(255, 241, 240, 1);
color: rgba(255, 77, 79, 1);
}
.tag2 {
color: rgba(250, 173, 20, 1);
border: 1px solid rgba(255, 241, 184, 1);
background: rgba(255, 251, 230, 1);
}
.tag3 {
color: rgba(22, 119, 255, 1);
border: 1px solid rgba(186, 224, 255, 1);
......@@ -889,10 +1045,12 @@ const handleCompClick = item => {
}
}
}
.main1 {
width: 913px;
margin-top: 36px;
margin-left: 240px;
.item {
width: 913px;
min-height: 108px;
......@@ -901,14 +1059,17 @@ const handleCompClick = item => {
padding-top: 16px;
border-bottom: 1px solid rgba(234, 236, 238, 1);
cursor: pointer;
// &:hover {
// background: var(--color-bg-hover);
// }
&:hover {
background: var(--color-bg-hover);
}
.main-header {
min-height: 24px;
display: flex;
align-items: center;
justify-content: space-between;
.title {
width: 820px;
// height: 24px;
......@@ -920,8 +1081,11 @@ const handleCompClick = item => {
line-height: 24px;
letter-spacing: 0px;
text-align: left;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.tag {
height: 24px;
line-height: 24px;
......@@ -929,27 +1093,32 @@ const handleCompClick = item => {
padding: 0 8px;
border-radius: 4px;
}
.tag1 {
border: 1px solid rgba(255, 204, 199, 1);
background: rgba(255, 241, 240, 1);
color: rgba(255, 77, 79, 1);
}
.tag2 {
color: rgba(250, 173, 20, 1);
border: 1px solid rgba(255, 241, 184, 1);
background: rgba(255, 251, 230, 1);
}
.tag3 {
color: rgba(22, 119, 255, 1);
border: 1px solid rgba(186, 224, 255, 1);
background: rgba(230, 244, 255, 1);
}
}
.entity-box {
margin-top: 12px;
display: flex;
gap: 8px;
flex-wrap: wrap;
.entity {
display: flex;
justify-content: space-between;
......@@ -960,19 +1129,23 @@ const handleCompClick = item => {
border-radius: 20px;
background: rgba(255, 241, 240, 1);
cursor: pointer;
&:hover{
.name{
&:hover {
.name {
font-weight: bold;
}
}
.icon {
width: 12px;
height: 12px;
img {
width: 100%;
height: 100%;
}
}
.name {
margin-top: 4px;
height: 24px;
......@@ -1001,6 +1174,7 @@ const handleCompClick = item => {
text-align: left;
overflow: hidden;
}
.time {
margin-top: 10px;
height: 24px;
......@@ -1015,6 +1189,7 @@ const handleCompClick = item => {
}
}
}
.footer {
width: 913px;
margin-left: 264px;
......@@ -1025,10 +1200,12 @@ const handleCompClick = item => {
justify-content: center;
}
}
:deep(.el-input__wrapper) {
box-shadow: none;
height: 46px;
}
:deep(.el-input__wrapper:hover) {
box-shadow: none !important;
}
......@@ -1036,6 +1213,7 @@ const handleCompClick = item => {
:deep(.el-input__wrapper.is-focus) {
box-shadow: none !important;
}
:deep(.el-input__inner) {
color: rgba(59, 65, 75, 1);
font-family: Microsoft YaHei;
......
......@@ -124,7 +124,7 @@
<el-table ref="tableRef" :data="tableData" row-key="id" @selection-change="handleSelectionChange"
@select="handleSelect" @select-all="handleSelectAll" style="width: 100%" :row-style="{ height: '52px' }">
<el-table-column type="selection" width="40" />
<el-table-column label="法案名称" width="455">
<el-table-column label="法案名称" width="600">
<template #default="scope">
<span class="title-item text-compact-bold" @click="handleClickToDetail(scope.row)">{{
scope.row.originalTitle
......@@ -134,14 +134,14 @@
<el-table-column label="日期" width="120" class-name="date-column">
<template #default="scope">{{ scope.row.date }}</template>
</el-table-column>
<el-table-column label="提案人" width="480">
<el-table-column label="提案人" width="300">
<template #default="scope">
<span class="person-item text-compact" @click="handlePerClick(scope.row)">{{ scope.row.sponsorPersonName
}}</span>
</template>
</el-table-column>
<el-table-column property="affiliation" label="所属党派" width="120" />
<el-table-column property="originDepart" label="提出委员会" width="180" />
<el-table-column property="originDepart" label="提出委员会" />
<el-table-column property="status" label="所处阶段" width="120" />
</el-table>
</div>
......
......@@ -23,6 +23,7 @@ const getLineChart = (dataX, dataY) => {
},
yAxis: {
type: 'value',
name: '数量',
splitLine: {
show: true,
lineStyle: {
......
......@@ -2,8 +2,8 @@ import { MUTICHARTCOLORS } from "@/common/constant";
const getPieChart = (data) => {
const colorList = MUTICHARTCOLORS
let showData = data
if(data.length > 14) {
showData = data.slice(0,13)
if(data.length > 12) {
showData = data.slice(0,11)
let num = 0
data.slice(13,).forEach(item => {
num = num + item.value
......@@ -22,8 +22,9 @@ const getPieChart = (data) => {
radius: [150, 180],
// height: '96%',
left: 'center',
top: 24,
top: 60,
width: '98%',
height: '90%',
itemStyle: {
borderColor: '#fff',
borderWidth: 1
......
......@@ -134,16 +134,15 @@ const siderList = ref([
active: false
},
{
name: "实体清单事件",
path: "/dataLibrary/dataEntityListEvent",
name: "商业管制清单",
path: "/dataLibrary/dataCommerceControlList",
active: false
},
{
name: "商业管制清单",
path: "/dataLibrary/dataCommerceControlList",
name: "实体清单事件",
path: "/dataLibrary/dataEntityListEvent",
active: false
},
{
name: "商业管制清单事件",
path: "/dataLibrary/dataCommerceControlListEvent",
......@@ -257,6 +256,10 @@ const siderList = ref([
]);
const handleSiderItem = item => {
if (item.name === '风险信号' || item.name === '市场准入限制') {
ElMessage.warning('当前模块开发中,敬请期待!')
return
}
siderList.value.forEach(val => {
val.active = false;
val.isExpanded = false;
......@@ -282,6 +285,10 @@ const handleSiderItem = item => {
};
const handleSiderSecondItem = item => {
if (item.name === '州法案' || item.name === '研究型大学' || item.name === '重点实验室') {
ElMessage.warning('当前模块开发中,敬请期待!')
return
}
siderList.value.forEach(item => {
if (item.children.length) {
item.children.forEach(val => {
......@@ -437,17 +444,16 @@ onMounted(() => {
siderList.value[3].isExpanded = true;
siderList.value[3].children[0].active = true;
break;
case "/dataLibrary/dataEntityListEvent":
case "/dataLibrary/dataCommerceControlList":
siderList.value[3].active = true;
siderList.value[3].isExpanded = true;
siderList.value[3].children[1].active = true;
break;
case "/dataLibrary/dataCommerceControlList":
case "/dataLibrary/dataEntityListEvent":
siderList.value[3].active = true;
siderList.value[3].isExpanded = true;
siderList.value[3].children[2].active = true;
break;
case "/dataLibrary/dataCommerceControlListEvent":
siderList.value[3].active = true;
siderList.value[3].isExpanded = true;
......@@ -559,6 +565,7 @@ onBeforeUnmount(() => {
height: 100%;
}
}
.title {
color: var(--color-primary-100);
}
......@@ -737,6 +744,7 @@ onBeforeUnmount(() => {
.tab-item-active {
border-bottom: 2px solid var(--color-primary-100) !important;
background: var(--color-primary-2);
}
}
......
......@@ -105,7 +105,7 @@
<el-table ref="tableRef" :data="tableData" row-key="id" @selection-change="handleSelectionChange"
@select="handleSelect" @select-all="handleSelectAll" style="width: 100%" :row-style="{ height: '52px' }">
<el-table-column type="selection" width="40" />
<el-table-column label="新闻标题" width="600">
<el-table-column label="新闻标题" width="420">
<template #default="scope">
<span class="title-item text-compact-bold" @click="handleClickToDetail(scope.row)">{{
scope.row.originalTitle
......
......@@ -9,7 +9,7 @@
<div class="en-title">{{ institutionInfo.enName }}</div>
<div class="desc">{{ institutionInfo.desc }}</div>
<div class="tag-box">
<div class="tag" v-for="(tag, index) in institutionInfo.tagList" :key="index">
<div class="tag" v-for="(tag, index) in showTagList" :key="index">
{{ tag }}
</div>
</div>
......@@ -22,13 +22,8 @@
</div> -->
</div>
<div class="tab-box">
<div
class="tab"
@click="handleClickTab(item)"
:class="{ tabActive: activeTabName == item.name }"
v-for="(item, index) in tabList"
:key="index"
>
<div class="tab" @click="handleClickTab(item)" :class="{ tabActive: activeTabName == item.name }"
v-for="(item, index) in tabList" :key="index">
{{ item.name }}
</div>
</div>
......@@ -61,6 +56,14 @@ const institutionInfo = ref({
logo: ""
});
const showTagList = computed(() => {
if(institutionInfo.value.tagList.length > 10) {
return institutionInfo.value.tagList.slice(0,10)
} else {
return institutionInfo.value.tagList
}
})
const handleGetInfo = async () => {
const params = {
id: route.query.id
......@@ -75,7 +78,7 @@ const handleGetInfo = async () => {
institutionInfo.value.desc = res.data.orgIntroduction;
institutionInfo.value.name = res.data.orgName;
}
} catch (error) {}
} catch (error) { }
};
handleGetInfo();
......@@ -95,7 +98,7 @@ const tabList = ref([
]);
const handleClickTab = val => {
if(val.name === '深度挖掘' || val.name === '对华制裁') {
if (val.name === '深度挖掘' || val.name === '对华制裁') {
ElMessage.warning('当前功能开发中,敬请期待!')
return
}
......@@ -125,6 +128,7 @@ onUnmounted(() => {
background-repeat: no-repeat;
background-size: 100% 100%;
padding-top: 16px;
.header {
width: 1600px;
height: 200px;
......@@ -136,20 +140,23 @@ onUnmounted(() => {
background: rgba(255, 255, 255, 0.8);
display: flex;
position: relative;
.header-left {
width: 160px;
height: 160px;
margin: 20px;
img {
width: 100%;
height: 100%;
}
}
.header-right {
margin-left: 24px;
width: 1350px;
overflow: hidden;
overflow-y: auto;
.title {
margin-top: 26px;
height: 42px;
......@@ -164,6 +171,7 @@ onUnmounted(() => {
text-overflow: ellipsis;
white-space: nowrap;
}
.en-title {
margin-top: 8px;
height: 24px;
......@@ -178,7 +186,9 @@ onUnmounted(() => {
text-overflow: ellipsis;
white-space: nowrap;
}
.desc {
height: 48px;
margin-top: 6px;
color: rgba(59, 65, 75, 1);
font-family: Microsoft YaHei;
......@@ -187,11 +197,25 @@ onUnmounted(() => {
line-height: 24px;
letter-spacing: 0px;
text-align: justify;
overflow: hidden;
display: -webkit-box;
/* 3. 限制显示的行数(修改数字即可改变行数) */
-webkit-line-clamp: 2;
/* 4. 设置文字垂直排列方向 */
-webkit-box-orient: vertical;
/* 5. 隐藏超出部分 */
overflow: hidden;
/* 6. 显示省略号 */
text-overflow: ellipsis;
/* 可选:修复文字间距/换行问题 */
word-break: break-all;
}
.tag-box {
margin-top: 14px;
display: flex;
gap: 8px;
.tag {
height: 24px;
padding: 0px 8px;
......@@ -206,6 +230,7 @@ onUnmounted(() => {
}
}
}
.header-btn {
position: absolute;
top: 26px;
......@@ -219,14 +244,17 @@ onUnmounted(() => {
justify-content: center;
align-items: center;
cursor: pointer;
.icon {
width: 16px;
height: 16px;
img {
width: 100%;
height: 100%;
}
}
.text {
height: 22px;
color: rgba(255, 255, 255, 1);
......@@ -237,6 +265,7 @@ onUnmounted(() => {
}
}
}
.tab-box {
width: 1600px;
height: 64px;
......@@ -249,6 +278,7 @@ onUnmounted(() => {
display: flex;
justify-content: space-between;
align-items: center;
.tab {
width: 526px;
height: 54px;
......@@ -263,10 +293,12 @@ onUnmounted(() => {
font-weight: 400;
letter-spacing: 0px;
cursor: pointer;
&:hover {
background: rgba(231, 243, 255, 1);
}
}
.tabActive {
border: 2px solid rgba(174, 214, 255, 1);
background: rgba(231, 243, 255, 1);
......@@ -275,6 +307,7 @@ onUnmounted(() => {
font-weight: 700;
}
}
.main {
height: 800px;
width: 1600px;
......
......@@ -14,7 +14,7 @@
<div class="home-main-header-center">
<SearchContainer class="think-tank-search" style="margin-bottom: 0; margin-top: 51px; height: fit-content;"
v-if="containerRef" placeholder="搜索智库、报告或政策建议" :containerRef="containerRef" areaName="智库" />
v-if="containerRef" placeholder="搜索智库、报告或政策建议" :containerRef="containerRef" areaName="智库报告" />
<!-- <el-input v-model="searchThinktankText" @keyup.enter="handleSearch"
style="width: 838px; height: 100%" placeholder="搜索智库报告" />
<div class="search">
......
......@@ -19,26 +19,8 @@ export default defineConfig({
resolvers: [ElementPlusResolver()],
}),
],
// build: {
// minify: 'terser',
// terserOptions: {
// compress: {
// drop_console: true,
// drop_debugger: true
// }
// }
// },
// build: {
// // minify: 'terser',
// terserOptions: {
// compress: {
// drop_console: true, // 移除所有 console.*
// drop_debugger: true, // 移除 debugger
// },
// },
// },
esbuild: {
drop: process.env.NODE_ENV === 'production' ? ['console', 'debugger'] : []
drop: process.env.NODE_ENV === 'production' ? ['console', 'debugger'] : [] // 正式环境去除掉console
},
resolve: {
alias: {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论