From d21b455ddd122004e6a4df258e319694964417f3 Mon Sep 17 00:00:00 2001 From: wangxiaohua <1214073490@qq.com> Date: Thu, 16 Dec 2021 10:25:24 +0800 Subject: [PATCH] init --- src/App.vue | 21 ++++ src/views/Statistics/MentoringAbility.vue | 14 ++- src/views/Statistics/ReceptionOverview.vue | 108 ++++++++++++++------- src/views/Statistics/TheTeamCompared.vue | 76 ++++++++++++--- src/views/Statistics/TrendAnalysis.vue | 13 +-- src/views/Template/Pinspeakwords.vue | 2 +- src/views/Template/PinspeakwordsList.vue | 107 +++++++++++++++++++- src/views/admin/user/index.vue | 2 +- vue.config.js | 4 +- 9 files changed, 281 insertions(+), 66 deletions(-) diff --git a/src/App.vue b/src/App.vue index 6fb8b9b..7847cda 100644 --- a/src/App.vue +++ b/src/App.vue @@ -26,4 +26,25 @@ export default { .el-tooltip__popper { max-width: 300px; } +.nulllist{ + width: 100%; + height: 350px; + display: flex; + justify-content: center; + align-items: center; + .imgboxc{ + width: 100%; + text-align: center; + .imgboxc-img{ + width: 118px; + height: 118px; + } + .nulltext{ + width: 100%; + text-align: center; + color: #999999; + font-size: 14px; + } + } +} diff --git a/src/views/Statistics/MentoringAbility.vue b/src/views/Statistics/MentoringAbility.vue index 172dc85..301af3e 100644 --- a/src/views/Statistics/MentoringAbility.vue +++ b/src/views/Statistics/MentoringAbility.vue @@ -211,6 +211,7 @@ style="height: 350px; width: 94%; margin: 0 auto" >
+ @@ -390,7 +391,8 @@ export default { }, tablist:[], houseList:[], - role:'' + role:'', + }; }, mounted() { @@ -853,12 +855,14 @@ export default { }) }, SwitchCARDSsha(data1){ - echarts.init(document.getElementById(data1)).dispose(); + echarts.init(document.getElementById(data1)).dispose(); }, SwitchCARDS1(arr1,arr2,timelist,data1) { echarts.init(document.getElementById(data1)).dispose(); var chartDom = document.getElementById(data1); var myChart = echarts.init(chartDom); + + var option; option = { color: [ @@ -998,10 +1002,16 @@ export default { myChart.resize(); }); }, + piechart2(arr1,arr2,timelist,data1){ echarts.init(document.getElementById(data1)).dispose(); var chartDom = document.getElementById(data1); var myChart = echarts.init(chartDom); + // try{ + // var myChart = echarts.init(chartDom); + // }catch(err){ + // console.log(err,data1); + // } var option; option = { color: [ diff --git a/src/views/Statistics/ReceptionOverview.vue b/src/views/Statistics/ReceptionOverview.vue index 3c9710d..2a98310 100644 --- a/src/views/Statistics/ReceptionOverview.vue +++ b/src/views/Statistics/ReceptionOverview.vue @@ -65,9 +65,6 @@
- @@ -89,11 +86,11 @@
合计接待
-
{{Pinspeak.sum}}个
+
{{Pinspeak.sum||0}}个
均值
-
{{Pinspeak.avg}}%
+
{{Pinspeak.avg||0}}%
@@ -115,14 +112,15 @@
合计接待
-
{{Pinspeak2.sum}}个
+
{{Pinspeak2.sum||0}}个
均值
-
{{Pinspeak2.avg}}%
+
{{Pinspeak2.avg||0}}%
+ @@ -136,18 +134,18 @@
合计
-
{{ceratelist.sum || ''}}次
+
{{ceratelist.sum || 0}}次
顾问
-
{{ceratelist.num || ''}}个
+
{{ceratelist.num || 0}}个
人均接待
-
{{ceratelist.avg || ''}}次
+
{{ceratelist.avg || 0}}次
-
+
{{item.name}}
@@ -156,6 +154,12 @@
{{item.zxl}}个
+
+
+ +
暂无数据
+
+
@@ -165,18 +169,18 @@
合计
-
{{Math.floor(ceratelist1.sum /60) || ''}}分钟
+
{{Math.floor(ceratelist1.sum /60) || 0}}分钟
顾问
-
{{ceratelist1.num || ''}}个
+
{{ceratelist1.num || 0}}个
均值
-
{{Math.floor(ceratelist1.avg /60) || ''}}分钟
+
{{Math.floor(ceratelist1.avg /60) || 0}}分钟
-
+
{{item.name}}
@@ -185,7 +189,12 @@
{{item.zxl}}分钟
- +
+
+ +
暂无数据
+
+
@@ -195,7 +204,7 @@
销讲维度执行排名
-
+
{{item.name}}
@@ -203,6 +212,12 @@
{{item.zxl}}%
+
+
+
+ +
暂无数据
+
@@ -220,7 +235,7 @@
-
+
{{item.name}}
@@ -229,7 +244,12 @@
{{item.zxl}}%
- +
+
+ +
暂无数据
+
+
@@ -300,16 +320,24 @@ export default { this.overviewfindUserListByHouseId() this.overviewreceptionOverview() this.overviewreceptionData() - this.overviewreceptionRanking() this.overviewreceptionRanking1() this.overviewreceptionOverviewZxl() + this.overviewteamOrAccountSellingTrends() + this.overviewteamOrAccountSellingTrends1() }else{ this.zkhousePage() } }, methods: { + //切换楼盘 houseChange(){ + this.Zxllist=[]; + this.marketingId=''; + this.consultantlist=[]; + this.consultantsri=''; + this.departmentlist=[]; + this.departmentsri=''; this.customtime=[]; this.TimetoAhoose=4; this.fromobj.statDateStart= ''; @@ -318,11 +346,13 @@ export default { this.overviewfindUserListByHouseId() this.overviewreceptionOverview() this.overviewreceptionData() - this.overviewreceptionRanking() this.overviewreceptionRanking1() this.overviewreceptionOverviewZxl() + this.overviewteamOrAccountSellingTrends() + this.overviewteamOrAccountSellingTrends1() }, + //获取楼盘 zkhousePage() { this.$api.api .findHouseByUser({ @@ -339,6 +369,8 @@ export default { this.overviewreceptionRanking() this.overviewreceptionRanking1() this.overviewreceptionOverviewZxl() + this.overviewteamOrAccountSellingTrends() + this.overviewteamOrAccountSellingTrends1() }); }, //切换二级 @@ -464,7 +496,6 @@ export default { statDateEnd:this.fromobj.statDateEnd, deptId:this.departmentsri } - // console.log(this.departmentsri,'123'); if(this.TimetoAhoose==8){ parmo.dateType=null; } @@ -545,6 +576,7 @@ export default { }) } this.SwitchCARDS(newline,newline2,Strname) + }, //获取卡片数据 overviewreceptionOverview(){ @@ -563,6 +595,7 @@ export default { }, //获取卡片下折线图 overviewreceptionData(){ + this.Brokenline=[]; let parmo={ houseId:this.houseId, dateType:this.TimetoAhoose, @@ -573,7 +606,7 @@ export default { parmo.dateType=null; } this.$api.http.overviewreceptionData(parmo).then((res) => { - this.Brokenline=res.data; + this.Brokenline=res.data ||[]; this.Overviewxlick(1) }) }, @@ -582,13 +615,11 @@ export default { this.$api.http.overviewfindList({ houseId:this.houseId, }).then((res) => { - // this.departmentlist=[{name:'全部',deptId:''}] - // this.departmentlist=this.departmentlist.concat(res.data); - this.departmentlist=res.data; - + this.departmentlist=res.data||[]; + if(this.departmentlist.length==0){ + return + } this.departmentsri=this.departmentlist[0].deptId; - // console.log(this.departmentsri); - // console.log(this.departmentsri,'1'); this.overviewteamOrAccountSellingTrends() }) @@ -599,13 +630,19 @@ export default { orgType:localStorage.getItem("orgType"), projectId:this.houseId, }).then((res) => { - this.consultantlist=res.data; + this.consultantlist=res.data||[]; + if(this.consultantlist.length==0){ + return + } this.consultantsri=res.data[0].accountId; this.overviewteamOrAccountSellingTrends1() }) }, //卡片下折线图 SwitchCARDS(newline,newline2,Strname){ + if(this.Brokenline==0){ + return + } echarts.init(document.getElementById('main')).dispose(); // 销毁实例 var chartDom = document.getElementById('main'); var myChart = echarts.init(chartDom); @@ -746,6 +783,9 @@ export default { //团队销讲 Pinspeakfun1(newline,newline2){ + if( this.Pinspeak.list.length==0){ + return + } let chartDom = document.getElementById('Pinspeak1'); let myChart = echarts.init(chartDom); let option= { @@ -799,7 +839,6 @@ export default { type: 'solid', color: '#DDE1EE',//x线的颜色 width:'1'//坐标线的宽度 - } } }, @@ -843,6 +882,9 @@ export default { }, //员工销讲 Pinspeakfun2(newline,newline2){ + if( this.Pinspeak2.list.length==0){ + return + } let chartDom = document.getElementById('Pinspeak2'); let myChart = echarts.init(chartDom); let option= { @@ -896,7 +938,6 @@ export default { type: 'solid', color: '#DDE1EE',//x线的颜色 width:'1'//坐标线的宽度 - } } }, @@ -934,7 +975,6 @@ export default { }] }; - option && myChart.setOption(option); window.addEventListener("resize", () => { myChart.resize();}); }, @@ -973,7 +1013,6 @@ export default { }) return arr }, - }, }; @@ -986,6 +1025,7 @@ export default { padding-bottom: 100px; } + .container { display: grid; grid-template-columns: repeat(5, 19%) ; diff --git a/src/views/Statistics/TheTeamCompared.vue b/src/views/Statistics/TheTeamCompared.vue index 1aee1a0..a7147b8 100644 --- a/src/views/Statistics/TheTeamCompared.vue +++ b/src/views/Statistics/TheTeamCompared.vue @@ -82,14 +82,14 @@
团队总数
-
{{teamobj1.num}}个
+
{{teamobj1.num||0}}个
均值
-
{{teamobj1.avg}}个
+
{{teamobj1.avg||0}}个
-
+
{{item.name}}
@@ -98,6 +98,12 @@
{{item.zxl}}个
+
+
+ +
暂无数据
+
+
@@ -106,14 +112,14 @@
团队总数
-
{{teamobj2.num}}个
+
{{teamobj2.num||0}}个
均值
-
{{Math.floor(teamobj2.avg/60)}}分钟
+
{{Math.floor(teamobj2.avg/60)||0}}分钟
-
+
{{item.name}}
@@ -122,6 +128,12 @@
{{item.zxl}}分钟
+
+
+ +
暂无数据
+
+
@@ -143,14 +155,14 @@
团队总数
-
{{teamobj3.num}}个
+
{{teamobj3.num||0}}个
均值
{{teamobj3.avg || 0}}%
-
+
{{item.name}}
@@ -159,12 +171,24 @@
{{item.zxl}}%
+
+
+ +
暂无数据
+
+
销讲能力雷达图
-
+
+
+
+ +
暂无数据
+
+
@@ -190,10 +214,10 @@
均值
-
{{teamobj5.avg}}次
+
{{teamobj5.avg||0}}次
-
+
{{item.name}}
@@ -202,12 +226,24 @@
{{item.zxl}}次
+
+
+ +
暂无数据
+
+
违禁话术雷达图
-
+
+
+
+ +
暂无数据
+
+
@@ -252,7 +288,9 @@ export default { teamAllLeve2id:'', ceratelist:[], role:'', - houseList:[] + houseList:[], + isshowcd:true, + isshowcd2:true }; }, mounted() { @@ -562,6 +600,12 @@ export default { }, initecah(namelist,datalist,newlinename){ + if(datalist.length==0){ + this.isshowcd2=false + return + }else{ + this.isshowcd2=true + } echarts.init(document.getElementById("main")).dispose(); var chartDom = document.getElementById("main"); var myChart = echarts.init(chartDom); @@ -622,6 +666,12 @@ export default { }); }, initecah2(namelist,datalist,newlinename){ + if(datalist.length==0){ + this.isshowcd=false + return + }else{ + this.isshowcd=true + } echarts.init(document.getElementById("main2")).dispose(); var chartDom = document.getElementById("main2"); var myChart = echarts.init(chartDom); diff --git a/src/views/Statistics/TrendAnalysis.vue b/src/views/Statistics/TrendAnalysis.vue index d5d831c..d046a18 100644 --- a/src/views/Statistics/TrendAnalysis.vue +++ b/src/views/Statistics/TrendAnalysis.vue @@ -298,19 +298,8 @@
-
-
-
暂无数据
+
-
启用 停用 编辑 - 删除 + 删除 + 查看 @@ -105,6 +106,31 @@
+ +
+
+
+
{{item.name||''}}:{{item.fraction}}分
+
+
+
+
{{asd.name||''}}:{{asd.fraction}}分
+
+
+
+
+
+
{{sanji.name||''}}
+
+
+
+
+
+ +
@@ -126,6 +152,9 @@ export default { {label:'启用',value:'0'}, ], statetest:'', + dialogFormVisible:false, + nodelist:[], + newlist:[] }; }, computed: { @@ -141,6 +170,74 @@ export default { this.zkhousePage() }, methods: { + goinfo(row){ + this.nodelist=[] + this.newlist=[] + this.dialogFormVisible=true; + this.$api.http.templatedelfindByTempId({tempId:row.id,}).then((res) => { + this.nodelist = res.data.list; + this.listCheckedchaifen() + }) + }, + listCheckedchaifen() { + let arr = []; + let level2 = []; + this.nodelist.forEach((item, index) => { + if (item.pid == 0) { + item.children = []; + arr.push(item); + } else { + level2.push(item); + } + }); + let resultArr = []; //去重后的数组 + var flag; + for (var i in arr) { + flag = true; + for (var j in resultArr) { + if (resultArr[j].id == arr[i].id) { + flag = false; + break; + } + } + if (flag) { + resultArr.push(arr[i]); + } + } + let resultArrlist = []; //去重后的数组 + var flags; + for (var i in level2) { + flags = true; + for (var j in resultArrlist) { + if (resultArrlist[j].id == level2[i].id) { + flags = false; + break; + } + } + if (flags) { + resultArrlist.push(level2[i]); + } + } + let level3 = []; + resultArrlist.forEach((res, index) => { + resultArr.forEach((asd) => { + if (res.pid == asd.id) { + res.children = []; + asd.children.push(res); + } + }); + }); + resultArrlist.forEach((xzd) => { + resultArr.forEach((asd) => { + asd.children.forEach((qwe) => { + if (xzd.pid == qwe.id) { + qwe.children.push(xzd); + } + }); + }); + }); + this.newlist = resultArr; + }, //停用 clickstateno(item){ this.$confirm('此操作将停用此模板, 是否继续?', '提示', { @@ -304,6 +401,14 @@ export default {