From 854eaef183c514127d030c37c16033f9aaaac450 Mon Sep 17 00:00:00 2001 From: gaoxiaolong <327091900@qq.com> Date: Mon, 4 Jul 2022 17:07:07 +0800 Subject: [PATCH] =?UTF-8?q?=E8=83=BD=E5=8A=9B=E7=BB=9F=E8=AE=A1=E8=B0=83?= =?UTF-8?q?=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../applicationResources.vue | 27 ++++++++++--------- .../abilityStatistics/componentServices.vue | 12 ++++----- .../abilityStatistics/componentUsed.vue | 23 +++++++++------- .../views/modules/abilityStatistics/index.vue | 12 +++++++-- 4 files changed, 43 insertions(+), 31 deletions(-) diff --git a/back/src/views/modules/abilityStatistics/applicationResources.vue b/back/src/views/modules/abilityStatistics/applicationResources.vue index aea5855f..cc2acede 100644 --- a/back/src/views/modules/abilityStatistics/applicationResources.vue +++ b/back/src/views/modules/abilityStatistics/applicationResources.vue @@ -48,7 +48,7 @@
应用领域分布情况 -
+
应用状态分布情况 @@ -114,8 +114,9 @@ export default { getDistributedList () { this.$http.get('/census/center/v3/assemblerUseProjectInfo/' ,{ params : { - keyId:'1522550195034857476' - // this.tableId + id: + // '1522550195034857476' + this.tableId } }).then(res => { let arry=[] @@ -147,8 +148,8 @@ export default { arry=res.data.data arry.forEach((item)=>{ const single={ - value:item.useNum, - name:item.name + value:item.appNum, + name:item.attr_value } this.data3.push(single.name) this.data4.push(single.value) @@ -377,7 +378,7 @@ export default { var total = 0; var tarValue; for (var i = 0; i < data.length; i++) { - total += data[i].value; + total += Number(data[i].value); if (data[i].name == name) { tarValue = data[i].value; } @@ -599,7 +600,7 @@ export default { }, series: [ { - data: [5, 5, 5, 5, 5, 5], + data: [1, 1, 1, 1, 1, 1], type: 'bar', barWidth: 14, stack: '1', @@ -654,7 +655,7 @@ export default { var total = 0; var tarValue; for (var i = 0; i < data.length; i++) { - total += data[i].value; + total += Number(data[i].value); if (data[i].name == name) { tarValue = data[i].value; } @@ -725,7 +726,7 @@ export default { var total = 0; var tarValue; for (var i = 0; i < data.length; i++) { - total += data[i].value; + total += Number(data[i].value); if (data[i].name == name) { tarValue = data[i].value; } @@ -804,7 +805,7 @@ export default { var total = 0; var tarValue; for (var i = 0; i < data.length; i++) { - total += data[i].value; + total += Number(data[i].value); if (data[i].name == name) { tarValue = data[i].value; } @@ -822,9 +823,9 @@ export default { a: { // 设置文字、数学、英语这一列的样式 width: 80, - color: "#000000", + color: "#666666", fontSize: 12, - fontWeight: "bolder", + // fontWeight: "bolder", }, b: { // 设置10分、20分、30分这一列的样式 @@ -899,7 +900,7 @@ export default { var total = 0; var tarValue; for (var i = 0; i < data.length; i++) { - total += data[i].value; + total += Number(data[i].value); if (data[i].name == name) { tarValue = data[i].value; } diff --git a/back/src/views/modules/abilityStatistics/componentServices.vue b/back/src/views/modules/abilityStatistics/componentServices.vue index 01c866bb..e39f577c 100644 --- a/back/src/views/modules/abilityStatistics/componentServices.vue +++ b/back/src/views/modules/abilityStatistics/componentServices.vue @@ -200,7 +200,7 @@ export default { this.$http.get('/census/center/v3/assemblerCaredTopInfo' ,{ params : { id:this.tableId, - resourceType:"应用资源" + resourceType:"组件服务" // pageNo: pageNo || 1, // pageSize: 20 } @@ -231,7 +231,7 @@ export default { var total = 0; var tarValue; for (var i = 0; i < data.length; i++) { - total += data[i].value; + total += Number(data[i].value); if (data[i].name == name) { tarValue = data[i].value; } @@ -295,7 +295,7 @@ export default { var total = 0; var tarValue; for (var i = 0; i < data.length; i++) { - total += data[i].value; + total += Number(data[i].value); if (data[i].name == name) { tarValue = data[i].value; } @@ -361,7 +361,7 @@ export default { var total = 0; var tarValue; for (var i = 0; i < data.length; i++) { - total += data[i].value; + total += Number(data[i].value); if (data[i].name == name) { tarValue = data[i].value; } @@ -377,9 +377,9 @@ export default { a: { // 设置文字、数学、英语这一列的样式 width: 100, - color: "#000000", + color: "#666666", fontSize: 12, - fontWeight: "bolder", + // fontWeight: "bolder", }, b: { // 设置10分、20分、30分这一列的样式 diff --git a/back/src/views/modules/abilityStatistics/componentUsed.vue b/back/src/views/modules/abilityStatistics/componentUsed.vue index 4beff5d9..de68a125 100644 --- a/back/src/views/modules/abilityStatistics/componentUsed.vue +++ b/back/src/views/modules/abilityStatistics/componentUsed.vue @@ -17,7 +17,7 @@
使用组件应用领域分布情况 -
+
@@ -36,7 +36,7 @@
- 使用组件评分Top5 + 使用组件评分
@@ -174,9 +174,7 @@ export default { value:item.total, name:item.type } - const newList=[] this.data3.push(single) - // this.data2=newList this.myEcharts3() }) }) @@ -231,7 +229,7 @@ export default { var total = 0; var tarValue; for (var i = 0; i < data.length; i++) { - total += data[i].value; + total += Number(data[i].value); if (data[i].name == name) { tarValue = data[i].value; } @@ -295,7 +293,7 @@ export default { var total = 0; var tarValue; for (var i = 0; i < data.length; i++) { - total += data[i].value; + total += Number(data[i].value); if (data[i].name == name) { tarValue = data[i].value; } @@ -361,13 +359,14 @@ export default { var total = 0; var tarValue; for (var i = 0; i < data.length; i++) { - total += data[i].value; + total += Number(data[i].value); if (data[i].name == name) { tarValue = data[i].value; } } - var v = tarValue; + // var v = tarValue; var p = Math.round(((tarValue / total) * 100)); + console.log('@@@@', tarValue, total) return `{a|${name}} {b|${p}%}`; }, itemStyle:{}, @@ -428,7 +427,7 @@ export default { option && myChart.setOption(option); }, backBtn(){ - this.$emit('closeChild') + this.$emit('closeChild2') } } } @@ -541,9 +540,13 @@ export default { position:absolute; display: flex; margin-left:90px; + width:200px; margin-top:5px; color:#333333; - font-size: 16px; + font-size: 16px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; } .count-style{ position:absolute; diff --git a/back/src/views/modules/abilityStatistics/index.vue b/back/src/views/modules/abilityStatistics/index.vue index df327370..2ff30249 100644 --- a/back/src/views/modules/abilityStatistics/index.vue +++ b/back/src/views/modules/abilityStatistics/index.vue @@ -96,7 +96,7 @@ min-width="100%"> @@ -121,7 +121,7 @@
- +
@@ -362,10 +362,18 @@ export default { closeChild(){ this.homeIsShow=true this.servicesIsShow=false + this. handleCurrentChange(1) + + }, + closeChild2(){ + this.homeIsShow=true + this.UsedIsShow=false + this. handleCurrentChange(1) }, closeApplication(){ this.homeIsShow=true this.resourcesIsShow=false + this. handleCurrentChange(1) } },