diff --git a/src/api/modules/http.js b/src/api/modules/http.js index 8408949..df5413b 100644 --- a/src/api/modules/http.js +++ b/src/api/modules/http.js @@ -1358,6 +1358,27 @@ export function biDataOverview(data) { }) } +// 用户总览右侧菜单 +export function biDataOverviewDistribute(data) { + return request({ + url: 'autoSR/biData/dataOverviewDistribute', + method: 'post', + data + }) +} + +// 用户总览左侧菜单饼图 +export function biDataOverviewTendency(data) { + return request({ + url: 'autoSR/biData/dataOverviewTendency', + method: 'post', + data + }) +} + + + + // 获取公司接口 export function biGetOrgCodeList(params) { return request({ diff --git a/src/page/bi/bi.vue b/src/page/bi/bi.vue index 66edaa0..25cc121 100644 --- a/src/page/bi/bi.vue +++ b/src/page/bi/bi.vue @@ -507,6 +507,8 @@ export default { // 实时总览 initPageRealTimeOverview() { this.biDataOverview(); + this.biDataOverviewTendency(); + this.biDataOverviewDistribute(); }, // 案场排名 @@ -572,20 +574,20 @@ export default { console.log(e); } } else { - avgList.push({ - yAxis: object.allAvg, - name: "行业平均", - }); - try { - if ( - object.data[this.orderBy == 1 ? 0 : object.data.length - 1] - .value < object.allAvg - ) { - yAxis.max = object.allAvg; - } - } catch (e) { - console.log(e); - } + // avgList.push({ + // yAxis: object.allAvg, + // name: "行业平均", + // }); + // try { + // if ( + // object.data[this.orderBy == 1 ? 0 : object.data.length - 1] + // .value < object.allAvg + // ) { + // yAxis.max = object.allAvg; + // } + // } catch (e) { + // console.log(e); + // } } if (ob.unit == "%") { yAxis = { @@ -723,7 +725,42 @@ export default { // 销讲趋势 item.data = res.data.statisticData[item.params] || 0; }); + } + }); + }, + // 用户总览右侧菜单 + biDataOverviewDistribute() { + const params = { + dateType: this.dateSelectIndex, + orgCode: this.companyValue, + startDate: this.time[0] || "", + endDate: this.time[1] || "", + }; + this.$api.http.biDataOverviewDistribute(params).then((res) => { + if (res.code == 10000) { + //右侧菜单数据填充 + this.rsideDataList.forEach((item) => { + this[item.params] = res.data[item.params] || []; + }); + + this.$nextTick(() => { + this.formatterPie(); + }); + } + }); + }, + + // 用户总览左侧菜单饼图 + biDataOverviewTendency() { + const params = { + dateType: this.dateSelectIndex, + orgCode: this.companyValue, + startDate: this.time[0] || "", + endDate: this.time[1] || "", + }; + this.$api.http.biDataOverviewTendency(params).then((res) => { + if (res.code == 10000) { this.allRecSaleList = res.data.tendencyData || []; // 趋势图 //左侧菜单数据填充 @@ -732,15 +769,9 @@ export default { this[item.params1] = res.data[item.params1] || []; }); - //右侧菜单数据填充 - this.rsideDataList.forEach((item) => { - this[item.params] = res.data[item.params] || []; - }); - this.$nextTick(() => { this.empityReceptionListSalesExecution(); this.formatLineData(); - this.formatterPie(); this.formatterBar(); }); }