wylyl22 3 years ago
parent 5f994ea039
commit 499a465195

@ -19,7 +19,13 @@ export default function brokenLine(dValue = [], dx = []) {
color: '#999999', //y轴文本颜色
textStyle: {
fontSize: 9
}
},
formatter: (value) => {
if (value >= 10000) {
value = (value / 10000) + '万';
}
return value;
}
},
splitLine: { //分割线
// lineStyle:{
@ -42,11 +48,13 @@ export default function brokenLine(dValue = [], dx = []) {
axisLine: {
show: false, //去除轴线
},
axisLabel: {
color: '#999999', //x轴文本颜色
textStyle: {
fontSize: 9
}
}
}],
series: {

@ -1,9 +1,5 @@
const app = getApp()
import brokenLine from "../../../../components/option/singleLineOption"
const dName=['正面',]
const data =['12月','1月','2月','3月','4月','5月','6月']
const dValue =[1500,1000,500,800,100,1000,300]
const dColor=['#0084FF',]
let iPageIndex = 1 // 当前第几页,0代表第一页
let iPageSize = 20 //每页显示多少数据
Component({
@ -14,7 +10,6 @@ Component({
grade_name3:'按能源',
grade_name4:'列表展示',
grades4:['列表展示','图表展示'],
//弹出框
show: false,
duration: 300,
@ -25,12 +20,9 @@ Component({
//图表
// positiveOption:brokenLine(dName,dValue,dColor,data),
imageUrl: getApp().globalData.imageUrl,
date:'2021-01',
date:wx.getStorageSync('newTime'),
accountIndex:0,
ranking:[],
imageUrl: getApp().globalData.imageUrl,
date:'2021-01',
accountIndex:0,
//
ec: {
@ -87,12 +79,13 @@ Component({
wx.hideToast();
},500)
},
getTrend(){
getTrend(time=wx.getStorageSync('newTime')){
// console.log("eee",this.data.date)
let obj = {
action: 'getCheZhuCarSeriesRankingHome',
sType:'Marketing',
sStartTime: "2021-10",
sEndTime:"2021-10",
sStartTime: time,
sEndTime: time,
iPageIndex: iPageIndex,
iPageSize: iPageSize,
// sSpec:wx.getStorageSync('sSpec') || '',
@ -304,9 +297,19 @@ Component({
)
},
bindDateChange: function(e) {
wx.showToast({
title: '加载中',
icon: 'loading',
duration: 300000
})
// console.log('picker发送选择改变携带值为', e.detail.value)
this.getTrend(e.detail.value)
setTimeout(() =>{
wx.hideToast();
},500),
this.setData({
date: e.detail.value
date: e.detail.value,
})
},
priceSel(e){
@ -314,25 +317,55 @@ Component({
intervalSel: e.currentTarget.dataset.index
})
},
bindAccountChange(e){
// console.log('切换改变的值', e.detail.value);
this.setData({
accountIndex: e.detail.value
})
},
// bindAccountChange(e){
// // console.log('切换改变的值', e.detail.value);
// this.setData({
// accountIndex: e.detail.value
// })
// },
//弹出框
times(val){
var month=val.substring(0,4) //获取年份
var bYear=val.substring(val.length-2,val.length-1)=="0"//是否为带零的月份
var year1=val.substring(val.length-1,val.length) //获取月份最后一个数
var year2=val.substring(val.length-2,val.length) //获取整个月份
var time,months,years
if(bYear){
if(parseInt(year1)<6){
months=parseInt(month-1)
if(parseInt(year1)<3){
years="0"+((12-(6-parseInt(year1)))+1)
}else{
years=(12-(6-parseInt(year1)))+1
}
}else{
months=month
years="0"+((parseInt(year1)-6)+1)
}
}else{
months=month
years="0"+(parseInt(year2)-6+1)
}
time=months+'-'+years
return time
},
popup(e) {
let duration = this.data.duration
let models=e.currentTarget.dataset.car
// this.times(this.data.date)
app.globalData.request({
action:"getCheZhuCarSeriesListHome",
sType:"Marketing",
sSeriesName:models}).then(res => {
sSeriesName:models,
sStartTime:this.times(this.data.date),
sEndTime: this.data.date,
}).then(res => {
// console.log(res)
const dataTime=[]
const dataCar=[]
for(let i=0;i<6;i++){
// console.log((res[i].sourcetime).substring(5,7))
// console.log((res[i].sourcetime).substring(0,5))
if((res[i].sourcetime).substring(5,6)=="0"){
dataTime.push((res[i].sourcetime).substring((res[i].sourcetime).length-1,(res[i].sourcetime).length)+'月')
}else{

@ -134,7 +134,7 @@
<van-popup
show="{{ show }}"
position="bottom"
custom-style="height: 50%;"
custom-style="height: 40%;"
bind:close="onClose"
>
<view class="detail-page">

Loading…
Cancel
Save