Commit 52634995 authored by Jenny's avatar Jenny

Merge branch 'develop' of http://106.15.103.105/lihuizhen/ec-report-refactor into develop

parents a2a6456b 447359e7
...@@ -230,19 +230,21 @@ ...@@ -230,19 +230,21 @@
const flag = Math.abs(lastCount - count) <= categories.length / 100 ? true : false const flag = Math.abs(lastCount - count) <= categories.length / 100 ? true : false
if(flag && event.end === 100 && this.index != this.elementData.dataList.datas.length - 1) { if(flag && event.end === 100 && this.index != this.elementData.dataList.datas.length - 1) {
this.index += 1 this.index += 1
this.setChartDatas() this.setChartDatas(event)
} }
if(flag && event.start === 0 && this.index != 0) { if(flag && event.start === 0 && this.index != 0) {
this.index -= 1 this.index -= 1
this.setChartDatas() this.setChartDatas(event)
} }
}, },
setChartDatas() { setChartDatas(event) {
const categories = this.elementData.dataList.datas[this.index].categories const categories = this.elementData.dataList.datas[this.index].categories
const series = this.elementData.dataList.datas[this.index].series const series = this.elementData.dataList.datas[this.index].series
const dealSeries = this.dealSeriesData(series) const dealSeries = this.dealSeriesData(series)
this.$set(this.ec.option, 'yAxis.data', categories) this.$set(this.ec.option, 'yAxis.data', categories)
this.$set(this.ec.option, 'series', dealSeries) this.$set(this.ec.option, 'series', dealSeries)
this.$set(this.ec.option, 'dataZoom.start', event.start)
this.$set(this.ec.option, 'dataZoom.end', event.end)
} }
} }
} }
......
...@@ -215,11 +215,11 @@ ...@@ -215,11 +215,11 @@
const flag = Math.abs(lastCount - count) <= categories.length / 100 ? true : false const flag = Math.abs(lastCount - count) <= categories.length / 100 ? true : false
if(flag && event.end === 100 && this.index != this.elementData.dataList.datas.length - 1) { if(flag && event.end === 100 && this.index != this.elementData.dataList.datas.length - 1) {
this.index += 1 this.index += 1
this.setChartDatas() this.setChartDatas(event)
} }
if(flag && event.start === 0 && this.index != 0) { if(flag && event.start === 0 && this.index != 0) {
this.index -= 1 this.index -= 1
this.setChartDatas() this.setChartDatas(event)
} }
}, },
setChartDatas() { setChartDatas() {
...@@ -228,6 +228,8 @@ ...@@ -228,6 +228,8 @@
const dealSeries = this.dealSeriesData(series) const dealSeries = this.dealSeriesData(series)
this.$set(this.ec.option, 'xAxis.data', categories) this.$set(this.ec.option, 'xAxis.data', categories)
this.$set(this.ec.option, 'series', dealSeries) this.$set(this.ec.option, 'series', dealSeries)
this.$set(this.ec.option, 'dataZoom.start', event.start)
this.$set(this.ec.option, 'dataZoom.end', event.end)
} }
} }
} }
......
...@@ -192,19 +192,21 @@ ...@@ -192,19 +192,21 @@
const flag = Math.abs(lastCount - count) <= categories.length / 100 ? true : false const flag = Math.abs(lastCount - count) <= categories.length / 100 ? true : false
if(flag && event.end === 100 && this.index != this.elementData.dataList.datas.length - 1) { if(flag && event.end === 100 && this.index != this.elementData.dataList.datas.length - 1) {
this.index += 1 this.index += 1
this.setChartDatas() this.setChartDatas(event)
} }
if(flag && event.start === 0 && this.index != 0) { if(flag && event.start === 0 && this.index != 0) {
this.index -= 1 this.index -= 1
this.setChartDatas() this.setChartDatas(event)
} }
}, },
setChartDatas() { setChartDatas(event) {
const categories = this.elementData.dataList.datas[this.index].categories const categories = this.elementData.dataList.datas[this.index].categories
const series = this.elementData.dataList.datas[this.index].series const series = this.elementData.dataList.datas[this.index].series
const dealSeries = this.dealSeriesData(series) const dealSeries = this.dealSeriesData(series)
this.$set(this.ec.option, 'xAxis.data', categories) this.$set(this.ec.option, 'xAxis.data', categories)
this.$set(this.ec.option, 'series', dealSeries) this.$set(this.ec.option, 'series', dealSeries)
this.$set(this.ec.option, 'dataZoom.start', event.start)
this.$set(this.ec.option, 'dataZoom.end', event.end)
} }
} }
} }
......
...@@ -194,19 +194,21 @@ ...@@ -194,19 +194,21 @@
const flag = Math.abs(lastCount - count) <= categories.length / 100 ? true : false const flag = Math.abs(lastCount - count) <= categories.length / 100 ? true : false
if(flag && event.end === 100 && this.index != this.elementData.dataList.datas.length - 1) { if(flag && event.end === 100 && this.index != this.elementData.dataList.datas.length - 1) {
this.index += 1 this.index += 1
this.setChartDatas() this.setChartDatas(event)
} }
if(flag && event.start === 0 && this.index != 0) { if(flag && event.start === 0 && this.index != 0) {
this.index -= 1 this.index -= 1
this.setChartDatas() this.setChartDatas(event)
} }
}, },
setChartDatas() { setChartDatas(event) {
const categories = this.elementData.dataList.datas[this.index].categories const categories = this.elementData.dataList.datas[this.index].categories
const series = this.elementData.dataList.datas[this.index].series const series = this.elementData.dataList.datas[this.index].series
const dealSeries = this.dealSeriesData(series) const dealSeries = this.dealSeriesData(series)
this.$set(this.ec.option, 'xAxis.data', categories) this.$set(this.ec.option, 'xAxis.data', categories)
this.$set(this.ec.option, 'series', dealSeries) this.$set(this.ec.option, 'series', dealSeries)
this.$set(this.ec.option, 'dataZoom.start', event.start)
this.$set(this.ec.option, 'dataZoom.end', event.end)
} }
} }
} }
......
<template>
<scroll-view scroll-x="true">
<block v-for="(item,index) in idlist">
<view>123</view>
</block>
</scroll-view>
</template>
<script>
export default {
data() {
return {
detailId: "",
idlist:[]
}
},
computed: {
},
onLoad(option) {
this.detailId = option.id
this.idList = option.ids.split(",")
console.log(this.detailId)
console.log(this.idList)
},
onShow() {
},
onUnload() {
},
methods: {
},
}
</script>
<style>
</style>
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