提交 e17d9815 authored 作者: huhuiqing's avatar huhuiqing

Merge branch 'master' of http://8.140.26.4:10003/caijian/risk-monitor into dev_hhq

...@@ -14,13 +14,13 @@ export function getBillInfo(params) { ...@@ -14,13 +14,13 @@ export function getBillInfo(params) {
// 提出人-根据动议ID获取对应的提出人信息 // 提出人-根据动议ID获取对应的提出人信息
/** /**
* @param {id} * @param {billId}
* @header token * @header token
*/ */
export function getBillPerson(params) { export function getBillPerson(params) {
return request({ return request({
method: 'GET', method: 'GET',
url: `/api/billInfoBean/person/${params.id}`, url: `/api/billInfoBean/person/${params.billId}`,
params, params,
}) })
} }
...@@ -63,6 +63,18 @@ export function getBillBackground(params) { ...@@ -63,6 +63,18 @@ export function getBillBackground(params) {
params, params,
}) })
} }
// 相关事件-根据法案ID获取相关事件信息
/**
* @param {id}
* @header token
*/
export function getBillInfoEvent(params) {
return request({
method: 'GET',
url: `/api/billInfoBean/event/${params.id}`,
params,
})
}
// 议员相关性-根据法案ID获取议员分析信息(现在只包括名称 支持 反对,没有标签和事件动态) // 议员相关性-根据法案ID获取议员分析信息(现在只包括名称 支持 反对,没有标签和事件动态)
/** /**
...@@ -92,20 +104,20 @@ export function getBillContentId(params) { ...@@ -92,20 +104,20 @@ export function getBillContentId(params) {
// 主要条款-根据原文ID获取条款内容 // 主要条款-根据原文ID获取条款内容
/** /**
* @param {id,cRelated,currentPage,pageSize} * @param {billid,id,cRelated,currentPage,pageSize}
* @header token * @header token
*/ */
export function getBillContentTk(params) { export function getBillContentTk(params) {
return request({ return request({
method: 'GET', method: 'GET',
url: `/api/billInfoBean/content/tk/${params.id}`, url: `/api/billInfoBean/content/tk/${params.billid}/${params.id}`,
params, params,
}) })
} }
// 限制方式-根据法案原文ID获取限制方式列表 // 限制方式-根据法案原文ID获取限制方式列表
/** /**
* @param {id} * @param {billId}
* @header token * @header token
*/ */
export function getBillContentXzfs(params) { export function getBillContentXzfs(params) {
......
...@@ -13,11 +13,11 @@ export function getBillIndustry(params) { ...@@ -13,11 +13,11 @@ export function getBillIndustry(params) {
} }
// 涉华法案统计 // 涉华法案统计
export function getBillCount() { export function getBillCount(params) {
return request({ return request({
method: 'GET', method: 'GET',
url: `/api/BillOverview/billCount`, url: `/api/BillOverview/billCount`,
params
}) })
} }
...@@ -39,10 +39,37 @@ export function getHotBills() { ...@@ -39,10 +39,37 @@ export function getHotBills() {
} }
// 获取法案风险信号 // 获取法案风险信号
export function getBillRiskSignal() { /**
* @param {moduleId}
*/
export function getBillRiskSignal(params) {
return request({ return request({
method: 'GET', method: 'GET',
url: '/api/BillOverview/riskSignal', // 这个是之前的接口地址,现在接口地址换成新的了所以使用新地址
// url: '/api/BillOverview/riskSignal',
url: `/api/commonFeature/riskSignal/${params.moduleId}`,
})
}
// 获取新闻资讯
/**
* @param {moduleId}
*/
export function getNews(params) {
return request({
method: 'GET',
url: `/api/commonFeature/news/${params.moduleId}`,
})
}
// 获取社交媒体
/**
* @param {moduleId}
*/
export function getRemarks(params) {
return request({
method: 'GET',
url: `/api/commonFeature/remarks/${params.moduleId}`,
}) })
} }
...@@ -65,3 +92,51 @@ export function getHylyList() { ...@@ -65,3 +92,51 @@ export function getHylyList() {
url: `/api/billImpactAnalysis/industry/hylyList`, url: `/api/billImpactAnalysis/industry/hylyList`,
}) })
} }
// 获取法案提出部门
/**
* @param {year}
*/
export function getBillPostOrg(params) {
return request({
method: 'GET',
url: `/api/BillOverview/billPostOrg/${params.year}`,
})
}
// 获取关键议员提案
/**
* @param {year}
*/
export function getMemberProposal(params) {
return request({
method: 'GET',
url: `/api/BillOverview/memberProposal/${params.year}`,
})
}
// 获取资源库
export function getBills(params, signal) {
return request({
method: 'GET',
url: `/api/BillOverview/bills`,
params,
signal
})
}
// 获取提出部门列表
export function getPostOrgList() {
return request({
method: 'GET',
url: `/api/BillDict/department`,
})
}
// 获取提出议员列表
export function getPostMemberList() {
return request({
method: 'GET',
url: `/api/BillDict/member`,
})
}
\ No newline at end of file
import request from "@/api/request.js";
// 提出背景
/**
* @param {cRelated, currentPage, id, pageSize}
*/
export function getDecreeBackground(params) {
return request({
method: 'GET',
url: `/api/administrativeOrderInfo/background/${params.id}`,
params
})
}
// 相关事件
/**
* @param { id }
*/
export function getDecreeRelatedEvent(params) {
return request({
method: 'GET',
url: `/api/administrativeOrderInfo/relateEvent/${params.id}`,
params
})
}
// 法律依据
/**
* @param { id }
*/
export function getDecreeDepend(params) {
return request({
method: 'GET',
url: `/api/administrativeOrderInfo/depend/${params.id}`,
params
})
}
\ No newline at end of file
import request from "@/api/request.js";
// 根据政令ID获取领域公司信息
/**
* @param {cRelated, id}
*/
export function getDecreeRelateOrder(params) {
return request({
method: 'GET',
url: `/api/administrativeOrderDeepDive/relateOrder/${params.id}`,
params
})
}
\ No newline at end of file
import request from "@/api/request.js";
// 最新科技政令
export function getDepartmentList() {
return request({
method: 'GET',
url: `/api/administrativeDict/department`,
})
}
// 最新科技政令
export function getLatestDecree() {
return request({
method: 'GET',
url: `/api/administrativeOrderOverview/info`,
})
}
// 风险信号
export function getDecreeRiskSignal() {
return request({
method: 'GET',
url: `/api/administrativeOrderOverview/riskSignal`,
})
}
// 行政令发布频度
export function getDecreeYearOrder() {
return request({
method: 'GET',
url: `/api/administrativeOrderOverview/yearOrder`,
})
}
// 政令涉及领域
export function getDecreeArea() {
return request({
method: 'GET',
url: `/api/administrativeOrderOverview/industry`,
})
}
// 关键行政令
export function getKeyDecree() {
return request({
method: 'GET',
url: `/api/administrativeOrderOverview/action`,
})
}
// 政令重点条款
export function getDecreeKeyInstruction() {
return request({
method: 'GET',
url: `/api/administrativeOrderOverview/instruction`,
})
}
// 资源库
/**
* @param {currentPage, pageSize, proposeName, researchTypeIds, sortFun, years}
*/
export function getDecreeOrderList(params) {
return request({
method: 'GET',
url: `/api/administrativeOrderOverview/orderList`,
params
})
}
// 左侧行业领域列表
export function getDecreehylyList(params) {
return request({
method: 'GET',
url: `/api/billImpactAnalysis/industry/hylyList`,
params
})
}
\ No newline at end of file
import request from "@/api/request.js";
// 根据政令ID获取领域公司信息
/**
* @param {cRelated, id}
*/
export function getDecreeIndustry(params) {
return request({
method: 'GET',
url: `/api/administrativeOrderImpactAnalysis/industry/${params.id}`,
params
})
}
// 获取行业领域列表
export function getDecreehylyList() {
return request({
method: 'GET',
url: `/api/billImpactAnalysis/industry/hylyList`,
})
}
// 根据政行业领域ID获取公司列表
/**
* @param {cRelated, id}
*/
export function getDecreeCompany(params) {
return request({
method: 'GET',
url: `/api/administrativeOrderImpactAnalysis/industry/company/${params.id}`,
params
})
}
// 获取政令举措落实分析
/**
* @param {id}
*/
export function getDecreeAction(params) {
return request({
method: 'GET',
url: `/api/administrativeOrderImpactAnalysis/action/${params.id}`,
params
})
}
import request from "@/api/request.js";
// 基本信息
/**
* @param {id}
*/
export function getDecreeBasicInfo(params) {
return request({
method: 'GET',
url: `/api/administrativeOrderInfo/basicInfo/${params.id}`,
params
})
}
// 主要指令
/**
* @param {currentPage, id, pageSize}
*/
export function getDecreeMainContent(params) {
return request({
method: 'GET',
url: `/api/administrativeOrderInfo/mainContent/${params.id}`,
params
})
}
// 执行机构
/**
* @param {id}
*/
export function getDecreeOrganization(params) {
return request({
method: 'GET',
url: `/api/administrativeOrderInfo/organization/${params.id}`,
params
})
}
// 获取全局信息
/**
* @param {id}
*/
export function getDecreeSummary(params) {
return request({
method: 'GET',
url: `/api/administrativeOrderInfo/summary/${params.id}`,
params
})
}
\ No newline at end of file
...@@ -12,6 +12,18 @@ export function getBillTimeAnalyze(params) { ...@@ -12,6 +12,18 @@ export function getBillTimeAnalyze(params) {
}) })
} }
// 修正案次数分析
/**
* @param {id}
*/
export function getBillAmeAnalyzeCount(params) {
return request({
method: 'GET',
url: `/api/billDeepDive/ameAnalyze/count/${params.id}`,
params,
})
}
// 根据法案ID获取党派政治献金 // 根据法案ID获取党派政治献金
/** /**
* @param {id, personCongress} * @param {id, personCongress}
...@@ -83,3 +95,38 @@ export function getProcessSummary(params) { ...@@ -83,3 +95,38 @@ export function getProcessSummary(params) {
params, params,
}) })
} }
// 获取党派政治献金
/**
* @param {id, personCongress}
*/
export function getBillPoliContribution(params) {
return request({
method: 'GET',
url: `/api/billDeepDive/processAnalyze/totalxj/${params.id}`,
params
})
}
// 获取主要议员政治献金
/**
* @param {id, personCongress}
*/
export function getBillMainPoliContribution(params) {
return request({
method: 'GET',
url: `/api/billDeepDive/processAnalyze/xj/${params.id}`,
params
})
}
// 根据法案ID获取人员政治献金来源及行业领域分布
/**
* @param {id, personId}
*/
export function getBillPersonPoliContribution(params) {
return request({
method: 'GET',
url: `/api/billDeepDive/processAnalyze/xj/${params.id}/${params.personId}`
})
}
...@@ -23,7 +23,8 @@ export function getEntitiesDataCount() { ...@@ -23,7 +23,8 @@ export function getEntitiesDataCount() {
return request200( return request200(
request({ request({
method: "GET", method: "GET",
url: "/api/entitiesDataCount/countData" // url: "/api/entitiesDataCount/countData",
url: "/api/sanctionList/export/getTotalInfo"
}) })
); );
} }
...@@ -62,12 +63,15 @@ export function getEntitiesDataInfo() { ...@@ -62,12 +63,15 @@ export function getEntitiesDataInfo() {
* maxCount: number * maxCount: number
* }[]>} * }[]>}
*/ */
export function getIndustryCountByYear() { export function getIndustryCountByYear(sanTypeId) {
return request200( return request200(
request({ request({
method: "GET", method: "GET",
// url: "/api/entitiesDataCount/industryCountByYear" // url: "/api/entitiesDataCount/industryCountByYear"
url: "/api/entitiesDataCount/getAnnualCount" url: "/api/entitiesDataCount/getAnnualCount",
params: {
sanTypeId
}
}) })
); );
} }
...@@ -84,11 +88,16 @@ export function getIndustryCountByYear() { ...@@ -84,11 +88,16 @@ export function getIndustryCountByYear() {
* domains: string[] * domains: string[]
* }>} * }>}
*/ */
export function getCountDomainByYear() { export function getCountDomainByYear(isRule, startYear = "2020", endYear = String(new Date().getFullYear())) {
return request200( return request200(
request({ request({
method: "GET", method: "POST",
url: "/api/entitiesDataCount/countDomainByYear" url: "/api/entitiesDataCount/getAnnualSanDomain",
data: {
isRule,
startYear,
endYear
}
}) })
); );
} }
...@@ -153,6 +162,42 @@ export function getOrganizationInfo(sanTypeId = 1) { ...@@ -153,6 +162,42 @@ export function getOrganizationInfo(sanTypeId = 1) {
); );
} }
/**
* 风险信号
*/
export function getRiskSignal(moduleId = "0103") {
return request200(
request({
method: "GET",
url: `/api/commonFeature/riskSignal/${moduleId}`
})
);
}
/**
* 社交媒体
*/
export function getSocialMediaInfo(moduleId = "0103") {
return request200(
request({
method: "GET",
url: `/api/commonFeature/remarks/${moduleId}`
})
);
}
/**
* 新闻资讯
*/
export function getNewsInfo(moduleId = "0103") {
return request200(
request({
method: "GET",
url: `/api/commonFeature/news/${moduleId}`
})
);
}
/** /**
* 查询重点人物 * 查询重点人物
* @returns {Promise<{ * @returns {Promise<{
...@@ -187,6 +232,21 @@ export function getKeyEntityList(date, keyword = "") { ...@@ -187,6 +232,21 @@ export function getKeyEntityList(date, keyword = "") {
); );
} }
/**
* 区域分布查询
*/
export function getAreaDistribution(date) {
return request200(
request({
method: "GET",
url: "/api/entitiesDataInfo/getRegionDistribution",
params: {
sanctionDate: date || "2025-11-11"
}
})
);
}
/** /**
* 不同领域实体统计 * 不同领域实体统计
* @param {string} startTime - 统计开始时间,格式为 'YYYY-MM-DD' * @param {string} startTime - 统计开始时间,格式为 'YYYY-MM-DD'
...@@ -292,7 +352,7 @@ export function getDomainDistribution(sanctionDate = "2025-11-11") { ...@@ -292,7 +352,7 @@ export function getDomainDistribution(sanctionDate = "2025-11-11") {
* startTime: string * startTime: string
* }[]>} * }[]>}
*/ */
export function getEntitiesList(typeName = "实体清单", pageNum = 1, pageSize = 10) { export function getEntitiesList(typeName = "实体清单", pageNum = 1, pageSize = 10, sanctionDate = "", rule = false) {
return request200( return request200(
request({ request({
method: "POST", method: "POST",
...@@ -300,7 +360,9 @@ export function getEntitiesList(typeName = "实体清单", pageNum = 1, pageSize ...@@ -300,7 +360,9 @@ export function getEntitiesList(typeName = "实体清单", pageNum = 1, pageSize
data: { data: {
typeName, typeName,
pageNum, pageNum,
pageSize pageSize,
sanctionDate,
rule
} }
}) })
); );
...@@ -340,15 +402,16 @@ export function getCompareCountSan(startTime) { ...@@ -340,15 +402,16 @@ export function getCompareCountSan(startTime) {
* count:number * count:number
* }[]>} * }[]>}
*/ */
export function getEntitiesChangeCount(domain, type) { export function getEntitiesChangeCount(domianId, typeId) {
return request200( return request200(
request({ request({
method: "GET", method: "GET",
// url: '/api/entitiesDataCount/entitiesChangeCount', // url: '/api/entitiesDataCount/entitiesChangeCount',
url: "/api/entitiesDataCount/sanCountByYear", // url: "/api/entitiesDataCount/sanCountByYear",
url: "/api/entitiesDataInfo/getCountByDomianAndType",
params: { params: {
domain, domianId,
type typeId
} }
}) })
); );
...@@ -377,11 +440,14 @@ export function getEntitiesGrowthTrend() { ...@@ -377,11 +440,14 @@ export function getEntitiesGrowthTrend() {
* xAxis: string[] * xAxis: string[]
* }>} * }>}
*/ */
export function getEntitiesUpdateCount() { export function getEntitiesUpdateCount(sanTypeId = 1) {
return request200( return request200(
request({ request({
method: "GET", method: "GET",
url: "/api/entitiesDataCount/entitiesUpdateCount" url: "/api/entitiesDataCount/getAnnualCount",
params: {
sanTypeId
}
}) })
); );
} }
...@@ -389,11 +455,14 @@ export function getEntitiesUpdateCount() { ...@@ -389,11 +455,14 @@ export function getEntitiesUpdateCount() {
/** /**
* 制裁领域分析 * 制裁领域分析
*/ */
export function getSanDomainCount() { export function getSanDomainCount(rule) {
return request200( return request200(
request({ request({
method: "GET", method: "GET",
url: "/api/entitiesDataCount/getSanDomainCount" url: "/api/entitiesDataCount/getSanDomainCount",
params: {
rule
}
}) })
); );
} }
...@@ -494,9 +563,10 @@ export function getCountSanTypeByTime(startTime) { ...@@ -494,9 +563,10 @@ export function getCountSanTypeByTime(startTime) {
return request200( return request200(
request({ request({
method: "GET", method: "GET",
url: "/api/entitiesDataCount/countSanTypeByTime", // url: "/api/entitiesDataCount/countSanTypeByTime",
url: "/api/entitiesDataInfo/getTypeDistribution",
params: { params: {
startTime sanctionDate: startTime || "2025-11-11"
} }
}) })
); );
......
import request from "@/api/request.js";
// 新闻资讯
/**
* @param {moduleId}
*/
export function getNews(params) {
return request({
method: 'GET',
url: `/api/commonFeature/news/${params.moduleId}`,
params
})
}
// 社交媒体
/**
* @param {moduleId}
*/
export function getSocialMedia(params) {
return request({
method: 'GET',
url: `/api/commonFeature/remarks/${params.moduleId}`,
params
})
}
// 风险信号
/**
* @param {moduleId}
*/
export function getRiskSignal(params) {
return request({
method: 'GET',
url: `/api/commonFeature/riskSignal/${params.moduleId}`,
params
})
}
\ No newline at end of file
...@@ -31,3 +31,16 @@ export function getHylyList() { ...@@ -31,3 +31,16 @@ export function getHylyList() {
url: `/api/billImpactAnalysis/industry/hylyList`, url: `/api/billImpactAnalysis/industry/hylyList`,
}) })
} }
// 获取公司详情
/**
* @param {billId,companyId,id}
*/
export function getCompanyDetail(params) {
return request({
method: 'GET',
url: `/api/billImpactAnalysis/industry/companyDetail/${params.billId}/${params.id}/${params.companyId}`,
params,
})
}
\ No newline at end of file
...@@ -32,6 +32,7 @@ const emit = defineEmits(["click"]); ...@@ -32,6 +32,7 @@ const emit = defineEmits(["click"]);
cursor: pointer; cursor: pointer;
padding-left: 8px; padding-left: 8px;
padding-right: 8px; padding-right: 8px;
flex-shrink: 0;
} }
.activeButton { .activeButton {
border: 1px solid rgb(10, 87, 166); border: 1px solid rgb(10, 87, 166);
......
...@@ -61,5 +61,7 @@ function setActiveIndex(item) { ...@@ -61,5 +61,7 @@ function setActiveIndex(item) {
.buttonList { .buttonList {
display: flex; display: flex;
gap: 8px; gap: 8px;
overflow-x: auto;
flex-wrap: wrap;
} }
</style> </style>
...@@ -6,7 +6,6 @@ import DecreeIntroduction from "@/views/decree/decreeLayout/overview/introductio ...@@ -6,7 +6,6 @@ import DecreeIntroduction from "@/views/decree/decreeLayout/overview/introductio
import DecreeBackground from "@/views/decree/decreeLayout/overview/background/index.vue"; import DecreeBackground from "@/views/decree/decreeLayout/overview/background/index.vue";
import DecreeDeepDig from "@/views/decree/decreeLayout/deepdig/index.vue"; import DecreeDeepDig from "@/views/decree/decreeLayout/deepdig/index.vue";
import DecreeInfluence from "@/views/decree/decreeLayout/influence/index.vue"; import DecreeInfluence from "@/views/decree/decreeLayout/influence/index.vue";
import Institution from "@/views/decree/institution/index.vue" import Institution from "@/views/decree/institution/index.vue"
const decreeRoutes = [ const decreeRoutes = [
......
import Portal1 from "@/views/portals/portal1/index.vue"; import Portal from "@/views/portals/portal1/index.vue";
import Portal2 from "@/views/portals/portal2/index.vue"; import Portal2 from "@/views/portals/portal2/index.vue";
const portalRoutes = [ const portalRoutes = [
// 门户 // 门户
{ {
path: "/portal1", path: "/portal",
name: "portal1", name: "portal",
component: Portal1, component: Portal,
meta: { meta: {
title: "门户" title: "门户"
} }
......
...@@ -35,8 +35,8 @@ ...@@ -35,8 +35,8 @@
v-for="(item, index) in backgroundList" v-for="(item, index) in backgroundList"
:key="item.id" :key="item.id"
> >
<div class="id">{{ index + 1 }}</div> <div class="id">{{ (currentPage - 1) * 10 + index + 1 }}</div>
<div class="title">{{ item.bjnr }}</div> <div class="title">{{ item.backgroundTitle }}</div>
<div class="share"> <div class="share">
<img src="./assets/icons/open.png" alt="打开" /> <img src="./assets/icons/open.png" alt="打开" />
</div> </div>
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
<div class="box1-main-footer"> <div class="box1-main-footer">
<div class="info"> <div class="info">
{{ {{
`共有${backgroundList.length}条${ `共有${total}条${
box1BtnActive === 1 ? "涉华" : "全部" box1BtnActive === 1 ? "涉华" : "全部"
}背景` }背景`
}} }}
...@@ -54,7 +54,9 @@ ...@@ -54,7 +54,9 @@
<el-pagination <el-pagination
background background
layout="prev, pager, next" layout="prev, pager, next"
:total="backgroundList.length" :total="total"
v-model:current-page="currentPage"
@current-change="handleGetBillBackground"
/> />
</div> </div>
</div> </div>
...@@ -80,7 +82,7 @@ ...@@ -80,7 +82,7 @@
:key="index" :key="index"
> >
<div class="left"> <div class="left">
<img :src="item.image" alt="" /> <img :src="item.imageUrl || item.image" alt="" />
</div> </div>
<div class="center"> <div class="center">
<div class="title">{{ item.sjbt }}</div> <div class="title">{{ item.sjbt }}</div>
...@@ -157,7 +159,7 @@ ...@@ -157,7 +159,7 @@
/></el-icon> /></el-icon>
</div> </div>
<div class="right-box1-main-bottom"> <div class="right-box1-main-bottom">
<WordCloudMap :data="wordCloudData" :shape="circle" /> <WordCloudMap :data="wordCloudData" shape="circle" />
</div> </div>
</div> </div>
</div> </div>
...@@ -214,25 +216,26 @@ import { ...@@ -214,25 +216,26 @@ import {
getBillBackground, getBillBackground,
getBillEvent, getBillEvent,
getBillPersonAnalyze, getBillPersonAnalyze,
getBillInfoEvent
} from "@/api/bill"; } from "@/api/bill";
const box1BtnActive = ref(1); const box1BtnActive = ref(1);
const currentPage = ref(1);
const total = ref(0);
const handleClickBox1Btn = (index) => { const handleClickBox1Btn = (index) => {
box1BtnActive.value = index; box1BtnActive.value = index;
if (index === 2) { currentPage.value = 1;
handleGetBillBackground(false); handleGetBillBackground();
} else {
handleGetBillBackground(true);
}
}; };
const box2BtnActive = ref(1); const box2BtnActive = ref(1);
const handleClickBox2Btn = (index) => { const handleClickBox2Btn = (index) => {
box2BtnActive.value = index; box2BtnActive.value = index;
if (index === 1) { if (index === 1) {
handleGetBillPersonAnalyze(true);
} else {
handleGetBillPersonAnalyze(false); handleGetBillPersonAnalyze(false);
} else {
handleGetBillPersonAnalyze(true);
} }
}; };
...@@ -439,27 +442,29 @@ const wordCloudData = [ ...@@ -439,27 +442,29 @@ const wordCloudData = [
]; ];
// 获取立法背景内容 // 获取立法背景内容
const handleGetBillBackground = async (cRelated) => { const handleGetBillBackground = async () => {
const cRelated = box1BtnActive.value === 1 ? 'Y' : 'N';
const params = { const params = {
cRelated: cRelated, cRelated: cRelated,
id: window.sessionStorage.getItem("billId"), id: window.sessionStorage.getItem("billId"),
currentPage: 0, currentPage: currentPage.value - 1,
pageSize: 10, pageSize: 10,
}; };
try { try {
const res = await getBillBackground(params); const res = await getBillBackground(params);
console.log("立法背景", res); console.log("立法背景", res);
backgroundList.value = res.data.content; backgroundList.value = res.data.content;
total.value = res.data.totalElements; // 假设API返回totalElements
} catch (error) {} } catch (error) {}
}; };
// 获取相关事件 // 获取相关事件
const handleGetRelatedEvent = async () => { const handleGetRelatedEvent = async () => {
const params = { const params = {
id: 1, id: window.sessionStorage.getItem("billId"),
}; };
try { try {
const res = await getBillEvent(params); const res = await getBillInfoEvent(params);
console.log("相关事件", res); console.log("相关事件", res);
eventList.value = res.data; eventList.value = res.data;
eventList.value.forEach((item, index) => { eventList.value.forEach((item, index) => {
...@@ -488,8 +493,9 @@ const handleGetBillPersonAnalyze = async (isOppose) => { ...@@ -488,8 +493,9 @@ const handleGetBillPersonAnalyze = async (isOppose) => {
const res = await getBillPersonAnalyze(params); const res = await getBillPersonAnalyze(params);
console.log("议员相关性分析", res); console.log("议员相关性分析", res);
personList.value = res.data; personList.value = res.data;
personList.value.forEach((item) => { personList.value.forEach((item, index) => {
item.image = user1; const imgList = [user1, user2, user3, user4, user5];
item.image = imgList[index % imgList.length];
item.icon = userIcon; item.icon = userIcon;
item.icon1 = userIcon1; item.icon1 = userIcon1;
}); });
...@@ -497,9 +503,9 @@ const handleGetBillPersonAnalyze = async (isOppose) => { ...@@ -497,9 +503,9 @@ const handleGetBillPersonAnalyze = async (isOppose) => {
}; };
onMounted(() => { onMounted(() => {
handleGetBillBackground(true); handleGetBillBackground();
handleGetRelatedEvent(); handleGetRelatedEvent();
handleGetBillPersonAnalyze(true); // handleGetBillPersonAnalyze(false);
}); });
</script> </script>
...@@ -572,7 +578,7 @@ onMounted(() => { ...@@ -572,7 +578,7 @@ onMounted(() => {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: space-between; justify-content: space-between;
align-content: flex-start;
.box1-main-item { .box1-main-item {
width: 544px; width: 544px;
height: 48px; height: 48px;
...@@ -598,11 +604,12 @@ onMounted(() => { ...@@ -598,11 +604,12 @@ onMounted(() => {
width: 440px; width: 440px;
height: 48px; height: 48px;
line-height: 48px; line-height: 48px;
color: rgba(95, 101, 108, 1); color: rgb(59, 65, 75);
font-family: Microsoft YaHei; font-family: "Microsoft YaHei";
font-size: 14px; font-size: 16px;
font-weight: 400; font-weight: 400;
text-align: left; text-align: left;
overflow: hidden;
} }
.share { .share {
margin-left: 13px; margin-left: 13px;
...@@ -626,8 +633,8 @@ onMounted(() => { ...@@ -626,8 +633,8 @@ onMounted(() => {
.info { .info {
height: 22px; height: 22px;
line-height: 22px; line-height: 22px;
color: rgba(132, 136, 142, 1); color: rgb(132, 136, 142);
font-family: Microsoft YaHei; font-family: "Microsoft YaHei";
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
text-align: left; text-align: left;
...@@ -645,6 +652,7 @@ onMounted(() => { ...@@ -645,6 +652,7 @@ onMounted(() => {
margin-top: 9px; margin-top: 9px;
margin-left: 23px; margin-left: 23px;
height: 300px; height: 300px;
overflow: auto;
.box2-main-item { .box2-main-item {
width: 1103px; width: 1103px;
height: 60px; height: 60px;
...@@ -659,9 +667,9 @@ onMounted(() => { ...@@ -659,9 +667,9 @@ onMounted(() => {
width: 64px; width: 64px;
height: 48px; height: 48px;
border-radius: 2px; border-radius: 2px;
image { img {
width: 100px; width: 64px;
height: 100%; height: 48px;
} }
} }
.center { .center {
......
...@@ -16,11 +16,9 @@ const getDoublePieChart = (data1, data2) => { ...@@ -16,11 +16,9 @@ const getDoublePieChart = (data1, data2) => {
}, },
label: { label: {
position: 'inside', position: 'inside',
textStyle: {
fontSize: '16px', fontSize: '16px',
fontWeight: 700, fontWeight: 700,
// color: '#333' // color: '#333'
}
}, },
data: data1.map(item => { data: data1.map(item => {
return { return {
......
import * as echarts from 'echarts' import * as echarts from 'echarts'
const getMultiLineChart = (dataX, dataY1, dataY2) => { const getMultiLineChart = (dataX, dataY1, dataY2, dataY3) => {
return { return {
tooltip: { tooltip: {
trigger: 'axis', trigger: 'axis',
...@@ -9,25 +9,34 @@ const getMultiLineChart = (dataX, dataY1, dataY2) => { ...@@ -9,25 +9,34 @@ const getMultiLineChart = (dataX, dataY1, dataY2) => {
label: { label: {
backgroundColor: '#6a7985' backgroundColor: '#6a7985'
} }
},
formatter: function (params) {
let res = params[0].name + '<br/>';
params.forEach(item => {
res += item.marker + item.seriesName + ': ' + item.value + (item.seriesName === '通过率' ? '%' : '') + '<br/>';
});
return res;
} }
}, },
grid: { grid: {
top: '8%', top: '15%',
right: '5%', right: '5%',
bottom: '5%', bottom: '5%',
left: '5%', left: '5%',
containLabel: true containLabel: true
}, },
legend: { legend: {
data: ['提出法案', '通过法案'], data: ['提出法案', '通过法案', '通过率'],
show: true, show: true,
top: 0,
icon: 'circle',
textStyle: { textStyle: {
color: 'rgba(95, 101, 108, 1)', color: 'rgba(95, 101, 108, 1)',
fontFamily: 'Microsoft YaHei', fontFamily: 'Microsoft YaHei',
fontSize: '16px', fontSize: '14px',
} }
}, },
color: ['#1459bb', '#fa8c16'], color: ['#1677FF', '#FA8C16', '#D9001B'],
xAxis: [ xAxis: [
{ {
type: 'category', type: 'category',
...@@ -37,44 +46,80 @@ const getMultiLineChart = (dataX, dataY1, dataY2) => { ...@@ -37,44 +46,80 @@ const getMultiLineChart = (dataX, dataY1, dataY2) => {
], ],
yAxis: [ yAxis: [
{ {
type: 'value' type: 'value',
position: 'left',
axisLabel: {
color: '#666'
}
},
{
type: 'value',
position: 'right',
min: 0,
max: 100,
interval: 20,
axisLabel: {
formatter: '{value}%',
color: '#666'
},
splitLine: {
show: false
}
} }
], ],
series: [ series: [
{ {
name: '提出法案', name: '提出法案',
type: 'line', type: 'line',
symbol: 'emptyCircle',
symbolSize: 6,
areaStyle: { areaStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0, offset: 0,
color: 'rgba(22, 119, 255, 1)' // 起始颜色 color: 'rgba(22, 119, 255, 0.4)' // 起始颜色
}, { }, {
offset: 1, offset: 1,
color: 'rgba(22, 119, 255, 0)' // 结束颜色 color: 'rgba(22, 119, 255, 0)' // 结束颜色
}]) }])
}, },
emphasis: { itemStyle: {
focus: 'series' color: '#1677FF'
}, },
data: dataY1 data: dataY1
}, },
{ {
name: '通过法案', name: '通过法案',
type: 'line', type: 'line',
symbol: 'emptyCircle',
symbolSize: 6,
areaStyle: { areaStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0, offset: 0,
color: 'rgba(255, 172, 77, 1)' // 起始颜色 color: 'rgba(250, 140, 22, 0.4)' // 起始颜色
}, { }, {
offset: 1, offset: 1,
color: 'rgba(255, 172, 77, 0)' // 结束颜色 color: 'rgba(250, 140, 22, 0)' // 结束颜色
}]) }])
}, },
emphasis: { itemStyle: {
focus: 'series' color: '#FA8C16'
}, },
data: dataY2 data: dataY2
},
{
name: '通过率',
type: 'line',
yAxisIndex: 1,
symbol: 'emptyCircle',
symbolSize: 4,
lineStyle: {
type: 'dashed',
width: 2
},
itemStyle: {
color: '#D9001B'
},
data: dataY3
} }
] ]
} }
......
...@@ -11,6 +11,8 @@ const getWordCloudChart = (data) => { ...@@ -11,6 +11,8 @@ const getWordCloudChart = (data) => {
series: [ series: [
{ {
type: "wordCloud", type: "wordCloud",
width: '80%',
height: '80%',
shape: "rect", // shape: "rect", //
// 其他形状你可以使用形状路径 // 其他形状你可以使用形状路径
// 或者自定义路径 // 或者自定义路径
......
...@@ -212,6 +212,7 @@ onMounted(() => { ...@@ -212,6 +212,7 @@ onMounted(() => {
height: 1016px; height: 1016px;
background: rgba(249, 250, 252, 1); background: rgba(249, 250, 252, 1);
position: relative; position: relative;
// margin: 0 auto;
.layout-header { .layout-header {
width: 1920px; width: 1920px;
height: 64px; height: 64px;
......
...@@ -14,14 +14,19 @@ const getPieChart = (data,colorList) => { ...@@ -14,14 +14,19 @@ const getPieChart = (data,colorList) => {
}, },
label: { label: {
alignTo: 'edge', alignTo: 'edge',
formatter: '{name|{b}}\n{time|{c} 条 {d}%}', formatter: '{name|{b}}\n{time|{d}%}',
minMargin: 5, minMargin: 5,
edgeDistance: 10, edgeDistance: 10,
lineHeight: 15, lineHeight: 15,
rich: { rich: {
time: { time: {
fontSize: 10, fontSize: 12,
color: '#999' color: '#666'
},
name: {
fontSize: 14,
color: '#333',
fontWeight: 'bold'
} }
} }
}, },
......
const getSankeyChart = () => { const getSankeyChart = (data = [], links = []) => {
const option = { const option = {
tooltip: {
trigger: 'item',
triggerOn: 'mousemove'
},
series: { series: {
type: 'sankey', type: 'sankey',
layout: 'none', layout: 'none',
left: '5%', left: '1%',
right: '5%', right: '1%',
top: '5%', top: '5%',
bottom: '5%', bottom: '5%',
emphasis: { emphasis: {
focus: 'adjacency' focus: 'adjacency'
}, },
nodeWidth: 50, nodeWidth: 50,
nodeGap: 2,
layoutIterations: 32,
lineStyle: {
color: 'source',
curveness: 0.5
},
label: { label: {
show: true, show: true,
formatter: function (params) { formatter: function (params) {
return `${params.name} $${params.value}`; return `${params.name} $${params.value.toLocaleString()}`;
}, },
position: 'right', position: 'right',
textStyle: { fontSize: 16,
fontSize: '16px',
color: '#555' color: '#555'
}
},
data: [
{
name: '马尔科·卢比奥',
label: {
position: 'left'
}
},
{
name: '成长俱乐部'
},
{
name: '埃利奥特管理公司'
},
{
name: '高盛集团'
},
{
name: '黑石集团'
}, },
{ data: data,
name: '佛罗里达水晶' links: links
},
{
name: '美国银行'
}
],
links: [
{
source: '成长俱乐部',
target: '马尔科·卢比奥',
value: 680751
},
{
source: '埃利奥特管理公司',
target: '马尔科·卢比奥',
value: 440120
},
{
source: '高盛集团',
target: '马尔科·卢比奥',
value: 371517
},
{
source: '黑石集团',
target: '马尔科·卢比奥',
value: 259321
},
{
source: '佛罗里达水晶',
target: '马尔科·卢比奥',
value: 203775
},
{
source: '美国银行',
target: '马尔科·卢比奥',
value: 150892
}
]
} }
}; };
......
const getBoxPlotChcart = (data,unit) => { const getBoxPlotChcart = (data, unit, labelConfig = {}) => {
const labels = {
max: labelConfig.max || '最大耗时',
q3: labelConfig.q3 || '平均耗时大',
median: labelConfig.median || '耗时中位数',
q1: labelConfig.q1 || '平均耗时小',
min: labelConfig.min || '最小耗时',
current: labelConfig.current || '该法案耗时'
};
let option = { let option = {
// title: [ // title: [
// { // {
...@@ -11,6 +20,22 @@ const getBoxPlotChcart = (data,unit) => { ...@@ -11,6 +20,22 @@ const getBoxPlotChcart = (data,unit) => {
trigger: 'item', trigger: 'item',
axisPointer: { axisPointer: {
type: 'shadow' type: 'shadow'
},
formatter: function (params) {
if (params.seriesType === 'scatter') {
return `${params.name}<br/>${labels.current}: ${params.data[1]} ${unit}`;
}
const { name, data } = params;
let tip = `${name}<br/>`;
tip += `${labels.max}: ${data[5]} ${unit}<br/>`;
tip += `${labels.q3}: ${data[4]} ${unit}<br/>`;
tip += `${labels.median}: ${data[3]} ${unit}<br/>`;
tip += `${labels.q1}: ${data[2]} ${unit}<br/>`;
tip += `${labels.min}: ${data[1]} ${unit}<br/>`;
if (data[6] !== undefined && data[6] !== null) {
tip += `${labels.current}: ${data[6]} ${unit}`;
}
return tip;
} }
}, },
grid: { grid: {
...@@ -48,13 +73,20 @@ const getBoxPlotChcart = (data,unit) => { ...@@ -48,13 +73,20 @@ const getBoxPlotChcart = (data,unit) => {
{ {
name: 'boxplot', name: 'boxplot',
type: 'boxplot', type: 'boxplot',
datasetIndex: 1,
data: data.dataY, data: data.dataY,
}, },
{ {
name: 'outlier', name: labels.current,
type: 'scatter', type: 'scatter',
datasetIndex: 2 data: data.dataY.map((item, index) => [index, item[5]]),
itemStyle: {
color: '#ff5722'
},
tooltip: {
formatter: function (params) {
return `${params.name}<br/>${labels.current}: ${params.data[1]} ${unit}`;
}
}
} }
] ]
} }
......
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论