ke_junjie
2025-06-04 bb6e2230bb8ded3c5546bc4e4c282ee343754475
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<template>
  <!-- 在制品资金分析 -->
  <div id="product" class="global-content">
    <div class="width flex align-center justify-end">
      <label class="color909399 fontsiez1rem">查询日期:</label>
      <el-date-picker
        class="margin-right"
        v-model="pickertime"
        size="mini"
        type="daterange"
        value-format="yyyy-MM-dd"
        range-separator="至"
        start-placeholder="开始日期"
        end-placeholder="结束日期"
      >
      </el-date-picker>
      <el-button type="primary" size="mini" @click="inquer">查询</el-button>
      <el-button type="primary" size="mini" @click="linkto">跳转</el-button>
    </div>
    <div class="width applyheight overflow margin-top4">
      <product-echart class="width height" :chartData="chartData" :colorList="colorList" />
    </div>
  </div>
</template>
 
<script>
import { GetStorageCapitalAnalysis } from '@/api/reportforms';
import { GetDateStr } from '@/utils/date';
import resize from '@/mixins/resize';
import ProductEchart from '@/views/Home/components/product.vue';
const echarts = require('echarts');
export default {
  data() {
    return {
      pickertime: [GetDateStr(-15), GetDateStr(0)],
      chartData: {},
      rgvdata: {},
      colorList: ['#9effff', '#9E87FF', '#73DD39', '#73DDFF', '#fe9a', '#fe9a8b', '#F3A43B']
    };
  },
  mixins: [resize],
  components: { ProductEchart },
  computed: {},
  mounted() {
    this.GetStorageCapitalAnalysis();
  },
  methods: {
    inquer() {
      this.GetStorageCapitalAnalysis();
    },
    //跳转
    linkto() {
      const { href } = this.$router.resolve({
        path: '/product'
      });
      window.open(href, '_blank');
    },
    //堆垛机
    GetStorageCapitalAnalysis() {
      let objtimes = {
        startTime: this.pickertime ? this.pickertime[0] : '',
        endTime: this.pickertime ? this.pickertime[1] : ''
      };
      GetStorageCapitalAnalysis(objtimes).then(res => {
        this.chartData = res;
      });
    }
  }
};
</script>
 
<style lang="scss" scoped>
#product {
}
</style>