Commit e2de9427 authored by youjie's avatar youjie

no message

parent 3d77c54f
...@@ -13,6 +13,9 @@ class passbookService { ...@@ -13,6 +13,9 @@ class passbookService {
static async getBankbookUseDetail(queryTime:string):Promise<HttpResponse>{ static async getBankbookUseDetail(queryTime:string):Promise<HttpResponse>{
return requestJava('/api/b2b/user/getBankbookUseDetail',{queryTime}) return requestJava('/api/b2b/user/getBankbookUseDetail',{queryTime})
} }
static async getLinePercentage():Promise<HttpResponse>{
return requestJava('/api/b2b/user/getLinePercentage',{})
}
// static async getDepositBankbookDetail(param:any):Promise<HttpResponse>{ // static async getDepositBankbookDetail(param:any):Promise<HttpResponse>{
// return requestJava('/api/b2b/user/getDepositBankbookDetail',param) // return requestJava('/api/b2b/user/getDepositBankbookDetail',param)
// } // }
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
</div> </div>
</div> </div>
<div class="text-center q-pb-lg" <div class="text-center q-pb-lg"
v-else> v-else style="height: 300px;line-height: 200px;">
<svg-icon :size="50" color="nav" icon="General/Clipboard.svg"></svg-icon> <svg-icon :size="50" color="nav" icon="General/Clipboard.svg"></svg-icon>
<div class="q-mt-md f12 text-grey-6">{{ $t('noneData') }}</div> <div class="q-mt-md f12 text-grey-6">{{ $t('noneData') }}</div>
</div> </div>
...@@ -62,6 +62,7 @@ ...@@ -62,6 +62,7 @@
titleHead: '人头返佣', titleHead: '人头返佣',
title: '线路数据占比', title: '线路数据占比',
dataList: [], dataList: [],
zbList:[],
cols: [ cols: [
{ name: 'Room', label: '订单信息', field: (row: any) => row.Date, align: 'left' }, { name: 'Room', label: '订单信息', field: (row: any) => row.Date, align: 'left' },
{ name: '', label: '系列', field: (row: any) => row.Date, align: 'left' }, { name: '', label: '系列', field: (row: any) => row.Date, align: 'left' },
...@@ -71,6 +72,28 @@ ...@@ -71,6 +72,28 @@
}) })
const methods = { const methods = {
getZb(){
passbookService.getLinePercentage()
.then(r => {
data.zbList = []
if (r.data.resultCode == ApiResult.SUCCESS) {
let datainfo=r.data.data;
let arr=[];
datainfo.forEach(item=>{
let obj={};
obj.name=item.LineName;
obj.value=item.num;
data.zbList.push(obj);
})
methods.getinit()
} else {
message.errorMsg(r.data.message)
}
})
.catch(r => {
message.errorMsg(r.message)
})
},
getList(){ getList(){
let CustomerId let CustomerId
if (Store.state && Store.state.user?.userDetail) { if (Store.state && Store.state.user?.userDetail) {
...@@ -114,67 +137,69 @@ ...@@ -114,67 +137,69 @@
}] }]
// 指定图表的配置项和数据 // 指定图表的配置项和数据
const option = { const option = {
title: {
// text: '线路数据占比',
// left: 'center'
},
tooltip: { tooltip: {
trigger: 'item', trigger: "item",
formatter: '{b} : {c} ({d}%)' formatter: "{a} <br/>{b} : {c} ({d}%)"
},
legend: {
// orient: 'vertical',
// left: 'left',
// data: [],
show:false,
top: '5%',
left: 'center'
}, },
series: []
}; calculable: true,
// 赋值 graphic: [
option.series = [
{ {
name: this.title, type: "text",
type: 'pie', left: "33%",
selectedMode: 'single', top: "45%",
radius: ['45%', '70%'], style: {
center: ['50%', '45%'], text: "线路占比",
avoidLabelOverlap: false, textAlign: "center",
label: { fill: "#2C3343", //文字的颜色
normal: { fontSize: 18,
position: 'outside', fontFamily: "pingfangR"
formatter: '{d}%'//{b}\n{c}GB ({d}%)
} }
}, }
],
series: [
{
name: "订单来源",
type: "pie",
radius: ["50%", "70%"],
itemStyle: { itemStyle: {
borderColor: '#fff', normal: {
borderWidth: 5, label: {
show: false
},
labelLine: {
show: false
}, },
clockwise: false, borderWidth: 2,
// data: res.data.map((v) => { borderColor: "#fff",
// return { name: v.name, value: v.value } color: function(params) {
// }) //自定义颜色
data: schoolData, var colorList = [
"#F8733A",
"#53D277",
"#36C7D9",
"#F8733A",
"#F9B89C"
];
return colorList[params.dataIndex];
} }
] },
option.graphic = { // 添加原生图形元素组件 emphasis: {
elements: [ label: {
{ show: true,
type: 'text',
left: 'center', textStyle: {
top: '42%', fontSize: "20",
left: '39%', fontFamily: "pingfangR"
style: {
text: '日本线',
fontSize: 18,
textAlign: 'center',
width: 30,
height: 25,
fill: '#3BA5D9'
} }
}]
} }
}
},
data: data.zbList
}
]
};
// 赋值 // 赋值
// option.legend = [ // option.legend = [
// { // {
...@@ -182,7 +207,7 @@ ...@@ -182,7 +207,7 @@
// } // }
// ] // ]
// 赋值 // 赋值
option.legend.data = schoolData.map((a) => a.name) // option.legend.data = schoolData.map((a) => a.name)
// 使用刚指定的配置项和数据显示图表。 // 使用刚指定的配置项和数据显示图表。
myChart.setOption(option); myChart.setOption(option);
...@@ -190,7 +215,7 @@ ...@@ -190,7 +215,7 @@
} }
onMounted(() => { onMounted(() => {
methods.getList() methods.getList()
methods.getinit(); methods.getZb();
}); });
return {...toRefs(data),main,...methods} return {...toRefs(data),main,...methods}
} }
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<div class="q-px-lg q-pb-lg"><span>当前交易额:</span><span class="q-pl-lg">¥</span><span class="fz32 q-pl-sm">{{datainfo.Amount.toFixed(2)}}</span> </div> <div class="q-px-lg q-pb-lg"><span>当前交易额:</span><span class="q-pl-lg">¥</span><span class="fz32 q-pl-sm">{{datainfo.Amount.toFixed(2)}}</span> </div>
<div class="q-px-lg q-pt-sm"> <div class="q-px-lg q-pt-sm">
<div class="row items-center no-wrap q-pb-lg" v-for="(item,index) in datainfo.RatioList" :key="index" > <div class="row items-center no-wrap q-pb-lg" v-for="(item,index) in datainfo.RatioList" :key="index" >
<q-linear-progress class="col q-mr-lg" stripe rounded size="20px" :value="item.width/100" color="item.percent>1?'orange-9':item.percent<1?'red-5':'cyan-4'"/> <q-linear-progress class="col" stripe rounded size="20px" :value="item.width/100" color="item.percent>1?'orange-9':item.percent<1?'red-5':'cyan-4'"/>
<div class="col-4 row items-center q-ml-lg"> <div class="col-4 row items-center q-ml-lg">
<q-img v-if="item.percent>1" src="../../assets/images/personal/gou.png" <q-img v-if="item.percent>1" src="../../assets/images/personal/gou.png"
width="20px" width="20px"
...@@ -34,12 +34,16 @@ ...@@ -34,12 +34,16 @@
<q-img v-else src="../../assets/images/personal/x1.png" <q-img v-else src="../../assets/images/personal/x1.png"
width="26px" width="26px"
height="26px" style="position: relative;"/> height="26px" style="position: relative;"/>
<div class="column q-pl-md"> <div class="column q-ml-md">
<span class="fz16 text-weight-bold" <span class="row wrap fz16 text-weight-bold"
:class="[item.percent>1?'text-light-green-6':item.percent<1?'text-red-5':'text-dark']"> :class="[item.percent>1?'text-light-green-6':item.percent<1?'text-red-5':'text-dark']">
<span>
<template v-if="item.percent>1">已激活,预计收益 ¥{{(item.Money*item.Ratio)/1000}}</template> <template v-if="item.percent>1">已激活,预计收益 ¥{{(item.Money*item.Ratio)/1000}}</template>
<template v-if="item.percent<1">还差¥{{item.Money-datainfo.Amount}},预计收益 ¥{{(item.Money*item.Ratio)/1000}}</template> <template v-if="item.percent<1">还差¥{{item.Money-datainfo.Amount}},预计收益 ¥{{(item.Money*item.Ratio)/1000}}</template>
</span> </span>
</span>
<span class="fz12 text-grey-6 q-pt-xs">月交易额已达 ¥ {{item.Money}} 返{{item.Ratio}}‰</span> <span class="fz12 text-grey-6 q-pt-xs">月交易额已达 ¥ {{item.Money}} 返{{item.Ratio}}‰</span>
</div> </div>
...@@ -116,23 +120,8 @@ ...@@ -116,23 +120,8 @@
// 基于准备好的dom,初始化echarts实例 // 基于准备好的dom,初始化echarts实例
const myChart = echarts.init(main.value); const myChart = echarts.init(main.value);
const option = { const option = {
title: {
left: "left",
textStyle: {
fontWeight: "bold",
fontSize: 14,
color: "#333333",
height: "30px"
},
padding: [
20, // 上
20, // 右
20, // 下
20 // 左
]
},
xAxis: { xAxis: {
type: 'category', type: "category",
boundaryGap: false, boundaryGap: false,
axisLine: { axisLine: {
show: false, show: false,
...@@ -140,42 +129,22 @@ ...@@ -140,42 +129,22 @@
width: 30 width: 30
} }
}, },
axisTick: false, axisTick: true,
data: data.xMonth, data: data.xMonth,
}, },
yAxis: { yAxis: {
type: 'value', type: "value",
boundaryGap: [0, '30%'], min: '3000',
min: '10',
axisTick: true, axisTick: true,
splitLine: { splitLine: {
show: true, show: true,
lineStyle: { lineStyle: {
color: "#fff" color: "#fff"
} }
}
}, },
visualMap: {
type: 'piecewise',
show: false,
dimension: 0,
seriesIndex: 0,
pieces: [
{
gt: 1,
lt: 3,
color: 'rgba(0, 0, 180, 0.4)'
}, },
{ series: [
gt: 5,
lt: 7,
color: 'rgba(0, 0, 180, 0.4)'
}
]
},
series:[]
};
option.series = [
{ {
type: "line", type: "line",
smooth: 2, smooth: 2,
...@@ -211,6 +180,8 @@ ...@@ -211,6 +180,8 @@
} }
} }
] ]
};
// 使用刚指定的配置项和数据显示图表。 // 使用刚指定的配置项和数据显示图表。
myChart.setOption(option); myChart.setOption(option);
} }
......
...@@ -522,7 +522,6 @@ export default defineComponent({ ...@@ -522,7 +522,6 @@ export default defineComponent({
scheduledTripService scheduledTripService
.GetB2BTravelInfoV1(param) .GetB2BTravelInfoV1(param)
.then(r => { .then(r => {
$q.loading.hide()
if (r.data.resultCode == ApiResult.SUCCESS) { if (r.data.resultCode == ApiResult.SUCCESS) {
if (r.data.data) { if (r.data.data) {
data.dataList = r.data.data data.dataList = r.data.data
...@@ -602,9 +601,9 @@ export default defineComponent({ ...@@ -602,9 +601,9 @@ export default defineComponent({
} }
}) })
.catch(e => { .catch(e => {
$q.loading.hide()
message.errorMsg(e.message) message.errorMsg(e.message)
}) })
$q.loading.hide()
}, },
menu() { menu() {
data.scroll = document.documentElement.scrollTop || document.body.scrollTop data.scroll = document.documentElement.scrollTop || document.body.scrollTop
......
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