From 67834fdd38425e8b9466a8aea23f5d33abaa17b7 Mon Sep 17 00:00:00 2001 From: zhangjun1 Date: Mon, 17 Aug 2020 15:11:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=81=E7=A8=8B=E7=9B=91=E6=8E=A7=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/e-charts/multiple_circle.vue | 2 +- .../process-management/monitoring/index.vue | 332 ++++++++++-------- 2 files changed, 185 insertions(+), 149 deletions(-) diff --git a/src/components/e-charts/multiple_circle.vue b/src/components/e-charts/multiple_circle.vue index 9cc2f45..59a8c68 100644 --- a/src/components/e-charts/multiple_circle.vue +++ b/src/components/e-charts/multiple_circle.vue @@ -88,7 +88,7 @@ export default { }; var data = []; var total = 0; - var color = ["#274fee", "#f5ab4c", "#e15260", "#a9aec0", "#e56600"]; + var color = this.color?this.color:["#274fee", "#f5ab4c", "#e15260", "#a9aec0", "#e56600"]; var color2 = ["#ef9433", "#515fe7"]; var legendarr = []; var temp2_data = 0; diff --git a/src/pages/workbench/component-center/process-management/monitoring/index.vue b/src/pages/workbench/component-center/process-management/monitoring/index.vue index 6172c23..e29d6b2 100644 --- a/src/pages/workbench/component-center/process-management/monitoring/index.vue +++ b/src/pages/workbench/component-center/process-management/monitoring/index.vue @@ -10,8 +10,8 @@
-

流程总数 35

-

流程实例总数 2,380

+

流程总数 {{all_count}}

+

流程实例总数 {{all_ex_count}}

@@ -25,7 +25,7 @@ @changeButton="changeServiceCellBtn" class="block" > - + @@ -39,6 +39,7 @@ class="block" > { + if(response.data.success){ + let data = response.data.data + this.das_data= { + num: data.total_timeout_rate*100, + color: "#e56600", + text: "总超时率" + } + this.all_count = data.wf_total + this.all_ex_count = data.wf_instance_total + } + }) + }, + process_use_time(){ + this.$http + .get(`/apaas/serviceapp/v3/workflows/monitoring/elapsedTimeStat`) + .then(response => { + if(response.data.success){ + let data = response.data.data + this.tableRank = [] + data.forEach((e,idx) => { + this.tableRank.push({ + index:idx+1, + id:e.workflows_id, + name:e.wf_name, + time:e.elapsed_time, + val:parseInt(e.timeout_rate*100) + }) + }); + } + }) + }, + process_timeout(){ + this.$http + .get(`/apaas/serviceapp/v3/workflows/monitoring/timeoutStat`) + .then(response => { + if(response.data.success){ + let data = response.data.data + var tempx = [] + var tempy = [] + data.forEach(e => { + tempx.push(e.wf_name) + tempy.push(parseInt(e.timeout_rate*100)) + }); + this.bar_data_org = { + legendData: tempx, + seriesData: tempy + } + } + }) + }, + process_num_trend(){ + this.$http + .get(`/apaas/serviceapp/v3/workflows/monitoring/instanceStat`) + .then(response => { + if(response.data.success){ + let data = response.data.data + this.trend_data = data + this.deal_trend_data(this.trend_data.day) + } + }) + }, + now_process_num(){ + this.$http + .get(`/apaas/serviceapp/v3/workflows/monitoring/instanceRunningStat`) + .then(response => { + if(response.data.success){ + let data = response.data.data + var tempx = [] + var tempy = [] + data.forEach(e => { + tempx.push(e.wf_name) + tempy.push(e.wf_instances) + }); + this.bar_data_area={ + legendData: tempx, + seriesData: tempy + } + } + }) + }, + now_process_avg(){ + this.$http + .get(`/apaas/serviceapp/v3/workflows/monitoring/elapsedTimeAnalyse`) + .then(response => { + if(response.data.success){ + let data = response.data.data + this.mult_data = [] + for (const key in data) { + this.mult_data.push({ + name:key, + value:data[key], + }) + } + } + }) + }, + process_use(){ + this.$http + .get(`/apaas/serviceapp/v3/workflows/monitoring/useRateStat`) + .then(response => { + if(response.data.success){ + let data = response.data.data + this.use_data = data + this.deal_use_data(data.useMost) + } + }) + }, + deal_use_data(data){ + var temp = [] + this.toplistData = [] + data.forEach(e => { + temp.push(e.total_instances) + this.toplistData.push({ + service_name:e.wf_name, + request_count: e.total_instances, + cover:1, + service_id:{ + id:e.workflows_id, + source:1 + }, + data_service_type1:124 + }) + }); + this.toplistTargetValue = Math.max(...temp) + }, + deal_trend_data(data){ + var tempx=[] + var tempy=[] + data.forEach(e => { + tempx.push(e.date) + tempy.push(e.wf_instances) + }); + this.line_data = { + xAxisData: tempx, + seriesData: [ + { + name: "趋势", + data: tempy + } + ], + } }, } } -- 2.26.0