提交 06cad7ab authored 作者: coderBryanFu's avatar coderBryanFu

update

上级 a94961db
......@@ -276,7 +276,7 @@ body {
border-radius: 6px;
color: #333;
position: absolute;
right: 37px;
right: 160px;
.email {
width: 20px;
......
import request from "@/api/request.js";
// 头部信息
/**
* @param { page, size, keyword, type, domains }
*/
export function search(data) {
return request({
method: 'POST',
url: `/temporarySearch/search-info/es/page`,
data:data
})
}
\ No newline at end of file
......@@ -24,7 +24,7 @@
</div>
</div>
<div class="btn" @click="handleToPosi('position3')">
<div class="btn-text">{{ "统计概览" }}</div>
<div class="btn-text">{{ "数据总览" }}</div>
<div class="btn-icon">
<img src="@/assets/icons/arrow-right-icon.png" alt="" />
</div>
......@@ -92,7 +92,7 @@
</div>
</div>
<div class="btn" @click="handleToPosi('position3')">
<div class="btn-text">{{ "统计概览" }}</div>
<div class="btn-text">{{ "数据总览" }}</div>
<div class="btn-icon">
<img src="@/assets/icons/arrow-right-icon.png" alt="" />
</div>
......@@ -269,7 +269,12 @@
@click="handleClickToNewsDetail(news)"
>
<div class="left">
<img :src="getProxyUrl(news.newsImage) || defaultNew" alt="" referrerpolicy="no-referrer" @error="e => e.target.src = News1" />
<img
:src="getProxyUrl(news.newsImage) || defaultNew"
alt=""
referrerpolicy="no-referrer"
@error="e => (e.target.src = News1)"
/>
</div>
<div class="right">
<div class="right-top">
......@@ -293,7 +298,12 @@
<div class="box4-main">
<div class="box4-main-item" v-for="(item, index) in messageList" :key="index">
<div class="left" @click="handleClcikToCharacter(item, index)">
<img :src="getProxyUrl(item.personImage) || Message3" alt="" referrerpolicy="no-referrer" @error="e => e.target.src = Message3" />
<img
:src="getProxyUrl(item.personImage) || Message3"
alt=""
referrerpolicy="no-referrer"
@error="e => (e.target.src = Message3)"
/>
</div>
<div class="right">
<div class="right-top">
......@@ -306,7 +316,7 @@
</div>
</div>
</div>
<DivideHeader id="position3" class="divide3" :titleText="'统计概览'"></DivideHeader>
<DivideHeader id="position3" class="divide3" :titleText="'数据总览'"></DivideHeader>
<div class="center-footer">
<div class="box5">
<div class="box5-header">
......@@ -673,7 +683,14 @@
<div class="item">
<div class="item-left">{{ "法案进展:" }}</div>
<div class="item-right2">
<div class="tag" v-for="(val, idx) in [...item.progress].reverse()" :key="idx" :style="{ zIndex: item.progress.length - idx }">{{ val }}</div>
<div
class="tag"
v-for="(val, idx) in [...item.progress].reverse()"
:key="idx"
:style="{ zIndex: item.progress.length - idx }"
>
{{ val }}
</div>
</div>
</div>
</div>
......@@ -751,7 +768,7 @@ import bill10 from "./assets/images/bill10.png";
import bill11 from "./assets/images/bill11.png";
import bill12 from "./assets/images/bill12.png";
import defaultNew from "../assets/images/default-icon-news.png"
import defaultNew from "../assets/images/default-icon-news.png";
import News1 from "./assets/images/news1.png";
import News2 from "./assets/images/news2.png";
import News3 from "./assets/images/news3.png";
......@@ -777,15 +794,20 @@ import { iteratee } from "lodash";
const searchBillText = ref("");
// 处理图片代理
const getProxyUrl = (url) => {
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')) {
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, '');
const cleanUrl = urlStr.replace(/^https?:\/\//i, "");
return `https://images.weserv.nl/?url=${encodeURIComponent(cleanUrl)}`;
};
......@@ -887,16 +909,14 @@ const handleToMoreRiskSignal = () => {
window.open(route.href, "_blank");
};
// 跳转新闻详情页
const handleClickToNewsDetail = (news) => {
const handleClickToNewsDetail = news => {
// window.sessionStorage.setItem("newsId", "119_HR_1");
const route = router.resolve(
{
path: "/newsAnalysis",
query: {
newsId: news.newsId
}
const route = router.resolve({
path: "/newsAnalysis",
query: {
newsId: news.newsId
}
);
});
window.open(route.href, "_blank");
};
......@@ -1979,45 +1999,49 @@ onUnmounted(() => {});
}
}
.home-main-header-btn-box {
margin-top: 36px;
width: 688px;
margin: 0 auto;
margin-top: 39px;
display: flex;
.btn {
display: flex;
width: 160px;
height: 48px;
border: 1px solid #aed6ff;
box-sizing: border-box;
border-radius: 24px;
justify-content: center;
margin: 0 16px;
background: #e7f3ff;
cursor: pointer;
position: relative;
&:hover {
background: #cae3fc;
}
.btn-text {
color: var(--color-main-active);
font-family: Microsoft YaHei;
font-size: 20px;
font-weight: 400;
line-height: 42px;
margin-left: 5px;
text-align: center;
}
.btn-icon {
position: absolute;
top: 16px;
right: 19px;
width: 6px;
height: 12px;
img {
width: 100%;
height: 100%;
}
justify-content: space-between;
.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%;
}
}
}
}
}
.divide1 {
margin-top: 64px;
......@@ -3437,7 +3461,7 @@ onUnmounted(() => {});
font-weight: 400;
&::after {
content: '';
content: "";
position: absolute;
top: 50%;
right: -8.485px;
......@@ -3448,17 +3472,17 @@ onUnmounted(() => {});
border-right: 1px solid rgb(234, 236, 238);
transform: translateY(-50%) rotate(45deg);
z-index: 1;
box-shadow: 2px -2px 2px rgba(0,0,0,0.05);
box-shadow: 2px -2px 2px rgba(0, 0, 0, 0.05);
box-sizing: border-box;
}
&:first-child {
margin-left: 0;
padding-left: 10px;
border-left: 1px solid rgb(234, 236, 238);
border-radius: 4px 0 0 4px;
}
&:last-child {
background: rgb(59, 65, 75);
color: rgba(255, 255, 255, 1);
......
......@@ -6,7 +6,7 @@
<div class="icon">
<img src="./assets/images/search-icon1.png" alt="" />
</div>
<el-input :border="false" style="width: 900px; height: 100%" />
<el-input v-model="keyword" :border="false" style="width: 900px; height: 100%" />
</div>
<div class="right">
<img src="./assets/images/ai-icon.png" alt="" />
......@@ -14,41 +14,55 @@
</div>
<div class="tab-box">
<div class="tab-left">
<div class="tab" :class="{ tabActive: item.isActive }" v-for="(item, index) in tabList" :key="index">
<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>
<div class="tab-right">
<!-- <div class="tab-right">
<div class="text">{{ "全部国家" }}</div>
<div class="icon">
<img src="./assets/images/down.png" alt="" />
</div>
</div>
</div> -->
</div>
<div class="tag-box">
<div class="tag" v-for="(item, index) in tagList" :key="index">{{ item.name }}</div>
<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">{{ "356" }}</span
搜索结果<span class="text-1">{{ totalNum }}</span
>
</div>
<div class="text-box">
搜索关键词:<span class="text-2">{{ "金融" }}</span>
搜索关键词:<span class="text-2">{{ keyword }}</span>
</div>
<div class="text-box">
当前领域:<span class="text-2">{{ "科技法案" }}</span>
当前领域:<span class="text-2">{{ curArea }}</span>
</div>
</div>
<div class="info-right">
<!-- <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" />
</el-select>
<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>
</div> -->
</div>
<div class="summary-box">
<div class="summary-header">
......@@ -75,25 +89,24 @@
<div class="main">
<div class="item" v-for="(item, index) in searchResults" :key="index">
<div class="item-left" v-if="item.img">
<img :src="item.img" alt="">
<img :src="item.img" alt="" />
</div>
<div class="item-right">
<div class="title" v-html="renderContent(item.title)"></div>
<div class="content" v-html="renderContent(item.content)"></div>
<div class="content" v-html="renderContent(item.description)"></div>
<div class="item-right-footer">
<div class="time">{{ item.time }}</div>
<div class="time">{{ item.date }}</div>
<div
class="tag"
:class="{ tag1: item.tag.status === 1, tag2: item.tag.status === 2, tag3: item.tag.status === 3 }"
class="tag tag3"
>
{{ item.tag.name }}
{{ item.typeStr }}
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<el-pagination background layout="prev, pager, next" :total="96" />
<el-pagination @current-change="handleChangeCurrentPage" :size="pageSize" :current-page="currentPage" background layout="prev, pager, next" :total="totalNum" />
</div>
</div>
</template>
......@@ -101,81 +114,67 @@
<script setup>
import { ref, onMounted } from "vue";
import Img1 from './assets/images/img1.png'
import Img2 from './assets/images/img2.png'
import Img3 from './assets/images/img3.png'
import { search } from "@/api/comprehensiveSearch/index";
import Img1 from "./assets/images/img1.png";
import Img2 from "./assets/images/img2.png";
import Img3 from "./assets/images/img3.png";
const selectTime = ref("全部时间");
const selectRelation = ref("相关度优先");
const keyword = ref("出口");
const tabList = ref([
{
name: "法案",
isActive: true
id: 1
},
{
name: "政令",
isActive: false
},
{
name: "科技智库",
isActive: false
},
{
name: "企业",
isActive: false
},
{
name: "出口管制",
isActive: false
},
{
name: "市场准入",
isActive: false
},
{
name: "投融资限制",
isActive: false
},
{
name: "重要人物",
isActive: false
}
]);
const tagList = ref([
{
name: "人工智能"
id: 2
},
{
name: "集成电路"
name: "智库",
id: 3
},
{
name: "通信网络"
name: "智库报告",
id: 4
},
{
name: "量子科技"
name: "实体清单",
id: 5
},
{
name: "能源"
name: "人物",
id: 6
},
{
name: "生物科技"
name: "机构",
id: 7
},
{
name: "航空航天"
name: "新闻",
id: 8
},
{
name: "海洋"
},
{
name: "新材料"
},
{
name: "先进制造"
name: "社媒",
id: 9
}
]);
const activeTabId = ref(5);
const curArea = ref('实体清单')
const handleClickTab = (name,id) => {
activeTabId.value = id;
curArea.value = name
domains.value = []
selectedDomains.value = []
handleSearch()
};
const timeList = ref([
{
label: "全部时间",
......@@ -335,6 +334,62 @@ const renderContent = str => {
}
return str;
};
const pageSize = ref(10);
const currentPage = ref(1);
const totalNum = ref(0)
const handleChangeCurrentPage = page => {
currentPage.value = page
handleSearch()
}
const domains = ref([
{
name: "",
id: ""
}
]);
const selectedDomains = ref([]);
const handleClickDomains = domain => {
domain.selected = !domain.selected;
selectedDomains.value = domains.value
.filter(item => {
return item.selected;
})
.map(item => item.name);
console.log("selectedDomains", selectedDomains.value);
handleSearch();
};
const handleSearch = async () => {
const params = {
size: pageSize.value,
page: currentPage.value,
keyword: keyword.value, // "出口"
type: activeTabId.value,
domains: selectedDomains.value
};
try {
const res = await search(params);
console.log("综合搜索结果", res);
if (res.code === 200 && res.data) {
if (!selectedDomains.value.length) {
domains.value = Object.entries(res.data.aggregations).map(([name, id]) => ({
name,
id,
selected: false
}));
}
searchResults.value = res.data.records
totalNum.value = res.data.total
}
} catch (error) {}
};
handleSearch();
</script>
<style lang="scss" scoped>
......@@ -510,8 +565,10 @@ const renderContent = str => {
.tag-box {
margin-top: 16px;
width: 908px;
height: 32px;
min-height: 32px;
max-height: 64px;
display: flex;
flex-wrap: wrap;
gap: 12px;
margin-left: 256px;
.tag {
......@@ -526,10 +583,16 @@ const renderContent = str => {
font-family: Microsoft YaHei;
font-size: 16px;
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: 16px;
margin-top: 26px;
margin-left: 257px;
width: 920px;
height: 32px;
......@@ -567,7 +630,7 @@ const renderContent = str => {
width: 960px;
height: 260px;
margin-left: 240px;
margin-top: 36px;
margin-top: 26px;
box-sizing: border-box;
border: 1px solid rgba(231, 243, 255, 1);
border-radius: 10px;
......@@ -603,14 +666,16 @@ const renderContent = str => {
margin-left: 264px;
.item {
width: 913px;
height: 132px;
min-height: 108px;
max-height: 132px;
padding-bottom: 24px;
margin-bottom: 16px;
border-bottom: 1px solid rgba(234, 236, 238, 1);
display: flex;
.item-left {
width: 170px;
height: 115px;
img{
img {
width: 100%;
height: 100%;
}
......@@ -633,7 +698,8 @@ const renderContent = str => {
}
.content {
margin-top: 10px;
height: 48px;
min-height: 24px;
max-height: 48px;
font-family: Microsoft YaHei;
font-size: 16px;
color: rgba(59, 65, 75, 1);
......@@ -643,14 +709,15 @@ const renderContent = str => {
text-align: left;
}
.item-right-footer {
margin-top: 10px;
display: flex;
.time {
height: 22px;
height: 24px;
color: rgba(132, 136, 142, 1);
font-family: Microsoft YaHei;
font-size: 14px;
font-weight: 400;
line-height: 22px;
line-height: 24px;
letter-spacing: 0px;
text-align: left;
}
......@@ -691,4 +758,15 @@ const renderContent = str => {
justify-content: center;
}
}
:deep(.el-input__inner) {
color: rgba(59, 65, 75, 1);
font-family: Microsoft YaHei;
font-style: Regular;
font-size: 16px;
font-weight: 400;
line-height: 24px;
letter-spacing: 0px;
text-align: left;
}
</style>
\ No newline at end of file
......@@ -419,7 +419,7 @@
v-for="cate in govInsList"
:key="cate.id"
v-model="checkedGovIns"
:label="cate.name"
:label="cate.id"
style="width: 180px"
class="filter-checkbox"
@change="handleChangeCheckedGovIns"
......@@ -640,7 +640,7 @@ const govInsList = ref([
// name: "美国财政部"
// },
]);
const checkedGovIns = ref(["白宫"]);
const checkedGovIns = ref([]);
const handleChangeCheckedGovIns = val => {};
......@@ -1206,14 +1206,14 @@ const handleGetDecreeOrderList = async () => {
};
try {
const res = await getDecreeOrderList(params);
console.log("资源库列表", res.data.content);
console.log("资源库列表", res);
if (res.code === 200 && res.data) {
totalDecreesNum.value = res.data.totalElements;
decreeList.value = res.data.content.map(item => {
return {
id: item.id,
time: item.postDate,
title: item.name,
title: item.proposeOrgName+ ': '+ item.name,
desc: item.describe,
img: item.orgImage,
tagList: item.industryList
......@@ -2724,7 +2724,7 @@ onMounted(async () => {
.box7 {
width: 792px;
height: 450px;
border-radius: 4px;
border-radius: 10px;
box-shadow: 0px 0px 15px 0px rgba(60, 87, 126, 0.2);
background: rgba(255, 255, 255, 1);
.box7-header {
......@@ -2829,7 +2829,7 @@ onMounted(async () => {
margin-left: 16px;
width: 792px;
height: 450px;
border-radius: 4px;
border-radius: 10px;
box-shadow: 0px 0px 15px 0px rgba(60, 87, 126, 0.2);
background: rgba(255, 255, 255, 1);
.box8-header {
......@@ -2873,7 +2873,7 @@ onMounted(async () => {
.divide4 {
margin: 0 auto;
margin-top: 52px;
margin-bottom: 36px;
margin-bottom: 6px;
}
.home-main-footer-header {
width: 1600px;
......
......@@ -324,7 +324,7 @@ onMounted(() => {
margin: 16px auto;
width: 1600px;
height: 898px;
border-radius: 4px;
border-radius: 10px;
box-shadow: 0px 0px 15px 0px rgba(60, 87, 126, 0.2);
background: rgba(255, 255, 255, 1);
.box1-main {
......
......@@ -496,7 +496,7 @@ onMounted(() => {
.box1 {
width: 480px;
height: 845px;
border-radius: 4px;
border-radius: 10px;
box-shadow: 0px 0px 15px 0px rgba(60, 87, 126, 0.2);
background: rgba(255, 255, 255, 1);
.box1-top {
......@@ -618,7 +618,7 @@ onMounted(() => {
width: 1105px;
height: 847px;
background: rgba(255, 255, 255);
border-radius: 4px;
border-radius: 10px;
position: relative;
.box2-main {
height: 799px;
......
......@@ -479,7 +479,7 @@ onMounted(() => {
margin-top: 16px;
width: 520px;
height: 845px;
border-radius: 4px;
border-radius: 10px;
box-shadow: 0px 0px 15px 0px rgba(60, 87, 126, 0.2);
background: rgba(255, 255, 255, 1);
.box3-main {
......
......@@ -64,7 +64,7 @@
<div class="item">
<div class="item-left">{{ "执行期限:" }}</div>
<div class="item-right text">
{{ basicInfo.deadline }}
{{ basicInfo.deadline+ ' 天' }}
</div>
</div>
</div>
......@@ -421,14 +421,16 @@ onMounted(() => {
position: absolute;
z-index: 9999;
width: 320px;
height: 56px;
height: 64px;
top: 14px;
right: 84px;
display: flex;
justify-content: flex-end;
flex-wrap: wrap;
gap: 8px;
gap: 5px 8px;
white-space: nowrap;
overflow:hidden;
overflow-y: auto;
.btn {
min-width: min-content;
height: 28px;
......@@ -473,7 +475,7 @@ onMounted(() => {
margin-top: 16px;
width: 1064px;
height: 414px;
border-radius: 4px;
border-radius: 10px;
box-shadow: 0px 0px 15px 0px rgba(60, 87, 126, 0.2);
background: rgba(255, 255, 255, 1);
.box1-main {
......@@ -536,7 +538,7 @@ onMounted(() => {
margin-top: 16px;
width: 1064px;
height: 415px;
border-radius: 4px;
border-radius: 10px;
box-shadow: 0px 0px 15px 0px rgba(60, 87, 126, 0.2);
background: rgba(255, 255, 255, 1);
.box2-main {
......@@ -613,7 +615,7 @@ onMounted(() => {
margin-top: 16px;
width: 520px;
height: 845px;
border-radius: 4px;
border-radius: 10px;
box-shadow: 0px 0px 15px 0px rgba(60, 87, 126, 0.2);
background: rgba(255, 255, 255, 1);
.box3-top {
......
......@@ -1056,8 +1056,8 @@ const handleToEntityListNoId = item => {
});
// 打开一个新页面
window.open(routeData.href, "_blank");
}else {
return
} else {
return;
}
};
......@@ -2148,23 +2148,13 @@ const handleMediaClick = item => {
background: url("./assets/images/background.png");
background-size: 100% 100%;
.home-main-header {
margin-top: 43px;
display: flex;
flex-direction: column;
align-items: center;
margin-bottom: 20px;
.home-main-header-top {
height: 30px;
color: rgba(95, 101, 108, 1);
font-family: Microsoft YaHei;
font-size: 16px;
font-weight: 400;
line-height: 30px;
margin-top: 43px;
}
.home-main-header-center {
margin-top: 20px;
width: 800px;
margin-top: 51px;
width: 960px;
height: 48px;
border-radius: 10px;
box-shadow: 0px 0px 15px 0px rgba(22, 119, 255, 0.1);
......@@ -2208,7 +2198,7 @@ const handleMediaClick = item => {
}
}
.home-main-header-footer {
margin-top: 38px;
margin-top: 64px;
width: 700px;
height: 64px;
box-sizing: border-box;
......@@ -2245,6 +2235,9 @@ const handleMediaClick = item => {
gap: 16px;
padding: 30px 0;
}
.home-main-header-footer-info{
margin-top: 34px;
}
.home-main-header-btn-box {
width: 688px;
margin: 0 auto;
......
......@@ -61,6 +61,11 @@ export default defineConfig({
target: 'http://8.140.26.4:10021/',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/checklistChat/, '')
},
'/temporarySearch': {
target: 'http://106.12.150.59:18826/',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/temporarySearch/, '')
}
}
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论