Commit 8954f925 authored by 张俊's avatar 张俊

Merge branch 'zj' into dev

parents 17d56671 21e196d5
......@@ -134,7 +134,7 @@
<div class="data_charts_left" style="width:420px;margin-left:40px;">
<p>
<span></span> 服务应用总况
<el-select v-model="fw_value" placeholder="请选择">
<el-select v-model="fw_value" @change="change_service_app" placeholder="请选择">
<el-option
v-for="item in fw_options"
:key="item.value"
......@@ -818,7 +818,7 @@ export default {
pic: require("@/assets/imgs/ic_fuwuzs_navy.png"),
bg: "#e6ebfe",
color: "#515fe7",
type: "service",
type: "service_count",
num: "",
},
{
......@@ -826,7 +826,7 @@ export default {
pic: require("@/assets/imgs/ic_yingyongzs.png"),
bg: "#e5f4fe",
color: "#38aef9",
type: "app",
type: "app_count",
num: "",
},
{
......@@ -834,7 +834,7 @@ export default {
pic: require("@/assets/imgs/ic_shouyize.png"),
bg: "#fcefd6",
color: "#ea7d19",
type: "getMoney",
type: "earnings_money",
num: "",
},
],
......@@ -844,7 +844,7 @@ export default {
pic: require("@/assets/imgs/ic_yonghuzs.png"),
bg: "#e6ebfe",
color: "#515fe7",
type: "areaUser",
type: "org_user",
num: "",
},
{
......@@ -852,7 +852,7 @@ export default {
pic: require("@/assets/imgs/ic_fuwuzs.png"),
bg: "#e5f4fe",
color: "#38aef9",
type: "service",
type: "service_count",
num: "",
},
{
......@@ -860,15 +860,15 @@ export default {
pic: require("@/assets/imgs/ic_yingyongzs.png"),
bg: "#e7fdfc",
color: "#25bdb1",
type: "app",
type: "app_count",
num: "",
},
{
text: "收益总额",
text: "交易总额",
pic: require("@/assets/imgs/ic_shouyize.png"),
bg: "#fcefd6",
color: "#ea7d19",
type: "getMoney",
type: "trade_money",
num: "",
},
],
......@@ -878,7 +878,7 @@ export default {
pic: require("@/assets/imgs/ic_yonghuzs.png"),
bg: "#e6ebfe",
color: "#515fe7",
type: "allUser",
type: "total_user",
num: "",
},
{
......@@ -886,7 +886,7 @@ export default {
pic: require("@/assets/imgs/ic_fuwuzs.png"),
bg: "#e5f4fe",
color: "#38aef9",
type: "service",
type: "service_count",
num: "",
},
{
......@@ -894,15 +894,15 @@ export default {
pic: require("@/assets/imgs/ic_yingyongzs.png"),
bg: "#e7fdfc",
color: "#25bdb1",
type: "app",
type: "app_count",
num: "",
},
{
text: "收益总额",
text: "交易总额",
pic: require("@/assets/imgs/ic_shouyize.png"),
bg: "#fcefd6",
color: "#ea7d19",
type: "getMoney",
type: "trade_money",
num: "",
},
],
......@@ -962,6 +962,7 @@ export default {
["应用仓库", "应用审批"],
],
app_arr: [],
service_app_count:{},
manage_arr: [
{
pic: require("@/assets/imgs/home_tool_ic_organize.png"),
......@@ -1168,23 +1169,32 @@ export default {
})
.catch(function(response) {});
},
change_service_app(val){
console.log(val);
if(val == 0){
this.init_fwyy(this.service_app_count.serviceData.xAxisData, this.service_app_count.serviceData.seriesData,val);
}else{
this.init_fwyy(this.service_app_count.appData.xAxisData, this.service_app_count.appData.seriesData,val);
}
},
getappusedata() {
this.$http
.get("./static/workpalce.json")
.get("/apaas/service/v3/workplace/statistics/serviceapp/count/trend")
.then((response) => {
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",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment