Commit 0b3bb279 authored by caicaicai's avatar caicaicai

修改

parent 602398b1
...@@ -327,103 +327,107 @@ export default { ...@@ -327,103 +327,107 @@ export default {
}, },
mounted() { }, mounted() { },
methods: { methods: {
loadData(){ loadData(text){
this.whetherShow = true; if(text == true){
this.dayCurrentTimeFn(); this.whetherShow = true;
this.monthCurrentTimeFn(); this.dayCurrentTimeFn();
this.yearCurrentTimeFn(); 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(()=>{ 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){ 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.truckRankListData.selectTimeDate = this.currentTime.day;
this.forkLiftRankListData.selectTimeDate = this.currentTime.day; let truckQuery1 = {};
let forkLiftQuery1 = {}; truckQuery1.size = 10;
forkLiftQuery1.size = 10; truckQuery1.sort = this.truckRankListData.selectFieldText + ',desc';
forkLiftQuery1.sort = this.forkLiftRankListData.selectFieldText + ',desc'; truckQuery1.carclass = this.truckRankListData.carclass;
forkLiftQuery1.carclass = this.forkLiftRankListData.carclass; truckQuery1.createTime = this.truckRankListData.selectTimeDate;
forkLiftQuery1.createTime = this.forkLiftRankListData.selectTimeDate; this.$nextTick(()=>{
this.$nextTick(()=>{ HttpReq.truckDispatching.screenDriverInformationQuery(truckQuery1).then((res) => {
HttpReq.truckDispatching.screenDriverInformationQuery(forkLiftQuery1).then((res) => { if(res.code == 200){
if(res.code == 200){ this.truckRankListData.listData = res.data.content;
this.forkLiftRankListData.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(){ carWorkingStateEcharts(){
......
...@@ -149,46 +149,50 @@ export default { ...@@ -149,46 +149,50 @@ export default {
mounted() { }, mounted() { },
methods: { methods: {
//获取总数据 //获取总数据
loadData(){ loadData(text){
this.whetherShow = true; if(text == true){
this.selectCarFleet = ''; this.whetherShow = true;
this.selectCarRadioArray = []; this.selectCarFleet = '';
this.selectCarRadioArray = [];
this.$nextTick(()=>{ this.$nextTick(()=>{
//车队信息 //车队信息
HttpReq.truckDispatching.carFleetQuery({size:9999}).then((res) => { HttpReq.truckDispatching.carFleetQuery({size:9999}).then((res) => {
if(res.code == 200){ if(res.code == 200){
this.carFleetData = res.data.content; this.carFleetData = res.data.content;
}; };
}) })
//车辆信息 //车辆信息
this.loadData2(); this.loadData2();
//近期通知列表 //近期通知列表
HttpReq.truckDispatching.recentNoticeQuery({size:9999,sort:'id,desc',}).then((res) => { HttpReq.truckDispatching.recentNoticeQuery({size:9999,sort:'id,desc',}).then((res) => {
if(res.code == 200){ if(res.code == 200){
this.recentNoticeData = res.data.content; 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();
}) })
//智能调度情况 }else{
HttpReq.truckDispatching.IntelligentDispatchHistoryQuery({size:9999,sort:'startTime,desc',}).then((res) => { this.whetherShow = false;
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();
})
}, },
//获取车辆信息 //获取车辆信息
loadData2() { loadData2() {
......
...@@ -54,6 +54,13 @@ export default { ...@@ -54,6 +54,13 @@ export default {
currentTime:'', currentTime:'',
//选择模块 //选择模块
selectModule:'', selectModule:'',
//各模块展示传值
isShow:{
dataScreening:false,
carManagement:false,
intelligentSchedul:false,
dataAnalysis:false,
},
//标题菜单数据 //标题菜单数据
topSmallTitleLeftData:[], topSmallTitleLeftData:[],
topSmallTitleRightData:[], topSmallTitleRightData:[],
...@@ -61,6 +68,7 @@ export default { ...@@ -61,6 +68,7 @@ export default {
carName:'4001', carName:'4001',
//司机用户名 //司机用户名
driverUserName:'lisan', driverUserName:'lisan',
} }
}, },
mounted() { mounted() {
...@@ -93,34 +101,110 @@ export default { ...@@ -93,34 +101,110 @@ export default {
changeOver(item){ changeOver(item){
this.selectModule = item.componentName; this.selectModule = item.componentName;
if(item.componentName == 'dataScreening'){ 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'){ 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'){ 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'){ 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'){ if(item.componentName == 'backstage'){
let routeUrl = this.$router.resolve({ this.isShow.dataScreening = false;
path: "/dashboard", this.isShow.carManagement = false;
}); this.isShow.intelligentSchedul = false;
window.open(routeUrl.href, '_blank'); 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'){ if(item.componentName == 'toVideoSurveillance'){
let routeUrl = this.$router.resolve({ this.isShow.dataScreening = false;
path: "/monitoringManagement/mineVideo", this.isShow.carManagement = false;
}); this.isShow.intelligentSchedul = false;
window.open(routeUrl.href, '_blank'); 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(){ showSpecificInforFn(){
this.selectModule = 'carSpecificInfor'; this.selectModule = 'carSpecificInfor';
this.$refs.carSpecificInforMethod.loadData(this.carName,this.driverUserName); 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 () { 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