能力统计调试

This commit is contained in:
gaoxiaolong 2022-07-04 17:07:07 +08:00
parent c35d5789fc
commit 854eaef183
4 changed files with 43 additions and 31 deletions

View File

@ -48,7 +48,7 @@
</div> </div>
<div class='container-body8'> <div class='container-body8'>
<span style='font-size:18px;color;#000000;'>应用领域分布情况</span> <span style='font-size:18px;color;#000000;'>应用领域分布情况</span>
<div id="main8" style="width: 300px;height:200px;"></div> <div id="main8" style="width: 300px;height:200px;margin-left:-20px;"></div>
</div> </div>
<div class='container-body9'> <div class='container-body9'>
<span style='font-size:18px;color;#000000;'>应用状态分布情况</span> <span style='font-size:18px;color;#000000;'>应用状态分布情况</span>
@ -114,8 +114,9 @@ export default {
getDistributedList () { getDistributedList () {
this.$http.get('/census/center/v3/assemblerUseProjectInfo/' ,{ this.$http.get('/census/center/v3/assemblerUseProjectInfo/' ,{
params : { params : {
keyId:'1522550195034857476' id:
// this.tableId // '1522550195034857476'
this.tableId
} }
}).then(res => { }).then(res => {
let arry=[] let arry=[]
@ -147,8 +148,8 @@ export default {
arry=res.data.data arry=res.data.data
arry.forEach((item)=>{ arry.forEach((item)=>{
const single={ const single={
value:item.useNum, value:item.appNum,
name:item.name name:item.attr_value
} }
this.data3.push(single.name) this.data3.push(single.name)
this.data4.push(single.value) this.data4.push(single.value)
@ -377,7 +378,7 @@ export default {
var total = 0; var total = 0;
var tarValue; var tarValue;
for (var i = 0; i < data.length; i++) { for (var i = 0; i < data.length; i++) {
total += data[i].value; total += Number(data[i].value);
if (data[i].name == name) { if (data[i].name == name) {
tarValue = data[i].value; tarValue = data[i].value;
} }
@ -599,7 +600,7 @@ export default {
}, },
series: [ series: [
{ {
data: [5, 5, 5, 5, 5, 5], data: [1, 1, 1, 1, 1, 1],
type: 'bar', type: 'bar',
barWidth: 14, barWidth: 14,
stack: '1', stack: '1',
@ -654,7 +655,7 @@ export default {
var total = 0; var total = 0;
var tarValue; var tarValue;
for (var i = 0; i < data.length; i++) { for (var i = 0; i < data.length; i++) {
total += data[i].value; total += Number(data[i].value);
if (data[i].name == name) { if (data[i].name == name) {
tarValue = data[i].value; tarValue = data[i].value;
} }
@ -725,7 +726,7 @@ export default {
var total = 0; var total = 0;
var tarValue; var tarValue;
for (var i = 0; i < data.length; i++) { for (var i = 0; i < data.length; i++) {
total += data[i].value; total += Number(data[i].value);
if (data[i].name == name) { if (data[i].name == name) {
tarValue = data[i].value; tarValue = data[i].value;
} }
@ -804,7 +805,7 @@ export default {
var total = 0; var total = 0;
var tarValue; var tarValue;
for (var i = 0; i < data.length; i++) { for (var i = 0; i < data.length; i++) {
total += data[i].value; total += Number(data[i].value);
if (data[i].name == name) { if (data[i].name == name) {
tarValue = data[i].value; tarValue = data[i].value;
} }
@ -822,9 +823,9 @@ export default {
a: { a: {
// //
width: 80, width: 80,
color: "#000000", color: "#666666",
fontSize: 12, fontSize: 12,
fontWeight: "bolder", // fontWeight: "bolder",
}, },
b: { b: {
// 102030 // 102030
@ -899,7 +900,7 @@ export default {
var total = 0; var total = 0;
var tarValue; var tarValue;
for (var i = 0; i < data.length; i++) { for (var i = 0; i < data.length; i++) {
total += data[i].value; total += Number(data[i].value);
if (data[i].name == name) { if (data[i].name == name) {
tarValue = data[i].value; tarValue = data[i].value;
} }

View File

@ -200,7 +200,7 @@ export default {
this.$http.get('/census/center/v3/assemblerCaredTopInfo' ,{ this.$http.get('/census/center/v3/assemblerCaredTopInfo' ,{
params : { params : {
id:this.tableId, id:this.tableId,
resourceType:"应用资源" resourceType:"组件服务"
// pageNo: pageNo || 1, // pageNo: pageNo || 1,
// pageSize: 20 // pageSize: 20
} }
@ -231,7 +231,7 @@ export default {
var total = 0; var total = 0;
var tarValue; var tarValue;
for (var i = 0; i < data.length; i++) { for (var i = 0; i < data.length; i++) {
total += data[i].value; total += Number(data[i].value);
if (data[i].name == name) { if (data[i].name == name) {
tarValue = data[i].value; tarValue = data[i].value;
} }
@ -295,7 +295,7 @@ export default {
var total = 0; var total = 0;
var tarValue; var tarValue;
for (var i = 0; i < data.length; i++) { for (var i = 0; i < data.length; i++) {
total += data[i].value; total += Number(data[i].value);
if (data[i].name == name) { if (data[i].name == name) {
tarValue = data[i].value; tarValue = data[i].value;
} }
@ -361,7 +361,7 @@ export default {
var total = 0; var total = 0;
var tarValue; var tarValue;
for (var i = 0; i < data.length; i++) { for (var i = 0; i < data.length; i++) {
total += data[i].value; total += Number(data[i].value);
if (data[i].name == name) { if (data[i].name == name) {
tarValue = data[i].value; tarValue = data[i].value;
} }
@ -377,9 +377,9 @@ export default {
a: { a: {
// //
width: 100, width: 100,
color: "#000000", color: "#666666",
fontSize: 12, fontSize: 12,
fontWeight: "bolder", // fontWeight: "bolder",
}, },
b: { b: {
// 102030 // 102030

View File

@ -17,7 +17,7 @@
</div> </div>
<div class='container-body3'> <div class='container-body3'>
<span style='font-size:18px;color;#000000;'>使用组件应用领域分布情况</span> <span style='font-size:18px;color;#000000;'>使用组件应用领域分布情况</span>
<div id="main8" style="width: 400px;height:200px;"></div> <div id="main3" style="width: 400px;height:200px;"></div>
</div> </div>
<div class='container-body4'> <div class='container-body4'>
<div style='margin-bottom:30px'> <div style='margin-bottom:30px'>
@ -36,7 +36,7 @@
</div> </div>
<div class='container-body5'> <div class='container-body5'>
<div style='margin-bottom:30px'> <div style='margin-bottom:30px'>
<span style='font-size:18px;color;#000000;'>使用组件评分Top5</span> <span style='font-size:18px;color;#000000;'>使用组件评分</span>
<img src="@/assets/img/TOP5.png" style='margin-left:10px'> <img src="@/assets/img/TOP5.png" style='margin-left:10px'>
</div> </div>
<div v-for="(item,index) in applicationList" :key='index' > <div v-for="(item,index) in applicationList" :key='index' >
@ -174,9 +174,7 @@ export default {
value:item.total, value:item.total,
name:item.type name:item.type
} }
const newList=[]
this.data3.push(single) this.data3.push(single)
// this.data2=newList
this.myEcharts3() this.myEcharts3()
}) })
}) })
@ -231,7 +229,7 @@ export default {
var total = 0; var total = 0;
var tarValue; var tarValue;
for (var i = 0; i < data.length; i++) { for (var i = 0; i < data.length; i++) {
total += data[i].value; total += Number(data[i].value);
if (data[i].name == name) { if (data[i].name == name) {
tarValue = data[i].value; tarValue = data[i].value;
} }
@ -295,7 +293,7 @@ export default {
var total = 0; var total = 0;
var tarValue; var tarValue;
for (var i = 0; i < data.length; i++) { for (var i = 0; i < data.length; i++) {
total += data[i].value; total += Number(data[i].value);
if (data[i].name == name) { if (data[i].name == name) {
tarValue = data[i].value; tarValue = data[i].value;
} }
@ -361,13 +359,14 @@ export default {
var total = 0; var total = 0;
var tarValue; var tarValue;
for (var i = 0; i < data.length; i++) { for (var i = 0; i < data.length; i++) {
total += data[i].value; total += Number(data[i].value);
if (data[i].name == name) { if (data[i].name == name) {
tarValue = data[i].value; tarValue = data[i].value;
} }
} }
var v = tarValue; // var v = tarValue;
var p = Math.round(((tarValue / total) * 100)); var p = Math.round(((tarValue / total) * 100));
console.log('@@@@', tarValue, total)
return `{a|${name}} {b|${p}%}`; return `{a|${name}} {b|${p}%}`;
}, },
itemStyle:{}, itemStyle:{},
@ -428,7 +427,7 @@ export default {
option && myChart.setOption(option); option && myChart.setOption(option);
}, },
backBtn(){ backBtn(){
this.$emit('closeChild') this.$emit('closeChild2')
} }
} }
} }
@ -541,9 +540,13 @@ export default {
position:absolute; position:absolute;
display: flex; display: flex;
margin-left:90px; margin-left:90px;
width:200px;
margin-top:5px; margin-top:5px;
color:#333333; color:#333333;
font-size: 16px; font-size: 16px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
} }
.count-style{ .count-style{
position:absolute; position:absolute;

View File

@ -96,7 +96,7 @@
min-width="100%"> min-width="100%">
</el-table-column> </el-table-column>
<el-table-column v-if="this.departmentId===2" <el-table-column v-if="this.departmentId===2"
prop="resourceCarNum" prop="resourceCallNum"
label="申请总数" label="申请总数"
min-width="100%"> min-width="100%">
</el-table-column> </el-table-column>
@ -121,7 +121,7 @@
</div> </div>
</el-card> </el-card>
</div> </div>
<component-used v-if='UsedIsShow' :tableId='tableId' :fatherId='fatherId' @closeChild='closeChild'></component-used> <component-used v-if='UsedIsShow' :tableId='tableId' :fatherId='fatherId' @closeChild2='closeChild2'></component-used>
<component-services v-if='servicesIsShow' :tableId='tableId' :fatherId='fatherId' @closeChild='closeChild'></component-services> <component-services v-if='servicesIsShow' :tableId='tableId' :fatherId='fatherId' @closeChild='closeChild'></component-services>
<application-resources v-if='resourcesIsShow' :tableId='tableId' :fatherId='fatherId' @closeApplication='closeApplication'></application-resources> <application-resources v-if='resourcesIsShow' :tableId='tableId' :fatherId='fatherId' @closeApplication='closeApplication'></application-resources>
</div> </div>
@ -362,10 +362,18 @@ export default {
closeChild(){ closeChild(){
this.homeIsShow=true this.homeIsShow=true
this.servicesIsShow=false this.servicesIsShow=false
this. handleCurrentChange(1)
},
closeChild2(){
this.homeIsShow=true
this.UsedIsShow=false
this. handleCurrentChange(1)
}, },
closeApplication(){ closeApplication(){
this.homeIsShow=true this.homeIsShow=true
this.resourcesIsShow=false this.resourcesIsShow=false
this. handleCurrentChange(1)
} }
}, },