Compare commits
3 Commits
5a36b3eabd
...
3eeb2702d3
Author | SHA1 | Date |
---|---|---|
851673013@qq.com | 3eeb2702d3 | |
851673013@qq.com | 33134d3151 | |
851673013@qq.com | e38c8234a4 |
|
@ -28,10 +28,10 @@
|
||||||
<!-- 站点配置 -->
|
<!-- 站点配置 -->
|
||||||
<script>
|
<script>
|
||||||
window.SITE_CONFIG = {};
|
window.SITE_CONFIG = {};
|
||||||
// window.SITE_CONFIG['backUrl'] = 'http://15.72.183.90:8001';
|
window.SITE_CONFIG['backUrl'] = 'http://15.72.183.90:8001';
|
||||||
// window.SITE_CONFIG['previewUrl'] = 'http://15.72.183.90:7008/';
|
window.SITE_CONFIG['previewUrl'] = 'http://15.72.183.90:7008/';
|
||||||
// window.SITE_CONFIG['frontUrl'] = 'http://15.72.183.90:7008/document/#/devModelFile/';
|
window.SITE_CONFIG['frontUrl'] = 'http://15.72.183.90:7008/document/#/devModelFile/';
|
||||||
// window.SITE_CONFIG['apiURL'] = 'http://15.72.183.90:8000/renren-admin';
|
window.SITE_CONFIG['apiURL'] = 'http://15.72.183.90:8000/renren-admin';
|
||||||
|
|
||||||
// window.SITE_CONFIG['backUrl'] = 'http://15.72.183.90:8001';
|
// window.SITE_CONFIG['backUrl'] = 'http://15.72.183.90:8001';
|
||||||
// window.SITE_CONFIG['previewUrl'] = 'http://15.72.183.90:7008/';
|
// window.SITE_CONFIG['previewUrl'] = 'http://15.72.183.90:7008/';
|
||||||
|
@ -44,10 +44,10 @@
|
||||||
// window.SITE_CONFIG['frontUrl'] = 'http://15.2.21.238:9796/document/#/devModelFile/';
|
// window.SITE_CONFIG['frontUrl'] = 'http://15.2.21.238:9796/document/#/devModelFile/';
|
||||||
// window.SITE_CONFIG['apiURL'] = 'http://15.2.21.238:8888/renren-admin';
|
// window.SITE_CONFIG['apiURL'] = 'http://15.2.21.238:8888/renren-admin';
|
||||||
// 穿透版本
|
// 穿透版本
|
||||||
window.SITE_CONFIG['backUrl'] = 'http://124.222.94.39:9797';
|
// window.SITE_CONFIG['backUrl'] = 'http://124.222.94.39:9797';
|
||||||
window.SITE_CONFIG['previewUrl'] = 'http://124.222.94.39:9796/';
|
// window.SITE_CONFIG['previewUrl'] = 'http://124.222.94.39:9796/';
|
||||||
window.SITE_CONFIG['frontUrl'] = 'http://124.222.94.39:9796/document/#/devModelFile/';
|
// window.SITE_CONFIG['frontUrl'] = 'http://124.222.94.39:9796/document/#/devModelFile/';
|
||||||
window.SITE_CONFIG['apiURL'] = 'http://124.222.94.39:8888/renren-admin';
|
// window.SITE_CONFIG['apiURL'] = 'http://124.222.94.39:8888/renren-admin';
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<link href="./leaflet/libs/leaflet/1.3.1/leaflet.css" rel="stylesheet">
|
<link href="./leaflet/libs/leaflet/1.3.1/leaflet.css" rel="stylesheet">
|
||||||
|
|
|
@ -49,3 +49,12 @@ export function assemblerBaseStatic() {
|
||||||
method: 'get',
|
method: 'get',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
//能力云图-组件服务排行
|
||||||
|
export function componentServiceRank(params) {
|
||||||
|
return request({
|
||||||
|
url: '/census/center/v2/componentServiceRank',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,8 +53,18 @@
|
||||||
<div
|
<div
|
||||||
class="component-services-content-right-right-title-top-right"
|
class="component-services-content-right-right-title-top-right"
|
||||||
>
|
>
|
||||||
<div>周</div>
|
<div
|
||||||
<div>月</div>
|
@click="timeSwitch('周')"
|
||||||
|
:class="timeSwitchindex == '周' ? 'timeDown' : ''"
|
||||||
|
>
|
||||||
|
周
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
@click="timeSwitch('月')"
|
||||||
|
:class="timeSwitchindex == '月' ? 'timeDown' : ''"
|
||||||
|
>
|
||||||
|
月
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="component-services-content-right-right-title-bottom">
|
<div class="component-services-content-right-right-title-bottom">
|
||||||
|
@ -64,8 +74,20 @@
|
||||||
<div class="callTheTrend" id="callTheTrend"></div>
|
<div class="callTheTrend" id="callTheTrend"></div>
|
||||||
<div class="component-services-content-right-right-bottom">
|
<div class="component-services-content-right-right-bottom">
|
||||||
<div class="component-services-content-right-right-bottom-left">
|
<div class="component-services-content-right-right-bottom-left">
|
||||||
<div class="components-can-assign">组件赋能排行</div>
|
<div
|
||||||
<div class="components-scores">组件评分排行</div>
|
class="components-can-assign"
|
||||||
|
@click="ranking('total')"
|
||||||
|
:class="dataclick == 'total' ? 'down' : ''"
|
||||||
|
>
|
||||||
|
组件赋能排行
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="components-scores"
|
||||||
|
@click="ranking('score')"
|
||||||
|
:class="dataclick == 'score' ? 'down' : ''"
|
||||||
|
>
|
||||||
|
组件评分排行
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="component-services-content-right-right-bottom-right">
|
<div class="component-services-content-right-right-bottom-right">
|
||||||
<div>
|
<div>
|
||||||
|
@ -73,10 +95,13 @@
|
||||||
<span>名称</span>
|
<span>名称</span>
|
||||||
<span>应用数</span>
|
<span>应用数</span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div v-for="(item, index) in dataList" :key="index">
|
||||||
<span></span>
|
<span>{{ index + 1 }}</span>
|
||||||
<span></span>
|
<a-tooltip>
|
||||||
<span></span>
|
<template #title>{{ item.name }}</template>
|
||||||
|
<span>{{ item.name }}</span>
|
||||||
|
</a-tooltip>
|
||||||
|
<span>{{ item.count }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -88,25 +113,50 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, onMounted } from 'vue'
|
import { ref, onMounted } from 'vue'
|
||||||
import * as echarts from 'echarts'
|
import * as echarts from 'echarts'
|
||||||
import { assemblerBaseStatic } from '@/api/capabilityCloud'
|
import {
|
||||||
// import * as moment from 'moment'
|
assemblerBaseStatic,
|
||||||
|
componentServiceRank,
|
||||||
|
} from '@/api/capabilityCloud'
|
||||||
|
import * as moment from 'moment'
|
||||||
let snum = ref([
|
let snum = ref([
|
||||||
{ title: '上架总量', num: '0000' },
|
{ title: '上架总量', num: '0000' },
|
||||||
{ title: '总调用次数(API)', num: '0' },
|
{ title: '总调用次数(API)', num: '0' },
|
||||||
{ title: '健康度(API)', num: '100%' },
|
{ title: '健康度(API)', num: '100%' },
|
||||||
])
|
])
|
||||||
|
let dataclick = ref('total')
|
||||||
|
let dataList = ref([])
|
||||||
|
let timeSwitchindex = ref('周')
|
||||||
let servicesSnum = ref([])
|
let servicesSnum = ref([])
|
||||||
let callTheTrendData = ref([
|
let callTheTrendData = ref({ time: [], snum: [] })
|
||||||
{ time: 6.02, value: 10 },
|
//年月切换
|
||||||
{ time: 6.03, value: 12 },
|
const timeSwitch = (name) => {
|
||||||
{ time: 6.04, value: 0 },
|
timeSwitchindex.value = name
|
||||||
{ time: 6.05, value: 1 },
|
callTheTrendData.value.time = []
|
||||||
{ time: 6.06, value: 10 },
|
callTheTrendData.value.snum = []
|
||||||
{ time: 6.07, value: 20 },
|
if (name == '周') {
|
||||||
{ time: 6.08, value: 15 },
|
for (let i = 0; i < 7; i++) {
|
||||||
])
|
let time = moment()
|
||||||
|
.subtract('days', 6 - i)
|
||||||
|
.format('MM-DD')
|
||||||
|
callTheTrendData.value.time.push(time)
|
||||||
|
callTheTrendData.value.snum.push('0')
|
||||||
|
console.log('time', callTheTrendData.value, name)
|
||||||
|
}
|
||||||
|
callTheTrend(callTheTrendData.value)
|
||||||
|
} else {
|
||||||
|
for (let i = 0; i < 31; i++) {
|
||||||
|
let time = moment()
|
||||||
|
.subtract('days', 30 - i)
|
||||||
|
.format('MM-DD')
|
||||||
|
callTheTrendData.value.time.push(time)
|
||||||
|
callTheTrendData.value.snum.push('0')
|
||||||
|
console.log('time', callTheTrendData.value, name)
|
||||||
|
}
|
||||||
|
callTheTrend(callTheTrendData.value)
|
||||||
|
}
|
||||||
|
}
|
||||||
//调用趋势echarts图
|
//调用趋势echarts图
|
||||||
const callTheTrend = () => {
|
const callTheTrend = (dataFrom) => {
|
||||||
echarts.init(document.getElementById('callTheTrend')).dispose()
|
echarts.init(document.getElementById('callTheTrend')).dispose()
|
||||||
let chartDom = document.getElementById('callTheTrend')
|
let chartDom = document.getElementById('callTheTrend')
|
||||||
let myChart = echarts.init(chartDom)
|
let myChart = echarts.init(chartDom)
|
||||||
|
@ -134,7 +184,7 @@
|
||||||
size: 18,
|
size: 18,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
data: ['1-13', '1-14', '1-15', '1-16', '1-17', '1-18', '1-19'],
|
data: dataFrom.time,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
yAxis: [
|
yAxis: [
|
||||||
|
@ -215,17 +265,28 @@
|
||||||
shadowBlur: '3px',
|
shadowBlur: '3px',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
data: [96.3, 96.4, 97.5, 95.6, 98.1, 94.8, 89.6],
|
data: dataFrom.snum,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
option && myChart.setOption(option)
|
option && myChart.setOption(option)
|
||||||
}
|
}
|
||||||
|
//组件复制排名接口
|
||||||
|
const ranking = (name) => {
|
||||||
|
dataclick.value = name
|
||||||
|
let params = {
|
||||||
|
type: name,
|
||||||
|
}
|
||||||
|
debugger
|
||||||
|
componentServiceRank(params).then((res) => {
|
||||||
|
dataList.value = res.data.data
|
||||||
|
console.log('res', dataList.value)
|
||||||
|
})
|
||||||
|
}
|
||||||
//组件服务数量接口
|
//组件服务数量接口
|
||||||
const NumberOfComponentServices = () => {
|
const NumberOfComponentServices = () => {
|
||||||
assemblerBaseStatic().then((res) => {
|
assemblerBaseStatic().then((res) => {
|
||||||
snum.value[0].num = res.data.data[0].amount
|
snum.value[0].num = res.data.data[0].amount
|
||||||
console.log('res', res.data)
|
|
||||||
res.data.data.map((item, index) => {
|
res.data.data.map((item, index) => {
|
||||||
if (index != 0) {
|
if (index != 0) {
|
||||||
servicesSnum.value.push(item)
|
servicesSnum.value.push(item)
|
||||||
|
@ -234,7 +295,9 @@
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const init = () => {
|
const init = () => {
|
||||||
|
timeSwitch(timeSwitchindex.value)
|
||||||
NumberOfComponentServices()
|
NumberOfComponentServices()
|
||||||
|
ranking(dataclick.value)
|
||||||
}
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
init()
|
init()
|
||||||
|
@ -243,11 +306,11 @@
|
||||||
</script>
|
</script>
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
.component-services {
|
.component-services {
|
||||||
height: 4.65rem;
|
height: 4.63rem;
|
||||||
width: 7.84rem;
|
width: 7.84rem;
|
||||||
position: relative;
|
position: relative;
|
||||||
background: rgba(0, 108, 188, 0.1);
|
background: rgba(0, 108, 188, 0.1);
|
||||||
border: 0.02rem rgba(0, 108, 188, 0.7) solid;
|
border: 0.01rem rgba(0, 108, 188, 0.7) solid;
|
||||||
border-radius: 0.03rem;
|
border-radius: 0.03rem;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
outline: none;
|
outline: none;
|
||||||
|
@ -398,6 +461,11 @@
|
||||||
margin-right: 0.05rem;
|
margin-right: 0.05rem;
|
||||||
border-radius: 0.12rem;
|
border-radius: 0.12rem;
|
||||||
background: #05315b;
|
background: #05315b;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.timeDown {
|
||||||
|
background: #005ea3;
|
||||||
|
border: #00ffff 0.01rem solid;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -415,7 +483,7 @@
|
||||||
padding-top: 0.13rem;
|
padding-top: 0.13rem;
|
||||||
.component-services-content-right-right-bottom-left {
|
.component-services-content-right-right-bottom-left {
|
||||||
width: 1.28rem;
|
width: 1.28rem;
|
||||||
border-right: 0.02rem rgba(0, 108, 188, 0.7) solid;
|
border-right: 0.01rem rgba(0, 108, 188, 0.7) solid;
|
||||||
margin-right: 0.2rem;
|
margin-right: 0.2rem;
|
||||||
.components-can-assign,
|
.components-can-assign,
|
||||||
.components-scores {
|
.components-scores {
|
||||||
|
@ -426,12 +494,32 @@
|
||||||
color: rgba(255, 255, 255, 0.6);
|
color: rgba(255, 255, 255, 0.6);
|
||||||
line-height: 0.88rem;
|
line-height: 0.88rem;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
cursor: pointer;
|
||||||
background: linear-gradient(
|
background: linear-gradient(
|
||||||
to right,
|
to right,
|
||||||
rgba(0, 117, 203, 0.2),
|
rgba(0, 117, 203, 0.2),
|
||||||
rgba(0, 117, 203, 0)
|
rgba(0, 117, 203, 0)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
.components-can-assign:hover,
|
||||||
|
.components-scores:hover {
|
||||||
|
border-left: 0.02rem solid #00ffff;
|
||||||
|
background: linear-gradient(
|
||||||
|
to right,
|
||||||
|
rgba(0, 117, 203, 1),
|
||||||
|
rgba(0, 117, 203, 0)
|
||||||
|
);
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
.down {
|
||||||
|
border-left: 0.02rem solid #00ffff;
|
||||||
|
background: linear-gradient(
|
||||||
|
to right,
|
||||||
|
rgba(0, 117, 203, 1),
|
||||||
|
rgba(0, 117, 203, 0)
|
||||||
|
);
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
.components-can-assign {
|
.components-can-assign {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
|
@ -439,15 +527,15 @@
|
||||||
.component-services-content-right-right-bottom-right {
|
.component-services-content-right-right-bottom-right {
|
||||||
width: 2.5rem;
|
width: 2.5rem;
|
||||||
font-size: 0.16rem;
|
font-size: 0.16rem;
|
||||||
border: 0.02rem rgba(0, 108, 188, 0.7) solid;
|
border: 0.01rem rgba(0, 108, 188, 0.7) solid;
|
||||||
color: rgba(255, 255, 255, 0.8);
|
color: rgba(255, 255, 255, 0.8);
|
||||||
& > div {
|
& > div {
|
||||||
& > span {
|
& > span {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
height: 0.32rem;
|
height: 0.32rem;
|
||||||
line-height: 0.32rem;
|
line-height: 0.32rem;
|
||||||
border-right: 0.02rem rgba(0, 108, 188, 0.7) solid;
|
border-right: 0.01rem rgba(0, 108, 188, 0.7) solid;
|
||||||
border-bottom: 0.02rem rgba(0, 108, 188, 0.7) solid;
|
border-bottom: 0.01rem rgba(0, 108, 188, 0.7) solid;
|
||||||
}
|
}
|
||||||
& > span:first-child {
|
& > span:first-child {
|
||||||
width: 0.47rem;
|
width: 0.47rem;
|
||||||
|
@ -455,6 +543,8 @@
|
||||||
}
|
}
|
||||||
& > span:nth-child(2) {
|
& > span:nth-child(2) {
|
||||||
width: 1.47rem;
|
width: 1.47rem;
|
||||||
|
height: 0.32rem;
|
||||||
|
padding-left: 0.05rem;
|
||||||
}
|
}
|
||||||
& > span:last-child {
|
& > span:last-child {
|
||||||
width: 0.5rem;
|
width: 0.5rem;
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
:show-info="false"
|
:show-info="false"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="percentage" :class="fontFormat(item.title)">
|
<div class="percentage" :style="fontFormat(item.title)">
|
||||||
{{ item.percentage }}%
|
{{ item.percentage }}%
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -66,10 +66,13 @@
|
||||||
function fontFormat(name) {
|
function fontFormat(name) {
|
||||||
switch (name) {
|
switch (name) {
|
||||||
case '视频资源数量':
|
case '视频资源数量':
|
||||||
|
return 'color: #32ff91;'
|
||||||
break
|
break
|
||||||
case '云资源':
|
case '云资源':
|
||||||
|
return 'color: #f4fd25;'
|
||||||
break
|
break
|
||||||
case '感知资源':
|
case '感知资源':
|
||||||
|
return 'color: #ff1d18;'
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -77,10 +80,10 @@
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
.infrastructure {
|
.infrastructure {
|
||||||
width: 4.4rem;
|
width: 4.4rem;
|
||||||
height: 4.65rem;
|
height: 4.63rem;
|
||||||
position: relative;
|
position: relative;
|
||||||
background: rgba(0, 108, 188, 0.1);
|
background: rgba(0, 108, 188, 0.1);
|
||||||
border: 0.02rem rgba(0, 108, 188, 0.7) solid;
|
border: 0.01rem rgba(0, 108, 188, 0.7) solid;
|
||||||
border-radius: 0.03rem;
|
border-radius: 0.03rem;
|
||||||
padding: 0.2rem;
|
padding: 0.2rem;
|
||||||
padding-top: 0;
|
padding-top: 0;
|
||||||
|
|
Loading…
Reference in New Issue