scorpio 2 жил өмнө
parent
commit
003c789e89

+ 9 - 2
src/views/home/pro_detail.vue

@@ -84,13 +84,20 @@ export default {
     }
     this.currentTab = this.tabs[0]
     this.proInfo()
+
+    // editYear === true 填报年度投资,滚动到对应位置
+    setTimeout(() => {
+      const edit = this.$route.query.editYear
+      if (edit) {
+        this.changeIndex(2)
+      }
+    }, 1500)
   },
   methods: {
     change (res, index) {
       this.currentTab = res
       this.code = this.currentTab.code
-    },
-    /**
+    }, /**
      * 项目信息
      */
     proInfo () {

+ 0 - 2
src/views/invest/components/chart.vue

@@ -170,13 +170,11 @@ export default {
           this.option.xAxis[0].data = res.data.map(res => res.month)
           this.option.series[0].data = res.data.map(res => res.sum_complete_amount)
           this.option.series[1].data = res.data.map(res => res.average)
-          const length = res.data.length
           this.avg(this.option.series[0].data[0], this.option.series[1].data[0])
         }
       })
     },
     avg (lastComplete, lastAvg) {
-      console.log(lastComplete, lastAvg)
       this.$emit('avg', lastComplete < lastAvg)
     }
   }

+ 1 - 1
src/views/invest/components/complete.vue

@@ -171,7 +171,7 @@ export default {
       if (type === 'view') {
         this.$router.push({
           path: '/home/pro_detail',
-          query: { id: this.form.id, projectStage: this.form.project_stage }
+          query: { id: this.form.id, projectStage: this.form.project_stage, editYear: true }
         })
       }
     }