wangxiaohua 2 年前
父节点
当前提交
34662dcd0e
共有 5 个文件被更改,包括 841 次插入95 次删除
  1. +24
    -1
      src/api/modules/api.js
  2. +119
    -10
      src/views/Statistics/dataScreeAge.vue
  3. +181
    -50
      src/views/Statistics/dataScreeOrg.vue
  4. +515
    -32
      src/views/Statistics/dataScreeSys.vue
  5. +2
    -2
      vue.config.js

+ 24
- 1
src/api/modules/api.js 查看文件

@@ -1027,8 +1027,31 @@ export function templategetMarketingTree(query) {
//导出文件
export function exportFile(data) {
return request({
url: 'autoSR/equipReceive/findByPage',
url: '/autoSR/equipReceive/findByPage',
method:'post',
data
})
}
//表格一
export function realTimeStatisticsOfTime(query) {
return request({
url: '/autoSR/cusStageStatistics/realTimeStatisticsOfTime',
method:'get',
params:query
})
}
//表格二
export function dataOverviewWithSystemWithLookWithTable(query) {
return request({
url: '/autoSR/cusStageStatistics/dataOverviewWithSystemWithLookWithTable',
method:'get',
params:query
})
}
export function buyEquipmentQuantity(query) {
return request({
url: '/autoSR/cusStageStatistics/buyEquipmentQuantity',
method:'get',
params:query
})
}

+ 119
- 10
src/views/Statistics/dataScreeAge.vue 查看文件

@@ -3,6 +3,22 @@
<!-- 头 -->
<div class="app-top">
<div class="app-titel">

<el-select
v-model="houseTypes"
@change="sysChange"
style="width: 100px;margin-left:10px;"
placeholder="请选择"
>
<el-option
v-for="item in options2"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>

<div class="titel-text">选择公司:</div>
<div style="margin-left: 26px" v-if="selValue == 1">
<el-select
@@ -52,6 +68,10 @@
<div class="text1">累计楼盘数</div>
<div class="text2">{{ firstTab.houseQuantity || 0 }}</div>
</div>
<div class="grid-content">
<div class="text1">试用楼盘数</div>
<div class="text2">{{ firstTab.houseQuantityOfTryOut || 0 }}</div>
</div>
<div class="grid-content">
<div class="text1">累计销售设备数</div>
<div class="text2">{{ firstTab.equipmentQuantityWithSold || 0 }}</div>
@@ -70,7 +90,42 @@
</div>

<div class="app-box-er">
<div style="line-height: 40px; font-weight: bold">今日实时状况</div>
<!-- <div style="line-height: 40px; font-weight: bold">今日实时状况</div> -->

<div class="app_titile" style="margin-bottom: 10px">
<div style="line-height: 40px; font-weight: bold">时段统计</div>
<div>
<div class="app-titel">
<div class="toptimeqhuan">
<div :class="{ tophove: dateType1 == 1 }" @click="tabtimetap1(1)">
近7天
</div>
<div :class="{ tophove: dateType1 == 3 }" @click="tabtimetap1(3)">
近15天
</div>
<div :class="{ tophove: dateType1 == 2 }" @click="tabtimetap1(2)">
近30天
</div>
</div>
<div style="margin-left: 26px">
<el-date-picker
@change="confirmtime1()"
v-model="customtime1"
type="daterange"
range-separator="-"
:default-time="['00:00:00', '23:59:59']"
value-format="yyyy-MM-dd"
start-placeholder="开始日期"
end-placeholder="结束日期"
:picker-options="pickerOptions"
>
</el-date-picker>
</div>
</div>
</div>
</div>


<div class="container">
<div class="grid-content" style="cursor: pointer;" @click="secondChange('1')">
<div class="text1" :class="{ tophovese: secindex == 1 }">接待量</div>
@@ -128,6 +183,19 @@
>
</el-date-picker>
</div>
<el-select
v-model="echarValue"
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>
@@ -205,12 +273,16 @@ export default {
secondTab: {},
thirdTab: {},
selValue: "1",
houseTypes:'0,1',
choicValue: "",
houseList: [],
secindex: "1",
dateType: 4,
customtime: [],
cardindex: "1",
dateType1: 1,
echarValue:'0',
customtime1:[],
options: [
{
label: "代理商",
@@ -220,14 +292,39 @@ export default {
label: "公司",
value: "1",
},
],
options1: [
{
label: "趋势图",
value: "0",
},
{
label: "表格",
value: "1",
},
],
options2: [
{
label: "正式数据",
value: "0,1",
},
{
label: "测试数据",
value: "2,3",
},
],
};
},
mounted() {
this.getList();
this.tabtimetap(4);
// this.tabtimetap(4);
},
methods: {
sysChange(){
this.dataOverViewWithSystem();
this.dataOverviewWithSystemWithDay();
this.dataOverviewWithSystemWithLook();
},
valuechange() {
this.dateType = 4;
this.cardindex=1
@@ -280,6 +377,10 @@ export default {
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,
})
.then((res) => {
console.log(res);
@@ -302,6 +403,7 @@ export default {
agentId: localStorage.getItem('agentId'),
orgCode: this.selValue == 1 ? this.choicValue : null,
orgType: localStorage.getItem("orgType"),
houseTypes:this.houseTypes,
})
.then((res) => {
console.log(res);
@@ -312,7 +414,7 @@ export default {
// echars生成
getChars1(idx) {
console.log(idx);
let Strname = ["昨日", "今日"];
let Strname = ["时段一", "时段二"];
let timeDate = [];
// 判断是第几个然后对数据进行渲染
// 先处理时间
@@ -323,10 +425,10 @@ export default {
// 接待量
this.secondTab.todayReceptionList.map((item) => {
timeDate.push(item.time.substring(11, 16));
arr2.push(item.data);
arr1.push(item.data);
});
this.secondTab.yesterdayReceptionList.map((item) => {
arr1.push(item.data);
arr2.push(item.data);
});
}
if (idx == 2) {
@@ -343,10 +445,10 @@ export default {
// 活跃设备
this.secondTab.todayActiveEquipmentList.map((item) => {
timeDate.push(item.time.substring(11, 16));
arr2.push(item.data);
arr1.push(item.data);
});
this.secondTab.yesterdayActiveEquipmentList.map((item) => {
arr1.push(item.data);
arr2.push(item.data);
});
}
let arr = [
@@ -431,6 +533,7 @@ export default {
agentId: localStorage.getItem('agentId'),
orgCode: this.selValue == 1 ? this.choicValue : null,
orgType: localStorage.getItem("orgType"),
houseTypes:this.houseTypes,
})
.then((res) => {
// console.log(res);
@@ -451,11 +554,17 @@ export default {
},
tabtimetap(i) {
this.dateType = i;
this.selectTime = "";
this.selectTime1 = "";
this.customtime=[]
this.dataOverviewWithSystemWithLook();

},
confirmtime1(e) {
this.dateType1 = null;
this.dataOverviewWithSystemWithDay();
},
tabtimetap1(i) {
this.dateType1 = i;
this.customtime1 = [];
this.dataOverviewWithSystemWithDay();
},
//卡片下折线图
SwitchCARDS(arr, str, timeDate, Strname) {


+ 181
- 50
src/views/Statistics/dataScreeOrg.vue 查看文件

@@ -1,5 +1,23 @@
<template>
<div class="box-center">
<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>
</div>
</div>
<!-- 头 -->
<!-- <div class="app-top">
<div class="app-titel" style="margin-left: 15px">
@@ -77,6 +95,10 @@
<div class="text1">服务期内楼盘总数</div>
<div class="text2">{{ firstTab.houseQofEnough || 0 }}</div>
</div>
<div class="grid-content">
<div class="text1">试用楼盘数</div>
<div class="text2">{{ firstTab.houseQuantityOfTryOut || 0 }}</div>
</div>
<div class="grid-content">
<div class="text1">过期楼盘数</div>
<div class="text2">{{ firstTab.houseQofUnenough || 0 }}</div>
@@ -144,9 +166,45 @@
</div>

<div class="app-box-er">
<div style="line-height: 40px; font-weight: bold">今日实时状况</div>
<!-- <div style="line-height: 40px; font-weight: bold">今日实时状况</div> -->
<div class="app_titile" style="margin-bottom: 10px">
<div style="line-height: 40px; font-weight: bold">时段统计</div>
<div>
<div class="app-titel">
<div class="toptimeqhuan">
<div :class="{ tophove: dateType1 == 1 }" @click="tabtimetap1(1)">
近7天
</div>
<div :class="{ tophove: dateType1 == 3 }" @click="tabtimetap1(3)">
近15天
</div>
<div :class="{ tophove: dateType1 == 2 }" @click="tabtimetap1(2)">
近30天
</div>
</div>
<div style="margin-left: 26px">
<el-date-picker
@change="confirmtime1()"
v-model="customtime1"
type="daterange"
range-separator="-"
:default-time="['00:00:00', '23:59:59']"
value-format="yyyy-MM-dd"
start-placeholder="开始日期"
end-placeholder="结束日期"
:picker-options="pickerOptions"
>
</el-date-picker>
</div>
</div>
</div>
</div>
<div class="container">
<div class="grid-content" style="cursor: pointer;" @click="secondChange('1')">
<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 }">
{{ secondTab.receptionQuantityInToday || 0 }}
@@ -202,6 +260,19 @@
>
</el-date-picker>
</div>
<el-select
v-model="echarValue"
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>
@@ -246,13 +317,21 @@
{{ thirdTab.userCountWithNewJoin || 0 }}
</div>
</div> -->
<div class="grid-content" style="cursor: pointer;" @click="Overviewxlick('6')">
<div
class="grid-content"
style="cursor: pointer"
@click="Overviewxlick('6')"
>
<div class="text1" :class="{ tophovese: cardindex == 6 }">接待量</div>
<div class="text2" :class="{ tophovese: cardindex == 6 }">
{{ thirdTab.receptionQuantity || 0 }}
</div>
</div>
<div class="grid-content" style="cursor: pointer;" @click="Overviewxlick('7')">
<div
class="grid-content"
style="cursor: pointer"
@click="Overviewxlick('7')"
>
<div class="text1" :class="{ tophovese: cardindex == 7 }">
平均接待时长
</div>
@@ -260,7 +339,11 @@
{{ thirdTab.receptionTimeWithAvg || 0 }}
</div>
</div>
<div class="grid-content" style="cursor: pointer;" @click="Overviewxlick('8')">
<div
class="grid-content"
style="cursor: pointer"
@click="Overviewxlick('8')"
>
<div class="text1" :class="{ tophovese: cardindex == 8 }">
活跃设备数
</div>
@@ -290,12 +373,17 @@ export default {
secondTab: {},
thirdTab: {},
selValue: "1",
choicValue:localStorage.getItem('orgCode'),
choicValue: localStorage.getItem("orgCode"),
houseList: [],
secindex: "1",
dateType: 4,
echarValue: "0",
customtime: [],
cardindex: "1",
cardindex: "6",
// houseTypes:'0,1',
dateType1: 1,
customtime1: [],
houseTypes:'0,1',
options: [
{
label: "代理商",
@@ -306,28 +394,53 @@ export default {
value: "1",
},
],
options1: [
{
label: "趋势图",
value: "0",
},
{
label: "表格",
value: "1",
},
],
options2: [
{
label: "正式数据",
value: "0,1",
},
{
label: "测试数据",
value: "2,3",
},
],
};
},
mounted() {
this.getList();
this.tabtimetap(4);
// this.tabtimetap(4);
},
methods: {
valuechange() {
this.dateType = 4;
this.cardindex=1
this.secindex=1
this.cardindex = 1;
this.secindex = 1;
// console.log(this.choicValue);
this.dataOverViewWithSystem();
this.dataOverviewWithSystemWithDay();
this.dataOverviewWithSystemWithLook();
},
sysChange(){
this.dataOverViewWithSystem();
this.dataOverviewWithSystemWithDay();
this.dataOverviewWithSystemWithLook();
},
// 当选择的代理商或者楼盘切换时
selChange() {
this.choicValue = "";
this.dateType = 4;
this.cardindex=1
this.secindex=1
this.cardindex = 1;
this.secindex = 1;
this.getList();
},
// 获取下拉框数据
@@ -361,8 +474,13 @@ export default {
dataOverviewWithSystemWithDay() {
this.$api.api
.dataOverviewWithSystemWithDay({
agentId: this.selValue == 0 ? this.choicValue : null,
orgCode: this.selValue == 1 ? this.choicValue : null,
orgCode: localStorage.getItem('orgCode'),
orgType: localStorage.getItem("orgType"),
// orgType: localStorage.getItem("orgType"),
startDate: this.dateType1 ? "" : this.customtime1[0],
endDate: this.dateType1 ? "" : this.customtime1[1],
dateType: this.dateType1,
houseTypes:this.houseTypes,
})
.then((res) => {
console.log(res);
@@ -381,27 +499,28 @@ export default {
startDate: this.dateType ? "" : this.customtime[0],
endDate: this.dateType ? "" : this.customtime[1],
dateType: this.dateType,
agentId: this.selValue == 0 ? this.choicValue : null,
orgCode: this.selValue == 1 ? this.choicValue : null,
// agentId: this.selValue == 0 ? this.choicValue : null,
orgCode: localStorage.getItem('orgCode'),
orgType: localStorage.getItem("orgType"),
houseTypes:this.houseTypes,
})
.then((res) => {
console.log(res);
this.thirdTab = res.data;
this.getChars2(1);
this.getChars2(this.cardindex);
});
},
// echars生成
getChars1(idx) {
console.log(idx);
let Strname = ["昨日", "今日"];
let Strname = ["时段一", "时段二"];
let timeDate = [];
// 判断是第几个然后对数据进行渲染
// 先处理时间
let arr1 = [];
let arr2 = [];
// console.log(timeDate);
if (idx == 1 ) {
if (idx == 1) {
// 接待量
this.secondTab.yesterdayReceptionList.map((item) => {
timeDate.push(item.time.substring(11, 16));
@@ -425,10 +544,10 @@ export default {
// 活跃设备
this.secondTab.todayActiveEquipmentList.map((item) => {
timeDate.push(item.time.substring(11, 16));
arr2.push(item.data);
arr1.push(item.data);
});
this.secondTab.yesterdayActiveEquipmentList.map((item) => {
arr1.push(item.data);
arr2.push(item.data);
});
}
let arr = [
@@ -504,7 +623,7 @@ export default {
data: arr1,
type: "line",
smooth: true,
}
},
];
this.SwitchCARDS(arr, "echar2", timeDate, Strname);
},
@@ -512,8 +631,11 @@ export default {
dataOverViewWithSystem() {
this.$api.api
.dataOverViewWithSystem({
agentId: this.selValue == 0 ? this.choicValue : null,
orgCode: this.selValue == 1 ? this.choicValue : null,
// agentId: this.selValue == 0 ? this.choicValue : null,
// orgCode: this.selValue == 1 ? this.choicValue : null,
orgCode: localStorage.getItem('orgCode'),
orgType: localStorage.getItem("orgType"),
houseTypes:this.houseTypes,
})
.then((res) => {
// console.log(res);
@@ -530,15 +652,24 @@ export default {
},
confirmtime(e) {
this.dateType = null;
this.cardindex=6
this.dataOverviewWithSystemWithLook();
},
tabtimetap(i) {
this.dateType = i;
this.selectTime = "";
this.selectTime1 = "";
this.customtime=[]
this.customtime = [];
this.cardindex=6
this.dataOverviewWithSystemWithLook();
},
confirmtime1(e) {
this.dateType1 = null;
this.dataOverviewWithSystemWithDay();
},
tabtimetap1(i) {
this.dateType1 = i;
this.customtime1 = [];
this.dataOverviewWithSystemWithDay();
},
//卡片下折线图
SwitchCARDS(arr, str, timeDate, Strname) {
// console.log(arr,str,timeDate,Strname);
@@ -547,29 +678,29 @@ export default {
var option;

option = {
color: [
"#6F8EDC",
"#EE6666",
"#F98120",
"#1CC99E",
"#9474FB",
"#66AFF5",
"#FABD2B",
"#FFCF8F",
"#657292",
"#7A6A99",
"#BF5D52",
"#77B7E4",
"#E6A065",
"#9D5139",
"#C1AA88",
"#F87F7A",
"#F6CF74",
"#7F5506",
"#88BB9B",
"#6E99AA",
"#5789D0",
],
color: [
"#6F8EDC",
"#EE6666",
"#F98120",
"#1CC99E",
"#9474FB",
"#66AFF5",
"#FABD2B",
"#FFCF8F",
"#657292",
"#7A6A99",
"#BF5D52",
"#77B7E4",
"#E6A065",
"#9D5139",
"#C1AA88",
"#F87F7A",
"#F6CF74",
"#7F5506",
"#88BB9B",
"#6E99AA",
"#5789D0",
],
tooltip: {
trigger: "axis",
},


+ 515
- 32
src/views/Statistics/dataScreeSys.vue 查看文件

@@ -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"
@@ -17,7 +31,7 @@
>
</el-option>
</el-select>
<div style="margin-left: 26px" v-if="selValue == 1">
<div style="margin-left: 26px" v-if="selValue == 1 || operaFlag">
<el-select
v-model="choicValue"
@change="valuechange"
@@ -34,7 +48,7 @@
</el-option>
</el-select>
</div>
<div style="margin-left: 26px" v-else>
<div style="margin-left: 26px" v-if="selValue == 0 || operaFlag">
<el-select
v-model="choicValue"
@change="valuechange"
@@ -80,6 +94,10 @@
<div class="text1">服务期内楼盘总数</div>
<div class="text2">{{ firstTab.houseQofEnough || 0 }}</div>
</div>
<div class="grid-content">
<div class="text1">试用楼盘数</div>
<div class="text2">{{ firstTab.houseQuantityOfTryOut || 0 }}</div>
</div>
<div class="grid-content">
<div class="text1">过期楼盘数</div>
<div class="text2">{{ firstTab.houseQofUnenough || 0 }}</div>
@@ -148,17 +166,17 @@

<div class="app-box-er">
<div class="app_titile" style="margin-bottom: 10px">
<div style="line-height: 40px; font-weight: bold">今日实时状况</div>
<div style="line-height: 40px; font-weight: bold">时段统计</div>
<div>
<div class="app-titel">
<div class="toptimeqhuan">
<div :class="{ tophove: dateType1 == 4 }" @click="tabtimetap1(4)">
<div :class="{ tophove: dateType1 == 1 }" @click="tabtimetap1(1)">
近7天
</div>
<div :class="{ tophove: dateType1 == 5 }" @click="tabtimetap1(5)">
<div :class="{ tophove: dateType1 == 3 }" @click="tabtimetap1(3)">
近15天
</div>
<div :class="{ tophove: dateType1 == 6 }" @click="tabtimetap1(6)">
<div :class="{ tophove: dateType1 == 2 }" @click="tabtimetap1(2)">
近30天
</div>
</div>
@@ -176,11 +194,24 @@
>
</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"
@@ -216,7 +247,41 @@
</div>
</div>
</div>
<div id="main"></div>
<div v-if="echarValue1 == 0" id="main"></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">
@@ -250,22 +315,23 @@
</el-date-picker>
</div>
<el-select
v-model="echarValue"
style="width: 100px;margin-left:10px;"
placeholder="请选择"
>
<el-option
v-for="item in options1"
:key="item.value"
:label="item.label"
:value="item.value"
v-model="echarValue"
style="width: 100px; margin-left: 10px"
placeholder="请选择"
@change="echarChange"
>
</el-option>
</el-select>
<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" v-if="echarValue==0">
<div class="container" v-if="echarValue == 0">
<div
class="grid-content"
style="cursor: pointer"
@@ -356,15 +422,201 @@
{{ 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 v-if="echarValue==0" id="echar2"></div>
<div v-if="echarValue == 0" id="echar2"></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>

<script>
import * as echarts from "echarts";
import { getStore, setStore } from "@/util/store";
export default {
data() {
return {
@@ -378,11 +630,21 @@ export default {
secondTab: {},
thirdTab: {},
selValue: "0",
echarValue:'0',
choicValue:"",
houseTypes: "0,1",
operaFlag: true,
echarValue: "0",
echarValue1: "0",
choicValue: "",
detailList: [],
houseList: [],
secindex: "1",
dateType: 4,
currentPage: 1,
size: 10,
total: 10,
currentPage1: 1,
size1: 10,
total1: 10,
customtime: [],
cardindex: "1",
options: [
@@ -405,16 +667,176 @@ export default {
value: "1",
},
],
options2: [
{
label: "正式数据",
value: "0,1",
},
{
label: "测试数据",
value: "2,3",
},
],
agentissow: true,
dateType1: 4,
dateType1: 1,
customtime1: [],
echarList1: [],
echarList: [],
dialogVisible: false,
dialogVisible1: false,
visible1: false,
visible2: false,
visible3: false,
visible4: false,
visible5: false,
info: {},
elTitle: "",
timeStr: "",
};
},
mounted() {
// 获取用户信息
this.info = getStore({ name: "userInfo" });
// 当他系统后台时
if (localStorage.getItem("orgType") == 0 && this.info.userRoleType == 1) {
console.log("有全部");
this.options.push({
label: "全部",
value: "3",
});
this.selValue = "3";
this.agentissow = true;
this.operaFlag = false;
} else {
this.operaFlag = true;
}
this.getList();
// this.tabtimetap(4);
},
methods: {
goDetail1(row, str, idx) {
console.log(row);
this.dialogVisible = true;
this.timeStr = "";
this.elTitle = str;
this.detailList = [];
if (idx == 0) {
} else if (idx == 1) {
// this.visible1 = true;
// this.visible2 = false;
// this.visible3 = false;
// this.visible4 = false;
// this.visible5 = false;
} else if (idx == 2) {
} else if (idx == 3) {
} else if (idx == 4) {
} else if (idx == 5) {
} else if (idx == 6) {
this.visible1 = false;
this.visible2 = false;
this.visible3 = false;
this.visible4 = false;
this.visible5 = true;
this.buyEquipmentQuantity(row.date);
}
},
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,
})
.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: 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,
current: this.currentPage1,
size: this.size1,
// 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,
current: this.currentPage,
size: this.size,
hour,
})
.then((res) => {
console.log(res);
this.detailList = res.data.records;
this.total = res.data.total;
});
},
valuechange() {
this.dateType = 4;
this.cardindex = 1;
@@ -435,7 +857,12 @@ export default {
this.dataOverviewWithSystemWithLook();
},
// 当选择的代理商或者楼盘切换时
selChange() {
selChange(e) {
if (e == 3) {
this.operaFlag = false;
this.agentissow = true;
return;
}
this.choicValue = "";
this.dateType = 4;
this.cardindex = 1;
@@ -451,6 +878,11 @@ export default {
}
}
},
sysChange() {
this.dataOverViewWithSystem();
this.dataOverviewWithSystemWithDay();
this.dataOverviewWithSystemWithLook();
},
// 获取下拉框数据
getList() {
console.log(this.selValue);
@@ -466,7 +898,7 @@ export default {
this.dataOverviewWithSystemWithDay();
this.dataOverviewWithSystemWithLook();
});
} else {
} else if (this.selValue == 2) {
this.$api.api
.findMyAgent({
orgType: localStorage.getItem("orgType"),
@@ -477,6 +909,10 @@ export default {
this.dataOverviewWithSystemWithDay();
this.dataOverviewWithSystemWithLook();
});
} else {
this.dataOverViewWithSystem();
this.dataOverviewWithSystemWithDay();
this.dataOverviewWithSystemWithLook();
}
},
dataOverviewWithSystemWithDay() {
@@ -488,10 +924,44 @@ export default {
startDate: this.dateType1 ? "" : this.customtime1[0],
endDate: this.dateType1 ? "" : this.customtime1[1],
dateType: this.dateType1,
houseTypes: this.houseTypes,
})
.then((res) => {
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);
});
},
@@ -504,6 +974,7 @@ export default {
dateType: this.dateType,
agentId: this.selValue == 0 ? this.choicValue : null,
orgCode: this.selValue == 1 ? this.choicValue : null,
houseTypes: this.houseTypes,
orgType: localStorage.getItem("orgType"),
})
.then((res) => {
@@ -515,7 +986,7 @@ export default {
// echars生成
getChars1(idx) {
// console.log(idx);
let Strname = ["昨日", "今日"];
let Strname = ["时段一", "时段二"];
let timeDate = [];
// 判断是第几个然后对数据进行渲染
// 先处理时间
@@ -526,10 +997,10 @@ export default {
// 接待量
this.secondTab.todayReceptionList.map((item) => {
timeDate.push(item.time.substring(11, 16));
arr2.push(item.data);
arr1.push(item.data);
});
this.secondTab.yesterdayReceptionList.map((item) => {
arr1.push(item.data);
arr2.push(item.data);
});
}
if (idx == 2) {
@@ -546,10 +1017,10 @@ export default {
// 活跃设备
this.secondTab.todayActiveEquipmentList.map((item) => {
timeDate.push(item.time.substring(11, 16));
arr2.push(item.data);
arr1.push(item.data);
});
this.secondTab.yesterdayActiveEquipmentList.map((item) => {
arr1.push(item.data);
arr2.push(item.data);
});
}
let arr = [
@@ -566,6 +1037,7 @@ export default {
smooth: true,
},
];
// console.log(arr1,arr2);
this.SwitchCARDS(arr, "main", timeDate, Strname);
},
getChars2(idx) {
@@ -618,6 +1090,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 = [
{
@@ -636,6 +1114,7 @@ export default {
agentId: this.selValue == 0 ? this.choicValue : null,
orgCode: this.selValue == 1 ? this.choicValue : null,
orgType: localStorage.getItem("orgType"),
houseTypes: this.houseTypes,
})
.then((res) => {
this.firstTab = res.data;
@@ -656,7 +1135,11 @@ export default {
tabtimetap1(i) {
this.dateType1 = i;
this.customtime1 = [];
this.dataOverviewWithSystemWithDay();
if (this.echarValue == 0) {
this.dataOverviewWithSystemWithDay();
} else {
this.dataOverviewWithSystemWithLookWithTable();
}
},
confirmtime(e) {
this.dateType = null;


+ 2
- 2
vue.config.js 查看文件

@@ -4,8 +4,8 @@
*/
// const url = 'http://pigx-gateway'
// const url = 'http://39.97.167.65:9999' //测试
// const url = 'http://192.168.31.169:9999' //长龙
const url = 'http://192.168.31.134:9999' //嘉豪
const url = 'http://192.168.31.169:9999' //长龙
// const url = 'http://192.168.31.134:9999' //嘉豪
// const url = 'http://192.168.31.100:9999' //王笑
// const url = 'http://nitu5e.natappfree.cc' //王笑



正在加载...
取消
保存