Merge branch 'hi-ucs-dev' of http://124.222.94.39:3001/wuhongjian/hi-ucs into hi-ucs-dev

This commit is contained in:
guoyue 2022-07-01 14:03:42 +08:00
commit 2b01c0efa4
5 changed files with 162 additions and 55 deletions

View File

@ -131,7 +131,7 @@
</el-form-item> </el-form-item>
<el-form-item label="接口请求方式" v-if="coverageNotShow"> <el-form-item label="接口请求方式" v-if="coverageNotShow">
<el-input <el-input
v-model="dataForm.applyCount" v-model="dataForm.apiMethodType"
:disabled="fieldDisabled" :disabled="fieldDisabled"
placeholder="接口请求方式" placeholder="接口请求方式"
></el-input> ></el-input>

View File

@ -80,3 +80,17 @@ export function dataResourceInfo(params) {
params, params,
}) })
} }
//-
export function callTheTrendPort(start, end, params) {
return request({
url: '/metrics/api/v1/query_range?query=sum(increase(apigateway_http_status%5B1d%5D))&start=' + start + '&end=' + end + '&step=' + params,
method: 'get',
})
}
//-
export function totalCallsSnum(params) {
return request({
url: '/metrics/api/v1/query?query=sum(apigateway_http_status)&time=1655793262.495' + params,
method: 'get',
})
}

View File

