态势感知平台-武汉市开源生态建设- 武汉鸿蒙项目接口对接

This commit is contained in:
d266377
2026-01-29 17:47:25 +08:00
parent 97ab1a1e79
commit f640eca25c

View File

@@ -338,7 +338,7 @@
import { ref, onMounted, nextTick, onUnmounted } from 'vue'; import { ref, onMounted, nextTick, onUnmounted } from 'vue';
import * as echarts from 'echarts'; import * as echarts from 'echarts';
import HMStatsBar from './HMStatsBar.vue'; import HMStatsBar from './HMStatsBar.vue';
import { hmCityDataPage3, hmProjectsPage3 } from '@/api/jyh/situation'; import { hmCityDataPage3, hmProjectsPage3, whProjectsPage3 } from '@/api/jyh/situation';
// ================= 数据定义 ================= // ================= 数据定义 =================
const hmCityData = ref([ const hmCityData = ref([
@@ -591,7 +591,7 @@ const fetchHmProjects = async () => {
} }
}; };
const whProjects = [ const whProjects = ref([
{ name: 'docs', desc: 'OpenHarmony官方文档与指南', stars: '498', company: '中科创达' }, // 总热度: 4152 (498 Star + 3654 Fork) { name: 'docs', desc: 'OpenHarmony官方文档与指南', stars: '498', company: '中科创达' }, // 总热度: 4152 (498 Star + 3654 Fork)
{ name: 'xts_acts', desc: '应用兼容性测试套件(ACTS)', stars: '293', company: '润开鸿' }, // 总热度: 1906 (24 Star + 1882 Fork) { name: 'xts_acts', desc: '应用兼容性测试套件(ACTS)', stars: '293', company: '润开鸿' }, // 总热度: 1906 (24 Star + 1882 Fork)
{ name: '黄鹤开源技术社区应用', desc: '基于OpenHarmony的社区APP', stars: '191', company: '坚果派' }, // 总热度: 196 (191 Star + 5 Fork) { name: '黄鹤开源技术社区应用', desc: '基于OpenHarmony的社区APP', stars: '191', company: '坚果派' }, // 总热度: 196 (191 Star + 5 Fork)
@@ -602,7 +602,46 @@ const whProjects = [
{ name: 'device_hihope', desc: 'HiHope开发板设备适配', stars: '8', company: '润开鸿' }, // 总热度: 8 (2 Star + 6 Fork) { name: 'device_hihope', desc: 'HiHope开发板设备适配', stars: '8', company: '润开鸿' }, // 总热度: 8 (2 Star + 6 Fork)
{ name: 'device_soc_hisilicon', desc: '海思芯片SoC底层适配', stars: '8', company: '润开鸿' }, // 总热度: 8 (2 Star + 6 Fork) { name: 'device_soc_hisilicon', desc: '海思芯片SoC底层适配', stars: '8', company: '润开鸿' }, // 总热度: 8 (2 Star + 6 Fork)
{ name: 'kernel_linux_patches', desc: 'Linux内核差异化补丁集', stars: '7', company: '润开鸿' } // 总热度: 7 (0 Star + 7 Fork) { name: 'kernel_linux_patches', desc: 'Linux内核差异化补丁集', stars: '7', company: '润开鸿' } // 总热度: 7 (0 Star + 7 Fork)
]; ]);
const fetchWhProjects = async() => {
try {
const response = await whProjectsPage3();
if (response.code === 200 && response.data) {
whProjects.value = response.data;
} else {
console.error('获取武汉鸿蒙开源项目数据失败:', response.msg || '未知错误');
// 使用默认数据
whProjects.value = [
{ name: 'docs', desc: 'OpenHarmony官方文档与指南', stars: '498', company: '中科创达' }, // 总热度: 4152 (498 Star + 3654 Fork)
{ name: 'xts_acts', desc: '应用兼容性测试套件(ACTS)', stars: '293', company: '润开鸿' }, // 总热度: 1906 (24 Star + 1882 Fork)
{ name: '黄鹤开源技术社区应用', desc: '基于OpenHarmony的社区APP', stars: '191', company: '坚果派' }, // 总热度: 196 (191 Star + 5 Fork)
{ name: 'manifest', desc: '系统版本与仓库清单管理', stars: '93', company: '中科创达' }, // 总热度: 93 (14 Star + 79 Fork)
{ name: 'communication_bluetooth', desc: '蓝牙通信子系统适配', stars: '55', company: '普华基础软件' }, // 总热度: 55 (2 Star + 53 Fork)
{ name: 'vendor_osware', desc: '普华厂商适配层组件', stars: '31', company: '普华基础软件' }, // 总热度: 31 (0 Star + 31 Fork)
{ name: 'device_soc_nxp', desc: 'NXP系列芯片SoC适配', stars: '15', company: '普华基础软件' }, // 总热度: 15 (0 Star + 15 Fork)
{ name: 'device_hihope', desc: 'HiHope开发板设备适配', stars: '8', company: '润开鸿' }, // 总热度: 8 (2 Star + 6 Fork)
{ name: 'device_soc_hisilicon', desc: '海思芯片SoC底层适配', stars: '8', company: '润开鸿' }, // 总热度: 8 (2 Star + 6 Fork)
{ name: 'kernel_linux_patches', desc: 'Linux内核差异化补丁集', stars: '7', company: '润开鸿' } // 总热度: 7 (
];
}
} catch (error) {
console.error('获取武汉鸿蒙开源项目数据异常:', error);
// 使用默认数据
whProjects.value = [
{ name: 'docs', desc: 'OpenHarmony官方文档与指南', stars: '498', company: '中科创达' }, // 总热度: 4152 (498 Star + 3654 Fork)
{ name: 'xts_acts', desc: '应用兼容性测试套件(ACTS)', stars: '293', company: '润开鸿' }, // 总热度: 1906 (24 Star + 1882 Fork)
{ name: '黄鹤开源技术社区应用', desc: '基于OpenHarmony的社区APP', stars: '191', company: '坚果派' }, // 总热度: 196 (191 Star + 5 Fork)
{ name: 'manifest', desc: '系统版本与仓库清单管理', stars: '93', company: '中科创达' }, // 总热度: 93 (14 Star + 79 Fork)
{ name: 'communication_bluetooth', desc: '蓝牙通信子系统适配', stars: '55', company: '普华基础软件' }, // 总热度: 55 (2 Star + 53 Fork)
{ name: 'vendor_osware', desc: '普华厂商适配层组件', stars: '31', company: '普华基础软件' }, // 总热度: 31 (0 Star + 31 Fork)
{ name: 'device_soc_nxp', desc: 'NXP系列芯片SoC适配', stars: '15', company: '普华基础软件' }, // 总热度: 15 (0 Star + 15 Fork)
{ name: 'device_hihope', desc: 'HiHope开发板设备适配', stars: '8', company: '润开鸿' }, // 总热度: 8 (2 Star + 6 Fork)
{ name: 'device_soc_hisilicon', desc: '海思芯片SoC底层适配', stars: '8', company: '润开鸿' }, // 总热度: 8 (2 Star + 6 Fork)
{ name: 'kernel_linux_patches', desc: 'Linux内核差异化补丁集', stars: '7', company: '润开鸿' } // 总热度: 7 (
];
}
};
const hmDevelopers = [ const hmDevelopers = [
{ name: 'ar*******o', employer: '华为', added: '1,348,180', deleted: '11,022', score: '1,359,202' }, { name: 'ar*******o', employer: '华为', added: '1,348,180', deleted: '11,022', score: '1,359,202' },
@@ -1192,7 +1231,7 @@ const handleResize = () => {
onMounted(async () => { onMounted(async () => {
nextTick(async () => { nextTick(async () => {
// 先获取鸿蒙项目城市分布数据和鸿蒙开源项目数据 // 先获取鸿蒙项目城市分布数据和鸿蒙开源项目数据
await Promise.all([fetchHmCityData(), fetchHmProjects()]); await Promise.all([fetchHmCityData(), fetchHmProjects(), fetchWhProjects()]);
initHmCityChart(); initHmCityChart();
initHmEnterpriseChart(); initHmEnterpriseChart();