This commit is contained in:
joylink_cuiweidong 2022-07-25 17:50:04 +08:00
commit 5f77691e8c
3 changed files with 1157 additions and 5 deletions

File diff suppressed because it is too large Load Diff

View File

@ -15,7 +15,7 @@
<div style="width: 96%;"> <div style="width: 96%;">
<el-form-item label="限速值:" label-width="95px" prop="speedLimit"> <el-form-item label="限速值:" label-width="95px" prop="speedLimit">
<div style="display: flex;align-items: center;"> <div style="display: flex;align-items: center;">
<el-input v-model="addModel.speedLimit" style="width: 130px;margin-right: 10px;" size="small" /> <el-input v-model="addModel.speedLimit" style="width: 115px;margin-right: 10px;" size="small" />
<span>km/h</span> <span>km/h</span>
<el-tooltip style="margin-left: 10px;" effect="dark" content="值为5-65之间-1为取消限速" placement="top-start"> <el-tooltip style="margin-left: 10px;" effect="dark" content="值为5-65之间-1为取消限速" placement="top-start">
<i class="el-icon-warning" /> <i class="el-icon-warning" />
@ -135,7 +135,7 @@ export default {
}; };
commitTrainSend(group, param).then(({valid, operate})=>{ commitTrainSend(group, param).then(({valid, operate})=>{
this.doClose(); this.doClose();
}).catch((error) => { }).catch(() => {
this.$refs.noticeInfo.doShow(); this.$refs.noticeInfo.doShow();
this.doClose(); this.doClose();
}); });

View File

@ -9,6 +9,7 @@
<train-delete-number ref="trainDeleteNumber" /> <train-delete-number ref="trainDeleteNumber" />
<train-detail-info ref="trainDetailInfo" /> <train-detail-info ref="trainDetailInfo" />
<set-fault ref="setFault" pop-class="chengdou-03__systerm" /> <set-fault ref="setFault" pop-class="chengdou-03__systerm" />
<speed-limit ref="speedLimit" pop-class="chengdou-03__systerm" />
<!-- <train-set-plan ref="trainSetPlan" /> --> <!-- <train-set-plan ref="trainSetPlan" /> -->
<update-trip ref="updateTrip" /> <update-trip ref="updateTrip" />
</div> </div>
@ -33,6 +34,7 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import { menuOperate, commitOperate, commitTrainSend } from '@/jmapNew/theme/components/utils/menuOperate'; import { menuOperate, commitOperate, commitTrainSend } from '@/jmapNew/theme/components/utils/menuOperate';
import SpeedLimit from '@/jmapNew/theme/components/menus/dialog/trainSpeedLimit';
export default { export default {
name: 'MenuTrain', name: 'MenuTrain',
@ -46,7 +48,8 @@ export default {
TrainDeleteNumber, TrainDeleteNumber,
TrainDetailInfo, TrainDetailInfo,
SetFault, SetFault,
UpdateTrip UpdateTrip,
SpeedLimit
// TrainSetPlan // TrainSetPlan
}, },
mixins: [ mixins: [
@ -190,6 +193,10 @@ export default {
label: '越红灯行驶', label: '越红灯行驶',
handler: this.handleOverEedLight handler: this.handleOverEedLight
}, },
{
label: '限速指令',
handler: this.handleSpeedLimit
},
// { // {
// label: '', // label: '',
// handler: this.handleDriveTo // handler: this.handleDriveTo
@ -312,6 +319,9 @@ export default {
this.$refs.noticeInfo.doShow(); this.$refs.noticeInfo.doShow();
}); });
}, },
handleSpeedLimit() { //
this.$refs.speedLimit.doShow(this.selected);
},
// //
limitSpeed() { limitSpeed() {
const operate = { const operate = {
@ -597,8 +607,7 @@ export default {
}, },
removeTripNumber() { removeTripNumber() {
commitOperate(menuOperate.Train.removeTrip, {groupNumber:this.selected.groupNumber}, 3).then(({valid, operate})=>{ commitOperate(menuOperate.Train.removeTrip, {groupNumber:this.selected.groupNumber}, 3).then(({valid, operate})=>{
if (valid) { // if (valid) {}
}
}).catch((error)=> { }).catch((error)=> {
console.error(error); console.error(error);
this.$refs.noticeInfo.doShow(); this.$refs.noticeInfo.doShow();