From 9acca8211ef2a950096b4a85ff36006b2a4bee32 Mon Sep 17 00:00:00 2001 From: lancer <1905818361@qq.com> Date: Fri, 5 Nov 2021 19:27:48 +0800 Subject: [PATCH] init --- src/api/modules/api.js | 17 + src/views/Customer/AgentManagement.vue | 52 +- src/views/Customer/Companymanagement.vue | 11 +- src/views/Statistics/dataScreeAge.vue | 4 +- src/views/Statistics/dataScreeOrg.vue | 4 +- src/views/Statistics/dataScreeSys.vue | 5 +- src/views/Statistics/houseDataSys.vue | 133 ++- src/views/Statistics/trend.vue | 993 +++++++++++++++++++++++ src/views/admin/user/index.vue | 2 + src/views/building/index.vue | 6 +- vue.config.js | 2 +- 11 files changed, 1198 insertions(+), 31 deletions(-) create mode 100644 src/views/Statistics/trend.vue diff --git a/src/api/modules/api.js b/src/api/modules/api.js index 0c0ed41..5e0b91c 100644 --- a/src/api/modules/api.js +++ b/src/api/modules/api.js @@ -877,3 +877,20 @@ export function houseTrends(data) { data }) } +// 趋势分析tab +export function receptionOverviewOfSystem(data) { + return request({ + url: 'autoSR/cusStageStatistics/receptionOverviewOfSystem', + method:'post', + data + }) +} + +// 趋势分析折线图 +export function receptionDataOfSystem(data) { + return request({ + url: 'autoSR/cusStageStatistics/receptionDataOfSystem', + method:'post', + data + }) +} diff --git a/src/views/Customer/AgentManagement.vue b/src/views/Customer/AgentManagement.vue index 5daf0a8..2577ba4 100644 --- a/src/views/Customer/AgentManagement.vue +++ b/src/views/Customer/AgentManagement.vue @@ -221,10 +221,10 @@ --> - + - +
-
+
活跃楼盘数
- {{ secondTab.receptionQuantity || 0 }} + {{ compare.houseQuantity || 0 }} +
+
+
+ 对比时段: {{compare1.houseQuantity||0}} +
+
+ {{compare2.houseQuantity||0}} +
-
+
服务器内楼盘数
- {{ secondTab.receptionQuantity || 0 }} + {{ compare.houseQofEnough || 0 }} +
+
+
+ 对比时段: {{compare1.houseQofEnough||0}} +
+
+ {{compare2.houseQofEnough||0}} +
+ +
+ + +
@@ -177,6 +229,7 @@ export default { }, }, firstTab: {}, + tableData:[], secondTab: {}, thirdTab: {}, selValue: "0", @@ -189,6 +242,7 @@ export default { dateType: 4, compare: {}, compare1: {}, + compare2: {}, time: [], customtime: [], Confirmthecontrast: false, @@ -243,12 +297,14 @@ export default { if (this.selectTime1) { // 有对比 this.compare1 = res.data.secondData; + // 将得到的三者的数据进行组装为一个数组 + this.compare2 = res.data.thirdData; } this.getChars(1); }); }, getChars(idx) { - if (!this.timeSelect1) { + if (!this.selectTime1) { // console.log(idx); let Strname = []; let timeDate = []; @@ -280,29 +336,72 @@ export default { ]; this.SwitchCARDS(arr, "main", timeDate, Strname); } else { - let Strname = ["选择时间", "对比时间"]; + console.log(223); + let Strname = ["时段一", "时段二"]; let timeDate = []; // 判断是第几个然后对数据进行渲染 // 先处理时间 let arr1 = []; let arr2 = []; + let arr3 = []; if (idx == 1) { - this.compare.activeHouseQuantityList.map((item) => { - timeDate.push(item.time.substring(5, 10)); + this.compare.activeHouseQuantityList.map((item, idx) => { + timeDate.push( + item.time.substring(5, 10) + + "VS" + + this.compare1.activeHouseQuantityList[idx].time.substring(5, 10) + ); arr1.push(item.data); }); this.compare1.activeHouseQuantityList.map((item) => { arr2.push(item.data); }); + this.compare2.contrastList.map((item) => { + arr3.push(item); + }); } else if (idx == 2) { - this.compare.houseQofEnoughList.map((item) => { - timeDate.push(item.time.substring(5, 10)); + this.compare.houseQofEnoughList.map((item, idx) => { + timeDate.push( + item.time.substring(5, 10) + + "VS" + + this.compare1.houseQofEnoughList[idx].time.substring(5, 10) + ); arr1.push(item.data); }); this.compare1.houseQofEnoughList.map((item) => { - arr1.push(item.data); + arr2.push(item.data); + }); + this.compare2.contrastList2.map((item) => { + arr3.push(item); }); } + let arr = [ + { + name: Strname[0], + data: arr1, + type: "line", + smooth: true, + }, + { + name: Strname[1], + data: arr2, + type: "line", + smooth: true, + }, + ]; + this.SwitchCARDS(arr, "main", timeDate, Strname); + let tableData = []; + timeDate.map((item,idx) => { + let obj = { + time:item, + data1:arr1[idx], + data2:arr2[idx], + data3:arr3[idx], + }; + tableData.push(obj) + }); + this.tableData=tableData + // console.log(tableData); } }, //时间tab切换 @@ -368,7 +467,7 @@ export default { // 当为楼盘选择时 if (this.selValue == 1) { this.$api.api - .findHouseByUser({ + .findMyOrg({ orgType: localStorage.getItem("orgType"), }) .then((res) => { @@ -757,4 +856,12 @@ export default { display: flex; justify-content: space-between; } +.text33{ + font-size: 12px; + text-indent: 20px; + line-height: 20px; + display: flex; + justify-content: space-between; + margin-right: 20px; +} diff --git a/src/views/Statistics/trend.vue b/src/views/Statistics/trend.vue new file mode 100644 index 0000000..f6ea119 --- /dev/null +++ b/src/views/Statistics/trend.vue @@ -0,0 +1,993 @@ + + + + + diff --git a/src/views/admin/user/index.vue b/src/views/admin/user/index.vue index 6e8cb09..193086a 100644 --- a/src/views/admin/user/index.vue +++ b/src/views/admin/user/index.vue @@ -1378,6 +1378,8 @@ export default { orgType:localStorage.getItem('orgType'), accountId:res.data.sysUser.accountId, username:res.data.sysUser.username, + agentId:localStorage.getItem('agentId'), + orgCode:localStorage.getItem('orgCode'), }) .then(res1=>{ // console.log(res1); diff --git a/src/views/building/index.vue b/src/views/building/index.vue index 10f742e..ff5b023 100644 --- a/src/views/building/index.vue +++ b/src/views/building/index.vue @@ -730,10 +730,11 @@ export default { // console.log(valid,this.operaForm); this.$api.api .zkoperationrecordSaveHouse({ - orgType: this.idx==0?'1':'2', + orgType: 3, accountIds: this.operaForm.operationalPeople.join(","), orgId: this.operaForm.orgId, orgCode: this.operaForm.orgCode, + operationType:this.idx==0?'1':'2' }) .then((res) => { console.log(res); @@ -756,8 +757,9 @@ export default { zkoperationrecordFindByOrg(orgId,idx) { this.$api.api .zkoperationrecordFindByOrg({ - orgType: idx==0?'1':'2', + orgType:3, orgId, + operationType:this.idx==0?'1':'2' }) .then((res) => { // console.log(res); diff --git a/vue.config.js b/vue.config.js index 7cb07d5..1fc5a6b 100644 --- a/vue.config.js +++ b/vue.config.js @@ -7,7 +7,7 @@ const url = 'http://39.97.167.65:9999' //测试 // const url = 'http://192.168.31.169:9999' //长龙 // const url = 'http://192.168.31.133:9999' //嘉豪 // const url = 'http://192.168.31.100:9999' //王笑 -// const url = 'http://68jyh3.natappfree.cc' //王笑 +// const url = 'http://mp7i3c.natappfree.cc' //王笑 const CompressionWebpackPlugin = require('compression-webpack-plugin') const productionGzipExtensions = ['js', 'css']