Commit ae326b4f authored by zhengke's avatar zhengke

修改

parent 5e58eb6d
......@@ -194,59 +194,24 @@ export default {
GetSexOrderList(){
this.loading = true
this.apipost("/api/Statistic/GetDutyTypeOrderList", {}, res => {
console.log("fdff",res)
this.strArr=[];
let data=res.data.data;
data.forEach(item=>{
this.strArr.push(item.DutyTypeName)
})
this.loading = false
let contShop = res.data.data[0].ShopMoney + res.data.data[1].ShopMoney+ res.data.data[2].ShopMoney,
one = res.data.data[0].ShopMoney,
two = res.data.data[1].ShopMoney,
three = res.data.data[2].ShopMoney,
contNum = res.data.data[0].OrderCount + res.data.data[1].OrderCount+ res.data.data[2].OrderCount,
zaiN = res.data.data[0].OrderCount,
twoN = res.data.data[1].OrderCount,
threeN = res.data.data[2].OrderCount;
let chartData = [], shopChartData = [];
chartData.push(
((zaiN/contNum)*100).toFixed(2)
)
chartData.push(
((twoN/contNum)*100).toFixed(2)
)
chartData.push(
((threeN/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: "#999",
text: '服务'
}
)
this.chartData = chartData
this.shopChartData = shopChartData
this.orders=res.data.data;
console.log("this.chartData",this.chartData)
if(res.data.resultCode==1){
this.strArr=[];
let data=res.data.data;
var totalOrder=0;
var totalMoney=0;
data.forEach(item=>{
this.strArr.push(item.DutyTypeName);
totalOrder+=item.OrderCount;
totalMoney+=item.ShopMoney;
})
data.forEach(item=>{
this.chartData.push(((item.OrderCount/totalOrder)*100).toFixed(2));
})
this.orders=res.data.data;
}else{
this.$message.error(res.data.message);
}
});
}
}
......
......@@ -26,8 +26,17 @@
<div>
累计报名
<b>{{item.AgeCount}}</b> 人,关联购物金额
<b>{{(item.TotalMoney/10000).toFixed(2)}}</b>,报名均价为:
<b>{{item.Unit_Price.toFixed(0)}}</b>
<b>
<template v-if="item.TotalMoney">
{{(item.TotalMoney/10000).toFixed(2)}}
</template>
</b>,报名均价为:
<b>
<template v-if="item.Unit_Price">
{{item.Unit_Price.toFixed(0)}}
</template>
</b>
</div>
<div>
最喜爱的产品
......
......@@ -26,8 +26,16 @@
<div>
累计报名
<b>{{item.AgeCount}}</b> 人,关联购物金额
<b>{{(item.TotalMoney/10000).toFixed(2)}}</b>,报名均价为:
<b>{{item.Unit_Price.toFixed(0)}}</b>
<b>
<template v-if="item.TotalMoney">
{{(item.TotalMoney/10000).toFixed(2)}}
</template>
</b>,报名均价为:
<b>
<template v-if="item.Unit_Price">
{{item.Unit_Price.toFixed(0)}}
</template>
</b>
</div>
<div>
最喜爱的产品
......
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