<template>
|
<!-- 货格利用率 -->
|
<div id="warehouse" class="global-content backgroundrgb">
|
<div class="width80 height margin-auto overflow">
|
<div class="width margintopbot flex align-center justify-end">
|
<label class="colorfff 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 class="margin-right" type="primary" size="mini" @click="inquer">查询</el-button>
|
</div>
|
<div class="width height-calc90 overflow margin-top2">
|
<warehouse-echart class="width height" colors="#fff" :chartData="chartData" :colorList="colorList" />
|
<!-- <div class="width height" ref="taskbeatEcharts"></div> -->
|
</div>
|
</div>
|
</div>
|
</template>
|
|
<script>
|
import { GetStorageVailability } from '@/api/reportforms';
|
import { GetDateStr } from '@/utils/date';
|
import WarehouseEchart from '@/views/Home/components/warehouseechart.vue';
|
|
export default {
|
data() {
|
return {
|
pickertime: [GetDateStr(-15), GetDateStr(0)],
|
chartData: {},
|
colorList: ['#0090FF', '#36CE9E', '#FFC005', '#FF515A', '#8B5CFF', '#00CA69']
|
};
|
},
|
components: { WarehouseEchart },
|
computed: {},
|
mounted() {
|
this.GetStorageVailability();
|
},
|
methods: {
|
inquer() {
|
this.GetStorageVailability();
|
},
|
GetStorageVailability() {
|
let objtimes = {
|
startTime: this.pickertime ? this.pickertime[0] : '',
|
endTime: this.pickertime ? this.pickertime[1] : ''
|
};
|
GetStorageVailability(objtimes).then(res => {
|
this.chartData = res;
|
});
|
},
|
//echarts
|
init(res) {
|
// this.myChart = echarts.init(this.$refs.taskbeatEcharts);
|
}
|
}
|
};
|
</script>
|
|
<style lang="scss" scoped>
|
#warehouse {
|
}
|
</style>
|