Commit e2de9427 authored by youjie's avatar youjie

no message

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