Commit c5aafa1f authored by 黄奎's avatar 黄奎

1

parents d98f6b95 ec2471b2
...@@ -4,18 +4,25 @@ ...@@ -4,18 +4,25 @@
<div class="row items-center" style="margin-bottom: 20px;"> <div class="row items-center" style="margin-bottom: 20px;">
<div class="page-title col">平台数据</div> <div class="page-title col">平台数据</div>
<div class="row items-center"> <div class="row items-center">
<el-select v-model="parameters.branchId" style="margin-right: 20px;" @change="getCustomerStatic"> <el-select v-model="parameters.branchId" style="margin-right: 20px;">
<el-option v-for="(x,i) in branchs" :key="i" :label="x.BName" :value="x.Id"></el-option> <el-option v-for="(x,i) in branchs" :key="i" :label="x.BName" :value="x.Id"></el-option>
</el-select> </el-select>
<el-date-picker v-model="parameters.dateRange" type="daterange" align="right" unlink-panels <el-date-picker
@change="getCustomerStatic" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" v-model="parameters.dateRange"
type="daterange"
align="right"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy/MM/dd"
:clearable="false"
:picker-options="pickerOptions"> :picker-options="pickerOptions">
</el-date-picker> </el-date-picker>
</div> </div>
</div> </div>
<div class="card rounded row items-center"> <div class="card rounded row items-center">
<div class="menu-item" :class="{'active':i==active}" v-for="(x,i) in menus" :key="i" @click="handleClick(i)"> <div class="menu-item" :class="{'active':i==active}" v-for="(x,i) in menus" :key="i" @click="handleClick(i)">{{ x.title }}</div>
{{ x.title }}</div>
</div> </div>
<div class="sub-title q-my-md">今日实时数据</div> <div class="sub-title q-my-md">今日实时数据</div>
<div class="card rounded big"> <div class="card rounded big">
...@@ -30,11 +37,7 @@ ...@@ -30,11 +37,7 @@
<div class="data-items col"> <div class="data-items col">
<div>客户总数</div> <div>客户总数</div>
<div class="num" style="margin: 6px 0;"> <div class="num" style="margin: 6px 0;">
<span class="datanum"> <span class="datanum">26052</span>
<template v-if="customerObj&& customerObj.TotalCustomerCount">
{{customerObj.TotalCustomerCount}}
</template>
</span>
<span></span> <span></span>
</div> </div>
<div class="text-info"> &nbsp; </div> <div class="text-info"> &nbsp; </div>
...@@ -43,11 +46,7 @@ ...@@ -43,11 +46,7 @@
<div class="data-items col"> <div class="data-items col">
<div>今日新增客户</div> <div>今日新增客户</div>
<div class="num" style="margin: 6px 0;"> <div class="num" style="margin: 6px 0;">
<span class="datanum"> <span class="datanum">89</span>
<template v-if="customerObj">
{{customerObj.TodayCustomerCount}}
</template>
</span>
<span></span> <span></span>
</div> </div>
<div class="text-info"> <div class="text-info">
...@@ -61,11 +60,7 @@ ...@@ -61,11 +60,7 @@
<div class="data-items col"> <div class="data-items col">
<div>小程序激活数</div> <div>小程序激活数</div>
<div class="num" style="margin: 6px 0;"> <div class="num" style="margin: 6px 0;">
<span class="datanum"> <span class="datanum">455</span>
<template v-if="customerObj">
{{customerObj.TotalActivationCount}}
</template>
</span>
<span></span> <span></span>
</div> </div>
<div class="text-info">&nbsp;</div> <div class="text-info">&nbsp;</div>
...@@ -75,11 +70,7 @@ ...@@ -75,11 +70,7 @@
<div class="data-items col"> <div class="data-items col">
<div>今日激活数</div> <div>今日激活数</div>
<div class="num" style="margin: 6px 0;"> <div class="num" style="margin: 6px 0;">
<span class="datanum"> <span class="datanum">26052</span>
<template v-if="customerObj">
{{customerObj.TodayActivationCount}}
</template>
</span>
<span></span> <span></span>
</div> </div>
<div class="text-info"> <div class="text-info">
...@@ -96,11 +87,11 @@ ...@@ -96,11 +87,11 @@
<div class="sub-title">客户数据走势</div> <div class="sub-title">客户数据走势</div>
<div class=""> <div class="">
<span class="dot"></span> <span class="dot"></span>
<span class="text-info">2024/11/30 - 2025/01/23</span> <span class="text-info">{{ parameters.dateRange.join(' - ') }}</span>
</div> </div>
</div> </div>
<div style="height: 320px;"> <div style="height: 320px;">
<Customer :chartData="customerObj"></Customer> <Customer></Customer>
</div> </div>
</div> </div>
...@@ -111,7 +102,7 @@ ...@@ -111,7 +102,7 @@
<div class="sub-title">今日客户数据</div> <div class="sub-title">今日客户数据</div>
<div class=""> <div class="">
<span class="dot"></span> <span class="dot"></span>
<span class="text-info">2025/01/24 - 2025/01/25</span> <span class="text-info">{{ parameters.dateRange.join(' - ') }}</span>
</div> </div>
</div> </div>
<el-select v-model="platformId" style="width: 140px;"> <el-select v-model="platformId" style="width: 140px;">
...@@ -158,7 +149,7 @@ ...@@ -158,7 +149,7 @@
<div class="sub-title">交易趋势图</div> <div class="sub-title">交易趋势图</div>
<div class=""> <div class="">
<span class="dot"></span> <span class="dot"></span>
<span class="text-info">2024/11/30 - 2025/01/23</span> <span class="text-info">{{ parameters.dateRange.join(' - ') }}</span>
</div> </div>
</div> </div>
<div style="height: 320px;"> <div style="height: 320px;">
...@@ -172,7 +163,7 @@ ...@@ -172,7 +163,7 @@
<div class="sub-title">用户活跃概况</div> <div class="sub-title">用户活跃概况</div>
<div class=""> <div class="">
<span class="dot"></span> <span class="dot"></span>
<span class="text-info">数据更新:周四 2025/01/25</span> <span class="text-info">数据更新:{{ parameters.dateRange[1] }}</span>
</div> </div>
</div> </div>
<div class="q-mt-md row items-center"> <div class="q-mt-md row items-center">
...@@ -241,7 +232,7 @@ ...@@ -241,7 +232,7 @@
<div class="sub-title">新增用户概况</div> <div class="sub-title">新增用户概况</div>
<div class=""> <div class="">
<span class="dot"></span> <span class="dot"></span>
<span class="text-info">数据更新:周四 2025/01/25</span> <span class="text-info">数据更新:{{ parameters.dateRange[1]}}</span>
</div> </div>
</div> </div>
<div class="q-mt-md row items-center"> <div class="q-mt-md row items-center">
...@@ -279,7 +270,7 @@ ...@@ -279,7 +270,7 @@
<div class="sub-title">小程序留存概况</div> <div class="sub-title">小程序留存概况</div>
<div class=""> <div class="">
<span class="dot"></span> <span class="dot"></span>
<span class="text-info">数据更新:周四 2025/01/25</span> <span class="text-info">数据更新: {{ parameters.dateRange[1] }}</span>
</div> </div>
</div> </div>
<div class="q-mt-md row items-center"> <div class="q-mt-md row items-center">
...@@ -319,7 +310,7 @@ ...@@ -319,7 +310,7 @@
<div class="col"> <div class="col">
<div class="sub-title">访问核心指标趋势</div> <div class="sub-title">访问核心指标趋势</div>
<div class=""> <div class="">
<span class="text-info">2024/11/30 - 2025/01/23</span> <span class="text-info">{{ parameters.dateRange.join(' - ') }}</span>
</div> </div>
</div> </div>
<el-select v-model="coreId" style="width: 120px;"> <el-select v-model="coreId" style="width: 120px;">
...@@ -338,7 +329,7 @@ ...@@ -338,7 +329,7 @@
<div class="col"> <div class="col">
<div class="sub-title">页面访问Top10</div> <div class="sub-title">页面访问Top10</div>
<div class=""> <div class="">
<span class="text-info">2024/11/30 - 2025/01/23</span> <span class="text-info">{{ parameters.dateRange.join(' - ') }}</span>
</div> </div>
</div> </div>
<el-select v-model="metricsId" style="width: 140px;"> <el-select v-model="metricsId" style="width: 140px;">
...@@ -354,7 +345,7 @@ ...@@ -354,7 +345,7 @@
<div class="col"> <div class="col">
<div class="sub-title">客户分布占比</div> <div class="sub-title">客户分布占比</div>
<div class=""> <div class="">
<span class="text-info">2024/11/30 - 2025/01/23</span> <span class="text-info">{{ parameters.dateRange.join(' - ') }}</span>
</div> </div>
</div> </div>
<el-select v-model="areaId" style="width: 140px;"> <el-select v-model="areaId" style="width: 140px;">
...@@ -371,20 +362,20 @@ ...@@ -371,20 +362,20 @@
</div> </div>
</template> </template>
<script> <script>
import Customer from './components/customer.vue' import Customer from './components/customer.vue'
import Coreview from './components/coreview.vue'; import Coreview from './components/coreview.vue';
import Pagecount from './components/pagecount.vue'; import Pagecount from './components/pagecount.vue';
import Citiescount from './components/citiescount.vue' import Citiescount from './components/citiescount.vue'
import Tradecount from './components/tradecount.vue' import Tradecount from './components/tradecount.vue'
export default { export default {
components: { components:{
Customer, Customer,
Coreview, Coreview,
Pagecount, Pagecount,
Citiescount, Citiescount,
Tradecount Tradecount
}, },
data() { data(){
return { return {
active: 0, active: 0,
pickerOptions: { pickerOptions: {
...@@ -412,9 +403,13 @@ ...@@ -412,9 +403,13 @@
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90); start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit('pick', [start, end]); picker.$emit('pick', [start, end]);
} }
}] }],
disabledDate(time) {
return time.getTime() > new Date(Date.now() - 3600 * 1000 * 24);
}, },
menus: [{ },
menus:[
{
title: '客户数据', title: '客户数据',
path: 'coreData' path: 'coreData'
}, },
...@@ -424,133 +419,48 @@ ...@@ -424,133 +419,48 @@
}, },
{ {
title: '访问分析', title: '访问分析',
path: 'accessAnalysis' path:'accessAnalysis'
}, },
{ {
title: '产品统计', title: '产品统计',
path: 'productStatistics' path:'productStatistics'
} }
], ],
branchs: [], branchs:[],
parameters: { parameters:{
branchId: -1, branchId:-1,
dateRange: '', dateRange:[]
StartDate: "",
EndDate: "",
},
coreId: 1,
coreLists: [{
"Id": 1,
"Name": "累计用户数"
}, {
"Id": 2,
"Name": "日访问人数"
}, {
"Id": 3,
"Name": "日打开次数"
}, {
"Id": 4,
"Name": "日访问页面数"
}, {
"Id": 5,
"Name": "日新增用户"
}, {
"Id": 6,
"Name": "日打开次数(新用户)"
}, {
"Id": 7,
"Name": "总添加人数"
}, {
"Id": 8,
"Name": "新添加人数"
}, {
"Id": 9,
"Name": "活跃日留存"
}, {
"Id": 10,
"Name": "新增日留存"
}, {
"Id": 11,
"Name": "流失用户数"
}, {
"Id": 12,
"Name": "回流用户数"
}],
metrics: [{
id: 1,
name: "访问次数"
},
{
id: 2,
name: "访问人数"
},
{
id: 3,
name: "次均停留时长"
},
{
id: 4,
name: "进入页次数"
},
{
id: 5,
name: "退出页次数"
}, },
{ coreId:1,
id: 6, coreLists:[{"Id":1,"Name":"累计用户数"},{"Id":2,"Name":"日访问人数"},{"Id":3,"Name":"日打开次数"},{"Id":4,"Name":"日访问页面数"},{"Id":5,"Name":"日新增用户"},{"Id":6,"Name":"日打开次数(新用户)"},{"Id":7,"Name":"总添加人数"},{"Id":8,"Name":"新添加人数"},{"Id":9,"Name":"活跃日留存"},{"Id":10,"Name":"新增日留存"},{"Id":11,"Name":"流失用户数"},{"Id":12,"Name":"回流用户数"}],
name: "转发次数" metrics : [
}, { id: 1, name: "访问次数" },
{ { id: 2, name: "访问人数" },
id: 7, { id: 3, name: "次均停留时长" },
name: "转发人数" { id: 4, name: "进入页次数" },
} { id: 5, name: "退出页次数" },
{ id: 6, name: "转发次数" },
{ id: 7, name: "转发人数" }
], ],
metricsId: 1, metricsId: 1,
areas: [{ areas:[{Id:1,Name:'省份'},{Id:2,Name:'城市'}],
Id: 1, platforms:[{Id:1,Name:'全部'},{Id:2,Name:'旅小友'}],
Name: '省份' platformId:1,
}, { areaId:1,
Id: 2,
Name: '城市'
}],
platforms: [{
Id: 1,
Name: '全部'
}, {
Id: 2,
Name: '旅小友'
}],
platformId: 1,
areaId: 1,
customerObj: {},
} }
}, },
created() { created(){
this.getCompanyList(); this.getCompanyList();
}, const end = new Date();
mounted() { const start = new Date();
this.getCustomerStatic(); start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
end.setTime(end.getTime() - 3600 * 1000 * 24);
this.parameters.dateRange = [start.toLocaleString().split(' ')[0], end.toLocaleString().split(' ')[0]]
}, },
methods: { methods: {
handleClick(index) { handleClick(index){
this.active = index; this.active = index;
}, },
getCustomerStatic() {
if (this.parameters.dateRange && this.parameters.dateRange.length == 2) {
var tempArray = this.parameters.dateRange;
this.parameters.StartDate = tempArray[0];
this.parameters.EndDate = tempArray[0]
}
var that = this;
that.apipost("erp_post_GetCustomerStatic", that.parameters, (res) => {
console.log("res", res);
if (res.data.resultCode == 1) {
this.customerObj = res.data.data;
} else {
that.Error(res.data.message);
}
});
},
getCompanyList() { getCompanyList() {
const userInfo = this.getLocalStorage(); const userInfo = this.getLocalStorage();
const RB_Group_id = userInfo.RB_Group_id; const RB_Group_id = userInfo.RB_Group_id;
...@@ -571,19 +481,17 @@ ...@@ -571,19 +481,17 @@
}, },
} }
} }
</script> </script>
<style> <style>
.full-box { .full-box{
width: 100%; width: 100%;
height: 100%; height: 100%;
background: #f7f7f7; background: #f7f7f7;
padding: 20px; padding:20px;
box-sizing: border-box; box-sizing: border-box;
} }
.full-box .dot {
.full-box .dot {
color: #00ce8b; color: #00ce8b;
amination: realtime 2s infinite; amination: realtime 2s infinite;
-webkit-animation: realtime 2s infinite; -webkit-animation: realtime 2s infinite;
...@@ -595,98 +503,80 @@ ...@@ -595,98 +503,80 @@
display: inline-block; display: inline-block;
border-radius: 50%; border-radius: 50%;
margin-right: 3px; margin-right: 3px;
} }
.full-box .text-info{
.full-box .text-info {
display: inline-block; display: inline-block;
vertical-align: baseline; vertical-align: baseline;
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
color: rgba(0, 0, 0, .3); color: rgba(0, 0, 0, .3);
font-family: Avenir, 'PingFang SC Regular'; font-family: Avenir,'PingFang SC Regular';
} }
.full-box .red{
.full-box .red {
color: #fa5151; color: #fa5151;
} }
.full-box .green{
.full-box .green {
color: #00ce8b !important; color: #00ce8b !important;
} }
.full-box .el-divider{
.full-box .el-divider {
height: 60px !important; height: 60px !important;
margin: 0 12px; margin: 0 12px;
background: #f7f7f7; background: #f7f7f7;
} }
.full-box .num{
.full-box .num {
font-family: Avenir; font-family: Avenir;
} }
.full-box .q-mt-md{
.full-box .q-mt-md {
margin-top: 20px; margin-top: 20px;
} }
.full-box .q-mb-md{
.full-box .q-mb-md {
margin-bottom: 20px; margin-bottom: 20px;
} }
.full-box .q-ml-md{
.full-box .q-ml-md {
margin-left: 20px; margin-left: 20px;
} }
.full-box .q-mr-md{
.full-box .q-mr-md {
margin-right: 20px; margin-right: 20px;
} }
.full-box .q-mx-md{
.full-box .q-mx-md {
margin-right: 20px; margin-right: 20px;
margin-left: 20px; margin-left: 20px;
} }
.full-box .q-my-md{
.full-box .q-my-md {
margin-top: 20px; margin-top: 20px;
margin-bottom: 20px; margin-bottom: 20px;
} }
.full-box .page-title{
.full-box .page-title {
color: rgba(0, 0, 0, .9); color: rgba(0, 0, 0, .9);
font-size: 24px; font-size: 24px;
font-weight: 500; font-weight: 500;
} }
.full-box .data-box{
.full-box .data-box {
max-width: 1366px; max-width: 1366px;
margin: 0 auto; margin: 0 auto;
} }
.full-box .card{
.full-box .card {
background: #fff; background: #fff;
padding: 16px 20px; padding: 16px 20px;
} }
.full-box .card.big{
.full-box .card.big { padding:32px 20px;
padding: 32px 20px; }
} .full-box .menu-item{
.full-box .menu-item {
margin-right: 30px; margin-right: 30px;
font-size: 17px; font-size: 17px;
color: rgba(0, 0, 0, .55); color: rgba(0, 0, 0, .55);
font-weight: 400; font-weight: 400;
cursor: pointer; cursor: pointer;
} }
.full-box .menu-item.active,
.full-box .menu-item.active, .full-box .sub-title{
.full-box .sub-title {
font-family: PingfangSC-Medium, Helvetica; font-family: PingfangSC-Medium, Helvetica;
font-weight: 500; font-weight: 500;
color: rgba(0, 0, 0, .9); color: rgba(0, 0, 0, .9);
font-size: 17px; font-size: 17px;
} }
.full-box .data-items{
.full-box .data-items {
background-color: #fff; background-color: #fff;
padding: 12px; padding: 12px;
border-radius: 12px; border-radius: 12px;
...@@ -694,78 +584,59 @@ ...@@ -694,78 +584,59 @@
/* font-weight: 400; */ /* font-weight: 400; */
color: rgba(0, 0, 0, .9); color: rgba(0, 0, 0, .9);
font-family: PingFang SC Regular; font-family: PingFang SC Regular;
} }
.full-box .text-small{
.full-box .text-small {
font-size: 12px; font-size: 12px;
/* font-weight: 400; */ /* font-weight: 400; */
color: rgba(0, 0, 0, .9); color: rgba(0, 0, 0, .9);
font-family: PingFang SC Regular; font-family: PingFang SC Regular;
} }
.full-box .data-items:hover{
.full-box .data-items:hover {
background-color: #f7f7f7; background-color: #f7f7f7;
} }
.full-box .data-items .datanum{
.full-box .data-items .datanum {
font-size: 24px; font-size: 24px;
font-weight: 500; font-weight: 500;
} }
.full-box .rounded{
.full-box .rounded {
border-radius: 12px; border-radius: 12px;
} }
.full-box .row{
.full-box .row {
display: flex; display: flex;
} }
.full-box .items-center{
.full-box .items-center {
align-items: center; align-items: center;
} }
.full-box .col{
.full-box .col {
flex: 1; flex: 1;
} }
.full-box .justify-between{
.full-box .justify-between {
justify-content: space-between; justify-content: space-between;
} }
.full-box .juesify-center{
.full-box .juesify-center {
justify-content: center; justify-content: center;
} }
.full-box .el-input__inner{
.full-box .el-input__inner {
color: rgba(0, 0, 0, .9) !important; color: rgba(0, 0, 0, .9) !important;
border-radius: 12px !important; border-radius: 12px !important;
border: none !important; border: none !important;
} }
.full-box .el-date-editor .el-range-separator{
.full-box .el-date-editor .el-range-separator {
width: 18px !important; width: 18px !important;
} }
.full-box .el-input__icon{
.full-box .el-input__icon { color: rgba(0, 0, 0,.9)!important;
color: rgba(0, 0, 0, .9) !important;
font-weight: bolder; font-weight: bolder;
} }
@keyframes realtime {
@keyframes realtime {
0% { 0% {
opacity: 1; opacity: 1; /* 初始状态,元素完全不透明 */
/* 初始状态,元素完全不透明 */
} }
50% { 50% {
opacity: 0.2; opacity: 0.2; /* 动画进行到一半时,元素接近透明 */
/* 动画进行到一半时,元素接近透明 */
} }
100% { 100% {
opacity: 1; opacity: 1; /* 动画结束时,元素恢复完全不透明 */
/* 动画结束时,元素恢复完全不透明 */
}
} }
}
</style> </style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment