提交 95bfa457 authored 作者: coderBryanFu's avatar coderBryanFu

update

上级 d4db2b2b
......@@ -4,7 +4,7 @@ import companyPages from "@/views/companyPages/index.vue";
const companyPagesRoutes = [
// 智库系统的主要路由
{
path: "/companyPages/:id",
path: "/companyPages:id",
name: "companyPages",
component: companyPages,
meta: {
......
......@@ -87,7 +87,7 @@
</div>
</div>
<div class="main">
<div class="item" v-for="(item, index) in searchResults" :key="index">
<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="" />
</div>
......@@ -118,6 +118,7 @@
<script setup>
import { ref, onMounted } from "vue";
import router from "@/router";
import { useRoute } from "vue-router";
import { search } from "@/api/comprehensiveSearch/index";
......@@ -303,6 +304,86 @@ const handleSearch = async () => {
} catch (error) {}
};
const handleToPage = item => {
let curRoute;
switch (item.typeStr) {
case "法案":
curRoute = router.resolve({
path: "/decreeLayout",
query: {
id: id
}
});
break;
case "政令":
curRoute = router.resolve({
path: "/decreeLayout",
query: {
id: item.id
}
});
break;
case "智库":
curRoute = router.resolve({
name: "ReportDetail",
params: {
id: item.id
}
});
break;
case "智库报告":
curRoute = router.resolve({
name: "ReportDetail",
params: {
id: item.id
}
});
break;
case "实体清单":
curRoute = router.resolve({
path: "/exportControl/singleSanction",
query: {
id: item.id
}
});
break;
// case "人物":
// curRoute = router.resolve({
// path: "/decreeLayout",
// query: {
// id: id
// }
// });
// break;
case "机构":
curRoute = router.resolve({
path: "/institution",
query: {
id: item.id
}
});
break;
case "新闻":
curRoute = router.resolve({
path: "/newsAnalysis",
query: {
newsId: item.id
}
});
break;
// case "社媒":
// curRoute = router.resolve({
// path: "/decreeLayout",
// query: {
// id: id
// }
// });
// break;
}
window.open(curRoute.href, "_blank");
};
onMounted(() => {
if (route.query && route.query.searchText) {
keyword.value = route.query.searchText;
......@@ -617,11 +698,15 @@ onMounted(() => {
.item {
width: 913px;
min-height: 108px;
max-height: 132px;
max-height: 148px;
padding-bottom: 24px;
margin-bottom: 16px;
padding-top: 16px;
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;
......@@ -648,7 +733,7 @@ onMounted(() => {
}
.content {
margin-top: 10px;
min-height: 24px;
min-height: 0;
max-height: 48px;
font-family: Microsoft YaHei;
font-size: 16px;
......@@ -657,6 +742,7 @@ onMounted(() => {
line-height: 24px;
letter-spacing: 0px;
text-align: left;
overflow: hidden;
}
.item-right-footer {
margin-top: 10px;
......
......@@ -2,7 +2,7 @@
<div class="home-wrapper">
<div class="search-header" v-show="isShow">
<div class="home-main-header-center">
<el-input v-model="searchDecreeText" style="width: 680px; height: 100%" placeholder="搜索科技政令" />
<el-input v-model="searchDecreeText" @keyup.enter="handleSearch" style="width: 680px; height: 100%" placeholder="搜索科技政令" />
<div class="search">
<div class="search-icon">
<img src="./assets/images/search-icon.png" alt="" />
......@@ -47,7 +47,7 @@
<div class="header-item">行政令</div>
</div>
<div class="home-main-header-center" v-show="!isShow">
<el-input v-model="searchDecreeText" style="width: 838px; height: 100%" placeholder="搜索科技政令" />
<el-input v-model="searchDecreeText" @keyup.enter="handleSearch" style="width: 838px; height: 100%" placeholder="搜索科技政令" />
<div class="search">
<div class="search-icon">
<img src="./assets/images/search-icon.png" alt="" />
......
......@@ -9,7 +9,7 @@
<div class="page-header-left-top-desc">
<div class="text">{{ summaryInfo.newsDateTime }} · {{ summaryInfo.newsOrg }}</div>
<div class="tag-box">
<div class="tag" v-for="(tag, index) in summaryInfo.industryList" :key="index">{{ tag }}</div>
<div class="tag" v-for="(tag, index) in summaryInfo.industryList" :key="index">{{ tag.industryName }}</div>
</div>
</div>
</div>
......@@ -454,16 +454,16 @@ onMounted(() => {
text-indent: 2em;
}
&-news-artical {
height: 480px;
// height: 480px;
line-height: 1.8;
color: #303133;
display: flex;
align-items: flex-start;
justify-content: space-between;
// display: flex;
// align-items: flex-start;
// justify-content: space-between;
gap: 25px;
&-zn,
&-en {
width: 50%;
width: 100%;
}
p {
text-align: justify;
......@@ -479,7 +479,7 @@ onMounted(() => {
&-news-img {
height: 370px;
border-top: 1px solid rgba(234, 236, 238, 1);
// border-top: 1px solid rgba(234, 236, 238, 1);
padding: 15px 10px;
display: flex;
align-items: center;
......@@ -489,7 +489,6 @@ onMounted(() => {
overflow-y: auto;
}
.box4 {
background: orange;
.box4-item {
display: flex;
gap: 10px;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论