组件服务
|
@ -0,0 +1,52 @@
|
|||
import request from '@/utils/request'
|
||||
//能力云图-知识库
|
||||
export function KnowledgeBaseStatic() {
|
||||
return request({
|
||||
url: '/census/center/v2/knowledgeInfo',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
//能力云图-概览总数
|
||||
export function wholeAmount() {
|
||||
return request({
|
||||
url: '/census/center/v2/whole_amount',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
//能力云图-概览ehcarts
|
||||
export function trafficStatistics(data) {
|
||||
return request({
|
||||
url: '/census/center/v2/trafficStatistics',
|
||||
method: 'post',
|
||||
data,
|
||||
})
|
||||
}
|
||||
//能力云图-应用资源总数
|
||||
export function applicationNum() {
|
||||
return request({
|
||||
url: '/census/center/v2/applicationNum',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
//能力云图-区市应用资源排名
|
||||
export function districtResourceRank() {
|
||||
return request({
|
||||
url: '/census/center/v2/districtResourceRank',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
//能力云图-委办局应用资源分布
|
||||
export function cityResourceRank() {
|
||||
return request({
|
||||
url: '/census/center/v2/cityResourceRank',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
//能力云图-组件服务
|
||||
export function assemblerBaseStatic() {
|
||||
return request({
|
||||
url: '/census/center/v2/assemblerInfo',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 4.9 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 310 B |
After Width: | Height: | Size: 5.2 KiB |
After Width: | Height: | Size: 4.5 KiB |
After Width: | Height: | Size: 8.6 KiB |
After Width: | Height: | Size: 3.3 KiB |
|
@ -3,10 +3,469 @@
|
|||
* @Date: 2022-06-19 10:15:33
|
||||
* @LastEditors: hisense.liangjunhua
|
||||
* @LastEditTime: 2022-06-19 10:17:22
|
||||
* @Description: 告诉大家这是什么
|
||||
* @Description: 能力云图-组件服务
|
||||
-->
|
||||
<template>
|
||||
<div class="component-services">组件服务</div>
|
||||
<div class="component-services">
|
||||
<div class="component-services-top">
|
||||
<span class="title">组件服务</span>
|
||||
</div>
|
||||
<div class="component-services-content">
|
||||
<!-- 上架总量 -->
|
||||
<div class="component-services-content-left">
|
||||
<div class="component-services-content-left-top">组件</div>
|
||||
<div class="component-services-content-left-bottom">
|
||||
<div
|
||||
class="component-services-content-left-bottom-son"
|
||||
v-for="(item, index) in snum"
|
||||
:key="index"
|
||||
>
|
||||
<P>{{ item.title }}</P>
|
||||
<p class="num">{{ item.num }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 组件数量和调用趋势 -->
|
||||
<div class="component-services-content-right">
|
||||
<div class="component-services-content-right-left">
|
||||
<div class="component-services-content-right-left-title">
|
||||
组件数量
|
||||
</div>
|
||||
<div class="component-services-content-right-left-content">
|
||||
<div
|
||||
v-for="(item, index) in servicesSnum"
|
||||
:key="index"
|
||||
class="component-services-content-right-left-content-son"
|
||||
>
|
||||
<p>{{ item.type }}</p>
|
||||
<p class="num">{{ item.amount }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="component-services-content-right-right">
|
||||
<div class="component-services-content-right-right-title">
|
||||
<div class="component-services-content-right-right-title-top">
|
||||
<div
|
||||
class="component-services-content-right-right-title-top-left"
|
||||
>
|
||||
调用趋势
|
||||
</div>
|
||||
<div
|
||||
class="component-services-content-right-right-title-top-right"
|
||||
>
|
||||
<div>周</div>
|
||||
<div>月</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="component-services-content-right-right-title-bottom">
|
||||
次
|
||||
</div>
|
||||
</div>
|
||||
<div class="callTheTrend" id="callTheTrend"></div>
|
||||
<div class="component-services-content-right-right-bottom">
|
||||
<div class="component-services-content-right-right-bottom-left">
|
||||
<div class="components-can-assign">组件赋能排行</div>
|
||||
<div class="components-scores">组件评分排行</div>
|
||||
</div>
|
||||
<div class="component-services-content-right-right-bottom-right">
|
||||
<div>
|
||||
<span>TOP</span>
|
||||
<span>名称</span>
|
||||
<span>应用数</span>
|
||||
</div>
|
||||
<div>
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup></script>
|
||||
<style lang="less" scoped></style>
|
||||
<script setup>
|
||||
import { ref, onMounted } from 'vue'
|
||||
import * as echarts from 'echarts'
|
||||
import { assemblerBaseStatic } from '@/api/capabilityCloud'
|
||||
// import * as moment from 'moment'
|
||||
let snum = ref([
|
||||
{ title: '上架总量', num: '0000' },
|
||||
{ title: '总调用次数(API)', num: '0000' },
|
||||
{ title: '健康度(API)', num: '0000' },
|
||||
])
|
||||
let servicesSnum = ref([])
|
||||
let callTheTrendData = ref([
|
||||
{ time: 6.02, value: 10 },
|
||||
{ time: 6.03, value: 12 },
|
||||
{ time: 6.04, value: 0 },
|
||||
{ time: 6.05, value: 1 },
|
||||
{ time: 6.06, value: 10 },
|
||||
{ time: 6.07, value: 20 },
|
||||
{ time: 6.08, value: 15 },
|
||||
])
|
||||
//调用趋势echarts图
|
||||
const callTheTrend = () => {
|
||||
echarts.init(document.getElementById('callTheTrend')).dispose()
|
||||
let chartDom = document.getElementById('callTheTrend')
|
||||
let myChart = echarts.init(chartDom)
|
||||
let option
|
||||
option = {
|
||||
grid: {
|
||||
top: '10%',
|
||||
left: '0%',
|
||||
right: '5%',
|
||||
bottom: '0%',
|
||||
containLabel: true,
|
||||
},
|
||||
xAxis: [
|
||||
{
|
||||
type: 'category',
|
||||
boundaryGap: false,
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: 'rgba(28,119,205,0.8)',
|
||||
},
|
||||
},
|
||||
axisLabel: {
|
||||
textStyle: {
|
||||
color: 'rgba(255,255,255,0.5)',
|
||||
size: 18,
|
||||
},
|
||||
},
|
||||
data: ['1-13', '1-14', '1-15', '1-16', '1-17', '1-18', '1-19'],
|
||||
},
|
||||
],
|
||||
yAxis: [
|
||||
{
|
||||
name: '个',
|
||||
type: 'value',
|
||||
axisTick: {
|
||||
show: false,
|
||||
},
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: '#57617B',
|
||||
},
|
||||
},
|
||||
axisLabel: {
|
||||
textStyle: {
|
||||
color: 'rgba(255,255,255,0.5)',
|
||||
size: 18,
|
||||
},
|
||||
},
|
||||
splitLine: {
|
||||
show: false,
|
||||
},
|
||||
},
|
||||
],
|
||||
series: [
|
||||
{
|
||||
type: 'line',
|
||||
smooth: true,
|
||||
lineStyle: {
|
||||
normal: {
|
||||
width: 3,
|
||||
},
|
||||
},
|
||||
areaStyle: {
|
||||
normal: {
|
||||
color: new echarts.graphic.LinearGradient(
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
[
|
||||
{
|
||||
offset: 0,
|
||||
color: 'rgba(244,124,37, 1)',
|
||||
},
|
||||
{
|
||||
offset: 0.8,
|
||||
color: 'rgba(244,124,37, 0)',
|
||||
},
|
||||
],
|
||||
false
|
||||
),
|
||||
shadowColor: 'rgba(0, 0, 0, 0.1)',
|
||||
shadowBlur: 10,
|
||||
},
|
||||
},
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: new echarts.graphic.LinearGradient(
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
[
|
||||
{
|
||||
offset: 0,
|
||||
color: '#ffe22e',
|
||||
},
|
||||
{
|
||||
offset: 0.8,
|
||||
color: '#f47c25',
|
||||
},
|
||||
],
|
||||
false
|
||||
),
|
||||
shadowColor: 'rgba(0, 0, 0, 0.1)',
|
||||
shadowBlur: '3px',
|
||||
},
|
||||
},
|
||||
data: [96.3, 96.4, 97.5, 95.6, 98.1, 94.8, 89.6],
|
||||
},
|
||||
],
|
||||
}
|
||||
option && myChart.setOption(option)
|
||||
}
|
||||
//组件服务数量接口
|
||||
const NumberOfComponentServices = () => {
|
||||
assemblerBaseStatic().then((res) => {
|
||||
snum.value[0].num = res.data.data[0].amount
|
||||
console.log('res', res.data)
|
||||
res.data.data.map((item, index) => {
|
||||
if (index != 0) {
|
||||
servicesSnum.value.push(item)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
const init = () => {
|
||||
NumberOfComponentServices()
|
||||
}
|
||||
onMounted(() => {
|
||||
init()
|
||||
callTheTrend(callTheTrendData.value)
|
||||
})
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.component-services {
|
||||
height: 4.65rem;
|
||||
width: 7.84rem;
|
||||
position: relative;
|
||||
background: rgba(0, 108, 188, 0.1);
|
||||
border: 0.02rem rgba(0, 108, 188, 0.7) solid;
|
||||
border-radius: 0.03rem;
|
||||
.component-services-top {
|
||||
width: 7.84rem;
|
||||
height: 0.44rem;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
background: url('~@/assets/capabilityCloud/Component_services_bg.png')
|
||||
no-repeat;
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
line-height: 0.44rem;
|
||||
text-align: center;
|
||||
.title {
|
||||
font-size: 0.24rem;
|
||||
}
|
||||
}
|
||||
.component-services-content {
|
||||
padding: 0.28rem 0 0.28rem 0.28rem;
|
||||
width: 7.84rem;
|
||||
height: 4.65rem;
|
||||
display: flex;
|
||||
.component-services-content-left {
|
||||
margin-right: 0.18rem;
|
||||
.component-services-content-left-top {
|
||||
width: 1.16rem;
|
||||
height: 1.04rem;
|
||||
margin-left: 0.15rem;
|
||||
line-height: 1.04rem;
|
||||
text-align: center;
|
||||
color: rgba(255, 255, 255, 0.9);
|
||||
font-size: 0.2rem;
|
||||
background: url('~@/assets/capabilityCloud/Component_services_title.png')
|
||||
no-repeat;
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
}
|
||||
.component-services-content-left-bottom {
|
||||
width: 1.48rem;
|
||||
margin-top: -0.15rem;
|
||||
padding-top: 0.52rem;
|
||||
background: url('~@/assets/capabilityCloud/Component_services_content_bg.png')
|
||||
no-repeat;
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
.component-services-content-left-bottom-son {
|
||||
text-align: center;
|
||||
margin-bottom: 0.56rem;
|
||||
& > p:first-child {
|
||||
color: #ffffff;
|
||||
font-size: 0.16rem;
|
||||
line-height: 0.16rem;
|
||||
margin-bottom: 0.12rem;
|
||||
margin-top: ;
|
||||
}
|
||||
& > p:last-child {
|
||||
color: #1ef6f5;
|
||||
font-size: 0.28rem;
|
||||
line-height: 0.28rem;
|
||||
}
|
||||
}
|
||||
.component-services-content-left-bottom-son:last-child {
|
||||
margin-bottom: 0rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
.component-services-content-right {
|
||||
width: (100% - 1.66rem);
|
||||
margin-top: 0.35rem;
|
||||
display: flex;
|
||||
.component-services-content-right-left {
|
||||
width: 1.6rem;
|
||||
height: 3.72rem;
|
||||
background: -webkit-linear-gradient(#214677, transparent);
|
||||
margin-right: 0.13rem;
|
||||
.component-services-content-right-left-title {
|
||||
font-size: 0.2rem;
|
||||
color: #ffffff;
|
||||
padding: 0.14rem 0 0.1rem 0;
|
||||
border-bottom: #00ffff 0.01rem solid;
|
||||
text-align: center;
|
||||
margin: 0 0.13rem;
|
||||
}
|
||||
.component-services-content-right-left-content {
|
||||
padding-top: 0.14rem;
|
||||
.component-services-content-right-left-content-son {
|
||||
background: url('~@/assets/capabilityCloud/Component_services_snum.png')
|
||||
no-repeat;
|
||||
background-size: 1.1rem 0.59rem;
|
||||
background-position: center;
|
||||
text-align: center;
|
||||
& > p:first-child {
|
||||
color: #ffffff;
|
||||
font-size: 0.16rem;
|
||||
line-height: 0.16rem;
|
||||
margin-bottom: 0.12rem;
|
||||
}
|
||||
& > p:last-child {
|
||||
color: #1ef6f5;
|
||||
font-size: 0.28rem;
|
||||
line-height: 0.28rem;
|
||||
padding-bottom: 0.24rem;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
.component-services-content-right-left-content-son :first-child {
|
||||
& > p:last-child {
|
||||
color: #1ef6f5;
|
||||
font-size: 0.28rem;
|
||||
line-height: 0.28rem;
|
||||
padding-bottom: 0.38rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.component-services-content-right-right {
|
||||
width: 3.96rem;
|
||||
.component-services-content-right-right-title {
|
||||
.component-services-content-right-right-title-top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.component-services-content-right-right-title-top-left {
|
||||
font-size: 0.18rem;
|
||||
height: 0.2rem;
|
||||
line-height: 0.18rem;
|
||||
color: #ffffff;
|
||||
background: url('~@/assets/capabilityCloud/Component_services_title_bg.png')
|
||||
no-repeat;
|
||||
background-size: 0.7rem 0.08rem;
|
||||
background-position: bottom;
|
||||
}
|
||||
.component-services-content-right-right-title-top-right {
|
||||
margin-left: 0.15rem;
|
||||
display: flex;
|
||||
color: #ffffff;
|
||||
font-size: 0.14rem;
|
||||
& > div {
|
||||
font-size: 0.14rem;
|
||||
height: 0.26rem;
|
||||
width: 0.4rem;
|
||||
border: 0.01rem solid #61d2d2;
|
||||
text-align: center;
|
||||
line-height: 0.24rem;
|
||||
margin-right: 0.05rem;
|
||||
border-radius: 0.12rem;
|
||||
background: #05315b;
|
||||
}
|
||||
}
|
||||
}
|
||||
.component-services-content-right-right-title-bottom {
|
||||
color: rgba(255, 255, 255, 0.5);
|
||||
line-height: 0.14rem;
|
||||
}
|
||||
}
|
||||
.callTheTrend {
|
||||
height: 1.32rem;
|
||||
width: 100%;
|
||||
}
|
||||
.component-services-content-right-right-bottom {
|
||||
display: flex;
|
||||
padding-top: 0.13rem;
|
||||
.component-services-content-right-right-bottom-left {
|
||||
width: 1.28rem;
|
||||
border-right: 0.02rem rgba(0, 108, 188, 0.7) solid;
|
||||
margin-right: 0.2rem;
|
||||
.components-can-assign,
|
||||
.components-scores {
|
||||
margin-top: 0.13rem;
|
||||
height: 0.88rem;
|
||||
width: 1.25rem;
|
||||
font-size: 0.16rem;
|
||||
color: rgba(255, 255, 255, 0.6);
|
||||
line-height: 0.88rem;
|
||||
text-align: center;
|
||||
background: linear-gradient(
|
||||
to right,
|
||||
rgba(0, 117, 203, 0.2),
|
||||
rgba(0, 117, 203, 0)
|
||||
);
|
||||
}
|
||||
.components-can-assign {
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
.component-services-content-right-right-bottom-right {
|
||||
width: 2.5rem;
|
||||
font-size: 0.16rem;
|
||||
border: 0.02rem rgba(0, 108, 188, 0.7) solid;
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
& > div {
|
||||
& > span {
|
||||
display: inline-block;
|
||||
height: 0.32rem;
|
||||
line-height: 0.32rem;
|
||||
border-right: 0.02rem rgba(0, 108, 188, 0.7) solid;
|
||||
border-bottom: 0.02rem rgba(0, 108, 188, 0.7) solid;
|
||||
}
|
||||
& > span:first-child {
|
||||
width: 0.47rem;
|
||||
text-align: center;
|
||||
}
|
||||
& > span:nth-child(2) {
|
||||
width: 1.47rem;
|
||||
}
|
||||
& > span:last-child {
|
||||
width: 0.5rem;
|
||||
color: #1ffefd;
|
||||
text-align: center;
|
||||
border-right: 0;
|
||||
}
|
||||
}
|
||||
& > div:first-child {
|
||||
color: #1ffefd;
|
||||
background: #27528c;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -6,7 +6,154 @@
|
|||
* @Description: 告诉大家这是什么
|
||||
-->
|
||||
<template>
|
||||
<div class="infrastructure">基础设施</div>
|
||||
<div class="infrastructure">
|
||||
<div class="infrastructure-top">
|
||||
<span class="title">基础设施</span>
|
||||
</div>
|
||||
<div class="infrastructure-content">
|
||||
<div
|
||||
class="infrastructure-content-son"
|
||||
v-for="(item, index) in dataList"
|
||||
:key="index"
|
||||
>
|
||||
<div class="num-class" :style="`background:url(${item.img}) no-repeat`">
|
||||
<div>{{ item.title }}</div>
|
||||
<div>{{ item.snum }}</div>
|
||||
</div>
|
||||
<div class="health-degree">
|
||||
<div class="health-degree-title">健康度</div>
|
||||
<a-progress
|
||||
:stroke-color="{
|
||||
'0%': '#108ee9',
|
||||
'100%': '#87d068',
|
||||
}"
|
||||
:percent="item.percentage"
|
||||
:show-info="false"
|
||||
/>
|
||||
</div>
|
||||
<div class="percentage" :class="fontFormat(item.title)">
|
||||
{{ item.percentage }}%
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup></script>
|
||||
<style lang="less" scoped></style>
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
let dataList = ref([
|
||||
{
|
||||
title: '视频资源数量',
|
||||
snum: '100',
|
||||
percentage: '100',
|
||||
img: require('../../../assets/capabilityCloud/infrastructure_sz.png'),
|
||||
},
|
||||
{
|
||||
title: '云资源',
|
||||
snum: '0',
|
||||
percentage: '0',
|
||||
img: require('../../../assets/capabilityCloud/infrastructure_yz.png'),
|
||||
},
|
||||
{
|
||||
title: '感知资源',
|
||||
snum: '0',
|
||||
percentage: '0',
|
||||
img: require('../../../assets/capabilityCloud/infrastructure_gz.png'),
|
||||
},
|
||||
])
|
||||
function fontFormat(name) {
|
||||
switch (name) {
|
||||
case '视频资源数量':
|
||||
break
|
||||
case '云资源':
|
||||
break
|
||||
case '感知资源':
|
||||
break
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.infrastructure {
|
||||
width: 4.4rem;
|
||||
height: 4.65rem;
|
||||
position: relative;
|
||||
background: rgba(0, 108, 188, 0.1);
|
||||
border: 0.02rem rgba(0, 108, 188, 0.7) solid;
|
||||
border-radius: 0.03rem;
|
||||
padding: 0.2rem;
|
||||
padding-top: 0;
|
||||
.infrastructure-top {
|
||||
width: 4.4rem;
|
||||
height: 0.44rem;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
background: url('~@/assets/capabilityCloud/infrastructure_title.png')
|
||||
no-repeat;
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
line-height: 0.44rem;
|
||||
text-align: center;
|
||||
.title {
|
||||
font-size: 0.24rem;
|
||||
}
|
||||
}
|
||||
.infrastructure-content {
|
||||
width: 4rem;
|
||||
margin-top: 0.62rem;
|
||||
.infrastructure-content-son {
|
||||
display: flex;
|
||||
width: 4rem;
|
||||
height: 1.17rem;
|
||||
background: linear-gradient(to right, #214677, rgba(2, 20, 103, 0));
|
||||
align-items: center;
|
||||
margin-bottom: 0.14rem;
|
||||
padding-left: 0.1rem;
|
||||
}
|
||||
.num-class {
|
||||
width: 1.7rem;
|
||||
padding-left: 0.1rem;
|
||||
text-align: center;
|
||||
& > div:first-child {
|
||||
font-size: 0.18rem;
|
||||
color: #ffffff;
|
||||
margin-bottom: 0.1rem;
|
||||
line-height: 0.18rem;
|
||||
}
|
||||
& > div:last-child {
|
||||
font-size: 0.36rem;
|
||||
line-height: 0.36rem;
|
||||
color: #1ce2e5;
|
||||
}
|
||||
}
|
||||
.health-degree {
|
||||
width: 1.35rem;
|
||||
.health-degree-title {
|
||||
font-size: 0.14rem;
|
||||
color: rgba(255, 255, 255, 0.6);
|
||||
margin-bottom: 0.08rem;
|
||||
}
|
||||
:deep(.ant-progress-outer) {
|
||||
height: 0.27rem;
|
||||
}
|
||||
:deep(.ant-progress-inner) {
|
||||
height: 0.27rem;
|
||||
border-radius: 0.14rem;
|
||||
border: 0.01rem solid rgba(8, 153, 231, 0.6);
|
||||
background: rgba(21, 65, 123, 0.6);
|
||||
div {
|
||||
height: 0.27rem !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
// .health-degree:
|
||||
.percentage {
|
||||
height: 0.57rem;
|
||||
font-size: 0.24rem;
|
||||
line-height: 0.24rem;
|
||||
font-family: 'DIN-Bold';
|
||||
margin-left: 0.1rem;
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|