Commit e2414e39 authored by xxx's avatar xxx

修改

parent 9020a08d
......@@ -2518,13 +2518,24 @@ var HttpReq = function(){
params:param,
})
},
//大屏组件7接口
apiManmadesChanjiedanYearQuery: function(param){
return request({
url: '/api/Manmades/ChanjiedanYear',
method: 'get',
params:param,
})
},
//大屏组件26接口
apiAreaNewBlQuery: function(param){
return request({
url: '/api/AreaNew/Bl',
method: 'get',
params:param,
})
},
},
......
......@@ -196,7 +196,7 @@ export default {
data: [
//value当前进度 + 颜色
{
value: this.truckDynamicListData.rate ? this.truckDynamicListData.rate : 0,
value: this.truckDynamicListData.rate ? (parseFloat(this.truckDynamicListData.rate) > 100 ? 100 : this.truckDynamicListData.rate) : 0,
itemStyle: {
normal: {
color: 'rgb(2,220,251)'
......@@ -205,7 +205,7 @@ export default {
},
//(maxValue进度条最大值 - value当前进度) + 颜色
{
value: maxValue - parseInt(this.truckDynamicListData.rate ? this.truckDynamicListData.rate : 0),
value: maxValue - parseInt(this.truckDynamicListData.rate ? (parseFloat(this.truckDynamicListData.rate) > 100 ? 100 : this.truckDynamicListData.rate) : 0),
itemStyle: {
normal: {
color: 'rgb(0,34,125)'
......
......@@ -119,6 +119,7 @@ export default {
},
yAxis: {
type: 'value',
minInterval: 1,
axisLabel: {
show: true,
textStyle: {
......
......@@ -38,7 +38,17 @@ export default {
HttpReq.truckDispatching.caiquAreaQueryDay({size:6,page:0,sort:'total,desc',createTime:this.currentTime.day}).then((res) => {
let eh2_arr1 = [];
let eh2_arr2 = [];
res.forEach((item)=>{
let transitionData1 = [];
res.forEach((item,index)=>{
if(!item.total){
item.total = 0;
}
transitionData1.push(item)
})
let transitionData2 = transitionData1.sort(function(a,b){
return a.total - b.total;
})
transitionData2.forEach((item)=>{
eh2_arr1.push(item.name);
eh2_arr2.push(item.total);
})
......@@ -52,7 +62,17 @@ export default {
HttpReq.truckDispatching.caiquAreaQueryDay({size:6,page:0,sort:'total,desc',createTime:this.currentTime.day}).then((res) => {
let eh2_arr1 = [];
let eh2_arr2 = [];
res.forEach((item)=>{
let transitionData1 = [];
res.forEach((item,index)=>{
if(!item.total){
item.total = 0;
}
transitionData1.push(item)
})
let transitionData2 = transitionData1.sort(function(a,b){
return a.total - b.total;
})
transitionData2.forEach((item)=>{
eh2_arr1.push(item.name);
eh2_arr2.push(item.total);
})
......@@ -60,7 +80,7 @@ export default {
this.outputRankData.caiquSeriesData = eh2_arr2;
this.echarts2_1Fn();
})
},20000)
},60000)
},
//各采区日产量排名
......
......@@ -35,14 +35,16 @@ export default {
{
name: "矿石",
value: 85,
num1:85,
itemStyle: {
opacity: 0.2,
color: "#8FDFFE",
},
},
{
name: "",
name: "",
value: 15,
num1:15,
itemStyle: {
opacity: 0.2,
color: "#00A8FF",
......@@ -59,23 +61,33 @@ export default {
loadData(){
//矿石产量比
if(this.oreProportionListData.selectTimeText == 'day'){
HttpReq.truckDispatching.screenOreProportionDayQuery().then((res) => {
HttpReq.truckDispatching.apiAreaNewBlQuery().then((res) => {
if(res.code == 200){
if(res.data.totalElements == 0){
if(res.data.length == 0){
this.oreProportionListData.proportionData = this.oreProportionListData.optionData;
}else{
let colorARR = ['#00A8FF','#8FDFFE','#F4F03A','#F5335C','#E68220','#00A8FF','#8FDFFE','#F4F03A','#F5335C','#E68220'];
let centerArray = [];
res.data.content.forEach((item,index)=>{
let a1 = {};
let a2 = {};
a1.name = item.name;
a1.value = item.num;
a2.opacity = 0.2,
a2.color = colorARR[index],
a1.itemStyle = a2;
centerArray.push(a1);
})
//矿石配置
let a1 = {};
let a2 = {};
a1.name = "矿石";
a1.value = res.data[0].kl;
a1.num1 = res.data[0].ks;
a2.opacity = 0.2,
a2.color = colorARR[0],
a1.itemStyle = a2;
centerArray.push(a1);
//废石配置
let a3 = {};
let a4 = {};
a3.name = "废石";
a3.value = res.data[0].fl;
a3.num1 = res.data[0].fs;
a4.opacity = 0.2,
a4.color = colorARR[1],
a3.itemStyle = a4;
centerArray.push(a3);
this.oreProportionListData.proportionData = centerArray;
}
this.echarts5Fn();
......@@ -83,23 +95,33 @@ export default {
})
}
if(this.oreProportionListData.selectTimeText == 'week'){
HttpReq.truckDispatching.screenOreProportionMonthQuery().then((res) => {
HttpReq.truckDispatching.apiAreaNewBlQuery().then((res) => {
if(res.code == 200){
if(res.data.totalElements == 0){
if(res.data.length == 0){
this.oreProportionListData.proportionData = this.oreProportionListData.optionData;
}else{
let colorARR = ['#00A8FF','#8FDFFE','#F4F03A','#F5335C','#E68220','#00A8FF','#8FDFFE','#F4F03A','#F5335C','#E68220'];
let centerArray = [];
res.data.content.forEach((item,index)=>{
let a1 = {};
let a2 = {};
a1.name = item.name;
a1.value = item.num;
a2.opacity = 0.2,
a2.color = colorARR[index],
a1.itemStyle = a2;
centerArray.push(a1);
})
//矿石配置
let a1 = {};
let a2 = {};
a1.name = "矿石";
a1.value = res.data[1].kl;
a1.num1 = res.data[1].ks;
a2.opacity = 0.2,
a2.color = colorARR[0],
a1.itemStyle = a2;
centerArray.push(a1);
//废石配置
let a3 = {};
let a4 = {};
a3.name = "废石";
a3.value = res.data[1].fl;
a3.num1 = res.data[1].fs;
a4.opacity = 0.2,
a4.color = colorARR[1],
a3.itemStyle = a4;
centerArray.push(a3);
this.oreProportionListData.proportionData = centerArray;
}
this.echarts5Fn();
......@@ -107,23 +129,33 @@ export default {
})
}
if(this.oreProportionListData.selectTimeText == 'month'){
HttpReq.truckDispatching.screenOreProportionYearQuery().then((res) => {
HttpReq.truckDispatching.apiAreaNewBlQuery().then((res) => {
if(res.code == 200){
if(res.data.totalElements == 0){
if(res.data.length == 0){
this.oreProportionListData.proportionData = this.oreProportionListData.optionData;
}else{
let colorARR = ['#00A8FF','#8FDFFE','#F4F03A','#F5335C','#E68220','#00A8FF','#8FDFFE','#F4F03A','#F5335C','#E68220'];
let centerArray = [];
res.data.content.forEach((item,index)=>{
let a1 = {};
let a2 = {};
a1.name = item.name;
a1.value = item.num;
a2.opacity = 0.2,
a2.color = colorARR[index],
a1.itemStyle = a2;
centerArray.push(a1);
})
//矿石配置
let a1 = {};
let a2 = {};
a1.name = "矿石";
a1.value = res.data[2].kl;
a1.num1 = res.data[2].ks;
a2.opacity = 0.2,
a2.color = colorARR[0],
a1.itemStyle = a2;
centerArray.push(a1);
//废石配置
let a3 = {};
let a4 = {};
a3.name = "废石";
a3.value = res.data[2].fl;
a3.num1 = res.data[2].fs;
a4.opacity = 0.2,
a4.color = colorARR[1],
a3.itemStyle = a4;
centerArray.push(a3);
this.oreProportionListData.proportionData = centerArray;
}
this.echarts5Fn();
......@@ -134,23 +166,33 @@ export default {
this.DPcomputer26BoxTimer = setInterval(() => {
//矿石产量比
if(this.oreProportionListData.selectTimeText == 'day'){
HttpReq.truckDispatching.screenOreProportionDayQuery().then((res) => {
HttpReq.truckDispatching.apiAreaNewBlQuery().then((res) => {
if(res.code == 200){
if(res.data.totalElements == 0){
if(res.data.length == 0){
this.oreProportionListData.proportionData = this.oreProportionListData.optionData;
}else{
let colorARR = ['#00A8FF','#8FDFFE','#F4F03A','#F5335C','#E68220','#00A8FF','#8FDFFE','#F4F03A','#F5335C','#E68220'];
let centerArray = [];
res.data.content.forEach((item,index)=>{
let a1 = {};
let a2 = {};
a1.name = item.name;
a1.value = item.num;
a2.opacity = 0.2,
a2.color = colorARR[index],
a1.itemStyle = a2;
centerArray.push(a1);
})
//矿石配置
let a1 = {};
let a2 = {};
a1.name = "矿石";
a1.value = res.data[0].kl;
a1.num1 = res.data[0].ks;
a2.opacity = 0.2,
a2.color = colorARR[0],
a1.itemStyle = a2;
centerArray.push(a1);
//废石配置
let a3 = {};
let a4 = {};
a3.name = "废石";
a3.value = res.data[0].fl;
a3.num1 = res.data[0].fs;
a4.opacity = 0.2,
a4.color = colorARR[1],
a3.itemStyle = a4;
centerArray.push(a3);
this.oreProportionListData.proportionData = centerArray;
}
this.echarts5Fn();
......@@ -158,23 +200,33 @@ export default {
})
}
if(this.oreProportionListData.selectTimeText == 'week'){
HttpReq.truckDispatching.screenOreProportionMonthQuery().then((res) => {
HttpReq.truckDispatching.apiAreaNewBlQuery().then((res) => {
if(res.code == 200){
if(res.data.totalElements == 0){
if(res.data.length == 0){
this.oreProportionListData.proportionData = this.oreProportionListData.optionData;
}else{
let colorARR = ['#00A8FF','#8FDFFE','#F4F03A','#F5335C','#E68220','#00A8FF','#8FDFFE','#F4F03A','#F5335C','#E68220'];
let centerArray = [];
res.data.content.forEach((item,index)=>{
let a1 = {};
let a2 = {};
a1.name = item.name;
a1.value = item.num;
a2.opacity = 0.2,
a2.color = colorARR[index],
a1.itemStyle = a2;
centerArray.push(a1);
})
//矿石配置
let a1 = {};
let a2 = {};
a1.name = "矿石";
a1.value = res.data[1].kl;
a1.num1 = res.data[1].ks;
a2.opacity = 0.2,
a2.color = colorARR[0],
a1.itemStyle = a2;
centerArray.push(a1);
//废石配置
let a3 = {};
let a4 = {};
a3.name = "废石";
a3.value = res.data[1].fl;
a3.num1 = res.data[1].fs;
a4.opacity = 0.2,
a4.color = colorARR[1],
a3.itemStyle = a4;
centerArray.push(a3);
this.oreProportionListData.proportionData = centerArray;
}
this.echarts5Fn();
......@@ -182,106 +234,147 @@ export default {
})
}
if(this.oreProportionListData.selectTimeText == 'month'){
HttpReq.truckDispatching.screenOreProportionYearQuery().then((res) => {
HttpReq.truckDispatching.apiAreaNewBlQuery().then((res) => {
if(res.code == 200){
if(res.data.totalElements == 0){
if(res.data.length == 0){
this.oreProportionListData.proportionData = this.oreProportionListData.optionData;
}else{
let colorARR = ['#00A8FF','#8FDFFE','#F4F03A','#F5335C','#E68220','#00A8FF','#8FDFFE','#F4F03A','#F5335C','#E68220'];
let centerArray = [];
res.data.content.forEach((item,index)=>{
let a1 = {};
let a2 = {};
a1.name = item.name;
a1.value = item.num;
a2.opacity = 0.2,
a2.color = colorARR[index],
a1.itemStyle = a2;
centerArray.push(a1);
})
//矿石配置
let a1 = {};
let a2 = {};
a1.name = "矿石";
a1.value = res.data[2].kl;
a1.num1 = res.data[2].ks;
a2.opacity = 0.2,
a2.color = colorARR[0],
a1.itemStyle = a2;
centerArray.push(a1);
//废石配置
let a3 = {};
let a4 = {};
a3.name = "废石";
a3.value = res.data[2].fl;
a3.num1 = res.data[2].fs;
a4.opacity = 0.2,
a4.color = colorARR[1],
a3.itemStyle = a4;
centerArray.push(a3);
this.oreProportionListData.proportionData = centerArray;
}
this.echarts5Fn();
}
})
}
},20000)
},60000)
},
//矿石产量比切换
oreProportionChangeTime(text){
this.oreProportionListData.selectTimeText = text;
if(text == 'day'){
HttpReq.truckDispatching.screenOreProportionDayQuery().then((res) => {
//矿石产量比
if(this.oreProportionListData.selectTimeText == 'day'){
HttpReq.truckDispatching.apiAreaNewBlQuery().then((res) => {
if(res.code == 200){
if(res.data.totalElements == 0){
if(res.data.length == 0){
this.oreProportionListData.proportionData = this.oreProportionListData.optionData;
}else{
let colorARR = ['#00A8FF','#8FDFFE','#F4F03A','#F5335C','#E68220','#00A8FF','#8FDFFE','#F4F03A','#F5335C','#E68220'];
let centerArray = [];
res.data.content.forEach((item,index)=>{
let a1 = {};
let a2 = {};
a1.name = item.name;
a1.value = item.num;
a2.opacity = 0.2,
a2.color = colorARR[index],
a1.itemStyle = a2;
centerArray.push(a1);
})
//矿石配置
let a1 = {};
let a2 = {};
a1.name = "矿石";
a1.value = res.data[0].kl;
a1.num1 = res.data[0].ks;
a2.opacity = 0.2,
a2.color = colorARR[0],
a1.itemStyle = a2;
centerArray.push(a1);
//废石配置
let a3 = {};
let a4 = {};
a3.name = "废石";
a3.value = res.data[0].fl;
a3.num1 = res.data[0].fs;
a4.opacity = 0.2,
a4.color = colorARR[1],
a3.itemStyle = a4;
centerArray.push(a3);
this.oreProportionListData.proportionData = centerArray;
}
this.echarts5Fn();
}
})
}
if(text == 'week'){
HttpReq.truckDispatching.screenOreProportionMonthQuery().then((res) => {
if(res.code == 200){
if(res.data.totalElements == 0){
if(this.oreProportionListData.selectTimeText == 'week'){
HttpReq.truckDispatching.apiAreaNewBlQuery().then((res) => {
if(res.code == 200){
if(res.data.length == 0){
this.oreProportionListData.proportionData = this.oreProportionListData.optionData;
}else{
let colorARR = ['#00A8FF','#8FDFFE','#F4F03A','#F5335C','#E68220','#00A8FF','#8FDFFE','#F4F03A','#F5335C','#E68220'];
let centerArray = [];
res.data.content.forEach((item,index)=>{
let a1 = {};
let a2 = {};
a1.name = item.name;
a1.value = item.num;
a2.opacity = 0.2,
a2.color = colorARR[index],
a1.itemStyle = a2;
centerArray.push(a1);
})
//矿石配置
let a1 = {};
let a2 = {};
a1.name = "矿石";
a1.value = res.data[1].kl;
a1.num1 = res.data[1].ks;
a2.opacity = 0.2,
a2.color = colorARR[0],
a1.itemStyle = a2;
centerArray.push(a1);
//废石配置
let a3 = {};
let a4 = {};
a3.name = "废石";
a3.value = res.data[1].fl;
a3.num1 = res.data[1].fs;
a4.opacity = 0.2,
a4.color = colorARR[1],
a3.itemStyle = a4;
centerArray.push(a3);
this.oreProportionListData.proportionData = centerArray;
}
this.echarts5Fn();
}
})
})
}
if(text == 'month'){
HttpReq.truckDispatching.screenOreProportionYearQuery().then((res) => {
if(res.code == 200){
if(res.data.totalElements == 0){
if(this.oreProportionListData.selectTimeText == 'month'){
HttpReq.truckDispatching.apiAreaNewBlQuery().then((res) => {
if(res.code == 200){
if(res.data.length == 0){
this.oreProportionListData.proportionData = this.oreProportionListData.optionData;
}else{
let colorARR = ['#00A8FF','#8FDFFE','#F4F03A','#F5335C','#E68220','#00A8FF','#8FDFFE','#F4F03A','#F5335C','#E68220'];
let centerArray = [];
res.data.content.forEach((item,index)=>{
let a1 = {};
let a2 = {};
a1.name = item.name;
a1.value = item.num;
a2.opacity = 0.2,
a2.color = colorARR[index],
a1.itemStyle = a2;
centerArray.push(a1);
})
//矿石配置
let a1 = {};
let a2 = {};
a1.name = "矿石";
a1.value = res.data[2].kl;
a1.num1 = res.data[2].ks;
a2.opacity = 0.2,
a2.color = colorARR[0],
a1.itemStyle = a2;
centerArray.push(a1);
//废石配置
let a3 = {};
let a4 = {};
a3.name = "废石";
a3.value = res.data[2].fl;
a3.num1 = res.data[2].fs;
a4.opacity = 0.2,
a4.color = colorARR[1],
a3.itemStyle = a4;
centerArray.push(a3);
this.oreProportionListData.proportionData = centerArray;
}
this.echarts5Fn();
}
})
})
}
},
echarts5Fn(){
......@@ -321,7 +414,8 @@ export default {
grid3D: {
show: false, //是否显示三维笛卡尔坐标系。
boxHeight: 20, //三维笛卡尔坐标系在三维场景中的高度
top: "1%",
top: "-5%",
left:"5%",
// bottom: "80%",
// environment: "#021041", //背景
viewControl: {
......@@ -349,12 +443,12 @@ export default {
// formatter: "{b}\n\n",
// padding: [0, -40],
formatter: (item) => {
return item.data.name + ":" + item.data.value + "%" + "";
return item.data.name + ":" + item.data.num1 + "";
},
},
labelLine: {
length: 50,
length2: 30,
length: 40,
length2: 10,
lineStyle: {
color: "#ffffff",
width: 1.5,
......@@ -363,12 +457,13 @@ export default {
startAngle: 350, //起始角度,支持范围[0, 360]。 //重要
clockwise: false, //饼图的扇区是否是顺时针排布。上述这两项配置主要是为了对齐3d的样式
radius: ["25%", "50%"],
center: ["50%", "50%"],
center: ["50%", "60%"],
data: this.oreProportionListData.proportionData,
itemStyle: {
opacity: 0,
},
top: "10%",
top: "-5%",
left:"5%",
avoidLabelOverlap: true, //防止标签重叠
});
chartPanel.setOption(option);
......
......@@ -69,35 +69,23 @@ export default {
let allTime1 = 0;
let allEffic1 = 0;
let num1 = 0;
let allTime2 = 0;
let allEffic2 = 0;
let num2 = 0;
let allTime3 = 0;
let allEffic3 = 0;
let num3 = 0;
res.data.forEach((item1,index1)=>{
if(item1.carclass == '卡车'){
allTime1 = allTime1 + parseFloat(item1.time);
allEffic1 = allEffic1 + (item1.effic ? parseFloat(item1.effic) : 0);
num1++;
}else if(item1.carclass == '铲车'){
allTime2 = allTime2 + parseFloat(item1.time);
allEffic2 = allEffic2 + (item1.effic ? parseFloat(item1.effic) : 0);
num2++;
}else{
allTime3 = allTime3 + parseFloat(item1.time);
allEffic3 = allEffic3 + (item1.effic ? parseFloat(item1.effic) : 0);
num3++;
}
});
this.carWorkTimeData.listData[0].gongshi = allTime1;
this.carWorkTimeData.listData[0].xianzhi = allEffic1 ? (100 - parseFloat(allEffic1 / num1)).toFixed(2) : 100;
this.carWorkTimeData.listData[1].gongshi = allTime2;
this.carWorkTimeData.listData[1].xianzhi = allEffic2 ? (100 - parseFloat(allEffic2 / num2)).toFixed(2) : 100;
this.carWorkTimeData.listData[2].gongshi = allTime3;
this.carWorkTimeData.listData[2].xianzhi = allEffic3 ? (100 - parseFloat(allEffic3 / num3)).toFixed(2) : 100;
}
})
HttpReq.truckDispatching.apiManmadesChanjiedanYearQuery().then((res) => {
this.carWorkTimeData.listData[1].gongshi = (res[0].time ? res[0].time : 0);
this.carWorkTimeData.listData[1].xianzhi = (res[0].lv ? ((parseFloat(res[0].lv) * 100) > 100 ? 100 : (parseFloat(res[0].lv) * 100).toFixed(2)) : 0);
this.carWorkTimeData.listData[2].gongshi = (res[3].time ? res[3].time : 0);
this.carWorkTimeData.listData[2].xianzhi = (res[3].lv ? ((parseFloat(res[3].lv) * 100) > 100 ? 100 : (parseFloat(res[3].lv) * 100).toFixed(2)) : 0);
})
}
if(this.carWorkTimeData.selectTimeText == 'month'){
this.carWorkTimeData.selectTimeDate = this.currentTime.month;
......@@ -106,35 +94,23 @@ export default {
let allTime1 = 0;
let allEffic1 = 0;
let num1 = 0;
let allTime2 = 0;
let allEffic2 = 0;
let num2 = 0;
let allTime3 = 0;
let allEffic3 = 0;
let num3 = 0;
res.data.forEach((item1,index1)=>{
if(item1.carclass == '卡车'){
allTime1 = allTime1 + parseFloat(item1.time);
allEffic1 = allEffic1 + (item1.effic ? parseFloat(item1.effic) : 0);
num1++;
}else if(item1.carclass == '铲车'){
allTime2 = allTime2 + parseFloat(item1.time);
allEffic2 = allEffic2 + (item1.effic ? parseFloat(item1.effic) : 0);
num2++;
}else{
allTime3 = allTime3 + parseFloat(item1.time);
allEffic3 = allEffic3 + (item1.effic ? parseFloat(item1.effic) : 0);
num3++;
}
});
this.carWorkTimeData.listData[0].gongshi = allTime1;
this.carWorkTimeData.listData[0].xianzhi = allEffic1 ? (100 - parseFloat(allEffic1 / num1)).toFixed(2) : 100;
this.carWorkTimeData.listData[1].gongshi = allTime2;
this.carWorkTimeData.listData[1].xianzhi = allEffic2 ? (100 - parseFloat(allEffic2 / num2)).toFixed(2) : 100;
this.carWorkTimeData.listData[2].gongshi = allTime3;
this.carWorkTimeData.listData[2].xianzhi = allEffic3 ? (100 - parseFloat(allEffic3 / num3)).toFixed(2) : 100;
}
})
HttpReq.truckDispatching.apiManmadesChanjiedanYearQuery().then((res) => {
this.carWorkTimeData.listData[1].gongshi = (res[1].time ? res[1].time : 0);
this.carWorkTimeData.listData[1].xianzhi = (res[1].lv ? ((parseFloat(res[1].lv) * 100) > 100 ? 100 : (parseFloat(res[1].lv) * 100).toFixed(2)) : 0);
this.carWorkTimeData.listData[2].gongshi = (res[4].time ? res[4].time : 0);
this.carWorkTimeData.listData[2].xianzhi = (res[4].lv ? ((parseFloat(res[4].lv) * 100) > 100 ? 100 : (parseFloat(res[4].lv) * 100).toFixed(2)) : 0);
})
}
if(this.carWorkTimeData.selectTimeText == 'year'){
this.carWorkTimeData.selectTimeDate = this.currentTime.year;
......@@ -143,35 +119,23 @@ export default {
let allTime1 = 0;
let allEffic1 = 0;
let num1 = 0;
let allTime2 = 0;
let allEffic2 = 0;
let num2 = 0;
let allTime3 = 0;
let allEffic3 = 0;
let num3 = 0;
res.data.forEach((item1,index1)=>{
if(item1.carclass == '卡车'){
allTime1 = allTime1 + parseFloat(item1.time);
allEffic1 = allEffic1 + (item1.effic ? parseFloat(item1.effic) : 0);
num1++;
}else if(item1.carclass == '铲车'){
allTime2 = allTime2 + parseFloat(item1.time);
allEffic2 = allEffic2 + (item1.effic ? parseFloat(item1.effic) : 0);
num2++;
}else{
allTime3 = allTime3 + parseFloat(item1.time);
allEffic3 = allEffic3 + (item1.effic ? parseFloat(item1.effic) : 0);
num3++;
}
});
this.carWorkTimeData.listData[0].gongshi = allTime1;
this.carWorkTimeData.listData[0].xianzhi = allEffic1 ? (100 - parseFloat(allEffic1 / num1)).toFixed(2) : 100;
this.carWorkTimeData.listData[1].gongshi = allTime2;
this.carWorkTimeData.listData[1].xianzhi = allEffic2 ? (100 - parseFloat(allEffic2 / num2)).toFixed(2) : 100;
this.carWorkTimeData.listData[2].gongshi = allTime3;
this.carWorkTimeData.listData[2].xianzhi = allEffic3 ? (100 - parseFloat(allEffic3 / num3)).toFixed(2) : 100;
}
})
HttpReq.truckDispatching.apiManmadesChanjiedanYearQuery().then((res) => {
this.carWorkTimeData.listData[1].gongshi = (res[2].time ? res[2].time : 0);
this.carWorkTimeData.listData[1].xianzhi = (res[2].lv ? ((parseFloat(res[2].lv) * 100) > 100 ? 100 : (parseFloat(res[2].lv) * 100).toFixed(2)) : 0);
this.carWorkTimeData.listData[2].gongshi = (res[5].time ? res[5].time : 0);
this.carWorkTimeData.listData[2].xianzhi = (res[5].lv ? ((parseFloat(res[5].lv) * 100) > 100 ? 100 : (parseFloat(res[5].lv) * 100).toFixed(2)) : 0);
})
}
this.DPcomputer7BoxTimer = setInterval(() => {
......@@ -183,35 +147,23 @@ export default {
let allTime1 = 0;
let allEffic1 = 0;
let num1 = 0;
let allTime2 = 0;
let allEffic2 = 0;
let num2 = 0;
let allTime3 = 0;
let allEffic3 = 0;
let num3 = 0;
res.data.forEach((item1,index1)=>{
if(item1.carclass == '卡车'){
allTime1 = allTime1 + parseFloat(item1.time);
allEffic1 = allEffic1 + (item1.effic ? parseFloat(item1.effic) : 0);
num1++;
}else if(item1.carclass == '铲车'){
allTime2 = allTime2 + parseFloat(item1.time);
allEffic2 = allEffic2 + (item1.effic ? parseFloat(item1.effic) : 0);
num2++;
}else{
allTime3 = allTime3 + parseFloat(item1.time);
allEffic3 = allEffic3 + (item1.effic ? parseFloat(item1.effic) : 0);
num3++;
}
});
this.carWorkTimeData.listData[0].gongshi = allTime1;
this.carWorkTimeData.listData[0].xianzhi = allEffic1 ? (100 - parseFloat(allEffic1 / num1)).toFixed(2) : 100;
this.carWorkTimeData.listData[1].gongshi = allTime2;
this.carWorkTimeData.listData[1].xianzhi = allEffic2 ? (100 - parseFloat(allEffic2 / num2)).toFixed(2) : 100;
this.carWorkTimeData.listData[2].gongshi = allTime3;
this.carWorkTimeData.listData[2].xianzhi = allEffic3 ? (100 - parseFloat(allEffic3 / num3)).toFixed(2) : 100;
}
})
HttpReq.truckDispatching.apiManmadesChanjiedanYearQuery().then((res) => {
this.carWorkTimeData.listData[1].gongshi = (res[0].time ? res[0].time : 0);
this.carWorkTimeData.listData[1].xianzhi = (res[0].lv ? ((parseFloat(res[0].lv) * 100) > 100 ? 100 : (parseFloat(res[0].lv) * 100).toFixed(2)) : 0);
this.carWorkTimeData.listData[2].gongshi = (res[3].time ? res[3].time : 0);
this.carWorkTimeData.listData[2].xianzhi = (res[3].lv ? ((parseFloat(res[3].lv) * 100) > 100 ? 100 : (parseFloat(res[3].lv) * 100).toFixed(2)) : 0);
})
}
if(this.carWorkTimeData.selectTimeText == 'month'){
this.carWorkTimeData.selectTimeDate = this.currentTime.month;
......@@ -220,35 +172,23 @@ export default {
let allTime1 = 0;
let allEffic1 = 0;
let num1 = 0;
let allTime2 = 0;
let allEffic2 = 0;
let num2 = 0;
let allTime3 = 0;
let allEffic3 = 0;
let num3 = 0;
res.data.forEach((item1,index1)=>{
if(item1.carclass == '卡车'){
allTime1 = allTime1 + parseFloat(item1.time);
allEffic1 = allEffic1 + (item1.effic ? parseFloat(item1.effic) : 0);
num1++;
}else if(item1.carclass == '铲车'){
allTime2 = allTime2 + parseFloat(item1.time);
allEffic2 = allEffic2 + (item1.effic ? parseFloat(item1.effic) : 0);
num2++;
}else{
allTime3 = allTime3 + parseFloat(item1.time);
allEffic3 = allEffic3 + (item1.effic ? parseFloat(item1.effic) : 0);
num3++;
}
});
this.carWorkTimeData.listData[0].gongshi = allTime1;
this.carWorkTimeData.listData[0].xianzhi = allEffic1 ? (100 - parseFloat(allEffic1 / num1)).toFixed(2) : 100;
this.carWorkTimeData.listData[1].gongshi = allTime2;
this.carWorkTimeData.listData[1].xianzhi = allEffic2 ? (100 - parseFloat(allEffic2 / num2)).toFixed(2) : 100;
this.carWorkTimeData.listData[2].gongshi = allTime3;
this.carWorkTimeData.listData[2].xianzhi = allEffic3 ? (100 - parseFloat(allEffic3 / num3)).toFixed(2) : 100;
}
})
HttpReq.truckDispatching.apiManmadesChanjiedanYearQuery().then((res) => {
this.carWorkTimeData.listData[1].gongshi = (res[1].time ? res[1].time : 0);
this.carWorkTimeData.listData[1].xianzhi = (res[1].lv ? ((parseFloat(res[1].lv) * 100) > 100 ? 100 : (parseFloat(res[1].lv) * 100).toFixed(2)) : 0);
this.carWorkTimeData.listData[2].gongshi = (res[4].time ? res[4].time : 0);
this.carWorkTimeData.listData[2].xianzhi = (res[4].lv ? ((parseFloat(res[4].lv) * 100) > 100 ? 100 : (parseFloat(res[4].lv) * 100).toFixed(2)) : 0);
})
}
if(this.carWorkTimeData.selectTimeText == 'year'){
this.carWorkTimeData.selectTimeDate = this.currentTime.year;
......@@ -257,37 +197,25 @@ export default {
let allTime1 = 0;
let allEffic1 = 0;
let num1 = 0;
let allTime2 = 0;
let allEffic2 = 0;
let num2 = 0;
let allTime3 = 0;
let allEffic3 = 0;
let num3 = 0;
res.data.forEach((item1,index1)=>{
if(item1.carclass == '卡车'){
allTime1 = allTime1 + parseFloat(item1.time);
allEffic1 = allEffic1 + (item1.effic ? parseFloat(item1.effic) : 0);
num1++;
}else if(item1.carclass == '铲车'){
allTime2 = allTime2 + parseFloat(item1.time);
allEffic2 = allEffic2 + (item1.effic ? parseFloat(item1.effic) : 0);
num2++;
}else{
allTime3 = allTime3 + parseFloat(item1.time);
allEffic3 = allEffic3 + (item1.effic ? parseFloat(item1.effic) : 0);
num3++;
}
});
this.carWorkTimeData.listData[0].gongshi = allTime1;
this.carWorkTimeData.listData[0].xianzhi = allEffic1 ? (100 - parseFloat(allEffic1 / num1)).toFixed(2) : 100;
this.carWorkTimeData.listData[1].gongshi = allTime2;
this.carWorkTimeData.listData[1].xianzhi = allEffic2 ? (100 - parseFloat(allEffic2 / num2)).toFixed(2) : 100;
this.carWorkTimeData.listData[2].gongshi = allTime3;
this.carWorkTimeData.listData[2].xianzhi = allEffic3 ? (100 - parseFloat(allEffic3 / num3)).toFixed(2) : 100;
}
})
HttpReq.truckDispatching.apiManmadesChanjiedanYearQuery().then((res) => {
this.carWorkTimeData.listData[1].gongshi = (res[2].time ? res[2].time : 0);
this.carWorkTimeData.listData[1].xianzhi = (res[2].lv ? ((parseFloat(res[2].lv) * 100) > 100 ? 100 : (parseFloat(res[2].lv) * 100).toFixed(2)) : 0);
this.carWorkTimeData.listData[2].gongshi = (res[5].time ? res[5].time : 0);
this.carWorkTimeData.listData[2].xianzhi = (res[5].lv ? ((parseFloat(res[5].lv) * 100) > 100 ? 100 : (parseFloat(res[5].lv) * 100).toFixed(2)) : 0);
})
}
},10000)
},60000)
},
//车辆工时切换时间
......@@ -301,35 +229,23 @@ export default {
let allTime1 = 0;
let allEffic1 = 0;
let num1 = 0;
let allTime2 = 0;
let allEffic2 = 0;
let num2 = 0;
let allTime3 = 0;
let allEffic3 = 0;
let num3 = 0;
res.data.forEach((item1,index1)=>{
if(item1.carclass == '卡车'){
allTime1 = allTime1 + parseFloat(item1.time);
allEffic1 = allEffic1 + (item1.effic ? parseFloat(item1.effic) : 0);
num1++;
}else if(item1.carclass == '铲车'){
allTime2 = allTime2 + parseFloat(item1.time);
allEffic2 = allEffic2 + (item1.effic ? parseFloat(item1.effic) : 0);
num2++;
}else{
allTime3 = allTime3 + parseFloat(item1.time);
allEffic3 = allEffic3 + (item1.effic ? parseFloat(item1.effic) : 0);
num3++;
}
});
this.carWorkTimeData.listData[0].gongshi = allTime1;
this.carWorkTimeData.listData[0].xianzhi = allEffic1 ? (100 - parseFloat(allEffic1 / num1)).toFixed(2) : 100;
this.carWorkTimeData.listData[1].gongshi = allTime2;
this.carWorkTimeData.listData[1].xianzhi = allEffic2 ? (100 - parseFloat(allEffic2 / num2)).toFixed(2) : 100;
this.carWorkTimeData.listData[2].gongshi = allTime3;
this.carWorkTimeData.listData[2].xianzhi = allEffic3 ? (100 - parseFloat(allEffic3 / num3)).toFixed(2) : 100;
}
})
HttpReq.truckDispatching.apiManmadesChanjiedanYearQuery().then((res) => {
this.carWorkTimeData.listData[1].gongshi = (res[0].time ? res[0].time : 0);
this.carWorkTimeData.listData[1].xianzhi = (res[0].lv ? ((parseFloat(res[0].lv) * 100) > 100 ? 100 : (parseFloat(res[0].lv) * 100).toFixed(2)) : 0);
this.carWorkTimeData.listData[2].gongshi = (res[3].time ? res[3].time : 0);
this.carWorkTimeData.listData[2].xianzhi = (res[3].lv ? ((parseFloat(res[3].lv) * 100) > 100 ? 100 : (parseFloat(res[3].lv) * 100).toFixed(2)) : 0);
})
}
if(this.carWorkTimeData.selectTimeText == 'month'){
this.carWorkTimeData.selectTimeDate = this.currentTime.month;
......@@ -338,35 +254,23 @@ export default {
let allTime1 = 0;
let allEffic1 = 0;
let num1 = 0;
let allTime2 = 0;
let allEffic2 = 0;
let num2 = 0;
let allTime3 = 0;
let allEffic3 = 0;
let num3 = 0;
res.data.forEach((item1,index1)=>{
if(item1.carclass == '卡车'){
allTime1 = allTime1 + parseFloat(item1.time);
allEffic1 = allEffic1 + (item1.effic ? parseFloat(item1.effic) : 0);
num1++;
}else if(item1.carclass == '铲车'){
allTime2 = allTime2 + parseFloat(item1.time);
allEffic2 = allEffic2 + (item1.effic ? parseFloat(item1.effic) : 0);
num2++;
}else{
allTime3 = allTime3 + parseFloat(item1.time);
allEffic3 = allEffic3 + (item1.effic ? parseFloat(item1.effic) : 0);
num3++;
}
});
this.carWorkTimeData.listData[0].gongshi = allTime1;
this.carWorkTimeData.listData[0].xianzhi = allEffic1 ? (100 - parseFloat(allEffic1 / num1)).toFixed(2) : 100;
this.carWorkTimeData.listData[1].gongshi = allTime2;
this.carWorkTimeData.listData[1].xianzhi = allEffic2 ? (100 - parseFloat(allEffic2 / num2)).toFixed(2) : 100;
this.carWorkTimeData.listData[2].gongshi = allTime3;
this.carWorkTimeData.listData[2].xianzhi = allEffic3 ? (100 - parseFloat(allEffic3 / num3)).toFixed(2) : 100;
}
})
HttpReq.truckDispatching.apiManmadesChanjiedanYearQuery().then((res) => {
this.carWorkTimeData.listData[1].gongshi = (res[1].time ? res[1].time : 0);
this.carWorkTimeData.listData[1].xianzhi = (res[1].lv ? ((parseFloat(res[1].lv) * 100) > 100 ? 100 : (parseFloat(res[1].lv) * 100).toFixed(2)) : 0);
this.carWorkTimeData.listData[2].gongshi = (res[4].time ? res[4].time : 0);
this.carWorkTimeData.listData[2].xianzhi = (res[4].lv ? ((parseFloat(res[4].lv) * 100) > 100 ? 100 : (parseFloat(res[4].lv) * 100).toFixed(2)) : 0);
})
}
if(this.carWorkTimeData.selectTimeText == 'year'){
this.carWorkTimeData.selectTimeDate = this.currentTime.year;
......@@ -375,35 +279,23 @@ export default {
let allTime1 = 0;
let allEffic1 = 0;
let num1 = 0;
let allTime2 = 0;
let allEffic2 = 0;
let num2 = 0;
let allTime3 = 0;
let allEffic3 = 0;
let num3 = 0;
res.data.forEach((item1,index1)=>{
if(item1.carclass == '卡车'){
allTime1 = allTime1 + parseFloat(item1.time);
allEffic1 = allEffic1 + (item1.effic ? parseFloat(item1.effic) : 0);
num1++;
}else if(item1.carclass == '铲车'){
allTime2 = allTime2 + parseFloat(item1.time);
allEffic2 = allEffic2 + (item1.effic ? parseFloat(item1.effic) : 0);
num2++;
}else{
allTime3 = allTime3 + parseFloat(item1.time);
allEffic3 = allEffic3 + (item1.effic ? parseFloat(item1.effic) : 0);
num3++;
}
});
this.carWorkTimeData.listData[0].gongshi = allTime1;
this.carWorkTimeData.listData[0].xianzhi = allEffic1 ? (100 - parseFloat(allEffic1 / num1)).toFixed(2) : 100;
this.carWorkTimeData.listData[1].gongshi = allTime2;
this.carWorkTimeData.listData[1].xianzhi = allEffic2 ? (100 - parseFloat(allEffic2 / num2)).toFixed(2) : 100;
this.carWorkTimeData.listData[2].gongshi = allTime3;
this.carWorkTimeData.listData[2].xianzhi = allEffic3 ? (100 - parseFloat(allEffic3 / num3)).toFixed(2) : 100;
}
})
HttpReq.truckDispatching.apiManmadesChanjiedanYearQuery().then((res) => {
this.carWorkTimeData.listData[1].gongshi = (res[2].time ? res[2].time : 0);
this.carWorkTimeData.listData[1].xianzhi = (res[2].lv ? ((parseFloat(res[2].lv) * 100) > 100 ? 100 : (parseFloat(res[2].lv) * 100).toFixed(2)) : 0);
this.carWorkTimeData.listData[2].gongshi = (res[5].time ? res[5].time : 0);
this.carWorkTimeData.listData[2].xianzhi = (res[5].lv ? ((parseFloat(res[5].lv) * 100) > 100 ? 100 : (parseFloat(res[5].lv) * 100).toFixed(2)) : 0);
})
}
},
//获取当前时间
......
......@@ -169,7 +169,7 @@ export default {
this.reconnect();
}, 20000)
//与嵌入的地图页面进行交互
window.addEventListener('message', this.handleMessage);
//window.addEventListener('message', this.handleMessage);
},
methods: {
loadData() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment