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

update

上级 d4db2b2b
...@@ -4,7 +4,7 @@ import companyPages from "@/views/companyPages/index.vue"; ...@@ -4,7 +4,7 @@ import companyPages from "@/views/companyPages/index.vue";
const companyPagesRoutes = [ const companyPagesRoutes = [
// 智库系统的主要路由 // 智库系统的主要路由
{ {
path: "/companyPages/:id", path: "/companyPages:id",
name: "companyPages", name: "companyPages",
component: companyPages, component: companyPages,
meta: { meta: {
......
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
</div> </div>
</div> </div>
<div class="main"> <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"> <div class="item-left" v-if="item.img">
<img :src="item?.img" alt="" /> <img :src="item?.img" alt="" />
</div> </div>
...@@ -118,6 +118,7 @@ ...@@ -118,6 +118,7 @@
<script setup> <script setup>
import { ref, onMounted } from "vue"; import { ref, onMounted } from "vue";
import router from "@/router";
import { useRoute } from "vue-router"; import { useRoute } from "vue-router";
import { search } from "@/api/comprehensiveSearch/index"; import { search } from "@/api/comprehensiveSearch/index";
...@@ -303,6 +304,86 @@ const handleSearch = async () => { ...@@ -303,6 +304,86 @@ const handleSearch = async () => {
} catch (error) {} } 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(() => { onMounted(() => {
if (route.query && route.query.searchText) { if (route.query && route.query.searchText) {
keyword.value = route.query.searchText; keyword.value = route.query.searchText;
...@@ -617,11 +698,15 @@ onMounted(() => { ...@@ -617,11 +698,15 @@ onMounted(() => {
.item { .item {
width: 913px; width: 913px;
min-height: 108px; min-height: 108px;
max-height: 132px; max-height: 148px;
padding-bottom: 24px; padding-bottom: 24px;
margin-bottom: 16px; padding-top: 16px;
border-bottom: 1px solid rgba(234, 236, 238, 1); border-bottom: 1px solid rgba(234, 236, 238, 1);
display: flex; display: flex;
cursor: pointer;
&:hover {
background: var(--color-bg-hover);
}
.item-left { .item-left {
width: 170px; width: 170px;
height: 115px; height: 115px;
...@@ -648,7 +733,7 @@ onMounted(() => { ...@@ -648,7 +733,7 @@ onMounted(() => {
} }
.content { .content {
margin-top: 10px; margin-top: 10px;
min-height: 24px; min-height: 0;
max-height: 48px; max-height: 48px;
font-family: Microsoft YaHei; font-family: Microsoft YaHei;
font-size: 16px; font-size: 16px;
...@@ -657,6 +742,7 @@ onMounted(() => { ...@@ -657,6 +742,7 @@ onMounted(() => {
line-height: 24px; line-height: 24px;
letter-spacing: 0px; letter-spacing: 0px;
text-align: left; text-align: left;
overflow: hidden;
} }
.item-right-footer { .item-right-footer {
margin-top: 10px; margin-top: 10px;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="home-wrapper"> <div class="home-wrapper">
<div class="search-header" v-show="isShow"> <div class="search-header" v-show="isShow">
<div class="home-main-header-center"> <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">
<div class="search-icon"> <div class="search-icon">
<img src="./assets/images/search-icon.png" alt="" /> <img src="./assets/images/search-icon.png" alt="" />
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
<div class="header-item">行政令</div> <div class="header-item">行政令</div>
</div> </div>
<div class="home-main-header-center" v-show="!isShow"> <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">
<div class="search-icon"> <div class="search-icon">
<img src="./assets/images/search-icon.png" alt="" /> <img src="./assets/images/search-icon.png" alt="" />
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<div class="page-header-left-top-desc"> <div class="page-header-left-top-desc">
<div class="text">{{ summaryInfo.newsDateTime }} · {{ summaryInfo.newsOrg }}</div> <div class="text">{{ summaryInfo.newsDateTime }} · {{ summaryInfo.newsOrg }}</div>
<div class="tag-box"> <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> </div>
</div> </div>
...@@ -454,16 +454,16 @@ onMounted(() => { ...@@ -454,16 +454,16 @@ onMounted(() => {
text-indent: 2em; text-indent: 2em;
} }
&-news-artical { &-news-artical {
height: 480px; // height: 480px;
line-height: 1.8; line-height: 1.8;
color: #303133; color: #303133;
display: flex; // display: flex;
align-items: flex-start; // align-items: flex-start;
justify-content: space-between; // justify-content: space-between;
gap: 25px; gap: 25px;
&-zn, &-zn,
&-en { &-en {
width: 50%; width: 100%;
} }
p { p {
text-align: justify; text-align: justify;
...@@ -479,7 +479,7 @@ onMounted(() => { ...@@ -479,7 +479,7 @@ onMounted(() => {
&-news-img { &-news-img {
height: 370px; height: 370px;
border-top: 1px solid rgba(234, 236, 238, 1); // border-top: 1px solid rgba(234, 236, 238, 1);
padding: 15px 10px; padding: 15px 10px;
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -489,7 +489,6 @@ onMounted(() => { ...@@ -489,7 +489,6 @@ onMounted(() => {
overflow-y: auto; overflow-y: auto;
} }
.box4 { .box4 {
background: orange;
.box4-item { .box4-item {
display: flex; display: flex;
gap: 10px; gap: 10px;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论