Commit 0b3bb279 authored by caicaicai's avatar caicaicai

修改

parent 602398b1
......@@ -327,103 +327,107 @@ export default {
},
mounted() { },
methods: {
loadData(){
this.whetherShow = true;
this.dayCurrentTimeFn();
this.monthCurrentTimeFn();
this.yearCurrentTimeFn();
loadData(text){
if(text == true){
this.whetherShow = true;
this.dayCurrentTimeFn();
this.monthCurrentTimeFn();
this.yearCurrentTimeFn();
this.$nextTick(()=>{
//获取车辆运行状况
HttpReq.truckDispatching.screenDriverInformationQuery({size:9999}).then((res) => {
let kache1 = [];
let kachezaixian = [];
let kachelixian = [];
let dianchan1 = [];
let dianchanzaixian = [];
let dianchanlixian = [];
let qitache1 = [];
let qitachezaixian = [];
let qitachelixian = [];
let zaixianAllNum = [];
let lixianAllNum = [];
if(res.code == 200){
res.data.content.forEach((item)=>{
if(item.carclass == '卡车'){
kache1.push(item);
}else if(item.carclass == '电铲'){
dianchan1.push(item);
}else{
qitache1.push(item);
}
})
kache1.forEach((item)=>{
if(item.status == 1){
kachezaixian.push(item);
}else{
kachelixian.push(item);
}
})
dianchan1.forEach((item)=>{
if(item.status == 1){
dianchanzaixian.push(item);
}else{
dianchanlixian.push(item);
}
})
qitache1.forEach((item)=>{
if(item.status == 1){
qitachezaixian.push(item);
}else{
qitachelixian.push(item);
}
})
zaixianAllNum.push(kachezaixian.length);
zaixianAllNum.push(dianchanzaixian.length);
zaixianAllNum.push(qitachezaixian.length);
lixianAllNum.push(kachelixian.length);
lixianAllNum.push(dianchanlixian.length);
lixianAllNum.push(qitachelixian.length);
this.carWorkingStateData.online = zaixianAllNum;
this.carWorkingStateData.offline = lixianAllNum;
//绘制车辆运行状况图表
this.$nextTick(()=>{
this.carWorkingStateEcharts();
})
}
})
//获取卡车排行榜
this.truckRankListData.selectTimeDate = this.currentTime.day;
let truckQuery1 = {};
truckQuery1.size = 10;
truckQuery1.sort = this.truckRankListData.selectFieldText + ',desc';
truckQuery1.carclass = this.truckRankListData.carclass;
truckQuery1.createTime = this.truckRankListData.selectTimeDate;
this.$nextTick(()=>{
HttpReq.truckDispatching.screenDriverInformationQuery(truckQuery1).then((res) => {
//获取车辆运行状况
HttpReq.truckDispatching.screenDriverInformationQuery({size:9999}).then((res) => {
let kache1 = [];
let kachezaixian = [];
let kachelixian = [];
let dianchan1 = [];
let dianchanzaixian = [];
let dianchanlixian = [];
let qitache1 = [];
let qitachezaixian = [];
let qitachelixian = [];
let zaixianAllNum = [];
let lixianAllNum = [];
if(res.code == 200){
this.truckRankListData.listData = res.data.content;
res.data.content.forEach((item)=>{
if(item.carclass == '卡车'){
kache1.push(item);
}else if(item.carclass == '电铲'){
dianchan1.push(item);
}else{
qitache1.push(item);
}
})
kache1.forEach((item)=>{
if(item.status == 1){
kachezaixian.push(item);
}else{
kachelixian.push(item);
}
})
dianchan1.forEach((item)=>{
if(item.status == 1){
dianchanzaixian.push(item);
}else{
dianchanlixian.push(item);
}
})
qitache1.forEach((item)=>{
if(item.status == 1){
qitachezaixian.push(item);
}else{
qitachelixian.push(item);
}
})
zaixianAllNum.push(kachezaixian.length);
zaixianAllNum.push(dianchanzaixian.length);
zaixianAllNum.push(qitachezaixian.length);
lixianAllNum.push(kachelixian.length);
lixianAllNum.push(dianchanlixian.length);
lixianAllNum.push(qitachelixian.length);
this.carWorkingStateData.online = zaixianAllNum;
this.carWorkingStateData.offline = lixianAllNum;
//绘制车辆运行状况图表
this.$nextTick(()=>{
this.carWorkingStateEcharts();
})
}
})
})
//获取电铲排行榜
this.forkLiftRankListData.selectTimeDate = this.currentTime.day;
let forkLiftQuery1 = {};
forkLiftQuery1.size = 10;
forkLiftQuery1.sort = this.forkLiftRankListData.selectFieldText + ',desc';
forkLiftQuery1.carclass = this.forkLiftRankListData.carclass;
forkLiftQuery1.createTime = this.forkLiftRankListData.selectTimeDate;
this.$nextTick(()=>{
HttpReq.truckDispatching.screenDriverInformationQuery(forkLiftQuery1).then((res) => {
if(res.code == 200){
this.forkLiftRankListData.listData = res.data.content;
}
//获取卡车排行榜
this.truckRankListData.selectTimeDate = this.currentTime.day;
let truckQuery1 = {};
truckQuery1.size = 10;
truckQuery1.sort = this.truckRankListData.selectFieldText + ',desc';
truckQuery1.carclass = this.truckRankListData.carclass;
truckQuery1.createTime = this.truckRankListData.selectTimeDate;
this.$nextTick(()=>{
HttpReq.truckDispatching.screenDriverInformationQuery(truckQuery1).then((res) => {
if(res.code == 200){
this.truckRankListData.listData = res.data.content;
}
})
})
})
//卡车动态
//获取电铲排行榜
this.forkLiftRankListData.selectTimeDate = this.currentTime.day;
let forkLiftQuery1 = {};
forkLiftQuery1.size = 10;
forkLiftQuery1.sort = this.forkLiftRankListData.selectFieldText + ',desc';
forkLiftQuery1.carclass = this.forkLiftRankListData.carclass;
forkLiftQuery1.createTime = this.forkLiftRankListData.selectTimeDate;
this.$nextTick(()=>{
HttpReq.truckDispatching.screenDriverInformationQuery(forkLiftQuery1).then((res) => {
if(res.code == 200){
this.forkLiftRankListData.listData = res.data.content;
}
})
})
//卡车动态
})
})
}else{
this.whetherShow = false;
}
},
//车辆运行状况
carWorkingStateEcharts(){
......
......@@ -144,134 +144,136 @@ export default {
},
mounted() { },
methods: {
loadData(){
this.whetherShow = true;
this.dayCurrentTimeFn();
this.monthCurrentTimeFn();
this.yearCurrentTimeFn();
this.$nextTick(()=>{
//采取产量统计图表
this.echarts1Fn();
//各采区日产量排名
HttpReq.truckDispatching.caiquAreaQueryDay({size:10,createTime:this.currentTime.day,sort:'output,desc',}).then((res) => {
if(res.code == 200){
this.outputRankData = res.data.content;
}
})
//各采区当月完成率
HttpReq.truckDispatching.caiquAreaQueryMonth({size:9999,createTime:this.currentTime.month,}).then((res) => {
if(res.code == 200){
let caiquName = [];
let wanchengNum = [];
let jihuaNum = [];
let wanchengRate = [];
res.data.content.forEach((item,index)=>{
caiquName.push(item.name);
wanchengNum.push(item.output);
jihuaNum.push(item.dayPlan);
wanchengRate.push(parseFloat(item.rate) * 100);
})
this.echarts2Data.caiquName = caiquName;
this.echarts2Data.wanchengNum = wanchengNum;
this.echarts2Data.jihuaNum = jihuaNum;
this.echarts2Data.wanchengRate = wanchengRate;
this.echarts2Fn();
}
})
//月生产完成效率
this.echarts3Fn();
//装卸点平均时长 卸货点卸货量统计
HttpReq.truckDispatching.xiequAreaQueryDay({size:9999,createTime:this.currentTime.day,}).then((res) => {
if(res.code == 200){
let caiquName = [];
let workTime = [];
let outputNum7 = [];
res.data.content.forEach((item,index)=>{
caiquName.push(item.name);
workTime.push(item.worktime);
outputNum7.push(item.output);
})
this.loadAndUnloadListData.caiquName = caiquName;
this.loadAndUnloadListData.timeData = workTime;
this.echarts4Fn();
//卸货点卸货量统计
this.echarts7Data.xiedianName = caiquName;
this.echarts7Data.outputNum = outputNum7;
this.echarts7Fn();
}
})
//矿石产量比
HttpReq.truckDispatching.screenOreProportionDayQuery({size:9999,createTime:this.currentTime.day,}).then((res) => {
if(res.code == 200){
let centerArray = [];
res.data.content.forEach((item,index)=>{
let a1 = {};
a1.value = item.num;
a1.name = item.name;
centerArray.push(a1);
})
this.oreProportionListData.proportionData = centerArray;
this.echarts5Fn();
}
})
//报警路障申报统计
HttpReq.truckDispatching.breakDownQueryDay({size:9999,createTime:this.currentTime.day,}).then((res) => {
let that = this;
if(res.code == 200){
//报警路障申报统计过度数组
let alarmBreakArray = [];
let breakObj1 = {};
breakObj1.name = '车辆故障';
breakObj1.value = res.data.totalElements;
alarmBreakArray.push(breakObj1);
//获取报警信息
HttpReq.truckDispatching.callPoliceQuery({size:9999,}).then((res) => {
if(res.code == 200){
let alarmObj1 = {};
let alarmArray1 = [];
let alarmObj2 = {};
let alarmArray2 = [];
let alarmObj3 = {};
let alarmArray3 = [];
let alarmObj4 = {};
let alarmArray4 = [];
res.data.content.forEach((item,index)=>{
if(item.alarmclass == '超速'){
alarmArray1.push(item);
}else if(item.alarmclass == '无故停车'){
alarmArray2.push(item);
}else if(item.alarmclass == '驾离电子围栏'){
alarmArray3.push(item);
}else if(item.alarmclass == '驶入电子围栏'){
alarmArray4.push(item);
}
})
alarmObj1.name = '超速';
alarmObj1.value = alarmArray1.length;
alarmObj2.name = '无故停车';
alarmObj2.value = alarmArray2.length;
alarmObj3.name = '驾离电子围栏';
alarmObj3.value = alarmArray3.length;
alarmObj4.name = '驶入电子围栏';
alarmObj4.value = alarmArray4.length;
alarmBreakArray.push(alarmObj1);
alarmBreakArray.push(alarmObj2);
alarmBreakArray.push(alarmObj3);
alarmBreakArray.push(alarmObj4);
that.echarts6Data = alarmBreakArray;
this.$nextTick(()=>{
that.echarts6Fn();
})
}
})
}
})
loadData(text){
if(text == true){
this.whetherShow = true;
this.dayCurrentTimeFn();
this.monthCurrentTimeFn();
this.yearCurrentTimeFn();
})
this.$nextTick(()=>{
//采取产量统计图表
this.echarts1Fn();
//各采区日产量排名
HttpReq.truckDispatching.caiquAreaQueryDay({size:10,createTime:this.currentTime.day,sort:'output,desc',}).then((res) => {
if(res.code == 200){
this.outputRankData = res.data.content;
}
})
//各采区当月完成率
HttpReq.truckDispatching.caiquAreaQueryMonth({size:9999,createTime:this.currentTime.month,}).then((res) => {
if(res.code == 200){
let caiquName = [];
let wanchengNum = [];
let jihuaNum = [];
let wanchengRate = [];
res.data.content.forEach((item,index)=>{
caiquName.push(item.name);
wanchengNum.push(item.output);
jihuaNum.push(item.dayPlan);
wanchengRate.push(parseFloat(item.rate) * 100);
})
this.echarts2Data.caiquName = caiquName;
this.echarts2Data.wanchengNum = wanchengNum;
this.echarts2Data.jihuaNum = jihuaNum;
this.echarts2Data.wanchengRate = wanchengRate;
this.echarts2Fn();
}
})
//月生产完成效率
this.echarts3Fn();
//装卸点平均时长 卸货点卸货量统计
HttpReq.truckDispatching.xiequAreaQueryDay({size:9999,createTime:this.currentTime.day,}).then((res) => {
if(res.code == 200){
let caiquName = [];
let workTime = [];
let outputNum7 = [];
res.data.content.forEach((item,index)=>{
caiquName.push(item.name);
workTime.push(item.worktime);
outputNum7.push(item.output);
})
this.loadAndUnloadListData.caiquName = caiquName;
this.loadAndUnloadListData.timeData = workTime;
this.echarts4Fn();
//卸货点卸货量统计
this.echarts7Data.xiedianName = caiquName;
this.echarts7Data.outputNum = outputNum7;
this.echarts7Fn();
}
})
//矿石产量比
HttpReq.truckDispatching.screenOreProportionDayQuery({size:9999,createTime:this.currentTime.day,}).then((res) => {
if(res.code == 200){
let centerArray = [];
res.data.content.forEach((item,index)=>{
let a1 = {};
a1.value = item.num;
a1.name = item.name;
centerArray.push(a1);
})
this.oreProportionListData.proportionData = centerArray;
this.echarts5Fn();
}
})
//报警路障申报统计
HttpReq.truckDispatching.breakDownQueryDay({size:9999,createTime:this.currentTime.day,}).then((res) => {
let that = this;
if(res.code == 200){
//报警路障申报统计过度数组
let alarmBreakArray = [];
let breakObj1 = {};
breakObj1.name = '车辆故障';
breakObj1.value = res.data.totalElements;
alarmBreakArray.push(breakObj1);
//获取报警信息
HttpReq.truckDispatching.callPoliceQuery({size:9999,}).then((res) => {
if(res.code == 200){
let alarmObj1 = {};
let alarmArray1 = [];
let alarmObj2 = {};
let alarmArray2 = [];
let alarmObj3 = {};
let alarmArray3 = [];
let alarmObj4 = {};
let alarmArray4 = [];
res.data.content.forEach((item,index)=>{
if(item.alarmclass == '超速'){
alarmArray1.push(item);
}else if(item.alarmclass == '无故停车'){
alarmArray2.push(item);
}else if(item.alarmclass == '驾离电子围栏'){
alarmArray3.push(item);
}else if(item.alarmclass == '驶入电子围栏'){
alarmArray4.push(item);
}
})
alarmObj1.name = '超速';
alarmObj1.value = alarmArray1.length;
alarmObj2.name = '无故停车';
alarmObj2.value = alarmArray2.length;
alarmObj3.name = '驾离电子围栏';
alarmObj3.value = alarmArray3.length;
alarmObj4.name = '驶入电子围栏';
alarmObj4.value = alarmArray4.length;
alarmBreakArray.push(alarmObj1);
alarmBreakArray.push(alarmObj2);
alarmBreakArray.push(alarmObj3);
alarmBreakArray.push(alarmObj4);
that.echarts6Data = alarmBreakArray;
this.$nextTick(()=>{
that.echarts6Fn();
})
}
})
}
})
})
}else{
this.whetherShow = false;
}
},
//采取产量统计
echarts1Fn(){
......
......@@ -434,160 +434,165 @@ export default {
},
mounted() { },
methods: {
loadData(){
this.whetherShow = true;
this.dayCurrentTimeFn();
this.monthCurrentTimeFn();
this.yearCurrentTimeFn();
loadData(text){
if(text == true){
this.whetherShow = true;
this.dayCurrentTimeFn();
this.monthCurrentTimeFn();
this.yearCurrentTimeFn();
this.$nextTick(()=>{
//获取采区当前日产量
HttpReq.truckDispatching.caiquAreaQueryDay({size:1,createTime:this.currentTime.day}).then((res) => {
if(res.code == 200){
let undueArray = {};
if(res.data.totalElements == 0){
undueArray.rate = 0;
undueArray.output = 0;
undueArray.dayPlan = 0;
}else{
if(res.data.content[0].rate == ''){
this.$nextTick(()=>{
//获取采区当前日产量
HttpReq.truckDispatching.caiquAreaQueryDay({size:1,createTime:this.currentTime.day}).then((res) => {
if(res.code == 200){
let undueArray = {};
if(res.data.totalElements == 0){
undueArray.rate = 0;
undueArray.output = res.data.content[0].output;
undueArray.dayPlan = res.data.content[0].dayPlan;
undueArray.output = 0;
undueArray.dayPlan = 0;
}else{
undueArray.rate = parseFloat(res.data.content[0].rate) * 100;
undueArray.output = res.data.content[0].output;
undueArray.dayPlan = res.data.content[0].dayPlan;
if(res.data.content[0].rate == ''){
undueArray.rate = 0;
undueArray.output = res.data.content[0].output;
undueArray.dayPlan = res.data.content[0].dayPlan;
}else{
undueArray.rate = parseFloat(res.data.content[0].rate) * 100;
undueArray.output = res.data.content[0].output;
undueArray.dayPlan = res.data.content[0].dayPlan;
}
}
this.outputMineData.day = undueArray;
}
this.outputMineData.day = undueArray;
}
})
//获取采区当前月产量
HttpReq.truckDispatching.caiquAreaQueryMonth({size:1,createTime:this.currentTime.month}).then((res) => {
if(res.code == 200){
let undueArray = {};
if(res.data.totalElements == 0){
undueArray.rate = 0;
undueArray.output = 0;
undueArray.dayPlan = 0;
}else{
if(res.data.content[0].rate == ''){
})
//获取采区当前月产量
HttpReq.truckDispatching.caiquAreaQueryMonth({size:1,createTime:this.currentTime.month}).then((res) => {
if(res.code == 200){
let undueArray = {};
if(res.data.totalElements == 0){
undueArray.rate = 0;
undueArray.output = res.data.content[0].output;
undueArray.dayPlan = res.data.content[0].dayPlan;
undueArray.output = 0;
undueArray.dayPlan = 0;
}else{
undueArray.rate = parseFloat(res.data.content[0].rate) * 100;
undueArray.output = res.data.content[0].output;
undueArray.dayPlan = res.data.content[0].dayPlan;
if(res.data.content[0].rate == ''){
undueArray.rate = 0;
undueArray.output = res.data.content[0].output;
undueArray.dayPlan = res.data.content[0].dayPlan;
}else{
undueArray.rate = parseFloat(res.data.content[0].rate) * 100;
undueArray.output = res.data.content[0].output;
undueArray.dayPlan = res.data.content[0].dayPlan;
}
}
this.outputMineData.month = undueArray;
}
this.outputMineData.month = undueArray;
}
})
//获取采区当前年产量
HttpReq.truckDispatching.caiquAreaQueryYear({size:1,createTime:this.currentTime.year}).then((res) => {
if(res.code == 200){
let undueArray = {};
if(res.data.totalElements == 0){
undueArray.rate = 0;
undueArray.output = 0;
undueArray.dayPlan = 0;
}else{
if(res.data.content[0].rate == ''){
})
//获取采区当前年产量
HttpReq.truckDispatching.caiquAreaQueryYear({size:1,createTime:this.currentTime.year}).then((res) => {
if(res.code == 200){
let undueArray = {};
if(res.data.totalElements == 0){
undueArray.rate = 0;
undueArray.output = res.data.content[0].output;
undueArray.dayPlan = res.data.content[0].dayPlan;
undueArray.output = 0;
undueArray.dayPlan = 0;
}else{
undueArray.rate = parseFloat(res.data.content[0].rate) * 100;
undueArray.output = res.data.content[0].output;
undueArray.dayPlan = res.data.content[0].dayPlan;
if(res.data.content[0].rate == ''){
undueArray.rate = 0;
undueArray.output = res.data.content[0].output;
undueArray.dayPlan = res.data.content[0].dayPlan;
}else{
undueArray.rate = parseFloat(res.data.content[0].rate) * 100;
undueArray.output = res.data.content[0].output;
undueArray.dayPlan = res.data.content[0].dayPlan;
}
}
this.outputMineData.year = undueArray;
}
this.outputMineData.year = undueArray;
}
})
//获取司机信息
HttpReq.truckDispatching.screenDriverInformationQuery({size:9999}).then((res) => {
if(res.code == 200){
//司机信息处理
let workerTemporary = [];
let restTemporary = [];
res.data.content.forEach((item) => {
if(item.status == 1){
workerTemporary.push(item);
}else{
restTemporary.push(item);
})
//获取司机信息
HttpReq.truckDispatching.screenDriverInformationQuery({size:9999}).then((res) => {
if(res.code == 200){
//司机信息处理
let workerTemporary = [];
let restTemporary = [];
res.data.content.forEach((item) => {
if(item.status == 1){
workerTemporary.push(item);
}else{
restTemporary.push(item);
}
});
this.driverData.totalNumber = res.data.totalElements;
this.driverData.driverTableData = workerTemporary;
this.driverData.workersNumber = workerTemporary.length;
this.driverData.restNumber = restTemporary.length;
}
})
//获取卡车排行榜
this.truckRankListData.selectTimeDate = this.currentTime.day;
let truckQuery1 = {};
truckQuery1.size = 5;
truckQuery1.sort = this.truckRankListData.selectFieldText + ',desc';
truckQuery1.carclass = this.truckRankListData.carclass;
truckQuery1.createTime = this.truckRankListData.selectTimeDate;
this.$nextTick(()=>{
HttpReq.truckDispatching.screenDriverInformationQuery(truckQuery1).then((res) => {
if(res.code == 200){
this.truckRankListData.listData = res.data.content;
}
});
this.driverData.totalNumber = res.data.totalElements;
this.driverData.driverTableData = workerTemporary;
this.driverData.workersNumber = workerTemporary.length;
this.driverData.restNumber = restTemporary.length;
}
})
//获取卡车排行榜
this.truckRankListData.selectTimeDate = this.currentTime.day;
let truckQuery1 = {};
truckQuery1.size = 5;
truckQuery1.sort = this.truckRankListData.selectFieldText + ',desc';
truckQuery1.carclass = this.truckRankListData.carclass;
truckQuery1.createTime = this.truckRankListData.selectTimeDate;
this.$nextTick(()=>{
HttpReq.truckDispatching.screenDriverInformationQuery(truckQuery1).then((res) => {
})
})
//获取电铲排行榜
this.forkLiftRankListData.selectTimeDate = this.currentTime.day;
let forkLiftQuery1 = {};
forkLiftQuery1.size = 5;
forkLiftQuery1.sort = this.forkLiftRankListData.selectFieldText + ',desc';
forkLiftQuery1.carclass = this.forkLiftRankListData.carclass;
forkLiftQuery1.createTime = this.forkLiftRankListData.selectTimeDate;
this.$nextTick(()=>{
HttpReq.truckDispatching.screenDriverInformationQuery(forkLiftQuery1).then((res) => {
if(res.code == 200){
this.forkLiftRankListData.listData = res.data.content;
}
})
})
//中间echarts图表
this.centerEcharts();
//获取天气
HttpReq.truckDispatching.getWeatherInforQuery({cityName:'济南'}).then((res) => {
if(res.code == 200){
this.truckRankListData.listData = res.data.content;
let data1 = JSON.parse(res.msg).data.forecast;
this.weatherData.forecastData = data1;
this.weatherData.today = data1[0];
}
})
})
//获取电铲排行榜
this.forkLiftRankListData.selectTimeDate = this.currentTime.day;
let forkLiftQuery1 = {};
forkLiftQuery1.size = 5;
forkLiftQuery1.sort = this.forkLiftRankListData.selectFieldText + ',desc';
forkLiftQuery1.carclass = this.forkLiftRankListData.carclass;
forkLiftQuery1.createTime = this.forkLiftRankListData.selectTimeDate;
this.$nextTick(()=>{
HttpReq.truckDispatching.screenDriverInformationQuery(forkLiftQuery1).then((res) => {
//车辆工时
HttpReq.truckDispatching.carWorkInforQuery({riqi:this.currentTime.day}).then((res) => {
if(res.code == 200){
this.forkLiftRankListData.listData = res.data.content;
if(res.data.totalElements == 0){
this.carWorkTimeData.listData = [
{cartype:'卡车',gongshi:0,xianzhi:0},
{cartype:'电铲',gongshi:0,xianzhi:0},
{cartype:'其他车辆',gongshi:0,xianzhi:0},
];
}else{
this.carWorkTimeData.listData = res.data.content;
}
}
})
})
//中间echarts图表
this.centerEcharts();
//获取天气
HttpReq.truckDispatching.getWeatherInforQuery({cityName:'济南'}).then((res) => {
if(res.code == 200){
let data1 = JSON.parse(res.msg).data.forecast;
this.weatherData.forecastData = data1;
this.weatherData.today = data1[0];
}
})
//车辆工时
HttpReq.truckDispatching.carWorkInforQuery({riqi:this.currentTime.day}).then((res) => {
if(res.code == 200){
if(res.data.totalElements == 0){
this.carWorkTimeData.listData = [
{cartype:'卡车',gongshi:0,xianzhi:0},
{cartype:'电铲',gongshi:0,xianzhi:0},
{cartype:'其他车辆',gongshi:0,xianzhi:0},
];
}else{
this.carWorkTimeData.listData = res.data.content;
//矿石开采效率
//实时报警
HttpReq.truckDispatching.callPoliceQuery({status:1}).then((res) => {
if(res.code == 200){
this.realAlarmStyleData.listData = res.data.content;
}
}
})
//矿石开采效率
})
//实时报警
HttpReq.truckDispatching.callPoliceQuery({status:1}).then((res) => {
if(res.code == 200){
this.realAlarmStyleData.listData = res.data.content;
}
})
})
}else{
this.whetherShow = false;
}
},
//卡车切换时间
truckChangeTime(text){
......
......@@ -149,46 +149,50 @@ export default {
mounted() { },
methods: {
//获取总数据
loadData(){
this.whetherShow = true;
this.selectCarFleet = '';
this.selectCarRadioArray = [];
loadData(text){
if(text == true){
this.whetherShow = true;
this.selectCarFleet = '';
this.selectCarRadioArray = [];
this.$nextTick(()=>{
//车队信息
HttpReq.truckDispatching.carFleetQuery({size:9999}).then((res) => {
if(res.code == 200){
this.carFleetData = res.data.content;
};
})
//车辆信息
this.loadData2();
//近期通知列表
HttpReq.truckDispatching.recentNoticeQuery({size:9999,sort:'id,desc',}).then((res) => {
if(res.code == 200){
this.recentNoticeData = res.data.content;
};
this.$nextTick(()=>{
//车队信息
HttpReq.truckDispatching.carFleetQuery({size:9999}).then((res) => {
if(res.code == 200){
this.carFleetData = res.data.content;
};
})
//车辆信息
this.loadData2();
//近期通知列表
HttpReq.truckDispatching.recentNoticeQuery({size:9999,sort:'id,desc',}).then((res) => {
if(res.code == 200){
this.recentNoticeData = res.data.content;
};
})
//智能调度情况
HttpReq.truckDispatching.IntelligentDispatchHistoryQuery({size:9999,sort:'startTime,desc',}).then((res) => {
let finishData = [];
let loadingData = [];
if(res.code == 200){
res.data.content.forEach((item,index) => {
if(item.status == 0){
finishData.push(item);
}else{
loadingData.push(item);
}
});
this.dispatchLoadingNum = loadingData.length;
this.dispatchFinishNum = finishData.length;
this.dispatchDetailsList = res.data.content;
}
})
//车辆区域分布Echarts
this.carsAreaDistributionEcharts();
})
//智能调度情况
HttpReq.truckDispatching.IntelligentDispatchHistoryQuery({size:9999,sort:'startTime,desc',}).then((res) => {
let finishData = [];
let loadingData = [];
if(res.code == 200){
res.data.content.forEach((item,index) => {
if(item.status == 0){
finishData.push(item);
}else{
loadingData.push(item);
}
});
this.dispatchLoadingNum = loadingData.length;
this.dispatchFinishNum = finishData.length;
this.dispatchDetailsList = res.data.content;
}
})
//
this.carsAreaDistributionEcharts();
})
}else{
this.whetherShow = false;
}
},
//获取车辆信息
loadData2() {
......
......@@ -54,6 +54,13 @@ export default {
currentTime:'',
//选择模块
selectModule:'',
//各模块展示传值
isShow:{
dataScreening:false,
carManagement:false,
intelligentSchedul:false,
dataAnalysis:false,
},
//标题菜单数据
topSmallTitleLeftData:[],
topSmallTitleRightData:[],
......@@ -61,6 +68,7 @@ export default {
carName:'4001',
//司机用户名
driverUserName:'lisan',
}
},
mounted() {
......@@ -93,34 +101,110 @@ export default {
changeOver(item){
this.selectModule = item.componentName;
if(item.componentName == 'dataScreening'){
this.$refs.dataScreeningMethod.loadData();
if(this.isShow.dataScreening == false){
this.$refs.dataScreeningMethod.loadData(true);
this.isShow.dataScreening = true;
this.isShow.carManagement = false;
this.isShow.intelligentSchedul = false;
this.isShow.dataAnalysis = false;
}else{
this.$refs.dataScreeningMethod.loadData(false);
this.isShow.dataScreening = false;
}
this.$refs.carManagementMethod.loadData(false);
this.$refs.intelligentSchedulMethod.loadData(false);
this.$refs.dataAnalysisMethod.loadData(false);
}
if(item.componentName == 'carManagement'){
this.$refs.carManagementMethod.loadData();
if(this.isShow.carManagement == false){
this.$refs.carManagementMethod.loadData(true);
this.isShow.carManagement = true;
this.isShow.dataScreening = false;
this.isShow.intelligentSchedul = false;
this.isShow.dataAnalysis = false;
}else{
this.$refs.carManagementMethod.loadData(false);
this.isShow.carManagement = false;
}
this.$refs.dataScreeningMethod.loadData(false);
this.$refs.intelligentSchedulMethod.loadData(false);
this.$refs.dataAnalysisMethod.loadData(false);
}
if(item.componentName == 'intelligentSchedul'){
this.$refs.intelligentSchedulMethod.loadData();
if(this.isShow.intelligentSchedul == false){
this.$refs.intelligentSchedulMethod.loadData(true);
this.isShow.intelligentSchedul = true;
this.isShow.dataScreening = false;
this.isShow.carManagement = false;
this.isShow.dataAnalysis = false;
}else{
this.$refs.intelligentSchedulMethod.loadData(false);
this.isShow.intelligentSchedul = false;
}
this.$refs.dataScreeningMethod.loadData(false);
this.$refs.carManagementMethod.loadData(false);
this.$refs.dataAnalysisMethod.loadData(false);
}
if(item.componentName == 'dataAnalysis'){
this.$refs.dataAnalysisMethod.loadData();
if(this.isShow.dataAnalysis == false){
this.$refs.dataAnalysisMethod.loadData(true);
this.isShow.dataAnalysis = true;
this.isShow.dataScreening = false;
this.isShow.carManagement = false;
this.isShow.intelligentSchedul = false;
}else{
this.$refs.dataAnalysisMethod.loadData(false);
this.isShow.dataAnalysis = false;
}
this.$refs.dataScreeningMethod.loadData(false);
this.$refs.carManagementMethod.loadData(false);
this.$refs.intelligentSchedulMethod.loadData(false);
}
if(item.componentName == 'backstage'){
let routeUrl = this.$router.resolve({
path: "/dashboard",
});
window.open(routeUrl.href, '_blank');
this.isShow.dataScreening = false;
this.isShow.carManagement = false;
this.isShow.intelligentSchedul = false;
this.isShow.dataAnalysis = false;
this.$refs.dataScreeningMethod.loadData(false);
this.$refs.carManagementMethod.loadData(false);
this.$refs.intelligentSchedulMethod.loadData(false);
this.$refs.dataAnalysisMethod.loadData(false);
this.$nextTick(()=>{
let routeUrl = this.$router.resolve({
path: "/dashboard",
});
window.open(routeUrl.href, '_blank');
})
}
if(item.componentName == 'toVideoSurveillance'){
let routeUrl = this.$router.resolve({
path: "/monitoringManagement/mineVideo",
});
window.open(routeUrl.href, '_blank');
this.isShow.dataScreening = false;
this.isShow.carManagement = false;
this.isShow.intelligentSchedul = false;
this.isShow.dataAnalysis = false;
this.$refs.dataScreeningMethod.loadData(false);
this.$refs.carManagementMethod.loadData(false);
this.$refs.intelligentSchedulMethod.loadData(false);
this.$refs.dataAnalysisMethod.loadData(false);
this.$nextTick(()=>{
let routeUrl = this.$router.resolve({
path: "/monitoringManagement/mineVideo",
});
window.open(routeUrl.href, '_blank');
})
}
},
//车辆信息弹框
showSpecificInforFn(){
this.selectModule = 'carSpecificInfor';
this.$refs.carSpecificInforMethod.loadData(this.carName,this.driverUserName);
this.isShow.dataScreening = false;
this.isShow.carManagement = false;
this.isShow.intelligentSchedul = false;
this.isShow.dataAnalysis = false;
this.$refs.dataScreeningMethod.loadData(false);
this.$refs.carManagementMethod.loadData(false);
this.$refs.intelligentSchedulMethod.loadData(false);
this.$refs.dataAnalysisMethod.loadData(false);
},
//获取当前时间
setNowTimes () {
......
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