2025-03-14 15:36:40 +08:00
|
|
|
<template>
|
|
|
|
|
<div class="version-info">
|
|
|
|
|
<Card simple class="jyh-card mb-4">
|
|
|
|
|
<div class="card-title">基本信息</div>
|
|
|
|
|
<d-row class="mb-3">
|
|
|
|
|
<d-col :span="8">
|
|
|
|
|
<span class="card-key width-90">社区名称</span>
|
2025-03-19 13:04:13 +08:00
|
|
|
<span class="card-val">{{ infos.communityName }}</span>
|
2025-03-14 15:36:40 +08:00
|
|
|
</d-col>
|
|
|
|
|
<d-col :span="8">
|
|
|
|
|
<span class="card-key width-90">官网地址</span>
|
2025-03-21 11:00:56 +08:00
|
|
|
<a :href="infos.communityWebsite" class="card-url">{{ infos.communityWebsite }}</a>
|
2025-03-14 15:36:40 +08:00
|
|
|
</d-col>
|
|
|
|
|
<d-col :span="8">
|
|
|
|
|
<span class="card-key width-90">联系方式</span>
|
2025-03-19 13:04:13 +08:00
|
|
|
<span class="card-val">{{ infos.communityContact }}</span>
|
2025-03-14 15:36:40 +08:00
|
|
|
</d-col>
|
|
|
|
|
</d-row>
|
2025-03-14 18:05:06 +08:00
|
|
|
<d-row class="mb-3">
|
2025-03-14 15:36:40 +08:00
|
|
|
<d-col :span="24">
|
|
|
|
|
<div class="flex">
|
|
|
|
|
<span class="card-key width-90 flex-shrink-0">社区描述</span>
|
2025-03-19 13:04:13 +08:00
|
|
|
<span class="card-val flex-grow-1">{{ infos.communityDescription }}</span>
|
2025-03-14 15:36:40 +08:00
|
|
|
</div>
|
|
|
|
|
</d-col>
|
|
|
|
|
</d-row>
|
|
|
|
|
</Card>
|
|
|
|
|
<Card simple class="jyh-card mb-4">
|
|
|
|
|
<div class="card-title">贡献者分布</div>
|
|
|
|
|
<p class="card-desc">有关Pull Request创建者的公司信息和地区分布(使用公共GitHub信息进行分析)</p>
|
2025-03-15 15:40:06 +08:00
|
|
|
<div class="mt-3">
|
2025-03-19 13:04:13 +08:00
|
|
|
<chart-line ref="chartLine" :companyGraph="infos.companyGraph" :countryGraph="infos.countryGraph" />
|
2025-03-15 15:40:06 +08:00
|
|
|
</div>
|
2025-03-14 15:36:40 +08:00
|
|
|
</Card>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
2025-03-14 18:05:06 +08:00
|
|
|
<script setup>
|
2025-03-19 13:04:13 +08:00
|
|
|
import { ref, reactive, onMounted } from 'vue';
|
|
|
|
|
import SBOMDetail from './SBOMDetail.vue';
|
|
|
|
|
import { communityInfo } from '@/api/jyh';
|
|
|
|
|
import { useRoute } from 'vue-router';
|
2025-03-15 15:40:06 +08:00
|
|
|
import ChartLine from '@/components/ChartLine/index.vue';
|
2025-03-19 13:04:13 +08:00
|
|
|
|
|
|
|
|
const route = useRoute(); // 获取路由对象
|
|
|
|
|
|
|
|
|
|
const chartLine = ref();
|
|
|
|
|
const infos = ref({});
|
|
|
|
|
onMounted(async () => {
|
|
|
|
|
const { data } = await communityInfo(Number(route.params.versionId));
|
|
|
|
|
infos.value = data?.data?.data || {};
|
|
|
|
|
chartLine.value.onInited();
|
|
|
|
|
});
|
2025-03-14 18:05:06 +08:00
|
|
|
</script>
|
|
|
|
|
|
2025-03-14 15:36:40 +08:00
|
|
|
<style scoped lang="scss">
|
|
|
|
|
.card-desc {
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
color: #808080;
|
|
|
|
|
}
|
|
|
|
|
</style>
|