提交 d4db2b2b authored 作者: coderBryanFu's avatar coderBryanFu

update

上级 7749137b
......@@ -90,7 +90,7 @@ const headerTitleClasses = computed(() => [
width: 100%;
margin-bottom: 15px;
position: relative;
margin-bottom: 100px;
// margin-bottom: 100px;
}
.container-header {
......
......@@ -297,7 +297,7 @@
</div>
<div class="box4-main">
<div class="box4-main-item" v-for="(item, index) in messageList" :key="index">
<div class="left" @click="handleClcikToCharacter(item, index)">
<div class="left" @click="handleClcikToCharacter(item.personId)">
<img
:src="getProxyUrl(item.personImage) || Message3"
alt=""
......@@ -326,24 +326,31 @@
</div>
<div class="box5-header-title">{{ "涉华法案数量" }}</div>
</div>
<!-- <div class="box5-header-right">
<div class="header-right-icon">
<div class="box5-header-right">
<!-- <div class="header-right-icon">
<img src="./assets/images/tips-icon.png" alt="" />
</div>
<div class="header-right-text">{{ "数据来源:美国国会官方网站" }}</div>
</div> -->
</div>
<div class="box5-select">
<el-select
v-model="box5Select"
placeholder="选择领域"
@change="handleBox5Change"
style="width: 150px"
>
<el-option label="全部领域" value="全部领域" />
<el-option v-for="item in categoryList" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
<div class="header-right-text">{{ "数据来源:美国国会官方网站" }}</div> -->
<div class="box5-select">
<el-select
v-model="box5Select"
placeholder="选择领域"
@change="handleBox5Change"
style="width: 150px"
>
<el-option label="全部领域" value="全部领域" />
<el-option
v-for="item in categoryList"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</div>
</div>
</div>
<div
class="box5-main"
:style="{
......@@ -386,9 +393,17 @@
<img src="./assets/images/tips-icon.png" alt="" />
</div> -->
<!-- <div class="header-right-text">{{ "数据来源:美国国会官方网站" }}</div> -->
<el-select v-model="box7selectetedTime" placeholder="选择时间" style="width: 90px">
<el-option
v-for="item in box7YearList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</div>
</div>
<div class="box-center">
<!-- <div class="box-center">
<el-select v-model="box7selectetedTime" placeholder="选择时间" style="width: 90px">
<el-option
v-for="item in box7YearList"
......@@ -397,7 +412,7 @@
:value="item.value"
/>
</el-select>
</div>
</div> -->
<div
class="box7-main"
:style="{
......@@ -423,9 +438,17 @@
<img src="./assets/images/tips-icon.png" alt="" />
</div> -->
<!-- <div class="header-right-text">{{ "数据来源:美国国会官方网站" }}</div> -->
<el-select v-model="box8selectetedTime" placeholder="选择时间" style="width: 90px">
<el-option
v-for="item in box8YearList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</div>
</div>
<div class="box-center">
<!-- <div class="box-center">
<el-select v-model="box8selectetedTime" placeholder="选择时间" style="width: 90px">
<el-option
v-for="item in box8YearList"
......@@ -434,7 +457,7 @@
:value="item.value"
/>
</el-select>
</div>
</div> -->
<div
class="box8-main"
:style="{
......@@ -449,7 +472,7 @@
class="box8-main-item"
v-for="(item, index) in box8Data"
:key="index"
@click="handleClcikToCharacter(item, index)"
@click="handleClcikToCharacter(item.memberId)"
>
<div class="box8-main-item-left">
<img :src="getProxyUrl(item.img)" alt="" referrerpolicy="no-referrer" class="left-img" />
......@@ -483,9 +506,17 @@
<img src="./assets/images/tips-icon.png" alt="" />
</div> -->
<!-- <div class="header-right-text">{{ "数据来源:美国国会官方网站" }}</div> -->
<el-select v-model="box9selectetedTime" placeholder="选择时间" style="width: 90px">
<el-option
v-for="item in box9YearList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</div>
</div>
<div class="box-center">
<!-- <div class="box-center">
<el-select v-model="box9selectetedTime" placeholder="选择时间" style="width: 90px">
<el-option
v-for="item in box9YearList"
......@@ -494,7 +525,7 @@
:value="item.value"
/>
</el-select>
</div>
</div> -->
<div
class="box9-main"
:style="{
......@@ -739,35 +770,16 @@ import {
getPostMemberList,
getBills
} from "@/api/bill/billHome";
import { getPersonSummaryInfo } from "@/api/common/index";
import DivideHeader from "@/components/DivideHeader.vue";
import { useContainerScroll } from "@/hooks/useScrollShow";
import scrollToCenter from "@/utils/scrollToCenter";
import headerIcon1 from "./assets/icons/header-icon1.png";
import headerIcon2 from "./assets/icons/header-icon2.png";
import headerIcon3 from "./assets/icons/header-icon3.png";
import headerIcon4 from "./assets/icons/header-icon4.png";
import headerIcon5 from "./assets/icons/header-icon5.png";
import getMultiLineChart from "./utils/multiLineChart";
import getWordCloudChart from "./utils/worldCloudChart";
import getPieChart from "./utils/piechart";
import getDoublePieChart from "./utils/doublePieChart";
import bill1 from "./assets/images/bill1.png";
import bill2 from "./assets/images/bill2.png";
import bill3 from "./assets/images/bill3.png";
import bill4 from "./assets/images/bill4.png";
import bill5 from "./assets/images/bill5.png";
import bill6 from "./assets/images/bill6.png";
import bill7 from "./assets/images/bill7.png";
import bill8 from "./assets/images/bill8.png";
import bill9 from "./assets/images/bill9.png";
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 News1 from "./assets/images/news1.png";
import News2 from "./assets/images/news2.png";
......@@ -789,7 +801,8 @@ import Cyy from "@/assets/icons/cyy.png";
import Zyy from "@/assets/icons/zyy.png";
import Ghd from "@/assets/icons/ghd.png";
import Mzd from "@/assets/icons/mzd.png";
import { iteratee } from "lodash";
import { ElMessage } from "element-plus";
const searchBillText = ref("");
......@@ -824,23 +837,61 @@ const formatMessageTime = timeStr => {
};
// 跳转人物主页
const handleClcikToCharacter = (item, index) => {
window.sessionStorage.setItem("memberId", item.memberId);
let type;
if (index === 0) {
type = 2;
} else if (index === 1) {
type = 1;
} else {
type = 3;
}
const route = router.resolve({
path: "/characterPage",
query: {
type: type
const handleClcikToCharacter = async (id) => {
window.sessionStorage.setItem("memberId", id);
const personTypeList = JSON.parse(window.sessionStorage.getItem("personTypeList"));
console.log("personTypeList", personTypeList);
let type = 0;
let personTypeName = "";
const params = {
personId: id
};
try {
const res = await getPersonSummaryInfo(params);
console.log("人物全局信息", res);
if (res.code === 200 && res.data) {
const arr = personTypeList.filter(item => {
return item.typeId === res.data.personType;
});
console.log("arr", arr);
if (arr && arr.length > 0) {
personTypeName = arr[0].typeName;
console.log("personTypeName", personTypeName);
if (personTypeName === "科技企业领袖") {
type = 1;
} else if (personTypeName === "国会议员") {
type = 2;
} else if (personTypeName === "智库研究人员") {
type = 3;
} else {
personTypeName = "";
ElMessage.warning("找不到当前人员的类型值!");
return;
}
const route = router.resolve({
path: "/characterPage",
query: {
type: type, // type=1为科技企业领袖,2为国会议员,3为智库研究人员
personId: id
}
});
window.open(route.href, "_blank");
} else {
personTypeName = "";
ElMessage.warning("找不到当前人员的类型值!");
return;
}
} else {
ElMessage.warning("找不到当前人员的类型值!");
return;
}
});
window.open(route.href, "_blank");
} catch (error) {}
};
// 返回首页
......@@ -1751,12 +1802,11 @@ const handleSearch = () => {
path: "/searchResults",
query: {
searchText: searchBillText.value,
areaName: '法案'
areaName: "法案"
}
});
window.open(curRoute.href, "_blank");
}
};
onMounted(async () => {
handleGetHylyList();
......@@ -2016,44 +2066,44 @@ onUnmounted(() => {});
margin-top: 39px;
display: flex;
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%;
.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;
......@@ -2847,12 +2897,12 @@ onUnmounted(() => {});
.box5-main {
height: 397px;
}
.box5-select {
position: absolute;
top: 53px;
left: 100px;
z-index: 100;
}
// .box5-select {
// position: absolute;
// top: 53px;
// left: 100px;
// z-index: 100;
// }
}
.box6 {
margin-left: 20px;
......@@ -2991,7 +3041,7 @@ onUnmounted(() => {});
justify-content: flex-end;
}
.box7-main {
height: 340px;
height: 380px;
}
}
.box8 {
......@@ -3055,15 +3105,15 @@ onUnmounted(() => {});
}
}
}
.box-center {
height: 45px;
padding-right: 20px;
display: flex;
align-items: center;
justify-content: flex-end;
}
// .box-center {
// height: 45px;
// padding-right: 20px;
// display: flex;
// align-items: center;
// justify-content: flex-end;
// }
.box8-main {
height: 340px;
height: 380px;
overflow-y: auto;
overflow-x: hidden;
.box8-main-item {
......@@ -3223,7 +3273,7 @@ onUnmounted(() => {});
justify-content: flex-end;
}
.box9-main {
height: 340px;
height: 380px;
}
}
}
......@@ -3377,6 +3427,8 @@ onUnmounted(() => {});
box-shadow: 0px 0px 20px 0px rgba(25, 69, 130, 0.1);
background: rgba(255, 255, 255, 1);
margin-bottom: 16px;
overflow: hidden;
overflow-y: auto;
cursor: pointer;
.header {
height: 91px;
......
......@@ -6,7 +6,7 @@ const getDoublePieChart = (data1, data2) => {
series: [
{
type: 'pie',
radius: [25, 68],
radius: [45, 88],
// height: '100%',
left: 'center',
// width: '100%',
......@@ -32,10 +32,10 @@ const getDoublePieChart = (data1, data2) => {
},
{
type: 'pie',
radius: [70, 100],
radius: [90, 120],
height: '100%',
left: 'center',
width: '80%',
width: '98%',
itemStyle: {
borderColor: '#fff',
borderWidth: 1
......@@ -45,11 +45,18 @@ const getDoublePieChart = (data1, data2) => {
formatter: '{name|{b}}\n{time|{c} 条 {d}%}',
minMargin: 5,
edgeDistance: 10,
lineHeight: 15,
rich: {
lineHeight: 24,
rich: {
name: {
color: 'rgba(59, 65, 75, 1)',
fontFamily: 'Microsoft YaHei',
fontSize: 16,
fontWeight: 'bold',
},
time: {
fontSize: 10,
color: '#999'
fontSize: 16,
fontFamily: 'Microsoft YaHei',
color: '#rgba(95, 101, 108, 1)'
}
}
},
......
const getPieChart = (data,colorList) => {
const getPieChart = (data, colorList) => {
let option = {
// color: colorList,
series: [
{
type: 'pie',
radius: [70, 100],
height: '100%',
left: 'center',
width: '100%',
itemStyle: {
borderColor: '#fff',
borderWidth: 1
},
label: {
alignTo: 'edge',
formatter: '{name|{b}}\n{time|{c} 条 {d}%}',
minMargin: 5,
edgeDistance: 10,
lineHeight: 15,
rich: {
time: {
fontSize: 10,
color: '#999'
type: 'pie',
radius: [70, 100],
height: '100%',
left: 'center',
width: '100%',
itemStyle: {
borderColor: '#fff',
borderWidth: 1
},
label: {
alignTo: 'edge',
formatter: '{name|{b}}\n{time|{c} 条 {d}%}',
minMargin: 5,
edgeDistance: 10,
lineHeight: 25,
rich: {
name: {
color: 'rgba(59, 65, 75, 1)',
fontFamily: 'Microsoft YaHei',
fontSize: 16,
fontWeight: 'bold',
},
time: {
fontSize: 16,
fontFamily: 'Microsoft YaHei',
color: '#rgba(95, 101, 108, 1)'
}
}
}
},
labelLine: {
length: 15,
length2: 0,
maxSurfaceAngle: 80
},
labelLayout: function (params) {
const isLeft = params.labelRect.x < 556 / 2;
const points = params.labelLinePoints;
// Update the end point.
points[2][0] = isLeft
? params.labelRect.x
: params.labelRect.x + params.labelRect.width;
return {
labelLinePoints: points
};
},
data: data
}]
},
labelLine: {
length: 15,
length2: 0,
maxSurfaceAngle: 80
},
labelLayout: function (params) {
const isLeft = params.labelRect.x < 556 / 2;
const points = params.labelLinePoints;
// Update the end point.
points[2][0] = isLeft
? params.labelRect.x
: params.labelRect.x + params.labelRect.width;
return {
labelLinePoints: points
};
},
data: data
}]
}
return option
}
......
......@@ -380,7 +380,7 @@ onMounted(() => {
display: flex;
justify-content: space-between;
.layout-main-header-left-box {
width: 500px;
width: 900px;
margin-left: 160px;
margin-top: 13px;
.left-box-top {
......
......@@ -795,7 +795,7 @@ const newsList = ref([
]);
const handleGetNews = async () => {
const params = {
moduleId: "0101"
moduleId: "0100"
};
try {
const res = await getNews(params);
......
......@@ -478,14 +478,18 @@ onMounted(() => {
}
&-news-img {
height: 370px;
border-top: 1px solid rgba(234, 236, 238, 1);
padding: 15px 10px;
display: flex;
align-items: center;
justify-content: center;
gap: 20px;
overflow: hidden;
overflow-y: auto;
}
.box4 {
background: orange;
.box4-item {
display: flex;
gap: 10px;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论