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

update

上级 9ca77a28
......@@ -41,11 +41,12 @@
</template>
<script setup>
import { ref, computed } from "vue";
import { ref, computed, onMounted } from "vue";
import { Monitor, House, User, Location, Document, Bell, Message, ArrowDown } from "@element-plus/icons-vue";
import { useRouter } from "vue-router";
import Breadcrumb from "@/components/BreadCrumb/index.vue";
import AiBox from "./components/AiBox.vue";
import {getPersonType} from '@/api/common/index'
// import { useDraggable } from "@vueuse/core";
const router = useRouter();
......@@ -84,6 +85,30 @@ const openAiBox = () => {
const handleHomeCommand = command => {
router.push(command);
};
const personTypeList = ref([])
// 获取人物类别
const handleGetPersonType = async() => {
try {
const res = await getPersonType()
console.log('res', res);
if(res.code === 200) {
personTypeList.value = res.data
} else {
personTypeList.value = []
}
window.sessionStorage.setItem('personTypeList', JSON.stringify(personTypeList.value))
} catch (error) {
}
}
onMounted(() => {
handleGetPersonType()
})
</script>
<style>
......
......@@ -22,4 +22,20 @@ export function getRemarks(params) {
method: 'GET',
url: `/api/commonFeature/remarks/${params.moduleId}`,
})
}
// 获取人物全局信息 通过personId 获取personType
export function getPersonSummaryInfo(params) {
return request({
method: 'GET',
url: `/api/personHomepage/summaryInfo/${params.personId}`,
})
}
// 获取人物类别
export function getPersonType() {
return request({
method: 'GET',
url: `/api/commonDict/personType`,
})
}
\ No newline at end of file
......@@ -46,4 +46,15 @@ export function getDecreeSummary(params) {
url: `/api/administrativeOrderInfo/summary/${params.id}`,
params
})
}
// 获取报告原文
/**
* @param {id}
*/
export function getDecreeReport(params) {
return request({
method: 'GET',
url: `/api/administrativeOrderInfo/contentUrl/${params.id}`,
})
}
\ No newline at end of file
......@@ -274,7 +274,7 @@
</div>
<div class="box4-main">
<div class="box4-main-item" v-for="(item, index) in messageList" :key="index">
<div class="left" @click="handleClickPerson()">
<div class="left" @click="handleClickPerson(item)">
<img :src="item.img ? item.img : DefaultIcon1" alt="" />
</div>
<div class="right">
......@@ -552,6 +552,7 @@ import {
getDecreeOrderList,
getDecreehylyList
} from "@/api/decree/home";
import { getPersonSummaryInfo } from "@/api/common/index";
import { getNews, getSocialMedia } from "@/api/general/index";
import WordCloudMap from "./WordCloudMap.vue";
import DivideHeader from "@/components/DivideHeader.vue";
......@@ -599,6 +600,7 @@ import News5 from "./assets/images/news5.png";
import Message1 from "./assets/images/message-icon1.png";
import Message2 from "./assets/images/message-icon2.png";
import Message3 from "./assets/images/message-icon3.png";
import { ElMessage } from "element-plus";
// 跳转行政机构主页
const handleToInstitution = item => {
......@@ -755,24 +757,13 @@ const handleKeyDecree = id => {
// 风险信号
const warningList = ref([
{
id: 1,
name: "关于对中华人民共和国合成阿片类药物供应链...",
postDate: "一天前",
riskLevel: "特别重大"
},
{
id: 2,
name: "关于调整钢铁进口的公告",
postDate: "一天前",
riskLevel: "重大风险"
},
{
id: 3,
name: "关于修订对中华人民共和国低价值进口商品适...",
postDate: "一天前",
riskLevel: "一般风险"
}
// {
// id: 1,
// name: "关于对中华人民共和国合成阿片类药物供应链...",
// postDate: "一天前",
// riskLevel: "特别重大"
// }
]);
const handlegetDecreeRiskSignal = async () => {
try {
......@@ -862,22 +853,70 @@ const handleGetMessage = async () => {
return {
img: item.personImage,
name: item.personName,
time: item.time + " · 发布于" + item.orgName,
content: item.remarks
time: item.time.replace("T", " ") + " · 发布于" + item.orgName,
content: item.remarks,
personId: item.personId,
remarksId: item.remarksId
};
});
} catch (error) {}
};
handleGetMessage();
// 点击人物头像,跳转到人物主页
const handleClickPerson = () => {
const route = router.resolve({
path: "/characterPage",
query: {
type: 3 // 1 2 3
const handleClickPerson = async item => {
console.log("person", item);
const personTypeList = JSON.parse(window.sessionStorage.getItem("personTypeList"));
console.log("personTypeList", personTypeList);
let type = 0;
let personTypeName = "";
const params = {
personId: item.personId
};
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: item.personId
}
});
window.open(route.href, "_blank");
} else {
personTypeName = "";
ElMessage.warning("找不到当前人员的类型值!");
return;
}
} else {
ElMessage.warning("找不到当前人员的类型值!");
return;
}
});
window.open(route.href, "_blank");
} catch (error) {}
};
// 行政令发布频度
......@@ -1125,7 +1164,8 @@ const pubTime = ref([
{ id: "2023", name: "2023年" },
{ id: "2022", name: "2022年" },
{ id: "2021", name: "2021年" },
{ id: "更早时间", name: "更早时间" }
{ id: "2020", name: "2020年" },
// { id: "更早时间", name: "更早时间" }
]);
const activePubTime = ref(["2025"]);
......
......@@ -46,7 +46,7 @@
<!-- <el-button type="plain" size="large" icon="Search" @click="handleSwitchActiveName('法案原文')"
>政令原文</el-button
> -->
<el-button type="plain" size="large" icon="Search">政令原文</el-button>
<el-button type="plain" size="large" icon="Search" @click="handleShowReport">政令原文</el-button>
<el-button type="primary" size="large" icon="EditPen">分析报告</el-button>
</div>
</div>
......@@ -106,17 +106,24 @@
</div>
</div>
</div>
<!-- <div class="tool-box">
<div class="tool1">
<img src="./assets/icons/tool-icon1.png" alt="" />
</div>
<div class="tool2">
<img src="./assets/icons/tool-icon2.png" alt="" />
</div>
<div class="tool3">
<img src="./assets/icons/tool-icon3.png" alt="" />
</div>
</div> -->
<div class="report" v-if="isShowReport">
<div class="report-close" @click="handleCloseReport">
<img src="@/assets/icons/close.png" alt="" />
</div>
<div class="report-header">
{{ "政令原文" }}
</div>
<div class="report-main">
<div class="left">
<div v-if="!reportUrl" class="noContent">{{ "中文原文暂无数据" }}</div>
<iframe v-else :src="reportUrl" style="border: none" width="100%" height="100%"> </iframe>
</div>
<div class="right">
<div v-if="!reportUrlEn" class="noContent">{{ "英文原文暂无数据" }}</div>
<iframe v-else :src="reportUrlEn" style="border: none" width="100%" height="100%"> </iframe>
</div>
</div>
</div>
</div>
</template>
......@@ -125,6 +132,7 @@ import { ref, onMounted, onUnmounted } from "vue";
import router from "@/router";
import { useRoute } from "vue-router";
import { getDecreeSummary } from "@/api/decree/introduction";
import { getDecreeReport } from "@/api/decree/introduction";
import search from "./assets/images/search.png";
import icon1 from "./assets/icons/icon1.png";
......@@ -140,6 +148,10 @@ const route = useRoute();
const decreeId = ref(route.query.id);
const isShowReport = ref(false);
const reportUrl = ref("");
const reportUrlEn = ref("");
const activeName = ref("分析报告");
const summaryInfo = ref({});
......@@ -208,6 +220,29 @@ const handleGetSummary = async () => {
} catch (error) {}
};
// 获取报告原文
const handleGetReport = async () => {
const params = {
id: route.query.id
};
try {
const res = await getDecreeReport(params);
console.log("报告原文", res);
if (res.code === 200 && res.data) {
reportUrl.value = res.data.content;
reportUrlEn.value = res.data.contentEn;
}
} catch (error) {}
};
const handleCloseReport = () => {
isShowReport.value = false
}
const handleShowReport = () => {
isShowReport.value = true
}
onMounted(() => {
handleGetSummary();
console.log(route.path);
......@@ -218,6 +253,7 @@ onMounted(() => {
} else {
activeTitle.value = "影响分析";
}
handleGetReport()
});
</script>
......@@ -230,6 +266,73 @@ onMounted(() => {
min-height: 1016px;
background: rgba(249, 250, 252, 1);
position: relative;
.report {
padding: 10px 150px;
position: absolute;
left: 0;
top: 0;
z-index: 999999;
width: 100%;
height: 100%;
background: #f7f8f9;
.report-close {
position: absolute;
top: 20px;
right: 230px;
width: 20px;
height: 20px;
cursor: pointer;
img {
width: 100%;
height: 100%;
}
}
.report-header {
width: 100%;
height: 50px;
color: rgba(59, 65, 75, 1);
font-family: Microsoft YaHei;
font-style: Bold;
font-size: 20px;
font-weight: 700;
line-height: 50px;
letter-spacing: 0px;
text-align: left;
padding-left: 30px;
border-bottom: 1px solid rgba(234, 236, 238, 1);
}
.report-main {
display: flex;
height: calc(100% - 100px);
justify-content: space-between;
.left {
width: 800px;
.noContent {
height: 100px;
line-height: 100px;
text-align: center;
color: rgba(59, 65, 75, 1);
font-family: Microsoft YaHei;
font-style: Regular;
font-size: 20px;
font-weight: 400;
}
}
.right {
width: 800px;
.noContent {
height: 100px;
line-height: 100px;
text-align: center;
color: rgba(59, 65, 75, 1);
font-family: Microsoft YaHei;
font-style: Regular;
font-size: 20px;
font-weight: 400;
}
}
}
}
.layout-main {
width: 100%;
height: 100%;
......
......@@ -26,9 +26,16 @@
</div>
<div class="item">
<div class="item-left">{{ "英文全称:" }}</div>
<div class="item-right text">
<div class="item-right text" v-if="basicInfo.eName?.length < 60">
{{ basicInfo.eName }}
</div>
<el-popover v-else effect="dark" :width="500" :content="basicInfo.eName" placement="top-start">
<template #reference>
<div class="item-right text">
{{ basicInfo.eName }}
</div>
</template>
</el-popover>
</div>
<div class="item">
<div class="item-left">{{ "相关领域:" }}</div>
......@@ -127,7 +134,7 @@
<div class="box3-top">
<div class="box3-top-top">
<div class="left">
<img :src="box3TopData.logo?box3TopData.logo:DefaultIcon2" alt="" />
<img :src="box3TopData.logo ? box3TopData.logo : DefaultIcon2" alt="" />
</div>
<div class="right">
<div class="name">{{ box3TopData.name }}</div>
......@@ -199,11 +206,10 @@ import box1Img from "./assets/images/box1-img.png";
import Box3Logo from "./assets/images/box3-img.png";
import { getDecreeBasicInfo, getDecreeMainContent, getDecreeOrganization } from "@/api/decree/introduction";
import DefaultIcon1 from '@/assets/icons/default-icon1.png'
import DefaultIcon2 from '@/assets/icons/default-icon2.png'
import DefaultIcon1 from "@/assets/icons/default-icon1.png";
import DefaultIcon2 from "@/assets/icons/default-icon2.png";
const route = useRoute();
const decreeId = ref(route.query.id);
// 基本信息
......@@ -233,7 +239,7 @@ const handleGetBasicInfo = async () => {
basicInfo.value.signTime = res.data.postDate;
basicInfo.value.bh = res.data.order;
basicInfo.value.deadline = res.data.deadline;
basicInfo.value.proposeOrgName = res.data.proposeOrgName
basicInfo.value.proposeOrgName = res.data.proposeOrgName;
}
} catch (error) {
console.error("基本信息error", error);
......@@ -288,7 +294,6 @@ const box3BtnActiveIndex = ref(0);
const handleClickBox3Btn = (btn, index) => {
box3ActiveBtn.value = btn;
box3BtnActiveIndex.value = index;
box3TopData.value.logo = box3Data.value[index].url;
box3TopData.value.name = box3Data.value[index].name;
box3TopData.value.eName = box3Data.value[index].ename;
......@@ -328,7 +333,6 @@ const eventList = ref([
// time: "2025-07-21",
// title: "美商务部进一步收紧对华先进半导体出口管制,将更多中国实体列入“实体清单”。限制14纳米及以下先进芯片、DRAM等对华出口"
// }
]);
const handleGetOrgnization = async () => {
......@@ -385,10 +389,8 @@ const handleGetOrgnization = async () => {
};
onMounted(() => {
handleGetOrgnization();
})
handleGetOrgnization();
});
</script>
<style lang="scss" scoped>
......@@ -500,6 +502,12 @@ handleGetOrgnization();
.item-left {
width: 100px;
}
.item-right {
width: 470px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.tag-box {
display: flex;
.tag {
......@@ -754,5 +762,72 @@ handleGetOrgnization();
}
}
}
.report {
padding: 10px 150px;
position: absolute;
left: 0;
top: 0;
z-index: 999999;
width: 100%;
height: 100%;
background: #f7f8f9;
.report-close {
position: absolute;
top: 20px;
right: 230px;
width: 20px;
height: 20px;
cursor: pointer;
img {
width: 100%;
height: 100%;
}
}
.report-header {
width: 100%;
height: 50px;
color: rgba(59, 65, 75, 1);
font-family: Microsoft YaHei;
font-style: Bold;
font-size: 20px;
font-weight: 700;
line-height: 50px;
letter-spacing: 0px;
text-align: left;
padding-left: 30px;
border-bottom: 1px solid rgba(234, 236, 238, 1);
}
.report-main {
display: flex;
height: calc(100% - 100px);
justify-content: space-between;
.left {
width: 800px;
.noContent {
height: 100px;
line-height: 100px;
text-align: center;
color: rgba(59, 65, 75, 1);
font-family: Microsoft YaHei;
font-style: Regular;
font-size: 20px;
font-weight: 400;
}
}
.right {
width: 800px;
.noContent {
height: 100px;
line-height: 100px;
text-align: center;
color: rgba(59, 65, 75, 1);
font-family: Microsoft YaHei;
font-style: Regular;
font-size: 20px;
font-weight: 400;
}
}
}
}
}
</style>
\ No newline at end of file
......@@ -243,7 +243,7 @@
</div> -->
<div class="box4-main">
<div class="box4-main-item" v-for="(item, index) in messageList" :key="index">
<div class="left" @click="handleClickPerson()">
<div class="left" @click="handleClickPerson(item)">
<img :src="item.personImage ? item.personImage : defaultHeaderIcin" alt="" />
</div>
<div class="right">
......@@ -453,6 +453,7 @@ import {
getThinkTankReportNews,
getThinkTankReportRemarks
} from "@/api/thinkTank/overview";
import { getPersonSummaryInfo } from "@/api/common/index";
import getMultiLineChart from "./utils/multiLineChart";
import getPieChart from "./utils/piechart";
......@@ -1428,14 +1429,59 @@ const handleToMoreNews = () => {
};
// 点击人物头像,跳转到人物主页
const handleClickPerson = () => {
const route = router.resolve({
path: "/characterPage",
query: {
type: 3 // 1 2 3
const handleClickPerson = async item => {
console.log("person", item);
const personTypeList = JSON.parse(window.sessionStorage.getItem("personTypeList"));
console.log("personTypeList", personTypeList);
let type = 0;
let personTypeName = "";
const params = {
personId: item.personId
};
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: item.personId
}
});
window.open(route.href, "_blank");
} else {
personTypeName = "";
ElMessage.warning("找不到当前人员的类型值!");
return;
}
} else {
ElMessage.warning("找不到当前人员的类型值!");
return;
}
});
window.open(route.href, "_blank");
} catch (error) {}
};
// 点击新闻条目,跳转到新闻分析页
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论