Browse Source

init

newStyle
lancer 2 years ago
parent
commit
84486dc912
9 changed files with 1265 additions and 896 deletions
  1. +19
    -5
      src/page/wel.vue
  2. +9
    -2
      src/views/Customer/index.vue
  3. +186
    -146
      src/views/Equipment/equipmentDetailList.vue
  4. +9
    -2
      src/views/ReceivingRecords/index.vue
  5. +727
    -547
      src/views/Statistics/TrendAnalysis.vue
  6. +97
    -58
      src/views/Statistics/houseDataSys.vue
  7. +214
    -132
      src/views/Statistics/trend.vue
  8. +2
    -2
      src/views/building/Count.vue
  9. +2
    -2
      vue.config.js

+ 19
- 5
src/page/wel.vue View File

@@ -258,8 +258,14 @@
</div>
<div class="you">
<div class="title" style="cursor: pointer;">
<div class="text1" @click="tabclick('0')" :class="{ colostyle: classatec == 0 }">低电工牌</div>
<div class="text1" @click="tabclick('1')" :class="{ colostyle: classatec == 1 }">离线工牌</div>

<el-badge :value="equNum" class="item" style=" margin-right: 10px;">
<div class="text1" @click="tabclick('1')" :class="{ colostyle: classatec == 1 }">离线工牌</div>
</el-badge>
<el-badge :value="equNum1" class="item">
<div class="text1" @click="tabclick('0')" :class="{ colostyle: classatec == 0 }">低电工牌</div>
</el-badge>

</div>
<div class="tabbox" v-if="classatec==0">
<el-table
@@ -895,13 +901,15 @@ export default {
houseList:[],
houseRank:[],
companyRank:[],
classatec:0,
classatec:1,
classatec1:0,
classatec2:0,
customtime:[],
statDateStart:'',
statDateEnd:'',
TimetoAhoose:0,
TimetoAhoose:1,
equNum:0,
equNum1:0,
cardlist:{
datalist:{},
liftlist:{},
@@ -1130,7 +1138,10 @@ export default {
onLine:this.classatec,
houseId:this.houseId
}).then((res) => {
this.equipmentList=res.data;
// 在这里赋值 低电
this.equNum=res.data.offline
this.equNum1=res.data.lowpower
this.equipmentList=res.data.list;
})
},
//获取违禁提醒列表
@@ -1461,4 +1472,7 @@ export default {
padding: 0 20px;
line-height: 55px;
}
/deep/ .el-badge__content{
top:10px;
}
</style>

+ 9
- 2
src/views/Customer/index.vue View File

