Commit 4716624e authored by xxx's avatar xxx

1

parent 03b4f811
...@@ -194,6 +194,38 @@ ...@@ -194,6 +194,38 @@
</div> </div>
</div> </div>
<!-- 人工调度组件 -->
<div class="peopleScheAssembly" v-if="peopleScheAssemblyShow">
<div style="color:white;font-size:14px;margin-bottom:1vh;font-size: 18px;font-weight: 600;">人工调度详情</div>
<el-form size="small" label-width="100px" :rules="rules">
<el-form-item label="目的地" style="display: inline-block;" class="des1">
<el-select v-model="desform.destination" placeholder="请选择目的地" style="width:200px;">
<el-option v-for="(obj,index) in destinationDataAll" :label="obj.number ? obj.number : obj.name" :value="obj.number ? obj.number : obj.name" :key="index"></el-option>
</el-select>
</el-form-item>
<el-form-item label="时长" style="display: inline-block;" class="des1">
<el-select v-model="desform.duration" placeholder="请选择调度时长" style="width:200px;">
<el-option label="单次" value="单次"></el-option>
<el-option label="一天" value="一天"></el-option>
<el-option label="长期" value="长期"></el-option>
</el-select>
</el-form-item>
<el-form-item label="截止日期" style="display: inline-block;" class="des1">
<el-date-picker v-model="desform.endTime" type="datetime" placeholder="选择日期时间" style="width:200px;" :disabled='desform.duration != "长期" '></el-date-picker>
</el-form-item>
<el-form-item label="说明" style="display: inline-block;" class="des1">
<el-input type="textarea" v-model="desform.carshow" style="width:200px;"></el-input>
</el-form-item>
</el-form>
<div class="peopleScheAssemblyBtns">
<el-button type="primary" style="height:40px;width:100px;font-size: 16px;" round @click="peopleScheAssemblyFn()">确定</el-button>
<el-button style="height:40px;width:100px;font-size: 16px;" round @click="peopleScheAssemblyCloseFn()">取消</el-button>
</div>
</div>
</div> </div>
</template> </template>
...@@ -241,6 +273,16 @@ export default { ...@@ -241,6 +273,16 @@ export default {
srcUrl:null, srcUrl:null,
resultBlob:null, resultBlob:null,
//人工调度配置
desform:{},
destinationDataAll:[],//人工调度调度目的地列表
peopleScheAssemblyShow:false,
rules: {
// odd: [
// {required: true, message: '请输入调度单号', trigger: 'blur' }
// ],
},
//录音相关数据 //录音相关数据
type:"mp3", type:"mp3",
bitRate:16, bitRate:16,
...@@ -263,6 +305,8 @@ export default { ...@@ -263,6 +305,8 @@ export default {
this.dialogVisible = false; this.dialogVisible = false;
this.selectCarRadioArray = []; this.selectCarRadioArray = [];
this.tanchuCarListArray = []; this.tanchuCarListArray = [];
this.peopleScheAssemblyShow = false;
this.desform = {},
this.$nextTick(()=>{ this.$nextTick(()=>{
//车队信息 //车队信息
...@@ -277,17 +321,17 @@ export default { ...@@ -277,17 +321,17 @@ export default {
HttpReq.truckDispatching.recentNoticeQuery({size:50,sort:'id,desc'}).then((res) => { HttpReq.truckDispatching.recentNoticeQuery({size:50,sort:'id,desc'}).then((res) => {
if(res.code == 200){ if(res.code == 200){
this.recentNoticeData = res.data.content; this.recentNoticeData = res.data.content;
let flag0 = []; // let flag0 = [];
this.recentNoticeData.forEach((item)=>{ // this.recentNoticeData.forEach((item)=>{
if(item.flag == 0){ // if(item.flag == 0){
flag0.push(item); // flag0.push(item);
} // }
}) // })
if(flag0.length == 0){ // if(flag0.length == 0){
this.dispatchBtnTitle = '人工调度'; // this.dispatchBtnTitle = '人工调度';
}else{ // }else{
this.dispatchBtnTitle = flag0[0].noticeClass; // this.dispatchBtnTitle = flag0[0].noticeClass;
} // }
}; };
}) })
//智能调度情况 //智能调度情况
...@@ -344,18 +388,17 @@ export default { ...@@ -344,18 +388,17 @@ export default {
HttpReq.truckDispatching.recentNoticeQuery({size:50,sort:'id,desc'}).then((res) => { HttpReq.truckDispatching.recentNoticeQuery({size:50,sort:'id,desc'}).then((res) => {
if(res.code == 200){ if(res.code == 200){
this.recentNoticeData = res.data.content; this.recentNoticeData = res.data.content;
let flag0 = []; // let flag0 = [];
this.recentNoticeData.forEach((item)=>{ // this.recentNoticeData.forEach((item)=>{
if(item.flag == 0){ // if(item.flag == 0){
flag0.push(item); // flag0.push(item);
} // }
}) // })
if(flag0.length == 0){ // if(flag0.length == 0){
this.dispatchBtnTitle = '人工调度'; // this.dispatchBtnTitle = '人工调度';
}else{ // }else{
this.dispatchBtnTitle = flag0[0].noticeClass; // this.dispatchBtnTitle = flag0[0].noticeClass;
} // }
}; };
}) })
//智能调度情况 //智能调度情况
...@@ -429,6 +472,13 @@ export default { ...@@ -429,6 +472,13 @@ export default {
HttpReq.truckDispatching.carInformationQuery(query).then((res) => { HttpReq.truckDispatching.carInformationQuery(query).then((res) => {
if(res.code == 200){ if(res.code == 200){
this.carsInforData = res.data.content; this.carsInforData = res.data.content;
let destination1 = [];
res.data.content.forEach((item,index)=>{
if(item.carclass == '铲车'){
destination1.push(item);
}
})
this.destinationDataAll = destination1;
}; };
}) })
}, },
...@@ -474,22 +524,25 @@ export default { ...@@ -474,22 +524,25 @@ export default {
this.tanchuCarListArray = this.selectCarRadioArray; this.tanchuCarListArray = this.selectCarRadioArray;
} }
this.dialogVisible = true; this.dialogVisible = true;
//关闭人工调度组件
this.peopleScheAssemblyShow = false;
this.desform = {};
}, },
//取消发送语音 //取消发送语音
quxiaoVideo(){ quxiaoVideo(){
this.dialogVisible = false; this.dialogVisible = false;
this.selectCarRadioArray = [];
this.tanchuCarListArray = []; this.tanchuCarListArray = [];
this.selectCarRadioArray = [];
}, },
//人工调度和智能调度切换 //人工调度和智能调度切换
todispatchChange(){ todispatchChange(){
if(this.dispatchBtnTitle == '人工调度'){ if(this.dispatchBtnTitle == '人工调度'){
this.dispatchBtnTitle = '智能调度'; this.peopleScheAssemblyShow = true;
this.dispatchBtnTitle1 = '人工调度'; // this.dispatchBtnTitle = '智能调度';
// this.dispatchBtnTitle1 = '人工调度';
}else{ }else{
this.dispatchBtnTitle = '人工调度'; this.dispatchBtnTitle = '人工调度';
this.dispatchBtnTitle1 = '智能调度'; this.dispatchBtnTitle1 = '智能调度';
}
HttpReq.truckDispatching.recentNoticeAdd({noticeClass:this.dispatchBtnTitle1,flag:0}).then((res) => { HttpReq.truckDispatching.recentNoticeAdd({noticeClass:this.dispatchBtnTitle1,flag:0}).then((res) => {
if(res.code == 200){ if(res.code == 200){
this.$notify({ this.$notify({
...@@ -504,7 +557,71 @@ export default { ...@@ -504,7 +557,71 @@ export default {
}; };
}) })
//发起添加调度类型 //发起添加调度类型
HttpReq.truckDispatching.screenDispatchWayAdd({dispatcher:this.dispatchBtnTitle1}).then((res) => { }) HttpReq.truckDispatching.screenDispatchWayAdd({dispatcher:this.dispatchBtnTitle1}).then((res) => {})
}else{
this.$notify({
title: res.msg,
type: 'error',
duration: 2500
})
}
}).catch(function(error) {});
}
//关闭发起通知组件
this.dialogVisible = false;
this.tanchuCarListArray = [];
},
//发起人工调度
peopleScheAssemblyFn(){
if(JSON.stringify(this.selectCarRadioArray) == '[]'){
this.$notify({
title: '请选择调度车辆!',
type: 'warning',
duration: 2500
});
return
}
if(!this.desform.destination){
this.$notify({
title: '请选择调度目的地!',
type: 'warning',
duration: 2500
});
return
}
if(!this.desform.duration){
this.$notify({
title: '请选择调度时长!',
type: 'warning',
duration: 2500
});
return
}
if(this.desform.duration == '长期' && !this.desform.endTime){
this.$notify({
title: '请选择调度截止日期!',
type: 'warning',
duration: 2500
});
return
}
this.selectCarRadioArray.forEach((item,index)=>{
let query1 = {...this.desform};
query1.carNo = item;
HttpReq.truckDispatching.manualSchedulingAdd(query1).then((res) => {
if(res.code == 200){
}else{
this.$notify({
title: res.msg,
type: 'error',
duration: 2500
})
}
}).catch(function(error) { });
HttpReq.truckDispatching.manualOrderAdd(query1).then((res) => {
if(res.code == 200){
}else{ }else{
this.$notify({ this.$notify({
title: res.msg, title: res.msg,
...@@ -513,6 +630,44 @@ export default { ...@@ -513,6 +630,44 @@ export default {
}) })
} }
}).catch(function(error) { }); }).catch(function(error) { });
})
this.$notify({
title: '人工调度发起成功!',
type: 'success',
duration: 2500
});
this.peopleScheAssemblyShow = false;
this.desform = {},
this.selectCarRadioArray = [];
//切换智能调度
this.dispatchBtnTitle = '智能调度';
this.dispatchBtnTitle1 = '人工调度';
HttpReq.truckDispatching.recentNoticeAdd({noticeClass:this.dispatchBtnTitle1,flag:0}).then((res) => {
if(res.code == 200){
//近期通知列表
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) {});
},
//取消人工调度
peopleScheAssemblyCloseFn(){
this.peopleScheAssemblyShow = false;
this.desform = {};
this.selectCarRadioArray = [];
}, },
//车辆区域分布Echarts //车辆区域分布Echarts
carsAreaDistributionEcharts(){ carsAreaDistributionEcharts(){
...@@ -1529,4 +1684,30 @@ dd>div{ ...@@ -1529,4 +1684,30 @@ dd>div{
color: rgb(24,228,240); color: rgb(24,228,240);
text-align: center; text-align: center;
} }
.peopleScheAssembly{
position: absolute;
bottom: 10vh;
left: 20vw;
height: 50vh;
width: 40vh;
z-index: 3;
background:no-repeat center center url('~@/assets/images/cutGraph/guzhangshenbankuang1.png');
background-size:100% 100%;
padding: 10px 10px 0px;
box-sizing: border-box;
}
.peopleScheAssemblyBtns{
position: absolute;
bottom: 5px;
padding: 0 15% 10px;
box-sizing: border-box;
}
</style>
<style>
.des1 .el-form-item__label{
color: white;
font-size: 15px;
}
</style> </style>
\ No newline at end of file
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