Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
ecb9287adf
12
src/App.vue
12
src/App.vue
@ -89,10 +89,12 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.subscribe();
|
|
||||||
openIndexedDB();
|
openIndexedDB();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
this.$store.dispatch('subscribe_un', {});
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
resizeHandler() {
|
resizeHandler() {
|
||||||
this.$store.dispatch('app/resize', { width: this._clientWidth, height: this._clientHeight });
|
this.$store.dispatch('app/resize', { width: this._clientWidth, height: this._clientHeight });
|
||||||
@ -110,14 +112,6 @@ export default {
|
|||||||
this.$store.dispatch('socket/setSimulationInvite');
|
this.$store.dispatch('socket/setSimulationInvite');
|
||||||
this.$store.dispatch('socket/setRoomInvite');
|
this.$store.dispatch('socket/setRoomInvite');
|
||||||
}
|
}
|
||||||
},
|
|
||||||
subscribe() {
|
|
||||||
const token = getToken();
|
|
||||||
const path = window.location.pathname;
|
|
||||||
if (token && this.$route.path != '/404' && !path.endsWith('login')) {
|
|
||||||
const header = { group: '', 'X-Token': token };
|
|
||||||
this.$store.dispatch('subscribe', {header, type: getSessionStorage('project')});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -259,7 +259,7 @@ class SkinCode extends defaultStyle {
|
|||||||
this[deviceType.SignalButton] = {
|
this[deviceType.SignalButton] = {
|
||||||
shape: 'roundWithDock',
|
shape: 'roundWithDock',
|
||||||
fillColor: '#808080',
|
fillColor: '#808080',
|
||||||
showName: true
|
showName: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
this[deviceType.SwitchFault] = {
|
this[deviceType.SwitchFault] = {
|
||||||
|
@ -23,7 +23,7 @@ export default class Resource extends Group {
|
|||||||
this.create();
|
this.create();
|
||||||
}
|
}
|
||||||
|
|
||||||
create() {
|
create() { // 58
|
||||||
const model = this.model;
|
const model = this.model;
|
||||||
this.image = new Image({
|
this.image = new Image({
|
||||||
zlevel: this.zlevel,
|
zlevel: this.zlevel,
|
||||||
|
@ -37,6 +37,7 @@ export default class SignalButton extends Group {
|
|||||||
this.z = 0
|
this.z = 0
|
||||||
this.model = model
|
this.model = model
|
||||||
this.style = style
|
this.style = style
|
||||||
|
this.pressed = false
|
||||||
// Line
|
// Line
|
||||||
this.create()
|
this.create()
|
||||||
this.setState(model)
|
this.setState(model)
|
||||||
@ -291,7 +292,6 @@ export default class SignalButton extends Group {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// let
|
|
||||||
// { value: 'PICK', label: '接车按钮' },
|
// { value: 'PICK', label: '接车按钮' },
|
||||||
// { value: 'SHUNT_TERMINAL', label: '调车终端按钮' },
|
// { value: 'SHUNT_TERMINAL', label: '调车终端按钮' },
|
||||||
if (!store.getters['map/checkDeviceShow'](this._code)) {
|
if (!store.getters['map/checkDeviceShow'](this._code)) {
|
||||||
@ -308,5 +308,26 @@ export default class SignalButton extends Group {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
pressDown(flg, color) {
|
||||||
|
if (this.pressed === flg) return
|
||||||
|
if (this.arcShapeDock1) {
|
||||||
|
if (flg) {
|
||||||
|
this.arcShape.attr({ shape: { cy: this.arcShape.shape.cy + 2 }, z: this.z + 2, zlevel: this.zlevel })
|
||||||
|
if (color) {
|
||||||
|
this.arcShape
|
||||||
|
.animateStyle(true)
|
||||||
|
.when(0, { fill: '#69666E' })
|
||||||
|
.when(1000, { fill: color })
|
||||||
|
.when(2000, { fill: '#69666E' })
|
||||||
|
.start()
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.arcShape.attr({ shape: { cy: this.arcShape.shape.cy - 2 }, z: this.z + 2, zlevel: this.zlevel })
|
||||||
|
this.arcShape.stopAnimation(true)
|
||||||
|
this.recover()
|
||||||
|
}
|
||||||
|
this.pressed = flg
|
||||||
|
}
|
||||||
|
}
|
||||||
getAnchorPoint() {}
|
getAnchorPoint() {}
|
||||||
}
|
}
|
||||||
|
@ -487,8 +487,6 @@ export default class Switch extends Group {
|
|||||||
if (this.model.switchFaultCode) {
|
if (this.model.switchFaultCode) {
|
||||||
const switchFault = this.mapDevice[this.model.switchFaultCode];
|
const switchFault = this.mapDevice[this.model.switchFaultCode];
|
||||||
if (this.style.SwitchFault.lamp.switchState) {
|
if (this.style.SwitchFault.lamp.switchState) {
|
||||||
console.log(fault)
|
|
||||||
console.log(pos)
|
|
||||||
if (pos === 'N') switchFault.instance.setControlColor(this.style.SwitchFault.lamp.controlColor)
|
if (pos === 'N') switchFault.instance.setControlColor(this.style.SwitchFault.lamp.controlColor)
|
||||||
else if (pos === 'R') switchFault.instance.setControlColor(this.style.SwitchFault.lamp.reverseColor)
|
else if (pos === 'R') switchFault.instance.setControlColor(this.style.SwitchFault.lamp.reverseColor)
|
||||||
else if (pos === 'NO') switchFault.instance.setControlColor(this.style.SwitchFault.lamp.switchingColor)
|
else if (pos === 'NO') switchFault.instance.setControlColor(this.style.SwitchFault.lamp.switchingColor)
|
||||||
@ -816,7 +814,6 @@ export default class Switch extends Group {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.setSwitchFault(model);
|
this.setSwitchFault(model);
|
||||||
console.log(model)
|
|
||||||
|
|
||||||
// model.pos == 'NO' || model.pos == 'EX';
|
// model.pos == 'NO' || model.pos == 'EX';
|
||||||
// N-定位 R-反位 NO-无(失表) EX-挤叉
|
// N-定位 R-反位 NO-无(失表) EX-挤叉
|
||||||
|
@ -110,7 +110,6 @@ export default {
|
|||||||
window.document.oncontextmenu = function () {
|
window.document.oncontextmenu = function () {
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
console.log(this.mapData, '---------------');
|
|
||||||
if (this.mapData && this.mapData.skinVO) {
|
if (this.mapData && this.mapData.skinVO) {
|
||||||
const parser = parserFactory(ParserType.Graph.value);
|
const parser = parserFactory(ParserType.Graph.value);
|
||||||
this.mapDevice = parser.parser(this.mapData, this.mapData.skinVO.code, this.map.getShowConfig());
|
this.mapDevice = parser.parser(this.mapData, this.mapData.skinVO.code, this.map.getShowConfig());
|
||||||
|
@ -141,6 +141,7 @@ export default {
|
|||||||
},
|
},
|
||||||
doShow(selected, type) {
|
doShow(selected, type) {
|
||||||
// this.$root.$emit('dialogOpen', selected);
|
// this.$root.$emit('dialogOpen', selected);
|
||||||
|
if (!this.mapData) { this.mapData = JSON.parse(JSON.stringify(this.$store.state.map.map)); }
|
||||||
this.selected = selected;
|
this.selected = selected;
|
||||||
this.type = type;
|
this.type = type;
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
@ -152,17 +153,14 @@ export default {
|
|||||||
loadData() {
|
loadData() {
|
||||||
this.beforeSwitchList = [];
|
this.beforeSwitchList = [];
|
||||||
this.beforeSectionList = [];
|
this.beforeSectionList = [];
|
||||||
if (this.mapData) {
|
this.$refs.map.loadData(this.mapData);
|
||||||
this.$refs.map.loadData(this.mapData);
|
setTimeout(() => {
|
||||||
setTimeout(() => {
|
if (this.type === 'rec') {
|
||||||
if (this.type === 'rec') {
|
this.clickEvent(this.selected.receivingRouteCode);
|
||||||
this.clickEvent(this.selected.receivingRouteCode);
|
} else if (this.type === 'dep') {
|
||||||
} else if (this.type === 'dep') {
|
this.clickEvent(this.selected.departureRouteCode);
|
||||||
this.clickEvent(this.selected.departureRouteCode);
|
}
|
||||||
}
|
}, 100);
|
||||||
}, 100);
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
@ -110,7 +110,6 @@ export default {
|
|||||||
window.document.oncontextmenu = function () {
|
window.document.oncontextmenu = function () {
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
console.log(this.mapData, '---------------');
|
|
||||||
if (this.mapData && this.mapData.skinVO) {
|
if (this.mapData && this.mapData.skinVO) {
|
||||||
const parser = parserFactory(ParserType.Graph.value);
|
const parser = parserFactory(ParserType.Graph.value);
|
||||||
this.mapDevice = parser.parser(this.mapData, this.mapData.skinVO.code, this.map.getShowConfig());
|
this.mapDevice = parser.parser(this.mapData, this.mapData.skinVO.code, this.map.getShowConfig());
|
||||||
|
@ -225,15 +225,15 @@ export default {
|
|||||||
components: {
|
components: {
|
||||||
PasswordBox,
|
PasswordBox,
|
||||||
DefectiveShunting,
|
DefectiveShunting,
|
||||||
NoticeInfo
|
NoticeInfo,
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: () => {
|
default: () => {
|
||||||
return null
|
return null
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -264,8 +264,9 @@ export default {
|
|||||||
buttonName: true,
|
buttonName: true,
|
||||||
signalName: true,
|
signalName: true,
|
||||||
switchName: true,
|
switchName: true,
|
||||||
sectionName: true
|
sectionName: true,
|
||||||
}
|
},
|
||||||
|
pressedSignalButton: null,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -331,7 +332,7 @@ export default {
|
|||||||
return CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
|
return CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
|
||||||
}
|
}
|
||||||
return ''
|
return ''
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'$store.state.menuOperation.buttonOperation': function(val, old) {
|
'$store.state.menuOperation.buttonOperation': function(val, old) {
|
||||||
@ -370,7 +371,7 @@ export default {
|
|||||||
const station = this.$store.getters['map/getDeviceByCode'](val)
|
const station = this.$store.getters['map/getDeviceByCode'](val)
|
||||||
this.$store.getters['map/checkStationGuideMaster'](station.code, station.sGuideMasterLock, station.xGuideMasterLock)
|
this.$store.getters['map/checkStationGuideMaster'](station.code, station.sGuideMasterLock, station.xGuideMasterLock)
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
this.routeDataMap = null
|
this.routeDataMap = null
|
||||||
@ -385,12 +386,12 @@ export default {
|
|||||||
over: true,
|
over: true,
|
||||||
operation: data.operation,
|
operation: data.operation,
|
||||||
cmdType: data.nextCmdType,
|
cmdType: data.nextCmdType,
|
||||||
param: data.param
|
param: data.param,
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
operate = {
|
operate = {
|
||||||
operationPre: data.operation,
|
operationPre: data.operation,
|
||||||
operation: data.operateNext
|
operation: data.operateNext,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.trainingOperation(operate)
|
this.trainingOperation(operate)
|
||||||
@ -477,7 +478,7 @@ export default {
|
|||||||
operation: this.Station.powerUnLock.button.operation,
|
operation: this.Station.powerUnLock.button.operation,
|
||||||
cmdType: CMD.Station.CMD_STATION_POWER_ON_UNLOCK,
|
cmdType: CMD.Station.CMD_STATION_POWER_ON_UNLOCK,
|
||||||
code: this.$store.state.map.showCentralizedStationCode,
|
code: this.$store.state.map.showCentralizedStationCode,
|
||||||
param: { stationCode: this.$store.state.map.showCentralizedStationCode }
|
param: { stationCode: this.$store.state.map.showCentralizedStationCode },
|
||||||
}
|
}
|
||||||
this.$store
|
this.$store
|
||||||
.dispatch('training/nextNew', operate)
|
.dispatch('training/nextNew', operate)
|
||||||
@ -503,7 +504,7 @@ export default {
|
|||||||
// S引导总锁按钮点击
|
// S引导总锁按钮点击
|
||||||
guideLockLeftButtonDown() {
|
guideLockLeftButtonDown() {
|
||||||
const operate = {
|
const operate = {
|
||||||
operation: this.Station.stationMasterLock.leftButton.operation
|
operation: this.Station.stationMasterLock.leftButton.operation,
|
||||||
}
|
}
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
@ -519,7 +520,7 @@ export default {
|
|||||||
// X引导总锁按钮点击
|
// X引导总锁按钮点击
|
||||||
guideLockRightButtonDown() {
|
guideLockRightButtonDown() {
|
||||||
const operate = {
|
const operate = {
|
||||||
operation: this.Station.stationMasterLock.rightButton.operation
|
operation: this.Station.stationMasterLock.rightButton.operation,
|
||||||
}
|
}
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
@ -532,17 +533,18 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
buttonDown(operation, commandTypeList) {
|
buttonDown(operation, commandTypeList, color) {
|
||||||
this.clearOperate()
|
this.clearOperate()
|
||||||
|
this.pressedSignalButton && this.pressedSignalButton.instance.pressDown(true, color)
|
||||||
if (operation != this.Command.cancel.clearMbm.operation) {
|
if (operation != this.Command.cancel.clearMbm.operation) {
|
||||||
const operate = {
|
const operate = {
|
||||||
operation: operation
|
operation: operation,
|
||||||
}
|
}
|
||||||
// 以下 会弹出密码框 (总人解,区故解) 铅封按钮
|
// 以下 会弹出密码框 (总人解,区故解) 铅封按钮
|
||||||
const operationList = [
|
const operationList = [
|
||||||
this.Signal.humanTrainRoute.button.operation,
|
this.Signal.humanTrainRoute.button.operation,
|
||||||
this.Section.fault.button.operation,
|
this.Section.fault.button.operation,
|
||||||
this.Section.defectiveShunting.button.operation
|
this.Section.defectiveShunting.button.operation,
|
||||||
]
|
]
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
@ -563,7 +565,7 @@ export default {
|
|||||||
// 清除按钮
|
// 清除按钮
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
operation: operation
|
operation: operation,
|
||||||
}
|
}
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
@ -595,7 +597,7 @@ export default {
|
|||||||
// 排列进路 OR 信号重开操作
|
// 排列进路 OR 信号重开操作
|
||||||
arrangementRouteOperation(deviceList) {
|
arrangementRouteOperation(deviceList) {
|
||||||
const operate = {
|
const operate = {
|
||||||
operation: this.Signal.arrangementRoute.button.operation
|
operation: this.Signal.arrangementRoute.button.operation,
|
||||||
}
|
}
|
||||||
if (!this.routeDataMap) {
|
if (!this.routeDataMap) {
|
||||||
this.handleRouteDataMap()
|
this.handleRouteDataMap()
|
||||||
@ -672,8 +674,8 @@ export default {
|
|||||||
operation: this.$store.state.menuOperation.buttonOperation,
|
operation: this.$store.state.menuOperation.buttonOperation,
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE,
|
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE,
|
||||||
param: {
|
param: {
|
||||||
signalCode: model._type === 'Signal' ? model.code : model.signalCode
|
signalCode: model._type === 'Signal' ? model.code : model.signalCode,
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
this.$store
|
this.$store
|
||||||
.dispatch('training/nextNew', operate)
|
.dispatch('training/nextNew', operate)
|
||||||
@ -693,7 +695,7 @@ export default {
|
|||||||
code: model.code,
|
code: model.code,
|
||||||
operation: this.Signal.guide.button.operation,
|
operation: this.Signal.guide.button.operation,
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE,
|
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE,
|
||||||
param: { signalCode: model.signalCode }
|
param: { signalCode: model.signalCode },
|
||||||
}
|
}
|
||||||
const signal = this.$store.getters['map/getDeviceByCode'](model.signalCode)
|
const signal = this.$store.getters['map/getDeviceByCode'](model.signalCode)
|
||||||
// 信号机引导时间15s以内再次点击引导不需要进行密码输入
|
// 信号机引导时间15s以内再次点击引导不需要进行密码输入
|
||||||
@ -711,7 +713,7 @@ export default {
|
|||||||
code: model.code,
|
code: model.code,
|
||||||
operation: this.$store.state.menuOperation.buttonOperation,
|
operation: this.$store.state.menuOperation.buttonOperation,
|
||||||
val: model.code,
|
val: model.code,
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE
|
cmdType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE,
|
||||||
}
|
}
|
||||||
const signal = this.$store.getters['map/getDeviceByCode'](model.signalCode || model.code)
|
const signal = this.$store.getters['map/getDeviceByCode'](model.signalCode || model.code)
|
||||||
if (model._type === 'SignalButton' && model.type === 'PICK') {
|
if (model._type === 'SignalButton' && model.type === 'PICK') {
|
||||||
@ -733,7 +735,7 @@ export default {
|
|||||||
code: model.code,
|
code: model.code,
|
||||||
operation: this.$store.state.menuOperation.buttonOperation,
|
operation: this.$store.state.menuOperation.buttonOperation,
|
||||||
cmdType: this.cmdType,
|
cmdType: this.cmdType,
|
||||||
param: { switchCode: code }
|
param: { switchCode: code },
|
||||||
}
|
}
|
||||||
this.sendCommand(operate)
|
this.sendCommand(operate)
|
||||||
},
|
},
|
||||||
@ -770,7 +772,7 @@ export default {
|
|||||||
code: model.code,
|
code: model.code,
|
||||||
operation: buttonOperation,
|
operation: buttonOperation,
|
||||||
cmdType: '',
|
cmdType: '',
|
||||||
param: {}
|
param: {},
|
||||||
}
|
}
|
||||||
if (model._type === 'Signal' && !this.checkHasTrainButton(model)) {
|
if (model._type === 'Signal' && !this.checkHasTrainButton(model)) {
|
||||||
if (buttonOperation === this.Signal.lock.button.operation) {
|
if (buttonOperation === this.Signal.lock.button.operation) {
|
||||||
@ -799,7 +801,7 @@ export default {
|
|||||||
code: model.code,
|
code: model.code,
|
||||||
operation: this.guideLockRightFlag ? this.Switch.guideLock.rightButton : this.Switch.guideLock.leftButton,
|
operation: this.guideLockRightFlag ? this.Switch.guideLock.rightButton : this.Switch.guideLock.leftButton,
|
||||||
nextCmdType: CMD.Switch.CMD_SWITCH_MASTER_LOCK,
|
nextCmdType: CMD.Switch.CMD_SWITCH_MASTER_LOCK,
|
||||||
param: { signalCode: model.signalCode }
|
param: { signalCode: model.signalCode },
|
||||||
}
|
}
|
||||||
// 信号机引导时间15s以内再次点击引导不需要进行密码输入
|
// 信号机引导时间15s以内再次点击引导不需要进行密码输入
|
||||||
if (signal.guideTime) {
|
if (signal.guideTime) {
|
||||||
@ -817,7 +819,7 @@ export default {
|
|||||||
code: model.code,
|
code: model.code,
|
||||||
operation: this.$store.state.menuOperation.buttonOperation,
|
operation: this.$store.state.menuOperation.buttonOperation,
|
||||||
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK,
|
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK,
|
||||||
param: { sectionCode: model.code }
|
param: { sectionCode: model.code },
|
||||||
}
|
}
|
||||||
this.sendCommand(operate)
|
this.sendCommand(operate)
|
||||||
}
|
}
|
||||||
@ -826,6 +828,10 @@ export default {
|
|||||||
selectedChange() {
|
selectedChange() {
|
||||||
// 按钮按下时
|
// 按钮按下时
|
||||||
const model = this.selected // 选择设备
|
const model = this.selected // 选择设备
|
||||||
|
if (this.pressedSignalButton /* && this.pressedSignalButton.code === model.code */) {
|
||||||
|
this.pressedSignalButton.instance.pressDown(false)
|
||||||
|
this.pressedSignalButton = null
|
||||||
|
}
|
||||||
if (
|
if (
|
||||||
(this.$store.state.training.prdType != '01' && this.$store.state.training.prdType != '10') ||
|
(this.$store.state.training.prdType != '01' && this.$store.state.training.prdType != '10') ||
|
||||||
this.selected._event !== MouseEvent.Left ||
|
this.selected._event !== MouseEvent.Left ||
|
||||||
@ -840,7 +846,7 @@ export default {
|
|||||||
this.Switch.locate.button.operation,
|
this.Switch.locate.button.operation,
|
||||||
this.Switch.reverse.button.operation,
|
this.Switch.reverse.button.operation,
|
||||||
this.Switch.block.button.operation,
|
this.Switch.block.button.operation,
|
||||||
this.Switch.unblock.button.operation
|
this.Switch.unblock.button.operation,
|
||||||
]
|
]
|
||||||
const signalButtonOperation = [
|
const signalButtonOperation = [
|
||||||
'LOCATE', //总定
|
'LOCATE', //总定
|
||||||
@ -849,7 +855,9 @@ export default {
|
|||||||
'UNLOCK', //解锁
|
'UNLOCK', //解锁
|
||||||
'BLOCK', //单封
|
'BLOCK', //单封
|
||||||
'UNBLOCK', //解封,
|
'UNBLOCK', //解封,
|
||||||
'SECTION_FAULT_UNLOCK' //区故解
|
'SECTION_FAULT_UNLOCK', //区故解
|
||||||
|
'CANCEL', //总取消
|
||||||
|
'HUMAN_RELEASE_ROUTE', // 总人解
|
||||||
]
|
]
|
||||||
if ((this.guideLockLeftFlag || this.guideLockRightFlag) && model._type === 'SignalButton' && model.type === 'GUIDE') {
|
if ((this.guideLockLeftFlag || this.guideLockRightFlag) && model._type === 'SignalButton' && model.type === 'GUIDE') {
|
||||||
this.handleGuideLock(model)
|
this.handleGuideLock(model)
|
||||||
@ -884,21 +892,30 @@ export default {
|
|||||||
this.guideLockRightButtonDown()
|
this.guideLockRightButtonDown()
|
||||||
}
|
}
|
||||||
} else if (model._type === 'SignalButton' && signalButtonOperation.includes(model.type)) {
|
} else if (model._type === 'SignalButton' && signalButtonOperation.includes(model.type)) {
|
||||||
|
this.pressedSignalButton = model
|
||||||
|
const { lamp } = model.instance.style.SwitchFault
|
||||||
//总定总反单锁解锁单封解封
|
//总定总反单锁解锁单封解封
|
||||||
if (model.type === 'LOCATE') {
|
if (model.type === 'LOCATE') {
|
||||||
this.buttonDown(this.Switch.locate.button.operation, ['Switch', 'SwitchFault'])
|
this.buttonDown(this.Switch.locate.button.operation, ['Switch', 'SwitchFault'], lamp.controlColor)
|
||||||
} else if (model.type === 'REVERSE') {
|
} else if (model.type === 'REVERSE') {
|
||||||
this.buttonDown(this.Switch.reverse.button.operation, ['Switch', 'SwitchFault'])
|
this.buttonDown(this.Switch.reverse.button.operation, ['Switch', 'SwitchFault'], lamp.reverseColor)
|
||||||
} else if (model.type === 'MONOLOCK') {
|
} else if (model.type === 'MONOLOCK') {
|
||||||
this.buttonDown(this.Switch.lock.button.operation, ['Switch', 'SwitchFault'])
|
this.buttonDown(this.Switch.lock.button.operation, ['Switch', 'SwitchFault'], lamp.lockColor)
|
||||||
} else if (model.type === 'UNLOCK') {
|
} else if (model.type === 'UNLOCK') {
|
||||||
this.buttonDown(this.Switch.unlock.button.operation, ['Switch', 'SwitchFault'])
|
this.buttonDown(this.Switch.unlock.button.operation, ['Switch', 'SwitchFault'], lamp.controlColor)
|
||||||
} else if (model.type === 'BLOCK') {
|
} else if (model.type === 'BLOCK') {
|
||||||
this.buttonDown(this.Switch.block.button.operation, ['Switch', 'SwitchFault'])
|
this.buttonDown(this.Switch.block.button.operation, ['Switch', 'SwitchFault'], lamp.blockColor)
|
||||||
} else if (model.type === 'UNBLOCK') {
|
} else if (model.type === 'UNBLOCK') {
|
||||||
this.buttonDown(this.Switch.unblock.button.operation, ['Switch', 'SwitchFault'])
|
this.buttonDown(this.Switch.unblock.button.operation, ['Switch', 'SwitchFault'], lamp.controlColor)
|
||||||
} else if (model.type === 'SECTION_FAULT_UNLOCK') {
|
} else if (model.type === 'SECTION_FAULT_UNLOCK') {
|
||||||
this.buttonDown(this.Section.fault.button.operation, ['Section'])
|
//区故解
|
||||||
|
this.buttonDown(this.Section.fault.button.operation, ['Section'], lamp.faultColor)
|
||||||
|
} else if (model.type === 'CANCEL') {
|
||||||
|
//总取消
|
||||||
|
this.buttonDown(this.MixinCommand.totalCancel.button.operation, ['Signal', 'SignalButton'])
|
||||||
|
} else if (model.type === 'HUMAN_RELEASE_ROUTE') {
|
||||||
|
//总人解
|
||||||
|
this.buttonDown(this.Signal.humanTrainRoute.button.operation, ['Signal', 'SignalButton'])
|
||||||
}
|
}
|
||||||
} else if (
|
} else if (
|
||||||
(model._type === 'SignalButton' && !this.checkSignalBlock(model.signalCode)) ||
|
(model._type === 'SignalButton' && !this.checkSignalBlock(model.signalCode)) ||
|
||||||
@ -930,11 +947,13 @@ export default {
|
|||||||
this.deviceList &&
|
this.deviceList &&
|
||||||
this.deviceList.length &&
|
this.deviceList.length &&
|
||||||
this.$store.dispatch('training/updateMapState', [
|
this.$store.dispatch('training/updateMapState', [
|
||||||
{ code: this.deviceList[0].code, _type: this.deviceList[0]._type, hasSelected: 0 }
|
{ code: this.deviceList[0].code, _type: this.deviceList[0]._type, hasSelected: 0 },
|
||||||
])
|
])
|
||||||
this.deviceList = []
|
this.deviceList = []
|
||||||
Handler.clear() // 清空操作组
|
Handler.clear() // 清空操作组
|
||||||
this.$store.dispatch('menuOperation/setButtonOperation', null)
|
this.$store.dispatch('menuOperation/setButtonOperation', null)
|
||||||
|
// this.pressedSignalButton && this.pressedSignalButton.instance.pressDown(false)
|
||||||
|
// this.pressedSignalButton = null
|
||||||
},
|
},
|
||||||
assistOperateOrChange(model) {
|
assistOperateOrChange(model) {
|
||||||
// mode.type==
|
// mode.type==
|
||||||
@ -946,8 +965,8 @@ export default {
|
|||||||
param: {
|
param: {
|
||||||
labelEnum: model.labelEnum,
|
labelEnum: model.labelEnum,
|
||||||
stationCode: model.stationCode,
|
stationCode: model.stationCode,
|
||||||
pressDown: model.pressDown ? 0 : 1 // 1按下、0弹起
|
pressDown: model.pressDown ? 0 : 1, // 1按下、0弹起
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
// 改方
|
// 改方
|
||||||
CHANGE_DIRECTION: {
|
CHANGE_DIRECTION: {
|
||||||
@ -956,8 +975,8 @@ export default {
|
|||||||
param: {
|
param: {
|
||||||
labelEnum: model.labelEnum,
|
labelEnum: model.labelEnum,
|
||||||
stationCode: model.stationCode,
|
stationCode: model.stationCode,
|
||||||
pressDown: model.pressDown ? 0 : 1 // 1按下、0弹起
|
pressDown: model.pressDown ? 0 : 1, // 1按下、0弹起
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
// 接辅助按钮
|
// 接辅助按钮
|
||||||
PICK_ASSIST: {
|
PICK_ASSIST: {
|
||||||
@ -966,8 +985,8 @@ export default {
|
|||||||
nextCmdType: CMD.CTC.CTC_ASSIST_PRESS_RECEIVE_ASSIST,
|
nextCmdType: CMD.CTC.CTC_ASSIST_PRESS_RECEIVE_ASSIST,
|
||||||
param: {
|
param: {
|
||||||
labelEnum: model.labelEnum,
|
labelEnum: model.labelEnum,
|
||||||
stationCode: model.stationCode
|
stationCode: model.stationCode,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
// 发辅助按钮
|
// 发辅助按钮
|
||||||
DEPART_ASSIST: {
|
DEPART_ASSIST: {
|
||||||
@ -975,8 +994,8 @@ export default {
|
|||||||
nextCmdType: CMD.CTC.CTC_ASSIST_PRESS_DELIVER_ASSIST,
|
nextCmdType: CMD.CTC.CTC_ASSIST_PRESS_DELIVER_ASSIST,
|
||||||
param: {
|
param: {
|
||||||
labelEnum: model.labelEnum,
|
labelEnum: model.labelEnum,
|
||||||
stationCode: model.stationCode
|
stationCode: model.stationCode,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
// 事故按钮
|
// 事故按钮
|
||||||
ACCIDENT: {
|
ACCIDENT: {
|
||||||
@ -984,9 +1003,9 @@ export default {
|
|||||||
nextCmdType: CMD.CTC.CTC_ASSIST_PRESS_ACCIDENT,
|
nextCmdType: CMD.CTC.CTC_ASSIST_PRESS_ACCIDENT,
|
||||||
param: {
|
param: {
|
||||||
labelEnum: model.labelEnum,
|
labelEnum: model.labelEnum,
|
||||||
stationCode: model.stationCode
|
stationCode: model.stationCode,
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
const noPasswordModelTypeMap = {
|
const noPasswordModelTypeMap = {
|
||||||
// 闭塞按钮
|
// 闭塞按钮
|
||||||
@ -995,8 +1014,8 @@ export default {
|
|||||||
nextCmdType: CMD.CTC.CTC_ASSIST_PRESS_BLOCK,
|
nextCmdType: CMD.CTC.CTC_ASSIST_PRESS_BLOCK,
|
||||||
param: {
|
param: {
|
||||||
labelEnum: model.labelEnum,
|
labelEnum: model.labelEnum,
|
||||||
stationCode: model.stationCode
|
stationCode: model.stationCode,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
// 复原按钮
|
// 复原按钮
|
||||||
RECOVERY: {
|
RECOVERY: {
|
||||||
@ -1004,9 +1023,9 @@ export default {
|
|||||||
nextCmdType: CMD.CTC.CTC_ASSIST_PRESS_RESTORE,
|
nextCmdType: CMD.CTC.CTC_ASSIST_PRESS_RESTORE,
|
||||||
param: {
|
param: {
|
||||||
labelEnum: model.labelEnum,
|
labelEnum: model.labelEnum,
|
||||||
stationCode: model.stationCode
|
stationCode: model.stationCode,
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
if (noPasswordModelTypeMap[model.type]) {
|
if (noPasswordModelTypeMap[model.type]) {
|
||||||
const operate = {
|
const operate = {
|
||||||
@ -1014,7 +1033,7 @@ export default {
|
|||||||
operation: noPasswordModelTypeMap[model.type].operation,
|
operation: noPasswordModelTypeMap[model.type].operation,
|
||||||
code: model.code,
|
code: model.code,
|
||||||
param: noPasswordModelTypeMap[model.type].param,
|
param: noPasswordModelTypeMap[model.type].param,
|
||||||
cmdType: noPasswordModelTypeMap[model.type].nextCmdType
|
cmdType: noPasswordModelTypeMap[model.type].nextCmdType,
|
||||||
}
|
}
|
||||||
this.$store
|
this.$store
|
||||||
.dispatch('training/nextNew', operate)
|
.dispatch('training/nextNew', operate)
|
||||||
@ -1033,7 +1052,7 @@ export default {
|
|||||||
const operate = {
|
const operate = {
|
||||||
operation: modelTypeMap[model.type].operation,
|
operation: modelTypeMap[model.type].operation,
|
||||||
code: model.code,
|
code: model.code,
|
||||||
param: modelTypeMap[model.type].param
|
param: modelTypeMap[model.type].param,
|
||||||
}
|
}
|
||||||
this.$store
|
this.$store
|
||||||
.dispatch('training/nextNew', operate)
|
.dispatch('training/nextNew', operate)
|
||||||
@ -1066,8 +1085,8 @@ export default {
|
|||||||
// console.error(error);
|
// console.error(error);
|
||||||
// this.$refs.noticeInfo.doShow();
|
// this.$refs.noticeInfo.doShow();
|
||||||
// });
|
// });
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
|
@ -67,7 +67,14 @@ function handleRoute(to, next, loginPath) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
function subscribe() {
|
||||||
|
const token = getToken();
|
||||||
|
const path = window.location.pathname;
|
||||||
|
if (token && path != '/404' && !path.endsWith('login')) {
|
||||||
|
const header = { group: '', 'X-Token': token };
|
||||||
|
store.dispatch('subscribe', {header, type: getSessionStorage('project')});
|
||||||
|
}
|
||||||
|
}
|
||||||
router.beforeEach( async (to, from, next) => {
|
router.beforeEach( async (to, from, next) => {
|
||||||
if (to.query.thirdJump) {
|
if (to.query.thirdJump) {
|
||||||
setToken(to.query.key);
|
setToken(to.query.key);
|
||||||
@ -99,6 +106,7 @@ router.beforeEach( async (to, from, next) => {
|
|||||||
store.dispatch('setResourcesUrl', urlData.VOICE_API);
|
store.dispatch('setResourcesUrl', urlData.VOICE_API);
|
||||||
store.dispatch('setUploadUrl', urlData.UPLOAD_API);
|
store.dispatch('setUploadUrl', urlData.UPLOAD_API);
|
||||||
store.dispatch('setBaseSite', urlData.BASE_SITE);
|
store.dispatch('setBaseSite', urlData.BASE_SITE);
|
||||||
|
subscribe();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
const urlData = handlerUrl();
|
const urlData = handlerUrl();
|
||||||
store.dispatch('setBaseUrl', urlData.BASE_API);
|
store.dispatch('setBaseUrl', urlData.BASE_API);
|
||||||
|
@ -54,7 +54,7 @@ export function creatSubscribe(topic, header) {
|
|||||||
}
|
}
|
||||||
Vue.prototype.$stomp.subscribe(topic, callback, header);
|
Vue.prototype.$stomp.subscribe(topic, callback, header);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('websocket订阅失败');
|
console.error('websocket订阅失败', error, topic, header);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 回调函数
|
// 回调函数
|
||||||
|
@ -159,6 +159,7 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
<div class="bigDraft">
|
<div class="bigDraft">
|
||||||
<el-button-group class="bigDraftBtn">
|
<el-button-group class="bigDraftBtn">
|
||||||
|
<el-button v-if="isModify" type="primary" size="small" :loading="loading" @click="clear ">取消更新</el-button>
|
||||||
<el-button v-if="isModify" type="warning" size="small" :loading="loading" @click="save ">更新进路</el-button>
|
<el-button v-if="isModify" type="warning" size="small" :loading="loading" @click="save ">更新进路</el-button>
|
||||||
<el-button v-else type="primary" size="small" :loading="loading" @click="save">保存进路</el-button>
|
<el-button v-else type="primary" size="small" :loading="loading" @click="save">保存进路</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
|
@ -50,14 +50,6 @@ export default {
|
|||||||
lazy: true,
|
lazy: true,
|
||||||
mapData: null,
|
mapData: null,
|
||||||
imageLists: [
|
imageLists: [
|
||||||
// {
|
|
||||||
// value: `${process.env.VOICE_API}/oss/2d/bj1.png`,
|
|
||||||
// label: this.$t('map.upside')
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// value: `${process.env.VOICE_API}/oss/2d/bj2.png`,
|
|
||||||
// label: this.$t('map.hypomere')
|
|
||||||
// }
|
|
||||||
{
|
{
|
||||||
value: `${this.$store.state.user.resourcesUrl}/PICTURE/2022-08-01/2292-98507.png`,
|
value: `${this.$store.state.user.resourcesUrl}/PICTURE/2022-08-01/2292-98507.png`,
|
||||||
label: '电流表'
|
label: '电流表'
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
title="路票"
|
title="簿册"
|
||||||
:visible="registerBookShow"
|
:visible="registerBookShow"
|
||||||
fullscreen
|
fullscreen
|
||||||
:before-close="doClose"
|
:before-close="doClose"
|
||||||
@ -124,7 +124,7 @@ export default {
|
|||||||
this.queryData();
|
this.queryData();
|
||||||
},
|
},
|
||||||
queryData() {
|
queryData() {
|
||||||
const params = { stationCode: this.$store.state.map.showCentralizedStationCode};
|
const params = { stationCode: this.$store.state.training.roleDeviceCode};
|
||||||
commitOperate(menuOperate.Rail.railQueryRegister, params, 3).then(({valid, operate, response})=>{
|
commitOperate(menuOperate.Rail.railQueryRegister, params, 3).then(({valid, operate, response})=>{
|
||||||
this.tableData = response.data ? response.data.lines : [];
|
this.tableData = response.data ? response.data.lines : [];
|
||||||
this.dataIndex = null;
|
this.dataIndex = null;
|
||||||
@ -133,7 +133,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
saveData(data) {
|
saveData(data) {
|
||||||
const params = { stationCode: this.$store.state.map.showCentralizedStationCode, line: data };
|
const params = { stationCode: this.$store.state.training.roleDeviceCode, line: data };
|
||||||
commitOperate(menuOperate.Rail.railFillInRegister, params, 3).then(({valid, operate})=>{
|
commitOperate(menuOperate.Rail.railFillInRegister, params, 3).then(({valid, operate})=>{
|
||||||
this.queryData();
|
this.queryData();
|
||||||
}).catch(()=>{
|
}).catch(()=>{
|
||||||
|
Loading…
Reference in New Issue
Block a user