From f7076be791676f85f41fb3249415d64beceaf3dc Mon Sep 17 00:00:00 2001 From: wylyl22 <2373073266@qq.com> Date: Mon, 25 Jul 2022 16:26:02 +0800 Subject: [PATCH] wyl --- components/chartdisplay/index.wxss | 2 +- components/option/columnarOption.js | 25 +++++++--- pages/index/Salesranking/Salesranking.js | 1 - .../Salesranking/Vehicletype/Vehicletype.js | 49 +++++++++---------- .../Salesranking/Vehicletype/Vehicletype.wxss | 2 - 5 files changed, 41 insertions(+), 38 deletions(-) diff --git a/components/chartdisplay/index.wxss b/components/chartdisplay/index.wxss index a548319..f8af38a 100644 --- a/components/chartdisplay/index.wxss +++ b/components/chartdisplay/index.wxss @@ -1,4 +1,4 @@ .brand_tu{ width: 100%; - height: 2000rpx; + height: 1000rpx; } \ No newline at end of file diff --git a/components/option/columnarOption.js b/components/option/columnarOption.js index 58e587d..acb4cb9 100644 --- a/components/option/columnarOption.js +++ b/components/option/columnarOption.js @@ -20,10 +20,11 @@ export default function histogram(dx = [], ds = [], color1 = '', direction = tru }]:[{ type:"inside", show:false, - yAxisIndex:[0], - left:"93%", + yAxisIndex:[0], + // left:"93%", start:0, - end:36, + end:80, + handleSize: 30 }], // legend: { // x:'15', @@ -76,6 +77,12 @@ export default function histogram(dx = [], ds = [], color1 = '', direction = tru textStyle: { fontSize: 8 }, + formatter: (value) => { + if (value >= 10000) { + value = (value / 10000) + '万'; + } + return value; + } }, splitLine: { //分割线 // lineStyle:{ @@ -120,6 +127,9 @@ export default function histogram(dx = [], ds = [], color1 = '', direction = tru } } }] : [{ + max:50, + min:0, + splitNumber:5, type: 'category', data: dx, axisTick: { @@ -130,10 +140,10 @@ export default function histogram(dx = [], ds = [], color1 = '', direction = tru }, axisLabel: { color: '#999999', //y轴文本颜色 - formatter:(value)=>{ - let res=doStr(value,4) - return res - }, + // formatter:(value)=>{ + // let res=doStr(value,4) + // return res + // }, textStyle: { fontSize: 9 } @@ -143,6 +153,7 @@ export default function histogram(dx = [], ds = [], color1 = '', direction = tru type: 'bar', data: ds, barWidth: direction?24:12, + // barGap:direction?"":"80%", stack: "Search Engine", emphasis: { //折线图的高亮状态。 focus: "series", //聚焦当前高亮的数据所在的系列的所有图形。 diff --git a/pages/index/Salesranking/Salesranking.js b/pages/index/Salesranking/Salesranking.js index ee8d8da..286fd30 100644 --- a/pages/index/Salesranking/Salesranking.js +++ b/pages/index/Salesranking/Salesranking.js @@ -10,7 +10,6 @@ Page({ * 生命周期函数--监听页面加载 */ onLoad(options) { -console.log(options) }, /** diff --git a/pages/index/Salesranking/Vehicletype/Vehicletype.js b/pages/index/Salesranking/Vehicletype/Vehicletype.js index 1f4c3c5..0babe13 100644 --- a/pages/index/Salesranking/Vehicletype/Vehicletype.js +++ b/pages/index/Salesranking/Vehicletype/Vehicletype.js @@ -46,26 +46,14 @@ Component({ id: options.id }) }, - onShow() { - this.getData().then(() => { - this.getLikeData() - }) - }, - //页面上拉触底事件的处理函数 - onReachBottom: function () { - // console.log("上拉触底事件") - let that = this - if (!that.data.loadMore) { - that.setData({ - loadMore: true, //加载中 - loadAll: false //是否加载完所有数据 - }); - //加载更多,这里做下延时加载 - that.getLikeData(); - } - }, + // onShow() { + // this.getData().then(() => { + // this.getLikeData() + // }) + // }, + searchScrollLower() { - this.getLikeData(); + }, methods: { getData(sTimeType, sStartTime, sEndTime) { @@ -75,7 +63,7 @@ Component({ duration: 3000 }) this.getAmount(sTimeType, sStartTime, sEndTime), - this.getTrend() + this.getTrend() setTimeout(() => { wx.hideToast(); },500) @@ -100,7 +88,7 @@ Component({ loadAll: false //把“没有数据”设为false,隐藏 }) } - app.globalData.request(obj).then(res => { + app.globalData.request(obj ,res => { let arr = [] res.forEach(ele => { let ol = { @@ -320,12 +308,6 @@ Component({ intervalSel: e.currentTarget.dataset.index }) }, - // bindAccountChange(e){ - // // console.log('切换改变的值', e.detail.value); - // this.setData({ - // accountIndex: e.detail.value - // }) - // }, //弹出框 times(val){ var month=val.substring(0,4) //获取年份 @@ -384,6 +366,19 @@ Component({ }) }) }, + //页面上拉触底事件的处理函数 + onReachBottom: function () { + console.log("上拉触底事件") + let that = this + if (!that.data.loadMore) { + that.setData({ + loadMore: true, //加载中 + loadAll: false //是否加载完所有数据 + }); + //加载更多,这里做下延时加载 + that.getData(); + } + }, exit() { this.setData({ show: false diff --git a/pages/index/Salesranking/Vehicletype/Vehicletype.wxss b/pages/index/Salesranking/Vehicletype/Vehicletype.wxss index c59e0f8..c88c507 100644 --- a/pages/index/Salesranking/Vehicletype/Vehicletype.wxss +++ b/pages/index/Salesranking/Vehicletype/Vehicletype.wxss @@ -9,8 +9,6 @@ margin: 0rpx 12rpx 12rpx 12rpx; } - - .box_title { width: 150rpx; height: 60rpx;