<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>
|