From f30d67b7d473914699209034ae3510c53b071861 Mon Sep 17 00:00:00 2001 From: gaoyuanwei <2826352639@qq.com> Date: Fri, 1 Jul 2022 13:46:49 +0800 Subject: [PATCH 1/2] =?UTF-8?q?bug=20=20=E6=8E=A5=E5=8F=A3=E8=AF=B7?= =?UTF-8?q?=E6=B1=82=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/activiti/demo/putaway-process.vue | 2 +- .../components/ApplyDetails.vue | 2 +- .../personalCenter/components/MyApply.vue | 151 ++++++++++++------ 3 files changed, 104 insertions(+), 51 deletions(-) diff --git a/back/src/views/modules/activiti/demo/putaway-process.vue b/back/src/views/modules/activiti/demo/putaway-process.vue index d5c0086c..eb6d20c7 100644 --- a/back/src/views/modules/activiti/demo/putaway-process.vue +++ b/back/src/views/modules/activiti/demo/putaway-process.vue @@ -131,7 +131,7 @@ diff --git a/front/src/views/personalCenter/components/ApplyDetails.vue b/front/src/views/personalCenter/components/ApplyDetails.vue index b6c624da..f8bf566b 100644 --- a/front/src/views/personalCenter/components/ApplyDetails.vue +++ b/front/src/views/personalCenter/components/ApplyDetails.vue @@ -432,7 +432,7 @@ diff --git a/front/src/views/personalCenter/components/MyApply.vue b/front/src/views/personalCenter/components/MyApply.vue index bc685583..e25c1d25 100644 --- a/front/src/views/personalCenter/components/MyApply.vue +++ b/front/src/views/personalCenter/components/MyApply.vue @@ -48,8 +48,13 @@
- 名称:{{ item.name }} - 名称:{{ item.name }} + + 名称:{{ item.name }} + + 名称:{{ item.name }}
@@ -72,7 +77,18 @@

- 申请结果:{{ '列表地址:' + backUrl + 'resource/getApplyCameraList/' + item.processInstanceId+';'+ '视频流地址:'+backUrl + '/resource/hls/getHls/?channelId='}} + + 申请结果:{{ + '列表地址:' + + backUrl + + 'resource/getApplyCameraList/' + + item.processInstanceId + + ';' + + '视频流地址:' + + backUrl + + '/resource/hls/getHls/?channelId=' + }} + 申请结果:{{ item.comment || '暂无' }} - - - + +

@@ -246,7 +267,12 @@ getTaskHandleDetailInfo, // getProcDefBizRoute, } 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 { message } from 'ant-design-vue' import ApplyDetails from '@/views/personalCenter/components/ApplyDetails' @@ -257,39 +283,56 @@ // let contentListLength = contentList.length let tabIndex = ref(0) const videoVisible = ref(false) - const columns = ref([{ - title: '摄像头名称', - dataIndex: 'name' - }]) - const xVideoList = ref([{ - name: '111' - }, { - name: '222' - },{ - name: '111' - }, { - name: '222' - },{ - name: '111' - }, { - name: '222' - },{ - name: '111' - }, { - name: '222' - },{ - name: '111' - }, { - name: '222' - },{ - name: '111' - }, { - name: '222' - },{ - name: '111' - }, { - name: '222' - },]) + const columns = ref([ + { + title: '摄像头名称', + dataIndex: 'name', + }, + ]) + const xVideoList = ref([ + { + name: '111', + }, + { + name: '222', + }, + { + name: '111', + }, + { + name: '222', + }, + { + name: '111', + }, + { + name: '222', + }, + { + name: '111', + }, + { + name: '222', + }, + { + name: '111', + }, + { + name: '222', + }, + { + name: '111', + }, + { + name: '222', + }, + { + name: '111', + }, + { + name: '222', + }, + ]) function tabqiehuan(item, index) { // debugger tabIndex.value = index @@ -636,13 +679,23 @@ line-height: 16px; font-size: 12px; width: 100%; - text-overflow: -o-ellipsis-lastline; - overflow: hidden; - text-overflow: ellipsis; - display: -webkit-box; - -webkit-line-clamp: 3; - -webkit-box-orient: vertical; + // text-overflow: -o-ellipsis-lastline; + // overflow: hidden; + // text-overflow: ellipsis; + // display: -webkit-box; + // -webkit-line-clamp: 3; + // -webkit-box-orient: vertical; + display: flex; 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 { display: flex; From 96502e05c66731ea0164f57b899098687cb2736a Mon Sep 17 00:00:00 2001 From: "851673013@qq.com" <851673013@qq.com> Date: Fri, 1 Jul 2022 13:47:32 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=83=BD=E5=8A=9B=E4=BA=91=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front/src/api/capabilityCloud.js | 14 ++++++ .../components/ComponentServices.vue | 48 +++++++++++++++++-- 2 files changed, 58 insertions(+), 4 deletions(-) diff --git a/front/src/api/capabilityCloud.js b/front/src/api/capabilityCloud.js index 109ccc44..03fac901 100644 --- a/front/src/api/capabilityCloud.js +++ b/front/src/api/capabilityCloud.js @@ -80,3 +80,17 @@ export function dataResourceInfo(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', + }) +} diff --git a/front/src/views/capabilityCloud/components/ComponentServices.vue b/front/src/views/capabilityCloud/components/ComponentServices.vue index 32fdaf2e..4003bd3b 100644 --- a/front/src/views/capabilityCloud/components/ComponentServices.vue +++ b/front/src/views/capabilityCloud/components/ComponentServices.vue @@ -117,6 +117,8 @@ import { assemblerBaseStatic, componentServiceRank, + callTheTrendPort, + totalCallsSnum, } from '@/api/capabilityCloud' import * as moment from 'moment' let snum = ref([ @@ -145,20 +147,50 @@ .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) + 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 { 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) + 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图 @@ -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 = () => { timeSwitch(timeSwitchindex.value) NumberOfComponentServices() ranking(dataclick.value) + TotalCallsAPI() } onMounted(() => { init()