dev
wylyl22 3 years ago
parent bde7fb29cf
commit 29d56a69c2

@ -1,13 +1,11 @@
<view class="list_event">
<view style="padding: 32rpx;">
<view class="text">
<!-- <van-cell title="展示弹出层" is-link bind:click="showPopup" />
<van-popup show="{{ show }}" bind:close="onClose">
<view class="popup">
<van-datetime-picker type="year-month" value="{{ currentDate }}" min-date="{{ minDate }}" bind:input="onInput" />
</view>
</van-popup> -->
<!-- 底部 -->
<view class="section" style="padding:20rpx">

@ -184,100 +184,136 @@ Page({
],
showChart: true,
positiveOption: {
backgroundColor: '#F9F9F9',
tooltip: {
trigger: 'axis',
axisPointer: { // 坐标轴指示器,坐标轴触发有效
type: 'line' // 默认为直线,可选为:'line' | 'shadow'
grid:{
},
yAxis: [
{
type: 'value',
axisTick:{
show:false //去除刻度线
},
axisLine:{
show:false //去除轴线
},
axisLabel: {
color: '#999999',//y轴文本颜色
textStyle: {
fontSize : 9
}
},
splitLine: { //分割线
// lineStyle:{
// // color:"#2d3436"
// }
show: true,
lineStyle: {
type: 'dashed',
color: '#E8E8E8',
}
}
}
],
xAxis: [
{
type: 'category',
data: ['12月', '1月', '2月', '3月', '4月', '5月', '6月'],
axisTick:{
show:false //去除刻度线
},
axisLine:{
show:false, //去除轴线
},
axisLabel: {
color: '#999999',//x轴文本颜色
textStyle: {
fontSize : 9
}
}
}
],
series: {
type: 'line',
symbol:'none', //去圆点
data: [100, 200, 300, 500, 700, 500, 300],
itemStyle: {
normal:{
color: '#0084FF',
lineStyle: {
color: '#0084FF'
}
}
}}
},
option :{
grid:{
left:45,
top:25,
height:168,
width:343
},
confine: true
},
legend: {
x:'15',
icon: 'rectangle',//data图标样式
itemWidth: 10,//data图标大小
itemHeight: 10,
textStyle: {
fontSize: 9
},
},
//图表位置
grid: {
left: 400,
right: 200,
bottom: 10,
top: 200,
containLabel: true,
height:'auto'
},
yAxis: [
{
type: 'value',
axisTick:{
show:false //去除刻度线
},
axisLine:{
show:false //去除轴线
},
axisLabel: {
color: '#999999',//y轴文本颜色
textStyle: {
fontSize : 9
}
},
splitLine: { //分割线
// lineStyle:{
// // color:"#2d3436"
// }
show: true,
lineStyle: {
type: 'dashed',
color: '#E8E8E8',
}
}
}
],
xAxis: [
{
type: 'category',
data: ['12月', '1月', '2月', '3月', '4月', '5月', '6月'],
axisTick:{
show:false //去除刻度线
},
axisLine:{
show:false, //去除轴线
},
axisLabel: {
color: '#999999',//x轴文本颜色
textStyle: {
fontSize : 9
}
}
}
],
series: [
{
type: 'line',
symbol:'none', //去圆点
data: [100, 200, 300, 500, 700, 500, 300],
itemStyle: {
normal:{
color: '#0084FF',
lineStyle: {
color: '#0084FF'
}
yAxis: [
{
type: 'value',
axisTick:{
show:false //去除刻度线
},
axisLine:{
show:false //去除轴线
},
axisLabel: {
color: '#999999',//y轴文本颜色
textStyle: {
fontSize : 9
}
},
splitLine: { //分割线
// lineStyle:{
// // color:"#2d3436"
// }
show: true,
lineStyle: {
type: 'dashed',
color: '#E8E8E8',
}
}
}
},
]
},
],
xAxis: [
{
type: 'category',
data: ['12月', '1月', '2月', '3月', '4月', '5月', '6月'],
axisTick:{
show:false //去除刻度线
},
axisLine:{
show:false, //去除轴线
},
axisLabel: {
color: '#999999',//x轴文本颜色
textStyle: {
fontSize : 9
}
}
}
],
series: {
type: 'line',
symbol:'none', //去圆点
data: [100, 200, 300, 500, 700, 500, 300],
itemStyle: {
normal:{
color: '#0084FF',
lineStyle: {
color: '#0084FF'
}
}
}}
}
},
// sliderChange(event) {
// this.setData({

@ -1,57 +1,57 @@
<!--pages/index/Rankdetail/Rankdetail.wxml-->
<view class="screen">
<van-tabs bind:change="onChange">
<van-tabs bind:change="onChange">
<van-tab title="品牌">
<view>
<view class="list_event" wx:if="{{item.value1===1}}">
<view class="text">销量排行榜</view>
<chart-display></chart-display>
</view>
<view class="list_event" wx:else>
<view class="text">销量排行榜</view>
<view class="ranking">
<view class="title">排名</view>
<view class="title">品牌名称</view>
<view class="title2">销量</view>
<view>
<view class="list_event" wx:if="{{item.value1===1}}">
<view class="text">销量排行榜</view>
<chart-display></chart-display>
</view>
<view class="ranks" wx:for="{{ranking}}" wx:key="index" data-ranking='{{item}}'>
<view style="display: flex;">
<view class="dis_image">
<image class="rank_num" wx:if="{{index === 0}}" src="/images/img_diyi.png"></image>
<image class="rank_num" wx:if="{{index === 1}}" src="/images/img_dier.png"></image>
<image class="rank_num" wx:if="{{index === 2}}" src="/images/img_disan.png"></image>
<view class="num" wx:if="{{index !== 0 &&index !== 1 &&index !== 2 }}">{{index >= 9 ? index + 1 : '0' + (index + 1)}}</view>
</view>
<view class="medias">
<view style="display: flex;">
<view class="media_text">{{item.media}}</view>
<view>
<view wx:if="{{item.energy==='新能源'}}" class="energy">{{item.energy}}</view>
<view wx:if="{{item.energy==='汽油'}}" class="energy1">{{item.energy}}</view>
<view wx:if="{{item.energy==='柴油'}}" class="energy2">{{item.energy}}</view>
<view wx:if="{{item.energy==='油电混合'}}" class="energy3">{{item.energy}}</view>
<view wx:if="{{item.energy==='轻混系统'}}" class="energy4">{{item.energy}}</view>
</view>
<view class="list_event" wx:else>
<view class="text">销量排行榜</view>
<view class="ranking">
<view class="title">排名</view>
<view class="title">品牌名称</view>
<view class="title2">销量</view>
</view>
<view class="ranks" wx:for="{{ranking}}" wx:key="index" data-ranking='{{item}}'>
<view style="display: flex;">
<view class="dis_image">
<image class="rank_num" wx:if="{{index === 0}}" src="/images/img_diyi.png"></image>
<image class="rank_num" wx:if="{{index === 1}}" src="/images/img_dier.png"></image>
<image class="rank_num" wx:if="{{index === 2}}" src="/images/img_disan.png"></image>
<view class="num" wx:if="{{index !== 0 &&index !== 1 &&index !== 2 }}">{{index >= 9 ? index + 1 : '0' + (index + 1)}}</view>
</view>
<view class="price">{{item.num}}</view>
</view>
<view style="width: 30%;">
<view class="volume">{{item.volume}}</view>
<view class="trend" bindtap="onclick">
<van-icon size="16px" name="arrow" />
<view>销量趋势</view>
<view class="medias">
<view style="display: flex;">
<view class="media_text">{{item.media}}</view>
<view>
<view wx:if="{{item.energy==='新能源'}}" class="energy">{{item.energy}}</view>
<view wx:if="{{item.energy==='汽油'}}" class="energy1">{{item.energy}}</view>
<view wx:if="{{item.energy==='柴油'}}" class="energy2">{{item.energy}}</view>
<view wx:if="{{item.energy==='油电混合'}}" class="energy3">{{item.energy}}</view>
<view wx:if="{{item.energy==='轻混系统'}}" class="energy4">{{item.energy}}</view>
</view>
</view>
<view class="price">{{item.num}}</view>
</view>
<van-popup show="{{ show }}" position="bottom" custom-style="height: 638rpx;" bind:close="onClose" close-icon="close" close-icon-position="top-left">
<view>
<view> 销量趋势</view>
<view style="width: 30%;">
<view class="volume">{{item.volume}}</view>
<view class="trend" bindtap="onclick">
<van-icon size="16px" name="arrow" />
<view>销量趋势</view>
</view>
</van-popup>
<van-popup show="{{ show }}" position="bottom" custom-style="height: 638rpx;" bind:close="onClose" close-icon="close" close-icon-position="top-left">
<view>
<view> 销量趋势</view>
</view>
</van-popup>
</view>
</view>
</view>
</view>
</view>
</view>
</van-tab>
<van-tab title="车型">
<view class="list_event" wx:if="{{item.value1===1}}">
@ -175,12 +175,12 @@
<view class="volume">{{item.volume}}</view>
<view class="trend" bindtap="onclick">
<!-- <view class="trend"> -->
<van-icon size="16px" name="arrow" />
<view>销量趋势</view>
</view>
<!-- </view> -->
<!-- </view> -->
<!-- </view>
<!-- <van-icon size="16px" name="arrow" />
<view>销量趋势</view> -->
</view>
<!-- </view> -->
<!-- </view> -->
<!-- </view>
</view> -->
<!-- </view> -->
@ -189,7 +189,8 @@
<view class="popContent-text">销量趋势 </view>
<view class="popContent-title">宏光MINIEV销量趋势</view>
<view class="popContent-echars">
<c-echars showChart="{{showChart}}" canvasId="rankbar-canvas" chartId="rankbar" chartOption="{{positiveOption}}" width="686rpx" height="100%"></c-echars>
<c-echars showChart="{{showChart}}" canvasId="modelbar-canvas" chartId="modelbar" chartOption="{{option}}" height="100%">
</c-echars>
</view>
</view>
</van-popup>

@ -261,13 +261,13 @@
/* height: 72rpx;
line-height: 72rpx; */
font-size: 28rpx;
margin: 0 32rpx 32rpx 32rpx;
margin: 0 32rpx 16rpx 32rpx;
}
.popContent-echars{
width: 686rpx;
height: 386rpx;
margin:0 32rpx;
background-color: #F9F9F9;
}

Loading…
Cancel
Save