@ -117,6 +117,8 @@
import { import {
assemblerBaseStatic, assemblerBaseStatic,
componentServiceRank, componentServiceRank,
callTheTrendPort,
totalCallsSnum,
} from '@/api/capabilityCloud' } from '@/api/capabilityCloud'
import * as moment from 'moment' import * as moment from 'moment'
let snum = ref([ let snum = ref([
@ -145,20 +147,50 @@
.subtract('days', 6 - i) .subtract('days', 6 - i)
.format('MM-DD') .format('MM-DD')
callTheTrendData.value.time.push(time) callTheTrendData.value.time.push(time)
callTheTrendData.value.snum.push('0')
console.log('time', callTheTrendData.value, name) console.log('time', callTheTrendData.value, name)
} }
callTheTrend(callTheTrendData.value) const start = parseInt(
(Date.parse(new Date()) - 168 * 60 * 60 * 1000) / 1000
)
const end = Date.parse(new Date()) / 1000
callTheTrendPort(start, end, 86400).then((res) => {
if (res.data.data.result) {
res.data.data.result[0].values.splice(0, 1)
res.data.data.result[0].values.map((item) => {
callTheTrendData.value.snum.push(parseInt(item[1]))
})
callTheTrend(callTheTrendData.value)
} else {
callTheTrendData.value.snum = ['0', '0', '0', '0', '0', '0', '0']
callTheTrend(callTheTrendData.value)
}
})
} else { } else {
for (let i = 0; i < 31; i++) { for (let i = 0; i < 31; i++) {
let time = moment() let time = moment()
.subtract('days', 30 - i) .subtract('days', 30 - i)
.format('MM-DD') .format('MM-DD')
callTheTrendData.value.time.push(time) callTheTrendData.value.time.push(time)
callTheTrendData.value.snum.push('0')
console.log('time', callTheTrendData.value, name) console.log('time', callTheTrendData.value, name)
} }
callTheTrend(callTheTrendData.value) const start = parseInt(
(Date.parse(new Date()) - 720 * 60 * 60 * 1000) / 1000
)
const end = Date.parse(new Date()) / 1000
callTheTrendPort(start, end, 86400).then((res) => {
if (res.data.data.result) {
// res.data.data.result.splice(0, 1)
res.data.data.result[0].values.map((item) => {
callTheTrendData.value.snum.push(parseInt(item[1]))
})
callTheTrend(callTheTrendData.value)
} else {
for (let i = 0; i < 30; i++) {
callTheTrendData.value.snum.push('0')
}
callTheTrend(callTheTrendData.value)
}
})
} }
} }
//echarts //echarts
@ -316,10 +348,18 @@
}) })
}) })
} }
//
const TotalCallsAPI = () => {
const end = Date.parse(new Date()) / 1000
totalCallsSnum(end).then((res) => {
snum.value[1].num = res.data.data.result[0].value[1]
})
}
const init = () => { const init = () => {
timeSwitch(timeSwitchindex.value) timeSwitch(timeSwitchindex.value)
NumberOfComponentServices() NumberOfComponentServices()
ranking(dataclick.value) ranking(dataclick.value)
TotalCallsAPI()
} }
onMounted(() => { onMounted(() => {
init() init()

View File

@ -432,7 +432,7 @@
</a-form-item> </a-form-item>
<a-form-item label="接口请求方式"> <a-form-item label="接口请求方式">
<a-input <a-input
v-model:value="dataForm.data.applyCount" v-model:value="dataForm.data.apiMethodType"
disabled="true" disabled="true"
placeholder="接口请求方式" placeholder="接口请求方式"
></a-input> ></a-input>

View File

@ -48,8 +48,13 @@
<a-tooltip> <a-tooltip>
<template #title>{{ item.name }}</template> <template #title>{{ item.name }}</template>
<div class="content-body-title"> <div class="content-body-title">
<span v-if="item.name ==='申请摄像头列表'" @click="showVideoList(item)"> 名称{{ item.name }} </span> <span
<span v-else> 名称{{ item.name }} </span> v-if="item.name === '申请摄像头列表'"
@click="showVideoList(item)"
>
名称{{ item.name }}
</span>
<span v-else>名称{{ item.name }}</span>
<div></div> <div></div>
</div> </div>
</a-tooltip> </a-tooltip>
@ -72,7 +77,18 @@
</div> </div>
<div v-else> <div v-else>
<p class="content-body-content-son"> <p class="content-body-content-son">
<span v-if="item.name ==='申请摄像头列表'">申请结果{{ '列表地址' + backUrl + 'resource/getApplyCameraList/' + item.processInstanceId+';'+ '视频流地址'+backUrl + '/resource/hls/getHls/?channelId='}}</span> <span v-if="item.name === '申请摄像头列表'">
申请结果{{
'列表地址:' +
backUrl +
'resource/getApplyCameraList/' +
item.processInstanceId +
';' +
'视频流地址:' +
backUrl +
'/resource/hls/getHls/?channelId='
}}
</span>
<span v-else>申请结果{{ item.comment || '暂无' }}</span> <span v-else>申请结果{{ item.comment || '暂无' }}</span>
<a-button <a-button
type="primary" type="primary"
@ -225,15 +241,20 @@
<a-modal <a-modal
v-model:visible="videoVisible" v-model:visible="videoVisible"
title="已申请摄像头列表" title="已申请摄像头列表"
@ok="videoVisible=false" @ok="videoVisible = false"
> >
<a-table :columns="columns" :data-source="xVideoList" bordered :pagination="{defaultPageSize: 6}"> <a-table
<template #bodyCell="{ column, text }"> :columns="columns"
<!-- <template> :data-source="xVideoList"
bordered
:pagination="{ defaultPageSize: 6 }"
>
<template #bodyCell="{ column, text }">
<!-- <template>
<a>{{ text }}</a> <a>{{ text }}</a>
</template> --> </template> -->
</template> </template>
</a-table> </a-table>
</a-modal> </a-modal>
</div> </div>
</template> </template>
@ -246,7 +267,12 @@
getTaskHandleDetailInfo, getTaskHandleDetailInfo,
// getProcDefBizRoute, // getProcDefBizRoute,
} from '@/api/personalCenter' } from '@/api/personalCenter'
import { updateRes, relaunch, selectOne,getApplyCameraList } from '@/api/home' import {
updateRes,
relaunch,
selectOne,
getApplyCameraList,
} from '@/api/home'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import { message } from 'ant-design-vue' import { message } from 'ant-design-vue'
import ApplyDetails from '@/views/personalCenter/components/ApplyDetails' import ApplyDetails from '@/views/personalCenter/components/ApplyDetails'
@ -257,39 +283,56 @@
// let contentListLength = contentList.length // let contentListLength = contentList.length
let tabIndex = ref(0) let tabIndex = ref(0)
const videoVisible = ref(false) const videoVisible = ref(false)
const columns = ref([{ const columns = ref([
title: '摄像头名称', {
dataIndex: 'name' title: '摄像头名称',
}]) dataIndex: 'name',
const xVideoList = ref([{ },
name: '111' ])
}, { const xVideoList = ref([
name: '222' {
},{ name: '111',
name: '111' },
}, { {
name: '222' name: '222',
},{ },
name: '111' {
}, { name: '111',
name: '222' },
},{ {
name: '111' name: '222',
}, { },
name: '222' {
},{ name: '111',
name: '111' },
}, { {
name: '222' name: '222',
},{ },
name: '111' {
}, { name: '111',
name: '222' },
},{ {
name: '111' name: '222',
}, { },
name: '222' {
},]) name: '111',
},
{
name: '222',
},
{
name: '111',
},
{
name: '222',
},
{
name: '111',
},
{
name: '222',
},
])
function tabqiehuan(item, index) { function tabqiehuan(item, index) {
// debugger // debugger
tabIndex.value = index tabIndex.value = index
@ -636,13 +679,23 @@
line-height: 16px; line-height: 16px;
font-size: 12px; font-size: 12px;
width: 100%; width: 100%;
text-overflow: -o-ellipsis-lastline; // text-overflow: -o-ellipsis-lastline;
overflow: hidden; // overflow: hidden;
text-overflow: ellipsis; // text-overflow: ellipsis;
display: -webkit-box; // display: -webkit-box;
-webkit-line-clamp: 3; // -webkit-line-clamp: 3;
-webkit-box-orient: vertical; // -webkit-box-orient: vertical;
display: flex;
color: #999999; color: #999999;
span {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
max-width: 8.1rem;
line-height: 24px;
}
} }
.content-body-bottom { .content-body-bottom {
display: flex; display: flex;