更改云图接口

This commit is contained in:
a0049873 2022-06-24 10:50:59 +08:00
parent 5ac149fc62
commit 4f36fdbc0c
1 changed files with 25 additions and 25 deletions

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-19 10:15:33 * @Date: 2022-06-19 10:15:33
* @LastEditors: hisense.wuhongjian * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-22 16:53:08 * @LastEditTime: 2022-06-24 10:46:23
* @Description: 告诉大家这是什么 * @Description: 告诉大家这是什么
--> -->
<template> <template>
@ -36,7 +36,7 @@
</template> </template>
<script setup> <script setup>
import { ref } from 'vue' import { ref } from 'vue'
import { count } from '@/api/file' // import { count } from '@/api/file'
import { dataResourceInfo } from '@/api/capabilityCloud' import { dataResourceInfo } from '@/api/capabilityCloud'
// import { abc } from './dataABC.json' // import { abc } from './dataABC.json'
// //
@ -116,26 +116,26 @@
} }
// //
// //
const contentData = ref([]) // const contentData = ref([])
count().then((res) => { // count().then((res) => {
contentData.value = res.data.data // contentData.value = res.data.data
console.log(contentData.value) // console.log(contentData.value)
// // //
resourcesLeft.value[1].num = contentData.value.requestCount || '0' // resourcesLeft.value[1].num = contentData.value.requestCount || '0'
// // //
resourcesLeft.value[2].num = // resourcesLeft.value[2].num =
contentData.value.satisfactionRate * 100 + '%' || '0' + '%' // contentData.value.satisfactionRate * 100 + '%' || '0' + '%'
// // //
for (let i = 1; i < 6; i++) { // for (let i = 1; i < 6; i++) {
// TOP // // TOP
assignRankings.value[i - 1].index = i // assignRankings.value[i - 1].index = i
// // //
assignRankings.value[i - 1].name = // assignRankings.value[i - 1].name =
contentData.value.resourceTop5[i - 1].service_name || '' // contentData.value.resourceTop5[i - 1].service_name || ''
assignRankings.value[i - 1].operation = // assignRankings.value[i - 1].operation =
contentData.value.resourceTop5[i - 1].count || ' ' // contentData.value.resourceTop5[i - 1].count || ' '
} // }
}) // })
// //
dataResourceInfo().then((res) => { dataResourceInfo().then((res) => {
// console.log('===================>', res.data.data) // console.log('===================>', res.data.data)
@ -152,8 +152,8 @@
val.operation = '' val.operation = ''
}) })
arr.resourceTop5.forEach((val, index) => { arr.resourceTop5.forEach((val, index) => {
assignRankings.value[index].name = val['服务名称'] assignRankings.value[index].name = val.zyname || val.serviceName || 0
assignRankings.value[index].operation = val['申请次数'] assignRankings.value[index].operation = val.syqk || val.requestCount || 0
}) })
} }
}) })