fix:车间看板本月各工段生产产品数
This commit is contained in:
parent
a112ba552a
commit
a8a0774cc0
|
|
@ -10,9 +10,9 @@
|
||||||
<div class="leftBlock">
|
<div class="leftBlock">
|
||||||
<div style="height: 55vh;position: relative;">
|
<div style="height: 55vh;position: relative;">
|
||||||
<dv-border-box-1>
|
<dv-border-box-1>
|
||||||
<div class="chartBlockTitle">车间各工段生产产品数</div>
|
<div class="chartBlockTitle">本月各工段生产产品数</div>
|
||||||
<div class="echartsWrap" style="width: 50vh;overflow: hidden;">
|
<div class="echartsWrap">
|
||||||
<scEcharts :option="barOption" style="height: 70.5vh;width: 90%;left: 5%;"/>
|
<scEcharts id="barCharts" :option="barOption" style="height: 70.5vh;width: 96%;left: 2%;position: absolute;top: 0px;"/>
|
||||||
</div>
|
</div>
|
||||||
<!-- <dv-capsule-chart :config="config_left1" class="leftChartBlock1"/> -->
|
<!-- <dv-capsule-chart :config="config_left1" class="leftChartBlock1"/> -->
|
||||||
</dv-border-box-1>
|
</dv-border-box-1>
|
||||||
|
|
@ -55,7 +55,7 @@
|
||||||
</el-row>
|
</el-row>
|
||||||
<div style="height: 38vh;">
|
<div style="height: 38vh;">
|
||||||
<dv-border-box-1>
|
<dv-border-box-1>
|
||||||
<div class="chartBlockTitle">车间工段任务展示</div>
|
<div class="chartBlockTitle">车间物料展示</div>
|
||||||
<dv-scroll-board :config="config_middle_top" class="middleTableBlock1"/>
|
<dv-scroll-board :config="config_middle_top" class="middleTableBlock1"/>
|
||||||
</dv-border-box-1>
|
</dv-border-box-1>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -344,50 +344,46 @@ export default {
|
||||||
show:false
|
show:false
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
yAxis: [
|
yAxis: {
|
||||||
{
|
axisLine: {
|
||||||
axisLine: {
|
show: false
|
||||||
show: false
|
},
|
||||||
},
|
axisTick: {
|
||||||
axisTick: {
|
show: false
|
||||||
show: false
|
},
|
||||||
},
|
axisLabel: {
|
||||||
axisLabel: {
|
color: "#fff"
|
||||||
color: "#fff"
|
},
|
||||||
},
|
splitLine: {
|
||||||
splitLine: {
|
show:false
|
||||||
show:false
|
},
|
||||||
},
|
type: 'category',
|
||||||
type: 'category',
|
inverse: true, // 反转坐标轴
|
||||||
inverse: true, // 反转坐标轴
|
data: []
|
||||||
data: []
|
},
|
||||||
}
|
series:{
|
||||||
],
|
name: '柱状图',
|
||||||
series: [
|
type: 'bar',
|
||||||
{
|
data: [],
|
||||||
name: '柱状图',
|
barCategoryGap: 50,
|
||||||
type: 'bar',
|
barWidth: 10,
|
||||||
data: [],
|
itemStyle: {
|
||||||
barCategoryGap: 50,
|
normal: {
|
||||||
barWidth: 10,
|
barBorderRadius: 5,
|
||||||
itemStyle: {
|
color: function (params) {
|
||||||
normal: {
|
return myColor[params.dataIndex];
|
||||||
barBorderRadius: 5,
|
|
||||||
color: function (params) {
|
|
||||||
return myColor[params.dataIndex];
|
|
||||||
}
|
|
||||||
},
|
|
||||||
label: {
|
|
||||||
normal: {
|
|
||||||
show: true,
|
|
||||||
// position: "outside",
|
|
||||||
color: "#fff",
|
|
||||||
formatter: "{a}"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
label: {
|
||||||
]
|
normal: {
|
||||||
|
show: true,
|
||||||
|
position: "outside",
|
||||||
|
color: "#fff",
|
||||||
|
formatter: "{a}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
},
|
},
|
||||||
tableHeight: 100,
|
tableHeight: 100,
|
||||||
speed: 2000,
|
speed: 2000,
|
||||||
|
|
@ -426,7 +422,7 @@ export default {
|
||||||
headerBGC: 'rgba(47,102,107,.34)',
|
headerBGC: 'rgba(47,102,107,.34)',
|
||||||
oddRowBGC: 'rgba(0,0,0,0)',
|
oddRowBGC: 'rgba(0,0,0,0)',
|
||||||
evenRowBGC: 'rgba(0,0,0,0)',
|
evenRowBGC: 'rgba(0,0,0,0)',
|
||||||
header: ['任务编号', '产出产品', '任务量', '合格数'],
|
header: ['批次号','物料名称', '当前工序', '当前状态', '当前数量'],
|
||||||
data: []
|
data: []
|
||||||
},
|
},
|
||||||
config_middle_bottom:{
|
config_middle_bottom:{
|
||||||
|
|
@ -448,12 +444,13 @@ export default {
|
||||||
currentTime: "",
|
currentTime: "",
|
||||||
currentDay: "",
|
currentDay: "",
|
||||||
today: "",
|
today: "",
|
||||||
end_time:'',
|
end_date:'',
|
||||||
start_time:'',
|
start_date:'',
|
||||||
deptName1: "毛坯加工班组",
|
deptName1: "毛坯加工班组",
|
||||||
deptName2: "辅助班组",
|
deptName2: "辅助班组",
|
||||||
deptName3: "精雕机班组",
|
deptName3: "精雕机班组",
|
||||||
deptName4: "成品精加工班组",
|
deptName4: "成品精加工班组",
|
||||||
|
setIntervalChart : null,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
@ -462,7 +459,16 @@ export default {
|
||||||
this.dayInterval = setInterval(() => {
|
this.dayInterval = setInterval(() => {
|
||||||
this.showTime();
|
this.showTime();
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
let date = new Date();
|
||||||
|
let year = date.getFullYear();
|
||||||
|
let month = date.getMonth() + 1;
|
||||||
|
month = month < 10 ? "0" + month : month;
|
||||||
|
let days = new Date(year, month, 0).getDate();
|
||||||
|
that.start_date = year + "-" + month + "-01";
|
||||||
|
that.end_date = year + "-" + month + "-" + days;
|
||||||
that.materialAll();
|
that.materialAll();
|
||||||
|
that.barOption.yAxis.data=[];
|
||||||
|
that.barOption.series.data=[];
|
||||||
that.getMgroups(that.deptName1);
|
that.getMgroups(that.deptName1);
|
||||||
that.getMgroups(that.deptName2);
|
that.getMgroups(that.deptName2);
|
||||||
that.getMgroups(that.deptName3);
|
that.getMgroups(that.deptName3);
|
||||||
|
|
@ -477,11 +483,23 @@ export default {
|
||||||
that.getEveryoneCount(that.deptName2);
|
that.getEveryoneCount(that.deptName2);
|
||||||
that.getEveryoneCount(that.deptName3);
|
that.getEveryoneCount(that.deptName3);
|
||||||
that.getEveryoneCount(that.deptName4);
|
that.getEveryoneCount(that.deptName4);
|
||||||
//任务进度
|
if(that.setIntervalChart !== null){
|
||||||
that.getMtask1(that.deptName1);
|
clearInterval(that.setIntervalChart);
|
||||||
that.getMtask1(that.deptName2);
|
that.setIntervalChart = null;
|
||||||
that.getMtask1(that.deptName3);
|
}
|
||||||
that.getMtask1(that.deptName4);
|
that.setIntervalChart = setInterval(() => {
|
||||||
|
let top = document.getElementById("barCharts").style.top;
|
||||||
|
top = top.substring(0,top.length-2);
|
||||||
|
let topNumber = Number(top);
|
||||||
|
let newTop = 0;
|
||||||
|
if(topNumber <= -20){
|
||||||
|
newTop = 0;
|
||||||
|
}else{
|
||||||
|
newTop =Number(top)-2.5;
|
||||||
|
}
|
||||||
|
document.getElementById("barCharts").style.top = newTop + 'vh';
|
||||||
|
|
||||||
|
},2000)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getMondayOfCurrentWeek() {
|
getMondayOfCurrentWeek() {
|
||||||
|
|
@ -526,55 +544,48 @@ export default {
|
||||||
if(res.length > 0){
|
if(res.length > 0){
|
||||||
res.forEach((item)=>{
|
res.forEach((item)=>{
|
||||||
that.mgroupsId += item.id + ',';
|
that.mgroupsId += item.id + ',';
|
||||||
that.getmgroupMaterial(item.name);
|
that.barOption.yAxis.data.push(item.name);
|
||||||
//工段太多了,暂时不显示全部,只显示有数据的工段
|
that.barOption.series.data.push(0);
|
||||||
// that.config_left1.data.push({name:item.name,value:0});
|
//车间库存
|
||||||
that.barOption.yAxis[0].data.push(item.name);
|
that.getInms(item);
|
||||||
that.barOption.series[0].data.push(0);
|
that.getmgroupMaterial(item.name);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//任务进度
|
//车间物料展示车间库存
|
||||||
getMtask1(deptName) {
|
getInms(item){
|
||||||
let that = this;
|
let that = this;
|
||||||
let params = {
|
let params = { tag: 'done',page:0,mgroup: item.id };
|
||||||
state: 20,mgroup__belong_dept__name: deptName,page:0,
|
that.$API.wpm.wmaterial.list.req(params).then((res) => {
|
||||||
query: " { id, material_out_name, number, count, count_ok }"
|
|
||||||
};
|
|
||||||
that.config_middle_top.data = [];
|
|
||||||
that.$API.pm.mtask.list.req(params).then((res) => {
|
|
||||||
if(res.length>0){
|
if(res.length>0){
|
||||||
res.forEach((item) => {
|
res.forEach((item)=>{
|
||||||
let arr = [];
|
let arr = [];
|
||||||
arr[0] = item.number;
|
arr[0] = item.batch;
|
||||||
arr[1] = item.material_out_name;
|
arr[1] = item.material_.name;
|
||||||
arr[2] = item.count;
|
arr[2] = item.material_.process_name;
|
||||||
arr[3] = item.count_ok;
|
arr[3] = item.state==10?'合格品':'不合格品';
|
||||||
|
arr[4] = item.count;
|
||||||
that.config_middle_top.data.push(arr);
|
that.config_middle_top.data.push(arr);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
//车间各工段生产产品数
|
//车间各工段生产产品数
|
||||||
getmgroupMaterial(deptName) {
|
getmgroupMaterial(mgroupName) {
|
||||||
let that = this;
|
let that = this;
|
||||||
let date = that.$TOOL.dateFormat(new Date(), "yyyy-MM-dd");
|
|
||||||
let params = {
|
let params = {
|
||||||
// query: {start_date:date,end_date:date,mgroup_name:item.name},
|
query: {start_date:that.start_date,end_date:that.end_date,mgroup_name:mgroupName}
|
||||||
query: {start_date:date,end_date:date,dept_name:deptName},
|
|
||||||
};
|
};
|
||||||
this.$API.bi.dataset.exec.req("mlog_okrate", params).then((res) => {
|
this.$API.bi.dataset.exec.req("mlog_okrate", params).then((res) => {
|
||||||
if(res.data2.ds0.length>0){
|
if(res.data2.ds0.length>0){
|
||||||
let data = res.data2.ds0;
|
let data = res.data2.ds0;
|
||||||
data.forEach((item) => {
|
data.forEach((item) => {
|
||||||
that.config_left1.data.forEach((obj,index2) => {
|
let index2 = that.barOption.yAxis.data.indexOf(item.工段);
|
||||||
if (item.name == obj.工段){
|
that.barOption.series.data[index2] = item.合格数;
|
||||||
that.config_left1.data[index2].value = item.合格数;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
console.log(that.barOption);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//车间设备列表
|
//车间设备列表
|
||||||
|
|
@ -665,6 +676,9 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
beforeUnmount() {
|
||||||
|
clearInterval(this.setIntervalChart);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
@ -761,4 +775,16 @@ export default {
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
border-bottom: 1px solid rgb(83 198 243);
|
border-bottom: 1px solid rgb(83 198 243);
|
||||||
}
|
}
|
||||||
|
.echartsWrap{
|
||||||
|
height: 49vh;
|
||||||
|
overflow: hidden;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
#barCharts{
|
||||||
|
height: 70.5vh;
|
||||||
|
width: 96%;
|
||||||
|
left: 2%;
|
||||||
|
position: absolute;
|
||||||
|
top: 0px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,7 @@
|
||||||
</el-row>
|
</el-row>
|
||||||
<div style="height: 34vh;position: relative;">
|
<div style="height: 34vh;position: relative;">
|
||||||
<dv-border-box-1>
|
<dv-border-box-1>
|
||||||
<div class="chartBlockTitle">车间各工段生产产品数</div>
|
<div class="chartBlockTitle">本月各工段生产产品数</div>
|
||||||
<dv-capsule-chart :config="config_left1" class="leftChartBlock1"/>
|
<dv-capsule-chart :config="config_left1" class="leftChartBlock1"/>
|
||||||
</dv-border-box-1>
|
</dv-border-box-1>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -392,7 +392,7 @@ export default {
|
||||||
headerBGC: 'rgba(47,102,107,.34)',
|
headerBGC: 'rgba(47,102,107,.34)',
|
||||||
oddRowBGC: 'rgba(0,0,0,0)',
|
oddRowBGC: 'rgba(0,0,0,0)',
|
||||||
evenRowBGC: 'rgba(0,0,0,0)',
|
evenRowBGC: 'rgba(0,0,0,0)',
|
||||||
header:['批次号','物料名称', '当前工序', '状态', '数量'],
|
header:['批次号','物料名称', '当前工序', '当前状态', '当前数量'],
|
||||||
data: []
|
data: []
|
||||||
},
|
},
|
||||||
config_middle_bottom:{
|
config_middle_bottom:{
|
||||||
|
|
@ -425,20 +425,15 @@ export default {
|
||||||
this.dayInterval = setInterval(() => {
|
this.dayInterval = setInterval(() => {
|
||||||
this.showTime();
|
this.showTime();
|
||||||
}, 1000);
|
}, 1000);
|
||||||
that.$API.system.dept.list.req({name:that.deptName,page:0}).then((res) => {
|
that.getMgroups();
|
||||||
if(res.length > 0){
|
//设备列表:各个工段的设备列表
|
||||||
that.deptId = res[0].id;
|
that.getEquipment();
|
||||||
that.getMgroups();
|
//每个人日生产量:个人绩效
|
||||||
//设备列表:各个工段的设备列表
|
that.getEveryoneCount();
|
||||||
that.getEquipment();
|
|
||||||
//每个人日生产量:个人绩效
|
|
||||||
that.getEveryoneCount();
|
|
||||||
//车间库存
|
|
||||||
that.getInms();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
//车间整体产品统计
|
//车间整体产品统计
|
||||||
that.materialAll();
|
that.materialAll();
|
||||||
|
//车间各工段生产产品数
|
||||||
|
that.getmgroupMaterial();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getMondayOfCurrentWeek() {
|
getMondayOfCurrentWeek() {
|
||||||
|
|
@ -482,13 +477,12 @@ export default {
|
||||||
that.$API.mtm.mgroup.list.req({belong_dept__name:that.deptName,page:0}).then((res) => {
|
that.$API.mtm.mgroup.list.req({belong_dept__name:that.deptName,page:0}).then((res) => {
|
||||||
if(res.length > 0){
|
if(res.length > 0){
|
||||||
res.forEach((item)=>{
|
res.forEach((item)=>{
|
||||||
that.mgroupsId += item.id + ',';
|
that.mgroupsId += item.id + ',';
|
||||||
let obj = {};
|
let obj = {};
|
||||||
obj.name = item.name;
|
obj.name = item.name;
|
||||||
obj.value = 0;
|
obj.value = 0;
|
||||||
that.config_left1.data.push(obj);
|
that.config_left1.data.push(obj);
|
||||||
that.getmgroupMaterial();
|
that.getInms(item);
|
||||||
that.getInms(item);
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -514,10 +508,16 @@ export default {
|
||||||
//车间各工段生产产品数
|
//车间各工段生产产品数
|
||||||
getmgroupMaterial() {
|
getmgroupMaterial() {
|
||||||
let that = this;
|
let that = this;
|
||||||
let date = that.$TOOL.dateFormat(new Date(), "yyyy-MM-dd");
|
let date = new Date();
|
||||||
|
let year = date.getFullYear();
|
||||||
|
let month = date.getMonth() + 1;
|
||||||
|
month = month < 10 ? "0" + month : month;
|
||||||
|
let days = new Date(year, month, 0).getDate();
|
||||||
|
let start_date = year + "-" + month + "-01";
|
||||||
|
let end_date = year + "-" + month + "-" + days;
|
||||||
|
// let date = that.$TOOL.dateFormat(new Date(), "yyyy-MM-dd");
|
||||||
let params = {
|
let params = {
|
||||||
// query: {start_date:date,end_date:date,mgroup_name:item.name},
|
query: {start_date:start_date,end_date:end_date,dept_name:that.deptName},
|
||||||
query: {start_date:date,end_date:date,dept_name:that.deptName},
|
|
||||||
};
|
};
|
||||||
this.$API.bi.dataset.exec.req("mlog_okrate", params).then((res) => {
|
this.$API.bi.dataset.exec.req("mlog_okrate", params).then((res) => {
|
||||||
if(res.data2.ds0.length>0){
|
if(res.data2.ds0.length>0){
|
||||||
|
|
@ -536,8 +536,8 @@ export default {
|
||||||
getEquipment() {
|
getEquipment() {
|
||||||
let that = this;
|
let that = this;
|
||||||
let params = {
|
let params = {
|
||||||
page: 0, belong_dept:that.deptId,
|
page: 0, belong_dept__name:that.deptName,
|
||||||
// query: " { id, name, number, model, state ,mgroup_name }"
|
query: " { id, name, number, model, state ,mgroup_name,running_state }"
|
||||||
};
|
};
|
||||||
that.config_middle_bottom.data = [];
|
that.config_middle_bottom.data = [];
|
||||||
that.$API.em.equipment.list.req(params).then((res) => {
|
that.$API.em.equipment.list.req(params).then((res) => {
|
||||||
|
|
@ -563,7 +563,6 @@ export default {
|
||||||
let date = that.$TOOL.dateFormat(new Date(), "yyyy-MM-dd");
|
let date = that.$TOOL.dateFormat(new Date(), "yyyy-MM-dd");
|
||||||
let params = {
|
let params = {
|
||||||
query: {start_date:date,end_date:date,dept_name:that.deptName},
|
query: {start_date:date,end_date:date,dept_name:that.deptName},
|
||||||
// query: {start_date:'2025-05-04',end_date:'2025-05-04',dept_name:that.deptName},
|
|
||||||
};
|
};
|
||||||
this.$API.bi.dataset.exec.req("performance", params).then((res) => {
|
this.$API.bi.dataset.exec.req("performance", params).then((res) => {
|
||||||
if(res.data2.ds0.length>0){
|
if(res.data2.ds0.length>0){
|
||||||
|
|
@ -619,28 +618,6 @@ export default {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//任务进度
|
|
||||||
getMtask1() {
|
|
||||||
let that = this;
|
|
||||||
let params = {
|
|
||||||
state: 20,mgroup__belong_dept: that.deptId,page:0,
|
|
||||||
query: " { id, material_out_name, number, count, count_ok }"
|
|
||||||
};
|
|
||||||
that.config_middle_top.data = [];
|
|
||||||
that.$API.pm.mtask.list.req(params).then((res) => {
|
|
||||||
if(res.length>0){
|
|
||||||
res.forEach((item) => {
|
|
||||||
let arr = [];
|
|
||||||
arr[0] = item.number;
|
|
||||||
arr[1] = item.material_out_name;
|
|
||||||
arr[2] = item.count;
|
|
||||||
arr[3] = item.count_ok;
|
|
||||||
// arr[4] = item.count_ok/item.count*100+'%';
|
|
||||||
that.config_middle_top.data.push(arr);
|
|
||||||
})
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,7 @@
|
||||||
</el-row>
|
</el-row>
|
||||||
<div style="height: 34vh;position: relative;">
|
<div style="height: 34vh;position: relative;">
|
||||||
<dv-border-box-1>
|
<dv-border-box-1>
|
||||||
<div class="chartBlockTitle">车间各工段生产产品数</div>
|
<div class="chartBlockTitle">本月各工段生产产品数</div>
|
||||||
<dv-capsule-chart :config="config_left1" class="leftChartBlock1"/>
|
<dv-capsule-chart :config="config_left1" class="leftChartBlock1"/>
|
||||||
</dv-border-box-1>
|
</dv-border-box-1>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -392,7 +392,7 @@ export default {
|
||||||
headerBGC: 'rgba(47,102,107,.34)',
|
headerBGC: 'rgba(47,102,107,.34)',
|
||||||
oddRowBGC: 'rgba(0,0,0,0)',
|
oddRowBGC: 'rgba(0,0,0,0)',
|
||||||
evenRowBGC: 'rgba(0,0,0,0)',
|
evenRowBGC: 'rgba(0,0,0,0)',
|
||||||
header:['批次号','物料名称', '当前工序', '状态', '数量'],
|
header:['批次号','物料名称', '当前工序', '当前状态', '当前数量'],
|
||||||
data: []
|
data: []
|
||||||
},
|
},
|
||||||
config_middle_bottom:{
|
config_middle_bottom:{
|
||||||
|
|
@ -425,18 +425,11 @@ export default {
|
||||||
this.dayInterval = setInterval(() => {
|
this.dayInterval = setInterval(() => {
|
||||||
this.showTime();
|
this.showTime();
|
||||||
}, 1000);
|
}, 1000);
|
||||||
that.$API.system.dept.list.req({name:that.deptName,page:0}).then((res) => {
|
that.getMgroups();
|
||||||
if(res.length > 0){
|
//设备列表:各个工段的设备列表
|
||||||
that.deptId = res[0].id;
|
that.getEquipment();
|
||||||
that.getMgroups();
|
//每个人日生产量:个人绩效
|
||||||
//设备列表:各个工段的设备列表
|
that.getEveryoneCount();
|
||||||
that.getEquipment();
|
|
||||||
//每个人日生产量:个人绩效
|
|
||||||
that.getEveryoneCount();
|
|
||||||
//车间库存
|
|
||||||
that.getInms();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
//车间整体产品统计
|
//车间整体产品统计
|
||||||
that.materialAll();
|
that.materialAll();
|
||||||
},
|
},
|
||||||
|
|
@ -515,10 +508,16 @@ export default {
|
||||||
//车间各工段生产产品数
|
//车间各工段生产产品数
|
||||||
getmgroupMaterial() {
|
getmgroupMaterial() {
|
||||||
let that = this;
|
let that = this;
|
||||||
let date = that.$TOOL.dateFormat(new Date(), "yyyy-MM-dd");
|
let date = new Date();
|
||||||
|
let year = date.getFullYear();
|
||||||
|
let month = date.getMonth() + 1;
|
||||||
|
month = month < 10 ? "0" + month : month;
|
||||||
|
let days = new Date(year, month, 0).getDate();
|
||||||
|
let start_date = year + "-" + month + "-01";
|
||||||
|
let end_date = year + "-" + month + "-" + days;
|
||||||
|
// let date = that.$TOOL.dateFormat(new Date(), "yyyy-MM-dd");
|
||||||
let params = {
|
let params = {
|
||||||
// query: {start_date:date,end_date:date,mgroup_name:item.name},
|
query: {start_date:start_date,end_date:end_date,dept_name:that.deptName},
|
||||||
query: {start_date:date,end_date:date,dept_name:that.deptName},
|
|
||||||
};
|
};
|
||||||
this.$API.bi.dataset.exec.req("mlog_okrate", params).then((res) => {
|
this.$API.bi.dataset.exec.req("mlog_okrate", params).then((res) => {
|
||||||
if(res.data2.ds0.length>0){
|
if(res.data2.ds0.length>0){
|
||||||
|
|
@ -537,8 +536,8 @@ export default {
|
||||||
getEquipment() {
|
getEquipment() {
|
||||||
let that = this;
|
let that = this;
|
||||||
let params = {
|
let params = {
|
||||||
page: 0, belong_dept:that.deptId,
|
page: 0, belong_dept__name:that.deptName,
|
||||||
// query: " { id, name, number, model, state ,mgroup_name }"
|
query: " { id, name, number, model, state ,mgroup_name,running_state }"
|
||||||
};
|
};
|
||||||
that.config_middle_bottom.data = [];
|
that.config_middle_bottom.data = [];
|
||||||
that.$API.em.equipment.list.req(params).then((res) => {
|
that.$API.em.equipment.list.req(params).then((res) => {
|
||||||
|
|
@ -563,8 +562,8 @@ export default {
|
||||||
that.config_right_top.data = [];
|
that.config_right_top.data = [];
|
||||||
let date = that.$TOOL.dateFormat(new Date(), "yyyy-MM-dd");
|
let date = that.$TOOL.dateFormat(new Date(), "yyyy-MM-dd");
|
||||||
let params = {
|
let params = {
|
||||||
// query: {start_date:date,end_date:date,dept_name:that.deptName},
|
query: {start_date:date,end_date:date,dept_name:that.deptName},
|
||||||
query: {start_date:'2025-05-04',end_date:'2025-05-04',dept_name:that.deptName},
|
// query: {start_date:'2025-05-04',end_date:'2025-05-04',dept_name:that.deptName},
|
||||||
};
|
};
|
||||||
this.$API.bi.dataset.exec.req("performance", params).then((res) => {
|
this.$API.bi.dataset.exec.req("performance", params).then((res) => {
|
||||||
if(res.data2.ds0.length>0){
|
if(res.data2.ds0.length>0){
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue