提交 e0c66c4d authored 作者: yanpeng's avatar yanpeng

bugfix 1

上级 accf8ee8
<template>
<div class="search-container" v-show="!isShow">
<div class="search-type-tabs" v-if="enableBillTypeSwitch">
<div class="search-type-tab" :class="{ active: billSearchType === 'federal' }"
@click="handleChangeBillSearchType('federal')">
<div
class="search-type-tab"
:class="{ active: billSearchType === 'federal' }"
@click="handleChangeBillSearchType('federal')"
>
联邦议会
</div>
<div class="search-type-tab" :class="{ active: billSearchType === 'state' }"
@click="handleChangeBillSearchType('state')">
<div
class="search-type-tab"
:class="{ active: billSearchType === 'state' }"
@click="handleChangeBillSearchType('state')"
>
州议会
</div>
</div>
<div class="search-main" :class="{ 'search-main-with-tabs': enableBillTypeSwitch }">
<input v-model="store.searchBillText" :placeholder="placeholder" @keyup.enter="handleSearch"
class="search-input" />
<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 />
搜索
......@@ -32,7 +37,7 @@
</div>
</div>
<div class="btn" @click="handleToPosi('position2')">
<div class="btn-text">咨询要闻</div>
<div class="btn-text">资讯要闻</div>
<div class="btn-icon">
<img src="@/assets/icons/arrow-right-icon.png" alt />
</div>
......@@ -62,14 +67,7 @@ import { useWrittingAsstaintStore } from "@/stores/writtingAsstaintStore";
const store = useWrittingAsstaintStore();
const router = useRouter();
const {
countInfo,
containerRef,
placeholder,
areaName,
enableBillTypeSwitch,
defaultBillSearchType
} = defineProps({
const { countInfo, containerRef, placeholder, areaName, enableBillTypeSwitch, defaultBillSearchType } = defineProps({
countInfo: {
type: Array,
default: () => []
......@@ -138,11 +136,9 @@ 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);
......
......@@ -74,7 +74,12 @@
<span>美对华领域打压遏制最新动态</span>
</div>
<div class="title-right-select">
<el-select v-model="selectedFieldForLatest" placeholder="全部领域" class="field-select">
<el-select
v-model="selectedFieldForLatest"
@change="handleFieldChange"
placeholder="全部领域"
class="field-select"
>
<el-option v-for="item in fieldOptions" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</div>
......@@ -131,7 +136,7 @@
<simple-pagination
v-model:current-page="newsCurrentPage"
:page-size="pageSize"
:total="newsList.length"
:total="allNewsList.length"
@page-change="handleNewsPageChange"
/>
</div>
......@@ -215,7 +220,7 @@
<div class="bottom-item">
<div class="bottom-item-title">
<img :src="icon4" alt="" />
<span>美对领域打压遏制时间线</span>
<span>美对领域打压遏制时间线</span>
</div>
<el-select
v-model="selectedFieldTimeline"
......@@ -408,6 +413,12 @@ const newsList = ref([]);
const newsCurrentPage = ref(1);
const pageSize = ref(5); // 每页显示 5 条
const handleFieldChange = domainId => {
console.log("领域改变", domainId);
console.log("领域值 =>", selectedFieldForLatest.value);
getUSGovernmentLatestDynamicData();
};
// 总页数
const totalPages = computed(() => {
return Math.ceil(newsList.value.length / pageSize.value) || 1;
......@@ -445,10 +456,11 @@ const handleNextPage = () => {
const getUSGovernmentLatestDynamicData = async () => {
try {
const params = {
orgId: !!deptValueForLatest.value ? deptValueForLatest.value : null,
domainId: !!selectedFieldForLatest.value ? selectedFieldForLatest.value : null,
pageSize: 50,
currentPage: newsCurrentPage.value
};
console.log("领域值 =>", selectedFieldForLatest.value);
const res = await getUSGovernmentLatestDynamic(params);
if (res.code === 200 && res.data) {
// 将接口数据转换为 newsList 需要的格式
......
......@@ -9,13 +9,18 @@
</div>
<div class="cards-mask">
<div class="item-box" :style="{ transform: `translateX(-${currentIndex * (307 + 16)}px)` }">
<div class="header-item" :class="{
<div
class="header-item"
:class="{
headerItem1: index % 5 === 0,
headerItem2: index % 5 === 1,
headerItem3: index % 5 === 2,
headerItem4: index % 5 === 3,
headerItem5: index % 5 === 4
}" v-for="(item, index) in headerList" :key="index">
}"
v-for="(item, index) in headerList"
:key="index"
>
<div class="name">{{ item.elementName }}</div>
<div class="num">{{ item.num }}</div>
</div>
......@@ -32,8 +37,12 @@
<div class="title">{{ "最新动态" }}</div>
</div>
<div class="box1-main">
<div class="box1-item" v-for="(item, index) in box1DataList" :key="index"
@click="handleToDecreeDetail(item)">
<div
class="box1-item"
v-for="(item, index) in box1DataList"
:key="index"
@click="handleToDecreeDetail(item)"
>
<div class="box1-item-left">{{ index + 1 }}</div>
<div class="box1-item-right">
<div class="title">{{ item.name }}</div>
......@@ -44,13 +53,18 @@
<div class="box1-item-right-footer">
<div class="time">{{ item.postDate }}</div>
<div class="area-box">
<div class="area" :class="{
<div
class="area"
:class="{
area1: vall.status === '1',
area2: vall.status === '2',
area3: vall.status === '3',
area4: vall.status === '4',
area5: vall.status === '5'
}" v-for="(vall, idxx) in item.areaList" :key="idxx">
}"
v-for="(vall, idxx) in item.areaList"
:key="idxx"
>
{{ vall.industryName }}
</div>
</div>
......@@ -66,30 +80,49 @@
<div class="icon">
<img src="./assets/images/box-header-icon2.png" alt="" />
</div>
<div class="title">{{ "美对要素打压情况" }}</div>
<div class="title">{{ "美对要素打压情况" }}</div>
</div>
<div class="box2-main">
<div class="inner-box1">
<div class="left">
<div class="left-main">
<el-empty v-if="box2DataList.length === 0" style="padding-top: 80px" description="暂无数据"
:image-size="100" />
<div class="left-item" :class="{ leftItemActive: box2LeftActiveIndex === index }"
v-for="(item, index) in box2DataList" :key="index" @click="handleClickBox2Item(index)">
<el-empty
v-if="box2DataList.length === 0"
style="padding-top: 80px"
description="暂无数据1"
:image-size="100"
/>
<div
class="left-item"
:class="{ leftItemActive: box2LeftActiveIndex === index }"
v-for="(item, index) in box2DataList"
:key="index"
@click="handleClickBox2Item(index)"
>
<div class="id">{{ index + 1 }}</div>
<div class="text">{{ item.name }}</div>
</div>
</div>
<div class="left-footer" v-if="box2DataList.length !== 0">
<el-pagination background layout="prev, pager, next" :total="box2Total" :page-size="box2PageSize"
v-model:current-page="box2CurrentPage" @current-change="handleGetBox2DataList" size="small"
:pager-count="4" />
<el-pagination
background
layout="prev, pager, next"
:total="box2Total"
:page-size="box2PageSize"
v-model:current-page="box2CurrentPage"
@current-change="handleGetBox2DataList"
size="small"
:pager-count="4"
/>
</div>
</div>
<div class="right" @click="handleToDecreeDetail(box2DetailInfo)">
<el-empty v-if="box2DataList.length === 0 || !isShowBox2Info" style="padding-top: 80px"
description="暂无数据" :image-size="100" />
<el-empty
v-if="box2DataList.length === 0 || !isShowBox2Info"
style="padding-top: 80px"
description="暂无数据"
:image-size="100"
/>
<div v-else>
<div class="title">{{ box2DetailInfo?.name }}</div>
<div class="tag-box">
......@@ -99,13 +132,18 @@
</div>
<div class="content">{{ box2DetailInfo?.describe }}</div>
<div class="area-box">
<div class="area" :class="{
<div
class="area"
:class="{
area1: item.status === '1',
area2: item.status === '2',
area3: item.status === '3',
area4: item.status === '4',
area5: item.status === '5'
}" v-for="(item, index) in box2DetailInfo.areaList" :key="index">
}"
v-for="(item, index) in box2DetailInfo.areaList"
:key="index"
>
{{ item.industryName }}
</div>
</div>
......@@ -132,23 +170,43 @@
<div class="inner-box1">
<div class="left">
<div class="left-main">
<el-empty v-if="box3DataList.length === 0" style="padding-top: 80px" description="暂无数据"
:image-size="100" />
<div class="left-item" :class="{ leftItemActive: box3LeftActiveIndex === index }"
v-for="(item, index) in box3DataList" :key="index" @click="handleClickBox3Item(index)">
<el-empty
v-if="box3DataList.length === 0"
style="padding-top: 80px"
description="暂无数据"
:image-size="100"
/>
<div
class="left-item"
:class="{ leftItemActive: box3LeftActiveIndex === index }"
v-for="(item, index) in box3DataList"
:key="index"
@click="handleClickBox3Item(index)"
>
<div class="id">{{ index + 1 }}</div>
<div class="text">{{ item.name }}</div>
</div>
</div>
<div class="left-footer" v-if="box3DataList.length">
<el-pagination background layout="prev, pager, next" :total="box3Total" :page-size="box3PageSize"
v-model:current-page="box3CurrentPage" @current-change="handleGetBox3DataList" size="small"
:pager-count="4" />
<el-pagination
background
layout="prev, pager, next"
:total="box3Total"
:page-size="box3PageSize"
v-model:current-page="box3CurrentPage"
@current-change="handleGetBox3DataList"
size="small"
:pager-count="4"
/>
</div>
</div>
<div class="right" @click="handleToDecreeDetail(box3DetailInfo)">
<el-empty v-if="box3DataList.length === 0 || !isShowBox3Info" style="padding-top: 80px"
description="暂无数据" :image-size="100" />
<el-empty
v-if="box3DataList.length === 0 || !isShowBox3Info"
style="padding-top: 80px"
description="暂无数据"
:image-size="100"
/>
<div v-else>
<div class="title">{{ box3DetailInfo?.name }}</div>
<div class="tag-box">
......@@ -158,13 +216,18 @@
</div>
<div class="content">{{ box3DetailInfo?.describe }}</div>
<div class="area-box">
<div class="area" :class="{
<div
class="area"
:class="{
area1: item.status === '1',
area2: item.status === '2',
area3: item.status === '3',
area4: item.status === '4',
area5: item.status === '5'
}" v-for="(item, index) in box3DetailInfo?.areaList" :key="index">
}"
v-for="(item, index) in box3DetailInfo?.areaList"
:key="index"
>
{{ item.industryName }}
</div>
</div>
......@@ -175,8 +238,12 @@
</div>
</div>
<div class="inner-box2">
<el-empty v-if="box3ChartData.length === 0" style="padding-top: 80px" description="暂无数据"
:image-size="100" />
<el-empty
v-if="box3ChartData.length === 0"
style="padding-top: 80px"
description="暂无数据"
:image-size="100"
/>
<div class="chart-header">{{ "关键词云" }}</div>
<div class="box3Chart" id="box3Chart"></div>
</div>
......@@ -204,9 +271,8 @@ import {
const activeDate = inject("activeDate");
const isShowBox2Info = ref(true)
const isShowBox3Info = ref(true)
const isShowBox2Info = ref(true);
const isShowBox3Info = ref(true);
const getCalculatedDate = type => {
const now = new Date();
......@@ -256,7 +322,7 @@ const handleGetHeaderList = async () => {
if (res.code === 200 && res.data) {
headerList.value = res.data;
}
} catch (error) { }
} catch (error) {}
};
// 最新动态
......@@ -283,7 +349,7 @@ const handleGetBox1Data = async () => {
if (res.code === 200 && res.data) {
box1DataList.value = res.data;
}
} catch (error) { }
} catch (error) {}
};
const box2DataList = ref([]);
......@@ -304,10 +370,10 @@ const handleGetOrderInfo = async id => {
if (res.code === 200 && res.data) {
box2DetailInfo.value = res.data;
} else {
isShowBox2Info.value = false
isShowBox2Info.value = false;
}
} catch (error) {
isShowBox2Info.value = false
isShowBox2Info.value = false;
}
};
......@@ -326,7 +392,7 @@ const handleGetBox2DataList = async () => {
box2Total.value = res.data.totalElements;
handleGetOrderInfo(box2DataList.value[box2LeftActiveIndex.value].id);
}
} catch (error) { }
} catch (error) {}
};
const handleClickBox2Item = index => {
......@@ -351,7 +417,7 @@ const handleGetBox2ChartData = async () => {
};
});
}
} catch (error) { }
} catch (error) {}
};
const handleBox2Chart = async () => {
await handleGetBox2ChartData();
......@@ -378,10 +444,10 @@ const handleGetOrderInfo1 = async id => {
if (res.code === 200 && res.data) {
box3DetailInfo.value = res.data;
} else {
isShowBox3Info.value = false
isShowBox3Info.value = false;
}
} catch (error) {
isShowBox3Info.value = false
isShowBox3Info.value = false;
}
};
......@@ -407,7 +473,7 @@ const handleGetBox3DataList = async () => {
} else {
box3DetailInfo.value = {};
}
} catch (error) { }
} catch (error) {}
};
const handleClickBox3Item = index => {
......@@ -433,7 +499,7 @@ const handleGetBox3ChartData = async () => {
};
});
}
} catch (error) { }
} catch (error) {}
};
const handleBox3Chart = async () => {
await handleGetBox3ChartData();
......
......@@ -185,8 +185,8 @@
<simple-pagination
v-model:current-page="rankCurrentPage"
:page-size="pageSize"
:total="rankingList.length"
:page-size="rankingPageSize"
:total="allRankingList.length"
@page-change="handleRankPageChange"
/>
</div>
......@@ -419,6 +419,7 @@ const getUSGovernmentSanctionHistoryData = async () => {
const loadingJointRank = ref(false);
const getUSGovernmentJointSanctionRankData = async () => {
loadingJointRank.value = true;
const params = {};
try {
const res = await getUSGovernmentJointSanctionRank();
if (res.code === 200 && res.data) {
......@@ -487,8 +488,8 @@ const updateDynamicListByPage = () => {
};
const updateRankListByPage = () => {
const start = (rankCurrentPage.value - 1) * pageSize.value;
const end = start + pageSize.value;
const start = (rankCurrentPage.value - 1) * rankingPageSize.value;
const end = start + rankingPageSize.value;
rankingList.value = allRankingList.value.slice(start, end);
};
// 点击科技要闻-跳转详情页
......@@ -785,31 +786,7 @@ const fieldOptions = ref([
{ label: "其他", value: "99" }
]);
const methodOptions = ref([
// { label: "全部制裁手段", value: "" },
// { label: "法案", value: "-1" },
// { label: "政令", value: "-2" },
// { label: "实体清单", value: "1" },
// { label: "特别国民指定清单", value: "2" },
// { label: "涉军企业", value: "3" },
// { label: "行业制裁识别清单", value: "4" },
// { label: "无法核实清单", value: "5" },
// { label: "军事最终用户清单", value: "6" },
// { label: "非SDN中国军工企业名单", value: "7" },
// { label: "拒绝往来人员清单", value: "8" },
// { label: "军事最终用途与最终用户规则", value: "9" },
// { label: "欧盟合并制裁清单", value: "10" },
// { label: "英国制裁清单", value: "11" },
// { label: "加拿大合并自主制裁清单", value: "12" },
// { label: "商业管制清单", value: "13" }
// { label: "232调查", value: "14" },
// { label: "Capta List (CAP) - Treasury Department", value: "15" },
// { label: "ITAR Debarred (DTC) - State Department", value: "16" },
// { label: "Nonproliferation Sanctions (ISN) - State Department", value: "17" },
// { label: "Non-SDN Menu-Based Sanctions List (NS-MBS List) - Treasury Department", value: "18" },
// { label: "Palestinian Legislative Council List (PLC) - Treasury Department", value: "19" },
// { label: "经验证最终用户清单", value: "20" }
]);
const methodOptions = ref([]);
const handleGetSanList = async () => {
const params = {
......@@ -825,16 +802,17 @@ const handleGetSanList = async () => {
value: item.id
};
});
methodValue.value = "";
}
} catch (error) {}
};
watch(
() => methodValue.value,
val => {
getDepartmentListData();
}
);
// watch(
// () => methodValue.value,
// val => {
// getDepartmentListData();
// }
// );
watch(
() => deptValue.value,
......@@ -847,6 +825,7 @@ const allDynamicData = ref([]);
const dynamicList = ref([]);
const newsCurrentPage = ref(1);
const pageSize = ref(5); // 每页显示 5 条
const rankingPageSize = ref(10);
const handleNewsPageChange = page => {
newsCurrentPage.value = page;
......@@ -1662,7 +1641,7 @@ const prev = () => {
// border-radius: 10px;
// border: 1px solid rgb(234, 236, 238);
border-bottom: 1px solid rgb(234, 236, 238);
padding: 12px 24px;
padding: 10px 24px;
margin-bottom: 12px;
box-sizing: border-box;
......
......@@ -6,10 +6,16 @@
<img src="./assets/leftbtn.png" alt class="left-btn" @click="prev" :class="{ disabled: startIndex === 0 }" />
<div class="content">
<div class="carousel-container" :style="{ transform: `translateX(-${startIndex * (307 + 16)}px)` }">
<div class="carousel-item" v-for="item, index in carouselList" :key="index">
<div class="carousel-item" v-for="(item, index) in carouselList" :key="index">
<div class="item-top">
<div class="top-img">
<img :src="ele" :class="{ img1: index !== 0 }" alt v-for="(ele, idx) in item.imageList" :key="idx" />
<img
:src="ele"
:class="{ img1: index !== 0 }"
alt
v-for="(ele, idx) in item.imageList"
:key="idx"
/>
</div>
<div class="top-num">{{ item.count }}</div>
</div>
......@@ -20,13 +26,18 @@
:key="idxx">
{{ ele.industryName }}
</div> -->
<AreaTag v-for="ele, idxx in item.industryList" :key="idxx" :tagName="ele.industryName"></AreaTag>
<AreaTag v-for="(ele, idxx) in item.industryList" :key="idxx" :tagName="ele.industryName"></AreaTag>
</div>
</div>
</div>
</div>
<img src="./assets/rightbtn.png" alt class="right-btn" @click="next"
:class="{ disabled: startIndex >= carouselList.length - 5 }" />
<img
src="./assets/rightbtn.png"
alt
class="right-btn"
@click="next"
:class="{ disabled: startIndex >= carouselList.length - 5 }"
/>
</div>
<!-- 排华联盟分布 -->
......@@ -48,8 +59,13 @@
<div class="item" v-for="(item, index) in countList" :key="index">
<div class="item-left">
<img :src="item.image" alt />
<el-tooltip effect="dark" :content="item.zhName" popper-class="common-prompt-popper" placement="top"
:show-after="500">
<el-tooltip
effect="dark"
:content="item.zhName"
popper-class="common-prompt-popper"
placement="top"
:show-after="500"
>
<span>{{ item.zhName }}</span>
</el-tooltip>
</div>
......@@ -91,13 +107,18 @@
<span>排华联盟最新动态</span>
</div>
<div class="news-content">
<div class="item" v-for="item, index in newsList" :key="index">
<div class="item" v-for="(item, index) in newsList" :key="index">
<div class="item-title">
<img :src="item.image || defaultImg" alt />
<span @click="handleClick(item)">{{ item.title }}</span>
</div>
<el-tooltip effect="dark" :content="item.content" popper-class="common-prompt-popper" placement="top"
:show-after="500">
<el-tooltip
effect="dark"
:content="item.content"
popper-class="common-prompt-popper"
placement="top"
:show-after="500"
>
<div class="item-content">{{ item.content }}</div>
</el-tooltip>
<div class="item-bottom">
......@@ -106,7 +127,7 @@
:key="idx">
<span>{{ ele.industryName }}</span>
</div> -->
<AreaTag v-for="ele, idx in item.industryList" :key="idx" :tagName="ele.industryName"></AreaTag>
<AreaTag v-for="(ele, idx) in item.industryList" :key="idx" :tagName="ele.industryName"></AreaTag>
</div>
<div class="bottom-right">{{ getTime(item.time) }}</div>
</div>
......@@ -123,16 +144,26 @@
<div class="item-title">
<div class="title-left">
<div class="img-list">
<img :src="ele.image || defaultImg" :class="{ img1: index !== 0 }"
@error="e => (e.target.src = defaultImg)" alt v-for="(ele, index) in item.countryList"
:key="index" />
<img
:src="ele.image || defaultImg"
:class="{ img1: index !== 0 }"
@error="e => (e.target.src = defaultImg)"
alt
v-for="(ele, index) in item.countryList"
:key="index"
/>
</div>
<div class="left-content">{{ getContent(item.countryList) }}</div>
</div>
<div class="title-right">{{ item.statementList?.length }}次合作</div>
</div>
<div class="item-content">
<div class="content-list" v-for="(ele, idx) in item.statementList" :key="idx" @click="handleClick(ele)">
<div
class="content-list"
v-for="(ele, idx) in item.statementList"
:key="idx"
@click="handleClick(ele)"
>
<div class="list-left">
<!-- <span>{{ getName(ele.industryList) }}</span> -->
<AreaTag v-if="getName(ele.industryList)" :tagName="getName(ele.industryList)"></AreaTag>
......@@ -945,7 +976,7 @@ const initRightDonut = async () => {
value: res.data[i].amount,
x: Math.random() * 10,
y: Math.random() * 10,
symbolSize: res.data[i].amount * 9,
symbolSize: res.data[i].amount * 9
};
// 先判断data中是否包含上述数据
......@@ -985,8 +1016,8 @@ const initRightDonut = async () => {
// text: 'Basic Graph'
},
tooltip: {
trigger: 'item', // 针对Graph的节点/边触发(必配,否则弹框不生效)
triggerOn: 'click',
trigger: "item", // 针对Graph的节点/边触发(必配,否则弹框不生效)
triggerOn: "click",
formatter: function (params) {
// params.data 是当前点击节点的完整数据对象
const { name, value } = params.data;
......@@ -1018,7 +1049,7 @@ const initRightDonut = async () => {
show: true
},
edgeSymbol: ["circle", ""],
edgeSymbolSize: [4, 40],
edgeSymbolSize: [4, 80],
edgeLabel: {
fontSize: 20
},
......
......@@ -26,7 +26,7 @@
</div>
<!-- 资讯要问 -->
<div class="ask" id="position2">
<com-title title="咨询要闻" />
<com-title title="资讯要闻" />
<div class="ask-main">
<askPage />
</div>
......
......@@ -50,12 +50,25 @@
<div class="home-main" ref="homeMainRef">
<div class="home-top-bg"></div>
<div class="home-main-header">
<SearchContainer style="margin-bottom: 0; margin-top: 48px; height: fit-content" v-if="homeMainRef"
placeholder="搜索出口管制" :containerRef="homeMainRef" areaName="实体清单" />
<SearchContainer
style="margin-bottom: 0; margin-top: 48px; height: fit-content"
v-if="homeMainRef"
placeholder="搜索出口管制"
:containerRef="homeMainRef"
areaName="实体清单"
/>
<div class="home-main-header-footer-info">
<InfoCard v-for="(item, index) in infoList" :key="item.id" :title="item.nameZh" :subtitle="item.nameAbbr"
:description="item.description" :quantity="item.postCount" unit="次" :color="infoListColor[index]"
@click="handleToEntityListNoId(item)" />
<InfoCard
v-for="(item, index) in infoList"
:key="item.id"
:title="item.nameZh"
:subtitle="item.nameAbbr"
:description="item.description"
:quantity="item.postCount"
unit="次"
:color="infoListColor[index]"
@click="handleToEntityListNoId(item)"
/>
</div>
</div>
......@@ -81,8 +94,15 @@
<img src="./assets/images/box1-right.png" alt="" />
</div>
</div>
<el-carousel ref="carouselRef" height="370px" :autoplay="true" :interval="3000" arrow="never"
indicator-position="none" @change="handleCarouselChange">
<el-carousel
ref="carouselRef"
height="370px"
:autoplay="true"
:interval="3000"
arrow="never"
indicator-position="none"
@change="handleCarouselChange"
>
<el-carousel-item v-for="(item, index) in entitiesDataInfoList" :key="item.id + index">
<div>
<div class="box1-top">
......@@ -100,8 +120,11 @@
</div>
<div class="box1-top-content-item">
<span class="box1-top-content-item-title">· 涉及领域:</span>
<div class="box1-top-content-item-tags" v-for="(domainItem, index) in item.domains"
:key="index">
<div
class="box1-top-content-item-tags"
v-for="(domainItem, index) in item.domains"
:key="index"
>
<el-tag :type="getTagType(domainItem)">{{ domainItem }}</el-tag>
</div>
</div>
......@@ -110,10 +133,18 @@
<div class="box1-bottom">
<div class="box1-bottom-title">· 涉及主要实体:</div>
<div class="box1-bottom-content">
<div class="box1-bottom-content-item" v-for="(ett, index) in item.sanEntities" :key="index"
@click="handleEntityClick(ett)">
<el-image v-if="ett.img" class="box1-bottom-content-item-img" :src="ett.img"
alt=""></el-image>
<div
class="box1-bottom-content-item"
v-for="(ett, index) in item.sanEntities"
:key="index"
@click="handleEntityClick(ett)"
>
<el-image
v-if="ett.img"
class="box1-bottom-content-item-img"
:src="ett.img"
alt=""
></el-image>
<div v-else class="box1-bottom-content-item-imgUndefined">
{{
(ett.entityNameZh || ett.enName)?.match(
......@@ -186,10 +217,14 @@
</div>
</template>
</custom-container> -->
<RiskSignal :list="warningList" @item-click="handleToRiskSignalDetail" @more-click="handleToMoreRiskSignal"
riskLevel="signalLevel" postDate="signalTime" name="signalTitle" />
<RiskSignal
:list="warningList"
@item-click="handleToRiskSignalDetail"
@more-click="handleToMoreRiskSignal"
riskLevel="signalLevel"
postDate="signalTime"
name="signalTitle"
/>
</el-col>
</el-row>
......@@ -212,12 +247,19 @@
</custom-container>
</el-col> -->
<div class="center-center">
<NewsList :newsList="newsList" @item-click="handleNewsInfoClick" @more-click="handleToMoreNews"
content="newsContent" />
<MessageBubble :messageList="socialMediaList" @person-click="handlePerClick" imageUrl="avatar"
@more-click="handleToSocialDetail" />
<NewsList
:newsList="newsList"
@item-click="handleNewsInfoClick"
@more-click="handleToMoreNews"
content="newsContent"
/>
<MessageBubble
:messageList="socialMediaList"
@person-click="handlePerClick"
imageUrl="avatar"
@more-click="handleToSocialDetail"
/>
<!-- <custom-container title="社交媒体" :titleIcon="dialogIcon" height="450px">
<template #default>
<div class="dialog-list">
......@@ -227,12 +269,8 @@
</div>
</template>
</custom-container> -->
</div>
<el-row :gutter="20" style="width: 1600px; margin: 0 auto; height: 528px; margin-top: 64px">
<CustomTitle id="position3" title="数据总览" />
<el-col :span="24">
......@@ -247,14 +285,19 @@
<template #default="scope">
<div style="display: flex; align-items: center">
<span style="margin-right: 10px; width: 40px">{{ scope.row.num }}</span>
<el-progress :percentage="scope.row.percent * 100" :show-text="false"
:status="getStatus(scope.row.percent)" />
<el-progress
:percentage="scope.row.percent * 100"
:show-text="false"
:status="getStatus(scope.row.percent)"
/>
</div>
</template>
</el-table-column>
<el-table-column label="重点领域" width="280" align="center">
<template #default="scope">
<div style="display: flex; justify-content: center; align-items: center; gap: 5px">
<div
style="display: flex; justify-content: center; align-items: center; gap: 5px"
>
<el-tag v-for="tag in scope.row.tags" :key="tag" :type="getTagType(tag)">{{
tag
}}</el-tag>
......@@ -271,14 +314,19 @@
<template #default="scope">
<div style="display: flex; align-items: center">
<span style="margin-right: 10px; width: 40px">{{ scope.row.num }}</span>
<el-progress :percentage="scope.row.percent * 100" :show-text="false"
:status="getStatus(scope.row.percent)" />
<el-progress
:percentage="scope.row.percent * 100"
:show-text="false"
:status="getStatus(scope.row.percent)"
/>
</div>
</template>
</el-table-column>
<el-table-column label="重点领域" width="280" align="center">
<template #default="scope">
<div style="display: flex; justify-content: center; align-items: center; gap: 5px">
<div
style="display: flex; justify-content: center; align-items: center; gap: 5px"
>
<el-tag v-for="tag in scope.row.tags" :key="tag" :type="getTagType(tag)">{{
tag
}}</el-tag>
......@@ -295,8 +343,11 @@
<template #default="scope">
<div style="display: flex; align-items: center">
<span style="margin-right: 10px; width: 40px">{{ scope.row.num }}</span>
<el-progress :percentage="scope.row.percent * 100" :show-text="false"
:status="getStatus(scope.row.percent)" />
<el-progress
:percentage="scope.row.percent * 100"
:show-text="false"
:status="getStatus(scope.row.percent)"
/>
</div>
</template>
</el-table-column>
......@@ -348,9 +399,13 @@
<el-row :gutter="20" style="width: 1600px; margin: 0 auto; margin-top: 39px">
<CustomTitle id="position4" title="资源库" style="margin-top: 0px" />
<div class="resource-tabs">
<div v-for="tab in resourceTabs" :key="tab.value" class="resource-tab-item"
<div
v-for="tab in resourceTabs"
:key="tab.value"
class="resource-tab-item"
:class="{ active: activeResourceTab === tab.value, disabled: tab.disabled }"
@click="handleResourceTabClick(tab)">
@click="handleResourceTabClick(tab)"
>
{{ tab.label }}
</div>
</div>
......@@ -363,15 +418,25 @@
<div class="box4-item" v-for="(item, idx) in sanctionProcessList" :key="item.title">
<div class="box4-item-left">
<el-image :src="dotIcon" alt="图片" class="box4-item-left-icon" />
<div class="box4-item-left-line" v-if="idx + 1 != sanctionProcessList.length"></div>
<div
class="box4-item-left-line"
v-if="idx + 1 != sanctionProcessList.length"
></div>
</div>
<div class="box4-item-right">
<div class="box4-item-right-header" @click="handleSanc(item)">
<span class="box4-item-right-header-title">{{ item.postDate }}{{ item.title }}</span>
<span class="box4-item-right-header-title"
>{{ item.postDate }}{{ item.title }}</span
>
<span class="box4-item-right-header-desc">{{ item.desc }}</span>
</div>
<el-tooltip effect="dark" :content="item.content" popper-class="common-prompt-popper"
placement="top" :show-after="500">
<el-tooltip
effect="dark"
:content="item.content"
popper-class="common-prompt-popper"
placement="top"
:show-after="500"
>
<div class="box4-item-right-content">
{{ item.content }}
</div>
......@@ -379,8 +444,12 @@
</div>
</div>
</div>
<div class="box4-footer" :style="{ marginTop: sanctionProcessList.length > 0 ? '0px' : 'auto' }">
<el-button type="primary" link @click="handleGetMore">查看更多
<div
class="box4-footer"
:style="{ marginTop: sanctionProcessList.length > 0 ? '0px' : 'auto' }"
>
<el-button type="primary" link @click="handleGetMore"
>查看更多
<el-icon>
<DArrowRight />
</el-icon>
......@@ -397,8 +466,15 @@
</template>
<template #default>
<div class="box5">
<el-table :data="entitiesList" class="sanction-table" stripe empty-text="暂无数据" height="700px"
header-row-class-name="table-header" row-class-name="table-row">
<el-table
:data="entitiesList"
class="sanction-table"
stripe
empty-text="暂无数据"
height="700px"
header-row-class-name="table-header"
row-class-name="table-row"
>
<!-- <el-table-column prop="index" label="序号" width="80" align="center">
<template #default="scope">
{{ scope.$index + 1 + (currentPage - 1) * pageSize }}
......@@ -408,8 +484,12 @@
<el-table-column prop="name" label="实体名称" min-width="200">
<template #default="scope">
<div class="tableName" @click="handleCompClick(scope.row)">
<el-image v-if="scope.row.img" class="box1-bottom-content-item-img" :src="scope.row.img"
alt=""></el-image>
<el-image
v-if="scope.row.img"
class="box1-bottom-content-item-img"
:src="scope.row.img"
alt=""
></el-image>
<div v-else class="box1-bottom-content-item-imgUndefined">
{{
(scope.row.name || scope.row.enName)?.match(
......@@ -460,13 +540,19 @@
<el-table-column prop="revenue" label="50%规则子企业" width="280" align="right">
<template #default="scope">
<div class="num-item" v-if="scope.row.ruleOrgCount > 0">
<div class="name-item" :class="[
<div
class="name-item"
:class="[
'revenue-cell',
scope.row.revenue === '无营收数据' ? 'no-revenue' : ''
]">
]"
>
{{ scope.row.ruleOrgList[0].orgName }}...等
</div>
<div style="width: 50px; color: #409eff; cursor: pointer" @click="handleOrgClick(scope.row)">
<div
style="width: 50px; color: #409eff; cursor: pointer"
@click="handleOrgClick(scope.row)"
>
{{ scope.row.ruleOrgCount }}家>
</div>
</div>
......@@ -478,8 +564,15 @@
<!-- <div class="pagination-info">
第{{ currentPage }}页,共{{ totalPages }}页
</div> -->
<el-pagination v-model:current-page="currentPage" :page-size="pageSize" :total="total"
:pager-count="5" layout="prev, pager, next" background @current-change="handlePageChange" />
<el-pagination
v-model:current-page="currentPage"
:page-size="pageSize"
:total="total"
:pager-count="5"
layout="prev, pager, next"
background
@current-change="handlePageChange"
/>
</div>
</div>
</template>
......@@ -545,8 +638,14 @@
</div>
<div class="right-footer">
<div class="total-count">{{ totalAll }}</div>
<el-pagination v-model:current-page="currentPageAll" :page-size="pageSizeAll" :total="totalAll"
layout="prev, pager, next" background @current-change="handlePageChangeAll" />
<el-pagination
v-model:current-page="currentPageAll"
:page-size="pageSizeAll"
:total="totalAll"
layout="prev, pager, next"
background
@current-change="handlePageChangeAll"
/>
</div>
</div>
</div>
......@@ -581,8 +680,12 @@
</div>
</template>
</el-dialog> -->
<RuleSubsidiaryDialog v-model="dialogVisible" :company-name="currentRuleCompany" :total-count="currentRuleCount"
:data-list="currentOrgList" />
<RuleSubsidiaryDialog
v-model="dialogVisible"
:company-name="currentRuleCompany"
:total-count="currentRuleCount"
:data-list="currentOrgList"
/>
</div>
<el-dialog v-model="mediaVisible" title="社交媒体信息" width="500" :before-close="handleMediaClose">
<div class="dialog-content">
......@@ -598,7 +701,7 @@
</template>
<script setup>
import NewsList from "@/components/NewsList/NewsList.vue";
import NewsList from "@/components/base/newsList/index.vue";
import RiskSignal from "@/components/RiskSignal/RiskSignal.vue";
import { onMounted, ref, computed, reactive, shallowRef, watch, nextTick } from "vue";
import { useContainerScroll } from "@/hooks/useScrollShow";
......@@ -834,7 +937,7 @@ onMounted(async () => {
]);
// 交换第二个和第三个元素
[dataCount[1], dataCount[2]] = [dataCount[2], dataCount[1]];
infoList.value = dataCount;
infoList.value = dataCount.slice(0, 2);
const entityList = _.map(entitiesDataInfo?.sanEntities ?? [], ({ entityNameZh, entityName }) => {
return { name: entityNameZh, enName: entityName };
......@@ -1254,7 +1357,7 @@ const fetchSanctionList = async () => {
});
totalAll.value = res.totalElements;
}
} catch (error) { }
} catch (error) {}
};
const handlePageChangeAll = val => {
......@@ -1497,9 +1600,9 @@ const handlePerClick = item => {
// 添加格式化时间的方法
const formatTime = timeStr => {
// 空值兜底,避免报错
if (!timeStr) return '暂无时间';
if (!timeStr) return "暂无时间";
// 核心:替换T为空格
return timeStr.replace('T', ' ');
return timeStr.replace("T", " ");
};
const warningList = ref([]);
......@@ -1526,7 +1629,7 @@ const handleGetHylyList = async () => {
hylymc: "全部分类"
};
categoryList.value = [obj, ...categoryList.value];
} catch (error) { }
} catch (error) {}
};
const chart1Data = ref({
......@@ -2017,7 +2120,6 @@ const handleMediaClick = item => {
}
.box3-content {
// flex: 1;
.el-progress--line {
width: 82px;
......@@ -3413,7 +3515,6 @@ const handleMediaClick = item => {
.center-center-news {
flex-shrink: 0;
}
.boxs4 {
......
......@@ -3,8 +3,13 @@
<div class="main-content" ref="homeMainRef">
<div class="home-top-bg"></div>
<!-- 搜索栏部分 -->
<SearchContainer v-if="homeMainRef" :countInfo="statCountInfo" placeholder="搜索规则限制" :containerRef="homeMainRef"
areaName="" />
<SearchContainer
v-if="homeMainRef"
:countInfo="statCountInfo"
placeholder="搜索规则限制"
:containerRef="homeMainRef"
areaName=""
/>
<!-- 最新动态 -->
<div class="newdata" id="position1">
<com-title title="最新动态" />
......@@ -14,7 +19,7 @@
</div>
<!-- 资讯要问 -->
<div class="ask" id="position2">
<com-title title="咨询要闻" />
<com-title title="资讯要闻" />
<div class="ask-main">
<askPage />
</div>
......
......@@ -19,7 +19,7 @@
</div>
</div>
<div class="btn" @click="handleToPosi('position2')">
<div class="btn-text">咨询要闻</div>
<div class="btn-text">资讯要闻</div>
<div class="btn-icon">
<img src="@/assets/icons/arrow-right-icon.png" alt />
</div>
......@@ -29,7 +29,8 @@
<div class="btn-icon">
<img src="@/assets/icons/arrow-right-icon.png" alt />
</div>
</div>,
</div>
,
<div class="btn" @click="handleToPosi('position4')">
<div class="btn-text">资源库</div>
<div class="btn-icon">
......@@ -85,7 +86,7 @@
</div>
</div>
<div class="btn" @click="handleToPosi('position2')">
<div class="btn-text">咨询要闻</div>
<div class="btn-text">资讯要闻</div>
<div class="btn-icon">
<img src="@/assets/icons/arrow-right-icon.png" alt />
</div>
......@@ -113,7 +114,7 @@
</div>
<!-- 资讯要问 -->
<div class="ask" id="position2">
<com-title title="咨询要闻" />
<com-title title="资讯要闻" />
<div class="ask-main">
<askPage />
</div>
......@@ -145,7 +146,7 @@ import askPage from "./components/askPage/index.vue";
import dataSub from "./components/dataSub/index.vue";
import resLib from "./components/resLib/index.vue";
import { useContainerScroll } from "@/hooks/useScrollShow";
import { getStatCount } from '@/api/ruleRestriction/index.js'
import { getStatCount } from "@/api/ruleRestriction/index.js";
// 搜索框
const input = ref("");
......@@ -154,19 +155,19 @@ const { isShow } = useContainerScroll(homeMainRef);
const router = useRouter();
const statCountInfo = ref({})
const statCountInfo = ref({});
const getStatCountInfo = async () => {
try {
const res = await getStatCount();
if (res && res.code === 200) {
// console.log('----getStatCountInfo', res.data)
statCountInfo.value = res.data
statCountInfo.value = res.data;
}
} catch (error) {
console.error("获取首页统计接口失败:", error);
}
}
};
// 搜索功能
const handleSearch = () => {
......@@ -205,8 +206,8 @@ const handleBackHome = () => {
};
onMounted(async () => {
await getStatCountInfo()
})
await getStatCountInfo();
});
</script>
<style scoped lang="scss">
......
......@@ -14,8 +14,14 @@
<div class="main-content" ref="containerRef">
<div class="home-top-bg"></div>
<!-- 搜索栏部分 -->
<SearchContainer style="margin-bottom: 48px;height: fit-content;" v-if="containerRef" :countInfo="countInfo"
placeholder="搜索科研资助实体、资助记录" :containerRef="containerRef" areaName="" />
<SearchContainer
style="margin-bottom: 48px; height: fit-content"
v-if="containerRef"
:countInfo="countInfo"
placeholder="搜索科研资助实体、资助记录"
:containerRef="containerRef"
areaName=""
/>
<!-- <div class="search"> -->
<!-- <div class="search-main">
......@@ -51,7 +57,7 @@
</div>
</div>
<div class="btn" @click="scrollToTop('position2')">
<div class="btn-text">咨询要闻</div>
<div class="btn-text">资讯要闻</div>
<div class="btn-icon">
<img src="@/assets/icons/arrow-right-icon.png" alt="" />
</div>
......@@ -80,7 +86,7 @@
<div class="data-item-name">{{ item.orgNameEn }}</div>
<div v-if="item.orgAbbEn" class="data-item-abb">{{ item.orgAbbEn }}</div>
</div>
<div class="data-item-num" :style="{ color: color[index] }">{{ item.num + '项' }}</div>
<div class="data-item-num" :style="{ color: color[index] }">{{ item.num + "项" }}</div>
</div>
</div>
<!-- 最新动态 -->
......@@ -92,7 +98,7 @@
</div>
<!-- 资讯要问 -->
<div class="ask" id="position2">
<com-title title="咨询要闻" />
<com-title title="资讯要闻" />
<div class="ask-main">
<askPage />
</div>
......@@ -125,10 +131,7 @@ import dataSub from "./components/dataSub/index.vue";
import resLib from "./components/resLib/index.vue";
import scrollToTop from "@/utils/scrollToTop";
import {
getFundSourceOrg
} from "@/api/scientificFunding/overview";
import { getFundSourceOrg } from "@/api/scientificFunding/overview";
import { useContainerScroll } from "@/hooks/useScrollShow";
......@@ -141,21 +144,21 @@ import img06 from "./assets/images/img06.png";
let containerRef = ref(null);
let countInfo = ref([
{
name: '科研资助机构',
name: "科研资助机构",
count: 18
},
{
name: '科研资助动态',
name: "科研资助动态",
count: 633
},
{
name: '科研资助项目',
name: "科研资助项目",
count: 312
},
{
name: '经费总额(亿美元)',
count: '15,556'
},
name: "经费总额(亿美元)",
count: "15,556"
}
]);
// 搜索框
const input = ref("");
......@@ -231,14 +234,14 @@ const color = ref([
"rgba(64, 150, 255, 1)",
"rgb(33, 129, 57)",
"rgb(5, 95, 194)"
])
]);
//// 来源机构列表
const handleGetFundSourceOrg = async () => {
try {
const res = await getFundSourceOrg();
console.log("来源机构列表", res);
if (res.code === 200 && res.data) {
dataList.value = res.data
dataList.value = res.data;
}
} catch (error) {
console.error("获取来源机构列表error", error);
......@@ -246,7 +249,7 @@ const handleGetFundSourceOrg = async () => {
};
onMounted(async () => {
handleGetFundSourceOrg()
handleGetFundSourceOrg();
});
</script>
......@@ -461,7 +464,9 @@ onMounted(async () => {
box-sizing: border-box;
position: relative;
cursor: pointer;
transition: transform 0.3s ease, box-shadow 0.3s ease;
transition:
transform 0.3s ease,
box-shadow 0.3s ease;
display: flex;
align-items: center;
padding: 0px 24px;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论