Merge branch 'test_dispaly' of https://git.code.tencent.com/lian-cbtc/jl-client into test_dispaly
This commit is contained in:
commit
f9fa1c2dbe
@ -222,16 +222,16 @@ export default {
|
|||||||
this.requestInfo = info;
|
this.requestInfo = info;
|
||||||
this.disabledAgree = true;
|
this.disabledAgree = true;
|
||||||
this.updateTableData(controlTransferList);
|
this.updateTableData(controlTransferList);
|
||||||
const operate = {
|
// const operate = {
|
||||||
start: true,
|
// start: true,
|
||||||
operation: OperationEvent.StationControl.controlResponse.menu.operation
|
// operation: OperationEvent.StationControl.controlResponse.menu.operation
|
||||||
};
|
// };
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
// this.$store.dispatch('training/emitTipFresh');
|
||||||
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
// this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
// if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 后端倒计时
|
// 后端倒计时
|
||||||
|
@ -427,7 +427,7 @@ export default {
|
|||||||
.__socpe {
|
.__socpe {
|
||||||
.el-dialog,
|
.el-dialog,
|
||||||
.el-dialog__wrapper {
|
.el-dialog__wrapper {
|
||||||
pointer-events: none !important;
|
// pointer-events: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-dialog__header,
|
.el-dialog__header,
|
||||||
|
@ -424,7 +424,7 @@ export default {
|
|||||||
.__socpe {
|
.__socpe {
|
||||||
.el-dialog,
|
.el-dialog,
|
||||||
.el-dialog__wrapper {
|
.el-dialog__wrapper {
|
||||||
pointer-events: none !important;
|
// pointer-events: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-dialog__header,
|
.el-dialog__header,
|
||||||
|
@ -120,7 +120,8 @@ export default {
|
|||||||
ratedValue: 0,
|
ratedValue: 0,
|
||||||
maxTimeValue: '',
|
maxTimeValue: '',
|
||||||
currentTime: 0,
|
currentTime: 0,
|
||||||
ratedValue11: ''
|
ratedValue11: '',
|
||||||
|
changeIgnore: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -165,6 +166,11 @@ export default {
|
|||||||
this.currentTime = stand.parkingTime;
|
this.currentTime = stand.parkingTime;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
'$store.state.trainingNew.trainingSwitch': function(val) {
|
||||||
|
if (!val && this.dialogShow) {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -181,6 +187,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 +198,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 +226,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 +251,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) {
|
||||||
|
@ -61,6 +61,7 @@ export default {
|
|||||||
allChecked: false,
|
allChecked: false,
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
|
changeIgnore: false,
|
||||||
operate: '',
|
operate: '',
|
||||||
selectSignalCode: ''
|
selectSignalCode: ''
|
||||||
};
|
};
|
||||||
@ -99,6 +100,11 @@ export default {
|
|||||||
},
|
},
|
||||||
'selected': function(val) {
|
'selected': function(val) {
|
||||||
this.status = !val || val.callOn;
|
this.status = !val || val.callOn;
|
||||||
|
},
|
||||||
|
'$store.state.trainingNew.trainingSwitch': function(val) {
|
||||||
|
if (!val && this.dialogShow) {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -115,9 +121,11 @@ export default {
|
|||||||
this.operate = operate;
|
this.operate = operate;
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.selectSignalCode = selected.code;
|
|
||||||
let index = 0;
|
let index = 0;
|
||||||
this.$refs.table.setCurrentRow(this.signalList.find((el, i) => { index = i; return el.code == selected.code; }));
|
const signal = this.signalList.find((el, i) => { index = i; return el.code == selected.code; });
|
||||||
|
this.changeIgnore = !!signal;
|
||||||
|
this.selectSignalCode = selected.code;
|
||||||
|
this.$refs.table.setCurrentRow(signal);
|
||||||
setTimeout(()=> {
|
setTimeout(()=> {
|
||||||
this.$refs.table.bodyWrapper.scrollTop = index * 20;
|
this.$refs.table.bodyWrapper.scrollTop = index * 20;
|
||||||
}, 200);
|
}, 200);
|
||||||
@ -127,6 +135,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');
|
||||||
},
|
},
|
||||||
@ -170,10 +179,14 @@ export default {
|
|||||||
},
|
},
|
||||||
handleCurrentChange(val) {
|
handleCurrentChange(val) {
|
||||||
if (!val) { return; }
|
if (!val) { return; }
|
||||||
|
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,
|
||||||
val: val.code,
|
// val: val.code,
|
||||||
param: {
|
param: {
|
||||||
signalCode: val.code
|
signalCode: val.code
|
||||||
}
|
}
|
||||||
@ -182,8 +195,8 @@ export default {
|
|||||||
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});
|
|
||||||
}
|
}
|
||||||
|
this.$store.dispatch('menuOperation/setSelected', {device: val});
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow();
|
this.$refs.noticeInfo.doShow();
|
||||||
});
|
});
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
<el-checkbox v-model="checked">显示复制路径</el-checkbox>
|
<el-checkbox v-model="checked">显示复制路径</el-checkbox>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="14" style="padding-left: 8px;">
|
<el-col :span="14" style="padding-left: 8px;">
|
||||||
<el-tabs v-model="activeName" type="card">
|
<el-tabs :id="domIdRouteTabs" v-model="activeName" type="card" @tab-click="handleClick">
|
||||||
<el-tab-pane label="设置进路" name="first">
|
<el-tab-pane label="设置进路" name="first">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="18">
|
<el-col :span="18">
|
||||||
@ -208,6 +208,7 @@ export default {
|
|||||||
checked: false,
|
checked: false,
|
||||||
unlockType: 'auto',
|
unlockType: 'auto',
|
||||||
forbidRoute: false,
|
forbidRoute: false,
|
||||||
|
changeIgnore: false,
|
||||||
route: null
|
route: null
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -259,6 +260,9 @@ export default {
|
|||||||
domIdUnlockType() {
|
domIdUnlockType() {
|
||||||
return this.dialogShow ? OperationEvent.Command.commandNingBo3.Signal_command_unlockType.domId : '';
|
return this.dialogShow ? OperationEvent.Command.commandNingBo3.Signal_command_unlockType.domId : '';
|
||||||
},
|
},
|
||||||
|
domIdRouteTabs() {
|
||||||
|
return this.dialogShow ? OperationEvent.Command.commandNingBo3.Signal_command_routeTabs.domId : '';
|
||||||
|
},
|
||||||
title() {
|
title() {
|
||||||
return '进路命令';
|
return '进路命令';
|
||||||
}
|
}
|
||||||
@ -268,9 +272,23 @@ export default {
|
|||||||
if (this.show) {
|
if (this.show) {
|
||||||
this.commit();
|
this.commit();
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
'$store.state.trainingNew.trainingSwitch': function(val) {
|
||||||
|
if (!val && this.dialogShow) {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleClick() {
|
||||||
|
const step = {
|
||||||
|
operation: OperationEvent.Command.commandNingBo3.Signal_command_routeTabs.operation,
|
||||||
|
param: {
|
||||||
|
activeName: this.activeName
|
||||||
|
}
|
||||||
|
};
|
||||||
|
this.$store.dispatch('trainingNew/next', step);
|
||||||
|
},
|
||||||
changeUnlockType() {
|
changeUnlockType() {
|
||||||
const step = {
|
const step = {
|
||||||
operation: OperationEvent.Command.commandNingBo3.Signal_command_unlockType.operation,
|
operation: OperationEvent.Command.commandNingBo3.Signal_command_unlockType.operation,
|
||||||
@ -293,6 +311,7 @@ export default {
|
|||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
let index = 0;
|
let index = 0;
|
||||||
const signal = this.signalList.find((el, i) => { index = i; return el.code == selected.code; });
|
const signal = this.signalList.find((el, i) => { index = i; return el.code == selected.code; });
|
||||||
|
this.changeIgnore = !!signal;
|
||||||
this.$refs.table.setCurrentRow(signal);
|
this.$refs.table.setCurrentRow(signal);
|
||||||
setTimeout(()=> {
|
setTimeout(()=> {
|
||||||
this.$refs.table.bodyWrapper.scrollTop = index * 20;
|
this.$refs.table.bodyWrapper.scrollTop = index * 20;
|
||||||
@ -314,6 +333,7 @@ export default {
|
|||||||
this.$refs.singleTable4.setCurrentRow();
|
this.$refs.singleTable4.setCurrentRow();
|
||||||
this.activeName = 'first';
|
this.activeName = 'first';
|
||||||
this.unlockType = 'auto';
|
this.unlockType = 'auto';
|
||||||
|
this.changeIgnore = false;
|
||||||
this.$refs.table.bodyWrapper.scrollTop = 0;
|
this.$refs.table.bodyWrapper.scrollTop = 0;
|
||||||
},
|
},
|
||||||
// 始端信号机点击
|
// 始端信号机点击
|
||||||
@ -326,6 +346,10 @@ export default {
|
|||||||
this.tempData.push(item);
|
this.tempData.push(item);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
if (this.changeIgnore) {
|
||||||
|
this.changeIgnore = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
const step = {
|
const step = {
|
||||||
operation: OperationEvent.Command.commandNingBo3.Signal_command_startSignal.operation,
|
operation: OperationEvent.Command.commandNingBo3.Signal_command_startSignal.operation,
|
||||||
param: {
|
param: {
|
||||||
|
@ -82,6 +82,11 @@ export default {
|
|||||||
if (this.show) {
|
if (this.show) {
|
||||||
this.commit();
|
this.commit();
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
'$store.state.trainingNew.trainingSwitch': function(val) {
|
||||||
|
if (!val && this.dialogShow) {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -177,6 +177,11 @@ export default {
|
|||||||
if (this.currentSelect) {
|
if (this.currentSelect) {
|
||||||
this.noInit = this.sure && (this.getCacheMap()[this.currentSelect.code] || {}).done != 'one';
|
this.noInit = this.sure && (this.getCacheMap()[this.currentSelect.code] || {}).done != 'one';
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
'$store.state.trainingNew.trainingSwitch': function(val) {
|
||||||
|
if (!val && this.dialogShow) {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -196,9 +201,12 @@ export default {
|
|||||||
|
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.changeIgnore = sure;
|
this.changeIgnore = true;
|
||||||
this.$refs.singleTable1.setCurrentRow(sure ? this.tempList.find(el => el.code == this.initSelect.code) : null);
|
this.$refs.singleTable1.setCurrentRow(sure ? this.tempList.find(el => el.code == this.initSelect.code) : null);
|
||||||
this.isSetSpeed && this.$refs.singleTable2.setCurrentRow(sure ? this.limitList[this.initParams.value / 5 - 1] : 0);
|
this.isSetSpeed && this.$refs.singleTable2.setCurrentRow(sure ? this.limitList[this.initParams.value / 5 - 1] : 0);
|
||||||
|
setTimeout(()=> {
|
||||||
|
this.changeIgnore = false;
|
||||||
|
}, 200);
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -214,13 +222,15 @@ export default {
|
|||||||
this.currentSelect = this.$store.getters['map/getDeviceByCode'](selected.code);
|
this.currentSelect = this.$store.getters['map/getDeviceByCode'](selected.code);
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.changeIgnore = sure;
|
this.changeIgnore = true;
|
||||||
let index = 0;
|
let index = 0;
|
||||||
const section = this.tempList.find((el, i) => { index = i; return el.code == selected.code; });
|
const section = this.tempList.find((el, i) => { index = i; return el.code == selected.code; });
|
||||||
this.$refs.singleTable1.setCurrentRow(section);
|
this.$refs.singleTable1.setCurrentRow(section);
|
||||||
this.speedLimitValue = this.initParams.value || 0;
|
// this.speedLimitValue = this.initParams.value || 0;
|
||||||
|
this.speedLimitValue = section ? this.getLimitSpeed(section.code) : 0;
|
||||||
setTimeout(()=> {
|
setTimeout(()=> {
|
||||||
this.$refs.singleTable1.bodyWrapper.scrollTop = index * 20;
|
this.$refs.singleTable1.bodyWrapper.scrollTop = index * 20;
|
||||||
|
this.changeIgnore = false;
|
||||||
}, 200);
|
}, 200);
|
||||||
this.$emit('updateDone');
|
this.$emit('updateDone');
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
@ -230,18 +240,19 @@ export default {
|
|||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
this.speedLimitValue = 0;
|
this.speedLimitValue = 0;
|
||||||
this.sure && (this.currentSelect = null);
|
this.currentSelect = null;
|
||||||
this.sure && this.$refs.singleTable1.setCurrentRow();
|
this.$refs.singleTable1.setCurrentRow();
|
||||||
this.sure && this.isSetSpeed && this.$refs.singleTable2.setCurrentRow();
|
this.isSetSpeed && this.$refs.singleTable2.setCurrentRow();
|
||||||
this.sure && this.$root.$emit('iniCacheMap', this.cmdType.value,
|
this.sure && this.$root.$emit('iniCacheMap', this.cmdType.value,
|
||||||
Object.fromEntries(Object.entries(this.getCacheMap()).filter(el => el[1].done == 'done'))
|
Object.fromEntries(Object.entries(this.getCacheMap()).filter(el => el[1].done == 'done'))
|
||||||
);
|
);
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
},
|
},
|
||||||
commit(isClose = true) {
|
commit(isClose = true) {
|
||||||
|
const hasSpeed = this.isSetSpeed ? this.speedLimitValue == this.initParams.value : true;
|
||||||
if (this.currentSelect &&
|
if (this.currentSelect &&
|
||||||
this.currentSelect.code == this.initSelect.code &&
|
this.currentSelect.code == this.initSelect.code &&
|
||||||
this.speedLimitValue == this.initParams.value) {
|
hasSpeed) {
|
||||||
const cacheMap = this.getCacheMap();
|
const cacheMap = this.getCacheMap();
|
||||||
const isOK = this.command && (!this.sure || this.sure && cacheMap[this.currentSelect.code]);
|
const isOK = this.command && (!this.sure || this.sure && cacheMap[this.currentSelect.code]);
|
||||||
const operate = {
|
const operate = {
|
||||||
@ -274,20 +285,21 @@ export default {
|
|||||||
selectLine1(val) {
|
selectLine1(val) {
|
||||||
if (!val) { return; }
|
if (!val) { return; }
|
||||||
this.currentSelect = this.$store.getters['map/getDeviceByCode'](val.code);
|
this.currentSelect = this.$store.getters['map/getDeviceByCode'](val.code);
|
||||||
|
this.sure || this.$emit('initSelect', this.currentSelect, {value: this.isSetSpeed ? this.speedLimitValue : this.getLimitSpeed(val.code)});
|
||||||
this.$emit('updateDone');
|
this.$emit('updateDone');
|
||||||
if (this.changeIgnore) { return; }
|
if (this.changeIgnore) { 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.changeIgnore = false;
|
|
||||||
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.sure || this.$emit('initSelect', this.currentSelect, {value: this.speedLimitValue});
|
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow();
|
this.$refs.noticeInfo.doShow();
|
||||||
@ -296,19 +308,20 @@ export default {
|
|||||||
selectLine2(val) {
|
selectLine2(val) {
|
||||||
if (!val) { return; }
|
if (!val) { return; }
|
||||||
this.speedLimitValue = val.value;
|
this.speedLimitValue = val.value;
|
||||||
|
this.sure || this.$emit('initSelect', this.currentSelect, {value: this.isSetSpeed ? this.speedLimitValue : 0});
|
||||||
this.$emit('updateDone');
|
this.$emit('updateDone');
|
||||||
if (this.changeIgnore) { return; }
|
if (this.changeIgnore) { return; }
|
||||||
|
|
||||||
const step = {
|
const step = {
|
||||||
operation: OperationEvent.Command.common.select.operation,
|
operation: OperationEvent.Command.common.select.operation,
|
||||||
|
param: {
|
||||||
val: val.value
|
val: val.value
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.changeIgnore = false;
|
|
||||||
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.sure || this.$emit('initSelect', this.currentSelect, {value: this.isSetSpeed ? this.speedLimitValue : 0});
|
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow();
|
this.$refs.noticeInfo.doShow();
|
||||||
|
@ -97,6 +97,11 @@ export default {
|
|||||||
if (this.show) {
|
if (this.show) {
|
||||||
this.commit();
|
this.commit();
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
'$store.state.trainingNew.trainingSwitch': function(val) {
|
||||||
|
if (!val && this.dialogShow) {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -141,6 +141,11 @@ export default {
|
|||||||
if (this.currentSelect) {
|
if (this.currentSelect) {
|
||||||
this.noInit = this.sure && (this.getCacheMap()[this.currentSelect.code] || {}).done != 'one';
|
this.noInit = this.sure && (this.getCacheMap()[this.currentSelect.code] || {}).done != 'one';
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
'$store.state.trainingNew.trainingSwitch': function(val) {
|
||||||
|
if (!val && this.dialogShow) {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -161,8 +166,9 @@ export default {
|
|||||||
this.currentSelect = this.$store.getters['map/getDeviceByCode'](this.initSelect.code);
|
this.currentSelect = this.$store.getters['map/getDeviceByCode'](this.initSelect.code);
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.changeIgnore = sure;
|
const section = sure ? this.tempList.find(el => el.code == this.initSelect.code) : null;
|
||||||
this.$refs.table.setCurrentRow(sure ? this.tempList.find(el => el.code == this.initSelect.code) : null);
|
this.changeIgnore = !!section;
|
||||||
|
this.$refs.table.setCurrentRow(section);
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -180,6 +186,7 @@ export default {
|
|||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
let index = 0;
|
let index = 0;
|
||||||
const section = this.tempList.find((el, i) => { index = i; return el.code == selected.code; });
|
const section = this.tempList.find((el, i) => { index = i; return el.code == selected.code; });
|
||||||
|
this.changeIgnore = !!section;
|
||||||
this.$refs.table.setCurrentRow(section);
|
this.$refs.table.setCurrentRow(section);
|
||||||
setTimeout(()=> {
|
setTimeout(()=> {
|
||||||
this.$refs.table.bodyWrapper.scrollTop = index * 20;
|
this.$refs.table.bodyWrapper.scrollTop = index * 20;
|
||||||
@ -191,8 +198,9 @@ export default {
|
|||||||
doClose() {
|
doClose() {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
this.sure && (this.currentSelect = null);
|
this.currentSelect = null;
|
||||||
this.sure && this.$refs.table.setCurrentRow();
|
this.changeIgnore = false;
|
||||||
|
this.$refs.table.setCurrentRow();
|
||||||
this.sure && this.$root.$emit('iniCacheMap', this.cmdType.value,
|
this.sure && this.$root.$emit('iniCacheMap', this.cmdType.value,
|
||||||
Object.fromEntries(Object.entries(this.getCacheMap()).filter(el => el[1].done == 'done'))
|
Object.fromEntries(Object.entries(this.getCacheMap()).filter(el => el[1].done == 'done'))
|
||||||
);
|
);
|
||||||
@ -234,21 +242,25 @@ export default {
|
|||||||
handleChangeLine(val) {
|
handleChangeLine(val) {
|
||||||
if (!val) { return; }
|
if (!val) { return; }
|
||||||
this.currentSelect = this.$store.getters['map/getDeviceByCode'](val.code);
|
this.currentSelect = this.$store.getters['map/getDeviceByCode'](val.code);
|
||||||
|
this.sure || this.$emit('initSelect', this.currentSelect);
|
||||||
this.$emit('updateDone');
|
this.$emit('updateDone');
|
||||||
if (this.changeIgnore) { return; }
|
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.changeIgnore = false;
|
|
||||||
this.$emit('updateDone');
|
this.$emit('updateDone');
|
||||||
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.sure || this.$emit('initSelect', this.currentSelect);
|
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow();
|
this.$refs.noticeInfo.doShow();
|
||||||
|
@ -102,6 +102,11 @@ export default {
|
|||||||
if (this.show) {
|
if (this.show) {
|
||||||
this.commit();
|
this.commit();
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
'$store.state.trainingNew.trainingSwitch': function(val) {
|
||||||
|
if (!val && this.dialogShow) {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -143,6 +143,11 @@ export default {
|
|||||||
if (this.currentSelect) {
|
if (this.currentSelect) {
|
||||||
this.noInit = this.sure && (this.getCacheMap()[this.currentSelect.code] || {}).done != 'one';
|
this.noInit = this.sure && (this.getCacheMap()[this.currentSelect.code] || {}).done != 'one';
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
'$store.state.trainingNew.trainingSwitch': function(val) {
|
||||||
|
if (!val && this.dialogShow) {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -161,8 +166,9 @@ export default {
|
|||||||
this.currentSelect = this.$store.getters['map/getDeviceByCode'](this.initSelect.code);
|
this.currentSelect = this.$store.getters['map/getDeviceByCode'](this.initSelect.code);
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.changeIgnore = sure;
|
const cRow = sure ? this.tempList.find(el => el.code == this.initSelect.code) : null;
|
||||||
this.$refs.table.setCurrentRow(sure ? this.tempList.find(el => el.code == this.initSelect.code) : null);
|
this.changeIgnore = !!cRow;
|
||||||
|
this.$refs.table.setCurrentRow(cRow);
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -178,9 +184,10 @@ export default {
|
|||||||
this.currentSelect = this.$store.getters['map/getDeviceByCode'](selected.code);
|
this.currentSelect = this.$store.getters['map/getDeviceByCode'](selected.code);
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.changeIgnore = sure;
|
|
||||||
let index = 0;
|
let index = 0;
|
||||||
this.$refs.table.setCurrentRow(this.tempList.find((el, i) => { index = i; return el.code == selected.code; }));
|
const cRow = this.tempList.find((el, i) => { index = i; return el.code == selected.code; });
|
||||||
|
this.changeIgnore = !!cRow;
|
||||||
|
this.$refs.table.setCurrentRow(cRow);
|
||||||
setTimeout(()=> {
|
setTimeout(()=> {
|
||||||
this.$refs.table.bodyWrapper.scrollTop = index * 20;
|
this.$refs.table.bodyWrapper.scrollTop = index * 20;
|
||||||
}, 200);
|
}, 200);
|
||||||
@ -191,8 +198,9 @@ export default {
|
|||||||
doClose() {
|
doClose() {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
this.sure && (this.currentSelect = null);
|
this.changeIgnore = false;
|
||||||
this.sure && this.$refs.table.setCurrentRow();
|
this.currentSelect = null;
|
||||||
|
this.$refs.table.setCurrentRow();
|
||||||
this.sure && this.$root.$emit('iniCacheMap', this.cmdType.value,
|
this.sure && this.$root.$emit('iniCacheMap', this.cmdType.value,
|
||||||
Object.fromEntries(Object.entries(this.getCacheMap()).filter(el => el[1].done == 'done'))
|
Object.fromEntries(Object.entries(this.getCacheMap()).filter(el => el[1].done == 'done'))
|
||||||
);
|
);
|
||||||
@ -233,21 +241,25 @@ export default {
|
|||||||
handleCurrentChange(val) {
|
handleCurrentChange(val) {
|
||||||
if (!val) { return; }
|
if (!val) { return; }
|
||||||
this.currentSelect = this.$store.getters['map/getDeviceByCode'](val.code);
|
this.currentSelect = this.$store.getters['map/getDeviceByCode'](val.code);
|
||||||
|
this.sure || this.$emit('initSelect', this.currentSelect);
|
||||||
this.$emit('updateDone');
|
this.$emit('updateDone');
|
||||||
if (this.changeIgnore) { return; }
|
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.changeIgnore = false;
|
|
||||||
this.$emit('updateDone');
|
this.$emit('updateDone');
|
||||||
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.sure || this.$emit('initSelect', this.currentSelect);
|
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow();
|
this.$refs.noticeInfo.doShow();
|
||||||
|
@ -136,6 +136,11 @@ export default {
|
|||||||
if (this.currentSelect) {
|
if (this.currentSelect) {
|
||||||
this.noInit = this.sure && (this.getCacheMap()[this.currentSelect.code] || {}).done != 'one';
|
this.noInit = this.sure && (this.getCacheMap()[this.currentSelect.code] || {}).done != 'one';
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
'$store.state.trainingNew.trainingSwitch': function(val) {
|
||||||
|
if (!val && this.dialogShow) {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -151,8 +156,9 @@ export default {
|
|||||||
this.currentSelect = this.$store.getters['map/getDeviceByCode'](this.initSelect.code);
|
this.currentSelect = this.$store.getters['map/getDeviceByCode'](this.initSelect.code);
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.changeIgnore = sure;
|
const cRow = sure ? this.tempList.find(el => el.code == this.initSelect.code) : null;
|
||||||
this.$refs.table.setCurrentRow(sure ? this.tempList.find(el => el.code == this.initSelect.code) : null);
|
this.changeIgnore = !!cRow;
|
||||||
|
this.$refs.table.setCurrentRow(cRow);
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -163,9 +169,10 @@ export default {
|
|||||||
this.currentSelect = this.$store.getters['map/getDeviceByCode'](selected.code);
|
this.currentSelect = this.$store.getters['map/getDeviceByCode'](selected.code);
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.changeIgnore = sure;
|
|
||||||
let index = 0;
|
let index = 0;
|
||||||
this.$refs.table.setCurrentRow(this.tempList.find((el, i) => { index = i; return el.code == selected.code; }));
|
const cRow = this.tempList.find((el, i) => { index = i; return el.code == selected.code; });
|
||||||
|
this.changeIgnore = !!cRow;
|
||||||
|
this.$refs.table.setCurrentRow(cRow);
|
||||||
setTimeout(()=> {
|
setTimeout(()=> {
|
||||||
this.$refs.table.bodyWrapper.scrollTop = index * 20;
|
this.$refs.table.bodyWrapper.scrollTop = index * 20;
|
||||||
}, 200);
|
}, 200);
|
||||||
@ -176,8 +183,9 @@ export default {
|
|||||||
doClose() {
|
doClose() {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
this.sure && (this.currentSelect = null);
|
this.currentSelect = null;
|
||||||
this.sure && this.$refs.table.setCurrentRow();
|
this.changeIgnore = false;
|
||||||
|
this.$refs.table.setCurrentRow();
|
||||||
this.sure && this.$root.$emit('iniCacheMap', this.cmdType.value,
|
this.sure && this.$root.$emit('iniCacheMap', this.cmdType.value,
|
||||||
Object.fromEntries(Object.entries(this.getCacheMap()).filter(el => el[1].done == 'done'))
|
Object.fromEntries(Object.entries(this.getCacheMap()).filter(el => el[1].done == 'done'))
|
||||||
);
|
);
|
||||||
@ -190,7 +198,7 @@ export default {
|
|||||||
const isOK = this.command && (!this.sure || this.sure && cacheMap[this.currentSelect.code]);
|
const isOK = this.command && (!this.sure || this.sure && cacheMap[this.currentSelect.code]);
|
||||||
const operate = {
|
const operate = {
|
||||||
cmdType: this.sure && isOK ? this.cmdType : null,
|
cmdType: this.sure && isOK ? this.cmdType : null,
|
||||||
operation: isClose ? OperationEvent.Signal.lock.confirm.operation : OperationEvent.Signal.unlock.confirm.operation,
|
operation: isClose ? OperationEvent.Command.common.confirm.operation : OperationEvent.Command.common.apply.operation,
|
||||||
over: this.sure,
|
over: this.sure,
|
||||||
param: {signalCode: this.currentSelect.code}
|
param: {signalCode: this.currentSelect.code}
|
||||||
};
|
};
|
||||||
@ -218,21 +226,25 @@ export default {
|
|||||||
handleCurrentChange(val) {
|
handleCurrentChange(val) {
|
||||||
if (!val) { return; }
|
if (!val) { return; }
|
||||||
this.currentSelect = this.$store.getters['map/getDeviceByCode'](val.code);
|
this.currentSelect = this.$store.getters['map/getDeviceByCode'](val.code);
|
||||||
|
this.sure || this.$emit('initSelect', this.currentSelect);
|
||||||
this.$emit('updateDone');
|
this.$emit('updateDone');
|
||||||
if (this.changeIgnore) { return; }
|
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.changeIgnore = false;
|
|
||||||
this.$emit('updateDone');
|
this.$emit('updateDone');
|
||||||
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.sure || this.$emit('initSelect', this.currentSelect);
|
|
||||||
}
|
}
|
||||||
}).catch(_ => {
|
}).catch(_ => {
|
||||||
this.$refs.noticeInfo.doShow();
|
this.$refs.noticeInfo.doShow();
|
||||||
|
@ -87,6 +87,11 @@ export default {
|
|||||||
if (this.show) {
|
if (this.show) {
|
||||||
this.commit();
|
this.commit();
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
'$store.state.trainingNew.trainingSwitch': function(val) {
|
||||||
|
if (!val && this.dialogShow) {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -142,6 +142,11 @@ export default {
|
|||||||
if (this.currentSelect) {
|
if (this.currentSelect) {
|
||||||
this.noInit = this.sure && (this.getCacheMap()[this.currentSelect.code] || {}).done != 'one';
|
this.noInit = this.sure && (this.getCacheMap()[this.currentSelect.code] || {}).done != 'one';
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
'$store.state.trainingNew.trainingSwitch': function(val) {
|
||||||
|
if (!val && this.dialogShow) {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -156,8 +161,9 @@ export default {
|
|||||||
this.currentSelect = this.$store.getters['map/getDeviceByCode'](this.initSelect.code);
|
this.currentSelect = this.$store.getters['map/getDeviceByCode'](this.initSelect.code);
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.changeIgnore = sure;
|
const cRow = sure ? this.tempList.find(el => el.code == this.initSelect.code) : null;
|
||||||
this.$refs.table.setCurrentRow(sure ? this.tempList.find(el => el.code == this.initSelect.code) : null);
|
this.changeIgnore = !!cRow;
|
||||||
|
this.$refs.table.setCurrentRow(cRow);
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -168,9 +174,10 @@ export default {
|
|||||||
this.currentSelect = this.$store.getters['map/getDeviceByCode'](selected.code);
|
this.currentSelect = this.$store.getters['map/getDeviceByCode'](selected.code);
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
// this.changeIgnore = sure;
|
|
||||||
let index = 0;
|
let index = 0;
|
||||||
this.$refs.table.setCurrentRow(this.tempList.find((el, i) => { index = i; return el.code == selected.code; }));
|
const cRow = this.tempList.find((el, i) => { index = i; return el.code == selected.code; });
|
||||||
|
this.changeIgnore = !!cRow;
|
||||||
|
this.$refs.table.setCurrentRow(cRow);
|
||||||
setTimeout(()=> {
|
setTimeout(()=> {
|
||||||
this.$refs.table.bodyWrapper.scrollTop = index * 20;
|
this.$refs.table.bodyWrapper.scrollTop = index * 20;
|
||||||
}, 200);
|
}, 200);
|
||||||
@ -223,8 +230,12 @@ export default {
|
|||||||
handleCurrentChange(val) {
|
handleCurrentChange(val) {
|
||||||
if (!val) { return; }
|
if (!val) { return; }
|
||||||
this.currentSelect = this.$store.getters['map/getDeviceByCode'](val.code);
|
this.currentSelect = this.$store.getters['map/getDeviceByCode'](val.code);
|
||||||
|
this.sure || this.$emit('initSelect', this.currentSelect);
|
||||||
this.$emit('updateDone');
|
this.$emit('updateDone');
|
||||||
if (this.changeIgnore) { return; }
|
if (this.changeIgnore) {
|
||||||
|
this.changeIgnore = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const step = {
|
const step = {
|
||||||
// code: val.code,
|
// code: val.code,
|
||||||
@ -234,12 +245,10 @@ export default {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.changeIgnore = false;
|
|
||||||
this.$emit('updateDone');
|
this.$emit('updateDone');
|
||||||
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.sure || this.$emit('initSelect', this.currentSelect);
|
|
||||||
}
|
}
|
||||||
}).catch(_ => {
|
}).catch(_ => {
|
||||||
this.$refs.noticeInfo.doShow();
|
this.$refs.noticeInfo.doShow();
|
||||||
|
@ -133,6 +133,11 @@ export default {
|
|||||||
if (this.currentSelect) {
|
if (this.currentSelect) {
|
||||||
this.noInit = this.sure && (this.getCacheMap()[this.currentSelect.code] || {}).done != 'one';
|
this.noInit = this.sure && (this.getCacheMap()[this.currentSelect.code] || {}).done != 'one';
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
'$store.state.trainingNew.trainingSwitch': function(val) {
|
||||||
|
if (!val && this.dialogShow) {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -64,7 +64,8 @@ export default {
|
|||||||
operate: null,
|
operate: null,
|
||||||
allChecked: false,
|
allChecked: false,
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
loading: false
|
loading: false,
|
||||||
|
changeIgnore: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -116,22 +117,33 @@ export default {
|
|||||||
this.status = false;
|
this.status = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
'$store.state.trainingNew.trainingSwitch': function(val) {
|
||||||
|
if (!val && this.dialogShow) {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
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});
|
// this.$refs.table.setCurrentRow(this.selected);
|
||||||
this.$refs.table.setCurrentRow(this.selected);
|
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
console.log();
|
console.log();
|
||||||
@ -152,17 +164,19 @@ export default {
|
|||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
let index = 0;
|
let index = 0;
|
||||||
const signal = this.filterSignalList.find((el, i) => { index = i; return el.code == selected.code; });
|
const signal = this.filterSignalList.find((el, i) => { index = i; return el.code == selected.code; });
|
||||||
|
this.changeIgnore = !!signal;
|
||||||
this.$refs.table.setCurrentRow(signal);
|
this.$refs.table.setCurrentRow(signal);
|
||||||
setTimeout(()=> {
|
setTimeout(()=> {
|
||||||
this.$refs.table.bodyWrapper.scrollTop = index * 20;
|
this.$refs.table.bodyWrapper.scrollTop = index * 20;
|
||||||
}, 200);
|
}, 200);
|
||||||
this.handleCurrentChange(signal);
|
// this.handleCurrentChange(signal);
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
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');
|
||||||
},
|
},
|
||||||
|
@ -105,6 +105,11 @@ export default {
|
|||||||
this.status = false;
|
this.status = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
'$store.state.trainingNew.trainingSwitch': function(val) {
|
||||||
|
if (!val && this.dialogShow) {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -86,6 +86,11 @@ export default {
|
|||||||
if (this.show) {
|
if (this.show) {
|
||||||
this.commit();
|
this.commit();
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
'$store.state.trainingNew.trainingSwitch': function(val) {
|
||||||
|
if (!val && this.dialogShow) {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -93,7 +93,8 @@ export default {
|
|||||||
station:{},
|
station:{},
|
||||||
stationCode: '',
|
stationCode: '',
|
||||||
stationName:'',
|
stationName:'',
|
||||||
message:''
|
message:'',
|
||||||
|
changeIgnore: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -151,6 +152,11 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.status = true;
|
this.status = true;
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
'$store.state.trainingNew.trainingSwitch': function(val) {
|
||||||
|
if (!val && this.dialogShow) {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -167,6 +173,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 +202,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 +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();
|
||||||
|
@ -61,7 +61,8 @@ export default {
|
|||||||
allChecked: false,
|
allChecked: false,
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
isActive: false
|
isActive: false,
|
||||||
|
changeIgnore: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -105,6 +106,11 @@ export default {
|
|||||||
this.status = false;
|
this.status = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
'$store.state.trainingNew.trainingSwitch': function(val) {
|
||||||
|
if (!val && this.dialogShow) {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -121,6 +127,7 @@ export default {
|
|||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
let index = 0;
|
let index = 0;
|
||||||
const switchEle = this.switchList.find((el, i) => { index = i; return el.code == selected.code; });
|
const switchEle = this.switchList.find((el, i) => { index = i; return el.code == selected.code; });
|
||||||
|
this.changeIgnore = !!switchEle;
|
||||||
this.$refs.table.setCurrentRow(switchEle);
|
this.$refs.table.setCurrentRow(switchEle);
|
||||||
setTimeout(()=> {
|
setTimeout(()=> {
|
||||||
this.$refs.table.bodyWrapper.scrollTop = index * 20;
|
this.$refs.table.bodyWrapper.scrollTop = index * 20;
|
||||||
@ -131,6 +138,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');
|
||||||
},
|
},
|
||||||
@ -154,13 +162,17 @@ 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,
|
||||||
val: val.code
|
val: val.code
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$store.dispatch('menuOperation/setSelected', {device: val});
|
|
||||||
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 });
|
||||||
|
@ -143,6 +143,11 @@ export default {
|
|||||||
if (this.currentSelect) {
|
if (this.currentSelect) {
|
||||||
this.noInit = this.sure && (this.getCacheMap()[this.currentSelect.code] || {}).done != 'one';
|
this.noInit = this.sure && (this.getCacheMap()[this.currentSelect.code] || {}).done != 'one';
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
'$store.state.trainingNew.trainingSwitch': function(val) {
|
||||||
|
if (!val && this.dialogShow) {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -163,8 +168,9 @@ export default {
|
|||||||
this.currentSelect = sure ? this.$store.getters['map/getDeviceByCode'](this.initSelect.code) : null;
|
this.currentSelect = sure ? this.$store.getters['map/getDeviceByCode'](this.initSelect.code) : null;
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.changeIgnore = sure;
|
const switchEle = sure ? this.tempList.find(el => el.code == this.initSelect.code) : null;
|
||||||
this.$refs.table.setCurrentRow(sure ? this.tempList.find(el => el.code == this.initSelect.code) : null);
|
this.changeIgnore = !!switchEle;
|
||||||
|
this.$refs.table.setCurrentRow(switchEle);
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -182,6 +188,7 @@ export default {
|
|||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
let index = 0;
|
let index = 0;
|
||||||
const switchEle = this.tempList.find((el, i) => { index = i; return el.code == selected.code; });
|
const switchEle = this.tempList.find((el, i) => { index = i; return el.code == selected.code; });
|
||||||
|
this.changeIgnore = !!switchEle;
|
||||||
this.$refs.table.setCurrentRow(switchEle);
|
this.$refs.table.setCurrentRow(switchEle);
|
||||||
setTimeout(()=> {
|
setTimeout(()=> {
|
||||||
this.$refs.table.bodyWrapper.scrollTop = index * 20;
|
this.$refs.table.bodyWrapper.scrollTop = index * 20;
|
||||||
@ -236,8 +243,12 @@ export default {
|
|||||||
handleCurrentChange(val) {
|
handleCurrentChange(val) {
|
||||||
if (!val) { return; }
|
if (!val) { return; }
|
||||||
this.currentSelect = this.$store.getters['map/getDeviceByCode'](val.code);
|
this.currentSelect = this.$store.getters['map/getDeviceByCode'](val.code);
|
||||||
|
this.sure || this.$emit('initSelect', this.currentSelect);
|
||||||
this.$emit('updateDone');
|
this.$emit('updateDone');
|
||||||
if (this.changeIgnore) { return; }
|
if (this.changeIgnore) {
|
||||||
|
this.changeIgnore = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const step = {
|
const step = {
|
||||||
// code: val.code,
|
// code: val.code,
|
||||||
@ -245,11 +256,9 @@ export default {
|
|||||||
val: val.code
|
val: val.code
|
||||||
};
|
};
|
||||||
|
|
||||||
this.changeIgnore = false;
|
|
||||||
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.sure || this.$emit('initSelect', this.currentSelect);
|
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow();
|
this.$refs.noticeInfo.doShow();
|
||||||
|
@ -89,7 +89,8 @@ export default {
|
|||||||
selectedSwitch: {},
|
selectedSwitch: {},
|
||||||
mode: '',
|
mode: '',
|
||||||
position: '',
|
position: '',
|
||||||
reserved: ''
|
reserved: '',
|
||||||
|
changeIgnore: false
|
||||||
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -130,6 +131,11 @@ export default {
|
|||||||
if (this.show) {
|
if (this.show) {
|
||||||
this.commit();
|
this.commit();
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
'$store.state.trainingNew.trainingSwitch': function(val) {
|
||||||
|
if (!val && this.dialogShow) {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -177,11 +183,12 @@ export default {
|
|||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
let index = 0;
|
let index = 0;
|
||||||
const switchEle = this.switchList.find((el, i) => { index = i; return el.code == selected.code; });
|
const switchEle = this.switchList.find((el, i) => { index = i; return el.code == selected.code; });
|
||||||
|
this.changeIgnore = !!switchEle;
|
||||||
this.$refs.table.setCurrentRow(switchEle);
|
this.$refs.table.setCurrentRow(switchEle);
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$refs.table.bodyWrapper.scrollTop = index * 20;
|
this.$refs.table.bodyWrapper.scrollTop = index * 20;
|
||||||
}, 200);
|
}, 200);
|
||||||
this.handleCurrentChange(switchEle);
|
// this.handleCurrentChange(switchEle);
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -190,6 +197,7 @@ export default {
|
|||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
this.mode = '';
|
this.mode = '';
|
||||||
this.position = '';
|
this.position = '';
|
||||||
|
this.changeIgnore = false;
|
||||||
this.$refs.table.setCurrentRow();
|
this.$refs.table.setCurrentRow();
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
},
|
},
|
||||||
@ -232,19 +240,15 @@ export default {
|
|||||||
},
|
},
|
||||||
handleCurrentChange(val) {
|
handleCurrentChange(val) {
|
||||||
if (!val) { return; }
|
if (!val) { return; }
|
||||||
commitOperate(menuOperate.Switch.turnout, {code:val.code}).then(({valid, operate})=>{
|
|
||||||
// if (valid) {
|
|
||||||
this.position = '';
|
this.position = '';
|
||||||
const switchModel = this.$store.getters['map/getDeviceByCode'](val.code);
|
const switchModel = this.$store.getters['map/getDeviceByCode'](val.code);
|
||||||
this.selectedSwitchCode = val.code;
|
this.selectedSwitchCode = val.code;
|
||||||
this.selectedSwitch = switchModel;
|
this.selectedSwitch = switchModel;
|
||||||
// this.mode = elem.auto ? 'artificial' : 'auto';
|
if (this.changeIgnore) {
|
||||||
// if (!elem.auto) {
|
this.changeIgnore = false;
|
||||||
// if (elem.normalPosition) { this.position = 'reverse'; }
|
return;
|
||||||
// if (elem.reversePosition) { this.position = 'normal'; }
|
}
|
||||||
// }
|
commitOperate(menuOperate.Switch.turnout, {code:val.code});
|
||||||
// }
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
getSwitchPosition(code) {
|
getSwitchPosition(code) {
|
||||||
const elem = this.$store.getters['map/getDeviceByCode'](code);
|
const elem = this.$store.getters['map/getDeviceByCode'](code);
|
||||||
|
@ -83,6 +83,11 @@ export default {
|
|||||||
if (this.show) {
|
if (this.show) {
|
||||||
this.commit();
|
this.commit();
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
'$store.state.trainingNew.trainingSwitch': function(val) {
|
||||||
|
if (!val && this.dialogShow) {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -80,10 +80,12 @@ export default {
|
|||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
label: '初始化',
|
label: '初始化',
|
||||||
|
operate: OperationEvent.Command.commandNingBo3.line_section_open_init,
|
||||||
handler: this.handlerInitOpen
|
handler: this.handlerInitOpen
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '确定/取消',
|
label: '确定/取消',
|
||||||
|
operate: OperationEvent.Command.commandNingBo3.line_section_open_sure,
|
||||||
handler: this.handlerOpen
|
handler: this.handlerOpen
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -93,10 +95,12 @@ export default {
|
|||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
label: '初始化',
|
label: '初始化',
|
||||||
|
operate: OperationEvent.Command.commandNingBo3.line_section_close_init,
|
||||||
handler: this.handlerInitClose
|
handler: this.handlerInitClose
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '确定/取消',
|
label: '确定/取消',
|
||||||
|
operate: OperationEvent.Command.commandNingBo3.line_section_close_sure,
|
||||||
handler: this.handlerClose
|
handler: this.handlerClose
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -109,10 +113,12 @@ export default {
|
|||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
label: '初始化',
|
label: '初始化',
|
||||||
|
operate: OperationEvent.Command.commandNingBo3.line_section_setSpeed_init,
|
||||||
handler: this.handlerInitSetLimit
|
handler: this.handlerInitSetLimit
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '确定/取消',
|
label: '确定/取消',
|
||||||
|
operate: OperationEvent.Command.commandNingBo3.line_section_setSpeed_sure,
|
||||||
handler: this.handlerSetLimit
|
handler: this.handlerSetLimit
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -122,10 +128,12 @@ export default {
|
|||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
label: '初始化',
|
label: '初始化',
|
||||||
|
operate: OperationEvent.Command.commandNingBo3.line_section_clearSpeed_init,
|
||||||
handler: this.handlerInitCancelLimit
|
handler: this.handlerInitCancelLimit
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '确定/取消',
|
label: '确定/取消',
|
||||||
|
operate: OperationEvent.Command.commandNingBo3.line_section_clearSpeed_sure,
|
||||||
handler: this.handlerCancelLimit
|
handler: this.handlerCancelLimit
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -134,6 +142,7 @@ export default {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '显示',
|
label: '显示',
|
||||||
|
operate: OperationEvent.Command.commandNingBo3.line_section_detail,
|
||||||
handler: this.handlerDetail
|
handler: this.handlerDetail
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -313,32 +322,77 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handlerInitOpen() {
|
handlerInitOpen(item) {
|
||||||
this.$refs.sectionOpen.rightClickShow(OperationEvent.Command.commandNingBo3.line_section_open_init, false, this.selected);
|
const operate = {
|
||||||
|
code: this.selected.code,
|
||||||
|
operation: item.operate.operation
|
||||||
|
};
|
||||||
|
this.$store.dispatch('trainingNew/next', operate);
|
||||||
|
this.$refs.sectionOpen.rightClickShow(item.operate, false, this.selected);
|
||||||
},
|
},
|
||||||
handlerOpen() {
|
handlerOpen(item) {
|
||||||
this.$refs.sectionOpen.rightClickShow(OperationEvent.Command.commandNingBo3.line_section_open_sure, true, this.selected);
|
const operate = {
|
||||||
|
code: this.selected.code,
|
||||||
|
operation: item.operate.operation
|
||||||
|
};
|
||||||
|
this.$store.dispatch('trainingNew/next', operate);
|
||||||
|
this.$refs.sectionOpen.rightClickShow(item.operate, true, this.selected);
|
||||||
},
|
},
|
||||||
handlerInitClose() {
|
handlerInitClose(item) {
|
||||||
this.$refs.sectionOpen.rightClickShow(OperationEvent.Command.commandNingBo3.line_section_close_init, false, this.selected);
|
const operate = {
|
||||||
|
code: this.selected.code,
|
||||||
|
operation: item.operate.operation
|
||||||
|
};
|
||||||
|
this.$store.dispatch('trainingNew/next', operate);
|
||||||
|
this.$refs.sectionOpen.rightClickShow(item.operate, false, this.selected);
|
||||||
},
|
},
|
||||||
handlerClose() {
|
handlerClose(item) {
|
||||||
this.$refs.sectionOpen.rightClickShow(OperationEvent.Command.commandNingBo3.line_section_close_sure, true, this.selected);
|
const operate = {
|
||||||
|
code: this.selected.code,
|
||||||
|
operation: item.operate.operation
|
||||||
|
};
|
||||||
|
this.$store.dispatch('trainingNew/next', operate);
|
||||||
|
this.$refs.sectionOpen.rightClickShow(item.operate, true, this.selected);
|
||||||
},
|
},
|
||||||
handlerInitSetLimit() {
|
handlerInitSetLimit(item) {
|
||||||
this.$refs.sectionLimitSpeed.rightClickShow(OperationEvent.Command.commandNingBo3.line_section_setSpeed_init, false, this.selected);
|
const operate = {
|
||||||
|
code: this.selected.code,
|
||||||
|
operation: item.operate.operation
|
||||||
|
};
|
||||||
|
this.$store.dispatch('trainingNew/next', operate);
|
||||||
|
this.$refs.sectionLimitSpeed.rightClickShow(item.operate, false, this.selected);
|
||||||
},
|
},
|
||||||
handlerSetLimit() {
|
handlerSetLimit(item) {
|
||||||
this.$refs.sectionLimitSpeed.rightClickShow(OperationEvent.Command.commandNingBo3.line_section_setSpeed_sure, true, this.selected);
|
const operate = {
|
||||||
|
code: this.selected.code,
|
||||||
|
operation: item.operate.operation
|
||||||
|
};
|
||||||
|
this.$store.dispatch('trainingNew/next', operate);
|
||||||
|
this.$refs.sectionLimitSpeed.rightClickShow(item.operate, true, this.selected);
|
||||||
},
|
},
|
||||||
handlerInitCancelLimit() {
|
handlerInitCancelLimit(item) {
|
||||||
this.$refs.sectionLimitSpeed.rightClickShow(OperationEvent.Command.commandNingBo3.line_section_clearSpeed_init, false, this.selected);
|
const operate = {
|
||||||
|
code: this.selected.code,
|
||||||
|
operation: item.operate.operation
|
||||||
|
};
|
||||||
|
this.$store.dispatch('trainingNew/next', operate);
|
||||||
|
this.$refs.sectionLimitSpeed.rightClickShow(item.operate, false, this.selected);
|
||||||
},
|
},
|
||||||
handlerCancelLimit() {
|
handlerCancelLimit(item) {
|
||||||
this.$refs.sectionLimitSpeed.rightClickShow(OperationEvent.Command.commandNingBo3.line_section_clearSpeed_sure, true, this.selected);
|
const operate = {
|
||||||
|
code: this.selected.code,
|
||||||
|
operation: item.operate.operation
|
||||||
|
};
|
||||||
|
this.$store.dispatch('trainingNew/next', operate);
|
||||||
|
this.$refs.sectionLimitSpeed.rightClickShow(item.operate, true, this.selected);
|
||||||
},
|
},
|
||||||
handlerDetail() {
|
handlerDetail(item) {
|
||||||
this.$refs.sectionShow.rightClickShow('', this.selected);
|
const operate = {
|
||||||
|
code: this.selected.code,
|
||||||
|
operation: item.operate.operation
|
||||||
|
};
|
||||||
|
this.$store.dispatch('trainingNew/next', operate);
|
||||||
|
this.$refs.sectionShow.rightClickShow(item.operate, this.selected);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -86,14 +86,17 @@ export default {
|
|||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
label: '初始化',
|
label: '初始化',
|
||||||
|
operate: OperationEvent.Signal.guide.initMenu,
|
||||||
handler: this.handlerInitGuide
|
handler: this.handlerInitGuide
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '确定/取消',
|
label: '确定/取消',
|
||||||
|
operate: OperationEvent.Signal.guide.menu,
|
||||||
handler: this.handlerGuide
|
handler: this.handlerGuide
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '清除',
|
label: '清除',
|
||||||
|
operate: OperationEvent.Signal.cancelGuide.menu,
|
||||||
handler: this.handlerCancelGuide
|
handler: this.handlerCancelGuide
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -104,10 +107,12 @@ export default {
|
|||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
label: '初始化',
|
label: '初始化',
|
||||||
|
operate: OperationEvent.Signal.lock.initMenu,
|
||||||
handler: this.handlerInitAllowLock
|
handler: this.handlerInitAllowLock
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '确定/取消',
|
label: '确定/取消',
|
||||||
|
operate: OperationEvent.Signal.lock.menu,
|
||||||
handler: this.handlerAllowLock
|
handler: this.handlerAllowLock
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -117,6 +122,7 @@ export default {
|
|||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
label: '命令',
|
label: '命令',
|
||||||
|
operate: OperationEvent.Signal.arrangementRoute.menu,
|
||||||
handler: this.handlerRouteCommand
|
handler: this.handlerRouteCommand
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -136,6 +142,7 @@ export default {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '信号指示模式',
|
label: '信号指示模式',
|
||||||
|
operate: OperationEvent.Signal.reopenSignal.menu,
|
||||||
handler: this.handlerSignalModel,
|
handler: this.handlerSignalModel,
|
||||||
cmdType: ''
|
cmdType: ''
|
||||||
},
|
},
|
||||||
@ -144,10 +151,12 @@ export default {
|
|||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
label: '初始化',
|
label: '初始化',
|
||||||
|
operate: OperationEvent.Command.commandNingBo3.line_signal_block_init,
|
||||||
handler: this.handlerInitBlock
|
handler: this.handlerInitBlock
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '确认/取消',
|
label: '确认/取消',
|
||||||
|
operate: OperationEvent.Command.commandNingBo3.line_signal_block_sure,
|
||||||
handler: this.handlerBlock
|
handler: this.handlerBlock
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -157,16 +166,19 @@ export default {
|
|||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
label: '初始化',
|
label: '初始化',
|
||||||
|
operate: OperationEvent.Command.commandNingBo3.line_signal_unblock_init,
|
||||||
handler: this.handlerInitUnblock
|
handler: this.handlerInitUnblock
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '确认/取消',
|
label: '确认/取消',
|
||||||
|
operate: OperationEvent.Command.commandNingBo3.line_signal_unblock_sure,
|
||||||
handler: this.handlerUnblock
|
handler: this.handlerUnblock
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '显示',
|
label: '显示',
|
||||||
|
operate: OperationEvent.Command.commandNingBo3.line_signal_detail,
|
||||||
handler: this.handlerDetail
|
handler: this.handlerDetail
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -199,12 +211,6 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
'$store.state.menuOperation.menuCount': function (val) {
|
'$store.state.menuOperation.menuCount': function (val) {
|
||||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Signal) && !this.buttonOperation) {
|
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Signal) && !this.buttonOperation) {
|
||||||
const operate = {
|
|
||||||
code: `${this.selected.code}`,
|
|
||||||
userOperationType: 'rightClick',
|
|
||||||
operation: OperationEvent.Command.commandRight.right.operation
|
|
||||||
};
|
|
||||||
this.$store.dispatch('trainingNew/next', operate);
|
|
||||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||||
} else {
|
} else {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
@ -266,41 +272,101 @@ export default {
|
|||||||
undeveloped() {
|
undeveloped() {
|
||||||
|
|
||||||
},
|
},
|
||||||
handlerInitGuide() {
|
handlerInitGuide(item) {
|
||||||
this.$refs.signalGuide.rightClickShow(OperationEvent.Signal.guide.initMenu, false, this.selected);
|
const operate = {
|
||||||
|
code: this.selected.code,
|
||||||
|
operation: item.operate.operation
|
||||||
|
};
|
||||||
|
this.$store.dispatch('trainingNew/next', operate);
|
||||||
|
this.$refs.signalGuide.rightClickShow(item.operate, false, this.selected);
|
||||||
},
|
},
|
||||||
handlerGuide() {
|
handlerGuide(item) {
|
||||||
this.$refs.signalGuide.rightClickShow(OperationEvent.Signal.guide.menu, true, this.selected);
|
const operate = {
|
||||||
|
code: this.selected.code,
|
||||||
|
operation: item.operate.operation
|
||||||
|
};
|
||||||
|
this.$store.dispatch('trainingNew/next', operate);
|
||||||
|
this.$refs.signalGuide.rightClickShow(item.operate, true, this.selected);
|
||||||
},
|
},
|
||||||
handlerCancelGuide() {
|
handlerCancelGuide(item) {
|
||||||
this.$refs.cancelSignal.rightClickShow(OperationEvent.Signal.cancelGuide.menu, this.selected);
|
const operate = {
|
||||||
|
code: this.selected.code,
|
||||||
|
operation: item.operate.operation
|
||||||
|
};
|
||||||
|
this.$store.dispatch('trainingNew/next', operate);
|
||||||
|
this.$refs.cancelSignal.rightClickShow(item.operate, this.selected);
|
||||||
},
|
},
|
||||||
handlerInitAllowLock() {
|
handlerInitAllowLock(item) {
|
||||||
this.$refs.signalCanBlock.rightClickShow(OperationEvent.Signal.lock.initMenu, false, this.selected);
|
const operate = {
|
||||||
|
code: this.selected.code,
|
||||||
|
operation: item.operate.operation
|
||||||
|
};
|
||||||
|
this.$store.dispatch('trainingNew/next', operate);
|
||||||
|
this.$refs.signalCanBlock.rightClickShow(item.operate, false, this.selected);
|
||||||
},
|
},
|
||||||
handlerAllowLock() {
|
handlerAllowLock(item) {
|
||||||
this.$refs.signalCanBlock.rightClickShow(OperationEvent.Signal.lock.menu, true, this.selected);
|
const operate = {
|
||||||
|
code: this.selected.code,
|
||||||
|
operation: item.operate.operation
|
||||||
|
};
|
||||||
|
this.$store.dispatch('trainingNew/next', operate);
|
||||||
|
this.$refs.signalCanBlock.rightClickShow(item.operate, true, this.selected);
|
||||||
},
|
},
|
||||||
handlerRouteCommand() {
|
handlerRouteCommand(item) {
|
||||||
this.$refs.routeCommand.rightClickShow(OperationEvent.Signal.arrangementRoute.menu, this.selected);
|
const operate = {
|
||||||
|
code: this.selected.code,
|
||||||
|
operation: item.operate.operation
|
||||||
|
};
|
||||||
|
this.$store.dispatch('trainingNew/next', operate);
|
||||||
|
this.$refs.routeCommand.rightClickShow(item.operate, this.selected);
|
||||||
},
|
},
|
||||||
handlerSignalModel() {
|
handlerSignalModel(item) {
|
||||||
this.$refs.signalModel.rightClickShow('', this.selected);
|
const operate = {
|
||||||
|
code: this.selected.code,
|
||||||
|
operation: item.operate.operation
|
||||||
|
};
|
||||||
|
this.$store.dispatch('trainingNew/next', operate);
|
||||||
|
this.$refs.signalModel.rightClickShow(item.operate, this.selected);
|
||||||
},
|
},
|
||||||
handlerInitBlock() {
|
handlerInitBlock(item) {
|
||||||
this.$refs.signalBlock.rightClickShow(OperationEvent.Command.commandNingBo3.line_signal_block_init, false, this.selected);
|
const operate = {
|
||||||
|
code: this.selected.code,
|
||||||
|
operation: item.operate.operation
|
||||||
|
};
|
||||||
|
this.$store.dispatch('trainingNew/next', operate);
|
||||||
|
this.$refs.signalBlock.rightClickShow(item.operate, false, this.selected);
|
||||||
},
|
},
|
||||||
handlerBlock() {
|
handlerBlock(item) {
|
||||||
this.$refs.signalBlock.rightClickShow(OperationEvent.Command.commandNingBo3.line_signal_block_sure, true, this.selected);
|
const operate = {
|
||||||
|
code: this.selected.code,
|
||||||
|
operation: item.operate.operation
|
||||||
|
};
|
||||||
|
this.$store.dispatch('trainingNew/next', operate);
|
||||||
|
this.$refs.signalBlock.rightClickShow(item.operate, true, this.selected);
|
||||||
},
|
},
|
||||||
handlerInitUnblock() {
|
handlerInitUnblock(item) {
|
||||||
this.$refs.signalBlock.rightClickShow(OperationEvent.Command.commandNingBo3.line_signal_unblock_init, false, this.selected);
|
const operate = {
|
||||||
|
code: this.selected.code,
|
||||||
|
operation: item.operate.operation
|
||||||
|
};
|
||||||
|
this.$store.dispatch('trainingNew/next', operate);
|
||||||
|
this.$refs.signalBlock.rightClickShow(item.operate, false, this.selected);
|
||||||
},
|
},
|
||||||
handlerUnblock() {
|
handlerUnblock(item) {
|
||||||
this.$refs.signalBlock.rightClickShow(OperationEvent.Command.commandNingBo3.line_signal_unblock_sure, true, this.selected);
|
const operate = {
|
||||||
|
code: this.selected.code,
|
||||||
|
operation: item.operate.operation
|
||||||
|
};
|
||||||
|
this.$store.dispatch('trainingNew/next', operate);
|
||||||
|
this.$refs.signalBlock.rightClickShow(item.operate, true, this.selected);
|
||||||
},
|
},
|
||||||
handlerDetail() {
|
handlerDetail(item) {
|
||||||
this.$refs.signalDetail.rightClickShow(OperationEvent.Command.commandNingBo3.line_signal_detail, this.selected);
|
const operate = {
|
||||||
|
code: this.selected.code,
|
||||||
|
operation: item.operate.operation
|
||||||
|
};
|
||||||
|
this.$store.dispatch('trainingNew/next', operate);
|
||||||
|
this.$refs.signalDetail.rightClickShow(item.operate, this.selected);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -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('实现中......', '提示', {
|
||||||
|
@ -71,6 +71,7 @@ export default {
|
|||||||
menuNormal: [
|
menuNormal: [
|
||||||
{
|
{
|
||||||
label: '命令',
|
label: '命令',
|
||||||
|
operate: OperationEvent.Command.commandNingBo3.line_switch_cmd,
|
||||||
handler: this.handlerCommand
|
handler: this.handlerCommand
|
||||||
|
|
||||||
},
|
},
|
||||||
@ -79,10 +80,12 @@ export default {
|
|||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
label: '初始化',
|
label: '初始化',
|
||||||
|
operate: OperationEvent.Command.commandNingBo3.line_switch_block_init,
|
||||||
handler: this.handlerInitBlock
|
handler: this.handlerInitBlock
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '确定/取消',
|
label: '确定/取消',
|
||||||
|
operate: OperationEvent.Command.commandNingBo3.line_switch_block_sure,
|
||||||
handler: this.handlerBlock
|
handler: this.handlerBlock
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -92,10 +95,12 @@ export default {
|
|||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
label: '初始化',
|
label: '初始化',
|
||||||
|
operate: OperationEvent.Command.commandNingBo3.line_switch_unblock_init,
|
||||||
handler: this.handlerInitUnblock
|
handler: this.handlerInitUnblock
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '确定/取消',
|
label: '确定/取消',
|
||||||
|
operate: OperationEvent.Command.commandNingBo3.line_switch_unblock_sure,
|
||||||
handler: this.handlerUnblock
|
handler: this.handlerUnblock
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -105,17 +110,20 @@ export default {
|
|||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
label: '请求或授权/取消',
|
label: '请求或授权/取消',
|
||||||
|
operate: OperationEvent.Command.commandNingBo3.line_switch_empower_init,
|
||||||
handler: this.handlerActive
|
handler: this.handlerActive
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '显示',
|
label: '显示',
|
||||||
disabled: true,
|
disabled: true,
|
||||||
|
operate: OperationEvent.Command.commandNingBo3.line_switch_empower_sure,
|
||||||
handler: this.undeveloped
|
handler: this.undeveloped
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '显示',
|
label: '显示',
|
||||||
|
operate: OperationEvent.Command.commandNingBo3.line_switch_detail,
|
||||||
handler: this.handlerDetail
|
handler: this.handlerDetail
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -145,12 +153,6 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
'$store.state.menuOperation.menuCount': function (val) {
|
'$store.state.menuOperation.menuCount': function (val) {
|
||||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Switch) && !this.buttonOperation) {
|
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Switch) && !this.buttonOperation) {
|
||||||
const operate = {
|
|
||||||
code: `${this.selected.code}`,
|
|
||||||
userOperationType: 'rightClick',
|
|
||||||
operation: OperationEvent.Command.commandRight.right.operation
|
|
||||||
};
|
|
||||||
this.$store.dispatch('trainingNew/next', operate);
|
|
||||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||||
} else {
|
} else {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
@ -230,26 +232,61 @@ export default {
|
|||||||
hookLock() {
|
hookLock() {
|
||||||
this.$refs.switchHookLock.doShow(this.selected);
|
this.$refs.switchHookLock.doShow(this.selected);
|
||||||
},
|
},
|
||||||
handlerCommand() {
|
handlerCommand(item) {
|
||||||
this.$refs.switchCommand.rightClickShow('', this.selected);
|
const operate = {
|
||||||
|
code: this.selected.code,
|
||||||
|
operation: item.operate.operation
|
||||||
|
};
|
||||||
|
this.$store.dispatch('trainingNew/next', operate);
|
||||||
|
this.$refs.switchCommand.rightClickShow(item.operate, this.selected);
|
||||||
},
|
},
|
||||||
handlerInitBlock() {
|
handlerInitBlock(item) {
|
||||||
this.$refs.switchBlock.rightClickShow(OperationEvent.Command.commandNingBo3.line_switch_block_init, false, this.selected);
|
const operate = {
|
||||||
|
code: this.selected.code,
|
||||||
|
operation: item.operate.operation
|
||||||
|
};
|
||||||
|
this.$store.dispatch('trainingNew/next', operate);
|
||||||
|
this.$refs.switchBlock.rightClickShow(item.operate, false, this.selected);
|
||||||
},
|
},
|
||||||
handlerBlock() {
|
handlerBlock(item) {
|
||||||
this.$refs.switchBlock.rightClickShow(OperationEvent.Command.commandNingBo3.line_switch_block_sure, true, this.selected);
|
const operate = {
|
||||||
|
code: this.selected.code,
|
||||||
|
operation: item.operate.operation
|
||||||
|
};
|
||||||
|
this.$store.dispatch('trainingNew/next', operate);
|
||||||
|
this.$refs.switchBlock.rightClickShow(item.operate, true, this.selected);
|
||||||
},
|
},
|
||||||
handlerInitUnblock() {
|
handlerInitUnblock(item) {
|
||||||
this.$refs.switchBlock.rightClickShow(OperationEvent.Command.commandNingBo3.line_switch_unblock_init, false, this.selected);
|
const operate = {
|
||||||
|
code: this.selected.code,
|
||||||
|
operation: item.operate.operation
|
||||||
|
};
|
||||||
|
this.$store.dispatch('trainingNew/next', operate);
|
||||||
|
this.$refs.switchBlock.rightClickShow(item.operate, false, this.selected);
|
||||||
},
|
},
|
||||||
handlerUnblock() {
|
handlerUnblock(item) {
|
||||||
this.$refs.switchBlock.rightClickShow(OperationEvent.Command.commandNingBo3.line_switch_unblock_sure, true, this.selected);
|
const operate = {
|
||||||
|
code: this.selected.code,
|
||||||
|
operation: item.operate.operation
|
||||||
|
};
|
||||||
|
this.$store.dispatch('trainingNew/next', operate);
|
||||||
|
this.$refs.switchBlock.rightClickShow(item.operate, true, this.selected);
|
||||||
},
|
},
|
||||||
handlerActive() {
|
handlerActive(item) {
|
||||||
this.$refs.switchActive.rightClickShow('', this.selected);
|
const operate = {
|
||||||
|
code: this.selected.code,
|
||||||
|
operation: item.operate.operation
|
||||||
|
};
|
||||||
|
this.$store.dispatch('trainingNew/next', operate);
|
||||||
|
this.$refs.switchActive.rightClickShow(item.operate, this.selected);
|
||||||
},
|
},
|
||||||
handlerDetail() {
|
handlerDetail(item) {
|
||||||
this.$refs.switchDetail.rightClickShow('', this.selected);
|
const operate = {
|
||||||
|
code: this.selected.code,
|
||||||
|
operation: item.operate.operation
|
||||||
|
};
|
||||||
|
this.$store.dispatch('trainingNew/next', operate);
|
||||||
|
this.$refs.switchDetail.rightClickShow(item.operate, this.selected);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -34,7 +34,6 @@ import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
|||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
// import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
|
// import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||||
import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate';
|
import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
import { judgeStationControl } from '@/jmapNew/theme/components/utils/menuJudge.js';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'MenuTrain',
|
name: 'MenuTrain',
|
||||||
@ -240,11 +239,7 @@ export default {
|
|||||||
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||||
this.menu = [];
|
this.menu = [];
|
||||||
this.menuNormal.forEach(menuItem => {
|
this.menuNormal.forEach(menuItem => {
|
||||||
let status = judgeStationControl(this.selected.belongStation, this.selected.stationCode, this.work);
|
menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected, this.work) : false;
|
||||||
if (menuItem.roleDisabled) {
|
|
||||||
status = true;
|
|
||||||
}
|
|
||||||
menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected, this.work) || !status : false;
|
|
||||||
menuItem.show = menuItem.isShow ? menuItem.isShow(this.selected, this.work) : true;
|
menuItem.show = menuItem.isShow ? menuItem.isShow(this.selected, this.work) : true;
|
||||||
this.menu.push(menuItem);
|
this.menu.push(menuItem);
|
||||||
});
|
});
|
||||||
|
@ -723,6 +723,10 @@ export const OperationEvent = {
|
|||||||
Signal_command_unlockType: {
|
Signal_command_unlockType: {
|
||||||
operation: '00c058',
|
operation: '00c058',
|
||||||
domId: '_Tips-ningBo-Signal_command_unlockType{BOTTOM}'
|
domId: '_Tips-ningBo-Signal_command_unlockType{BOTTOM}'
|
||||||
|
},
|
||||||
|
Signal_command_routeTabs: {
|
||||||
|
operation: '00c059',
|
||||||
|
domId: '_Tips-ningBo-Signal_command_routeTabs{BOTTOM}'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
commandRight: {
|
commandRight: {
|
||||||
|
@ -78,7 +78,9 @@ const training = {
|
|||||||
Handler.judgeIsTextSendOperation();
|
Handler.judgeIsTextSendOperation();
|
||||||
},
|
},
|
||||||
clearStepInfo: (state, stepInfo) => {
|
clearStepInfo: (state, stepInfo) => {
|
||||||
|
if (state.stepInfo.id == stepInfo.stepId) {
|
||||||
state.stepInfo = {};
|
state.stepInfo = {};
|
||||||
|
}
|
||||||
},
|
},
|
||||||
clearTrainingData: (state) => {
|
clearTrainingData: (state) => {
|
||||||
state.teachMode = '';
|
state.teachMode = '';
|
||||||
@ -164,8 +166,8 @@ const training = {
|
|||||||
setStepInfo: ({ commit }, stepInfo) => {
|
setStepInfo: ({ commit }, stepInfo) => {
|
||||||
commit('setStepInfo', stepInfo);
|
commit('setStepInfo', stepInfo);
|
||||||
},
|
},
|
||||||
clearStepInfo: ({ commit }) => {
|
clearStepInfo: ({ commit }, stepInfo) => {
|
||||||
commit('clearStepInfo');
|
commit('clearStepInfo', stepInfo);
|
||||||
},
|
},
|
||||||
clearTrainingData: ({ commit }) => {
|
clearTrainingData: ({ commit }) => {
|
||||||
commit('clearTrainingData');
|
commit('clearTrainingData');
|
||||||
|
@ -181,7 +181,7 @@ function handle(data) {
|
|||||||
store.dispatch('trainingNew/setStepInfo', msg);
|
store.dispatch('trainingNew/setStepInfo', msg);
|
||||||
break;
|
break;
|
||||||
case 'Simulation_Training_Step_Finish':
|
case 'Simulation_Training_Step_Finish':
|
||||||
store.dispatch('trainingNew/clearStepInfo');
|
store.dispatch('trainingNew/clearStepInfo', msg);
|
||||||
break;
|
break;
|
||||||
case 'Simulation_Training_Audio_MATCH_RESULT':
|
case 'Simulation_Training_Audio_MATCH_RESULT':
|
||||||
store.dispatch('trainingNew/handleMatchVoice', msg);
|
store.dispatch('trainingNew/handleMatchVoice', msg);
|
||||||
|
@ -257,6 +257,9 @@ export default {
|
|||||||
this.memberData[item.id].labelName = '车务段段长-' + (item.name ? `-${item.name }` : '');
|
this.memberData[item.id].labelName = '车务段段长-' + (item.name ? `-${item.name }` : '');
|
||||||
trainMasterList.push(this.memberData[item.id]);
|
trainMasterList.push(this.memberData[item.id]);
|
||||||
break;
|
break;
|
||||||
|
case 'PARENT_DEPARTMENT':
|
||||||
|
this.memberData[item.id].labelName = '上级部门' + (item.name ? `-${item.name }` : '');
|
||||||
|
break;
|
||||||
// DEVICE_MANAGER:'设备管理员' deviceManager
|
// DEVICE_MANAGER:'设备管理员' deviceManager
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -207,10 +207,7 @@ export default {
|
|||||||
},
|
},
|
||||||
getRoleList() {
|
getRoleList() {
|
||||||
const memberData = this.$store.state.training.memberData;
|
const memberData = this.$store.state.training.memberData;
|
||||||
let activeTrainList = [];
|
const activeTrainList = this.$store.state.map.activeTrainList;
|
||||||
if (this.$store.state.training.started) {
|
|
||||||
activeTrainList = this.$store.state.map.activeTrainList;
|
|
||||||
}
|
|
||||||
// 获取仿真成员列表
|
// 获取仿真成员列表
|
||||||
const result = covertMemberData(activeTrainList, Object.values(memberData));
|
const result = covertMemberData(activeTrainList, Object.values(memberData));
|
||||||
let list = [];
|
let list = [];
|
||||||
|
@ -69,7 +69,9 @@ export default {
|
|||||||
const memberData = this.$store.state.training.memberData;
|
const memberData = this.$store.state.training.memberData;
|
||||||
const newMemberData = {};
|
const newMemberData = {};
|
||||||
playerList.forEach(playerId => {
|
playerList.forEach(playerId => {
|
||||||
|
if (memberData[playerId] && (memberData[playerId].type === 'STATION_SUPERVISOR' || memberData[playerId].type === 'DISPATCHER')) {
|
||||||
newMemberData[playerId] = memberData[playerId];
|
newMemberData[playerId] = memberData[playerId];
|
||||||
|
}
|
||||||
});
|
});
|
||||||
const result = covertMemberData([], Object.values(newMemberData));
|
const result = covertMemberData([], Object.values(newMemberData));
|
||||||
let list = [];
|
let list = [];
|
||||||
|
Loading…
Reference in New Issue
Block a user