成都三号线站台操作代码调整
This commit is contained in:
parent
50c7363791
commit
146d6c2d0b
@ -22,7 +22,7 @@
|
||||
</el-row>
|
||||
<div v-if="DetainTrain">
|
||||
<div
|
||||
style="padding: 15px; margin-bottom: 25px; margin-top: 20px; border: 1px solid lightgray; height: 90px;"
|
||||
style="padding: 15px; margin-bottom: 25px; margin-top: 20px; border: 1px solid lightgray;"
|
||||
>
|
||||
<span class="base-label" style="left: -5px; top: -22px; background: #ECE9D8; padding: 0 4px;">范围</span>
|
||||
<el-row style="margin-top: -13px;">
|
||||
@ -35,6 +35,7 @@
|
||||
</el-radio>
|
||||
<el-radio
|
||||
v-if="radio1 == 2"
|
||||
:disabled="!isUpDirection"
|
||||
label="02"
|
||||
style="display: block; text-align: left; float: left; margin-right: 10px;"
|
||||
>上行全线
|
||||
@ -42,6 +43,7 @@
|
||||
<el-radio
|
||||
v-if="radio1 == 2"
|
||||
label="03"
|
||||
:disabled="isUpDirection"
|
||||
style="display: block; text-align: left; float: left;"
|
||||
>下行全线</el-radio>
|
||||
</el-col>
|
||||
@ -235,6 +237,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'StandDetainTrain',
|
||||
@ -249,6 +252,7 @@ export default {
|
||||
stationName: '',
|
||||
selected: null,
|
||||
operation: null,
|
||||
isUpDirection:true,
|
||||
radio: '01',
|
||||
radio1: '1',
|
||||
radio2: '1',
|
||||
@ -270,7 +274,8 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'map'
|
||||
'map',
|
||||
'mapConfig'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
@ -381,10 +386,10 @@ export default {
|
||||
this.stationName = '';
|
||||
this.operation = operate.operation;
|
||||
if (selected) {
|
||||
this.standName = selected.direction == '01' ? '下行' : '上行';
|
||||
this.getDirection(selected);
|
||||
}
|
||||
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
||||
this.standName = selected.direction == '01' ? '下行' : '上行';
|
||||
this.getDirection(selected);
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
@ -403,6 +408,15 @@ export default {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
getDirection(selected) {
|
||||
if (this.mapConfig.upDirection === 'right') {
|
||||
this.standName = selected.right ? '上行' : '下行';
|
||||
this.isUpDirection = selected.right;
|
||||
} else if (this.mapConfig.upDirection === 'left') {
|
||||
this.standName = selected.right ? '下行' : '上行';
|
||||
this.isUpDirection = !selected.right;
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
@ -510,94 +524,23 @@ export default {
|
||||
},
|
||||
// 设置扣车
|
||||
setDetainTrain() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.StationStand.setDetainTrain.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
if (!valid) {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
this.sendCommand(menuOperate.StationStand.setDetainTrain);
|
||||
},
|
||||
// 取消扣车
|
||||
cancelDetainTrain() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: this.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN,
|
||||
param: {
|
||||
standAllLine: `${this.radio}`
|
||||
}
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
if (!valid) {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
|
||||
this.sendCommand(menuOperate.StationStand.cancelDetainTrain);
|
||||
} else {
|
||||
this.sendCommand(menuOperate.StationStand.cancelDetainTrainAll);
|
||||
}
|
||||
},
|
||||
// 设置跳停
|
||||
setJumpStop() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.StationStand.setJumpStop.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_JUMP_STOP,
|
||||
param: {
|
||||
trainGroupNumber: `${this.tripNumber}`
|
||||
}
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
this.sendCommand(menuOperate.StationStand.setJumpStop, {trainGroupNumber:this.tripNumber});
|
||||
},
|
||||
// 取消跳停
|
||||
cancelJumpStop() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP,
|
||||
param: {
|
||||
trainGroupNumber: `${this.tripNumber}`
|
||||
}
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
this.sendCommand(menuOperate.StationStand.cancelJumpStop, {trainGroupNumber:this.tripNumber});
|
||||
},
|
||||
// 设置停站时间
|
||||
setStopTime() {
|
||||
@ -647,11 +590,23 @@ export default {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
sendCommand(operate, param) {
|
||||
this.loading = true;
|
||||
commitOperate(operate, param, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(error.message);
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.loading = false;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
|
@ -114,6 +114,7 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'mapConfig',
|
||||
'stationList'
|
||||
]),
|
||||
show() {
|
||||
@ -155,7 +156,7 @@ export default {
|
||||
// }
|
||||
// }
|
||||
this.modelData = {
|
||||
stopTime: selected.parkingTime ? selected.parkingTime : '自动',
|
||||
stopTime: selected.parkingTime == 0 ? '自动' : `${selected.parkingTime} 秒`,
|
||||
runLevel: this.runLevelList[selected.runLevelTime],
|
||||
detainCar: selected.stationHoldTrain || selected.centerHoldTrain ? '已设置' : '无扣车',
|
||||
jumpStop: selected.allSkip || selected.assignSkip ? '已设置' : '无跳停'
|
||||
@ -166,8 +167,13 @@ export default {
|
||||
if (!this.dialogShow) {
|
||||
this.standName = '';
|
||||
this.stationName = '';
|
||||
debugger;
|
||||
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
||||
this.standName = selected.direction == '01' ? '下行' : '上行';
|
||||
if (this.mapConfig.upDirection === 'right') {
|
||||
this.standName = selected.right ? '上行' : '下行';
|
||||
} else if (this.mapConfig.upDirection === 'left') {
|
||||
this.standName = selected.right ? '下行' : '上行';
|
||||
}
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
@ -187,9 +193,7 @@ export default {
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
// over: true,
|
||||
operation: OperationEvent.Command.close.confirm.operation
|
||||
// cmdType: CMD.Stand.CMD_STAND_VIEW_STATUS
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
|
@ -13,7 +13,7 @@
|
||||
</div>
|
||||
<div v-if="auto" class="card">
|
||||
<QueryListPage ref="pageRules" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" class="queryList" />
|
||||
<addFault v-if="isAdd" @closeAddRules="closeAddRules" @reload="reloadTable" />
|
||||
<addFault v-if="isAdd" ref="addFault" @closeAddRules="closeAddRules" @reload="reloadTable" />
|
||||
</div>
|
||||
<!-- <span slot="footer" class="dialog-footer"> -->
|
||||
<span class="faultChooseFoot">
|
||||
@ -200,7 +200,9 @@ export default {
|
||||
closeFaultChoose() {
|
||||
this.dialogShow = false;
|
||||
this.isAdd = false;
|
||||
this.$refs.addFault.resetForm();
|
||||
if (this.$refs.addFault) {
|
||||
this.$refs.addFault.resetForm();
|
||||
}
|
||||
},
|
||||
closeAddRules() {
|
||||
this.isAdd = false;
|
||||
|
Loading…
Reference in New Issue
Block a user