Commit ae326b4f authored by zhengke's avatar zhengke

修改

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