Commit 39edeee3 authored by 黄媛媛's avatar 黄媛媛

update

parent 3502868d
<style>
.sex{
height: calc(100% - 25px);
}
.statistics-title {
font-size: 24px;
color: #111;
margin-bottom: 30px;
font-family: perfectFont;
}
.sex .conten-box{
display: flex;
flex-direction: column;
height: calc(100% - 62px);
}
.sex .conten-box .el-card .el-card__header {
font-weight: normal !important;
}
.sex .conten-box .top{
flex: 1.2;
margin-bottom: 25px;
}
.sex .conten-box .bottom{
flex: .8;
}
.sex .conten-box .left{
height: 100%;
}
.sex .conten-box .el-card.blue {
background: #0D2481!important;
color: #fff !important;
height: calc(100% - 2px);
}
.sex .conten-box .el-card .el-card__body {
padding: 20px;
height: calc(100% - 98px);
max-height: calc(100% - 98px);
}
.sex .conten-box .img {
display: flex;
align-items: flex-end;
text-align: center;
padding: 20px 70px 10px 70px!important;
justify-content: space-between;
font-size: 14px;
}
.sex .sjsm{
display: flex;
flex-direction: column;
}
.sex .sjsm>div:nth-child(1){
margin-bottom: 20px;
}
.sex .sjsm>div{
flex: 1;
background:rgba(244,245,249,1);
display: flex;
align-items: center;
justify-content: space-between;
padding: 20px;
}
.sex .sjsm>div .left{
display: flex;
align-items: center;
}
.sex .sjsm>div .left img{
padding-right: 10px;
}
.sex .sjsm>div .right{
text-align: right;
color: #888888;
font-size: 12px;
}
.sex .hight-font{
color: #0D2481 !important;
font-size: 14px;
}
</style>
<template>
<div class="sex" v-loading="loading">
<div class="statistics-title bold18">资产统计</div>
<div class="conten-box" v-if="!loading">
<el-row :gutter="25" class="top">
<el-col :span="16" class="left">
<el-card class="blue">
<div slot="header" class="clearfix">
<span>资产统计</span>
</div>
<el-row :gutter="80" style="height: 100%;">
<el-col :span="10" class="img">
<div>
<div style="margin-bottom: 10px;">
<img src="../../assets/img/tongji/zc.png" alt="">
</div>
<p>资产</p>
</div>
</el-col>
<el-col :span="14" style="height: 100%;">
<sexChart :myData="chartData" :strArr="strArr"/>
</el-col>
</el-row>
</el-card>
</el-col>
<el-col :span="8" style="height: 100%;">
<el-card style="height: calc(100% - 2px);">
<div slot="header" class="clearfix">
<span>购物统计<span class="font-size-12">(按平均计算)</span></span>
</div>
<shopChart :shopChartData="shopChartData"/>
</el-card>
</el-col>
</el-row>
<el-row :gutter="25" class="bottom" >
<el-col :span="16" style="height: 100%;">
<el-card style="height: 100%;">
<div slot="header" class="clearfix">
<span>数据说明</span>
</div>
<div style="height: 100%;" class="sjsm">
<div v-for="(item, index) in orders" :key="index">
<div class="left">
<img v-if="item.StudentType === 1" src="../../assets/img/tongji/zaidu.png" alt="">
<img v-if="item.StudentType === 2" src="../../assets/img/tongji/biye.png" alt="">
<span class="font-size-12">{{item.StudentTypeName}}</span>
</div>
<div class="right">
<p>累计报名<span class="hight-font">{{item.StudentCount}}</span>人,关联购物金额<span class="hight-font">{{item.TotalMoney}}</span>万,报名均价为<span class="hight-font">{{item.Unit_Price}}</span></p>
<p>最喜爱产品<span class="hight-font">{{item.LtName}}</span></p>
</div>
</div>
</div>
</el-card>
</el-col>
<el-col :span="8" style="height: 100%;">
<el-card style="height: 100%;">
<div slot="header" class="clearfix">
<el-row style="width:100%">
<el-col :span="12" size="30">
推荐解答
</el-col>
<!-- <el-col :span="12" class="right-title">
<i class="iconfont icondianzan1"></i> 点赞
</el-col> -->
</el-row>
</div>
<div class="situ">
<div class="c">根据对客户年学历的统计可以,更好的了解不同学历段客人的喜好,消费能力的判读,从而快速的推荐团队给客人等等等</div>
<div class="bot" @click="drawer = true">
查看更多,参与讨论(1)
<i class="el-icon-d-arrow-right"></i>
</div>
</div>
</el-card>
</el-col>
</el-row>
</div>
<el-drawer
size='695px'
:visible.sync="drawer"
direction="rtl"
:with-header="false">
<discussBox :id="discussID"/>
</el-drawer>
</div>
</template>
<script>
import sexChart from './model/sexChart'
import shopChart from './model/shopChart'
import discussBox from "./model/discussBox";
export default {
components: {
sexChart,
shopChart,
discussBox
},
data() {
return {
discussID: 0,
drawer: false,
chartData: [0, 0],
shopChartData: [],
SexOrder: [],
loading: false,
strArr: ['10万以下', '10-50万', '50万以上'],
orders:[]
};
},watch:{
},
mounted() {
this.GetSexOrderList()
},
methods: {
GetSexOrderList(){
this.loading = true
this.apipost("/api/Statistic/GetStudentShopList", {}, res => {
// this.SexOrder = res.data.data
let contShop = res.data.data[0].TotalMoney + res.data.data[1].TotalMoney+ res.data.data[2].TotalMoney,
zai = res.data.data[0].TotalMoney,
bi = res.data.data[1].TotalMoney,
ot = res.data.data[2].TotalMoney,
contNum = res.data.data[0].StudentCount + res.data.data[1].StudentCount+ res.data.data[2].StudentCount,
zaiN = res.data.data[0].StudentCount,
biN = res.data.data[1].StudentCount,
otN = res.data.data[2].StudentCount;
let chartData = [], shopChartData = [];
chartData.push(
((zaiN/contNum)*100).toFixed(2)
)
chartData.push(
((biN/contNum)*100).toFixed(2)
)
chartData.push(
((otN/contNum)*100).toFixed(2)
)
shopChartData.push(
{
num: Number(((zai/contShop)*100).toFixed(2)),
color: "#0D2481",
text: '10万以下'
}
)
shopChartData.push(
{
num: Number(((bi/contShop)*100).toFixed(2)),
color: "#FFA475",
text: '10-50万'
}
)
shopChartData.push(
{
num: Number(((ot/contShop)*100).toFixed(2)),
color: "#999",
text: '50万以上'
}
)
this.chartData = chartData
this.shopChartData = shopChartData
this.orders=res.data.data;
this.getOrders()
});
},
getOrders(){
this.apipost("/api/Statistic/GetStudentOrderList", {}, res => {
console.log(res)
res.data.data.forEach(x => {
this.orders[x.NewStudentType - 1].LtName = x.LtName;
this.orders[x.NewStudentType - 1].Unit_Price = x.Unit_Price;
});
this.loading = false
});
}
}
}
</script>
\ No newline at end of file
<style>
.sex{
height: calc(100% - 25px);
}
.statistics-title {
font-size: 24px;
color: #111;
margin-bottom: 30px;
font-family: perfectFont;
}
.sex .conten-box{
display: flex;
flex-direction: column;
height: calc(100% - 62px);
}
.sex .conten-box .el-card .el-card__header {
font-weight: normal !important;
}
.sex .conten-box .top{
flex: 1.2;
margin-bottom: 25px;
}
.sex .conten-box .bottom{
flex: .8;
}
.sex .conten-box .left{
height: 100%;
}
.sex .conten-box .el-card.blue {
background: #0D2481!important;
color: #fff !important;
height: calc(100% - 2px);
}
.sex .conten-box .el-card .el-card__body {
padding: 20px;
height: calc(100% - 98px);
max-height: calc(100% - 98px);
}
.sex .conten-box .img {
display: flex;
align-items: flex-end;
text-align: center;
padding: 20px 70px 10px 70px!important;
justify-content: space-between;
font-size: 14px;
}
.sex .sjsm{
display: flex;
flex-direction: column;
}
.sex .sjsm>div:nth-child(1){
margin-bottom: 20px;
}
.sex .sjsm>div{
flex: 1;
background:rgba(244,245,249,1);
display: flex;
align-items: center;
justify-content: space-between;
padding: 20px;
}
.sex .sjsm>div .left{
display: flex;
align-items: center;
}
.sex .sjsm>div .left img{
padding-right: 10px;
}
.sex .sjsm>div .right{
text-align: right;
color: #888888;
font-size: 12px;
}
.sex .hight-font{
color: #0D2481 !important;
font-size: 14px;
}
</style>
<template>
<div class="sex" v-loading="loading">
<div class="statistics-title bold18">季节统计</div>
<div class="conten-box" v-if="!loading">
<el-row :gutter="25" class="top">
<el-col :span="16" class="left">
<el-card class="blue">
<div slot="header" class="clearfix">
<span>季节统计</span>
</div>
<el-row :gutter="80" style="height: 100%;">
<el-col :span="10" class="img">
<div>
<div style="margin-bottom: 10px;">
<img src="../../assets/img/tongji/jj.png" alt="">
</div>
<p>季节</p>
</div>
</el-col>
<el-col :span="14" style="height: 100%;">
<sexChart :myData="chartData" :strArr="strArr"/>
</el-col>
</el-row>
</el-card>
</el-col>
<el-col :span="8" style="height: 100%;">
<el-card style="height: calc(100% - 2px);">
<div slot="header" class="clearfix">
<span>购物统计<span class="font-size-12">(按平均计算)</span></span>
</div>
<shopChart :shopChartData="shopChartData"/>
</el-card>
</el-col>
</el-row>
<el-row :gutter="25" class="bottom" >
<el-col :span="16" style="height: 100%;">
<el-card style="height: 100%;">
<div slot="header" class="clearfix">
<span>数据说明</span>
</div>
<div style="height: 100%;" class="sjsm">
<div v-for="(item, index) in orders" :key="index">
<div class="left">
<img v-if="item.SeasonType === 1" src="../../assets/img/tongji/cj.png" alt="">
<img v-if="item.SeasonType === 2" src="../../assets/img/tongji/xj.png" alt="">
<img v-if="item.SeasonType === 3" src="../../assets/img/tongji/qj.png" alt="">
<img v-if="item.SeasonType === 4" src="../../assets/img/tongji/dj.png" alt="">
<span class="font-size-12">{{item.SeasonTypeName}}</span>
</div>
<div class="right">
<p>累计报名<span class="hight-font">{{item.StudentCount}}</span>人,关联购物金额<span class="hight-font">{{item.TotalMoney}}</span>万,报名均价为<span class="hight-font">{{item.Unit_Price}}</span></p>
<p>最喜爱产品<span class="hight-font">{{item.LtName}}</span></p>
</div>
</div>
</div>
</el-card>
</el-col>
<el-col :span="8" style="height: 100%;">
<el-card style="height: 100%;">
<div slot="header" class="clearfix">
<el-row style="width:100%">
<el-col :span="12" size="30">
推荐解答
</el-col>
<!-- <el-col :span="12" class="right-title">
<i class="iconfont icondianzan1"></i> 点赞
</el-col> -->
</el-row>
</div>
<div class="situ">
<div class="c">根据对客户季节的统计可以,更好的了解不同季节客人的喜好,消费能力的判读,从而快速的推荐团队给客人等等等</div>
<div class="bot" @click="drawer = true">
查看更多,参与讨论(1)
<i class="el-icon-d-arrow-right"></i>
</div>
</div>
</el-card>
</el-col>
</el-row>
</div>
<el-drawer
size='695px'
:visible.sync="drawer"
direction="rtl"
:with-header="false">
<discussBox :id="discussID"/>
</el-drawer>
</div>
</template>
<script>
import sexChart from './model/sexChart'
import shopChart from './model/shopChart'
import discussBox from "./model/discussBox";
export default {
components: {
sexChart,
shopChart,
discussBox
},
data() {
return {
discussID: 0,
drawer: false,
chartData: [0, 0],
shopChartData: [],
SexOrder: [],
loading: false,
strArr: ['春季', '夏季', '秋季', '冬季'],
orders:[]
};
},watch:{
},
mounted() {
this.GetSexOrderList()
},
methods: {
GetSexOrderList(){
this.loading = true
this.apipost("/api/Statistic/GetSeasonShopList", {}, res => {
console.log("dsafsaf",res);
let contShop = res.data.data[0].TotalMoney + res.data.data[1].TotalMoney+ res.data.data[2].TotalMoney+ res.data.data[3].TotalMoney,
one = res.data.data[0].TotalMoney,
two = res.data.data[1].TotalMoney,
three = res.data.data[2].TotalMoney,
four= res.data.data[3].TotalMoney,
contNum = res.data.data[0].SeasonCount + res.data.data[1].SeasonCount+ res.data.data[2].SeasonCount+ res.data.data[3].SeasonCount,
oneN = res.data.data[0].SeasonCount,
twoN = res.data.data[1].SeasonCount,
threeN = res.data.data[2].SeasonCount,
fourN = res.data.data[3].SeasonCount;
let chartData = [], shopChartData = [];
chartData.push(
((oneN/contNum)*100).toFixed(2)
)
chartData.push(
((twoN/contNum)*100).toFixed(2)
)
chartData.push(
((threeN/contNum)*100).toFixed(2)
)
chartData.push(
((fourN/contNum)*100).toFixed(2)
)
shopChartData.push(
{
num: Number(((one/contShop)*100).toFixed(2)),
color: "#0D2481",
text: '春季'
}
)
shopChartData.push(
{
num: Number(((two/contShop)*100).toFixed(2)),
color: "#FFA475",
text: '夏季'
}
)
shopChartData.push(
{
num: Number(((three/contShop)*100).toFixed(2)),
color: "#99BD7B",
text: '秋季'
}
)
shopChartData.push(
{
num: Number(((four/contShop)*100).toFixed(2)),
color: "#D2C9F1",
text: '冬季'
}
)
this.chartData = chartData
this.shopChartData = shopChartData
this.orders=res.data.data;
this.getOrders()
});
},
getOrders(){
this.apipost("/api/Statistic/GetSeasonOrderList", {}, res => {
console.log(res)
res.data.data.forEach(x => {
this.orders[x.NewSeasonType - 1].LtName = x.LtName;
this.orders[x.NewSeasonType - 1].Unit_Price = x.Unit_Price;
});
this.loading = false
});
}
}
}
</script>
\ No newline at end of file
......@@ -179,6 +179,23 @@ export default new Router({
title: "职业类型统计"
}
},
{
path: "/assets",
name: "assets",
component: ()=>import('./components/statistics/assets.vue'),
meta: {
title: "资产"
}
},
{
path: "/season",
name: "season",
component: ()=>import('./components/statistics/season.vue'),
meta: {
title: "季节"
}
},
{
path: "/contractManagement",
name: "contractManagement",
......
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