提交 65d8fbde authored 作者: 闫鹏's avatar 闫鹏

合并分支 'yp-dev' 到 'master'

Yp dev 查看合并请求 !36
...@@ -171,6 +171,22 @@ export function getPersonList() { ...@@ -171,6 +171,22 @@ export function getPersonList() {
); );
} }
/**
* 重点实体列表查询
*/
export function getKeyEntityList(date, keyword = "") {
return request200(
request({
method: "GET",
url: "/api/entitiesDataInfo/getKeyEntities",
params: {
sanctionDate: date || "2025-11-11",
searchText: keyword
}
})
);
}
/** /**
* 不同领域实体统计 * 不同领域实体统计
* @param {string} startTime - 统计开始时间,格式为 'YYYY-MM-DD' * @param {string} startTime - 统计开始时间,格式为 'YYYY-MM-DD'
...@@ -526,3 +542,15 @@ export function getChainEntities(date, id) { ...@@ -526,3 +542,15 @@ export function getChainEntities(date, id) {
}) })
); );
} }
/**
* 上市企业融资变化情况
*/
export function getEntityFinancing() {
return request200(
request({
method: "GET",
url: "/api/entitiesDataInfo/listedEntity/financing"
})
);
}
[ [
{ {
"name": "经济", "id": null,
"count": 12 "name": "2025-10-09",
"count": 41
}, },
{ {
"name": "科技", "id": null,
"count": 33 "name": "2025-10-08",
"count": 398
}, },
{ {
"name": "军事", "id": null,
"count": 15 "name": "2025-09-16",
}, "count": 138
{
"name": "安全",
"count": 3
} }
] ]
\ No newline at end of file
...@@ -90,12 +90,35 @@ import { Search } from "@element-plus/icons-vue"; ...@@ -90,12 +90,35 @@ import { Search } from "@element-plus/icons-vue";
import Echarts from "@/components/Chart/index.vue"; import Echarts from "@/components/Chart/index.vue";
import { getBarChart, getLineChart } from "../../utils/charts"; import { getBarChart, getLineChart } from "../../utils/charts";
import Hint from "./hint.vue"; import Hint from "./hint.vue";
import { getEntitiesChangeCount, getEntitiesGrowthTrend, getEntitiesUpdateCount } from "@/api/exportControl"; import { getEntitiesChangeCount, getEntitiesGrowthTrend, getEntitiesUpdateCount, getKeyEntityList } from "@/api/exportControl";
import _ from "lodash"; import _ from "lodash";
import { useRoute } from "vue-router"; import { useRoute } from "vue-router";
const route = useRoute(); const route = useRoute();
const line1Option = shallowRef({}); const line1Option = shallowRef({});
const bar2Option = shallowRef({}); const bar2Option = shallowRef({});
// 获取重点实体列表数据
const fetchKeyEntityList = async (date = "2025-11-11", keyword = "") => {
try {
const data = await getKeyEntityList(date, keyword);
if (data && Array.isArray(data)) {
// 根据 fishbone-mock.json 的数据结构处理数据
// 数据结构示例: [{orgName: "...", orgNameZh: "...", ...}]
subPanel4.value = data.map(item => {
// 优先使用中文名称,如果没有则使用英文名称
const name = item.orgNameZh || item.orgName || "未知实体";
return {
name,
tags: item.domainList || []
};
});
}
} catch (err) {
console.error("获取重点实体列表失败:", err);
}
};
onMounted(async () => { onMounted(async () => {
try { try {
const [entitiesGrowthTrendData, entitiesUpdateCountData] = await Promise.all([ const [entitiesGrowthTrendData, entitiesUpdateCountData] = await Promise.all([
...@@ -116,6 +139,8 @@ onMounted(async () => { ...@@ -116,6 +139,8 @@ onMounted(async () => {
["rgba(22, 119, 255, 1)", "rgba(22, 119, 255, 0)"], ["rgba(22, 119, 255, 1)", "rgba(22, 119, 255, 0)"],
"更新频率" "更新频率"
); );
// 获取重点实体列表数据
await fetchKeyEntityList(route.query.startTime);
} catch (err) { } catch (err) {
console.log(err); console.log(err);
} }
...@@ -285,6 +310,13 @@ const subPanel4 = ref([ ...@@ -285,6 +310,13 @@ const subPanel4 = ref([
} }
]); ]);
const value3 = ref(""); const value3 = ref("");
// 监听搜索关键词变化,重新获取数据
watch(
value3,
_.debounce(async newVal => {
await fetchKeyEntityList(route.query.startTime, newVal);
}, 300)
);
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -71,6 +71,7 @@ import { Search } from "@element-plus/icons-vue"; ...@@ -71,6 +71,7 @@ import { Search } from "@element-plus/icons-vue";
import Echarts from "@/components/Chart/index.vue"; import Echarts from "@/components/Chart/index.vue";
import { getBarChart, getLineChart } from "../../utils/charts"; import { getBarChart, getLineChart } from "../../utils/charts";
import Hint from "./hint.vue"; import Hint from "./hint.vue";
import { getEntityFinancing } from "@/api/exportControl";
const options = [ const options = [
{ {
value: "1", value: "1",
...@@ -110,6 +111,39 @@ const subPanel4 = ref([ ...@@ -110,6 +111,39 @@ const subPanel4 = ref([
type: "上市企业" type: "上市企业"
} }
]); ]);
// 获取上市企业融资变化数据
const fetchEntityFinancing = async () => {
try {
const data = await getEntityFinancing();
if (data && Array.isArray(data)) {
// 根据 fishbone-mock.json 的数据结构处理数据
// 数据结构示例: [{name: "2025-10-09", count: 41}, ...]
// 按日期排序
const sortedData = data.sort((a, b) => {
return new Date(a.name) - new Date(b.name);
});
// 提取 x 轴数据(日期)
const xAxisData = sortedData.map(item => item.name);
// 提取 y 轴数据(融资数量)
const seriesData = sortedData.map(item => item.count);
// 更新图表配置
line1Option.value = getLineChart({
xAxisData,
seriesData,
name: "融资变化",
color: "rgba(146, 84, 222, 1)"
});
}
} catch (error) {
console.error("获取上市企业融资变化数据失败:", error);
}
};
onMounted(() => { onMounted(() => {
bar1Option.value = getBarChart( bar1Option.value = getBarChart(
["2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023", "2024", "2025"], ["2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023", "2024", "2025"],
...@@ -123,12 +157,14 @@ onMounted(() => { ...@@ -123,12 +157,14 @@ onMounted(() => {
["rgba(19, 188, 196, 1)", "rgba(19, 188, 196, 0)"], ["rgba(19, 188, 196, 1)", "rgba(19, 188, 196, 0)"],
"市值变化" "市值变化"
); );
line1Option.value = getLineChart({ // line1Option.value = getLineChart({
xAxisData: [2013, 2023, 2024, 2015], // xAxisData: [2013, 2023, 2024, 2015],
seriesData: [434, 24, 453, 322], // seriesData: [434, 24, 453, 322],
name: "融资变化", // name: "融资变化",
color: "rgba(146, 84, 222, 1)" // color: "rgba(146, 84, 222, 1)"
}); // });
// 获取上市企业融资变化数据
fetchEntityFinancing();
}); });
</script> </script>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论