Browse Source

init

newStyle
lancer 3 years ago
parent
commit
ef8bd3e7fb
9 changed files with 1053 additions and 37 deletions
  1. +52
    -12
      src/views/Equipment/equipmentDetailList.vue
  2. +5
    -0
      src/views/Equipment/index.vue
  3. +4
    -3
      src/views/Equipment/state.vue
  4. +443
    -5
      src/views/Statistics/dataScreeAge.vue
  5. +422
    -4
      src/views/Statistics/dataScreeOrg.vue
  6. +29
    -10
      src/views/Statistics/dataScreeSys.vue
  7. +58
    -2
      src/views/Statistics/houseDataSys.vue
  8. +34
    -0
      src/views/Statistics/trend.vue
  9. +6
    -1
      src/views/building/index.vue

+ 52
- 12
src/views/Equipment/equipmentDetailList.vue View File

@@ -9,6 +9,20 @@
padding-top: 18px;
"
>
<el-select
v-model="houseTypes"
@change="sysChange"
style="width: 100px; margin-right: 10px"
placeholder="请选择"
>
<el-option
v-for="item in options2"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
<!-- <span class="demonstration">楼盘名称:</span> -->
<el-select
v-model="selValue"
@@ -842,6 +856,17 @@ export default {
label: "完整录音",
},
],
options2: [
{
label: "正式数据",
value: "0,1",
},
{
label: "测试数据",
value: "2,3",
},
],
houseTypes:'0,1'
};
},
computed: {
@@ -877,6 +902,13 @@ export default {
// this.getTableList()
},
methods: {
sysChange(){
this.selValue='0'
this.choicValue = "";
this.timeType = 4;
this.houseId='';
this.getHouseList();
},
selChange() {
this.choicValue = "";
this.timeType = 4;
@@ -895,13 +927,15 @@ export default {
// pageSize: this.pageNum,
startDate: this.page.openTime,
endDate: this.page.closeTime,
agentId: localStorage.getItem("orgType")==1?localStorage.getItem("agentId"):this.selValue == 0 ? this.houseId : 'null',
orgCode: localStorage.getItem("orgType")==2?localStorage.getItem("orgCode"):this.selValue == 1 ? this.houseId : 'null',
houseId: localStorage.getItem("orgType")==3?localStorage.getItem("houseId"):this.selValue == 2 ? this.houseId : 'null',
agentId: localStorage.getItem("orgType")==1?localStorage.getItem("agentId"):this.selValue == 0 ? this.houseId : null,
orgCode: localStorage.getItem("orgType")==2?localStorage.getItem("orgCode"):this.selValue == 1 ? this.houseId : null,
houseId: localStorage.getItem("orgType")==3?localStorage.getItem("houseId"):this.selValue == 2 ? this.houseId : null,
timeType: this.timeType,
contrastStartDate: this.selectTime,
contrastEndDate: this.selectTime1,
orgType: localStorage.getItem("orgType"),
queryOrgType:this.selValue/1+1,
houseTypes: this.houseTypes,
};
obj.timeType == -1 ? (obj.timeType = "") : (obj.timeType = obj.timeType);
obj.timeType == -1 ? (obj.timeType = "") : (obj.timeType = obj.timeType);
@@ -1154,13 +1188,15 @@ export default {
size: this.pageSize,
startDate: this.page.openTime,
endDate: this.page.closeTime,
agentId: localStorage.getItem("orgType")==1?localStorage.getItem("agentId"):this.selValue == 0 ? this.houseId : 'null',
orgCode: localStorage.getItem("orgType")==2?localStorage.getItem("orgCode"):this.selValue == 1 ? this.houseId : 'null',
houseId: localStorage.getItem("orgType")==3?localStorage.getItem("houseId"):this.selValue == 2 ? this.houseId : 'null',
agentId: localStorage.getItem("orgType")==1?localStorage.getItem("agentId"):this.selValue == 0 ? this.houseId : null,
orgCode: localStorage.getItem("orgType")==2?localStorage.getItem("orgCode"):this.selValue == 1 ? this.houseId : null,
houseId: localStorage.getItem("orgType")==3?localStorage.getItem("houseId"):this.selValue == 2 ? this.houseId : null,
timeType: this.timeType,
contrastStartDate: this.selectTime,
contrastEndDate: this.selectTime1,
orgType: localStorage.getItem("orgType"),
queryOrgType:this.selValue/1+1,
houseTypes: this.houseTypes,
};
obj.timeType == -1 ? (obj.timeType = "") : (obj.timeType = obj.timeType);
axios({
@@ -1493,13 +1529,15 @@ export default {
let obj = {
startDate: this.page.openTime,
endDate: this.page.closeTime,
agentId: localStorage.getItem("orgType")==1?localStorage.getItem("agentId"):this.selValue == 0 ? this.houseId : 'null',
orgCode: localStorage.getItem("orgType")==2?localStorage.getItem("orgCode"):this.selValue == 1 ? this.houseId : 'null',
houseId: localStorage.getItem("orgType")==3?localStorage.getItem("houseId"):this.selValue == 2 ? this.houseId : 'null',
agentId: localStorage.getItem("orgType")==1?localStorage.getItem("agentId"):this.selValue == 0 ? this.houseId : null,
orgCode: localStorage.getItem("orgType")==2?localStorage.getItem("orgCode"):this.selValue == 1 ? this.houseId : null,
houseId: localStorage.getItem("orgType")==3?localStorage.getItem("houseId"):this.selValue == 2 ? this.houseId : null,
timeType: this.timeType,
contrastStartDate: this.selectTime,
contrastEndDate: this.selectTime1,
orgType: localStorage.getItem("orgType"),
queryOrgType:this.selValue/1+1,
houseTypes: this.houseTypes,
};
obj.timeType == -1 ? (obj.timeType = "") : (obj.timeType = obj.timeType);
axios({
@@ -1654,11 +1692,13 @@ export default {
pageSize: this.page.pageSize,
startDate: this.page.openTime,
endDate: this.page.closeTime,
agentId: localStorage.getItem("orgType")==1?localStorage.getItem("agentId"):this.selValue == 0 ? this.houseId : 'null',
orgCode: localStorage.getItem("orgType")==2?localStorage.getItem("orgCode"):this.selValue == 1 ? this.houseId : 'null',
houseId: localStorage.getItem("orgType")==3?localStorage.getItem("houseId"):this.selValue == 2 ? this.houseId : 'null',
agentId: localStorage.getItem("orgType")==1?localStorage.getItem("agentId"):this.selValue == 0 ? this.houseId : null,
orgCode: localStorage.getItem("orgType")==2?localStorage.getItem("orgCode"):this.selValue == 1 ? this.houseId : null,
houseId: localStorage.getItem("orgType")==3?localStorage.getItem("houseId"):this.selValue == 2 ? this.houseId : null,
timeType: this.timeType,
orgType: localStorage.getItem("orgType"),
queryOrgType:this.selValue/1+1,
houseTypes: this.houseTypes,
};
obj.timeType == -1 ? (obj.timeType = "") : (obj.timeType = obj.timeType);
axios({


+ 5
- 0
src/views/Equipment/index.vue View File

@@ -883,6 +883,11 @@ export default {
this.euq_index_normal = this.permissions["euq_index_normal"];
},
mounted() {
if(this.$route.query.time){
this.time=[this.$route.query.time,this.$route.query.time]
this.searchForm.startDate = this.time[0];
this.searchForm.endDate = this.time[1];
}
// 获取设备列表
this.equipmentManagement();
// 获取批次列表


+ 4
- 3
src/views/Equipment/state.vue View File

@@ -919,10 +919,11 @@ export default {
// orgCode: localStorage.getItem("orgCode"),
// agentId: localStorage.getItem("agentId"),
// houseId: localStorage.getItem("houseId"),
agentId: localStorage.getItem("orgType")==1?localStorage.getItem("agentId"):this.selValue == 0 ? this.choicValue : 'null',
orgCode: localStorage.getItem("orgType")==2?localStorage.getItem("orgCode"):this.selValue == 1 ? this.choicValue : 'null',
houseId: localStorage.getItem("orgType")==3?localStorage.getItem("houseId"):this.selValue == 2 ? this.choicValue : 'null',
agentId: localStorage.getItem("orgType")==1?localStorage.getItem("agentId"):this.selValue == 0 ? this.choicValue : null,
orgCode: localStorage.getItem("orgType")==2?localStorage.getItem("orgCode"):this.selValue == 1 ? this.choicValue : null,
houseId: localStorage.getItem("orgType")==3?localStorage.getItem("houseId"):this.selValue == 2 ? this.choicValue : null,
orgType: localStorage.getItem("orgType"),
queryOrgType:this.selValue/1+1,
...this.searchForm,
})
.then((res) => {


+ 443
- 5
src/views/Statistics/dataScreeAge.vue View File

@@ -121,12 +121,25 @@
>
</el-date-picker>
</div>
<el-select
v-model="echarValue1"
style="width: 100px; margin-left: 10px"
placeholder="请选择"
>
<el-option
v-for="item in options1"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</div>
</div>
</div>


<div class="container">
<div class="container" v-if="echarValue1 == 0">
<div class="grid-content" style="cursor: pointer;" @click="secondChange('1')">
<div class="text1" :class="{ tophovese: secindex == 1 }">接待量</div>
<div class="text2" :class="{ tophovese: secindex == 1 }">
@@ -150,7 +163,41 @@
</div>
</div>
</div>
<div id="main"></div>
<div id="main" v-if="echarValue1 == 0"></div>
<div v-if="echarValue1 == 1">
<el-table :data="echarList1" stripe style="width: 100%">
<!-- <el-table-column type="index" label="序号" width="50">
</el-table-column> -->
<el-table-column prop="time" label="时间" align="center">
</el-table-column>
<el-table-column
prop="receptionQuantityInToday"
label="接待量"
align="center"
>
</el-table-column>

<el-table-column
prop="activeUserQuantity"
label="活跃用户"
align="center"
>
</el-table-column>

<el-table-column
prop="activeEquipmentQuantity"
label="活跃设备"
align="center"
>
</el-table-column>
<!-- scope -->
<el-table-column label="操作" align="center">
<template slot-scope="{ row }">
<el-button type="text" @click="goDetail(row)">查看详情</el-button>
</template>
</el-table-column>
</el-table>
</div>
</div>

<div class="app-box-er">
@@ -187,6 +234,7 @@
v-model="echarValue"
style="width: 100px;margin-left:10px;"
placeholder="请选择"
@change="echarChange"
>
<el-option
v-for="item in options1"
@@ -199,7 +247,7 @@
</div>
</div>
</div>
<div class="container">
<div class="container" v-if="echarValue == 0">
<div class="grid-content" style="cursor: pointer;" @click="Overviewxlick('1')">
<div class="text1" :class="{ tophovese: cardindex == 1 }">
购买服务楼盘数
@@ -254,10 +302,195 @@
{{ thirdTab.activeEquipmentQuantity || 0 }}
</div>
</div>
<div
class="grid-content"
style="cursor: pointer"
@click="Overviewxlick('9')"
>
<div class="text1" :class="{ tophovese: cardindex == 9 }">
销售设备数
</div>
<div class="text2" :class="{ tophovese: cardindex == 9 }">
{{ thirdTab.buyEquipQuantity || 0 }}
</div>
</div>
</div>

<div id="echar2"></div>
<div id="echar2" v-if="echarValue == 0"></div>
<div v-if="echarValue == 1">
<el-table :data="echarList" stripe style="width: 100%">
<!-- <el-table-column type="index" label="序号" width="50">
</el-table-column> -->
<el-table-column prop="date" label="日期" align="center">
</el-table-column>
<el-table-column
prop="buyHouseQuantity"
label="购买服务楼盘数"
align="center"
>
<template slot-scope="{ row }">
<span
@click="goDetail1(row, '购买服务楼盘数', 0)"
style="cursor: pointer"
>{{ row.buyHouseQuantity || 0 }}</span
>
</template>
</el-table-column>
<el-table-column
prop="activeUserQuantity"
label="活跃用户数"
align="center"
>
<template slot-scope="{ row }">
<span
@click="goDetail1(row, '活跃用户数', 1)"
style="cursor: pointer"
>{{ row.activeUserQuantity }}</span
>
</template>
</el-table-column>
<el-table-column
prop="newJoinUserQuantity"
label="新增用户数"
align="center"
>
<template slot-scope="{ row }">
<span
@click="goDetail1(row, '新增用户数', 2)"
style="cursor: pointer"
>{{ row.newJoinUserQuantity || 0 }}</span
>
</template>
</el-table-column>
<el-table-column
prop="receptionQuantity"
label="接待量"
align="center"
>
<template slot-scope="{ row }">
<span
@click="goDetail1(row, '接待量', 3)"
style="cursor: pointer"
>{{ row.receptionQuantity || 0 }}</span
>
</template>
</el-table-column>
<el-table-column
prop="avgReceptionTime"
label="平均接待时长"
align="center"
>
<template slot-scope="{ row }">
<span
@click="goDetail1(row, '平均接待时长', 4)"
style="cursor: pointer"
>{{ row.avgReceptionTime || 0 }}</span
>
</template>
</el-table-column>
<el-table-column
prop="activeEquipmentQuantity"
label="活跃设备数"
align="center"
>
<template slot-scope="{ row }">
<span
@click="goDetail1(row, '活跃设备数', 5)"
style="cursor: pointer"
>{{ row.activeEquipmentQuantity || 0 }}</span
>
</template>
</el-table-column>
<el-table-column
prop="buyEquipQuantity"
label="销售设备数"
align="center"
>
<template slot-scope="{ row }">
<span
@click="goDetail1(row, '销售设备数', 6)"
style="cursor: pointer"
>{{ row.buyEquipQuantity || 0 }}</span
>
</template>
</el-table-column>
</el-table>
<div style="display: flex; justify-content: flex-end; margin-top: 10px">
<el-pagination
@size-change="handleSizeChange1"
@current-change="handleCurrentChange1"
:current-page="currentPage1"
:page-sizes="[10, 30, 50]"
:page-size="size1"
layout="total, sizes, prev, pager, next, jumper"
:total="total1"
>
</el-pagination>
</div>
</div>
</div>
<el-dialog :title="elTitle" :visible.sync="dialogVisible">
<div class="cen-tab">
<div style="font-size: 20px">{{ timeStr }}</div>
<el-table :data="detailList" stripe style="width: 100%">
<el-table-column
v-if="visible1"
prop="houseName"
label="楼盘"
align="center"
>
</el-table-column>
<el-table-column
v-if="visible1"
prop="receptionQuantity"
label="接待量"
align="center"
>
</el-table-column>

<el-table-column
v-if="visible5"
prop="imei"
label="设备编号"
align="center"
>
</el-table-column>
<el-table-column
v-if="visible5"
prop="agentName"
label="代理商"
align="center"
>
</el-table-column>
<el-table-column
v-if="visible5"
prop="houseName"
label="公司"
align="center"
>
</el-table-column>
<el-table-column
v-if="visible5"
prop="orgName"
label="楼盘"
align="center"
>
</el-table-column>
</el-table>
<div style="display: flex; justify-content: flex-end; margin-top: 10px">
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="currentPage"
:page-sizes="[10, 30, 50]"
:page-size="size"
layout="total, sizes, prev, pager, next, jumper"
:total="total"
>
</el-pagination>
</div>
</div>
</el-dialog>
</div>
</template>

@@ -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);


+ 422
- 4
src/views/Statistics/dataScreeOrg.vue View File

@@ -196,10 +196,23 @@
>
</el-date-picker>
</div>
<el-select
v-model="echarValue1"
style="width: 100px; margin-left: 10px"
placeholder="请选择"
>
<el-option
v-for="item in options1"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</div>
</div>
</div>
<div class="container">
<div class="container" v-if="echarValue1 == 0">
<div
class="grid-content"
style="cursor: pointer"
@@ -227,7 +240,41 @@
</div>
</div> -->
</div>
<div id="main"></div>
<div id="main" v-if="echarValue1 == 0"></div>
<div v-if="echarValue1 == 1">
<el-table :data="echarList1" stripe style="width: 100%">
<!-- <el-table-column type="index" label="序号" width="50">
</el-table-column> -->
<el-table-column prop="time" label="时间" align="center">
</el-table-column>
<el-table-column
prop="receptionQuantityInToday"
label="接待量"
align="center"
>
</el-table-column>

<!-- <el-table-column
prop="activeUserQuantity"
label="活跃用户"
align="center"
>
</el-table-column>

<el-table-column
prop="activeEquipmentQuantity"
label="活跃设备"
align="center"
>
</el-table-column> -->
<!-- scope -->
<el-table-column label="操作" align="center">
<template slot-scope="{ row }">
<el-button type="text" @click="goDetail(row)">查看详情</el-button>
</template>
</el-table-column>
</el-table>
</div>
</div>

<div class="app-box-er">
@@ -264,6 +311,7 @@
v-model="echarValue"
style="width: 100px; margin-left: 10px"
placeholder="请选择"
@change="echarChange"
>
<el-option
v-for="item in options1"
@@ -276,7 +324,7 @@
</div>
</div>
</div>
<div class="container">
<div class="container" v-if="echarValue == 0">
<!-- <div class="grid-content" @click="Overviewxlick('1')">
<div class="text1" :class="{ tophovese: cardindex == 1 }">
购买服务楼盘数
@@ -353,8 +401,181 @@
</div>
</div>

<div id="echar2"></div>
<div id="echar2" v-if="echarValue == 0"></div>
<div v-if="echarValue == 1">
<el-table :data="echarList" stripe style="width: 100%">
<!-- <el-table-column type="index" label="序号" width="50">
</el-table-column> -->
<el-table-column prop="date" label="日期" align="center">
</el-table-column>
<!-- <el-table-column
prop="buyHouseQuantity"
label="购买服务楼盘数"
align="center"
>
<template slot-scope="{ row }">
<span
@click="goDetail1(row, '购买服务楼盘数', 0)"
style="cursor: pointer"
>{{ row.buyHouseQuantity || 0 }}</span
>
</template>
</el-table-column>
<el-table-column
prop="activeUserQuantity"
label="活跃用户数"
align="center"
>
<template slot-scope="{ row }">
<span
@click="goDetail1(row, '活跃用户数', 1)"
style="cursor: pointer"
>{{ row.activeUserQuantity }}</span
>
</template>
</el-table-column>
<el-table-column
prop="newJoinUserQuantity"
label="新增用户数"
align="center"
>
<template slot-scope="{ row }">
<span
@click="goDetail1(row, '新增用户数', 2)"
style="cursor: pointer"
>{{ row.newJoinUserQuantity || 0 }}</span
>
</template>
</el-table-column> -->
<el-table-column
prop="receptionQuantity"
label="接待量"
align="center"
>
<template slot-scope="{ row }">
<span
@click="goDetail1(row, '接待量', 3)"
style="cursor: pointer"
>{{ row.receptionQuantity || 0 }}</span
>
</template>
</el-table-column>
<el-table-column
prop="avgReceptionTime"
label="平均接待时长"
align="center"
>
<template slot-scope="{ row }">
<span
@click="goDetail1(row, '平均接待时长', 4)"
style="cursor: pointer"
>{{ row.avgReceptionTime || 0 }}</span
>
</template>
</el-table-column>
<el-table-column
prop="activeEquipmentQuantity"
label="活跃设备数"
align="center"
>
<template slot-scope="{ row }">
<span
@click="goDetail1(row, '活跃设备数', 5)"
style="cursor: pointer"
>{{ row.activeEquipmentQuantity || 0 }}</span
>
</template>
</el-table-column>
<!-- <el-table-column
prop="buyEquipQuantity"
label="销售设备数"
align="center"
>
<template slot-scope="{ row }">
<span
@click="goDetail1(row, '销售设备数', 6)"
style="cursor: pointer"
>{{ row.buyEquipQuantity || 0 }}</span
>
</template>
</el-table-column> -->
</el-table>
<div style="display: flex; justify-content: flex-end; margin-top: 10px">
<el-pagination
@size-change="handleSizeChange1"
@current-change="handleCurrentChange1"
:current-page="currentPage1"
:page-sizes="[10, 30, 50]"
:page-size="size1"
layout="total, sizes, prev, pager, next, jumper"
:total="total1"
>
</el-pagination>
</div>
</div>
</div>
<el-dialog :title="elTitle" :visible.sync="dialogVisible">
<div class="cen-tab">
<div style="font-size: 20px">{{ timeStr }}</div>
<el-table :data="detailList" stripe style="width: 100%">
<el-table-column
v-if="visible1"
prop="houseName"
label="楼盘"
align="center"
>
</el-table-column>
<el-table-column
v-if="visible1"
prop="receptionQuantity"
label="接待量"
align="center"
>
</el-table-column>

<el-table-column
v-if="visible5"
prop="imei"
label="设备编号"
align="center"
>
</el-table-column>
<el-table-column
v-if="visible5"
prop="agentName"
label="代理商"
align="center"
>
</el-table-column>
<el-table-column
v-if="visible5"
prop="houseName"
label="公司"
align="center"
>
</el-table-column>
<el-table-column
v-if="visible5"
prop="orgName"
label="楼盘"
align="center"
>
</el-table-column>
</el-table>
<div style="display: flex; justify-content: flex-end; margin-top: 10px">
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="currentPage"
:page-sizes="[10, 30, 50]"
:page-size="size"
layout="total, sizes, prev, pager, next, jumper"
:total="total"
>
</el-pagination>
</div>
</div>
</el-dialog>
</div>
</template>

@@ -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);


+ 29
- 10
src/views/Statistics/dataScreeSys.vue View File

@@ -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;


+ 58
- 2
src/views/Statistics/houseDataSys.vue View File

@@ -3,12 +3,27 @@
<!-- 头 -->
<div class="app-top" v-if="orgType != 2">
<div class="app-titel" style="margin-left: 15px">
<el-select
v-model="houseTypes"
@change="sysChange"
style="width: 100px; margin-right: 10px"
placeholder="请选择"
>
<el-option
v-for="item in options2"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
<el-select
v-model="selValue"
@change="selChange"
style="width: 100px"
placeholder="请选择"
>
<el-option label="全部" v-if="orgType == 0" value="-1"></el-option>
<el-option label="代理商" v-if="orgType == 0" value="0"></el-option>
<el-option label="公司" value="1"></el-option>
</el-select>
@@ -29,7 +44,7 @@
</el-option>
</el-select>
</div>
<div style="margin-left: 26px" v-else>
<div style="margin-left: 26px" v-if="selValue == 0">
<el-select
v-model="choicValue"
@change="valuechange"
@@ -216,6 +231,7 @@

<script>
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) {


+ 34
- 0
src/views/Statistics/trend.vue View File

@@ -3,6 +3,20 @@
<!-- 头 -->
<div class="app-top">
<div class="app-titel" style="margin-left: 15px">
<el-select
v-model="houseTypes"
@change="sysChange"
style="width: 100px; margin-right: 10px"
placeholder="请选择"
>
<el-option
v-for="item in options2"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
<el-select
v-model="selValue"
@change="selChange"
@@ -444,6 +458,17 @@ export default {
value: "2",
},
],
options2: [
{
label: "正式数据",
value: "0,1",
},
{
label: "测试数据",
value: "2,3",
},
],
houseTypes:'0,1'
};
},
mounted() {
@@ -451,6 +476,11 @@ export default {
this.tabtimetap(4);
},
methods: {
sysChange(){
this.choicValue=''
this.selValue='0'
this.receptionOverviewOfSystem();
},
// 获取tab2
receptionOverviewOfSystem() {
let obj = {
@@ -463,6 +493,8 @@ export default {
orgCode: this.selValue == 1 ? this.choicValue : null,
houseId: this.selValue == 2 ? this.choicValue : null,
orgType: localStorage.getItem("orgType"),
queryOrgType:this.selValue/1+1,
houseTypes: this.houseTypes,
};
if (obj.orgType == 1) {
obj.agentId = localStorage.getItem("agentId");
@@ -492,6 +524,8 @@ export default {
orgCode: this.selValue == 1 ? this.choicValue : null,
houseId: this.selValue == 2 ? this.choicValue : null,
orgType: localStorage.getItem("orgType"),
queryOrgType:this.selValue/1+1,
houseTypes: this.houseTypes,
};
if (obj.orgType == 1) {
obj.agentId = localStorage.getItem("agentId");


+ 6
- 1
src/views/building/index.vue View File

@@ -799,7 +799,7 @@ export default {
serviceStatus: "",
houseType: "",
timeType:'0',
// residueTime: 7,
residueTime: 7,
startWorking: "",
endWorking: "",
agentName: "",
@@ -965,6 +965,11 @@ export default {
this.searchForm.serviceStatus = this.$route.query.serviceStatus;
this.searchForm.houseType = "0";
}
if(this.$route.query.time){
this.starTime=[this.$route.query.time,this.$route.query.time]
this.searchForm.startWorking = this.starTime[0];
this.searchForm.endWorking = this.starTime[1];
}
this.orgType = localStorage.getItem("orgType");
// 获取公司列表数据
this.getOrgList();


Loading…
Cancel
Save