diff --git a/src/views/Equipment/equipmentDetailList.vue b/src/views/Equipment/equipmentDetailList.vue index 9113c87..27bb0c9 100644 --- a/src/views/Equipment/equipmentDetailList.vue +++ b/src/views/Equipment/equipmentDetailList.vue @@ -9,6 +9,20 @@ padding-top: 18px; " > + + + + { diff --git a/src/views/Statistics/dataScreeAge.vue b/src/views/Statistics/dataScreeAge.vue index e6db22c..86ce031 100644 --- a/src/views/Statistics/dataScreeAge.vue +++ b/src/views/Statistics/dataScreeAge.vue @@ -121,12 +121,25 @@ > + + + + - + 接待量 @@ -150,7 +163,41 @@ - + + + + + + + + + + + + + + + + + + 查看详情 + + + + @@ -187,6 +234,7 @@ v-model="echarValue" style="width: 100px;margin-left:10px;" placeholder="请选择" + @change="echarChange" > - + 购买服务楼盘数 @@ -254,10 +302,195 @@ {{ thirdTab.activeEquipmentQuantity || 0 }} + + + 销售设备数 + + + {{ thirdTab.buyEquipQuantity || 0 }} + + - + + + + + + + + + {{ row.buyHouseQuantity || 0 }} + + + + + {{ row.activeUserQuantity }} + + + + + {{ row.newJoinUserQuantity || 0 }} + + + + + {{ row.receptionQuantity || 0 }} + + + + + {{ row.avgReceptionTime || 0 }} + + + + + {{ row.activeEquipmentQuantity || 0 }} + + + + + {{ row.buyEquipQuantity || 0 }} + + + + + + + + + + + {{ timeStr }} + + + + + + + + + + + + + + + + + + + + + @@ -274,6 +507,9 @@ export default { thirdTab: {}, selValue: "1", houseTypes:'0,1', + operaFlag: true, + echarValue: "0", + echarValue1: "0", choicValue: "", houseList: [], secindex: "1", @@ -313,6 +549,25 @@ export default { value: "2,3", }, ], + echarList1: [], + echarList: [], + dialogVisible: false, + dialogVisible1: false, + visible1: false, + visible2: false, + visible3: false, + visible4: false, + visible5: false, + info: {}, + elTitle: "", + timeStr: "", + currentPage: 1, + size: 10, + total: 10, + currentPage1: 1, + size1: 10, + total1: 10, + detailList:[] }; }, mounted() { @@ -320,7 +575,148 @@ export default { // this.tabtimetap(4); }, methods: { - sysChange(){ + goDetail1(row, str, idx) { + console.log(row); + + this.timeStr = ""; + this.elTitle = str; + this.detailList = []; + if (idx == 0) { + // 跳转楼盘管理 + this.$router.push({ + path:'/building/index', + query:{time:row.date} + }) + } else if (idx == 1) { + } else if (idx == 2) { + } else if (idx == 3) { + } else if (idx == 4) { + } else if (idx == 5) { + this.$router.push({ + path:'/Equipment/index', + query:{time:row.date} + }) + } else if (idx == 6) { + this.visible1 = false; + this.visible2 = false; + this.visible3 = false; + this.visible4 = false; + this.visible5 = true; + this.buyEquipmentQuantity(row.date); + this.dialogVisible = true; + } + }, + buyEquipmentQuantity(date) { + this.$api.api + .buyEquipmentQuantity({ + agentId: this.selValue == 0 ? this.choicValue : null, + orgCode: this.selValue == 1 ? this.choicValue : null, + orgType: localStorage.getItem("orgType"), + startDate: date, + endDate: date, + dateType: null, + houseTypes: this.houseTypes, + current: this.currentPage, + size: this.size, + queryOrgType:this.selValue/1+1, + }) + .then((res) => { + // console.log(res); + this.detailList = res.data.records; + this.total = res.data.total; + }); + }, + echarChange(e) { + if (e == 0) { + this.dataOverviewWithSystemWithLook(); + } else { + //获取表格数据 + this.dataOverviewWithSystemWithLookWithTable(); + } + }, + dataOverviewWithSystemWithLookWithTable() { + this.$api.api + .dataOverviewWithSystemWithLookWithTable({ + agentId: localStorage.getItem('agentId'), + orgCode: this.selValue == 1 ? this.choicValue : null, + orgType: localStorage.getItem("orgType"), + startDate: this.dateType1 ? "" : this.customtime1[0], + endDate: this.dateType1 ? "" : this.customtime1[1], + dateType: this.dateType1, + houseTypes: this.houseTypes, + current: this.currentPage1, + size: this.size1, + queryOrgType:this.selValue/1+1, + // hour + }) + .then((res) => { + // console.log(res); + this.echarList = res.data.records; + this.total1 = res.data.total; + }); + }, + handleSizeChange(val) { + console.log(`每页 ${val} 条`); + this.size = val; + // this.correctFindbypage(); + }, + handleCurrentChange(val) { + console.log(`当前页: ${val}`); + this.currentPage = val; + // this.correctFindbypage(); + }, + handleSizeChange1(val) { + console.log(`每页 ${val} 条`); + this.size1 = val; + // this.correctFindbypage(); + }, + handleCurrentChange1(val) { + console.log(`当前页: ${val}`); + this.currentPage1 = val; + // this.correctFindbypage(); + }, + goDetail(row) { + this.dialogVisible = true; + this.timeStr = row.time; + this.elTitle = "楼盘实时统计"; + this.realTimeStatisticsOfTime(row.hour); + this.visible1 = true; + this.visible2 = false; + this.visible3 = false; + this.visible4 = false; + }, + realTimeStatisticsOfTime(hour) { + this.$api.api + .realTimeStatisticsOfTime({ + agentId: this.selValue == 0 ? this.choicValue : null, + orgCode: this.selValue == 1 ? this.choicValue : null, + orgType: localStorage.getItem("orgType"), + startDate: this.dateType1 ? "" : this.customtime1[0], + endDate: this.dateType1 ? "" : this.customtime1[1], + dateType: this.dateType1, + houseTypes: this.houseTypes, + queryOrgType:this.selValue/1+1, + current: this.currentPage, + size: this.size, + hour, + }) + .then((res) => { + console.log(res); + this.detailList = res.data.records; + this.total = res.data.total; + }); + }, + echarChange(e) { + if (e == 0) { + this.dataOverviewWithSystemWithLook(); + } else { + //获取表格数据 + this.dataOverviewWithSystemWithLookWithTable(); + } + }, + sysChange(){ + this.choicValue='' + this.selValue=this.options[0].value this.dataOverViewWithSystem(); this.dataOverviewWithSystemWithDay(); this.dataOverviewWithSystemWithLook(); @@ -381,6 +777,7 @@ export default { endDate: this.dateType1 ? "" : this.customtime1[1], dateType: this.dateType1, houseTypes:this.houseTypes, + queryOrgType:this.selValue/1+1, }) .then((res) => { console.log(res); @@ -389,6 +786,39 @@ export default { // 将数据给一个指定值然后设置一个方法还进行tab切换的时候调用 this.secondTab = res.data; // 调用方法 + // 处理数据 + let arr = []; + res.data.todayActiveUserList.map((item, index) => { + let obj = {}; + if (index == 23) { + obj.time = + item.time.substring(11, 16) + + "-" + + res.data.todayActiveUserList[0].time.substring(11, 16); + // return + } else { + // console.log(item.time,res.data.todayActiveUserList[index/1+1].time); + obj.time = + item.time.substring(11, 16) + + "-" + + res.data.todayActiveUserList[index / 1 + 1].time.substring( + 11, + 16 + ); + } + obj.hour = index; + // 接待量 + obj.receptionQuantityInToday = + res.data.todayReceptionList[index].data; + // 活跃用户 + obj.activeUserQuantity = res.data.todayActiveUserList[index].data; + // 活跃设备 + obj.activeEquipmentQuantity = + res.data.todayActiveEquipmentList[index].data; + arr.push(obj); + }); + // console.log(arr); + this.echarList1 = arr; this.getChars1(1); }); }, @@ -404,6 +834,7 @@ export default { orgCode: this.selValue == 1 ? this.choicValue : null, orgType: localStorage.getItem("orgType"), houseTypes:this.houseTypes, + queryOrgType:this.selValue/1+1, }) .then((res) => { console.log(res); @@ -514,6 +945,12 @@ export default { timeDate.push(item.time.substring(5, 10)); arr1.push(item.data); }); + }else if (idx == 9) { + Strname = ["销售设备数"]; + this.thirdTab.buyEquipQuantityList.map((item) => { + timeDate.push(item.time.substring(5, 10)); + arr1.push(item.data); + }); } let arr = [ { @@ -534,6 +971,7 @@ export default { orgCode: this.selValue == 1 ? this.choicValue : null, orgType: localStorage.getItem("orgType"), houseTypes:this.houseTypes, + queryOrgType:this.selValue/1+1, }) .then((res) => { // console.log(res); diff --git a/src/views/Statistics/dataScreeOrg.vue b/src/views/Statistics/dataScreeOrg.vue index bab923f..60c1f47 100644 --- a/src/views/Statistics/dataScreeOrg.vue +++ b/src/views/Statistics/dataScreeOrg.vue @@ -196,10 +196,23 @@ > + + + + - + --> - + + + + + + + + + + + + + + 查看详情 + + + + @@ -264,6 +311,7 @@ v-model="echarValue" style="width: 100px; margin-left: 10px" placeholder="请选择" + @change="echarChange" > - + + + + + + + {{ row.receptionQuantity || 0 }} + + + + + {{ row.avgReceptionTime || 0 }} + + + + + {{ row.activeEquipmentQuantity || 0 }} + + + + + + + + + + + + {{ timeStr }} + + + + + + + + + + + + + + + + + + + + + @@ -384,6 +605,9 @@ export default { dateType1: 1, customtime1: [], houseTypes:'0,1', + operaFlag: true, + echarValue: "0", + echarValue1: "0", options: [ { label: "代理商", @@ -414,6 +638,25 @@ export default { value: "2,3", }, ], + echarList1: [], + echarList: [], + dialogVisible: false, + dialogVisible1: false, + visible1: false, + visible2: false, + visible3: false, + visible4: false, + visible5: false, + info: {}, + elTitle: "", + timeStr: "", + currentPage: 1, + size: 10, + total: 10, + currentPage1: 1, + size1: 10, + total1: 10, + detailList:[] }; }, mounted() { @@ -421,6 +664,145 @@ export default { // this.tabtimetap(4); }, methods: { + goDetail1(row, str, idx) { + console.log(row); + + this.timeStr = ""; + this.elTitle = str; + this.detailList = []; + if (idx == 0) { + // 跳转楼盘管理 + this.$router.push({ + path:'/building/index', + query:{time:row.date} + }) + } else if (idx == 1) { + } else if (idx == 2) { + } else if (idx == 3) { + } else if (idx == 4) { + } else if (idx == 5) { + this.$router.push({ + path:'/Equipment/index', + query:{time:row.date} + }) + } else if (idx == 6) { + this.visible1 = false; + this.visible2 = false; + this.visible3 = false; + this.visible4 = false; + this.visible5 = true; + this.buyEquipmentQuantity(row.date); + this.dialogVisible = true; + } + }, + buyEquipmentQuantity(date) { + this.$api.api + .buyEquipmentQuantity({ + agentId: localStorage.getItem('agentId'), + orgCode: localStorage.getItem('orgCode'), + orgType: localStorage.getItem("orgType"), + startDate: date, + endDate: date, + dateType: null, + houseTypes: this.houseTypes, + current: this.currentPage, + size: this.size, + queryOrgType:3, + }) + .then((res) => { + // console.log(res); + this.detailList = res.data.records; + this.total = res.data.total; + }); + }, + echarChange(e) { + if (e == 0) { + this.dataOverviewWithSystemWithLook(); + } else { + //获取表格数据 + this.dataOverviewWithSystemWithLookWithTable(); + } + }, + dataOverviewWithSystemWithLookWithTable() { + this.$api.api + .dataOverviewWithSystemWithLookWithTable({ + agentId: localStorage.getItem('agentId'), + orgCode: localStorage.getItem('orgCode'), + orgType: localStorage.getItem("orgType"), + startDate: this.dateType1 ? "" : this.customtime1[0], + endDate: this.dateType1 ? "" : this.customtime1[1], + dateType: this.dateType1, + houseTypes: this.houseTypes, + current: this.currentPage1, + size: this.size1, + queryOrgType:3, + // hour + }) + .then((res) => { + // console.log(res); + this.echarList = res.data.records; + this.total1 = res.data.total; + }); + }, + handleSizeChange(val) { + console.log(`每页 ${val} 条`); + this.size = val; + // this.correctFindbypage(); + }, + handleCurrentChange(val) { + console.log(`当前页: ${val}`); + this.currentPage = val; + // this.correctFindbypage(); + }, + handleSizeChange1(val) { + console.log(`每页 ${val} 条`); + this.size1 = val; + // this.correctFindbypage(); + }, + handleCurrentChange1(val) { + console.log(`当前页: ${val}`); + this.currentPage1 = val; + // this.correctFindbypage(); + }, + goDetail(row) { + this.dialogVisible = true; + this.timeStr = row.time; + this.elTitle = "楼盘实时统计"; + this.realTimeStatisticsOfTime(row.hour); + this.visible1 = true; + this.visible2 = false; + this.visible3 = false; + this.visible4 = false; + }, + realTimeStatisticsOfTime(hour) { + this.$api.api + .realTimeStatisticsOfTime({ + agentId: localStorage.getItem('agentId'), + orgCode: localStorage.getItem('orgCode'), + orgType: localStorage.getItem("orgType"), + startDate: this.dateType1 ? "" : this.customtime1[0], + endDate: this.dateType1 ? "" : this.customtime1[1], + dateType: this.dateType1, + houseTypes: this.houseTypes, + current: this.currentPage, + size: this.size, + hour, + queryOrgType:3, + }) + .then((res) => { + console.log(res); + this.detailList = res.data.records; + this.total = res.data.total; + }); + }, + echarChange(e) { + if (e == 0) { + this.dataOverviewWithSystemWithLook(); + } else { + //获取表格数据 + this.dataOverviewWithSystemWithLookWithTable(); + } + }, valuechange() { this.dateType = 4; this.cardindex = 1; @@ -481,6 +863,7 @@ export default { endDate: this.dateType1 ? "" : this.customtime1[1], dateType: this.dateType1, houseTypes:this.houseTypes, + queryOrgType:3, }) .then((res) => { console.log(res); @@ -489,6 +872,39 @@ export default { // 将数据给一个指定值然后设置一个方法还进行tab切换的时候调用 this.secondTab = res.data; // 调用方法 + // 处理数据 + let arr = []; + res.data.todayActiveUserList.map((item, index) => { + let obj = {}; + if (index == 23) { + obj.time = + item.time.substring(11, 16) + + "-" + + res.data.todayActiveUserList[0].time.substring(11, 16); + // return + } else { + // console.log(item.time,res.data.todayActiveUserList[index/1+1].time); + obj.time = + item.time.substring(11, 16) + + "-" + + res.data.todayActiveUserList[index / 1 + 1].time.substring( + 11, + 16 + ); + } + obj.hour = index; + // 接待量 + obj.receptionQuantityInToday = + res.data.todayReceptionList[index].data; + // 活跃用户 + obj.activeUserQuantity = res.data.todayActiveUserList[index].data; + // 活跃设备 + obj.activeEquipmentQuantity = + res.data.todayActiveEquipmentList[index].data; + arr.push(obj); + }); + // console.log(arr); + this.echarList1 = arr; this.getChars1(1); }); }, @@ -503,6 +919,7 @@ export default { orgCode: localStorage.getItem('orgCode'), orgType: localStorage.getItem("orgType"), houseTypes:this.houseTypes, + queryOrgType:3, }) .then((res) => { console.log(res); @@ -636,6 +1053,7 @@ export default { orgCode: localStorage.getItem('orgCode'), orgType: localStorage.getItem("orgType"), houseTypes:this.houseTypes, + queryOrgType:3, }) .then((res) => { // console.log(res); diff --git a/src/views/Statistics/dataScreeSys.vue b/src/views/Statistics/dataScreeSys.vue index 4ee0f31..6f5b2df 100644 --- a/src/views/Statistics/dataScreeSys.vue +++ b/src/views/Statistics/dataScreeSys.vue @@ -692,6 +692,7 @@ export default { info: {}, elTitle: "", timeStr: "", + }; }, mounted() { @@ -702,9 +703,9 @@ export default { console.log("有全部"); this.options.push({ label: "全部", - value: "3", + value: "-1", }); - this.selValue = "3"; + this.selValue = "-1"; this.agentissow = true; this.operaFlag = false; } else { @@ -716,21 +717,30 @@ export default { methods: { goDetail1(row, str, idx) { console.log(row); - this.dialogVisible = true; + this.timeStr = ""; this.elTitle = str; this.detailList = []; if (idx == 0) { + // 跳转楼盘管理 + this.$router.push({ + path:'/building/index', + query:{time:row.date} + }) } else if (idx == 1) { - // this.visible1 = true; - // this.visible2 = false; - // this.visible3 = false; - // this.visible4 = false; - // this.visible5 = false; + // // 跳转楼盘管理 + // this.$router.push({ + // path:'/building/index', + // query:{time:row.date} + // }) } else if (idx == 2) { } else if (idx == 3) { } else if (idx == 4) { } else if (idx == 5) { + this.$router.push({ + path:'/Equipment/index', + query:{time:row.date} + }) } else if (idx == 6) { this.visible1 = false; this.visible2 = false; @@ -738,6 +748,7 @@ export default { this.visible4 = false; this.visible5 = true; this.buyEquipmentQuantity(row.date); + this.dialogVisible = true; } }, buyEquipmentQuantity(date) { @@ -746,6 +757,7 @@ export default { agentId: this.selValue == 0 ? this.choicValue : null, orgCode: this.selValue == 1 ? this.choicValue : null, orgType: localStorage.getItem("orgType"), + queryOrgType:this.selValue/1+1, startDate: date, endDate: date, dateType: null, @@ -779,6 +791,7 @@ export default { houseTypes: this.houseTypes, current: this.currentPage1, size: this.size1, + queryOrgType:this.selValue/1+1, // hour }) .then((res) => { @@ -830,6 +843,7 @@ export default { current: this.currentPage, size: this.size, hour, + queryOrgType:this.selValue/1+1, }) .then((res) => { console.log(res); @@ -858,7 +872,7 @@ export default { }, // 当选择的代理商或者楼盘切换时 selChange(e) { - if (e == 3) { + if (e == -1) { this.operaFlag = false; this.agentissow = true; return; @@ -879,6 +893,8 @@ export default { } }, sysChange() { + this.choicValue='' + this.selValue=this.options[0].value this.dataOverViewWithSystem(); this.dataOverviewWithSystemWithDay(); this.dataOverviewWithSystemWithLook(); @@ -898,7 +914,7 @@ export default { this.dataOverviewWithSystemWithDay(); this.dataOverviewWithSystemWithLook(); }); - } else if (this.selValue == 2) { + } else if (this.selValue == 0) { this.$api.api .findMyAgent({ orgType: localStorage.getItem("orgType"), @@ -925,6 +941,7 @@ export default { endDate: this.dateType1 ? "" : this.customtime1[1], dateType: this.dateType1, houseTypes: this.houseTypes, + queryOrgType:this.selValue/1+1, }) .then((res) => { this.secondTab = res.data; @@ -976,6 +993,7 @@ export default { orgCode: this.selValue == 1 ? this.choicValue : null, houseTypes: this.houseTypes, orgType: localStorage.getItem("orgType"), + queryOrgType:this.selValue/1+1, }) .then((res) => { // console.log(res); @@ -1115,6 +1133,7 @@ export default { orgCode: this.selValue == 1 ? this.choicValue : null, orgType: localStorage.getItem("orgType"), houseTypes: this.houseTypes, + queryOrgType:this.selValue/1+1, }) .then((res) => { this.firstTab = res.data; diff --git a/src/views/Statistics/houseDataSys.vue b/src/views/Statistics/houseDataSys.vue index f2e8723..e51d7fe 100644 --- a/src/views/Statistics/houseDataSys.vue +++ b/src/views/Statistics/houseDataSys.vue @@ -3,12 +3,27 @@ + + + + + @@ -29,7 +44,7 @@ - + import * as echarts from "echarts"; +import { getStore, setStore } from "@/util/store"; export default { data() { return { @@ -258,13 +274,46 @@ export default { value: "1", }, ], + houseTypes: "0,1", + options2: [ + { + label: "正式数据", + value: "0,1", + }, + { + label: "测试数据", + value: "2,3", + }, + ], + operaFlag:true, + info:{}, }; }, mounted() { + // 获取用户信息 + this.info = getStore({ name: "userInfo" }); + // 当他系统后台时 + if (localStorage.getItem("orgType") == 0 && this.info.userRoleType == 1) { + console.log("有全部"); + // this.options.push({ + // label: "全部", + // value: "-1", + // }); + this.selValue = "-1"; + // this.operaFlag = false; + } else { + // this.operaFlag = true; + } this.getList(); this.tabtimetap(4); }, methods: { + sysChange() { + this.choicValue='' + this.selValue=this.options[0].value + this.houseDataAll(); + this.houseTrends(); + }, // 获取tab一 houseDataAll() { this.$api.api @@ -278,6 +327,8 @@ export default { : localStorage.getItem("agentId"), orgCode: this.selValue == 1 ? this.choicValue : null, orgType: localStorage.getItem("orgType"), + houseTypes: this.houseTypes, + queryOrgType:this.selValue/1+1, }) .then((res) => { this.firstTab = res.data; @@ -302,6 +353,8 @@ export default { : localStorage.getItem("agentId"), orgCode: this.selValue == 1 ? this.choicValue : null, orgType: localStorage.getItem("orgType"), + houseTypes: this.houseTypes, + queryOrgType:this.selValue/1+1, }) .then((res) => { // 数据处理 @@ -492,7 +545,7 @@ export default { this.houseDataAll(); this.houseTrends(); }); - } else { + } else if (this.selValue == 0) { this.$api.api .findMyAgent({ orgType: localStorage.getItem("orgType"), @@ -502,6 +555,9 @@ export default { this.houseDataAll(); this.houseTrends(); }); + }else{ + this.houseDataAll(); + this.houseTrends(); } }, secondChange(i) { diff --git a/src/views/Statistics/trend.vue b/src/views/Statistics/trend.vue index e666bb7..d59d8c7 100644 --- a/src/views/Statistics/trend.vue +++ b/src/views/Statistics/trend.vue @@ -3,6 +3,20 @@ + + + +