diff --git a/src/pages/workbench/workPlace.vue b/src/pages/workbench/workPlace.vue
index 6f5a0920a23df9a2527ce22387abb3f57c2098dd..3079014324e5cfecced4879511606194756320b9 100644
--- a/src/pages/workbench/workPlace.vue
+++ b/src/pages/workbench/workPlace.vue
@@ -134,7 +134,7 @@
服务应用总况
-
+
{
console.log(response);
let data = response.data.data;
- this.init_fwyy(data.appusedata.xarr, data.appusedata.yarr);
+ this.service_app_count = data
+ this.init_fwyy(this.service_app_count.serviceData.xAxisData, this.service_app_count.serviceData.seriesData,this.fw_value);
})
.catch(function(response) {});
},
getfwlxdata() {
this.$http
- .get("./static/workpalce.json")
+ .get("/apaas/service/v3/workplace/statistics/service/type")
.then((response) => {
console.log(response);
let data = response.data.data;
- this.init_fwlx_asy(data.fwlxdata);
+ this.init_fwlx_asy(data.seriesData);
})
.catch(function(response) {});
},
@@ -1202,11 +1212,13 @@ export default {
},
getHealth() {
this.$http
- .get("./static/workpalce.json")
+ .get("/apaas/service/v3/workplace/statistics/health/status")
.then((response) => {
console.log(response);
let data = response.data.data;
- this.init_health(data.health);
+ var temp = Math.round(data.seriesData[0].value/(data.seriesData[0].value+data.seriesData[1].value)*100)
+ console.log(temp);
+ this.init_health(temp);
})
.catch(function(response) {});
},
@@ -1222,16 +1234,16 @@ export default {
},
getInfoData() {
this.$http
- .get("./static/workpalce.json")
+ .get("/apaas/service/v3/workplace/statistics/basic")
.then((response) => {
console.log(response);
let data = response.data.data;
this.menu_arr[this.now_user].forEach((e, idx) => {
- if (data.infodata[e.type]) {
+ if (data[e.type]||data[e.type]==0) {
this.$set(
this.menu_arr[this.now_user][idx],
"num",
- data.infodata[e.type]
+ data[e.type]
);
}
});
@@ -1566,7 +1578,7 @@ export default {
window[this.yy_asy] = echarts.init(document.getElementById(this.yy_asy));
window[this.yy_asy].setOption(options, true);
},
- init_fwyy(xarr, yarr) {
+ init_fwyy(xarr, yarr,n) {
var dataname = ["服务总数", "应用总数"];
var options = {
tooltip: {
@@ -1578,7 +1590,7 @@ export default {
},
},
legend: {
- data: [dataname[0]],
+ data: [dataname[n]],
itemWidth: 14,
itemHeight: 10,
bottom: 0,
@@ -1615,7 +1627,7 @@ export default {
{
data: yarr,
type: "line",
- name: dataname[0],
+ name: dataname[n],
smooth: true,
sampling: "average",
symbol: "circle",