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(){
......
......@@ -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