<template>
|
<!-- 分类统计 -->
|
<div id="Ouptput" class="global-content backgroundrgb">
|
<div class="width80 height margin-auto overflow">
|
<div class="margintopbot height width overflow">
|
<!-- <p class="fontsize2rem text-center">零件出入库统计</p> -->
|
<div class="width margintopbot flex justify-end">
|
<el-date-picker
|
v-model="datatime"
|
size="mini"
|
type="datetimerange"
|
value-format="yyyy-MM-dd HH:mm:ss"
|
range-separator="至"
|
start-placeholder="开始日期"
|
end-placeholder="结束日期"
|
>
|
</el-date-picker>
|
<!-- <el-date-picker
|
size="mini"
|
v-model="datatime"
|
type="date"
|
:clearable="false"
|
value-format="yyyy-MM-dd"
|
placeholder="选择日期"
|
>
|
</el-date-picker> -->
|
<el-button class="margin-left margin-right" type="primary" size="mini" @click="goodsinquer">查询</el-button>
|
</div>
|
<!-- <div class="width98 height82 margintopbot echart-height">
|
<line-echart
|
titleechart="出入库任务"
|
:linelist="BarItemlinelist"
|
:colorList="barcolorList"
|
class="width height"
|
colors="#fff"
|
/>
|
</div> -->
|
<div class="width98 height45 margintopbot echart-height">
|
<line-echart
|
titleechart="零件数量统计"
|
:linelist="BarItemlinelist"
|
:colorList="barcolorList"
|
colors="#fff"
|
class="width height"
|
/>
|
</div>
|
<div class="width98 height45 margintopbot echart-height">
|
<line-echart
|
titleechart="器具出入库统计"
|
:linelist="Containerlinelist"
|
:colorList="concolorList"
|
colors="#fff"
|
class="width height"
|
/>
|
</div>
|
</div>
|
</div>
|
</div>
|
</template>
|
|
<script>
|
import { GetInOutCountByHour } from '@/api/output';
|
import { GetHomeBarItemData, GetHomeBarContainerData } from '@/api/Didproject';
|
import LineEchart from './components/lineEcharts.vue';
|
import { getDate, GetDateStr, GetTimeStr } from '@/utils/date';
|
export default {
|
data() {
|
return {
|
datatime: [GetDateStr(-15) + ' 00:00:00', getDate() + ' ' + GetTimeStr(0)],
|
BarItemlinelist: {}, //零件出入数量
|
Containerlinelist: {}, //出入库数量
|
barcolorList: ['#ffc637', '#fc7293', '#8477e9', '#2599f0', '#31c3ea', '#17d8b9', '#e8bdf3'],
|
concolorList: ['#31c3ea', '#17d8b9', '#2599f0', '#e8bdf3', '#ffc637', '#fc7293', '#8477e9']
|
};
|
},
|
components: { LineEchart },
|
computed: {},
|
mounted() {
|
this.GetHomeBarItemData();
|
this.GetHomeBarContainerData();
|
},
|
methods: {
|
//时间查询
|
goodsinquer() {
|
this.GetHomeBarItemData();
|
this.GetHomeBarContainerData();
|
},
|
//获取零件的出入库数量
|
GetHomeBarItemData() {
|
let time = {
|
startTime: this.datatime ? this.datatime[0] : '',
|
endTime: this.datatime ? this.datatime[1] : ''
|
};
|
this.BarItemlineshow = false;
|
GetHomeBarItemData(time).then(res => {
|
this.BarItemlinelist = res.data;
|
this.BarItemlineshow = true;
|
});
|
},
|
//获取器具的出入库数量
|
GetHomeBarContainerData() {
|
let time = {
|
startTime: this.datatime ? this.datatime[0] : '',
|
endTime: this.datatime ? this.datatime[1] : ''
|
};
|
this.$Loading(true);
|
this.Containerline = false;
|
GetHomeBarContainerData(time).then(res => {
|
this.Containerlinelist = res.data;
|
this.Containerline = true;
|
this.$Loading();
|
});
|
}
|
//获取零件的出入库数量
|
// GetInOutCountByHour() {
|
// let time = {
|
// startTime: this.datatime + ' 00:00:00',
|
// endTime: this.datatime + ' 23:59:59'
|
// };
|
|
// GetInOutCountByHour(time).then(res => {
|
// // this.BarItemlinelist = res.data;
|
// });
|
// }
|
}
|
};
|
</script>
|
|
<style lang="scss" scoped></style>
|