From bf807ea8eab8f2ee2d48401beeb18e4bd027cf1f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=A3=8E=E7=BB=A7=E7=BB=AD=E5=90=B9?= <17611323298@163.com>
Date: Mon, 15 May 2023 13:59:00 +0800
Subject: [PATCH] =?UTF-8?q?bi=E5=A4=A7=E6=95=B0=E6=8D=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/modules/http.js | 24 +++
src/page/bi/bi.vue | 420 +++++++++++++++++++++++++++++-----------
src/page/bi/index.js | 14 +-
3 files changed, 345 insertions(+), 113 deletions(-)
diff --git a/src/api/modules/http.js b/src/api/modules/http.js
index 18f36c0..5e0e3c6 100644
--- a/src/api/modules/http.js
+++ b/src/api/modules/http.js
@@ -1445,7 +1445,31 @@ export function biCusAgentRelationDistribute(data) {
data
})
}
+// 销讲执行分布
+export function biCusAgentRelationDistributeFirst(data) {
+ return request({
+ url: 'autoSR/biData/cusAgentRelationDistributeFirst',
+ method: 'post',
+ data
+ })
+}
+// 销讲执行分布
+export function buCusAgentRelationDistributeSecond(data) {
+ return request({
+ url: 'autoSR/biData/cusAgentRelationDistributeSecond',
+ method: 'post',
+ data
+ })
+}
+// 销讲执行分布
+export function biCusAgentRelationDistributeThird(data) {
+ return request({
+ url: 'autoSR/biData/cusAgentRelationDistributeThird',
+ method: 'post',
+ data
+ })
+}
// 设备监控中心
export function bieQuipmentMonitoringCenter(data) {
diff --git a/src/page/bi/bi.vue b/src/page/bi/bi.vue
index 297e9d9..190fef1 100644
--- a/src/page/bi/bi.vue
+++ b/src/page/bi/bi.vue
@@ -592,7 +592,7 @@
define-back-color="#204179"
:width="120"
color="#32C5FF"
- :percentage="activeProjectAnalyse.onlineCountRate"
+ :percentage="activeProjectAnalyse.activeProjectRate"
>
接待总数:{{
- equipmentOnlineAnalyse.allCount || 0
+ fullRecordAnalyse.allCount || 0
}}
完整录音:{{
- equipmentOnlineAnalyse.onlineCount || 0
+ fullRecordAnalyse.fullCount || 0
}}
录音完整率:{{ equipmentOnlineAnalyse.onlineCountRate || 0 }}%{{ fullRecordAnalyse.fullRate || 0 }}%
@@ -1243,8 +1243,19 @@ export default {
SalesExecutionTrendsListIndex: 0, // 对应下标
// 销讲执行分布
- SalesExecutionDistributionIndex:
- dialogConstList.SalesExecutionDistributionIndex, // 销讲执行分布列表
+ SalesExecutionDistributionIndexFirst:
+ dialogConstList.SalesExecutionDistributionIndexFirst, // 销讲执行分布列表
+ SalesExecutionDistributionIndexSecond:
+ dialogConstList.SalesExecutionDistributionIndexSecond, // 销讲执行分布列表
+ SalesExecutionDistributionIndexThird:
+ dialogConstList.SalesExecutionDistributionIndexThird, // 销讲执行分布列表
+
+ SalesExecutionDistributionIndex: [
+ ...dialogConstList.SalesExecutionDistributionIndexFirst,
+ ...dialogConstList.SalesExecutionDistributionIndexSecond,
+ ...dialogConstList.SalesExecutionDistributionIndexThird,
+ ], //
+
allSalesExecutionDistri: [], // 销讲执行分布数据
biWarningMessageIndex: [], // 违禁预警消息列表
@@ -1289,7 +1300,7 @@ export default {
},
mounted() {
- this.initPage();
+ // this.initPage();
console.log(this.$options.data(), "dsakjdkljalds");
},
@@ -1884,6 +1895,12 @@ export default {
// 销讲执行分布
biCusAgentRelationDistribute() {
+ this.biCusAgentRelationDistributeFirst();
+ this.buCusAgentRelationDistributeSecond();
+ this.biCusAgentRelationDistributeThird();
+ },
+
+ biCusAgentRelationDistributeFirst() {
// 接口入参
const params = {
dateType: this.dateSelectIndex,
@@ -1892,120 +1909,300 @@ export default {
endDate: this.time[1] || "",
houseId: this.projectValue,
};
- this.$api.http.biCusAgentRelationDistribute(params).then((res) => {
+ this.$api.http.biCusAgentRelationDistributeFirst(params).then((res) => {
if (res.code == 10000) {
- this.allSalesExecutionDistri = res.data;
- this.formatAllSalesExecutionDistri(); // 格式化数据
- }
- });
- },
-
- // 格式化销讲执行分布
- formatAllSalesExecutionDistri() {
- this.SalesExecutionDistributionIndex.forEach((list) => {
- if (list.params == "visitReceptionDistribute") {
- let gentle = 0;
- let [arr1, arr2] = [[], []];
- this.allSalesExecutionDistri.visitReceptionDistribute.forEach(
- (item) => {
- if (item.name != "首次到访") {
- gentle += item.value;
- } else {
- arr1.push(item);
+ this.SalesExecutionDistributionIndexFirst.forEach((list) => {
+ if (list.params == "visitReceptionDistribute") {
+ let gentle = 0;
+ let [arr1, arr2] = [[], []];
+ res.data.visitReceptionDistribute.forEach((item) => {
+ if (item.name != "首次到访") {
+ gentle += item.value;
+ } else {
+ arr1.push(item);
+ }
+ arr2.push(item);
+ });
+ let series = [
+ {
+ name: "到访次数分布",
+ type: "pie",
+ selectedMode: "single",
+ radius: [0, "30%"],
+ label: {
+ position: "inner",
+ fontSize: 14,
+ },
+ labelLine: {
+ show: false,
+ },
+ data: arr1,
+ },
+ {
+ name: "到访次数分布",
+ type: "pie",
+ radius: ["45%", "60%"],
+ labelLine: {
+ length: 30,
+ },
+ data: arr2,
+ },
+ ];
+ if (series[0].data.length > 0) {
+ series[0].data.push({
+ name: "复访接待",
+ value: gentle,
+ });
}
- arr2.push(item);
+ this.$nextTick(() => {
+ this.creatPie({
+ id: `${list.params}SalesExecutionDistributionIndex`,
+ legend: {
+ show: false,
+ },
+ series: series,
+ });
+ });
+ } else {
+ let legend = res.data[list.params].map((item) => {
+ return item.name;
+ });
+ this.$nextTick(() => {
+ this.creatPie({
+ id: `${list.params}SalesExecutionDistributionIndex`,
+ grid: {
+ bottom: "20%",
+ top: "5%",
+ },
+ legend: {
+ legend: legend,
+ show: list.legend ? true : false,
+ orient: "horizontal",
+ type: "scroll",
+ bottom: "5%",
+ textStyle: {
+ color: "#fff",
+ },
+ },
+ series: [
+ {
+ name: list.title,
+ type: "pie",
+ radius: "50%",
+ labelLine: {
+ length: 5,
+ showAbove: true,
+ },
+ minAngle: 5,
+ avoidLabelOverlap: true,
+ data: res.data[list.params],
+ itemStyle: {
+ normal: {
+ color: function (colors) {
+ var colorList = [
+ "#D0444D",
+ "#376FE3",
+ "#E1B31F",
+ "#8D25E4",
+ "#DF7323",
+ "#2ED1EE",
+ ];
+ return colorList[colors.dataIndex % 6];
+ },
+ },
+ },
+ },
+ ],
+ });
+ });
}
- );
- let series = [
- {
- name: "到访次数分布",
- type: "pie",
- selectedMode: "single",
- radius: [0, "30%"],
- label: {
- position: "inner",
- fontSize: 14,
- },
- labelLine: {
- show: false,
- },
- data: arr1,
- },
- {
- name: "到访次数分布",
- type: "pie",
- radius: ["45%", "60%"],
- labelLine: {
- length: 30,
- },
- data: arr2,
- },
- ];
- if (series[0].data.length > 0) {
- series[0].data.push({
- name: "复访接待",
- value: gentle,
- });
- }
- this.$nextTick(() => {
- this.creatPie({
- id: `${list.params}SalesExecutionDistributionIndex`,
- legend: {
- show: false,
- },
- series: series,
- });
});
- } else {
- let legend = this.allSalesExecutionDistri[list.params].map((item) => {
- return item.name;
- });
- this.$nextTick(() => {
- this.creatPie({
- id: `${list.params}SalesExecutionDistributionIndex`,
- grid: {
- bottom: "20%",
- top: "5%",
- },
- legend: {
- legend: legend,
- show: list.legend ? true : false,
- orient: "horizontal",
- type: "scroll",
- bottom: "5%",
- textStyle: {
- color: "#fff",
+ }
+ });
+ },
+ buCusAgentRelationDistributeSecond() {
+ // 接口入参
+ const params = {
+ dateType: this.dateSelectIndex,
+ orgCode: this.companyValue,
+ startDate: this.time[0] || "",
+ endDate: this.time[1] || "",
+ houseId: this.projectValue,
+ };
+ this.$api.http.buCusAgentRelationDistributeSecond(params).then((res) => {
+ if (res.code == 10000) {
+ this.SalesExecutionDistributionIndexSecond.forEach((list) => {
+ if (list.params == "visitReceptionDistribute") {
+ let gentle = 0;
+ let [arr1, arr2] = [[], []];
+ res.data.visitReceptionDistribute.forEach((item) => {
+ if (item.name != "首次到访") {
+ gentle += item.value;
+ } else {
+ arr1.push(item);
+ }
+ arr2.push(item);
+ });
+ let series = [
+ {
+ name: "到访次数分布",
+ type: "pie",
+ selectedMode: "single",
+ radius: [0, "30%"],
+ label: {
+ position: "inner",
+ fontSize: 14,
+ },
+ labelLine: {
+ show: false,
+ },
+ data: arr1,
},
- },
- series: [
{
- name: list.title,
+ name: "到访次数分布",
type: "pie",
- radius: "50%",
+ radius: ["45%", "60%"],
labelLine: {
- length: 5,
- showAbove: true,
+ length: 30,
},
- minAngle: 5,
- avoidLabelOverlap: true,
- data: this.allSalesExecutionDistri[list.params],
- itemStyle: {
- normal: {
- color: function (colors) {
- var colorList = [
- "#D0444D",
- "#376FE3",
- "#E1B31F",
- "#8D25E4",
- "#DF7323",
- "#2ED1EE",
- ];
- return colorList[colors.dataIndex % 6];
+ data: arr2,
+ },
+ ];
+ if (series[0].data.length > 0) {
+ series[0].data.push({
+ name: "复访接待",
+ value: gentle,
+ });
+ }
+ this.$nextTick(() => {
+ this.creatPie({
+ id: `${list.params}SalesExecutionDistributionIndex`,
+ legend: {
+ show: false,
+ },
+ series: series,
+ });
+ });
+ } else {
+ let legend = res.data[list.params].map((item) => {
+ return item.name;
+ });
+ this.$nextTick(() => {
+ this.creatPie({
+ id: `${list.params}SalesExecutionDistributionIndex`,
+ grid: {
+ bottom: "20%",
+ top: "5%",
+ },
+ legend: {
+ legend: legend,
+ show: list.legend ? true : false,
+ orient: "horizontal",
+ type: "scroll",
+ bottom: "5%",
+ textStyle: {
+ color: "#fff",
+ },
+ },
+ series: [
+ {
+ name: list.title,
+ type: "pie",
+ radius: "50%",
+ labelLine: {
+ length: 5,
+ showAbove: true,
+ },
+ minAngle: 5,
+ avoidLabelOverlap: true,
+ data: res.data[list.params],
+ itemStyle: {
+ normal: {
+ color: function (colors) {
+ var colorList = [
+ "#D0444D",
+ "#376FE3",
+ "#E1B31F",
+ "#8D25E4",
+ "#DF7323",
+ "#2ED1EE",
+ ];
+ return colorList[colors.dataIndex % 6];
+ },
+ },
},
},
+ ],
+ });
+ });
+ }
+ });
+ }
+ });
+ },
+
+ biCusAgentRelationDistributeThird() {
+ // 接口入参
+ const params = {
+ dateType: this.dateSelectIndex,
+ orgCode: this.companyValue,
+ startDate: this.time[0] || "",
+ endDate: this.time[1] || "",
+ houseId: this.projectValue,
+ };
+ this.$api.http.biCusAgentRelationDistributeThird(params).then((res) => {
+ if (res.code == 10000) {
+ this.SalesExecutionDistributionIndexThird.forEach((list) => {
+ let legend = res.data[list.params].map((item) => {
+ return item.name;
+ });
+ this.$nextTick(() => {
+ this.creatPie({
+ id: `${list.params}SalesExecutionDistributionIndex`,
+ grid: {
+ bottom: "20%",
+ top: "5%",
+ },
+ legend: {
+ legend: legend,
+ show: list.legend ? true : false,
+ orient: "horizontal",
+ type: "scroll",
+ bottom: "5%",
+ textStyle: {
+ color: "#fff",
},
},
- ],
+ series: [
+ {
+ name: list.title,
+ type: "pie",
+ radius: "50%",
+ labelLine: {
+ length: 5,
+ showAbove: true,
+ },
+ minAngle: 5,
+ avoidLabelOverlap: true,
+ data: res.data[list.params],
+ itemStyle: {
+ normal: {
+ color: function (colors) {
+ var colorList = [
+ "#D0444D",
+ "#376FE3",
+ "#E1B31F",
+ "#8D25E4",
+ "#DF7323",
+ "#2ED1EE",
+ ];
+ return colorList[colors.dataIndex % 6];
+ },
+ },
+ },
+ },
+ ],
+ });
});
});
}
@@ -2467,7 +2664,8 @@ export default {
// 获取对比纬度的数据名称
let getNames =
- this.SalesExecutionTrendsList[this.SalesExecutionTrendsListIndex].params;
+ this.SalesExecutionTrendsList[this.SalesExecutionTrendsListIndex]
+ .params;
// 选中时间的数据
res.tendencyData.forEach((item) => {
@@ -4043,7 +4241,7 @@ export default {
}
.numberoftimes-box {
margin: 0 0 0 12px;
- width: 126px;
+ min-width: 126px;
height: 146px;
background: url("/img/bidata/wei.png") no-repeat;
background-size: 100% 14px;
diff --git a/src/page/bi/index.js b/src/page/bi/index.js
index 0d6dcfc..299fbcb 100644
--- a/src/page/bi/index.js
+++ b/src/page/bi/index.js
@@ -552,7 +552,7 @@ const SalesExecutionTrendsIndex = [
},
]
-const SalesExecutionDistributionIndex = [
+const SalesExecutionDistributionIndexFirst = [
{
title: '到访次数分布',
params: 'visitReceptionDistribute'
@@ -562,6 +562,10 @@ const SalesExecutionDistributionIndex = [
params: 'invalidReceptionDistribute',
legend: true,
},
+]
+
+const SalesExecutionDistributionIndexSecond = [
+
{
title: '销讲执行率分布',
params: 'fractionDistribute',
@@ -575,6 +579,10 @@ const SalesExecutionDistributionIndex = [
title: '接待挖掘执行率分布',
params: 'wordFractionDistribute'
},
+]
+
+const SalesExecutionDistributionIndexThird = [
+
{
title: '接待挖掘成功率分布',
params: 'wordFinishFractionDistribute'
@@ -839,7 +847,9 @@ export {
rankingEchartsBarList,
ReceptionTrendsIndex,
SalesExecutionTrendsIndex,
- SalesExecutionDistributionIndex,
+ SalesExecutionDistributionIndexFirst,
+ SalesExecutionDistributionIndexSecond,
+ SalesExecutionDistributionIndexThird,
earlyWarningTable,
targetArray,
targetArrUp,