Merge branch 'dev' of https://git.code.tencent.com/lian-cbtc/jl-client into dev
This commit is contained in:
commit
81c88dd63c
@ -71,6 +71,14 @@ export default class ELines extends Group {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setZleve(lev) {
|
||||||
|
this.eachChild((child) => {
|
||||||
|
if (child.setStyle && child.isLine) {
|
||||||
|
child.attr('z', lev);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
hide() {
|
hide() {
|
||||||
this.eachChild((child) => {
|
this.eachChild((child) => {
|
||||||
child.hide();
|
child.hide();
|
||||||
|
@ -38,10 +38,11 @@ export default class Section extends Group {
|
|||||||
const model = this.model;
|
const model = this.model;
|
||||||
// 01:计轴区段;02逻辑区段;03道岔区段 04道岔计轴区段
|
// 01:计轴区段;02逻辑区段;03道岔区段 04道岔计轴区段
|
||||||
this.createSectionText(); // 创建区段文字
|
this.createSectionText(); // 创建区段文字
|
||||||
if ((model.type === '01' || model.type === '03') && (
|
// if ((model.type === '01' || model.type === '03') && (
|
||||||
model.logicSectionNum.length <= 0 ||
|
// model.logicSectionNum.length <= 0 ||
|
||||||
model.logicSectionNum.length == 1 && model.logicSectionNum[0] == 0) ||
|
// model.logicSectionNum.length == 1 && model.logicSectionNum[0] == 0) ||
|
||||||
model.type === '02') {
|
// model.type === '02') {
|
||||||
|
// if (model.type === '01' || model.type === '03') {
|
||||||
this.createSection(); // 创建区段
|
this.createSection(); // 创建区段
|
||||||
this.creatRelease(); // 创建延时释放
|
this.creatRelease(); // 创建延时释放
|
||||||
this.createSeparator(); // 创建分隔符
|
this.createSeparator(); // 创建分隔符
|
||||||
@ -49,7 +50,7 @@ export default class Section extends Group {
|
|||||||
if (model.type === '01' && model.type === '03') {
|
if (model.type === '01' && model.type === '03') {
|
||||||
this.createAxles(); // 创建计轴
|
this.createAxles(); // 创建计轴
|
||||||
}
|
}
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
createMouseEvent() {
|
createMouseEvent() {
|
||||||
@ -70,7 +71,7 @@ export default class Section extends Group {
|
|||||||
// 创建区段
|
// 创建区段
|
||||||
this.section = new ELines({
|
this.section = new ELines({
|
||||||
zlevel: this.zlevel,
|
zlevel: this.zlevel,
|
||||||
z: this.z,
|
z: model.type == '02' ? this.z + 1 : this.z, // 逻辑区段层级降低一层
|
||||||
isSwitchSection: model.switchSection,
|
isSwitchSection: model.switchSection,
|
||||||
isCurve: model.curve,
|
isCurve: model.curve,
|
||||||
points: model.points,
|
points: model.points,
|
||||||
@ -574,9 +575,18 @@ export default class Section extends Group {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setModelTypeLevel() { // 给含有逻辑区段的 section 层级加一
|
||||||
|
if (this.model.type == '01' && this.model.logicSectionCodeList && this.model.logicSectionCodeList.length > 0) {
|
||||||
|
this.section.setZleve(this.z + 2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/** 设置区段恢复默认状态*/
|
/** 设置区段恢复默认状态*/
|
||||||
recover() {
|
recover() {
|
||||||
if (this.section) {
|
if (this.section) {
|
||||||
|
if (this.model.type == '01') {
|
||||||
|
this.section.setZleve(this.z);
|
||||||
|
}
|
||||||
this.section.stopAnimation(true);
|
this.section.stopAnimation(true);
|
||||||
this.sectionBlock && this.sectionBlock.hide(); // 因此特殊区段
|
this.sectionBlock && this.sectionBlock.hide(); // 因此特殊区段
|
||||||
this.section.setStyle({
|
this.section.setStyle({
|
||||||
@ -623,6 +633,7 @@ export default class Section extends Group {
|
|||||||
stroke: this.style.Section.line.communicationOccupiedColor,
|
stroke: this.style.Section.line.communicationOccupiedColor,
|
||||||
lineWidth: this.style.Section.line.width + this.style.Section.line.beyondWidth
|
lineWidth: this.style.Section.line.width + this.style.Section.line.beyondWidth
|
||||||
});
|
});
|
||||||
|
this.setModelTypeLevel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -633,6 +644,7 @@ export default class Section extends Group {
|
|||||||
stroke: this.style.Section.line.unCommunicationOccupiedColor,
|
stroke: this.style.Section.line.unCommunicationOccupiedColor,
|
||||||
lineWidth: this.style.Section.line.width + this.style.Section.line.beyondWidth
|
lineWidth: this.style.Section.line.width + this.style.Section.line.beyondWidth
|
||||||
});
|
});
|
||||||
|
this.setModelTypeLevel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -643,6 +655,7 @@ export default class Section extends Group {
|
|||||||
stroke: this.style.Section.line.routeLockColor,
|
stroke: this.style.Section.line.routeLockColor,
|
||||||
lineWidth: this.style.Section.line.width + this.style.Section.line.beyondWidth
|
lineWidth: this.style.Section.line.width + this.style.Section.line.beyondWidth
|
||||||
});
|
});
|
||||||
|
this.setModelTypeLevel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -656,12 +669,13 @@ export default class Section extends Group {
|
|||||||
lineWidth: this.style.Section.line.width + this.style.Section.line.beyondWidth
|
lineWidth: this.style.Section.line.width + this.style.Section.line.beyondWidth
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (this.style.Section.block.blockGlint) {
|
if (this.style.Section.block.blockGlint && this.section) {
|
||||||
this.section && this.section.animateStyle(true, [
|
this.section.animateStyle(true, [
|
||||||
{ time: 1000, styles: { stroke: this.style.backgroundColor } },
|
{ time: 1000, styles: { stroke: this.style.backgroundColor } },
|
||||||
{ time: 2000, styles: { stroke: this.style.Section.line.blockColor } }
|
{ time: 2000, styles: { stroke: this.style.Section.line.blockColor } }
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
this.setModelTypeLevel();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 故障锁定状态 05*/
|
/** 故障锁定状态 05*/
|
||||||
@ -702,6 +716,7 @@ export default class Section extends Group {
|
|||||||
stroke: this.style.Section.line.protectiveLockColor,
|
stroke: this.style.Section.line.protectiveLockColor,
|
||||||
lineWidth: this.style.Section.line.width + this.style.Section.line.beyondWidth
|
lineWidth: this.style.Section.line.width + this.style.Section.line.beyondWidth
|
||||||
});
|
});
|
||||||
|
this.setModelTypeLevel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -751,6 +766,7 @@ export default class Section extends Group {
|
|||||||
{ time: 1000, styles: { stroke: this.style.backgroundColor } },
|
{ time: 1000, styles: { stroke: this.style.backgroundColor } },
|
||||||
{ time: 2000, styles: { lineWidth: lineWidth } }
|
{ time: 2000, styles: { lineWidth: lineWidth } }
|
||||||
]);
|
]);
|
||||||
|
this.setModelTypeLevel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -789,9 +805,6 @@ export default class Section extends Group {
|
|||||||
// 实际上就是 状态重置 必须在设置其他状态之前 设置颜色之类的
|
// 实际上就是 状态重置 必须在设置其他状态之前 设置颜色之类的
|
||||||
if (this.style.Switch.sectionAction.flag && model.relSwitchCode && !flag) {
|
if (this.style.Switch.sectionAction.flag && model.relSwitchCode && !flag) {
|
||||||
const switchModel = Vue.prototype.$jlmap.mapDevice[model.relSwitchCode];
|
const switchModel = Vue.prototype.$jlmap.mapDevice[model.relSwitchCode];
|
||||||
// if (switchModel.name == 'D1801' || switchModel.name == 'D1802' || switchModel.name == 'D1803' || switchModel.name == 'D1804') {
|
|
||||||
// console.log('switchModel', switchModel, switchModel.name, switchModel.normalPosition, '1 定位 0 反位');
|
|
||||||
// }
|
|
||||||
if (switchModel.normalPosition != 0) { // 定位情况
|
if (switchModel.normalPosition != 0) { // 定位情况
|
||||||
const sectionC = Vue.prototype.$jlmap.mapDevice[switchModel.sectionCCode];
|
const sectionC = Vue.prototype.$jlmap.mapDevice[switchModel.sectionCCode];
|
||||||
sectionC && sectionC.instance && sectionC.instance.section.setStyle({ stroke: this.style.Switch.sectionAction.spareColor });
|
sectionC && sectionC.instance && sectionC.instance.section.setStyle({ stroke: this.style.Switch.sectionAction.spareColor });
|
||||||
|
@ -52,44 +52,6 @@ export default {
|
|||||||
oldSelected:null,
|
oldSelected:null,
|
||||||
menuNormal: {
|
menuNormal: {
|
||||||
Local: [
|
Local: [
|
||||||
// {
|
|
||||||
// label: '排列进路',
|
|
||||||
// handler: this.arrangementRoute,
|
|
||||||
// cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
|
|
||||||
// // auth: { station: false, center: true }
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '取消进路',
|
|
||||||
// handler: this.cancelTrainRoute,
|
|
||||||
// cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
|
||||||
// // auth: { station: false, center: true }
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '信号重开',
|
|
||||||
// handler: this.reopenSignal,
|
|
||||||
// cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
|
|
||||||
// // auth: { station: false, center: true }
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// type: 'separator'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '进路交人工控',
|
|
||||||
// handler: this.humanControl,
|
|
||||||
// cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
|
|
||||||
// // auth: { station: false, center: true }
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '进路交自动控',
|
|
||||||
// handler: this.atsAutoControl,
|
|
||||||
// cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
|
|
||||||
// // auth: { station: false, center: true }
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '查询进路控制状态',
|
|
||||||
// handler: this.detail,
|
|
||||||
// cmdType: CMD.Signal.CMD_SIGNAL_DETAIL
|
|
||||||
// }
|
|
||||||
],
|
],
|
||||||
Center: [
|
Center: [
|
||||||
{
|
{
|
||||||
|
@ -111,7 +111,7 @@
|
|||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import Handler from '@/scripts/cmdPlugin/Handler';
|
import Handler from '@/scripts/cmdPlugin/Handler';
|
||||||
// import { deepAssign } from '@/utils/index';
|
import { getAutoReentryBySignalCode } from '@/utils/index';
|
||||||
import PasswordBox from './dialog/childDialog/passwordInputBox.vue';
|
import PasswordBox from './dialog/childDialog/passwordInputBox.vue';
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
@ -144,7 +144,8 @@ export default {
|
|||||||
'routeList',
|
'routeList',
|
||||||
'routeData',
|
'routeData',
|
||||||
'signalList',
|
'signalList',
|
||||||
'autoReentryList'
|
'autoReentryList',
|
||||||
|
'autoReentryData'
|
||||||
]),
|
]),
|
||||||
Switch() {
|
Switch() {
|
||||||
return OperationEvent.Switch;
|
return OperationEvent.Switch;
|
||||||
@ -195,7 +196,7 @@ export default {
|
|||||||
case this.Signal.arrangementRoute.button.operation: // 排列进路
|
case this.Signal.arrangementRoute.button.operation: // 排列进路
|
||||||
return CMD.Signal.CMD_SIGNAL_SET_ROUTE;
|
return CMD.Signal.CMD_SIGNAL_SET_ROUTE;
|
||||||
case this.Signal.guide.button.operation: // 引导进路
|
case this.Signal.guide.button.operation: // 引导进路
|
||||||
return CMD.Section.CMD_SIGNAL_ROUTE_GUIDE;
|
return CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE;
|
||||||
case this.Signal.reopenSignal.button.operation:
|
case this.Signal.reopenSignal.button.operation:
|
||||||
return CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL;
|
return CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL;
|
||||||
}
|
}
|
||||||
@ -222,10 +223,10 @@ export default {
|
|||||||
type: 'mbm',
|
type: 'mbm',
|
||||||
operation: data.operateNext
|
operation: data.operateNext
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
@ -358,9 +359,12 @@ export default {
|
|||||||
} else if (model._type === 'MapCycleButtonVO' ) {
|
} else if (model._type === 'MapCycleButtonVO' ) {
|
||||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_SET_AUTO_TURN_BACK;
|
operate.cmdType = CMD.Signal.CMD_SIGNAL_SET_AUTO_TURN_BACK;
|
||||||
operate.param = {cycleCode: model.cycleCode};
|
operate.param = {cycleCode: model.cycleCode};
|
||||||
|
} else if (model._type === 'AutomaticRoute') {
|
||||||
|
const route = this.routeData[model.automaticRouteCode];
|
||||||
|
operate.cmdType = CMD.Signal.CMD_SIGNAL_SET_CI_AUTO;
|
||||||
|
operate.param = {signalCode: route.startSignalCode};
|
||||||
}
|
}
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {});
|
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {});
|
||||||
console.log(operate);
|
|
||||||
},
|
},
|
||||||
handelTotalCancel(model, subType) {
|
handelTotalCancel(model, subType) {
|
||||||
const operate = {
|
const operate = {
|
||||||
@ -370,14 +374,75 @@ export default {
|
|||||||
param: {}
|
param: {}
|
||||||
};
|
};
|
||||||
if (model._type === 'Signal') {
|
if (model._type === 'Signal') {
|
||||||
|
const autoReentry = getAutoReentryBySignalCode(model.code, this.routeList, this.autoReentryList);
|
||||||
|
const autoReentryRel = this.autoReentryData[autoReentry.code];
|
||||||
|
if (autoReentryRel.open) {
|
||||||
|
operate.cmdType = CMD.Signal.CMD_SIGNAL_CANCEL_AUTO_TURN_BACK;
|
||||||
|
operate.param = {cycleCode: model.cycleCode, cancelRoute: true};
|
||||||
|
} else {
|
||||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE;
|
operate.cmdType = CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE;
|
||||||
operate.param = {signalCode: model.code};
|
operate.param = {signalCode: model.code};
|
||||||
|
}
|
||||||
} else if (model._type === 'MapCycleButtonVO') {
|
} else if (model._type === 'MapCycleButtonVO') {
|
||||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_CANCEL_AUTO_TURN_BACK;
|
operate.cmdType = CMD.Signal.CMD_SIGNAL_CANCEL_AUTO_TURN_BACK;
|
||||||
operate.param = {cycleCode: model.cycleCode, cancelRoute: false};
|
operate.param = {cycleCode: model.cycleCode, cancelRoute: false};
|
||||||
|
} else if (model._type === 'AutomaticRoute') {
|
||||||
|
const route = this.routeData[model.automaticRouteCode];
|
||||||
|
operate.cmdType = CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO;
|
||||||
|
operate.param = {signalCode: route.startSignalCode};
|
||||||
}
|
}
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {});
|
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {});
|
||||||
console.log(operate);
|
},
|
||||||
|
handleGuideRoute(deviceList) {
|
||||||
|
if (deviceList.length === 1) {
|
||||||
|
let route = '';
|
||||||
|
this.routeList.forEach(item => {
|
||||||
|
if (item.startSignalCode === deviceList[0].code && this.routeData[item.code].lock) {
|
||||||
|
route = item;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (!route) {
|
||||||
|
const operate = {
|
||||||
|
type: 'mbm',
|
||||||
|
operation: this.$store.state.menuOperation.buttonOperation,
|
||||||
|
operateNext: this.Command.close.password.operation
|
||||||
|
};
|
||||||
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
|
if (valid) {
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
this.$refs.password.doShow(operate);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
const operate = {
|
||||||
|
send: true,
|
||||||
|
operation: this.$store.state.menuOperation.buttonOperation,
|
||||||
|
cmdType: this.cmdType,
|
||||||
|
param: {routeCode: route.code}
|
||||||
|
};
|
||||||
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
|
if (valid) {
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
operate['operateNext'] = this.Command.close.password.operation;
|
||||||
|
this.operation = '0';
|
||||||
|
this.$refs.password.doShow(operate);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else if (deviceList.length === 2) {
|
||||||
|
const operate = {
|
||||||
|
send: true,
|
||||||
|
operation: this.$store.state.menuOperation.buttonOperation,
|
||||||
|
cmdType: this.cmdType,
|
||||||
|
param: ''
|
||||||
|
};
|
||||||
|
this.routeList.forEach(item => {
|
||||||
|
if (item.startSignalCode === deviceList[0].code && item.endSignalCode === deviceList[1].code) {
|
||||||
|
operate.param = {routeCode: item.code};
|
||||||
|
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
selectedChange() {
|
selectedChange() {
|
||||||
// 按钮按下时
|
// 按钮按下时
|
||||||
@ -395,19 +460,15 @@ export default {
|
|||||||
this.handelFunctionButton(model, subType);
|
this.handelFunctionButton(model, subType);
|
||||||
} else if (this.$store.state.menuOperation.buttonOperation === this.MixinCommand.totalCancel.button.operation) {
|
} else if (this.$store.state.menuOperation.buttonOperation === this.MixinCommand.totalCancel.button.operation) {
|
||||||
this.handelTotalCancel(model, subType);
|
this.handelTotalCancel(model, subType);
|
||||||
|
} else if (this.$store.state.menuOperation.buttonOperation === this.Signal.guide.button.operation) {
|
||||||
|
if (model._type !== 'Signal') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.handleGuideRoute(this.deviceList);
|
||||||
} else {
|
} else {
|
||||||
const operate = this.handelOperate(model);
|
const operate = this.handelOperate(model);
|
||||||
if (this.cmdTypeList.indexOf(model._type) >= 0) {
|
if (this.cmdTypeList.indexOf(model._type) >= 0) {
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {});
|
||||||
if (valid) {
|
|
||||||
if (this.operation == this.Signal.guide.button.operation) { // 引导进路操作 显示密码窗
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
operate['operateNext'] = this.Command.close.password.operation;
|
|
||||||
this.operation = '0';
|
|
||||||
this.$refs.password.doShow(operate);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
Handler.clear(); // 清空操作组
|
Handler.clear(); // 清空操作组
|
||||||
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
<el-input v-model="sectionName" size="small" disabled />
|
<el-input v-model="sectionName" size="small" disabled />
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row style="margin-top: 10px;" v-if="isShow">
|
<el-row v-if="isShow" style="margin-top: 10px;">
|
||||||
<el-col :span="11">
|
<el-col :span="11">
|
||||||
<el-radio v-model="radio" label="1" :disabled="radio == 2" style="display: block; text-align: center;">
|
<el-radio v-model="radio" label="1" :disabled="radio == 2" style="display: block; text-align: center;">
|
||||||
激活</el-radio>
|
激活</el-radio>
|
||||||
@ -106,7 +106,7 @@ export default {
|
|||||||
this.sectionName += section.name;
|
this.sectionName += section.name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.sectionName += `-${selected.name}`;
|
this.sectionName += `${selected.name}`;
|
||||||
|
|
||||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||||
if (station) {
|
if (station) {
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
<div>操作设备</div>
|
<div>操作设备</div>
|
||||||
<el-col :span="11">
|
<el-col :span="11">
|
||||||
<el-select :id="domIdChoose" v-model="messageText2" filterable size="mini" :disabled="disabledConfirm2" @change="SelectChange">
|
<el-select :id="domIdChoose" v-model="messageText2" filterable size="mini" :disabled="disabledConfirm2" @change="SelectChange">
|
||||||
<el-option v-for="option in sectionList" :key="option.code" :label="option.name" :value="option.name" />
|
<el-option v-for="option in sectionList" :key="option.code" :label="option.name + '(' + option.code + ')'" :value="option.name" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8" :offset="1">
|
<el-col :span="8" :offset="1">
|
||||||
@ -126,7 +126,11 @@ export default {
|
|||||||
doShow(operate, selected) {
|
doShow(operate, selected) {
|
||||||
this.selected = selected;
|
this.selected = selected;
|
||||||
if (!this.dialogShow) {
|
if (!this.dialogShow) {
|
||||||
this.messageText1 = selected.name;
|
this.messageText1 = `${selected.name}(${selected.code})`;
|
||||||
|
// if (selected.parentCode) {
|
||||||
|
// const parentSection = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
|
||||||
|
// this.messageText1 = `${parentSection.name}${selected.name}`;
|
||||||
|
// }
|
||||||
|
|
||||||
this.operation = operate.operation;
|
this.operation = operate.operation;
|
||||||
}
|
}
|
||||||
@ -137,6 +141,11 @@ export default {
|
|||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
|
this.disabledConfirm1 = false;
|
||||||
|
this.disabledConfirm2 = true;
|
||||||
|
this.timeCountConfirm = -1;
|
||||||
|
this.messageText1 = '';
|
||||||
|
this.messageText2 = '';
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
this.mouseCancelState(this.selected);
|
this.mouseCancelState(this.selected);
|
||||||
},
|
},
|
||||||
@ -194,10 +203,10 @@ export default {
|
|||||||
|
|
||||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||||
operate.operation = OperationEvent.Section.unlock.confirm2.operation;
|
operate.operation = OperationEvent.Section.unlock.confirm2.operation;
|
||||||
operate.cmdType = CMD.Section.CMD_SECTION_UNBLOCK
|
operate.cmdType = CMD.Section.CMD_SECTION_UNBLOCK;
|
||||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||||
operate.operation = OperationEvent.Section.fault.confirm2.operation;
|
operate.operation = OperationEvent.Section.fault.confirm2.operation;
|
||||||
operate.cmdType = CMD.Section.CMD_SECTION_FAULT_UNLOCK
|
operate.cmdType = CMD.Section.CMD_SECTION_FAULT_UNLOCK;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
@ -214,7 +223,7 @@ export default {
|
|||||||
commit() {
|
commit() {
|
||||||
const operate = {
|
const operate = {
|
||||||
over: true,
|
over: true,
|
||||||
operation: '',
|
operation: ''
|
||||||
};
|
};
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||||
|
@ -215,11 +215,11 @@ export default {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
if (this.controlMode == 'center') {
|
if (this.controlMode == 'center') {
|
||||||
operate.cmdType = CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL;
|
|
||||||
operate.operation = OperationEvent.StationControl.requestCentralControl.menu.operation;
|
|
||||||
} else if (this.controlMode == 'local') {
|
|
||||||
operate.cmdType = CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL;
|
operate.cmdType = CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL;
|
||||||
operate.operation = OperationEvent.StationControl.requestStationControl.menu.operation;
|
operate.operation = OperationEvent.StationControl.requestStationControl.menu.operation;
|
||||||
|
} else if (this.controlMode == 'local') {
|
||||||
|
operate.cmdType = CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL;
|
||||||
|
operate.operation = OperationEvent.StationControl.requestCentralControl.menu.operation;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
@ -14,7 +14,17 @@ export async function getMapListByProject(drawWay) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function getAutoReentryBySignalCode(signalCode, routeList, autoReentryList) { // 根据折返进路的始端信号机去找
|
export function getAutoReentryBySignalCode(signalCode, routeList, autoReentryList) { // 根据折返进路的始端信号机去找
|
||||||
|
let route = '';
|
||||||
|
let autoReentry = '';
|
||||||
routeList.forEach(item => {
|
routeList.forEach(item => {
|
||||||
|
if (item.startSignalCode === signalCode && item.turnBack) {
|
||||||
});
|
route = item;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
autoReentryList.forEach(item => {
|
||||||
|
if (item.turnBackRouteCode === route.code || item.turnBackRoute2Code === route.code) {
|
||||||
|
autoReentry = item;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return autoReentry;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user