调整宁波三站台实训提示问题

This commit is contained in:
dong 2023-01-06 16:50:33 +08:00
parent 205dda94fb
commit 3c06d0421c
3 changed files with 69 additions and 17 deletions

View File

@ -120,7 +120,8 @@ export default {
ratedValue: 0,
maxTimeValue: '',
currentTime: 0,
ratedValue11: ''
ratedValue11: '',
changeIgnore: false
};
},
computed: {
@ -181,6 +182,7 @@ export default {
this.$nextTick(function () {
let index = 0;
const stand = this.stationStandList.find((el, i) => { index = i; return el.code == selected.code; });
this.changeIgnore = !!stand;
this.$refs.table.setCurrentRow(stand);
setTimeout(() => {
this.$refs.table.bodyWrapper.scrollTop = index * 20;
@ -191,6 +193,7 @@ export default {
doClose() {
this.loading = false;
this.dialogShow = false;
this.changeIgnore = false;
this.$refs.table.setCurrentRow();
this.$store.dispatch('training/emitTipFresh');
},
@ -218,16 +221,22 @@ export default {
},
handleCurrentChange(val) {
if (!val) { return; }
this.$store.dispatch('menuOperation/setSelected', {device: val});
if (this.changeIgnore) {
this.changeIgnore = false;
return;
}
const step = {
// code: val.code,
operation: OperationEvent.Command.common.choose.operation,
param: {
val: val.code
}
};
this.$store.dispatch('trainingNew/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$store.dispatch('menuOperation/setSelected', {device: val});
}
}).catch(() => {
this.$refs.noticeInfo.doShow();
@ -237,7 +246,9 @@ export default {
if (!val) { return; }
const step = {
operation: OperationEvent.Command.common.choose1.operation,
param: {
val: val
}
};
this.$store.dispatch('trainingNew/next', step).then(({ valid }) => {
if (valid) {

View File

@ -93,7 +93,8 @@ export default {
station:{},
stationCode: '',
stationName:'',
message:''
message:'',
changeIgnore: false
};
},
computed: {
@ -167,6 +168,7 @@ export default {
this.dialogShow = true;
this.$nextTick(function () {
const stand = this.centralizedStaionList.find(el => el.code == selected.code);
this.changeIgnore = !!stand;
this.$refs.table.setCurrentRow(stand);
this.$store.dispatch('training/emitTipFresh');
});
@ -195,6 +197,7 @@ export default {
this.dialogShow = false;
this.status = true;
this.$store.dispatch('menuOperation/setSelected', {device: {}});
this.changeIgnore = false;
this.$refs.table.setCurrentRow();
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('socket/shiftMsgQueue');
@ -213,16 +216,22 @@ export default {
},
handleCurrentChange(val) {
if (!val) { return; }
this.$store.dispatch('menuOperation/setSelected', {device: val});
if (this.changeIgnore) {
this.changeIgnore = false;
return;
}
const step = {
// code: val.code,
operation: OperationEvent.Command.common.choose.operation,
param: {
val: val.code
}
};
this.$store.dispatch('trainingNew/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$store.dispatch('menuOperation/setSelected', {device: val});
}
}).catch(() => {
this.$refs.noticeInfo.doShow();

View File

@ -25,6 +25,7 @@ import { mapGetters } from 'vuex';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { judgeStationControl } from '@/jmapNew/theme/components/utils/menuJudge.js';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'StationStandMenu',
@ -58,26 +59,32 @@ export default {
menuNormal: [
{
label: '开放/关闭',
operate: OperationEvent.Command.commandNingBo3.line_stand_openOrClose,
handler: this.handlerOpenOrClose
},
{
label: '设置/取消扣车',
operate: OperationEvent.Command.commandNingBo3.line_stand_holdOrNot,
handler: this.handlerDetain
},
{
label: '设置站间列车数量',
operate: OperationEvent.Command.commandNingBo3.line_stand_trainNum,
handler: this.undeveloped
},
{
label: '分配停站时间',
operate: OperationEvent.Command.commandNingBo3.line_stand_stopTime,
handler: this.handlerAllocateTime
},
{
label: '授权转移',
operate: OperationEvent.Command.commandNingBo3.line_stand_transfer,
handler: this.handlerStationTransfer
},
{
label: '显示',
operate: OperationEvent.Command.commandNingBo3.line_stand_detail,
handler: this.handlerDetail
}
],
@ -161,20 +168,45 @@ export default {
}
});
},
handlerOpenOrClose() {
this.$refs.standControl.rightClickShow('', this.selected);
handlerOpenOrClose(item) {
const operate = {
code: this.selected.code,
operation: item.operate.operation
};
this.$store.dispatch('trainingNew/next', operate);
this.$refs.standControl.rightClickShow(item.operate, this.selected);
},
handlerDetain() {
this.$refs.standDetain.rightClickShow('', this.selected);
handlerDetain(item) {
const operate = {
code: this.selected.code,
operation: item.operate.operation
};
this.$store.dispatch('trainingNew/next', operate);
this.$refs.standDetain.rightClickShow(item.operate, this.selected);
},
handlerAllocateTime() {
this.$refs.allocateTime.rightClickShow('', this.selected);
handlerAllocateTime(item) {
const operate = {
code: this.selected.code,
operation: item.operate.operation
};
this.$store.dispatch('trainingNew/next', operate);
this.$refs.allocateTime.rightClickShow(item.operate, this.selected);
},
handlerStationTransfer() {
this.$refs.stationTransfer.rightClickShow('', this.selected);
handlerStationTransfer(item) {
const operate = {
code: this.selected.code,
operation: item.operate.operation
};
this.$store.dispatch('trainingNew/next', operate);
this.$refs.stationTransfer.rightClickShow(item.operate, this.selected);
},
handlerDetail() {
this.$refs.standDetail.rightClickShow('', this.selected);
handlerDetail(item) {
const operate = {
code: this.selected.code,
operation: item.operate.operation
};
this.$store.dispatch('trainingNew/next', operate);
this.$refs.standDetail.rightClickShow(item.operate, this.selected);
},
undeveloped() {
this.$alert('实现中......', '提示', {