宁波三号线 操作调整

This commit is contained in:
joylink_cuiweidong 2021-02-02 10:57:41 +08:00
parent dbdfe26e86
commit 2ca7c33966
5 changed files with 111 additions and 112 deletions

View File

@ -700,7 +700,6 @@ export default {
if (station.controlMode == 'Local' || station.controlMode == 'Emergency') {
if (buttonOperation && this.commandTypeList.includes(model._type)) {
this.deviceList.push(model);
// debugger;
if (buttonOperation === this.Signal.arrangementRoute.button.operation) {
this.arrangementRouteOperation(this.deviceList);
} else if (buttonOperation === this.MixinCommand.totalCancel.button.operation) {

View File

@ -2,11 +2,11 @@
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="800px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-row>
<el-table
:id="domIdChoose"
ref="table"
:data="stationStandList"
highlight-current-row
height="150px"
:id="domIdChoose"
@current-change="handleCurrentChange"
>
<el-table-column prop="name" label="站台" />
@ -49,7 +49,7 @@
</div>
<el-row style="text-align: center;padding: 10px 0;">
<el-col :span="8">当前值</el-col>
<el-col :span="8" :id="domIdChoose1">
<el-col :id="domIdChoose1" :span="8">
<el-input-number v-model="currentTime" controls-position="right" size="mini" :min="0" :max="999" style="width: 100px;" @change="handleTimeChange" />
</el-col>
</el-row>
@ -129,25 +129,25 @@ export default {
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
selected() {
return this.$store.state.menuOperation.selected;
},
},
selected() {
return this.$store.state.menuOperation.selected;
},
domIdChoose() {
return this.dialogShow ? OperationEvent.Command.common.choose.domId : ''
},
domIdChoose1() {
return this.dialogShow ? OperationEvent.Command.common.choose1.domId : ''
},
return this.dialogShow ? OperationEvent.Command.common.choose.domId : '';
},
domIdChoose1() {
return this.dialogShow ? OperationEvent.Command.common.choose1.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.common.confirm.domId : '';
},
domIdClose() {
},
domIdClose() {
return this.dialogShow ? OperationEvent.Command.common.close.domId : '';
},
domIdApply() {
return this.dialogShow ? OperationEvent.Command.common.apply.domId : '';
},
},
title() {
return '分配停站时间';
}
@ -157,13 +157,13 @@ export default {
if (this.show) {
this.commit();
}
},
'selected': function(val) {
if (this.selected) {
const stand = this.$store.getters['map/getDeviceByCode'](this.selected.code);
this.currentTime = stand.parkingTime
}
}
},
'selected': function(val) {
if (this.selected && this.selected.code) {
const stand = this.$store.getters['map/getDeviceByCode'](this.selected.code);
this.currentTime = stand.parkingTime;
}
}
},
mounted() {
this.$nextTick(() => {
@ -175,7 +175,7 @@ export default {
//
this.dialogShow = true;
this.$nextTick(function () {
this.$refs.table.setCurrentRow();
this.$refs.table.setCurrentRow();
this.$store.dispatch('training/emitTipFresh');
});
},
@ -186,15 +186,15 @@ export default {
this.$store.dispatch('training/emitTipFresh');
},
commit(isClose = false) {
const step = {
const step = {
over: true,
cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME,
operation: isClose? OperationEvent.Command.common.confirm.operation: OperationEvent.Command.common.apply.operation,
operation: isClose ? OperationEvent.Command.common.confirm.operation : OperationEvent.Command.common.apply.operation,
param: {
standCode: this.selected.code,
parkingTime: this.currentTime,
parkingAlwaysValid: false
}
standCode: this.selected.code,
parkingTime: this.currentTime,
parkingAlwaysValid: false
}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
@ -205,40 +205,40 @@ export default {
}).catch((error) => {
isClose && this.doClose();
this.$refs.noticeInfo.doShow();
});
},
});
},
handleCurrentChange(val) {
if (!val) { return; }
if (!val) { return; }
const step = {
code: val.code,
code: val.code,
operation: OperationEvent.Command.common.choose.operation,
val: val.code
};
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$store.dispatch('menuOperation/setSelected', {device: val});
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$store.dispatch('menuOperation/setSelected', {device: val});
}
}).catch(() => {
this.$refs.noticeInfo.doShow();
});
},
handleTimeChange(val) {
if (!val) { return; }
});
},
handleTimeChange(val) {
if (!val) { return; }
const step = {
operation: OperationEvent.Command.common.choose1.operation,
val: val
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.currentTime = val;
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.currentTime = val;
}
}).catch(() => {
this.$refs.noticeInfo.doShow();
});
},
});
},
getParkingTime(code) {
const stand = this.$store.getters['map/getDeviceByCode'](code);
return stand.parkingTime;

View File

@ -3,11 +3,11 @@
<el-row>
<el-col :span="18">
<el-table
ref="table"
:id="domIdChoose"
ref="table"
:data="filterSignalList"
height="350px"
highlight-current-row
:id="domIdChoose"
@current-change="handleCurrentChange"
>
<el-table-column prop="name" label="ID" />
@ -59,10 +59,10 @@ export default {
},
data() {
return {
status: false,
operate: null,
signalModel: true,
signalDisabled: true,
status: false,
operate: null,
signalModel: true,
signalDisabled: true,
allChecked: false,
dialogShow: false,
loading: false
@ -74,25 +74,25 @@ export default {
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
selected() {
return this.$store.state.menuOperation.selected;
},
},
selected() {
return this.$store.state.menuOperation.selected;
},
filterSignalList() {
return this.signalList.map(el => {
return this.$store.getters['map/getDeviceByCode'](el.code);
})
},
domIdChoose() {
return this.dialogShow ? OperationEvent.Command.common.choose.domId : ''
});
},
domIdChoose() {
return this.dialogShow ? OperationEvent.Command.common.choose.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.common.confirm.domId : '';
},
domIdApply() {
},
domIdApply() {
return this.dialogShow ? OperationEvent.Command.common.apply.domId : '';
},
domIdClose() {
},
domIdClose() {
return this.dialogShow ? OperationEvent.Command.common.close.domId : '';
},
title() {
@ -104,15 +104,15 @@ export default {
if (this.show) {
this.commit();
}
},
'selected': function(val) {
console.log(this.selected)
if (this.selected) {
const signal = this.$store.getters['map/getDeviceByCode'](this.selected.code);
this.signalModel = !!signal.redOpen
this.signalDisabled = !this.signalModel;
}
}
},
'selected': function(val) {
console.log(this.selected);
if (this.selected && this.selected.code) {
const signal = this.$store.getters['map/getDeviceByCode'](this.selected.code);
this.signalModel = !!signal.redOpen;
this.signalDisabled = !this.signalModel;
}
}
},
mounted() {
this.$nextTick(() => {
@ -121,56 +121,56 @@ export default {
},
methods: {
handleCurrentChange(val) {
if (!val) { return; }
if (!val) { return; }
const step = {
code: val.code,
code: val.code,
operation: OperationEvent.Command.common.choose.operation,
val: val.code
};
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$store.dispatch('menuOperation/setSelected', {device: val});
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$store.dispatch('menuOperation/setSelected', {device: val});
this.$refs.table.setCurrentRow(this.selected);
}
}).catch(() => {
console.log()
console.log();
this.$refs.noticeInfo.doShow();
});
});
},
doShow(operate) {
this.operate = operate;
this.operate = operate;
//
this.dialogShow = true;
this.$nextTick(function () {
this.$refs.table.setCurrentRow();
this.$refs.table.setCurrentRow();
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$refs.table.setCurrentRow();
this.dialogShow = false;
this.$refs.table.setCurrentRow();
this.$store.dispatch('training/emitTipFresh');
},
commit(isClose = false) {
const step = {
cmdType: this.signalModel ? CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL : CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL,
operation: isClose ? OperationEvent.Command.common.confirm.operation: OperationEvent.Command.common.apply.operation,
over: true,
param: { signalCode: this.selected.code }
};
const step = {
cmdType: this.signalModel ? CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL : CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL,
operation: isClose ? OperationEvent.Command.common.confirm.operation : OperationEvent.Command.common.apply.operation,
over: true,
param: { signalCode: this.selected.code }
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
isClose && this.doClose();
}
}).catch(() => {
isClose && this.doClose();
this.$refs.noticeInfo.doShow();
});
});
},
handleClick() {

View File

@ -3,11 +3,11 @@
<el-row>
<el-col :span="16">
<el-table
:id="domIdChoose"
ref="table"
:data="stationStandList"
highlight-current-row
height="350px"
:id="domIdChoose"
@current-change="handleCurrentChange"
>
<el-table-column prop="name" label="站台" />
@ -72,17 +72,17 @@ export default {
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
selected() {
return this.$store.state.menuOperation.selected;
},
},
selected() {
return this.$store.state.menuOperation.selected;
},
domIdChoose() {
return this.dialogShow ? OperationEvent.Command.common.choose.domId : ''
return this.dialogShow ? OperationEvent.Command.common.choose.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.common.confirm.domId : '';
},
domIdClose() {
},
domIdClose() {
return this.dialogShow ? OperationEvent.Command.common.close.domId : '';
},
domIdApply() {
@ -97,14 +97,14 @@ export default {
if (this.show) {
this.commit();
}
},
'selected': function(val) {
if (this.selected) {
const stand = this.$store.getters['map/getDeviceByCode'](this.selected.code);
this.status = !!stand.allSkip
this.standStatus = !this.status;
}
}
},
'selected': function(val) {
if (this.selected && this.selected.code) {
const stand = this.$store.getters['map/getDeviceByCode'](this.selected.code);
this.status = !!stand.allSkip;
this.standStatus = !this.status;
}
}
},
mounted() {
this.$nextTick(() => {
@ -116,7 +116,7 @@ export default {
//
this.dialogShow = true;
this.$nextTick(function () {
this.$refs.table.setCurrentRow();
this.$refs.table.setCurrentRow();
this.$store.dispatch('training/emitTipFresh');
});
},
@ -130,13 +130,13 @@ export default {
const step = {
over: true,
cmdType:this.status ? CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP : CMD.Stand.CMD_STAND_SET_JUMP_STOP,
operation: isClose? OperationEvent.Command.common.confirm.operation: OperationEvent.Command.common.apply.operation,
operation: isClose ? OperationEvent.Command.common.confirm.operation : OperationEvent.Command.common.apply.operation,
param: {standCode: this.selected.code}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
isClose && this.doClose();
}
}).catch((error) => {
@ -157,7 +157,7 @@ export default {
if (!val) { return; }
const standEle = this.$store.getters['map/getDeviceByCode'](val.code);
const step = {
code: val.code,
code: val.code,
operation: OperationEvent.Command.common.choose.operation,
val: val.code
};

View File

@ -30,9 +30,9 @@ class ValidateHandler {
judge (operate) {
const steps = Handler.getSteps();
const order = Handler.getOrder();
let valid = false;
let valid = false;
// console.log(operate, steps[order])
// console.log(operate, steps[order])
if (operate.over && steps.length == 1) { // 右键菜单直接发送校验
if (operate && steps[0] &&
operate.code == steps[0].code &&