调整宁波三站台实训提示问题
This commit is contained in:
parent
205dda94fb
commit
3c06d0421c
@ -120,7 +120,8 @@ export default {
|
|||||||
ratedValue: 0,
|
ratedValue: 0,
|
||||||
maxTimeValue: '',
|
maxTimeValue: '',
|
||||||
currentTime: 0,
|
currentTime: 0,
|
||||||
ratedValue11: ''
|
ratedValue11: '',
|
||||||
|
changeIgnore: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -181,6 +182,7 @@ export default {
|
|||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
let index = 0;
|
let index = 0;
|
||||||
const stand = this.stationStandList.find((el, i) => { index = i; return el.code == selected.code; });
|
const stand = this.stationStandList.find((el, i) => { index = i; return el.code == selected.code; });
|
||||||
|
this.changeIgnore = !!stand;
|
||||||
this.$refs.table.setCurrentRow(stand);
|
this.$refs.table.setCurrentRow(stand);
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$refs.table.bodyWrapper.scrollTop = index * 20;
|
this.$refs.table.bodyWrapper.scrollTop = index * 20;
|
||||||
@ -191,6 +193,7 @@ export default {
|
|||||||
doClose() {
|
doClose() {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
|
this.changeIgnore = false;
|
||||||
this.$refs.table.setCurrentRow();
|
this.$refs.table.setCurrentRow();
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
},
|
},
|
||||||
@ -218,16 +221,22 @@ export default {
|
|||||||
},
|
},
|
||||||
handleCurrentChange(val) {
|
handleCurrentChange(val) {
|
||||||
if (!val) { return; }
|
if (!val) { return; }
|
||||||
|
this.$store.dispatch('menuOperation/setSelected', {device: val});
|
||||||
|
if (this.changeIgnore) {
|
||||||
|
this.changeIgnore = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
const step = {
|
const step = {
|
||||||
// code: val.code,
|
// code: val.code,
|
||||||
operation: OperationEvent.Command.common.choose.operation,
|
operation: OperationEvent.Command.common.choose.operation,
|
||||||
|
param: {
|
||||||
val: val.code
|
val: val.code
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$store.dispatch('trainingNew/next', step).then(({ valid }) => {
|
this.$store.dispatch('trainingNew/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$store.dispatch('menuOperation/setSelected', {device: val});
|
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow();
|
this.$refs.noticeInfo.doShow();
|
||||||
@ -237,7 +246,9 @@ export default {
|
|||||||
if (!val) { return; }
|
if (!val) { return; }
|
||||||
const step = {
|
const step = {
|
||||||
operation: OperationEvent.Command.common.choose1.operation,
|
operation: OperationEvent.Command.common.choose1.operation,
|
||||||
|
param: {
|
||||||
val: val
|
val: val
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('trainingNew/next', step).then(({ valid }) => {
|
this.$store.dispatch('trainingNew/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
@ -93,7 +93,8 @@ export default {
|
|||||||
station:{},
|
station:{},
|
||||||
stationCode: '',
|
stationCode: '',
|
||||||
stationName:'',
|
stationName:'',
|
||||||
message:''
|
message:'',
|
||||||
|
changeIgnore: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -167,6 +168,7 @@ export default {
|
|||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
const stand = this.centralizedStaionList.find(el => el.code == selected.code);
|
const stand = this.centralizedStaionList.find(el => el.code == selected.code);
|
||||||
|
this.changeIgnore = !!stand;
|
||||||
this.$refs.table.setCurrentRow(stand);
|
this.$refs.table.setCurrentRow(stand);
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
});
|
});
|
||||||
@ -195,6 +197,7 @@ export default {
|
|||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
this.status = true;
|
this.status = true;
|
||||||
this.$store.dispatch('menuOperation/setSelected', {device: {}});
|
this.$store.dispatch('menuOperation/setSelected', {device: {}});
|
||||||
|
this.changeIgnore = false;
|
||||||
this.$refs.table.setCurrentRow();
|
this.$refs.table.setCurrentRow();
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
this.$store.dispatch('socket/shiftMsgQueue');
|
this.$store.dispatch('socket/shiftMsgQueue');
|
||||||
@ -213,16 +216,22 @@ export default {
|
|||||||
},
|
},
|
||||||
handleCurrentChange(val) {
|
handleCurrentChange(val) {
|
||||||
if (!val) { return; }
|
if (!val) { return; }
|
||||||
|
this.$store.dispatch('menuOperation/setSelected', {device: val});
|
||||||
|
if (this.changeIgnore) {
|
||||||
|
this.changeIgnore = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
const step = {
|
const step = {
|
||||||
// code: val.code,
|
// code: val.code,
|
||||||
operation: OperationEvent.Command.common.choose.operation,
|
operation: OperationEvent.Command.common.choose.operation,
|
||||||
|
param: {
|
||||||
val: val.code
|
val: val.code
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$store.dispatch('trainingNew/next', step).then(({ valid }) => {
|
this.$store.dispatch('trainingNew/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$store.dispatch('menuOperation/setSelected', {device: val});
|
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow();
|
this.$refs.noticeInfo.doShow();
|
||||||
|
@ -25,6 +25,7 @@ import { mapGetters } from 'vuex';
|
|||||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
import { judgeStationControl } from '@/jmapNew/theme/components/utils/menuJudge.js';
|
import { judgeStationControl } from '@/jmapNew/theme/components/utils/menuJudge.js';
|
||||||
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StationStandMenu',
|
name: 'StationStandMenu',
|
||||||
@ -58,26 +59,32 @@ export default {
|
|||||||
menuNormal: [
|
menuNormal: [
|
||||||
{
|
{
|
||||||
label: '开放/关闭',
|
label: '开放/关闭',
|
||||||
|
operate: OperationEvent.Command.commandNingBo3.line_stand_openOrClose,
|
||||||
handler: this.handlerOpenOrClose
|
handler: this.handlerOpenOrClose
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '设置/取消扣车',
|
label: '设置/取消扣车',
|
||||||
|
operate: OperationEvent.Command.commandNingBo3.line_stand_holdOrNot,
|
||||||
handler: this.handlerDetain
|
handler: this.handlerDetain
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '设置站间列车数量',
|
label: '设置站间列车数量',
|
||||||
|
operate: OperationEvent.Command.commandNingBo3.line_stand_trainNum,
|
||||||
handler: this.undeveloped
|
handler: this.undeveloped
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '分配停站时间',
|
label: '分配停站时间',
|
||||||
|
operate: OperationEvent.Command.commandNingBo3.line_stand_stopTime,
|
||||||
handler: this.handlerAllocateTime
|
handler: this.handlerAllocateTime
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '授权转移',
|
label: '授权转移',
|
||||||
|
operate: OperationEvent.Command.commandNingBo3.line_stand_transfer,
|
||||||
handler: this.handlerStationTransfer
|
handler: this.handlerStationTransfer
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '显示',
|
label: '显示',
|
||||||
|
operate: OperationEvent.Command.commandNingBo3.line_stand_detail,
|
||||||
handler: this.handlerDetail
|
handler: this.handlerDetail
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -161,20 +168,45 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handlerOpenOrClose() {
|
handlerOpenOrClose(item) {
|
||||||
this.$refs.standControl.rightClickShow('', this.selected);
|
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() {
|
handlerDetain(item) {
|
||||||
this.$refs.standDetain.rightClickShow('', this.selected);
|
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() {
|
handlerAllocateTime(item) {
|
||||||
this.$refs.allocateTime.rightClickShow('', this.selected);
|
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() {
|
handlerStationTransfer(item) {
|
||||||
this.$refs.stationTransfer.rightClickShow('', this.selected);
|
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() {
|
handlerDetail(item) {
|
||||||
this.$refs.standDetail.rightClickShow('', this.selected);
|
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() {
|
undeveloped() {
|
||||||
this.$alert('实现中......', '提示', {
|
this.$alert('实现中......', '提示', {
|
||||||
|
Loading…
Reference in New Issue
Block a user