|
@@ -172,11 +172,6 @@ var vNode = {
|
|
|
this.currentVal.buyerClass = prevState.currentVal.buyerClass;
|
|
|
}
|
|
|
this.isFollowProject();
|
|
|
- var restore = this.restoreData()
|
|
|
- if (!restore) {
|
|
|
- this.getChartData();
|
|
|
- this.getBaseInfo();
|
|
|
- }
|
|
|
},
|
|
|
beforeDestroy() {
|
|
|
window.removeEventListener("resize", this.init,20);
|
|
@@ -188,6 +183,11 @@ var vNode = {
|
|
|
// }
|
|
|
},
|
|
|
mounted() {
|
|
|
+ var restore = this.restoreData()
|
|
|
+ if (!restore) {
|
|
|
+ this.getChartData();
|
|
|
+ this.getBaseInfo();
|
|
|
+ }
|
|
|
this.year = new Date().getFullYear() - 2;
|
|
|
// 动态调整sticky距离顶部的高度
|
|
|
this.getStickyTop()
|
|
@@ -976,15 +976,15 @@ var vNode = {
|
|
|
minusRows: this.minusRows,
|
|
|
screenWidth: this.screenWidth,
|
|
|
year: this.year,
|
|
|
- baseInfo: this.baseInfo
|
|
|
+ baseInfo: this.baseInfo,
|
|
|
+ scrollTop: this.$refs.wrapper.scrollTop
|
|
|
}
|
|
|
- console.log(data)
|
|
|
+ // console.log(data)
|
|
|
sessionStorage.setItem('$data-analysis-result',JSON.stringify(data))
|
|
|
},
|
|
|
// 恢复页面数据
|
|
|
restoreData:function(){
|
|
|
var $data = sessionStorage.getItem('$data-analysis-result')
|
|
|
- // console.log($data)
|
|
|
if ($data) {
|
|
|
$data = JSON.parse($data)
|
|
|
this.cacheImgData = $data.cacheImgData || {}
|
|
@@ -996,6 +996,11 @@ var vNode = {
|
|
|
this.screenWidth = $data.screenWidth
|
|
|
this.year = $data.year
|
|
|
this.baseInfo = $data.baseInfo
|
|
|
+ this.scrollTop = $data.scrollTop
|
|
|
+ var _this = this
|
|
|
+ this.$nextTick(function(){
|
|
|
+ _this.$refs.wrapper.scrollTop = $data.scrollTop || 0
|
|
|
+ })
|
|
|
this.initChartData()
|
|
|
sessionStorage.removeItem('$data-analysis-result')
|
|
|
}
|