From 16ed19b7da8a44fe499c67116160d964e38e125f 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: Thu, 11 May 2023 14:33:07 +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/page/bi/bi.vue | 348 +++++++++++++++++++++++--------------------
src/page/bi/index.js | 71 ++++++++-
src/page/wel.vue | 101 ++++++++-----
3 files changed, 314 insertions(+), 206 deletions(-)
diff --git a/src/page/bi/bi.vue b/src/page/bi/bi.vue
index 0d61a77..297e9d9 100644
--- a/src/page/bi/bi.vue
+++ b/src/page/bi/bi.vue
@@ -623,7 +623,7 @@
-
@@ -963,7 +974,6 @@
v-model="data.dataStatus"
placeholder="请选择"
filterable
- @change="changeCompany"
:popper-append-to-body="false"
>
{
- let par = {
- // 折线图的样式
- smooth: true,
- name: item.name,
- type: "line",
- areaStyle: {
- normal: {
- color: new echarts.graphic.LinearGradient(
- 0,
- 0,
- 1,
- 1,
- this.lineColorLinear(index),
- false
- ),
- shadowColor: "rgba(44,118,222, 0.1)",
- shadowBlur: 10,
- },
+ let par = {
+ // 折线图的样式
+ smooth: true,
+ name: "录音完整率",
+ type: "line",
+ areaStyle: {
+ normal: {
+ color: new echarts.graphic.LinearGradient(
+ 0,
+ 0,
+ 1,
+ 1,
+ this.lineColorLinear(0),
+ false
+ ),
+ shadowColor: "rgba(44,118,222, 0.1)",
+ shadowBlur: 10,
},
- itemStyle: {
- normal: {
- color: {
- type: "linear", // 线性渐变
- x: 0,
- y: 0,
- x2: 1,
- y2: 1,
- colorStops: this.lineColorLinear(index),
- },
+ },
+ itemStyle: {
+ normal: {
+ color: {
+ type: "linear", // 线性渐变
+ x: 0,
+ y: 0,
+ x2: 1,
+ y2: 1,
+ colorStops: this.lineColorLinear(0),
},
},
- data: [],
- };
- this.fullRecordTendency.forEach((org) => {
- par.data.push(org[item.params] || 0);
- if (!obj1.xAxis.includes(org.date.split(" ")[0])) {
- obj1.xAxis.push(org.date.split(" ")[0]);
- }
+ },
+ data: [],
+ };
+ this.fullRecordTendency.forEach((org) => {
+ par.data.push(org["fullRate"] || 0);
- if (!obj1.legend.includes(item.name)) {
- obj1.legend.push(item.name);
- }
- });
- this.receptionList.push(par);
+ if (!obj1.xAxis.includes(org.date.split(" ")[0])) {
+ obj1.xAxis.push(org.date.split(" ")[0]);
+ }
+
+ if (!obj1.legend.includes(par.name)) {
+ obj1.legend.push(par.name);
+ }
});
+ ars.push(par);
- obj1.series = this.receptionList;
- console.log(obj1, "这里是");
+ obj1.series = ars;
+ console.log(obj1, "这里是123");
this.$nextTick(() => {
this.creatLine(obj1);
});
-
},
// 设备监控中心左
biEquipmentMonitoringLeft() {
@@ -1516,7 +1512,7 @@ export default {
this.$nextTick(() => {
this.buildNotFull();
this.buildOffLine();
- this.formatLineDatasLine()
+ this.formatLineDatasLine();
});
}
});
@@ -1544,7 +1540,7 @@ export default {
},
series: [
{
- name: "项目服务期分析",
+ name: "",
type: "pie",
radius: ["45%", "60%"],
labelLine: {
@@ -1707,12 +1703,7 @@ export default {
// 处理折线统计图的数据
formatLineDatas() {
- let arr1 = [
- {
- name: "录音开启率",
- params: "recordOpenRate",
- },
- ];
+ let arr1 = [];
let obj1 = {
id: "RecordingOpeningRateTrend",
xAxis: [],
@@ -1720,57 +1711,50 @@ export default {
series: [],
max: 100,
};
- arr1.forEach((item, index) => {
- let par = {
- // 折线图的样式
- smooth: true,
- name: item.name,
- type: "line",
- areaStyle: {
- normal: {
- color: new echarts.graphic.LinearGradient(
- 0,
- 0,
- 1,
- 1,
- this.lineColorLinear(index),
- false
- ),
- shadowColor: "rgba(44,118,222, 0.1)",
- shadowBlur: 10,
- },
+ let par = {
+ // 折线图的样式
+ smooth: true,
+ name: "录音开启率",
+ type: "line",
+ areaStyle: {
+ normal: {
+ color: new echarts.graphic.LinearGradient(
+ 0,
+ 0,
+ 1,
+ 1,
+ this.lineColorLinear(0),
+ false
+ ),
+ shadowColor: "rgba(44,118,222, 0.1)",
+ shadowBlur: 10,
},
- itemStyle: {
- normal: {
- color: {
- type: "linear", // 线性渐变
- x: 0,
- y: 0,
- x2: 1,
- y2: 1,
- colorStops: this.lineColorLinear(index),
- },
+ },
+ itemStyle: {
+ normal: {
+ color: {
+ type: "linear", // 线性渐变
+ x: 0,
+ y: 0,
+ x2: 1,
+ y2: 1,
+ colorStops: this.lineColorLinear(0),
},
},
- data: [],
- };
- this.equipmentMonitoringCenter.forEach((org) => {
- par.data.push(org[item.params] || 0);
+ },
+ data: [],
+ };
+ this.equipmentMonitoringCenter.forEach((org) => {
+ par.data.push(org["recordOpenRate"] || 0);
- obj1.xAxis.push(org.date);
+ obj1.xAxis.push(org.date);
- if (!obj1.legend.includes(item.name)) {
- obj1.legend.push(item.name);
- }
- });
- this.receptionList.push(par);
+ if (!obj1.legend.includes(par.name)) {
+ obj1.legend.push(par.name);
+ }
});
- let arr2 = [
- {
- name: "平均开启时长",
- params: "openActionTime",
- },
- ];
+ arr1.push(par);
+ let arr2 = [];
let obj2 = {
id: "AverageOpeningTime",
@@ -1779,63 +1763,60 @@ export default {
series: [],
};
- arr2.forEach((item, index) => {
- let par = {
- // 折线图的样式
- smooth: true,
- name: item.name,
- type: "line",
- areaStyle: {
- normal: {
- color: new echarts.graphic.LinearGradient(
- 0,
- 0,
- 1,
- 1,
- this.lineColorLinear(index),
- false
- ),
- shadowColor: "rgba(44,118,222, 0.1)",
- shadowBlur: 10,
- },
+ let par1 = {
+ // 折线图的样式
+ smooth: true,
+ name: "平均开启时长",
+ type: "line",
+ areaStyle: {
+ normal: {
+ color: new echarts.graphic.LinearGradient(
+ 0,
+ 0,
+ 1,
+ 1,
+ this.lineColorLinear(0),
+ false
+ ),
+ shadowColor: "rgba(44,118,222, 0.1)",
+ shadowBlur: 10,
},
- itemStyle: {
- normal: {
- color: {
- type: "linear", // 线性渐变
- x: 0,
- y: 0,
- x2: 1,
- y2: 1,
- colorStops: this.lineColorLinear(index),
- },
+ },
+ itemStyle: {
+ normal: {
+ color: {
+ type: "linear", // 线性渐变
+ x: 0,
+ y: 0,
+ x2: 1,
+ y2: 1,
+ colorStops: this.lineColorLinear(0),
},
},
- data: [],
- };
-
- this.equipmentMonitoringCenter.forEach((org) => {
- par.data.push(org[item.params] || 0);
+ },
+ data: [],
+ };
- obj2.xAxis.push(org.date);
+ this.equipmentMonitoringCenter.forEach((org) => {
+ par.data.push(org["openActionTime"] || 0);
- if (!obj2.legend.includes(item.name)) {
- obj2.legend.push(item.name);
- }
- });
+ obj2.xAxis.push(org.date);
- this.salesExecution.push(par);
+ if (!obj2.legend.includes(par1.name)) {
+ obj2.legend.push(par1.name);
+ }
});
- obj1.series = this.receptionList;
- obj2.series = this.salesExecution;
+ arr2.push(par1);
+
+ obj1.series = arr1;
+ obj2.series = arr2;
console.log(obj1, "这里是");
this.$nextTick(() => {
this.creatLine(obj1);
this.creatLine(obj2);
});
-
},
// 违禁预警消息列表
@@ -2323,6 +2304,7 @@ export default {
this.$api.http.biTendencyDataContrast(params).then((res) => {
if (res.code == 10000) {
this.allTrendData = res.data;
+ console.log(this.allTrendData);
this.formatTendency(this.allTrendData); // 格式化数据
this.formatReception();
@@ -2463,6 +2445,8 @@ export default {
returnA: [],
returnB: [],
series: [],
+ max: 100,
+
grid: {
top: "10%",
bottom: "25%",
@@ -2483,7 +2467,7 @@ export default {
// 获取对比纬度的数据名称
let getNames =
- this.ReceptionTrendsList[this.ReceptionTrendsListIndex].params;
+ this.SalesExecutionTrendsList[this.SalesExecutionTrendsListIndex].params;
// 选中时间的数据
res.tendencyData.forEach((item) => {
@@ -2850,6 +2834,8 @@ export default {
this.dialogVisible = false;
this.current = 1;
this.size = 10;
+ this.tableData = []; // 清空数据
+ this.showDialogData = this.$options.data().showDialogData;
},
// 弹窗展示
@@ -2877,6 +2863,31 @@ export default {
});
},
+ // 弹窗展示
+ showDialogs(data) {
+ this.showDialogData = data;
+ const params = {
+ dataType: data.dataType,
+ dateType: this.dateSelectIndex,
+ orgCode: this.companyValue,
+ startDate: this.time[0] || "",
+ endDate: this.time[1] || "",
+ current: this.current,
+ size: this.size,
+ };
+ this.$api.http.biChooseDataTable(params).then((res) => {
+ if (res.code == 10000) {
+ let arr = this.jiedaiLists;
+ let obj = arr.find((item) => item.title == data.title);
+ this.total = res.data.total;
+ this.dialogTitle = data.title;
+ this.tableNameList = dialogConstList[obj.tableListName];
+ this.tableData = res.data.records;
+ this.dialogVisible = true;
+ }
+ });
+ },
+
// 获取页面数据
biDataOverview() {
const params = {
@@ -3121,7 +3132,6 @@ export default {
// 基于准备好的dom,初始化echarts实例
let myChart = echarts.init(document.getElementById(obj.id));
myChart.clear();
- // this.receptionList
// 指定图表的配置项和数据
let grid = {
top: "10%",
@@ -3695,7 +3705,10 @@ export default {
if (this.headIndex == "案场排名" && this.companyValue) {
let index = this.rankingTypeList.findIndex((item) => item.value == 3);
this.rankingTypeList[index].disabled = false;
- } else if (this.headIndex == "接待分析") {
+ } else if (
+ this.headIndex == "接待分析" ||
+ this.headIndex == "销讲执行分布"
+ ) {
this.projectValue = "";
this.biFindHouseByOrgCode();
} else {
@@ -3720,6 +3733,7 @@ export default {
this.headIndex = index.title;
sessionStorage.setItem("BIHeadIndex", this.headIndex);
this.projectValue = "";
+ this.companyValue = "";
this.initPage();
},
@@ -3739,9 +3753,12 @@ export default {
// To doing
//
handleCurrentChange(e) {
- if (this.headIndex != "违禁预警") {
+ if (this.headIndex == "实时总览") {
this.current = e;
this.showDialog(this.showDialogData);
+ } else if (this.headIndex == "设备监控中心") {
+ this.current = e;
+ this.showDialogs(this.showDialogData);
} else {
if (this.dialogVisible) {
this.current = e;
@@ -3755,9 +3772,12 @@ export default {
//
handleSizeChange(e) {
- if (this.headIndex != "违禁预警") {
+ if (this.headIndex == "实时总览") {
this.size = e;
this.showDialog(this.showDialogData);
+ } else if (this.headIndex == "设备监控中心") {
+ this.size = e;
+ this.showDialogs(this.showDialogData);
} else {
if (this.dialogVisible) {
this.sizes = e;
diff --git a/src/page/bi/index.js b/src/page/bi/index.js
index 27b588c..0d6dcfc 100644
--- a/src/page/bi/index.js
+++ b/src/page/bi/index.js
@@ -136,6 +136,17 @@ const AverageSalesExecutionRate = [
showParams: 'value',
},
]
+// 录音开启率
+const AverageSalesExecutionRates = [
+ {
+ showTitle: '项目',
+ showParams: 'houseName',
+ },
+ {
+ showTitle: '开启率',
+ showParams: 'value',
+ },
+]
// 平均接待时长
const AverageReceptionDuration = [
@@ -660,7 +671,50 @@ const warningStatusArr = [
},
]
+// 不完整录音分布
+const headDistribution = [
+ {
+ showTitle: '项目',
+ showParams: 'houseName',
+ },
+ {
+ showTitle: '无设备',
+ showParams: 'notEquipment',
+ },
+ {
+ showTitle: '离线接待',
+ showParams: 'offLineReception',
+ },
+ {
+ showTitle: '未及时开启',
+ showParams: 'notOpenRecord',
+ },
+ {
+ showTitle: '中途关机',
+ showParams: 'shutDown',
+ },
+]
+
+// 离线原因分布
+const headOffline = [
+ {
+ showTitle: '项目',
+ showParams: 'houseName',
+ },
+ {
+ showTitle: '关机',
+ showParams: 'shutDownCount',
+ },
+ {
+ showTitle: '低电关机',
+ showParams: 'lowBatteryCount',
+ },
+ {
+ showTitle: '网络异常',
+ showParams: 'offLineCount',
+ },
+]
const stayHandleLists = [
{
@@ -717,8 +771,8 @@ const jiedaiLists = [
bgImg: "/img/bidata/listbg@2x.png", // 图片路径
data: "", // 对应值
fontColor: "#34DBFC", // 字体颜色
- dataType: 6, // 接口入参
- tableListName: "Receiving", // 对应index.js里的常量名称
+ dataType: 17, // 接口入参
+ tableListName: "FollowUpReception", // 对应index.js里的常量名称
},
{
title: "开启失败",
@@ -727,7 +781,7 @@ const jiedaiLists = [
data: "", // 对应值
fontColor: "#34DBFC", // 字体颜色
dataType: 7, // 接口入参
- tableListName: "NoRecording", // 对应index.js里的常量名称
+ tableListName: "FollowUpReception", // 对应index.js里的常量名称
},
{
title: "录音开启率",
@@ -736,8 +790,8 @@ const jiedaiLists = [
bgImg: "/img/bidata/listbg1@2x.png", // 图片路径
data: "", // 对应值
fontColor: "#34DBFC", // 字体颜色
- dataType: 8, // 接口入参
- tableListName: "AverageSalesExecutionRate", // 对应index.js里的常量名称
+ dataType: 12, // 接口入参
+ tableListName: "AverageSalesExecutionRates", // 对应index.js里的常量名称
},
{
title: "平均开启时长",
@@ -746,7 +800,7 @@ const jiedaiLists = [
bgImg: "/img/bidata/listbg@2x.png", // 图片路径
data: "", // 对应值
fontColor: "#34DBFC", // 字体颜色
- dataType: 9, // 接口入参
+ dataType: 13, // 接口入参
tableListName: "AverageReceptionDuration", // 对应index.js里的常量名称
},
{
@@ -755,7 +809,7 @@ const jiedaiLists = [
bgImg: "/img/bidata/listbg@2x.png", // 图片路径
data: "", // 对应值
fontColor: "#34DBFC", // 字体颜色
- dataType: 10, // 接口入参
+ dataType: 14, // 接口入参
tableListName: "FollowUpReception", // 对应index.js里的常量名称
},
]
@@ -792,4 +846,7 @@ export {
contrastArr,
upOrDownArr,
warningStatusArr,
+ headDistribution,
+ headOffline,
+ AverageSalesExecutionRates,
}
\ No newline at end of file
diff --git a/src/page/wel.vue b/src/page/wel.vue
index d9278ec..0a7dfe0 100644
--- a/src/page/wel.vue
+++ b/src/page/wel.vue
@@ -314,7 +314,6 @@
-
- {{ cardlist.datalist.sumLevelFraction || 0 }}%
+
+ {{ cardlist.datalist.sumLevelFraction || 0 }}%
+
@@ -352,11 +353,17 @@
环比:{{ cardlist.sequential.sumLevelFraction || 0 }}
-
+
+{{ cardlist.liftlist.sumLevelFraction || 0 }}%
-
+
{{ cardlist.liftlist.sumLevelFraction || 0 }}%
@@ -2172,7 +2179,11 @@
接待趋势
-
查看全部
销讲趋势
- 查看全部
用户洞察
+ effect="light"
+ content="筛选时间内,画像标签命中的新增客户数分布图;接待标记顾问、画像校准和给客户打标签有助于提升画像精准度;"
+ placement="bottom-end"
+ >
@@ -2648,7 +2663,7 @@ export default {
companyElCardList: [
{
name: "接待量",
- unit: '',
+ unit: "",
tooltip: "筛选时间内,已经结束的接待条数,不包含待接单;", // 描述name文字的
path: "/building/Count",
pathName: "项目统计",
@@ -2659,7 +2674,7 @@ export default {
},
{
name: "有效接待",
- unit: '',
+ unit: "",
tooltip: "筛选时间内,标记为有效的接待数,不包含待接单;", // 描述name文字的
path: "/building/Count",
pathName: "项目统计",
@@ -2670,7 +2685,7 @@ export default {
},
{
name: "平均销讲执行率",
- unit: '%',
+ unit: "%",
tooltip: "筛选时间内,有效接待(不包含待接单)的平均执行率;", // 描述name文字的
path: "/building/Count",
pathName: "项目统计",
@@ -2681,7 +2696,7 @@ export default {
},
{
name: "平均挖掘执行率",
- unit: '%',
+ unit: "%",
tooltip: "筛选时间内,已标记的有效接待挖掘执行的平均值;", // 描述name文字的
path: "/building/Count",
pathName: "项目统计",
@@ -2692,7 +2707,7 @@ export default {
},
{
name: "平均挖掘成功率",
- unit: '%',
+ unit: "%",
tooltip: "筛选时间内,已标记的有效接待挖掘成功的平均值;", // 描述name文字的
path: "/building/Count",
pathName: "项目统计",
@@ -2703,7 +2718,7 @@ export default {
},
{
name: "违禁接待次数",
- unit: '',
+ unit: "",
tooltip:
"筛选时间内,出现违禁的接待次数,不包含待接单/无效接待/无效违禁;", // 描述name文字的
path: "/building/Count",
@@ -2715,7 +2730,7 @@ export default {
},
{
name: "平均接待时长(分钟)",
- unit: '',
+ unit: "",
tooltip:
"筛选时间内,有效接待(不包含待接单)的平均录音时长,单位分钟;", // 描述name文字的
path: "/building/Count",
@@ -2727,8 +2742,9 @@ export default {
},
{
name: "平均客户意向度",
- unit: '%',
- tooltip: "筛选时间内,新增的客户平均意向度,标记接待顾问、画像校准和给客户打标签有助于提升客户意向度;", // 描述name文字的
+ unit: "%",
+ tooltip:
+ "筛选时间内,新增的客户平均意向度,标记接待顾问、画像校准和给客户打标签有助于提升客户意向度;", // 描述name文字的
path: "/building/Count",
pathName: "项目统计",
paramsName: "sumLevelFraction", // 接待量变量名称
@@ -2738,7 +2754,7 @@ export default {
},
{
name: "活跃项目",
- unit: '',
+ unit: "",
tooltip: "", // 描述name文字的
path: "/building/Count",
pathName: "项目统计",
@@ -2749,7 +2765,7 @@ export default {
},
{
name: "活跃设备",
- unit: '',
+ unit: "",
tooltip: "筛选时间内,有接待并上传录音的设备;", // 描述name文字的
path: "/Equipment/state",
pathName: "设备监控",
@@ -2848,7 +2864,6 @@ export default {
this.role = localStorage.getItem("orgType");
if (this.role == 3) {
this.houseId = localStorage.getItem("houseId");
-
this.getgicd();
// 获取维度占比
this.getindexZxllist();
@@ -2861,11 +2876,14 @@ export default {
this.getMarketingBusiness();
this.findByHouseIdForRecharge();
- } else {
+ } else if (this.role == 2) {
// 公司
this.waitingForOperation();
this.companyBackendData();
this.findmatchdataByOrgCode();
+ } else {
+ this.waitingForOperation();
+ this.companyBackendData();
}
},
methods: {
@@ -2960,8 +2978,8 @@ export default {
series: [
{
type: "treemap",
- width: '95%',
- height: '95%',
+ width: "95%",
+ height: "95%",
data: data.series,
name: "用户洞察",
breadcrumb: {
@@ -3056,20 +3074,20 @@ export default {
res.data.tendencyData.forEach((item) => {
// 销讲趋势
- lineBox1.xAxis.push(item.statDate.split(' ')[0]);
+ lineBox1.xAxis.push(item.statDate.split(" ")[0]);
lineBox1.receptionCount.push(item.receptionCount || 0);
lineBox1.activeCustomer.push(item.activeCustomer || 0);
lineBox1.prohibitedCustomer.push(item.prohibitedCustomer || 0);
// 接待趋势
- lineBox2.xAxis.push(item.statDate.split(' ')[0]);
+ lineBox2.xAxis.push(item.statDate.split(" ")[0]);
lineBox2.fraction.push(item.fraction || 0);
lineBox2.wordFraction.push(item.wordFraction || 0);
lineBox2.wordFinishFraction.push(item.wordFinishFraction || 0);
});
this.tendencyDataA.forEach((item) => {
- lineBox1.legend.push(item.title.split(' ')[0]);
+ lineBox1.legend.push(item.title.split(" ")[0]);
lineBox1.series.push({
name: item.title,
type: "line",
@@ -3080,7 +3098,7 @@ export default {
});
this.tendencyDataB.forEach((item) => {
- lineBox2.legend.push(item.title.split(' ')[0]);
+ lineBox2.legend.push(item.title.split(" ")[0]);
lineBox2.series.push({
name: item.title,
type: "line",
@@ -3098,7 +3116,7 @@ export default {
// 创建折线统计图
createEchartsLine(data) {
- console.log(data, 'data')
+ console.log(data, "data");
let chartDom = document.getElementById(data.id);
let myChart = echarts.init(chartDom);
myChart.clear();
@@ -3128,8 +3146,8 @@ export default {
},
series: data.series,
};
- if (data.unit == '%') {
- option.yAxis.max = 100
+ if (data.unit == "%") {
+ option.yAxis.max = 100;
}
option && myChart.setOption(option);
@@ -3550,10 +3568,14 @@ export default {
this.getindexZxllist();
this.getemployeeExecutionRatelist();
this.findProhibitedRecord();
- } else {
+ } else if (this.role == 2) {
+ // 公司
this.waitingForOperation();
this.companyBackendData();
this.findmatchdataByOrgCode();
+ } else {
+ this.waitingForOperation();
+ this.companyBackendData();
}
},
//切换时间
@@ -3567,11 +3589,14 @@ export default {
this.getindexZxllist();
this.getemployeeExecutionRatelist();
this.findProhibitedRecord();
- } else {
+ } else if (this.role == 2) {
+ // 公司
this.waitingForOperation();
-
this.companyBackendData();
this.findmatchdataByOrgCode();
+ } else {
+ this.waitingForOperation();
+ this.companyBackendData();
}
},
@@ -3581,8 +3606,14 @@ export default {
this.getindexZxllist();
this.getemployeeExecutionRatelist();
this.findProhibitedRecord();
+ } else if (this.role == 2) {
+ // 公司
+ this.waitingForOperation();
+ this.companyBackendData();
+ this.findmatchdataByOrgCode();
} else {
this.waitingForOperation();
+ this.companyBackendData();
}
},
},