diff --git a/src/jmapNew/config/skinCode/bejing_01.js b/src/jmapNew/config/skinCode/bejing_01.js index c5c30ba93..b11a0d198 100644 --- a/src/jmapNew/config/skinCode/bejing_01.js +++ b/src/jmapNew/config/skinCode/bejing_01.js @@ -502,7 +502,7 @@ class SkinCode extends defaultStyle { trainTargetTextAlign: 'left'// 车次号文字显示位置 }, trainTargetNumber: { - trainTargetNumberOffset: { x: 0, y: 0 }// 车组号偏移量 + trainTargetNumberOffset: { x: -4, y: 4 }// 车组号偏移量 }, trainHead: { trainMoreLength: 0, // 列车车头比车身高出的长度,上下相比车体伸出去的边框 diff --git a/src/jmapNew/config/skinCode/chengdu_01.js b/src/jmapNew/config/skinCode/chengdu_01.js index e16af7d67..f0c861d39 100644 --- a/src/jmapNew/config/skinCode/chengdu_01.js +++ b/src/jmapNew/config/skinCode/chengdu_01.js @@ -456,7 +456,7 @@ class SkinCode extends defaultStyle { trainTargetTextAlign: 'right' // 车次号文字显示位置 }, trainTargetNumber: { - trainTargetNumberOffset: {x: 0, y: 0}// 车组号偏移量 + trainTargetNumberOffset: {x: -4, y: 4}// 车组号偏移量 }, trainHead: { trainMoreLength: 1, // 列车车头比车身高出的长度,上下相比车体伸出去的边框 diff --git a/src/jmapNew/config/skinCode/chengdu_03.js b/src/jmapNew/config/skinCode/chengdu_03.js index a3872497f..82e2cccb3 100644 --- a/src/jmapNew/config/skinCode/chengdu_03.js +++ b/src/jmapNew/config/skinCode/chengdu_03.js @@ -469,7 +469,7 @@ class SkinCode extends defaultStyle { trainTargetTextAlign: 'right' // 车次号文字显示位置 }, trainTargetNumber: { - trainTargetNumberOffset: {x: 0, y: 0}// 车组号偏移量 + trainTargetNumberOffset: {x: -4, y: 4}// 车组号偏移量 }, trainHead: { trainMoreLength: 0, // 列车车头比车身高出的长度,上下相比车体伸出去的边框 diff --git a/src/jmapNew/config/skinCode/fuzhou_01.js b/src/jmapNew/config/skinCode/fuzhou_01.js index 97fd29ac8..511f84f1a 100644 --- a/src/jmapNew/config/skinCode/fuzhou_01.js +++ b/src/jmapNew/config/skinCode/fuzhou_01.js @@ -477,7 +477,7 @@ class SkinCode extends defaultStyle { trainTargetNumber: { groupNumberPrefix: '000', // 车组号前缀 defaultGroupNumber: 'EEE', // 默认车组号 - trainTargetNumberOffset: {x: 0, y: 1}// 车组号偏移量 + trainTargetNumberOffset: {x: -1, y: 1}// 车组号偏移量 }, trainHead: { trainMoreLength: 1, // 列车车头比车身高出的长度,上下相比车体伸出去的边框 diff --git a/src/jmapNew/config/skinCode/haerbin_01.js b/src/jmapNew/config/skinCode/haerbin_01.js index 179e0e2be..accca650f 100644 --- a/src/jmapNew/config/skinCode/haerbin_01.js +++ b/src/jmapNew/config/skinCode/haerbin_01.js @@ -448,48 +448,64 @@ class SkinCode extends defaultStyle { this[deviceType.Train] = { trainBody: { - trainBodyLineWidth: 0, // 车身line宽 - changeTrainWidth: true, // 是否根据车身上车组号、服务号、车次号、目的地码显示情况改变列车长度 + trainBodyLineWidth: 2, // 车身line宽 + changeTrainWidth: false, // 是否根据车身上车组号、服务号、车次号、目的地码显示情况改变列车长度 specialTrainType: [ { type: '03', serviceNumber: 'MM', - nameFormat: 'serviceNumber:groupNumber' + nameFormat: 'tripNumber:serviceNumber:groupNumber' }, { type: '02', - nameFormat: 'targetCode:groupNumber' + nameFormat: 'tripNumber:serviceNumber:groupNumber' } ], // 特殊列车类型需设置显示格式 lrPadding: 1, // 两边间隔 upPadding: 1, // 上边距离 trainBodyFillColor: '#000000', // 列车车身填充颜色 - trainNameFormat: 'targetCode:serviceNumber:tripNumber'// 列车显示格式 + trainNameFormat: 'tripNumber:serviceNumber:groupNumber'// 列车显示格式 }, hsda: { trainHSDATextFontSize: 8// 列车HDSA字号 }, + trainAtrStatus: { + trainAtrStatusOffset: { x: 80, y: 9}, + r: 5 + }, + travelSigns: { + trainTravelSignsOffset: { x:3, y: 3} + }, + delayTime: { + trainDelayTimeOffset: { x:5, y: 14} + }, + crewNum: { + trainCrewNumOffset: { x:60, y: 25} + }, + travelNum: { + trainTravelNumOffset: { x:48, y:3} + }, trainNumber: { targetCodePrefix: '000', // 目的地码前缀 defaultTargetCode: 'AAA', // 默认目的地码 trainTargetTextAlign: 'left', // 车次号文字显示位置 - trainNumberOffset: { x: 1, y: 1 }// 目的地码偏移量 + trainNumberOffset: { x: 48, y: 3 }// 目的地码偏移量 }, trainServer: { serviceNumberPrefix: '00', // 服务号(表号)前缀 defaultServiceNumber: 'BB', // 默认服务号(表号) - trainServerOffset: { x: 26, y: 1 }// 列车服务号偏移 + trainServerOffset: { x: 35, y: 3 }// 列车服务号偏移 }, trainTarget: { - tripNumberPrefix: '<', // 车次号前缀 - defaultDirectionCode: 'D', // 默认车次号1 + tripNumberPrefix: '000', // 车次号前缀 + defaultDirectionCode: '', // 默认车次号1 defaultTripNumber: 'CCC', // 默认车次号2 - trainTargetOffset: { x: 42, y: 1 }// 列车车次号偏移 + trainTargetOffset: { x: 10, y: 3 }// 列车车次号偏移 }, trainTargetNumber: { groupNumberPrefix: '000', // 车组号前缀 defaultGroupNumber: 'EEE', // 默认车组号 - trainTargetNumberOffset: { x: 0, y: 1 }// 车组号偏移量 + trainTargetNumberOffset: { x: 5, y: 25 }// 车组号偏移量 }, trainHead: { trainMoreLength: 1, // 列车车头比车身高出的长度,上下相比车体伸出去的边框 @@ -501,12 +517,20 @@ class SkinCode extends defaultStyle { trainHeadFillColor: '#EF0C08'// 列车车头矩形填充颜色 }, common: { - trainHeight: 30, // 列车高度 + hasTravelSigns: true, // 是否有行进标志 + hasAtrStatus: true, // 是否有atr状态 + hasDelayTime: true, // 是否有延迟时间 + hasCrewNum: true, // 是否有乘务组号 + hasTravelNum: true, // 是否有行程号 + useSelfFormat: true, + useSelfText: true, + fixedCoordinates: true, // 列车车组号等固定坐标 + trainHeight: 40, // 列车高度 trainHeadDistance: 2, // 列车和车头之间的间距 - trainWidth: 76, // 列车长度 - trainTextFontSize: 15, // 列车字号 + trainWidth: 90, // 列车长度 + trainTextFontSize: 12, // 列车字号 fontFamily: 'consolas', // 默认字体 族类 - nameFontSize: 15, // 字体大小 + nameFontSize: 12, // 字体大小 haveTextHSDA: false, // 是否需创建textHSDA对象 haveArrowText: true, // 是否需创建arrowText对象 haveTrainBorder: false, // 是否需创建trainBorder对象 @@ -516,6 +540,7 @@ class SkinCode extends defaultStyle { displayPosition: 'margin' // 非同通信车在物理区段(有逻辑区段)上显示的位置 margin:行驶方向边缘车次窗 center: 中间位置车次窗 }, trainStatusStyle: { + defaultDestinationColor: '#FFFF00', // 默认目的地状态显示颜色 destinationStatus: [ { status: '01', showColor: '#FFFF00' }, { status: '02', showColor: '#00FF00' }, @@ -532,19 +557,19 @@ class SkinCode extends defaultStyle { lineLShow: false, lineRShow: false, arrowLShow: false, - arrowRShow: true + arrowRShow: false }, { type: 0, lineLShow: false, lineRShow: false, - arrowLShow: true, + arrowLShow: false, arrowRShow: false } ], // 运行方向状态类型对应车头显示状态 1从左往右 0从右往左 directionStopType: [ - { type: 1, lineLShow: false, lineRShow: true }, - { type: 0, lineLShow: true, lineRShow: false } + { type: 1, lineLShow: false, lineRShow: false }, + { type: 0, lineLShow: false, lineRShow: false } ], // 列车停止方向类型对应车头显示状态 1从左往右 0从右往左 driveModeStatus: [ { diff --git a/src/jmapNew/config/skinCode/ningbo_01.js b/src/jmapNew/config/skinCode/ningbo_01.js index 073073006..2a13c8cee 100644 --- a/src/jmapNew/config/skinCode/ningbo_01.js +++ b/src/jmapNew/config/skinCode/ningbo_01.js @@ -457,7 +457,7 @@ class SkinCode extends defaultStyle { trainTargetTextAlign: 'right' // 车次号文字显示位置 }, trainTargetNumber: { - trainTargetNumberOffset: { x: 0, y: 0 }// 车组号偏移量 + trainTargetNumberOffset: {x: -4, y: 4}// 车组号偏移量 }, trainHead: { trainMoreLength: 1, // 列车车头比车身高出的长度,上下相比车体伸出去的边框 @@ -471,7 +471,7 @@ class SkinCode extends defaultStyle { common: { trainHeight: 20, // 列车高度 trainHeadDistance: 2, // 列车和车头之间的间距 - trainWidth: 55, // 列车长度 + trainWidth: 57, // 列车长度 trainTextFontSize: 16, // 列车字号 fontFamily: 'consolas', // 默认字体 族类 haveTextHSDA: true, // 是否需创建textHSDA对象 diff --git a/src/jmapNew/shape/Train/TrainBody.js b/src/jmapNew/shape/Train/TrainBody.js index 86a9a54fe..279ffdc69 100644 --- a/src/jmapNew/shape/Train/TrainBody.js +++ b/src/jmapNew/shape/Train/TrainBody.js @@ -4,6 +4,7 @@ import '../StationStand/EDetain'; import ETextName from '../element/ETextName'; // 名称文字 (共有) import EMouse from './EMouse'; import store from '@/store'; +import Circle from 'zrender/src/graphic/shape/Circle'; /** 车身*/ export default class TrainBody extends Group { @@ -144,8 +145,8 @@ export default class TrainBody extends Group { this.textTrainTargetNumber = new ETextName({ zlevel: model.zlevel, z: model.z+1, - x: parseInt(model.point.x - style.Train.trainBody.lrPadding), - y: parseInt(model.point.y + style.Train.trainBody.upPadding), + x: parseInt(model.point.x + style.Train.trainTargetNumber.trainTargetNumberOffset.x), + y: parseInt(model.point.y + style.Train.trainTargetNumber.trainTargetNumberOffset.y), text: groupNumber.substring(groupNumber.length - 3), textFill: style.trainTextColor, textStroke: style.trainTextColor, @@ -163,6 +164,89 @@ export default class TrainBody extends Group { this.add(this.textD); this.add(this.textA); } + if (style.Train.common.hasAtrStatus) { + this.atrStatus = new Circle({ + zlevel: model.zlevel, + z: model.z + 1, + shape: { + cx: parseInt(model.point.x + style.Train.trainAtrStatus.trainAtrStatusOffset.x), + cy: parseInt(model.point.y + style.Train.trainAtrStatus.trainAtrStatusOffset.y), + r: style.Train.trainAtrStatus.r + }, + style: { + fill: '#ff0000' + } + }); + this.add(this.atrStatus); + } + if (style.Train.common.hasTravelSigns) { + this.travelSigns = new ETextName({ + zlevel: model.zlevel, + z: model.z + 1, + x: parseInt(model.point.x + style.Train.travelSigns.trainTravelSignsOffset.x), + y: parseInt(model.point.y + style.Train.travelSigns.trainTravelSignsOffset.y), + text: '<', + textFill: style.trainTextColor, + textStroke: style.trainTextColor, + textStrokeWidth: 0, + fontSize: model.fontSize, + fontFamily: style.Train.common.fontFamily, + textAlign: 'left', + textVerticalAlign: 'top' + }); + this.add(this.travelSigns); + } + if (style.Train.common.hasCrewNum) { + this.crewNum = new ETextName({ + zlevel: model.zlevel, + z: model.z + 1, + x: parseInt(model.point.x + style.Train.crewNum.trainCrewNumOffset.x), + y: parseInt(model.point.y + style.Train.crewNum.trainCrewNumOffset.y), + text: 'BBB', + textFill: style.trainTextColor, + textStroke: style.trainTextColor, + textStrokeWidth: 0, + fontSize: model.fontSize, + fontFamily: style.Train.common.fontFamily, + textAlign: 'left', + textVerticalAlign: 'top' + }); + this.add(this.crewNum); + } + if (style.Train.common.hasTravelNum) { + this.travelNum = new ETextName({ + zlevel: model.zlevel, + z: model.z + 1, + x: parseInt(model.point.x + style.Train.travelNum.trainTravelNumOffset.x), + y: parseInt(model.point.y + style.Train.travelNum.trainTravelNumOffset.y), + text: 'AA', + textFill: style.trainTextColor, + textStroke: style.trainTextColor, + textStrokeWidth: 0, + fontSize: model.fontSize, + fontFamily: style.Train.common.fontFamily, + textAlign: 'left', + textVerticalAlign: 'top' + }); + this.add(this.travelNum); + } + if (style.Train.common.hasDelayTime) { + this.delayTime = new ETextName({ + zlevel: model.zlevel, + z: model.z + 1, + x: parseInt(model.point.x + style.Train.delayTime.trainDelayTimeOffset.x), + y: parseInt(model.point.y + style.Train.delayTime.trainDelayTimeOffset.y), + text: '0', + textFill: style.trainTextColor, + textStroke: style.trainTextColor, + textStrokeWidth: 0, + fontSize: model.fontSize, + fontFamily: style.Train.common.fontFamily, + textAlign: 'left', + textVerticalAlign: 'top' + }); + this.add(this.delayTime); + } } removeTrainDetail() { @@ -218,19 +302,19 @@ export default class TrainBody extends Group { let widthText = 0; arr.forEach(ele => { if (ele == 'targetCode') { - this.textTrainNumber.setStyle('x', parseInt(model.point.x + widthText + style.Train.common.textOffset) ); + !style.Train.common.fixedCoordinates && this.textTrainNumber.setStyle('x', parseInt(model.point.x + widthText + style.Train.common.textOffset) ); widthText += this.textTrainNumber.getBoundingRect().width; this.add(this.textTrainNumber); } else if (ele == 'serviceNumber') { - this.textTrainServer.setStyle('x', parseInt(model.point.x + widthText + style.Train.common.textOffset)); + !style.Train.common.fixedCoordinates && this.textTrainServer.setStyle('x', parseInt(model.point.x + widthText + style.Train.common.textOffset)); widthText += this.textTrainServer.getBoundingRect().width; this.add(this.textTrainServer); } else if (ele == 'tripNumber') { - this.textTrainTarget.setStyle('x', parseInt(model.point.x + widthText + style.Train.common.textOffset)); + !style.Train.common.fixedCoordinates && this.textTrainTarget.setStyle('x', parseInt(model.point.x + widthText + style.Train.common.textOffset)); widthText += this.textTrainTarget.getBoundingRect().width; this.add(this.textTrainTarget); } else if (ele == 'groupNumber') { - this.textTrainTargetNumber.setStyle('x', parseInt(model.point.x + widthText + style.Train.common.textOffset)); + !style.Train.common.fixedCoordinates && this.textTrainTargetNumber.setStyle('x', parseInt(model.point.x + widthText + style.Train.common.textOffset)); widthText += this.textTrainTargetNumber.getBoundingRect().width; this.add(this.textTrainTargetNumber); } diff --git a/src/jmapNew/shape/Train/TrainBodyBox.js b/src/jmapNew/shape/Train/TrainBodyBox.js index d3e442232..af944c736 100644 --- a/src/jmapNew/shape/Train/TrainBodyBox.js +++ b/src/jmapNew/shape/Train/TrainBodyBox.js @@ -9,7 +9,7 @@ export default class TrainBodyBox extends Group { } create() { const model = this.model; - this.trainBodyBox = new Rect({ + this.trainBodyBox = new Rect({ zlevel: model.zlevel, z: model.z, shape: { diff --git a/src/jmapNew/theme/beijing_01/menus/dialog/standBackStrategy.vue b/src/jmapNew/theme/beijing_01/menus/dialog/standBackStrategy.vue index 2dbd2c8a4..e9644e612 100644 --- a/src/jmapNew/theme/beijing_01/menus/dialog/standBackStrategy.vue +++ b/src/jmapNew/theme/beijing_01/menus/dialog/standBackStrategy.vue @@ -179,7 +179,7 @@ } this.loading = true; - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.loading = false; if (valid) { this.doClose(); @@ -187,7 +187,7 @@ }).catch((error) => { this.loading = false; this.doClose(); - this.$refs.noticeInfo.doShow(operate); + this.$refs.noticeInfo.doShow(operate, [error.message]); }) } else { this.doClose(); @@ -199,11 +199,11 @@ operation: OperationEvent.Command.cancel.menu.operation, } - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.doClose(); } - }).catch(error => { + }).catch(() => { this.doClose(); }); } diff --git a/src/jmapNew/theme/beijing_01/menus/dialog/standControl.vue b/src/jmapNew/theme/beijing_01/menus/dialog/standControl.vue index 2937cd28c..bca51d54e 100644 --- a/src/jmapNew/theme/beijing_01/menus/dialog/standControl.vue +++ b/src/jmapNew/theme/beijing_01/menus/dialog/standControl.vue @@ -247,7 +247,7 @@ export default { operate.operation = OperationEvent.StationStand.earlyDeparture.downSelect.operation; } - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); } @@ -282,10 +282,10 @@ export default { if (!valid) { this.$refs.noticeInfo.doShow(operate); } - }).catch(() => { + }).catch((error) => { this.loading = false; this.doClose(); - this.$refs.noticeInfo.doShow(operate); + this.$refs.noticeInfo.doShow(operate, [error.message]); }); }, // 取消扣车 @@ -303,10 +303,10 @@ export default { if (!valid) { this.$refs.noticeInfo.doShow(operate); } - }).catch(() => { + }).catch((error) => { this.loading = false; this.doClose(); - this.$refs.noticeInfo.doShow(operate); + this.$refs.noticeInfo.doShow(operate, [error.message]); }); }, // 提前发车 @@ -323,10 +323,10 @@ export default { if (valid) { this.doClose(); } - }).catch(() => { + }).catch((error) => { this.loading = false; this.doClose(); - this.$refs.noticeInfo.doShow(operate); + this.$refs.noticeInfo.doShow(operate, [error.message]); }); }, cancel() { @@ -335,7 +335,7 @@ export default { }; this.loading = false; - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.doClose(); } diff --git a/src/jmapNew/theme/beijing_01/menus/dialog/standJumpStopControl.vue b/src/jmapNew/theme/beijing_01/menus/dialog/standJumpStopControl.vue index 54b0db5f6..84cd4c8fa 100644 --- a/src/jmapNew/theme/beijing_01/menus/dialog/standJumpStopControl.vue +++ b/src/jmapNew/theme/beijing_01/menus/dialog/standJumpStopControl.vue @@ -264,10 +264,10 @@ export default { if (valid) { this.doClose(); } - }).catch(() => { + }).catch((error) => { this.loading = false; this.doClose(); - this.$refs.noticeInfo.doShow(operate); + this.$refs.noticeInfo.doShow(operate, [error.message]); }); }, // 取消跳停 @@ -292,10 +292,10 @@ export default { if (valid) { this.doClose(); } - }).catch(() => { + }).catch((error) => { this.loading = false; this.doClose(); - this.$refs.noticeInfo.doShow(operate); + this.$refs.noticeInfo.doShow(operate, [error.message]); }); }, cancel() { @@ -305,7 +305,7 @@ export default { }; this.loading = false; - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.doClose(); } @@ -322,7 +322,7 @@ export default { type: MapDeviceType.StationStand.type, operation: operation }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); } @@ -337,7 +337,7 @@ export default { operation: operation }; this.model.val2 = ''; - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); } @@ -352,7 +352,7 @@ export default { operation: operation, val: val }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); } diff --git a/src/jmapNew/theme/beijing_01/menus/dialog/standRunLevel.vue b/src/jmapNew/theme/beijing_01/menus/dialog/standRunLevel.vue index f647198f8..f1182f9fa 100644 --- a/src/jmapNew/theme/beijing_01/menus/dialog/standRunLevel.vue +++ b/src/jmapNew/theme/beijing_01/menus/dialog/standRunLevel.vue @@ -248,7 +248,7 @@ this.time = time.toString(); this.isSelect = false; this.isConfirm = true; - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); } @@ -264,7 +264,7 @@ this.time = row.time = this.timeList[row.level][0].value; this.isSelect = false; this.isConfirm = true; - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); } @@ -277,7 +277,7 @@ val: check.toString(), } - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); } @@ -302,7 +302,7 @@ } this.loading = true; - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.loading = false; if (valid) { this.doClose(); @@ -312,6 +312,7 @@ }).catch((error) => { this.loading = false; this.doClose(); + this.$refs.noticeInfo.doShow(operate, [error.message]); }) } else { this.doClose(); @@ -323,7 +324,7 @@ operation: OperationEvent.Command.cancel.menu.operation, } - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.doClose(); } diff --git a/src/jmapNew/theme/beijing_01/menus/dialog/standStopTime.vue b/src/jmapNew/theme/beijing_01/menus/dialog/standStopTime.vue index 3ee954e29..11f72ebba 100644 --- a/src/jmapNew/theme/beijing_01/menus/dialog/standStopTime.vue +++ b/src/jmapNew/theme/beijing_01/menus/dialog/standStopTime.vue @@ -181,7 +181,7 @@ export default { val: `${control}` }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); } @@ -194,7 +194,7 @@ export default { val: `${effective}` }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); } @@ -208,7 +208,7 @@ export default { val: `${time}` }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); } @@ -224,16 +224,17 @@ export default { }; this.loading = true; - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.loading = false; if (valid) { this.doClose(); // this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); // this.$refs.confirmControl.doShow(operate); } - }).catch(() => { + }).catch((error) => { this.loading = false; this.doClose(); + this.$refs.noticeInfo.doShow(operate, [error.message]); }); }, cancel() { @@ -242,7 +243,7 @@ export default { operation: OperationEvent.Command.close.menu.operation }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.doClose(); } diff --git a/src/jmapNew/theme/beijing_01/menus/menuStationStand.vue b/src/jmapNew/theme/beijing_01/menus/menuStationStand.vue index 545acd593..17cce73d1 100644 --- a/src/jmapNew/theme/beijing_01/menus/menuStationStand.vue +++ b/src/jmapNew/theme/beijing_01/menus/menuStationStand.vue @@ -414,14 +414,15 @@ export default { standCode:this.selected.code } }; - this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { - let tempDate = null; - if (response) { - tempDate = response.data; - } + // let tempDate = null; + // if (response) { + // tempDate = response.data; + // } + const tempData = []; this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.standStopTime.doShow(operate, this.selected, tempDate); + this.$refs.standStopTime.doShow(operate, this.selected, tempData); } }).catch(() => { this.$refs.noticeInfo.doShow(operate); @@ -440,14 +441,15 @@ export default { standCode:this.selected.code } }; - this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { - let tempDate = null; - if (response) { - tempDate = response.data; - } + // let tempDate = null; + // if (response) { + // tempDate = response.data; + // } + const tempData = []; this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.standRunLevel.doShow(operate, this.selected, tempDate); + this.$refs.standRunLevel.doShow(operate, this.selected, tempData); } }).catch(() => { this.$refs.noticeInfo.doShow(operate); @@ -485,41 +487,42 @@ export default { this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => { if (valid) { - let tempDate = null; - if (response) { - tempDate = response.data; - } + // let tempDate = null; + // if (response) { + // tempDate = response.data; + // } + const tempData = []; this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.standBackStrategy.doShow(operate, this.selected, tempDate); + this.$refs.standBackStrategy.doShow(operate, this.selected, tempData); } }).catch(() => { this.$refs.noticeInfo.doShow(operate); }); }, // 查询站台状态 - detail() { - const operate = { - over: true, - code: this.selected.code, - cmdType: CMD.Stand.CMD_STAND_VIEW_STATUS, - operation: OperationEvent.StationStand.detail.menu.operation, - param:{ - standCode:this.selected.code - } - }; - this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => { - if (valid) { - let tempDate = null; - if (response) { - tempDate = response.data; - } - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.standDetail.doShow(operate, this.selected, tempDate); - } - }).catch(() => { - this.$refs.noticeInfo.doShow(operate); - }); - } + // detail() { + // const operate = { + // over: true, + // code: this.selected.code, + // cmdType: CMD.Stand.CMD_STAND_VIEW_STATUS, + // operation: OperationEvent.StationStand.detail.menu.operation, + // param:{ + // standCode:this.selected.code + // } + // }; + // this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => { + // if (valid) { + // let tempDate = null; + // if (response) { + // tempDate = response.data; + // } + // this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + // this.$refs.standDetail.doShow(operate, this.selected, tempDate); + // } + // }).catch(() => { + // this.$refs.noticeInfo.doShow(operate); + // }); + // } } }; diff --git a/src/jmapNew/theme/chengdu_03/menus/dialog/routeGuide.vue b/src/jmapNew/theme/chengdu_03/menus/dialog/routeGuide.vue index 96937c268..8f449e279 100644 --- a/src/jmapNew/theme/chengdu_03/menus/dialog/routeGuide.vue +++ b/src/jmapNew/theme/chengdu_03/menus/dialog/routeGuide.vue @@ -47,7 +47,7 @@ @@ -105,11 +105,7 @@ export default { '01': '折返', '02': '直通' }, - row: '', - controlTypeMap: { - '01': '自动', - '02': '人工' - } + row: '' }; }, computed: { diff --git a/src/jmapNew/theme/chengdu_03/menus/dialog/standControl.vue b/src/jmapNew/theme/chengdu_03/menus/dialog/standControl.vue index a0347ffaa..a33368e5f 100644 --- a/src/jmapNew/theme/chengdu_03/menus/dialog/standControl.vue +++ b/src/jmapNew/theme/chengdu_03/menus/dialog/standControl.vue @@ -206,7 +206,7 @@
功能 - + { if (valid) { @@ -654,16 +658,16 @@ export default { }, // 设置停站时间 setStopTime() { - const forver = this.effective == '02'; + const forver = this.effective == '01'; const operate = { over: true, operation: OperationEvent.StationStand.setStopTime.menu.operation, cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME, - val: [`${this.radio}`, this.trainStopTime, forver].join('::'), + // val: [`${this.radio}`, this.trainStopTime, forver].join('::'), param: { - standStopControl: `${this.radio}`, + parkingTime: this.radio == '01' ? -1 : 1, // standStopTime: this.trainStopTime, - standAlwaysValid: forver + parkingAlwaysValid: forver } }; @@ -681,7 +685,8 @@ export default { }, // 设置运行速度 setRunLevel() { - const forver = this.effective == '02'; + + const forver = this.effective == '01'; let val = this.radio; if (this.radio == '02') { val = `${this.radio}::${this.trainRunlevel}::${forver}`; @@ -694,9 +699,9 @@ export default { cmdType: CMD.Stand.CMD_STAND_SET_RUN_TIME, val: val, param: { - standStopControl: `${this.radio}`, - standRunLevel: this.radio === '02' ? `${this.trainRunlevel}` : '01', - standAlwaysValid: `${forver}` + // standStopControl: `${this.radio}`, + runLevelTime: this.radio === '02' ? `${this.trainRunlevel}` : '01', + runLevelTimeForever: forver } }; diff --git a/src/jmapNew/theme/chengdu_03/menus/menuStationStand.vue b/src/jmapNew/theme/chengdu_03/menus/menuStationStand.vue index 37f289f36..f9a8e423e 100644 --- a/src/jmapNew/theme/chengdu_03/menus/menuStationStand.vue +++ b/src/jmapNew/theme/chengdu_03/menus/menuStationStand.vue @@ -275,13 +275,14 @@ export default { this.$store.dispatch('training/nextNew', step).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - Handler.execute(CMD.Stand.CMD_STAND_VIEW_STATUS, {standCode: `${this.selected.code}`}).then(resp => { - const tempData = resp.data; - this.$refs.standControl.doShow(step, this.selected, tempData); - }); + // Handler.execute(CMD.Stand.CMD_STAND_VIEW_STATUS, {standCode: `${this.selected.code}`}).then(resp => { + // const tempData = resp.data; + const tempData = []; + this.$refs.standControl.doShow(step, this.selected, tempData); + // }); } - }).catch(() => { - this.$refs.noticeInfo.doShow(step); + }).catch((error) => { + this.$refs.noticeInfo.doShow(step, [error.message]); }); }, // 设置运行等级 @@ -297,10 +298,11 @@ export default { this.$store.dispatch('training/nextNew', step).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - Handler.execute(CMD.Stand.CMD_STAND_VIEW_STATUS, {standCode: `${this.selected.code}`}).then(resp => { - const tempData = resp.data; - this.$refs.standControl.doShow(step, this.selected, tempData); - }); + // Handler.execute(CMD.Stand.CMD_STAND_VIEW_STATUS, {standCode: `${this.selected.code}`}).then(resp => { + // const tempData = resp.data; + const tempData = []; + this.$refs.standControl.doShow(step, this.selected, tempData); + // }); } }).catch(() => { this.$refs.noticeInfo.doShow(step); diff --git a/src/jmapNew/theme/haerbin_01/menus/dialog/routeControl.vue b/src/jmapNew/theme/haerbin_01/menus/dialog/routeControl.vue index c64d1d11c..bf8b9a00b 100644 --- a/src/jmapNew/theme/haerbin_01/menus/dialog/routeControl.vue +++ b/src/jmapNew/theme/haerbin_01/menus/dialog/routeControl.vue @@ -189,8 +189,9 @@ export default { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$refs.confirmControl.doShow(operate, this.selected); } - }).catch(() => { + }).catch((error) => { this.loading = false; + this.$refs.noticeInfo.doShow(operate, [error.message]); }); }, // 信号关灯 @@ -208,8 +209,9 @@ export default { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$refs.confirmControl.doShow(operate); } - }).catch(() => { + }).catch((error) => { this.loading = false; + this.$refs.noticeInfo.doShow(operate, [error.message]); }); }, // 信号重开 @@ -227,8 +229,9 @@ export default { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$refs.confirmControl.doShow(operate); } - }).catch(() => { + }).catch((error) => { this.loading = false; + this.$refs.noticeInfo.doShow(operate, [error.message]); }); }, // 设置联锁自动进路 @@ -245,10 +248,10 @@ export default { if (valid) { this.doClose(); } - }).catch(() => { + }).catch((error) => { this.loading = false; this.doClose(); - this.$refs.noticeInfo.doShow(operate); + this.$refs.noticeInfo.doShow(operate, [error.message]); }); }, // 取消联锁自动进路 @@ -265,10 +268,10 @@ export default { if (valid) { this.doClose(); } - }).catch(() => { + }).catch((error) => { this.loading = false; this.doClose(); - this.$refs.noticeInfo.doShow(operate); + this.$refs.noticeInfo.doShow(operate, [error.message]); }); }, // 设置联锁自动触发 @@ -285,10 +288,10 @@ export default { if (valid) { this.doClose(); } - }).catch(() => { + }).catch((error) => { this.loading = false; this.doClose(); - this.$refs.noticeInfo.doShow(operate); + this.$refs.noticeInfo.doShow(operate, [error.message]); }); }, // 取消联锁自动触发 @@ -306,10 +309,10 @@ export default { if (valid) { this.doClose(); } - }).catch(() => { + }).catch((error) => { this.loading = false; this.doClose(); - this.$refs.noticeInfo.doShow(operate); + this.$refs.noticeInfo.doShow(operate, [error.message]); }); }, // 取消 diff --git a/src/jmapNew/theme/haerbin_01/menus/menuStationStand.vue b/src/jmapNew/theme/haerbin_01/menus/menuStationStand.vue index e62fc65b2..d75f94528 100644 --- a/src/jmapNew/theme/haerbin_01/menus/menuStationStand.vue +++ b/src/jmapNew/theme/haerbin_01/menus/menuStationStand.vue @@ -99,56 +99,56 @@ export default { } ], Center: [ - { - label: this.$t('menu.menuStationStand.detainTrain'), - handler: this.setDetainTrain, - cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN - }, - { - label: this.$t('menu.menuStationStand.cancelDetainTrain'), - handler: this.cancelDetainTrain, - cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN - }, - { - label: this.$t('menu.menuStationStand.cancelDetainTrainAll'), - handler: this.cancelDetainTrainAll, - cmdType:CMD.Stand.CMD_STAND_WHOLE_LINE_CANCEL_HOLD_TRAIN - }, - { - label: this.$t('menu.menuStationStand.jumpStop'), - handler: this.setJumpStop, - cmdType:CMD.Stand.CMD_STAND_SET_JUMP_STOP - }, - { - label: this.$t('menu.menuStationStand.cancelJumpStop'), - handler: this.cancelJumpStop, - cmdType:CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP - }, - { - label: this.$t('menu.menuStationStand.setStopTime'), - handler: this.setStopTime, - cmdType:CMD.Stand.CMD_STAND_SET_PARK_TIME - }, - { - label: this.$t('menu.menuStationStand.setRunLevel'), - handler: this.setRunLevel, - cmdType:CMD.Stand.CMD_STAND_SET_RUN_TIME - }, - { - label: this.$t('menu.menuStationStand.setEarlyDeparture'), - handler: this.earlyDeparture, - cmdType:CMD.Stand.CMD_STAND_EARLY_DEPART - }, - { - label: this.$t('menu.menuStationStand.setBackStrategy'), - handler: this.setBackStrategy, - cmdType:CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY - }, - { - label: this.$t('menu.menuStationStand.getStationStandStatus'), - handler: this.detail, - cmdType:CMD.Stand.CMD_STAND_VIEW_STATUS - } + // { + // label: this.$t('menu.menuStationStand.detainTrain'), + // handler: this.setDetainTrain, + // cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN + // }, + // { + // label: this.$t('menu.menuStationStand.cancelDetainTrain'), + // handler: this.cancelDetainTrain, + // cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN + // }, + // { + // label: this.$t('menu.menuStationStand.cancelDetainTrainAll'), + // handler: this.cancelDetainTrainAll, + // cmdType:CMD.Stand.CMD_STAND_WHOLE_LINE_CANCEL_HOLD_TRAIN + // }, + // { + // label: this.$t('menu.menuStationStand.jumpStop'), + // handler: this.setJumpStop, + // cmdType:CMD.Stand.CMD_STAND_SET_JUMP_STOP + // }, + // { + // label: this.$t('menu.menuStationStand.cancelJumpStop'), + // handler: this.cancelJumpStop, + // cmdType:CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP + // }, + // { + // label: this.$t('menu.menuStationStand.setStopTime'), + // handler: this.setStopTime, + // cmdType:CMD.Stand.CMD_STAND_SET_PARK_TIME + // }, + // { + // label: this.$t('menu.menuStationStand.setRunLevel'), + // handler: this.setRunLevel, + // cmdType:CMD.Stand.CMD_STAND_SET_RUN_TIME + // }, + // { + // label: this.$t('menu.menuStationStand.setEarlyDeparture'), + // handler: this.earlyDeparture, + // cmdType:CMD.Stand.CMD_STAND_EARLY_DEPART + // }, + // { + // label: this.$t('menu.menuStationStand.setBackStrategy'), + // handler: this.setBackStrategy, + // cmdType:CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY + // }, + // { + // label: this.$t('menu.menuStationStand.getStationStandStatus'), + // handler: this.detail, + // cmdType:CMD.Stand.CMD_STAND_VIEW_STATUS + // } ] }, menuForce: [ diff --git a/src/jmapNew/theme/ningbo_01/planConvert.js b/src/jmapNew/theme/ningbo_01/planConvert.js index cd986201b..8f2fc6dc3 100644 --- a/src/jmapNew/theme/ningbo_01/planConvert.js +++ b/src/jmapNew/theme/ningbo_01/planConvert.js @@ -23,7 +23,6 @@ export default { /** 解析exal数据转换为Json后台数据*/ importData(Sheet, JsonData) { var dataList = convertSheetToList(Sheet, true); - if (dataList && dataList.length) { if (dataList && dataList.length && dataList[1] && dataList[0]) { // const tIndex = dataList.findIndex(it => { return it[0]; }); // 设置不用过滤行数 diff --git a/src/store/modules/socket.js b/src/store/modules/socket.js index 25afdbf0d..7fbc857b4 100644 --- a/src/store/modules/socket.js +++ b/src/store/modules/socket.js @@ -25,7 +25,6 @@ function handle(state, data) { break; case 'Simulation_RunFact': // 仿真-列车实际到发车站消息 let runFactMsg = msg; - // console.log(msg, '----------------'); if (runFactMsg.constructor !== Array ) { runFactMsg = [msg]; } diff --git a/src/views/planMonitor/detail.vue b/src/views/planMonitor/detail.vue index 6dff837c2..f2af91f1e 100644 --- a/src/views/planMonitor/detail.vue +++ b/src/views/planMonitor/detail.vue @@ -167,6 +167,7 @@ export default { watch: { '$route' () { this.getRunPlanList(); + this.PlanConvert = this.$theme.loadPlanConvert(this.$route.query.lineCode); } }, created() {