lilei 2 роки тому
батько
коміт
1af2ec1656

+ 2 - 2
src/views/bigScreen/fPanalysisReport/index.vue

@@ -30,7 +30,7 @@
           <div class="col-6">级别</div>
           <div class="col-6">采购金额(万元)</div>
         </div>
-        <RightTop />
+        <RightTop :curYear="curYear"/>
       </ItemWrap>
       <ItemWrap
         class="contetn_right-bottom contetn_lr-bitem"
@@ -47,7 +47,7 @@
           <div class="col-3">产品分类</div>
           <div class="col-4">{{ curTab==1?'销售数量':'销售金额(万元)' }}</div>
         </div>
-        <RightBottom :curTab="curTab"/>
+        <RightBottom :curYear="curYear" :curTab="curTab"/>
       </ItemWrap>
     </div>
   </div>

+ 6 - 2
src/views/bigScreen/fPanalysisReport/right-bottom.vue

@@ -54,7 +54,11 @@ export default {
   	curTab: {
   		type: Number,
   		default: 1
-  	}
+  	},
+    curYear: {
+      type: [Number, String],
+      default: ''
+    }
   },
   data () {
     return {
@@ -99,7 +103,7 @@ export default {
     },
     getData () {
       this.loading = true
-      const date = new Date().getFullYear() + '-01-01'
+      const date = this.curYear + '-01-01'
       document.getElementById('scrollView2').className = ''
       queryProductPurchase({ queryDate: date, queryType: this.queryType }).then(res => {
         if (res.status == 200) {

+ 7 - 1
src/views/bigScreen/fPanalysisReport/right-top.vue

@@ -47,6 +47,12 @@ import Kong from '@/bigScreenComponents/kong.vue'
 import { addKeyFrames } from '@/utils/domUtil.js'
 import { queryDealerPurchase } from '@/api/bigScreen'
 export default {
+  props: {
+    curYear: {
+      type: [Number, String],
+      default: ''
+    }
+  },
   components: { Kong },
   data () {
     return {
@@ -81,7 +87,7 @@ export default {
       this.timer = setInterval(looper, this.$store.state.setting.echartsAutoTime)
     },
     getData () {
-      const date = new Date().getFullYear() + '-01-01'
+      const date = this.curYear + '-01-01'
       this.loading = true
       queryDealerPurchase({ queryDate: date }).then(res => {
         if (res.status == 200) {