Files
Situation-Awareness-Platfor…/src/views/Jyh/Version/Detail/CommunityInfo.vue

134 lines
3.7 KiB
Vue
Raw Normal View History

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>
<span class="card-val">开发者社区</span>
</d-col>
<d-col :span="8">
<span class="card-key width-90">官网地址</span>
<span class="card-val">https://www.huaweicloud.com</span>
</d-col>
<d-col :span="8">
<span class="card-key width-90">联系方式</span>
<span class="card-val">950808-1</span>
</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>
<span class="card-val flex-grow-1"
>华为开发者社区致力于打造华为开发者专属的官方技术交流平台帮助开发者探索开发实践交流心得经验获悉业界动态解决开发问题汇聚华为云社区华为云领域博
问答视频等精彩内容形成开发者和技术爱好者交流与分享主阵地</span
>
</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>
<d-row class="mt-3">
<d-col :span="12">
2025-03-14 18:05:06 +08:00
<d-chart :option="optionConChart" style="width: 100%; height: 400px"></d-chart>
2025-03-15 12:37:16 +08:00
<p class="text-center mt-translate-y">国家/地球分布</p>
2025-03-14 15:36:40 +08:00
</d-col>
<d-col :span="12">
2025-03-14 18:05:06 +08:00
<d-chart :option="optionOrgChart" style="width: 100%; height: 400px"></d-chart>
2025-03-15 12:37:16 +08:00
<p class="text-center mt-translate-y">组织/公司分布</p>
2025-03-14 15:36:40 +08:00
</d-col>
</d-row>
</Card>
</div>
</template>
2025-03-14 18:05:06 +08:00
<script setup>
import { ref, reactive } from 'vue';
import { DChart } from 'vue-devui/echarts';
const optionConChart = reactive({
tooltip: {
show: true,
trigger: 'item'
},
xAxis: {
type: 'category',
data: ['美国', '中国', '德国', '瑞士', '法国', '英国', '印度', '日本', '荷兰', '俄罗斯']
},
yAxis: {
// 给y轴添加单位后缀
axisLabel: {
formatter: '{value}%'
},
name: '单位',
type: 'value'
},
series: [
{
data: [12, 14.8, 23.6, 18.6, 17.3, 13.1, 16, 11.8, 13.9, 16.4],
type: 'bar',
barWidth: '40%',
// 给label添加单位后缀
label: {
show: true,
position: 'top',
formatter: '{c}%'
},
itemStyle: {
color: '#2070F3',
borderRadius: [5, 5, 0, 0]
}
}
]
});
const optionOrgChart = reactive({
tooltip: {
show: true,
trigger: 'item'
},
xAxis: {
type: 'category',
data: ['公司1', '公司2', '公司3', '公司4', '公司5', '公司6', '公司7', '公司8', '公司9', '公司10']
},
yAxis: {
// 给y轴添加单位后缀
axisLabel: {
formatter: '{value}%'
},
name: '单位',
type: 'value'
},
series: [
{
data: [12, 14.8, 23.6, 18.6, 17.3, 13.1, 16, 11.8, 13.9, 16.4],
type: 'bar',
barWidth: '40%',
// 给label添加单位后缀
label: {
show: true,
position: 'top',
formatter: '{c}%'
},
itemStyle: {
color: '#2CB8C9',
borderRadius: [5, 5, 0, 0]
}
}
]
});
</script>
2025-03-14 15:36:40 +08:00
<style scoped lang="scss">
.card-desc {
font-size: 12px;
color: #808080;
}
2025-03-15 12:37:16 +08:00
.mt-translate-y {
transform: translateY(-30px);
}
2025-03-14 15:36:40 +08:00
</style>