|
@@ -225,7 +225,26 @@ var ServiceProduct = {
|
|
|
// var map=MethodGetService.methodGet("/fbsAbnormalWorkingHours/fbsAbnormalWorkingHoursDescribe/getMonthExceptionByCategory")
|
|
|
var list=MethodGetService.methodGet("/fbsAbnormalWorkingHours/fbsAbnormalWorkingHoursDescribe/getMonthExceptionByCategoryTwo")
|
|
|
|
|
|
+ // if(list&&list.length>0){
|
|
|
+ // var remainingQuantity=3-(list.length%3);
|
|
|
+ // if(remainingQuantity!=3){
|
|
|
+ // for(var i=0;i<remainingQuantity;i++){
|
|
|
+ // var bu="补"+i
|
|
|
+ // list.push({label: bu,sum1:0,sum2:0})
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }else{
|
|
|
+ // list=[
|
|
|
+ // {label:"分类A",sum1: 0,sum2:100},
|
|
|
+ // {label:"分类B",sum1: 0,sum2:100},
|
|
|
+ // {label:"分类C",sum1: 0,sum2:100}
|
|
|
+
|
|
|
+ // ]
|
|
|
+ // }
|
|
|
if(list&&list.length>0){
|
|
|
+ list.forEach(element => {
|
|
|
+ element.sum2=element.sum1
|
|
|
+ });
|
|
|
var remainingQuantity=3-(list.length%3);
|
|
|
if(remainingQuantity!=3){
|
|
|
for(var i=0;i<remainingQuantity;i++){
|
|
@@ -235,9 +254,9 @@ var ServiceProduct = {
|
|
|
}
|
|
|
}else{
|
|
|
list=[
|
|
|
- {label:"分类A",sum1: 0,sum2:100},
|
|
|
- {label:"分类B",sum1: 0,sum2:100},
|
|
|
- {label:"分类C",sum1: 0,sum2:100}
|
|
|
+ {label:"分类A",sum1:0,sum2:0},
|
|
|
+ {label:"分类B",sum1:0,sum2:0},
|
|
|
+ {label:"分类C",sum1:0,sum2:0}
|
|
|
|
|
|
]
|
|
|
}
|
|
@@ -278,28 +297,39 @@ var ServiceProduct = {
|
|
|
getProduceRate: function () {
|
|
|
// const rate = 95;
|
|
|
// rate=MethodGetService.methodGet("/fbsWorkshopDispatchList/fbsWorkshopDispatchList/getProductionEfficiency");
|
|
|
- var listOfData=MethodGetService.methodGet("/fbsWorkshopDispatchList/fbsWorkshopDispatchList/getSumDispatchReport?def1=1");
|
|
|
- var productivityTotal=0
|
|
|
- listOfData.forEach(element => {
|
|
|
- let standardWorkingHoursActualTotal=element.standardWorkingHoursActualTotal;//实际标准工时
|
|
|
- let manHoursCompletedTotal=element.manHoursCompletedTotal;//完成工时
|
|
|
- if(element.projectName==="统计"){
|
|
|
- productivityTotal=((Number(standardWorkingHoursActualTotal)/Number(manHoursCompletedTotal))*100).toFixed(1)
|
|
|
- }
|
|
|
- });
|
|
|
+ // var listOfData=MethodGetService.methodGet("/fbsWorkshopDispatchList/fbsWorkshopDispatchList/getSumDispatchReport?def1=1");
|
|
|
+ // var productivityTotal=0
|
|
|
+ // listOfData.forEach(element => {
|
|
|
+ // let standardWorkingHoursActualTotal=element.standardWorkingHoursActualTotal;//实际标准工时
|
|
|
+ // let manHoursCompletedTotal=element.manHoursCompletedTotal;//完成工时
|
|
|
+ // if(element.projectName==="统计"){
|
|
|
+ // productivityTotal=((Number(standardWorkingHoursActualTotal)/Number(manHoursCompletedTotal))*100).toFixed(1)
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // return {
|
|
|
+ // name: "当月生产效率",
|
|
|
+ // value: productivityTotal
|
|
|
+ // };
|
|
|
+
|
|
|
+
|
|
|
+ var produceRate=MethodGetService.methodGet("/fbsWorkshopDispatchList/fbsWorkshopDispatchList/getProduceRateTotal");
|
|
|
return {
|
|
|
name: "当月生产效率",
|
|
|
- value: productivityTotal
|
|
|
+ value: produceRate
|
|
|
};
|
|
|
-
|
|
|
},
|
|
|
// 日生产效率
|
|
|
getDayProduceRate: function () {
|
|
|
// const rate = 90;
|
|
|
- rate=MethodGetService.methodGet("/fbsWorkshopDispatchList/fbsWorkshopDispatchList/getProductionEfficiency?type=1");
|
|
|
+ // rate=MethodGetService.methodGet("/fbsWorkshopDispatchList/fbsWorkshopDispatchList/getProductionEfficiency?type=1");
|
|
|
+ // return {
|
|
|
+ // name: "生产效率",
|
|
|
+ // value: rate
|
|
|
+ // };
|
|
|
+ var produceRate=MethodGetService.methodGet("/fbsWorkshopDispatchList/fbsWorkshopDispatchList/getProduceRateTotal");
|
|
|
return {
|
|
|
name: "生产效率",
|
|
|
- value: rate
|
|
|
+ value: produceRate
|
|
|
};
|
|
|
|
|
|
},
|