Commit 5567fffd authored by xxx's avatar xxx

1

parent 1d163a1c
......@@ -335,17 +335,17 @@ export default {
HttpReq.truckDispatching.recentNoticeQuery({size:50,sort:'id,desc'}).then((res) => {
if(res.code == 200){
this.recentNoticeData = res.data.content;
let flag0 = [];
this.recentNoticeData.forEach((item)=>{
if(item.flag == 0){
flag0.push(item);
}
})
if(flag0.length == 0){
this.dispatchBtnTitle = '人工调度';
}else{
this.dispatchBtnTitle = flag0[0].noticeClass;
}
// let flag0 = [];
// this.recentNoticeData.forEach((item)=>{
// if(item.flag == 0){
// flag0.push(item);
// }
// })
// if(flag0.length == 0){
// this.dispatchBtnTitle = '人工调度';
// }else{
// this.dispatchBtnTitle = flag0[0].noticeClass;
// }
};
})
//智能调度情况
......@@ -565,31 +565,31 @@ export default {
// this.dispatchBtnTitle = '智能调度';
// this.dispatchBtnTitle1 = '人工调度';
}else{
this.dispatchBtnTitle = '人工调度';
this.dispatchBtnTitle1 = '智能调度';
HttpReq.truckDispatching.recentNoticeAdd({noticeClass:this.dispatchBtnTitle1,flag:0}).then((res) => {
if(res.code == 200){
this.$notify({
title: this.dispatchBtnTitle1 + '发起成功!',
type: 'success',
duration: 2500
});
//近期通知列表
HttpReq.truckDispatching.recentNoticeQuery({size:50,sort:'id,desc',}).then((res) => {
if(res.code == 200){
this.recentNoticeData = res.data.content;
};
})
//发起添加调度类型
HttpReq.truckDispatching.screenDispatchWayAdd({dispatcher:this.dispatchBtnTitle1}).then((res) => {})
}else{
this.$notify({
title: res.msg,
type: 'error',
duration: 2500
})
}
}).catch(function(error) {});
// this.dispatchBtnTitle = '人工调度';
// this.dispatchBtnTitle1 = '智能调度';
// HttpReq.truckDispatching.recentNoticeAdd({noticeClass:this.dispatchBtnTitle1,flag:0}).then((res) => {
// if(res.code == 200){
// this.$notify({
// title: this.dispatchBtnTitle1 + '发起成功!',
// type: 'success',
// duration: 2500
// });
// //近期通知列表
// HttpReq.truckDispatching.recentNoticeQuery({size:50,sort:'id,desc',}).then((res) => {
// if(res.code == 200){
// this.recentNoticeData = res.data.content;
// };
// })
// //发起添加调度类型
// HttpReq.truckDispatching.screenDispatchWayAdd({dispatcher:this.dispatchBtnTitle1}).then((res) => {})
// }else{
// this.$notify({
// title: res.msg,
// type: 'error',
// duration: 2500
// })
// }
// }).catch(function(error) {});
}
//关闭发起通知组件
this.dialogVisible = false;
......@@ -695,7 +695,7 @@ export default {
this.selectCarRadioArray = [];
//切换智能调度
this.dispatchBtnTitle = '智能调度';
this.dispatchBtnTitle = '人工调度';
this.dispatchBtnTitle1 = '人工调度';
HttpReq.truckDispatching.recentNoticeAdd({noticeClass:this.dispatchBtnTitle1,flag:0}).then((res) => {
if(res.code == 200){
......
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