From c8448fd53c7e7fe5eb3a0990cf2ce37e6ec38859 Mon Sep 17 00:00:00 2001 From: douzhuo <17611323298@163.com> Date: Mon, 21 Feb 2022 19:07:56 +0800 Subject: [PATCH] tijiao --- src/page/wel.vue | 58 +- src/views/Statistics/BuildingContrast.vue | 996 +++++++++++----------- src/views/Statistics/index.js | 31 + 3 files changed, 579 insertions(+), 506 deletions(-) create mode 100644 src/views/Statistics/index.js diff --git a/src/page/wel.vue b/src/page/wel.vue index 59fced2..5bfc2dd 100644 --- a/src/page/wel.vue +++ b/src/page/wel.vue @@ -940,14 +940,14 @@
接待量
平均执行率 @@ -1007,14 +1007,14 @@
接待量
平均执行率 @@ -1089,7 +1089,9 @@ export default { houseId: "", houseList: [], houseRank: [], + allHouseRank: {}, // 全部的楼盘排名 companyRank: [], + allCompanyRank: {}, // 全部的排名列表 classatec: 1, classatec1: 0, classatec2: 0, @@ -1280,14 +1282,54 @@ export default { this.sysCompare = res.data.midB; this.orderBy = res.data.midC; if (this.role == 2) { - this.houseRank = res.data.accountRank; - this.companyRank = res.data.houseRank; + this.houseRank = res.data.accountRank.avgFraction; + this.companyRank = res.data.houseRank.avgFraction; + this.allHouseRank = res.data.houseRank + this.allCompanyRank = res.data.accountRank } else { - this.houseRank = res.data.houseRank; - this.companyRank = res.data.companyRank; + this.houseRank = res.data.houseRank.avgFraction || []; + this.allHouseRank = res.data.houseRank + this.allCompanyRank = res.data.companyRank + this.companyRank = res.data.companyRank.avgFraction || []; } }); }, + + // 选择公司类型切换 classatec1 公司/楼盘 classatec2 楼盘/顾问 + chooseCompanyRank(keys, index) { + this[keys] = index + console.log(keys) + if (this.role != 2) { + if (keys == 'classatec1') { + if (index == 0) { + this.companyRank = this.allCompanyRank.avgFraction + } else { + this.companyRank = this.allCompanyRank.receptionCount + } + } else { + if (index == 0) { + this.houseRank = this.allHouseRank.avgFraction + } else { + this.houseRank = this.allHouseRank.receptionCount + } + } + } else { + if (keys == 'classatec1') { + if (index == 0) { + this.houseRank = this.allCompanyRank.avgFraction + } else { + this.houseRank = this.allCompanyRank.receptionCount + } + } else { + if (index == 0) { + this.companyRank = this.allHouseRank.avgFraction + } else { + this.companyRank = this.allHouseRank.receptionCount + } + } + } + }, + //获取楼盘 zkhousePage() { this.$api.api diff --git a/src/views/Statistics/BuildingContrast.vue b/src/views/Statistics/BuildingContrast.vue index f8c7d53..55b1e38 100644 --- a/src/views/Statistics/BuildingContrast.vue +++ b/src/views/Statistics/BuildingContrast.vue @@ -2,7 +2,7 @@
-
接待时间:
+
接待时间:
近7天 @@ -17,12 +17,12 @@
@@ -42,259 +42,253 @@ > --> -
- 导出 -
+
+ 导出 +
- +
- - - - - - - - - - - - - - - + + - - - - - - @@ -574,10 +574,10 @@ export default { min-width: 1000px; padding-bottom: 100px; } -.cen-tab{ +.cen-tab { width: 100%; padding: 15px; - background: #FFFFFF; + background: #ffffff; margin-top: 15px; } .tophove { @@ -620,32 +620,32 @@ export default { } } -.app-box-san{ +.app-box-san { width: 100%; height: 400px; display: flex; margin-top: 15px; - .zuo{ + .zuo { flex: 1; height: 100%; margin-right: 15px; - background: #FFFFFF; + background: #ffffff; border-radius: 4px; - .title{ + .title { width: 100%; height: 55px; - border-bottom: 1px solid #E0E0E0; + border-bottom: 1px solid #e0e0e0; display: flex; align-content: center; - .text1{ - flex: 2; - line-height: 55px; - text-indent: 20px; - font-weight: 500; - font-size: 16px; - color: #333333; + .text1 { + flex: 2; + line-height: 55px; + text-indent: 20px; + font-weight: 500; + font-size: 16px; + color: #333333; } - .text2{ + .text2 { flex: 1; height: 55px; display: flex; @@ -653,26 +653,26 @@ export default { } } } - .you{ + .you { height: 100%; flex: 1; - background: #FFFFFF; + background: #ffffff; border-radius: 4px; - .title{ + .title { width: 100%; height: 55px; - border-bottom: 1px solid #E0E0E0; + border-bottom: 1px solid #e0e0e0; display: flex; align-content: center; - .text1{ - flex: 2; - line-height: 55px; - text-indent: 20px; - font-weight: 500; - font-size: 16px; - color: #333333; + .text1 { + flex: 2; + line-height: 55px; + text-indent: 20px; + font-weight: 500; + font-size: 16px; + color: #333333; } - .text2{ + .text2 { flex: 1; height: 55px; display: flex; @@ -682,56 +682,56 @@ export default { } } - .hejisan{ - width: 92%; - margin: 0 auto; - display: flex; - padding-top: 10px; - padding-bottom:10px; - .text1-1{ - color: #666666; - } - .text1-2{ - color: #333333; - margin-top: 10px; - } - } +.hejisan { + width: 92%; + margin: 0 auto; + display: flex; + padding-top: 10px; + padding-bottom: 10px; + .text1-1 { + color: #666666; + } + .text1-2 { + color: #333333; + margin-top: 10px; + } +} // 进度条 - .jinbox { - width: 100%; - height: 18px; - line-height: 18px; - display: flex; - font-size: 16px; - color: #2C3542; - margin-top: 10px; - .jinboxtit { - width: 14%; - height: 18px; - padding-right: 6px; - white-space: nowrap; - text-overflow:ellipsis; - overflow: hidden; - } - .jinbox-box { - width: 75%; - height: 100%; - border-radius: 8px; - background: #F2F2F2; - } - .boxbaifenbi { - height: 100%; - background:#60D7A0; - border-radius: 8px; - } - .boxbaifenbi2 { - height: 100%; - background: #5B8FF9; - } - .jinboxbott { - width: 16%; - text-indent: 16px; - } +.jinbox { + width: 100%; + height: 18px; + line-height: 18px; + display: flex; + font-size: 16px; + color: #2c3542; + margin-top: 10px; + .jinboxtit { + width: 14%; + height: 18px; + padding-right: 6px; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + } + .jinbox-box { + width: 75%; + height: 100%; + border-radius: 8px; + background: #f2f2f2; + } + .boxbaifenbi { + height: 100%; + background: #60d7a0; + border-radius: 8px; + } + .boxbaifenbi2 { + height: 100%; + background: #5b8ff9; } + .jinboxbott { + width: 16%; + text-indent: 16px; + } +} diff --git a/src/views/Statistics/index.js b/src/views/Statistics/index.js new file mode 100644 index 0000000..46c381d --- /dev/null +++ b/src/views/Statistics/index.js @@ -0,0 +1,31 @@ +var IframeOnClick = { + resolution: 200, + iframes: [], + interval: null, + Iframe: function () { + this.element = arguments[0]; + this.cb = arguments[1]; + }, + track: function (element, cb) { + this.iframes.push(new this.Iframe(element, cb)); + var _this = this; + this.interval = setInterval(function () { + _this.checkClick(); + }, this.resolution); + }, + checkClick: function () { + if (document.activeElement) { + var activeElement = document.activeElement; + for (var i in this.iframes) { + if (activeElement === this.iframes[i].element) { // user is in this Iframe + this.iframes[i].cb.apply(window, []); + var btn = document.getElementById("btn") + btn.focus() + } + } + } + } +}; +IframeOnClick.track(document.getElementById("iFrame"), function () { + console.log(11111); +}); \ No newline at end of file