提交 1b73354c authored 作者: 张伊明's avatar 张伊明

fix 修复bug#16

上级 ca81f368
...@@ -5,6 +5,8 @@ import request from "@/api/request.js"; ...@@ -5,6 +5,8 @@ import request from "@/api/request.js";
* @param {Object} params * @param {Object} params
* @param {string} [params.id] - 行业领域id(全部领域不传) * @param {string} [params.id] - 行业领域id(全部领域不传)
* @param {string} [params.companyName] - 公司名称(搜索框为空不传) * @param {string} [params.companyName] - 公司名称(搜索框为空不传)
* @returns {Array<{id: string, name: string, marketChange: number|null, chainCompanyId: string|number}>}
* 说明:右侧详情查询当前建议优先使用 chainCompanyId;若缺失可回退 id,兼容后续接口调整
*/ */
export function getCompanyList(params) { export function getCompanyList(params) {
return request({ return request({
......
...@@ -662,10 +662,10 @@ const handleGetBillsPerson = async () => { ...@@ -662,10 +662,10 @@ const handleGetBillsPerson = async () => {
sortFun: !memberSortFun.value sortFun: !memberSortFun.value
}; };
if (footerSelect1.value !== "全部委员会") params.committeeId = footerSelect1.value; if (footerSelect1.value !== "全部委员会") params.committeeIds = footerSelect1.value;
if (!activeYyList.value.includes("全部议院")) params.congressIds = activeYyList.value; if (!activeYyList.value.includes("全部议院")) params.congressIds = activeYyList.value.join(",");
if (!activeDpList.value.includes("全部党派")) params.partyIds = activeDpList.value; if (!activeDpList.value.includes("全部党派")) params.partyIds = activeDpList.value.join(",");
if (!activeAreaList.value.includes("全部领域")) params.domainIds = activeAreaList.value; if (!activeAreaList.value.includes("全部领域")) params.domainIds = activeAreaList.value.join(",");
const formatDateYm = dateStr => { const formatDateYm = dateStr => {
if (!dateStr) return ""; if (!dateStr) return "";
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<div class="committee-cards-filter"> <div class="committee-cards-filter">
<span class="committee-cards-desc">近期美国国会各委员会涉华提案数量汇总</span> <span class="committee-cards-desc">近期美国国会各委员会涉华提案数量汇总</span>
<el-radio-group v-model="committeeTimeRange" class="committee-time-switch" size="default"> <el-radio-group v-model="committeeTimeRange" class="committee-time-switch" size="default">
<el-radio-button v-for="item in committeeTimeOptions" :key="item.value" :label="item.value"> <el-radio-button v-for="item in committeeTimeOptions" :key="item.value" :value="item.value">
<span class="committee-time-switch-inner"> <span class="committee-time-switch-inner">
<el-icon v-if="committeeTimeRange === item.value" class="committee-time-switch-icon"> <el-icon v-if="committeeTimeRange === item.value" class="committee-time-switch-icon">
<Calendar /> <Calendar />
...@@ -271,7 +271,7 @@ import { ...@@ -271,7 +271,7 @@ import {
import { getPersonSummaryInfo } from "@/api/common/index"; import { getPersonSummaryInfo } from "@/api/common/index";
import { getChartAnalysis } from "@/api/aiAnalysis/index"; import { getChartAnalysis } from "@/api/aiAnalysis/index";
import DivideHeader from "@/components/DivideHeader.vue"; import DivideHeader from "@/components/DivideHeader.vue";
import overviewMainBox from "@/components/base/BoxBackground/OverviewMainBox.vue"; import overviewMainBox from "@/components/base/boxBackground/overviewMainBox.vue";
import OverviewCard from "./OverviewCard.vue"; import OverviewCard from "./OverviewCard.vue";
import ResourceLibrarySection from "./ResourceLibrarySection.vue"; import ResourceLibrarySection from "./ResourceLibrarySection.vue";
import { useContainerScroll } from "@/hooks/useScrollShow"; import { useContainerScroll } from "@/hooks/useScrollShow";
...@@ -904,12 +904,16 @@ const handleGetKeyTK = async () => { ...@@ -904,12 +904,16 @@ const handleGetKeyTK = async () => {
const res = await getBillOverviewKeyTK(); const res = await getBillOverviewKeyTK();
console.log("关键条款", res); console.log("关键条款", res);
if (res.code === 200 && res.data) { if (res.code === 200 && res.data) {
wordCloudData.value = res.data.map(item => { wordCloudData.value = res.data
.slice()
.sort((a, b) => (b.count ?? 0) - (a.count ?? 0))
.slice(0, 20)
.map(item => {
return { return {
name: item.clause, name: item.clause,
value: item.count value: item.count
}; };
}); });
} }
} catch (error) { } catch (error) {
console.error("获取关键条款error", error); console.error("获取关键条款error", error);
......
...@@ -72,12 +72,12 @@ const mainHeaderBtnList = ref([ ...@@ -72,12 +72,12 @@ const mainHeaderBtnList = ref([
name: "影响分析", name: "影响分析",
path: "/billLayout/influence" path: "/billLayout/influence"
}, },
{ // {
icon: icon4, // icon: icon4,
activeIcon: icon4Active, // activeIcon: icon4Active,
name: "相关情况", // name: "相关情况",
path: "/billLayout/relevantCircumstance" // path: "/billLayout/relevantCircumstance"
} // }
]); ]);
const activeTitle = ref("法案概况"); const activeTitle = ref("法案概况");
......
...@@ -160,7 +160,8 @@ const curCompanyId = ref(""); ...@@ -160,7 +160,8 @@ const curCompanyId = ref("");
const handleClickCompany = (val, index) => { const handleClickCompany = (val, index) => {
companyActiveIndex.value = (currentPage.value - 1) * pageSize.value + index; companyActiveIndex.value = (currentPage.value - 1) * pageSize.value + index;
if (val) { if (val) {
curCompanyId.value = val.id; // 右侧鱼骨图查询:当前优先使用 chainCompanyId,后续可平滑切换到 id
curCompanyId.value = val.chainCompanyId || val.id;
// handleGetCompanyDetail(); // handleGetCompanyDetail();
companyInfo.value.name = val.name; companyInfo.value.name = val.name;
companyInfo.value.status = val.status || companyInfo.value.status; companyInfo.value.status = val.status || companyInfo.value.status;
...@@ -308,10 +309,10 @@ const headerChartData = (row) => { ...@@ -308,10 +309,10 @@ const headerChartData = (row) => {
switch (contentType.value) { switch (contentType.value) {
case 1: case 1:
onDecreeRelatedChain(row.id) onDecreeRelatedChain(row.chainCompanyId)
break; break;
case 2: case 2:
onDecreeRelatedEntitie(row.id) onDecreeRelatedEntitie(row.chainCompanyId)
break; break;
} }
}; };
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论