Переглянути джерело

修改盯盘,进入盯盘账户也带参数

朱鑫波 4 роки тому
батько
коміт
c9ecd2cc32

+ 11 - 9
src/views/modules/stockWatch/accountPage.vue

@@ -1017,15 +1017,15 @@ const columns=[
                 return current  && !(current > (moment().subtract(1,'months')) && current < moment())
             }, 
             onChange(date, dateString) {                
-                console.log(date, dateString);
+                // console.log(date, dateString);
                 this.getAllIndex();
                 this.getAccountIndexData();
 
                 if(dateString.length>0&&dateString[0]!=dateString[1]){
                     let interval=date[1].diff(date[0],'days')
-                    console.log(interval);
+                    // console.log(interval);
                     this.dateStringShow=`${moment(date[0]).subtract(1+interval,'days').format('YYYY-MM-DD')}~${moment(date[0]).subtract(1,'days').format('YYYY-MM-DD')}`
-                    console.log(this.dateStringShow)
+                    // console.log(this.dateStringShow)
                 }
             },
             materialDataChange(date, dateString){
@@ -1147,7 +1147,7 @@ const columns=[
                     ]
                 };
                 //单一天数
-                console.log(data)
+                // console.log(data)
                 
                 if(this.dateValue[0].format('YYYY-MM-DD')==this.dateValue[1].format('YYYY-MM-DD')){
                     option.xAxis[0].data=data.xData;
@@ -1164,7 +1164,7 @@ const columns=[
                 option.series[1].name=data.yData?data.yData.today.name:''
                 option.series[0].data=data.yData?data.yData.yesterday.data:[]
                 option.series[1].data=data.yData?data.yData.today.data:[] 
-                console.log(option)
+                // console.log(option)
                 return option
             },  
 
@@ -2112,7 +2112,7 @@ const columns=[
                         data.legend.push(item.type)
                     }   
                 });
-                console.log(data)
+                // console.log(data)
                 data.legend.forEach((item,index)=>{
                     data.yData.push({
                         name:item,
@@ -2130,7 +2130,7 @@ const columns=[
                          
                     });
                 })
-                console.log(data)
+                // console.log(data)
                 return data       
             },
             // 性别对应数据图
@@ -2295,8 +2295,10 @@ const columns=[
             //     }
             // })
             if(localStorage.getItem('stockWatchAccountId')) {
-                this.accountId = localStorage.getItem('stockWatchAccountId');
-                this.selectaccountId = localStorage.getItem('stockWatchAccountId');
+                let data = JSON.parse(localStorage.getItem('stockWatchAccountId'));
+                this.accountId = data.accountId;
+                this.selectaccountId = data.accountId;
+                this.dateValue = [moment(data.timeRange[0]),moment(data.timeRange[1])];
                 this.accountPageSpinning = false;
             }
             else {

+ 6 - 1
src/views/modules/stockWatch/modules/keep-manage/keep-manage.vue

@@ -516,6 +516,7 @@ export default {
         checkOutType() {
             this.showChange = false;
             this.projectId = null;
+            this.ipagination.current = 1
             if(this.typeValue === 'account') {
                 this.url = '/etl/reportAccountHourly/leaderAccountPageList';
                 this.columns = [...keepPersonData.setNoDeleteColumns() , ...keepPersonData.setDefaultColumns()];
@@ -535,6 +536,7 @@ export default {
         toAccount(item) {
             this.showChange = false;
             this.projectId = item.projectId;
+            this.ipagination.current = 1
             this.typeValue = 'account';
             this.url = '/etl/reportAccountHourly/leaderAccountPageList';
             this.columns = [...keepPersonData.setNoDeleteColumns() , ...keepPersonData.setDefaultColumns()];
@@ -545,7 +547,10 @@ export default {
 
         //点击跳转盯盘详情页
         toDetail(item) {
-            localStorage.setItem('stockWatchAccountId',item.accountId);
+            let params = {};
+            params.accountId = item.accountId;
+            params.timeRange = this.dateValue;
+            localStorage.setItem('stockWatchAccountId',JSON.stringify(params));
             this.$nextTick(() => {
                 this.$router.push('/modules/stockWatch/accountPage');
             })

+ 4 - 1
src/views/modules/stockWatch/modules/keep-person/keep-person.vue

@@ -242,7 +242,10 @@ export default {
         ...mapGetters(["userInfo"]),
         //点击跳转盯盘详情页
         toDetail(item) {
-            localStorage.setItem('stockWatchAccountId',item.accountId);
+            let params = {};
+            params.accountId = item.accountId;
+            params.timeRange = this.dateValue;
+            localStorage.setItem('stockWatchAccountId',JSON.stringify(params));
             this.$nextTick(() => {
                 this.$router.push('/modules/stockWatch/accountPage');
             })