@@ -44,6 +44,13 @@
</el-select>
</div>
<div class="toptimeqhuan">
<div
style="cursor: pointer;"
:class="{ tophove: searchForm.dateType == null }"
@click="tabtimetap(null)"
>
全部
</div>
<div
style="cursor: pointer;"
:class="{ tophove: searchForm.dateType == 0 }"
@@ -412,7 +419,7 @@ export default {
visitRecord: "",
staDate: "",
endDate: "",
dateType: "0",
dateType: null,
projectId: "",
timeType: "0",
clientStage:''
@@ -483,7 +490,7 @@ export default {
visitRecord: "",
staDate: "",
endDate: "",
dateType: "0",
dateType:null,
searchForm: "",
timeType: "0",
projectId:this.orgType==3? localStorage.getItem('houseId'):this.houseList[0].id,


+ 186
- 146
src/views/Equipment/equipmentDetailList.vue View File

@@ -12,7 +12,12 @@
<span class="demonstration">楼盘名称:</span>
<div style="width: 200px">
<!-- <el-input v-model="page.accountName"></el-input>-->
<el-select v-model="houseId" filterable placeholder="请选择" @change="change">
<el-select
v-model="houseId"
filterable
placeholder="请选择"
@change="change"
>
<el-option
v-for="item in houseList"
:key="item.id"
@@ -32,9 +37,10 @@
padding-left: 18px;
display: flex;
padding-top: 18px;
padding-right: 18px;
"
>
<span class="demonstration">使用时间:</span>
<span style="min-width: 80px" class="demonstration">使用时间:</span>
<div class="toptimeqhuan">
<div :class="{ tophove: timeType == 4 }" @click="tabtimetap(4)">
近7天
@@ -63,25 +69,53 @@
>对比时间段</el-checkbox
>
</div>
<div v-if="checked" style="margin-left: 20px;border:1px solid #DCDFE6;min-width: 220px;height: 32px;border-radius: 4px;max-width:250px;
font-size: 13px; line-height: 32px; text-indent: 8px;" @click="show">
{{ selectTime1 ? "时段二: " : "请选择: "}}
<span v-if="selectTime1">{{selectTime + "-" + selectTime1}}</span>
<el-date-picker
style="opacity: 0"
v-model="time"
@change="timeChange"
ref="time"
:validate-event="false"
type="date"
placeholder="选择日期"
format="yyyy - MM - dd "
value-format="yyyy-MM-dd"
:picker-options="pickerOptions"
>
</el-date-picker>
<div
v-if="checked"
style="
margin-left: 20px;
border: 1px solid #dcdfe6;
min-width: 220px;
height: 32px;
border-radius: 4px;
max-width: 360px;
font-size: 13px;
line-height: 32px;
text-indent: 8px;
cursor: pointer;
"
@click="show"
>
<div style="display: flex">
<div style="min-width: 60px">
{{ selectTime1 ? "时段二: " : "请选择: " }}
</div>
<div v-if="selectTime1" style="display: flex;">
<!-- {{ selectTime+ "-" + selectTime1}} -->
<div style="min-width: 120px; text-align: center">
{{ selectTime }}
</div>
<span>-</span>
<div
style="min-width: 120px; text-align: center; margin-right: 32px"
>
{{ selectTime1 }}
</div>
</div>
</div>

<el-date-picker
style="opacity: 0"
v-model="time"
@change="timeChange"
ref="time"
:validate-event="false"
type="date"
placeholder="选择日期"
format="yyyy - MM - dd "
value-format="yyyy-MM-dd"
:picker-options="pickerOptions"
>
</el-date-picker>
</div>
</div>

<div class="kapiannox">
@@ -89,7 +123,7 @@
<div
class="alllist"
@click="compareChange(0)"
:class="compareFlag == 0 ? 'active' : 'noactive'"
:class="compareFlag == 0 ? 'active' : 'noactive'"
>
<div class="alllist-text1">设备总数</div>
<div class="alllist-text1">
@@ -114,7 +148,7 @@
<div
class="alllist"
@click="compareChange(1)"
:class="compareFlag == 1 ? 'active' : 'noactive'"
:class="compareFlag == 1 ? 'active' : 'noactive'"
>
<div class="alllist-text1">在线设备数</div>
<div class="alllist-text1">
@@ -129,7 +163,7 @@
:style="
compare.onlineQuantity > 0 ? 'color:red;' : 'color:green;'
"
>{{ compare.onlineQuantity }}</span
>{{ compare.onlineQuantity }}</span
>
<!-- {{details.onlineQuantity}}-->
</div>
@@ -138,7 +172,7 @@
<div
class="alllist"
@click="compareChange(2)"
:class="compareFlag == 2 ? 'active' : 'noactive'"
:class="compareFlag == 2 ? 'active' : 'noactive'"
>
<div class="alllist-text1">在线设备平均占比</div>
<div class="alllist-text1">
@@ -156,7 +190,7 @@
:style="
compare.onlineRate > 0 ? 'color:red;' : 'color:green;'
"
>{{ compare.onlineRate }}</span
>{{ compare.onlineRate }}</span
>
</div>
</div>
@@ -164,7 +198,7 @@
<div
class="alllist"
@click="compareChange(3)"
:class="compareFlag == 3 ? 'active' : 'noactive'"
:class="compareFlag == 3 ? 'active' : 'noactive'"
>
<div class="alllist-text1">活跃设备数</div>
<div class="alllist-text1">
@@ -180,7 +214,7 @@
:style="
compare.activeQuantity > 0 ? 'color:red;' : 'color:green;'
"
>{{ compare.activeQuantity }}</span
>{{ compare.activeQuantity }}</span
>
</div>
</div>
@@ -188,7 +222,7 @@
<div
class="alllist"
@click="compareChange(4)"
:class="compareFlag == 4 ? 'active' : 'noactive'"
:class="compareFlag == 4 ? 'active' : 'noactive'"
>
<div class="alllist-text1">活跃设备平均占比</div>
<div class="alllist-text1">
@@ -206,7 +240,7 @@
:style="
compare.activeRate > 0 ? 'color:red;' : 'color:green;'
"
>{{ compare.activeRate}}</span
>{{ compare.activeRate }}</span
>
</div>
</div>
@@ -214,7 +248,7 @@
<div
class="alllist"
@click="compareChange(5)"
:class="compareFlag == 5 ? 'active' : 'noactive'"
:class="compareFlag == 5 ? 'active' : 'noactive'"
>
<div class="alllist-text1">指派次数</div>
<div class="alllist-text1">
@@ -238,7 +272,7 @@
<div
class="alllist"
@click="compareChange(6)"
:class="compareFlag == 6 ? 'active' : 'noactive'"
:class="compareFlag == 6 ? 'active' : 'noactive'"
>
<div class="alllist-text1">完整录音次数</div>
<div class="alllist-text1">
@@ -264,7 +298,7 @@
<div
class="alllist"
@click="compareChange(7)"
:class="compareFlag == 7 ? 'active' : 'noactive'"
:class="compareFlag == 7 ? 'active' : 'noactive'"
>
<div class="alllist-text1">完整录音占比</div>
<div class="alllist-text1">
@@ -282,7 +316,7 @@
:style="
compare.fullRecordRate > 0 ? 'color:red;' : 'color:green;'
"
>{{ compare.fullRecordRate }}</span
>{{ compare.fullRecordRate }}</span
>
</div>
</div>
@@ -290,7 +324,7 @@
<div
class="alllist"
@click="compareChange(8)"
:class="compareFlag == 8 ? 'active' : 'noactive'"
:class="compareFlag == 8 ? 'active' : 'noactive'"
>
<div class="alllist-text1">部分录音</div>
<div class="alllist-text1">
@@ -318,7 +352,7 @@
<div
class="alllist"
@click="compareChange(9)"
:class="compareFlag == 9 ? 'active' : 'noactive'"
:class="compareFlag == 9 ? 'active' : 'noactive'"
>
<div class="alllist-text1">未录音</div>
<div class="alllist-text1">
@@ -342,7 +376,7 @@
<div
class="alllist"
@click="compareChange(10)"
:class="compareFlag == 10 ? 'active' : 'noactive'"
:class="compareFlag == 10 ? 'active' : 'noactive'"
>
<div class="alllist-text1">正常关机次数</div>
<div class="alllist-text1">
@@ -362,7 +396,7 @@
? 'color:red;'
: 'color:green;'
"
>{{ compare.normalShutdownQuantity}}</span
>{{ compare.normalShutdownQuantity }}</span
>
</div>
</div>
@@ -370,7 +404,7 @@
<div
class="alllist"
@click="compareChange(11)"
:class="compareFlag == 11 ? 'active' : 'noactive'"
:class="compareFlag == 11 ? 'active' : 'noactive'"
>
<div class="alllist-text1">低电关机次数</div>
<div class="alllist-text1">
@@ -390,7 +424,7 @@
? 'color:red;'
: 'color:green;'
"
>{{ compare.lowElectricityQuantity}}</span
>{{ compare.lowElectricityQuantity }}</span
>
</div>
</div>
@@ -398,7 +432,7 @@
<div
class="alllist"
@click="compareChange(12)"
:class="compareFlag == 12 ? 'active' : 'noactive'"
:class="compareFlag == 12 ? 'active' : 'noactive'"
>
<div class="alllist-text1">异常关机次数</div>
<div class="alllist-text1">
@@ -418,7 +452,7 @@
? 'color:red;'
: 'color:green;'
"
>{{ compare.abnormalShutdownQuantity }}</span
>{{ compare.abnormalShutdownQuantity }}</span
>
</div>
</div>
@@ -593,16 +627,24 @@
<el-table-column prop="name" label="时间" align="center">
</el-table-column>
<el-table-column prop="time" label="时段一" align="center">
<template slot-scope="{row}">
<span v-if="compareFlag==4 || compareFlag==7 || compareFlag==2"> {{row.time}}%</span>
<span v-else> {{row.time}}</span>
</template>
<template slot-scope="{ row }">
<span
v-if="compareFlag == 4 || compareFlag == 7 || compareFlag == 2"
>
{{ row.time }}%</span
>
<span v-else> {{ row.time }}</span>
</template>
</el-table-column>
<el-table-column prop="time1" label="时段二" align="center">
<template slot-scope="{row}">
<span v-if="compareFlag==4 || compareFlag==7 || compareFlag==2"> {{row.time1}}%</span>
<span v-else> {{row.time1}}</span>
</template>
<template slot-scope="{ row }">
<span
v-if="compareFlag == 4 || compareFlag == 7 || compareFlag == 2"
>
{{ row.time1 }}%</span
>
<span v-else> {{ row.time1 }}</span>
</template>
</el-table-column>
<el-table-column prop="time2" label="变化" align="center">
<template slot-scope="scope">
@@ -718,8 +760,8 @@ export default {
lowElectricityQuantity: "",
abnormalShutdownQuantity: "",
},
pageSize: "6",
pageNum: "1",
pageSize: 6,
pageNum: 1,
total: 10,
allCompare: {},
options: [
@@ -790,7 +832,7 @@ export default {
});
},
compareChange(idx) {
if(!this.selectTime1)return
if (!this.selectTime1) return;
this.compareFlag = idx;
this.tabChange(idx);
},
@@ -925,7 +967,7 @@ export default {
this.$api.api
.findHouseByUser({
orgType: localStorage.getItem("orgType"),
agentId:localStorage.getItem("agentId")
agentId: localStorage.getItem("agentId"),
})
.then((res) => {
this.houseList = res.data;
@@ -1070,107 +1112,105 @@ export default {
}
// 获取到数据后对数据进行操作
// 循环大数组,赋值
if(this.selectTime1){
let timeDate=[]
let arr1=[]
let arr2=[]
this.compareList.map((item,index) => {
item.time = item.first[str];
item.time1 = item.second[str];
item.time2 = item.contrast[str] + "";
if(index>0){
timeDate.push(item.name)
arr1.push(item.first[str])
arr2.push(item.second[str])
}
});
this.compareList = Object.assign([], this.compareList);
this.$forceUpdate();
var chartDom = document.getElementById("compare");
echarts.init(chartDom).dispose()
var myChart = echarts.init(chartDom);
var option;

if (this.selectTime1) {
let timeDate = [];
let arr1 = [];
let arr2 = [];
this.compareList.map((item, index) => {
item.time = item.first[str];
item.time1 = item.second[str];
item.time2 = item.contrast[str] + "";
if (index > 0) {
timeDate.push(item.name);
arr1.push(item.first[str]);
arr2.push(item.second[str]);
}
});
this.compareList = Object.assign([], this.compareList);
this.$forceUpdate();
var chartDom = document.getElementById("compare");
echarts.init(chartDom).dispose();
var myChart = echarts.init(chartDom);
var option;

option = {
tooltip: {
trigger: "axis",
},
legend: {
data: ["时段一",'对比时段'],
bottom: "10",
},
grid: {
left: 10,
right: 10,
containLabel: true,
},
xAxis: {
type: "category",
data: timeDate,
axisLabel: {
//重点在这一块,其余可以忽略
textStyle: {
color: "#212121", //更改坐标轴文字颜色
},
option = {
tooltip: {
trigger: "axis",
},
axisLine: {
lineStyle: {
type: "solid",
color: "#DDE1EE", //x线的颜色
width: "1", //坐标线的宽度
},
legend: {
data: ["时段一", "对比时段"],
bottom: "10",
},
},
yAxis: {
type: "value",
splitNumber: 4,
axisLabel: {
//重点在这一块,其余可以忽略
textStyle: {
color: "#212121", //更改坐标轴文字颜色
},
grid: {
left: 10,
right: 10,
containLabel: true,
},
axisLine: {
lineStyle: {
ype: "solid",
color: "#DDE1EE", //x线的颜色
width: "1", //坐标线的宽度
xAxis: {
type: "category",
data: timeDate,
axisLabel: {
//重点在这一块,其余可以忽略
textStyle: {
color: "#212121", //更改坐标轴文字颜色
},
},
},
splitLine: {
lineStyle: {
type: "dashed", // y轴分割线类型
axisLine: {
lineStyle: {
type: "solid",
color: "#DDE1EE", //x线的颜色
width: "1", //坐标线的宽度
},
},
},
axisTick: {
//y轴刻度线
show: false,
},
},
series: [
{
name: "时段一",
data: arr1,
type: "line",
smooth: true,
yAxis: {
type: "value",
splitNumber: 4,
axisLabel: {
//重点在这一块,其余可以忽略
textStyle: {
color: "#212121", //更改坐标轴文字颜色
},
},
axisLine: {
lineStyle: {
ype: "solid",
color: "#DDE1EE", //x线的颜色
width: "1", //坐标线的宽度
},
},
splitLine: {
lineStyle: {
type: "dashed", // y轴分割线类型
},
},
axisTick: {
//y轴刻度线
show: false,
},
},
series: [
{
name: "对比时段",
data: arr2,
type: "line",
smooth: true,
},
],
};
option && myChart.setOption(option);
window.addEventListener("resize", () => {
myChart.resize();
});
}else{
console.log('第一种');
name: "时段一",
data: arr1,
type: "line",
smooth: true,
},
{
name: "对比时段",
data: arr2,
type: "line",
smooth: true,
},
],
};
option && myChart.setOption(option);
window.addEventListener("resize", () => {
myChart.resize();
});
} else {
console.log("第一种");
}

},
//获取统计数据
getdetail() {
@@ -1403,7 +1443,7 @@ export default {
border-bottom: 1px solid #e0e0e0;
}
.active {
background: #EEF1F4;
background: #eef1f4;
// border: 1px solid #409eff;
}
.timeSel {
@@ -1426,7 +1466,7 @@ export default {
.alllist-f2 {
font-size: 12px;
}
.demonstration{
.demonstration {
line-height: 36px;
}
</style>

+ 9
- 2
src/views/ReceivingRecords/index.vue View File

@@ -29,6 +29,13 @@
<div class="app-titel" style="margin-top: 15px">
<div class="label" style="margin-left: 20px">时间:</div>
<div class="toptimeqhuan">
<div
style="cursor: pointer;"
:class="{ tophove: searchForm.dateType == null }"
@click="tabtimetap(null)"
>
全部
</div>
<div
style="cursor: pointer;"
:class="{ tophove: searchForm.dateType == 0 }"
@@ -433,7 +440,7 @@ export default {
staDate: "",
endDate: "",
houseType: "",
dateType: "0",
dateType: null,
projectId: "",
taboo:'',
zfal:''
@@ -500,7 +507,7 @@ export default {
staDate: "",
endDate: "",
houseType: "",
dateType: "0",
dateType: null,
taboo:'',
zfal:'',
// projectId: this.houseList[0].id,


+ 727
- 547
src/views/Statistics/TrendAnalysis.vue
File diff suppressed because it is too large
View File


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

@@ -1,7 +1,7 @@
<template>
<div class="box-center">
<!-- 头 -->
<div class="app-top" v-if="orgType!=2">
<div class="app-top" v-if="orgType != 2">
<div class="app-titel" style="margin-left: 15px">
<el-select
v-model="selValue"
@@ -9,7 +9,7 @@
style="width: 100px"
placeholder="请选择"
>
<el-option label="代理商" v-if="orgType==0" value="0"></el-option>
<el-option label="代理商" v-if="orgType == 0" value="0"></el-option>
<el-option label="公司" value="1"></el-option>
</el-select>
<div style="margin-left: 26px" v-if="selValue == 1">
@@ -75,7 +75,7 @@

<div class="app-box-er">
<div class="app-titel" style="margin-bottom: 10px">
<div class="titel-text" style="text-indent: 0">楼盘趋势</div>
<div class="titel-text" style="text-indent: 0;min-width:64px;">楼盘趋势</div>
<div class="toptimeqhuan">
<div :class="{ tophove: dateType == 4 }" @click="tabtimetap(4)">
近7天
@@ -87,7 +87,7 @@
近30天
</div>
</div>
<div style="margin-left: 20px">
<div style="margin-left: 20px;">
<el-date-picker
@change="confirmtime"
v-model="customtime"
@@ -115,15 +115,33 @@
min-width: 220px;
height: 30px;
border-radius: 4px;
max-width: 250px;
max-width: 360px;
font-size: 13px;
line-height: 30px;
text-indent: 8px;
cursor: pointer;
"
@click="show"
>
{{ selectTime1 ? "时段二: " : "请选择: " }}
<span v-if="selectTime1">{{ selectTime + "-" + selectTime1 }}</span>
<!-- {{ selectTime1 ? "时段二: " : "请选择: " }}
<span v-if="selectTime1">{{ selectTime + "-" + selectTime1 }}</span> -->
<div style="display: flex">
<div style="min-width: 60px">
{{ selectTime1 ? "时段二: " : "请选择: " }}
</div>
<div v-if="selectTime1" style="display: flex">
<!-- {{ selectTime+ "-" + selectTime1}} -->
<div style="min-width: 120px; text-align: center">
{{ selectTime }}
</div>
<span>-</span>
<div
style="min-width: 120px; text-align: center; margin-right: 32px"
>
{{ selectTime1 }}
</div>
</div>
</div>
<el-date-picker
style="opacity: 0"
v-model="time"
@@ -140,7 +158,11 @@
</div>

<div class="container">
<div class="grid-content" @click="secondChange('1')" style="height:auto; padding-bottom:10px;cursor: pointer;">
<div
class="grid-content"
@click="secondChange('1')"
style="height: auto; padding-bottom: 10px; cursor: pointer"
>
<div class="text1" :class="{ tophovese: secindex == 1 }">
活跃楼盘数
</div>
@@ -149,10 +171,19 @@
</div>
<div class="text33" v-if="selectTime1">
<div>
对比时段: <span style="text-indent: 20px;">{{compare1.activeHouseQuantity||0}}</span>
对比时段:
<span style="text-indent: 20px">{{
compare1.activeHouseQuantity || 0
}}</span>
</div>
<div :style="compare2.activeHouseQuantity>=0 ? 'color:green;': 'color:red;'">
{{compare2.activeHouseQuantity||0}}
<div
:style="
compare2.activeHouseQuantity >= 0
? 'color:green;'
: 'color:red;'
"
>
{{ compare2.activeHouseQuantity || 0 }}
</div>
</div>
</div>
@@ -160,9 +191,9 @@
<div id="main"></div>
</div>

<div class="app-box-er" v-if="selectTime1">
<div class="app-box-er" v-if="selectTime1">
<template>
<el-table :data="tableData" style="width: 100%" height="320">
<el-table :data="tableData" style="width: 100%" height="320">
<el-table-column prop="time" label="时间" align="center">
</el-table-column>
<el-table-column prop="data1" label="时段一" align="center">
@@ -172,12 +203,9 @@
<el-table-column prop="data3" label="变化" align="center">
<template slot-scope="scope">
<span
:style="
scope.row.data3>=0
? 'color:green;'
: 'color:red;'
"
>{{ scope.row.data3 }}</span>
:style="scope.row.data3 >= 0 ? 'color:green;' : 'color:red;'"
>{{ scope.row.data3 }}</span
>
</template>
</el-table-column>
</el-table>
@@ -198,15 +226,18 @@ export default {
},
},
firstTab: {},
tableData:[],
tableData: [],
secondTab: {},
thirdTab: {},
selValue: localStorage.getItem('orgType')==0?'0':'1',
selValue: localStorage.getItem("orgType") == 0 ? "0" : "1",
checked: false,
selectTime1: "", //对比时间
selectTime: "", //对比时间
choicValue:localStorage.getItem('orgType')==2?localStorage.getItem('orgCode'):'',
orgType:localStorage.getItem('orgType'),
choicValue:
localStorage.getItem("orgType") == 2
? localStorage.getItem("orgCode")
: "",
orgType: localStorage.getItem("orgType"),
houseList: [],
secindex: "1",
dateType: 4,
@@ -227,7 +258,6 @@ export default {
value: "1",
},
],

};
},
mounted() {
@@ -240,7 +270,12 @@ export default {
this.$api.api
.houseDataAll({
// agentId: this.selValue == 0 ? this.choicValue : null,
agentId: this.orgType==0?(this.selValue == 0 ? this.choicValue : null):localStorage.getItem('agentId'),
agentId:
this.orgType == 0
? this.selValue == 0
? this.choicValue
: null
: localStorage.getItem("agentId"),
orgCode: this.selValue == 1 ? this.choicValue : null,
orgType: localStorage.getItem("orgType"),
})
@@ -259,7 +294,12 @@ export default {
contrastEndDate: this.selectTime1,
dateType: this.dateType,
// agentId: this.selValue == 0 ? this.choicValue : null,
agentId: this.orgType==0?(this.selValue == 0 ? this.choicValue : null):localStorage.getItem('agentId'),
agentId:
this.orgType == 0
? this.selValue == 0
? this.choicValue
: null
: localStorage.getItem("agentId"),
orgCode: this.selValue == 1 ? this.choicValue : null,
orgType: localStorage.getItem("orgType"),
})
@@ -269,14 +309,14 @@ export default {
this.compare = res.data.firstData;

if (this.selectTime1) {
console.log("4444")
console.log("4444");
// 有对比
this.compare1 = res.data.secondData;
// 将得到的三者的数据进行组装为一个数组
this.compare2 = res.data.thirdData;
}else{
this.compare1=[]
this.compare2=[]
} else {
this.compare1 = [];
this.compare2 = [];
}
this.getChars(1);
});
@@ -365,16 +405,16 @@ export default {
];
this.SwitchCARDS(arr, "main", timeDate, Strname);
let tableData = [];
timeDate.map((item,idx) => {
timeDate.map((item, idx) => {
let obj = {
time:item,
data1:arr1[idx],
data2:arr2[idx],
data3:arr3[idx],
time: item,
data1: arr1[idx],
data2: arr2[idx],
data3: arr3[idx],
};
tableData.push(obj)
tableData.push(obj);
});
this.tableData=tableData
this.tableData = tableData;
}
},
//时间tab切换
@@ -421,24 +461,23 @@ export default {
new Date(this.customtime[1]).getTime() -
new Date(this.customtime[0]).getTime()
);
}else{
let num = 24 * 3600 * 1000;
// 获取当前时间戳转换为日期格式
if (this.dateType == 4) {
num = 24 * 3600 * 1000 * 6;
}
if (this.dateType == 5) {
num = 24 * 3600 * 1000 * 14;
}
if (this.dateType == 6) {
num = 24 * 3600 * 1000 * 29;
}
this.selectTime = e;
this.selectTime1 = this.timestampToTime(new Date(e).getTime() + num);
} else {
let num = 24 * 3600 * 1000;
// 获取当前时间戳转换为日期格式
if (this.dateType == 4) {
num = 24 * 3600 * 1000 * 6;
}
if (this.dateType == 5) {
num = 24 * 3600 * 1000 * 14;
}
if (this.dateType == 6) {
num = 24 * 3600 * 1000 * 29;
}
this.selectTime = e;
this.selectTime1 = this.timestampToTime(new Date(e).getTime() + num);
}
this.Confirmthecontrast = true;
this.houseTrends();

},
getList() {
// 当为楼盘选择时
@@ -446,7 +485,7 @@ export default {
this.$api.api
.findMyOrg({
orgType: localStorage.getItem("orgType"),
agentId:localStorage.getItem('agentId')
agentId: localStorage.getItem("agentId"),
})
.then((res) => {
this.houseList = res.data;
@@ -494,8 +533,8 @@ export default {
this.selectTime = "";
this.selectTime1 = "";
this.$set(this, "time", null);
if(!this.checked){
this.houseTrends();
if (!this.checked) {
this.houseTrends();
}
},
timestampToTime(timestamp) {
@@ -518,7 +557,7 @@ export default {
SwitchCARDS(arr, str, timeDate, Strname) {
console.log(arr);
var chartDom = document.getElementById(str);
echarts.init(chartDom).dispose()
echarts.init(chartDom).dispose();
var myChart = echarts.init(chartDom);

var option;
@@ -595,7 +634,7 @@ export default {
.box-center {
width: 100%;
padding: 15px;
min-width:1000px;
min-width: 1000px;
padding-bottom: 100px;
}

@@ -827,7 +866,7 @@ export default {
display: flex;
justify-content: space-between;
}
.text33{
.text33 {
font-size: 12px;
text-indent: 20px;
line-height: 20px;


+ 214
- 132
src/views/Statistics/trend.vue View File

@@ -9,9 +9,8 @@
style="width: 100px"
placeholder="请选择"
>

<el-option label="代理商" v-if="orgType==0" value="0"></el-option>
<el-option label="公司" v-if="orgType!=2" value="1"></el-option>
<el-option label="代理商" v-if="orgType == 0" value="0"></el-option>
<el-option label="公司" v-if="orgType != 2" value="1"></el-option>
<el-option label="楼盘" value="2"></el-option>
</el-select>
<!-- -->
@@ -70,9 +69,11 @@
</div>
</div>

<div class="app-box-er">
<div class="app-box-er" >
<div class="app-titel" style="margin-bottom: 10px">
<div class="titel-text" style="text-indent: 0">楼盘趋势</div>
<div class="titel-text" style="text-indent: 0; min-width: 64px">
楼盘趋势
</div>
<div class="toptimeqhuan">
<div :class="{ tophove: dateType == 4 }" @click="tabtimetap(4)">
近7天
@@ -112,15 +113,33 @@
min-width: 220px;
height: 30px;
border-radius: 4px;
max-width: 250px;
max-width: 360px;
font-size: 13px;
line-height: 30px;
text-indent: 8px;
cursor: pointer;
"
@click="show"
>
{{ selectTime1 ? "时段二: " : "请选择: " }}
<span v-if="selectTime1">{{ selectTime + "-" + selectTime1 }}</span>
<!-- {{ selectTime1 ? "时段二: " : "请选择: " }}
<span v-if="selectTime1">{{ selectTime + "-" + selectTime1 }}</span> -->
<div style="display: flex">
<div style="min-width: 60px">
{{ selectTime1 ? "时段二: " : "请选择: " }}
</div>
<div v-if="selectTime1" style="display: flex">
<!-- {{ selectTime+ "-" + selectTime1}} -->
<div style="min-width: 120px; text-align: center">
{{ selectTime }}
</div>
<span>-</span>
<div
style="min-width: 120px; text-align: center; margin-right: 32px"
>
{{ selectTime1 }}
</div>
</div>
</div>
<el-date-picker
style="opacity: 0"
v-model="time"
@@ -139,7 +158,7 @@
<div class="container">
<div
class="grid-content"
@click="secondChange('receptionCount','接待客户/个')"
@click="secondChange('receptionCount', '接待客户/个')"
style="height: auto; padding-bottom: 10px"
>
<div
@@ -172,7 +191,7 @@
</div>
<div
class="grid-content"
@click="secondChange('avgDuration','平均接待时长/分钟')"
@click="secondChange('avgDuration', '平均接待时长/分钟')"
style="height: auto"
>
<div class="text1" :class="{ tophovese: secindex == 'avgDuration' }">
@@ -197,7 +216,7 @@
</div>
<div
class="grid-content"
@click="secondChange('prohibitedCustomer','违禁接待次数/次')"
@click="secondChange('prohibitedCustomer', '违禁接待次数/次')"
style="height: auto; padding-bottom: 10px"
>
<div
@@ -230,7 +249,7 @@
</div>
<div
class="grid-content"
@click="secondChange('activeCustomer','有效接待/次')"
@click="secondChange('activeCustomer', '有效接待/次')"
style="height: auto; padding-bottom: 10px"
>
<div
@@ -263,7 +282,7 @@
</div>
<div
class="grid-content"
@click="secondChange('activeCustomerRate','有效接待占比/%')"
@click="secondChange('activeCustomerRate', '有效接待占比/%')"
style="height: auto; padding-bottom: 10px"
>
<div
@@ -296,7 +315,7 @@
</div>
<div
class="grid-content"
@click="secondChange('fraction','平均执行率/%')"
@click="secondChange('fraction', '平均执行率/%')"
style="height: auto; padding-bottom: 10px"
>
<div class="text1" :class="{ tophovese: secindex == 'fraction' }">
@@ -329,33 +348,54 @@
<el-table-column prop="time" label="时间" align="center">
</el-table-column>
<el-table-column prop="data1" label="时段一" align="center">
<template slot-scope="{row}">
<span v-if="secindex=='fraction'|| secindex=='activeCustomerRate'"> {{row.data1}}%</span>
<span v-else> {{row.data1}}</span>
<template slot-scope="{ row }">
<span
v-if="
secindex == 'fraction' || secindex == 'activeCustomerRate'
"
>
{{ row.data1 }}%</span
>
<span v-else> {{ row.data1 }}</span>
</template>
</el-table-column>
<el-table-column prop="data2" label="时段二" align="center">
<template slot-scope="{row}">
<span v-if="secindex=='fraction'|| secindex=='activeCustomerRate'"> {{row.data2}}%</span>
<span v-else> {{row.data2}}</span>
<template slot-scope="{ row }">
<span
v-if="
secindex == 'fraction' || secindex == 'activeCustomerRate'
"
>
{{ row.data2 }}%</span
>
<span v-else> {{ row.data2 }}</span>
</template>
</el-table-column>
<el-table-column prop="data3" label="变化" align="center">
<template slot-scope="scope">
<span v-if="secindex=='fraction'|| secindex=='activeCustomerRate'" :style="scope.row.data3 >= 0 ? 'color:green;' : 'color:red;'" >{{ scope.row.data3 }}%</span>
<span v-else :style="scope.row.data3 >= 0 ? 'color:green;' : 'color:red;'" >{{ scope.row.data3 }}</span>
<span
v-if="
secindex == 'fraction' || secindex == 'activeCustomerRate'
"
:style="scope.row.data3 >= 0 ? 'color:green;' : 'color:red;'"
>{{ scope.row.data3 }}%</span
>
<span
v-else
:style="scope.row.data3 >= 0 ? 'color:green;' : 'color:red;'"
>{{ scope.row.data3 }}</span
>
</template>
</el-table-column>
</el-table>
</template>

</div>
</div>
</template>

<script>
import * as echarts from "echarts";
import topLogsVue from '../../page/index/top/top-logs.vue';
import topLogsVue from "../../page/index/top/top-logs.vue";
export default {
data() {
return {
@@ -369,12 +409,17 @@ export default {
tableData: [],
secondTab: {},
thirdTab: {},
selValue: localStorage.getItem('orgType')==0?'0':localStorage.getItem('orgType')==1?'1':'2',
selValue:
localStorage.getItem("orgType") == 0
? "0"
: localStorage.getItem("orgType") == 1
? "1"
: "2",
checked: false,
selectTime1: "", //对比时间
selectTime: "", //对比时间
choicValue: '',
orgType:localStorage.getItem('orgType'),
choicValue: "",
orgType: localStorage.getItem("orgType"),
houseList: [],
secindex: "receptionCount",
dateType: 4,
@@ -419,11 +464,11 @@ export default {
houseId: this.selValue == 2 ? this.choicValue : null,
orgType: localStorage.getItem("orgType"),
};
if(obj.orgType == 1){
obj.agentId=localStorage.getItem("agentId")
if (obj.orgType == 1) {
obj.agentId = localStorage.getItem("agentId");
}
if(obj.orgType==2){
obj.orgCode=localStorage.getItem("orgCode")
if (obj.orgType == 2) {
obj.orgCode = localStorage.getItem("orgCode");
}
this.$api.api.receptionOverviewOfSystem(obj).then((res) => {
this.compare = res.data.firstData;
@@ -433,10 +478,10 @@ export default {
// 将得到的三者的数据进行组装为一个数组
this.compare2 = res.data.thirdData;
}
this.getChars("receptionCount",'接待客户/个');
this.getChars("receptionCount", "接待客户/个");
});
},
async getChars(str,str1) {
async getChars(str, str1) {
let obj = {
startDate: this.dateType ? "" : this.customtime[0],
endDate: this.dateType ? "" : this.customtime[1],
@@ -448,11 +493,11 @@ export default {
houseId: this.selValue == 2 ? this.choicValue : null,
orgType: localStorage.getItem("orgType"),
};
if(obj.orgType == 1){
obj.agentId=localStorage.getItem("agentId")
if (obj.orgType == 1) {
obj.agentId = localStorage.getItem("agentId");
}
if(obj.orgType==2){
obj.orgCode=localStorage.getItem("orgCode")
if (obj.orgType == 2) {
obj.orgCode = localStorage.getItem("orgCode");
}
if (!this.selectTime1) {
let res = await this.$api.api.receptionDataOfSystem(obj);
@@ -467,7 +512,7 @@ export default {
// console.log(timeDate);
res.data.firstValue.map((item) => {
timeDate.push(item.statDate.substring(5, 10));
arr1.push(item[str]||0);
arr1.push(item[str] || 0);
});

let arr = [
@@ -566,30 +611,30 @@ export default {
this.timeSelect(e);
},
timeSelect(e) {
if (this.dateType == null) {
if (this.dateType == null) {
this.selectTime = e;
this.selectTime1 = this.timestampToTime(
new Date(e).getTime() +
new Date(this.customtime[1]).getTime() -
new Date(this.customtime[0]).getTime()
);
}else{
let num = 24 * 3600 * 1000;
if (this.dateType == 4) {
num = 24 * 3600 * 1000 * 6;
}
if (this.dateType == 5) {
num = 24 * 3600 * 1000 * 14;
}
if (this.dateType == 6) {
num = 24 * 3600 * 1000 * 29;
}
this.selectTime = e;
this.selectTime1 = this.timestampToTime(new Date(e).getTime() + num);
} else {
let num = 24 * 3600 * 1000;
if (this.dateType == 4) {
num = 24 * 3600 * 1000 * 6;
}
if (this.dateType == 5) {
num = 24 * 3600 * 1000 * 14;
}
if (this.dateType == 6) {
num = 24 * 3600 * 1000 * 29;
}
this.selectTime = e;
this.selectTime1 = this.timestampToTime(new Date(e).getTime() + num);
}
console.log(this.selectTime, this.selectTime1);
this.Confirmthecontrast = true;
this.receptionOverviewOfSystem();
console.log(this.selectTime, this.selectTime1);
this.Confirmthecontrast = true;
this.receptionOverviewOfSystem();
},
getList() {
console.log(this.selValue);
@@ -598,7 +643,7 @@ export default {
this.$api.api
.findMyOrg({
orgType: localStorage.getItem("orgType"),
agentId:localStorage.getItem("agentId")
agentId: localStorage.getItem("agentId"),
})
.then((res) => {
this.houseList = res.data;
@@ -608,7 +653,7 @@ export default {
this.$api.api
.findHouseByUser({
orgType: localStorage.getItem("orgType"),
houseId:localStorage.getItem("houseId"),
houseId: localStorage.getItem("houseId"),
})
.then((res) => {
this.houseList = res.data;
@@ -625,9 +670,9 @@ export default {
});
}
},
secondChange(i,str) {
secondChange(i, str) {
this.secindex = i;
this.getChars(i,str);
this.getChars(i, str);
},
confirmtime(e) {
this.dateType = null;
@@ -637,7 +682,7 @@ export default {
this.$set(this, "time", null);
if (!e) return;
this.Confirmthecontrast = false;
this.receptionOverviewOfSystem();
this.receptionOverviewOfSystem();
},
selChange() {
this.choicValue = "";
@@ -651,7 +696,7 @@ export default {
this.selectTime = "";
this.selectTime1 = "";
this.$set(this, "time", null);
if(!this.checked){
if (!this.checked) {
this.receptionOverviewOfSystem();
}
},
@@ -674,7 +719,7 @@ export default {
},
//卡片下折线图
SwitchCARDS(arr, str, timeDate, Strname) {
echarts.init(document.getElementById(str)).dispose(); // 销毁实例
echarts.init(document.getElementById(str)).dispose(); // 销毁实例
var chartDom = document.getElementById(str);
var myChart = echarts.init(chartDom);
var option;
@@ -710,65 +755,92 @@ export default {

series: arr,
};
if(this.secindex=='fraction' || this.secindex=='activeCustomerRate'){
if(this.selectTime1){
option.tooltip={
trigger: 'axis',
if (
this.secindex == "fraction" ||
this.secindex == "activeCustomerRate"
) {
if (this.selectTime1) {
option.tooltip = {
trigger: "axis",
formatter: function (params) {
let src= '<p>'+params[0].seriesName+':'+params[0].data+'%'+'</p>'+'<p>'+params[1].seriesName+':'+ params[1].data+'%'+'</p>';
return src
}
let src =
"<p>" +
params[0].seriesName +
":" +
params[0].data +
"%" +
"</p>" +
"<p>" +
params[1].seriesName +
":" +
params[1].data +
"%" +
"</p>";
return src;
},
};
} else {
option.tooltip = {
trigger: "axis",
formatter: "{b0}:{c0}" + "%",
};
}else{
option.tooltip={
trigger: 'axis',
formatter: '{b0}:{c0}'+'%'
}
}
option.yAxis={
type: 'value',
splitNumber:5,
max:100,
min:0,
axisLabel: { //重点在这一块,其余可以忽略
textStyle: {
color: '#212121', //更改坐标轴文字颜色
}
},
axisLine: {
lineStyle: {
ype: 'solid',
color: '#DDE1EE',//x线的颜色
width:'1'//坐标线的宽度
}
},
splitLine: {
lineStyle: {
type: 'dashed' // y轴分割线类型
}
},
axisTick: { //y轴刻度线
show: false
},
}
}else if(this.secindex=='avgDuration'){
if(this.selectTime1){
option.tooltip={
trigger: 'axis',
option.yAxis = {
type: "value",
splitNumber: 5,
max: 100,
min: 0,
axisLabel: {
//重点在这一块,其余可以忽略
textStyle: {
color: "#212121", //更改坐标轴文字颜色
},
},
axisLine: {
lineStyle: {
ype: "solid",
color: "#DDE1EE", //x线的颜色
width: "1", //坐标线的宽度
},
},
splitLine: {
lineStyle: {
type: "dashed", // y轴分割线类型
},
},
axisTick: {
//y轴刻度线
show: false,
},
};
} else if (this.secindex == "avgDuration") {
if (this.selectTime1) {
option.tooltip = {
trigger: "axis",
formatter: function (params) {
let src= '<p>'+params[0].seriesName+':'+params[0].data+'分钟'+'</p>'+'<p>'+params[1].seriesName+':'+ params[1].data+'分钟'+'</p>';
return src
}
let src =
"<p>" +
params[0].seriesName +
":" +
params[0].data +
"分钟" +
"</p>" +
"<p>" +
params[1].seriesName +
":" +
params[1].data +
"分钟" +
"</p>";
return src;
},
};
} else {
option.tooltip = {
trigger: "axis",
formatter: "{b0}:{c0}" + "分钟",
};
}else{
option.tooltip={
trigger: 'axis',
formatter: '{b0}:{c0}'+'分钟'
}
}
option.yAxis={
option.yAxis = {
type: "value",
splitNumber: 4,
axisLabel: {
@@ -793,23 +865,35 @@ export default {
//y轴刻度线
show: false,
},
}
}else{
if(this.selectTime1){
option.tooltip={
trigger: 'axis',
};
} else {
if (this.selectTime1) {
option.tooltip = {
trigger: "axis",
formatter: function (params) {
let src= '<p>'+params[0].seriesName+':'+params[0].data+'次'+'</p>'+'<p>'+params[1].seriesName+':'+ params[1].data+'次'+'</p>';
return src
}
let src =
"<p>" +
params[0].seriesName +
":" +
params[0].data +
"次" +
"</p>" +
"<p>" +
params[1].seriesName +
":" +
params[1].data +
"次" +
"</p>";
return src;
},
};
} else {
option.tooltip = {
trigger: "axis",
formatter: "{b0}:{c0}" + "次",
};
}else{
option.tooltip={
trigger: 'axis',
formatter: '{b0}:{c0}'+'次'
}
}
option.yAxis={
option.yAxis = {
type: "value",
splitNumber: 4,
axisLabel: {
@@ -834,11 +918,9 @@ export default {
//y轴刻度线
show: false,
},
}
};
}



option && myChart.setOption(option);
window.addEventListener("resize", () => {
myChart.resize();


+ 2
- 2
src/views/building/Count.vue View File

@@ -452,8 +452,8 @@ export default {
this.selflag='1';
}
}
this.houseStatistics();
this.clascreen()
// this.houseStatistics();
},
timeChange(e) {
this.searchForm.dateType = null;


+ 2
- 2
vue.config.js View File

@@ -3,9 +3,9 @@
* https://cli.vuejs.org/zh/config/
*/
// const url = 'http://pigx-gateway'
const url = 'http://39.97.167.65:9999' //测试
// 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.134:9999' //嘉豪
// const url = 'http://192.168.31.100:9999' //王笑
// const url = 'http://nitu5e.natappfree.cc' //王笑



Loading…
Cancel
Save