diff --git a/src/api/chat.js b/src/api/chat.js index 0cf5433f3..81cedad06 100644 --- a/src/api/chat.js +++ b/src/api/chat.js @@ -53,3 +53,11 @@ export function overConversationMessage(group, conversationMessageId) { method: 'put' }); } +/** 发送会话文字 */ +export function sendConversationText (group, id, data) { + return request({ + url: `/api/simulation/${group}/conversation/${id}/chat/text?`, + method: 'post', + data + }); +} diff --git a/src/api/script.js b/src/api/script.js index dfff747cf..6ff230a70 100644 --- a/src/api/script.js +++ b/src/api/script.js @@ -118,3 +118,26 @@ export function getScriptExport(id) { method: 'get' }); } + +/** 删除会话动作(新版)*/ +export function deleteScriptAction(group, actionId) { + return request({ + url: `/api/scriptSimulation/${group}/${actionId}/delete`, + method: 'delete' + }); +} +/** 修改剧本活动条件 */ +export function updateActionCondition(group, actionId, data) { + return request({ + url: `/api/scriptSimulation/${group}/${actionId}/updateCondition`, + method: 'put', + data + }); +} +/** 查询剧本活动条件 */ +export function getActionCondition(group, actionId) { + return request({ + url: `/api/scriptSimulation/${group}/${actionId}/condition`, + method: 'get' + }); +} diff --git a/src/api/simulation.js b/src/api/simulation.js index c6efd75d2..bb59c7f2a 100644 --- a/src/api/simulation.js +++ b/src/api/simulation.js @@ -147,6 +147,30 @@ export function modifyScriptActionNew(group, data) { }); } +/** 开始替换 */ +export function startReplaceBg(group) { + return request({ + url: `/api/scriptSimulation/${group}/replace/start`, + method: 'put' + }); +} + +/** 确认替换 */ +export function confirmReplaceBg(group) { + return request({ + url: `/api/scriptSimulation/${group}/replace/confirm`, + method: 'put' + }); +} + +/** 放弃替换 */ +export function cancelReplaceBg(group) { + return request({ + url: `/api/scriptSimulation/${group}/replace/cancel`, + method: 'put' + }); +} + /** 分页查询存在的仿真 */ export function getExistingSimulation(params) { return request({ diff --git a/src/directive/quickMenuDrag/quickMenuDrag.js b/src/directive/quickMenuDrag/quickMenuDrag.js index c9f4d3aaa..e9d7b051f 100644 --- a/src/directive/quickMenuDrag/quickMenuDrag.js +++ b/src/directive/quickMenuDrag/quickMenuDrag.js @@ -28,8 +28,6 @@ export default { const l = e.clientX - disX; const t = e.clientY - disY; - console.log(l, l + styL, dragDom.style.left); - /** 移动当前元素*/ if (l + styL < 0) { dragDom.style.left = `0px`; diff --git a/src/i18n/langs/en/scriptRecord.js b/src/i18n/langs/en/scriptRecord.js index 8e7618762..6751f9f16 100644 --- a/src/i18n/langs/en/scriptRecord.js +++ b/src/i18n/langs/en/scriptRecord.js @@ -109,5 +109,10 @@ export default { revokeScriptTip: 'This action will undo release script, whether to continue?', inputScriptName: 'Please input script name', selectMap: 'Please select map', - inputScriptDescription: 'Please input script description' + inputScriptDescription: 'Please input script description', + + + startReplaceBg: '替换背景', + confirmReplaceBg: '确认替换', + cancelReplaceBg: '放弃替换' }; diff --git a/src/i18n/langs/zh/scriptRecord.js b/src/i18n/langs/zh/scriptRecord.js index d6a29074d..34edb58f5 100644 --- a/src/i18n/langs/zh/scriptRecord.js +++ b/src/i18n/langs/zh/scriptRecord.js @@ -110,5 +110,9 @@ export default { revokeScriptTip: '此操作将撤销发布剧本申请, 是否继续?', inputScriptName: '请输入剧本名称', selectMap: '请选择地图', - inputScriptDescription: '请输入剧本描述' + inputScriptDescription: '请输入剧本描述', + + startReplaceBg: '替换背景', + confirmReplaceBg: '确认替换', + cancelReplaceBg: '放弃替换' }; diff --git a/src/jmapNew/config/skinCode/bejing_01.js b/src/jmapNew/config/skinCode/bejing_01.js index 9a699baa8..f40879aaa 100644 --- a/src/jmapNew/config/skinCode/bejing_01.js +++ b/src/jmapNew/config/skinCode/bejing_01.js @@ -321,7 +321,8 @@ class SkinCode extends defaultStyle { z:0, position: -1, // 扣车标识在站台上显示方向 text: 'H', // 扣车显示内容 - offset: { x: -8, y: 13 }, // 扣车偏移量 + insideOffset: { x: -8, y: 13 }, // 内站台扣车偏移量 + outsideOffset: { x: -8, y: 13 }, // 外站台扣车偏移量 centerTrainColor: '#FFFFFF', // 中心扣车颜色 andCenterTrainColor: '#F61107', // 车站+中心扣车颜色 detainTrainTextColor: '#E4EF50', // 车站扣除文字颜色 diff --git a/src/jmapNew/config/skinCode/chengdu_01.js b/src/jmapNew/config/skinCode/chengdu_01.js index aabdf1139..8a69318ad 100644 --- a/src/jmapNew/config/skinCode/chengdu_01.js +++ b/src/jmapNew/config/skinCode/chengdu_01.js @@ -238,7 +238,8 @@ class SkinCode extends defaultStyle { z:0, position: -1, // 扣车标识在站台上显示方向 text: 'H', // 扣车显示内容 - offset: { x: -8, y: 13 }, // 扣车偏移量 + insideOffset: { x: -8, y: 13 }, // 内站台扣车偏移量 + outsideOffset:{ x: -8, y: 13 }, // 外站台扣车偏移量 centerTrainColor: 'white', // 中心扣车颜色 andCenterTrainColor: 'red', // 车站+中心扣车颜色 detainTrainTextColor: '#E4EF50', // 车站扣除文字颜色 diff --git a/src/jmapNew/config/skinCode/chengdu_03.js b/src/jmapNew/config/skinCode/chengdu_03.js index e19e18cff..171d3313f 100644 --- a/src/jmapNew/config/skinCode/chengdu_03.js +++ b/src/jmapNew/config/skinCode/chengdu_03.js @@ -259,7 +259,8 @@ class SkinCode extends defaultStyle { z:0, position: -1, // 扣车标识在站台上显示方向 text: '扣', // 扣车显示内容 - offset: {x: -8, y: 20}, // 扣车偏移量 + insideOffset: {x: -8, y: 20}, // 内站台扣车偏移量 + outsideOffset: {x: -8, y: 20}, // 外站台扣车偏移量 centerTrainColor: '#C0C0C0', // 中心扣车颜色 andCenterTrainColor: '#C0C0C0', // 车站+中心扣车颜色 detainTrainTextColor: '#E4EF50', // 车站扣除文字颜色 diff --git a/src/jmapNew/config/skinCode/foshan_01.js b/src/jmapNew/config/skinCode/foshan_01.js index 8aed3e042..08ba7fc49 100644 --- a/src/jmapNew/config/skinCode/foshan_01.js +++ b/src/jmapNew/config/skinCode/foshan_01.js @@ -229,7 +229,8 @@ class SkinCode extends defaultStyle { z:0, position: 1, // 扣车标识在站台上显示方向 text: 'H', // 扣车显示内容 - offset: {x: -8, y: 17}, // 扣车偏移量 + insideOffset: {x: -8, y: 17}, // 内站台扣车偏移量 + outsideOffset: {x: -8, y: 17}, // 外站台扣车偏移量 centerTrainColor: '#FFFFFF', // 中心扣车颜色 andCenterTrainColor: '#F61107', // 车站+中心扣车颜色 detainTrainTextColor: '#E4EF50', // 车站扣除文字颜色 diff --git a/src/jmapNew/config/skinCode/fuzhou_01.js b/src/jmapNew/config/skinCode/fuzhou_01.js index 707fcedcf..669521a8a 100644 --- a/src/jmapNew/config/skinCode/fuzhou_01.js +++ b/src/jmapNew/config/skinCode/fuzhou_01.js @@ -228,7 +228,8 @@ class SkinCode extends defaultStyle { z:0, position: 1, // 扣车标识在站台上显示方向 text: 'H', // 扣车显示内容 - offset: {x: -8, y: 25}, // 扣车偏移量 + insideOffset: {x: -8, y: 25}, // 内站台扣车偏移量 + outsideOffset: {x: -8, y: 25}, // 外站台扣车偏移量 centerTrainColor: '#FFFFFF', // 中心扣车颜色 andCenterTrainColor: '#F61107', // 车站+中心扣车颜色 detainTrainTextColor: '#E4EF50', // 车站扣除文字颜色 diff --git a/src/jmapNew/config/skinCode/haerbin_01.js b/src/jmapNew/config/skinCode/haerbin_01.js index deeef91c9..58921660f 100644 --- a/src/jmapNew/config/skinCode/haerbin_01.js +++ b/src/jmapNew/config/skinCode/haerbin_01.js @@ -216,7 +216,7 @@ class SkinCode extends defaultStyle { this[deviceType.StationStand] = { // 哈尔滨一号线站台元素 站台 站台紧急关闭 扣车元素 停站时间 运行等级 跳停 - elemnetType:['gapStand', 'emergentArrow', 'detainNormal', 'level', 'jump', 'trainStop', 'trainDepart'], + elemnetType:['gapStand', 'emergentArrow', 'detainNormal', 'level', 'jump', 'trainStop', 'trainDepart', 'trainSetButton'], // 站台 gapStand:{ // 层级 @@ -245,7 +245,8 @@ class SkinCode extends defaultStyle { z:0, position: 1, // 扣车标识在站台上显示方向 text: 'H', // 扣车显示内容 - offset: { x: 60, y: -18 }, // 扣车偏移量 + insideOffset: { x: 60, y: -18 }, // 内站台扣车偏移量 + outsideOffset: { x: 60, y: 25 }, // 外站台扣车偏移量 centerTrainColor: '#F61107', // 中心扣车颜色 andCenterTrainColor: '#F61107', // 车站+中心扣车颜色 detainTrainTextColor: '#E4EF50', // 车站扣除文字颜色 @@ -288,8 +289,16 @@ class SkinCode extends defaultStyle { textBorderColor: '#00FF00', // 文字边框颜色 fontSize: 10 // 字体大小 }, + // 站台 扣车/取消扣车,越站/取消越站 设置按钮 + trainSetButton:{ + z:1, + offset: { x: 80, y:10}, // 按钮偏移 + textFontSize: 13, // 按钮字体大小 + textColor:'#00FF00' + }, common: { // 通用属性 + bgShow: true, // 是否被选中 textFontSize: 11, // 站台默认字体大小 functionButtonShow: '03' // 功能灯按钮显示条件(01所有模式下显示 02 行调显示 03现地显示) }, diff --git a/src/jmapNew/config/skinCode/ningbo_01.js b/src/jmapNew/config/skinCode/ningbo_01.js index 545004532..4f4dfccaf 100644 --- a/src/jmapNew/config/skinCode/ningbo_01.js +++ b/src/jmapNew/config/skinCode/ningbo_01.js @@ -354,7 +354,8 @@ class SkinCode extends defaultStyle { z:0, position: 1, // 扣车标识在站台上显示方向 text: 'H', // 扣车显示内容 - offset: { x: -8, y: 10 }, // 扣车偏移量 + insideOffset: { x: -8, y: 10 }, // 内站台扣车偏移量 + outsideOffset: { x: -8, y: 10 }, // 外站台扣车偏移量 centerTrainColor: 'white', // 中心扣车颜色 andCenterTrainColor: 'red', // 车站+中心扣车颜色 detainTrainTextColor: '#E4EF50', // 车站扣除文字颜色 diff --git a/src/jmapNew/config/skinCode/race_01.js b/src/jmapNew/config/skinCode/race_01.js index 21919afe6..8d8c4f0cd 100644 --- a/src/jmapNew/config/skinCode/race_01.js +++ b/src/jmapNew/config/skinCode/race_01.js @@ -337,7 +337,8 @@ class SkinCode extends defaultStyle { z:0, position: -1, // 扣车标识在站台上显示方向 text: 'H', // 扣车显示内容 - offset: { x: -8, y: 13 }, // 扣车偏移量 + insideOffset: { x: -8, y: 13 }, // 内站台扣车偏移量 + outsideOffset: { x: -8, y: 13 }, // 外站台扣车偏移量 centerTrainColor: '#00FF00', // 中心扣车颜色 andCenterTrainColor: '#00FF00', // 车站+中心扣车颜色 detainTrainTextColor: '#00FF00', // 车站扣车文字颜色 @@ -658,7 +659,7 @@ class SkinCode extends defaultStyle { ], // 特殊列车类型需设置显示格式 lrPadding: 4, // 两边间隔 upPadding: 4, // 上边距离 - trainBodyFillColor: 'rgba(0,0,0,0)', // 列车车身填充颜色 + trainBodyFillColor: '#000', // 列车车身填充颜色 trainNameFormat: 'serviceNumber:tripNumber', // 列车显示格式 trainSidelineColor:'#A5A5A5' // 列车边框颜色 }, diff --git a/src/jmapNew/config/skinCode/xian_01.js b/src/jmapNew/config/skinCode/xian_01.js index 39f4aa916..dedc4203f 100644 --- a/src/jmapNew/config/skinCode/xian_01.js +++ b/src/jmapNew/config/skinCode/xian_01.js @@ -237,7 +237,8 @@ class SkinCode extends defaultStyle { z:0, position: 1, // 扣车标识在站台上显示方向 text: 'H', // 扣车显示内容 - offset: {x: -8, y: -6}, // 扣车偏移量 + insideOffset: {x: -8, y: -6}, // 内站台扣车偏移量 + outsideOffset: {x: -8, y: 16}, // 外站台扣车偏移量 trainColor: '#E4EF50', // 车站扣车颜色 centerTrainColor: '#FFFFFF', // 中心扣车颜色 andCenterTrainColor: '#F61107', // 车站+中心扣车颜色 diff --git a/src/jmapNew/shape/StationStand/ETrainSetButton.js b/src/jmapNew/shape/StationStand/ETrainSetButton.js new file mode 100644 index 000000000..5e874dff2 --- /dev/null +++ b/src/jmapNew/shape/StationStand/ETrainSetButton.js @@ -0,0 +1,54 @@ +import Group from 'zrender/src/container/Group'; +import Text from 'zrender/src/graphic/Text'; + +class ETime extends Group { + constructor(model) { + super(); + this.model = model; + this.create(); + } + + create() { + const model = this.model.modelData; + const style = this.model.style; + + const buttonD = model.right ? 1 : -1; + const buttonX = model.position.x - buttonD * (style.StationStand.trainSetButton.offset.x - model.width / 2); + const buttonY = model.position.y + buttonD * (style.StationStand.trainSetButton.offset.y - model.height / 2); + + this.trainSetButton = new Text({ + zlevel: this.model.zlevel, + z: this.model.z, + position: [0, 0], + _subType: 'trainSetButton', + style: { + x: buttonX, + y: buttonY, + fontWeight: style.textStyle.fontWeight, + fontSize: style.StationStand.trainSetButton.textFontSize, + fontFamily: style.fontFamily, + text: 'E', + textFill: style.StationStand.trainSetButton.textColor, + textAlign: style.textStyle.textAlign, + textVerticalAlign: style.textStyle.textVerticalAlign + } + }); + this.add(this.trainSetButton); + } + + hideMode() { + this.trainSetButton && this.trainSetButton.hide(); + } + + showMode() { + this.trainSetButton && this.trainSetButton.show(); + } + + recover() { + } + + setState(model) { + } +} + +export default ETime; diff --git a/src/jmapNew/shape/StationStand/detain/EDetain.js b/src/jmapNew/shape/StationStand/detain/EDetain.js index 9e152d560..8fcf623ef 100644 --- a/src/jmapNew/shape/StationStand/detain/EDetain.js +++ b/src/jmapNew/shape/StationStand/detain/EDetain.js @@ -16,9 +16,10 @@ class EDetain extends Group { this.isNew = true; /** 站台扣车*/ + const detainOffset = model.inside ? deviceParam.insideOffset : deviceParam.outsideOffset; const detainD = model.right ? 1 : -1; - const detainX = model.position.x - detainD * (deviceParam.offset.x - model.width / 2); - const detainY = model.position.y + detainD * (deviceParam.offset.y - model.height / 2); + const detainX = model.position.x - detainD * (detainOffset.x - model.width / 2); + const detainY = model.position.y + detainD * (detainOffset.y - model.height / 2); this.detain = new Text({ zlevel: this.model.zlevel, diff --git a/src/jmapNew/shape/StationStand/detain/EDetainHollow.js b/src/jmapNew/shape/StationStand/detain/EDetainHollow.js index e23a9bc8a..2617a3a85 100644 --- a/src/jmapNew/shape/StationStand/detain/EDetainHollow.js +++ b/src/jmapNew/shape/StationStand/detain/EDetainHollow.js @@ -12,9 +12,10 @@ class EDetainHollow extends EDetain { const model = this.model.modelData; const style = this.model.style; /** 站台扣车*/ + const detainOffset = model.inside ? style.StationStand.detainHollow.insideOffset : style.StationStand.detainHollow.outsideOffset; const detainD = model.right ? 1 : -1; - const detainX = model.position.x - detainD * (style.StationStand.detainHollow.offset.x - model.width / 2); - const detainY = model.position.y + detainD * (style.StationStand.detainHollow.offset.y - model.height / 2); + const detainX = model.position.x - detainD * (detainOffset.x - model.width / 2); + const detainY = model.position.y + detainD * (detainOffset.y - model.height / 2); if (!this.isNew) { super.create(style.StationStand.detainHollow); const offsetX = model.right ? 8 : -8; diff --git a/src/jmapNew/shape/StationStand/index.js b/src/jmapNew/shape/StationStand/index.js index 8f92346e6..540cdfc97 100644 --- a/src/jmapNew/shape/StationStand/index.js +++ b/src/jmapNew/shape/StationStand/index.js @@ -33,6 +33,8 @@ import ECancelStopJumpLamp from './functionButton/ECancelStopJumpLamp'; import EUpDetainLamp from './functionButton/EUpDetainLamp'; import EDownDetainLamp from './functionButton/EDownDetainLamp'; +import ETrainSetButton from './ETrainSetButton'; + import {isShowThePrdType} from '../../utils/handlePath'; import {traverseLineElements, traverseStatusElements} from '../utils/ShapeStatusCovert'; @@ -85,7 +87,8 @@ class StationStand extends Group { 'reentry':EReentry, // 站台折返策略 'trainStop':ETrainStop, // 列车停车点标识 哈尔滨一号线 - 'trainDepart':ETrainDepart// 列车停站时间 哈尔滨一号线 + 'trainDepart':ETrainDepart, // 列车停站时间 哈尔滨一号线 + 'trainSetButton':ETrainSetButton // 站台 扣车/取消扣车,越站/取消越站 设置按钮 哈尔滨一号线 }; // 遍历当前线路下的绘图元素 组合模式 traverseLineElements(style.StationStand, elementTypeList, model, style, this); @@ -117,6 +120,10 @@ class StationStand extends Group { this.on('mouseout', (e) => { this.mouseEvent.mouseout(e); }); this.on('mouseover', (e) => { this.mouseEvent.mouseover(e); }); } + if (this.style.StationStand.common.bgShow) { + this.highlight = new EHighlight(this); + this.add(this.highlight); + } } } @@ -180,6 +187,10 @@ class StationStand extends Group { rect = this.downDetainLamp.getBoundingRect(); break; } + case 'trainSetButton': { + rect = this.trainSetButton.getBoundingRect(); + break; + } default: { rect = this.getBoundingRect(); break; diff --git a/src/jmapNew/theme/foshan_01/planConvert.js b/src/jmapNew/theme/foshan_01/planConvert.js index 2d381de1f..4362d2c07 100644 --- a/src/jmapNew/theme/foshan_01/planConvert.js +++ b/src/jmapNew/theme/foshan_01/planConvert.js @@ -1,5 +1,5 @@ import { createMartPointReverse, createSeriesModel, createMarkLineModels, hexColor, convertSheetToList, prefixTime } from '@/utils/runPlan'; - +import store from '@/store/index_APP_TARGET'; export default { /** 边缘高度*/ EdgeHeight: 600, @@ -110,7 +110,11 @@ export default { // pointdata.name = `${service.serviceNumber}${train.directionCode}${train.tripNumber}`; pointdata.name = `${service.serviceNumber}${train.tripNumber}`; pointdata.color = '#000' || lineStyle.color; - pointdata.directionCode = train.directionCode; + // pointdata.directionCode = train.directionCode; + pointdata.directionCode = train.right ? '2' : '1'; + if (!store.state.map.mapConfig.upRight) { + pointdata.directionCode = train.right ? '1' : '2'; + } pointdata.coord = [train.stationTimeList[1].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[1], train.directionCode, false)]; /** 给服务对象添加服务名称和标记点*/ @@ -203,8 +207,12 @@ export default { if (runPlanData[elem.serviceNumber][elem.tripNumber].length <= 1) { const result = serie.markPoint.data.some(ele => ele.name == `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`); if (!result) { + let directionCode = elem.right ? '2' : '1'; + if (!store.state.map.mapConfig.upRight) { + directionCode = elem.right ? '1' : '2'; + } serie.markPoint.data.push(createMartPointReverse({ - directionCode: elem.directionCode, + directionCode: directionCode, coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false)], name: `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`, color: lineStyle.color || '#000' diff --git a/src/jmapNew/theme/fuzhou_01/planConvert.js b/src/jmapNew/theme/fuzhou_01/planConvert.js index 0163d7a31..b9e9580e6 100644 --- a/src/jmapNew/theme/fuzhou_01/planConvert.js +++ b/src/jmapNew/theme/fuzhou_01/planConvert.js @@ -1,5 +1,5 @@ import { createMartPoint, createSeriesModel, createMarkLineModels, hexColor, prefixTime, convertSheetToList } from '@/utils/runPlan'; - +import store from '@/store/index_APP_TARGET'; export default { /** 边缘高度*/ EdgeHeight: 3, @@ -297,7 +297,11 @@ export default { // pointdata.name = `${service.serviceNumber}${train.directionCode}${train.tripNumber}`; pointdata.name = `${service.serviceNumber}${train.tripNumber}`; pointdata.color = '#000' || lineStyle.color; - pointdata.directionCode = train.directionCode; + // pointdata.directionCode = train.directionCode; + pointdata.directionCode = train.right ? '2' : '1'; + if (!store.state.map.mapConfig.upRight) { + pointdata.directionCode = train.right ? '1' : '2'; + } pointdata.coord = [train.stationTimeList[0].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[0], train.directionCode, false)]; /** 给服务对象添加服务名称和标记点*/ @@ -388,8 +392,12 @@ export default { if (runPlanData[elem.serviceNumber][elem.tripNumber].length <= 1) { const result = serie.markPoint.data.some(ele => ele.name == `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`); if (!result) { + let directionCode = elem.right ? '2' : '1'; + if (!store.state.map.mapConfig.upRight) { + directionCode = elem.right ? '1' : '2'; + } serie.markPoint.data.push(createMartPoint({ - directionCode: elem.directionCode, + directionCode: directionCode, coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem)], name: `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`, color: lineStyle.color || '#000' diff --git a/src/jmapNew/theme/haerbin_01/menus/menuButton.vue b/src/jmapNew/theme/haerbin_01/menus/menuButton.vue index 4c499bd83..a5966787d 100644 --- a/src/jmapNew/theme/haerbin_01/menus/menuButton.vue +++ b/src/jmapNew/theme/haerbin_01/menus/menuButton.vue @@ -126,7 +126,8 @@ export default { this.canCommand = true; const step = { operation: 'click', - code: this.selectedObj.code + code: this.selectedObj.code, + subType:this.$store.state.menuOperation.subType }; this.$store.dispatch('training/nextNew', step).then(({ valid }) => { if (valid) { @@ -152,7 +153,9 @@ export default { this.oldDevice = this.selectedObj; break; case 'StationStand': - this.handleStandMenu(); + if (this.$store.state.menuOperation.subType == 'trainSetButton') { + this.handleStandMenu(); + } break; case 'DirectionRod': this.handleDirectionRodMenu(); @@ -432,10 +435,16 @@ export default { }, handleStandMenu() { this.clearAllMenuShow(); + if (this.$store.state.training.prdType === '02') { + this.deviceHighLight(this.oldDevice, false); + this.deviceHighLight(this.selectedObj, true); + this.oldDevice = this.selectedObj; + } this.centralizedStationList = new Array(15).fill({}); this.standParamList.forEach((stand, index) => { this.centralizedStationList[index] = stand; }); + this.tempData = []; const data = Object.assign(this.selectedObj); const station = this.$store.getters['map/getDeviceByCode'](this.selectedObj.stationCode); diff --git a/src/jmapNew/theme/haerbin_01/operationConfig.js b/src/jmapNew/theme/haerbin_01/operationConfig.js index cd02cf65a..f2894207f 100644 --- a/src/jmapNew/theme/haerbin_01/operationConfig.js +++ b/src/jmapNew/theme/haerbin_01/operationConfig.js @@ -876,7 +876,8 @@ export default { trainingType: 'Stand', productTypes: ['02'], stepVOList: [ - { deviceType: '04', orderNum: 1, operateCode: 'click', tip: '鼠标左键点击选择该站台' }, + // { deviceType: '04', orderNum: 1, tip: '鼠标左键点击选择该站台' }, + { deviceType: '04', orderNum: 1, operateCode: 'click', tip: '鼠标左键点击选择该站台', subType:'trainSetButton'}, { deviceType: '04', orderNum: 2, operateCode: '5041', tip: '鼠标左键点击【扣车】按钮' }, { deviceType: '04', orderNum: 3, operateCode: '008', tip: '鼠标左键点击【执行】按钮' } ] @@ -891,7 +892,8 @@ export default { trainingType: 'Stand', productTypes: ['02'], stepVOList: [ - { deviceType: '04', orderNum: 1, operateCode: 'click', tip: '鼠标左键点击选择该站台' }, + // { deviceType: '04', orderNum: 1, operateCode: 'click', tip: '鼠标左键点击选择该站台' }, + { deviceType: '04', orderNum: 1, operateCode: 'click', tip: '鼠标左键点击选择该站台', subType:'trainSetButton'}, { deviceType: '04', orderNum: 2, operateCode: '5052', tip: '鼠标左键点击【取消扣车】按钮' }, { deviceType: '04', orderNum: 3, operateCode: '008', tip: '鼠标左键点击【执行】按钮' } ] @@ -906,7 +908,8 @@ export default { trainingType: 'Stand', productTypes: ['02'], stepVOList: [ - { deviceType: '04', orderNum: 1, operateCode: 'click', tip: '鼠标左键点击选择该站台' }, + // { deviceType: '04', orderNum: 1, operateCode: 'click', tip: '鼠标左键点击选择该站台' }, + { deviceType: '04', orderNum: 1, operateCode: 'click', tip: '鼠标左键点击选择该站台', subType:'trainSetButton'}, { deviceType: '04', orderNum: 2, operateCode: '5025', tip: '鼠标左键点击【越站】按钮' }, { deviceType: '04', orderNum: 3, operateCode: '008', tip: '鼠标左键点击【执行】按钮' } ] @@ -921,7 +924,8 @@ export default { trainingType: 'Stand', productTypes: ['02'], stepVOList: [ - { deviceType: '04', orderNum: 1, operateCode: 'click', tip: '鼠标左键点击选择该站台' }, + // { deviceType: '04', orderNum: 1, operateCode: 'click', tip: '鼠标左键点击选择该站台' }, + { deviceType: '04', orderNum: 1, operateCode: 'click', tip: '鼠标左键点击选择该站台', subType:'trainSetButton'}, { deviceType: '04', orderNum: 2, operateCode: '5035', tip: '鼠标左键点击【取消越站】按钮' }, { deviceType: '04', orderNum: 3, operateCode: '008', tip: '鼠标左键点击【执行】按钮' } ] diff --git a/src/jmapNew/theme/haerbin_01/planConvert.js b/src/jmapNew/theme/haerbin_01/planConvert.js index be09d33f1..40ea90ee9 100644 --- a/src/jmapNew/theme/haerbin_01/planConvert.js +++ b/src/jmapNew/theme/haerbin_01/planConvert.js @@ -1,5 +1,5 @@ import { createMartPoint, createSeriesModel, createMarkLineModels, hexColor, prefixTime, convertSheetToList } from '@/utils/runPlan'; - +import store from '@/store/index_APP_TARGET'; export default { /** 边缘高度*/ EdgeHeight: 3, @@ -168,6 +168,7 @@ export default { var isBackup = true; var opt = { name: '', markPointData: [], data: [] }; if (service.tripNumberDataList && service.tripNumberDataList.length) { + debugger; service.tripNumberDataList.forEach((train, j) => { var pointdata = {}; var idx = 0; @@ -178,7 +179,10 @@ export default { // pointdata.name = `${service.serviceNumber}${train.directionCode}${train.tripNumber}`; pointdata.name = `${service.serviceNumber}${train.tripNumber}`; pointdata.color = '#000' || lineStyle.color; - pointdata.directionCode = train.directionCode; + pointdata.directionCode = train.right ? '2' : '1'; + if (!store.state.map.mapConfig.upRight) { + pointdata.directionCode = train.right ? '1' : '2'; + } pointdata.coord = [train.stationTimeList[0].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[0], train.directionCode, false)]; /** 给服务对象添加服务名称和标记点*/ @@ -271,8 +275,12 @@ export default { if (runPlanData[elem.serviceNumber][elem.tripNumber].length <= 1) { const result = serie.markPoint.data.some(ele => ele.name == `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`); if (!result) { + let directionCode = elem.right ? '2' : '1'; + if (!store.state.map.mapConfig.upRight) { + directionCode = elem.right ? '1' : '2'; + } serie.markPoint.data.push(createMartPoint({ - directionCode: elem.directionCode, + directionCode: directionCode, coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem)], name: `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`, color: lineStyle.color || '#000' diff --git a/src/jmapNew/theme/ningbo_01/planConvert.js b/src/jmapNew/theme/ningbo_01/planConvert.js index 5e73b8dc2..0a10d4565 100644 --- a/src/jmapNew/theme/ningbo_01/planConvert.js +++ b/src/jmapNew/theme/ningbo_01/planConvert.js @@ -1,5 +1,5 @@ import { createMartPoint, createSeriesModel, createMarkLineModels, hexColor, convertSheetToList, prefixTime } from '@/utils/runPlan'; - +import store from '@/store/index_APP_TARGET'; export default { /** 边缘高度*/ EdgeHeight: 600, @@ -137,7 +137,11 @@ export default { // pointdata.name = `${service.serviceNumber}${train.tripNumber}${train.destinationCode || ''}`; pointdata.name = `${service.serviceNumber}${train.tripNumber}`; pointdata.color = '#000' || lineStyle.color; - pointdata.directionCode = train.directionCode; + // pointdata.directionCode = train.directionCode; + pointdata.directionCode = train.right ? '2' : '1'; + if (!store.state.map.mapConfig.upRight) { + pointdata.directionCode = train.right ? '1' : '2'; + } pointdata.coord = [train.stationTimeList[1].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[1], train.directionCode, false)]; /** 给服务对象添加服务名称和标记点*/ @@ -230,8 +234,12 @@ export default { if (runPlanData[elem.serviceNumber][elem.tripNumber].length <= 1) { const result = serie.markPoint.data.some(ele => ele.name == `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`); if (!result) { + let directionCode = elem.right ? '2' : '1'; + if (!store.state.map.mapConfig.upRight) { + directionCode = elem.right ? '1' : '2'; + } serie.markPoint.data.push(createMartPoint({ - directionCode: elem.directionCode, + directionCode: directionCode, coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false)], name: `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`, color: lineStyle.color || '#000' diff --git a/src/jmapNew/theme/race_01/menus/dialog/trainSetHead.vue b/src/jmapNew/theme/race_01/menus/dialog/trainSetHead.vue index 2104b5fc2..fe8f7c0ca 100644 --- a/src/jmapNew/theme/race_01/menus/dialog/trainSetHead.vue +++ b/src/jmapNew/theme/race_01/menus/dialog/trainSetHead.vue @@ -12,14 +12,14 @@ > 车组号 - 服务号 + 车次号 - +
{{ messageTip1 }}
@@ -63,7 +63,7 @@ export default { addModel: { groupNumber: '', destinationCode: '', - serviceNumber: '' + tripNumber: '' }, messageTip1:'', messageTip2:'', @@ -110,7 +110,7 @@ export default { // 如果不是断点激活,则需要对初始值进行初始化 if (!this.dialogShow) { this.addModel.groupNumber = selected.groupNumber; - this.addModel.serviceNumber = selected.serviceNumber; + this.addModel.tripNumber = selected.tripNumber; } this.dialogShow = true; this.$nextTick(function () { @@ -125,8 +125,8 @@ export default { mouseCancelState(this.selected); }, commit() { - if (!this.addModel.serviceNumber) { - this.messageTip1 = '请输入服务号'; + if (!this.addModel.tripNumber) { + this.messageTip1 = '请输入车次号'; return; } if (!this.addModel.destinationCode) { @@ -137,7 +137,7 @@ export default { const params = { groupNumber: this.addModel.groupNumber, destinationCode: this.addModel.destinationCode, - serviceNumber: this.addModel.serviceNumber + tripNumber: this.addModel.tripNumber }; this.messageTip1 = ''; this.messageTip2 = ''; diff --git a/src/jmapNew/theme/race_01/planConvert.js b/src/jmapNew/theme/race_01/planConvert.js index 48b2e1f55..12786dd2c 100644 --- a/src/jmapNew/theme/race_01/planConvert.js +++ b/src/jmapNew/theme/race_01/planConvert.js @@ -1,5 +1,5 @@ import { createMartPoint, createSeriesModel, createMarkLineModels, hexColor, convertSheetToList } from '@/utils/runPlan'; - +import store from '@/store/index_APP_TARGET'; export default { /** 边缘高度*/ EdgeHeight: 600, @@ -113,7 +113,10 @@ export default { // pointdata.name = `${service.serviceNumber}${train.directionCode}${train.tripNumber}`; pointdata.name = `${service.serviceNumber}${train.tripNumber}`; pointdata.color = '#000' || lineStyle.color; - pointdata.directionCode = train.directionCode; + pointdata.directionCode = train.right ? '2' : '1'; + if (!store.state.map.mapConfig.upRight) { + pointdata.directionCode = train.right ? '1' : '2'; + } pointdata.coord = [train.stationTimeList[1].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[1], train.right, false)]; /** 给服务对象添加服务名称和标记点*/ @@ -211,8 +214,13 @@ export default { if (runPlanData[elem.serviceNumber][elem.tripNumber].length <= 1) { const result = serie.markPoint.data.some(ele => ele.name == `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`); if (!result) { + let directionCode = elem.right ? '2' : '1'; + if (!store.state.map.mapConfig.upRight) { + directionCode = elem.right ? '1' : '2'; + } + // console.log(elem.right, 'elem.right'); serie.markPoint.data.push(createMartPoint({ - directionCode: elem.directionCode, + directionCode: directionCode, coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false)], name: `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`, color: lineStyle.color || '#000' diff --git a/src/jmapNew/theme/xian_01/planConvert.js b/src/jmapNew/theme/xian_01/planConvert.js index 1cf586631..c535838a3 100644 --- a/src/jmapNew/theme/xian_01/planConvert.js +++ b/src/jmapNew/theme/xian_01/planConvert.js @@ -1,5 +1,5 @@ import { createMartPoint, createSeriesModel, createMarkLineModels, hexColor, convertSheetToList, prefixTime } from '@/utils/runPlan'; - +import store from '@/store/index_APP_TARGET'; export default { /** 边缘高度*/ EdgeHeight: 600, @@ -123,7 +123,11 @@ export default { // pointdata.name = `${service.serviceNumber}${train.directionCode}${train.tripNumber}`; pointdata.name = `${service.serviceNumber}${train.tripNumber}`; pointdata.color = '#000' || lineStyle.color; - pointdata.directionCode = train.directionCode; + // pointdata.directionCode = train.directionCode; + pointdata.directionCode = train.right ? '2' : '1'; + if (!store.state.map.mapConfig.upRight) { + pointdata.directionCode = train.right ? '1' : '2'; + } pointdata.coord = [train.stationTimeList[1].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[1], train.directionCode, false)]; /** 给服务对象添加服务名称和标记点*/ @@ -221,8 +225,12 @@ export default { if (runPlanData[elem.serviceNumber][elem.tripNumber].length <= 1) { const result = serie.markPoint.data.some(ele => ele.name == `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`); if (!result) { + let directionCode = elem.right ? '2' : '1'; + if (!store.state.map.mapConfig.upRight) { + directionCode = elem.right ? '1' : '2'; + } serie.markPoint.data.push(createMartPoint({ - directionCode: elem.directionCode, + directionCode: directionCode, coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false)], name: `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`, color: lineStyle.color || '#000' diff --git a/src/jmapNew/theme/xian_02/planConvert.js b/src/jmapNew/theme/xian_02/planConvert.js index 2bce84025..526870390 100644 --- a/src/jmapNew/theme/xian_02/planConvert.js +++ b/src/jmapNew/theme/xian_02/planConvert.js @@ -1,4 +1,5 @@ import { createMartPoint, createSeriesModel, createMarkLineModels, hexColor, convertSheetToList } from '@/utils/runPlan'; +import store from '@/store/index_APP_TARGET'; const StationMap = { YARD1: '潏河停车场', YARD2: '潏河停车场', @@ -176,7 +177,11 @@ export default { /** 创建标记点名称和坐标*/ pointdata.name = `${service.serviceNumber}${train.tripNumber}`; pointdata.color = '#000' || lineStyle.color; - pointdata.directionCode = train.directionCode; + // pointdata.directionCode = train.directionCode; + pointdata.directionCode = train.right ? '2' : '1'; + if (!store.state.map.mapConfig.upRight) { + pointdata.directionCode = train.right ? '1' : '2'; + } pointdata.coord = [train.stationTimeList[1].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[1], train.directionCode, false)]; /** 给服务对象添加服务名称和标记点*/ @@ -275,8 +280,12 @@ export default { if (runPlanData[elem.serviceNumber][elem.tripNumber].length <= 1) { const result = serie.markPoint.data.some(ele => ele.name == `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`); if (!result) { + let directionCode = elem.right ? '2' : '1'; + if (!store.state.map.mapConfig.upRight) { + directionCode = elem.right ? '1' : '2'; + } serie.markPoint.data.push(createMartPoint({ - directionCode: elem.directionCode, + directionCode: directionCode, coord: [parseInt(time), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false)], name: `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`, color: lineStyle.color || '#000' diff --git a/src/scripts/ConstConfig.js b/src/scripts/ConstConfig.js index 97e7798bc..c76ef2c24 100644 --- a/src/scripts/ConstConfig.js +++ b/src/scripts/ConstConfig.js @@ -97,7 +97,8 @@ export default { {label: '车辆段调度', value: 'DEPOT_DISPATCHER', enLabel: 'Depot dispatcher '}, {label: '电力调度', value: 'ELECTRIC_DISPATCHER', enLabel: 'Electric dispatcher'}, {label: '行调', value: 'DISPATCHER', enLabel: 'Dispatcher '}, - {label: '上级部门', value: 'PARENT_DEPARTMENT', enLabel: 'Parent department'} + {label: '上级部门', value: 'PARENT_DEPARTMENT', enLabel: 'Parent department'}, + {label: '停车场信号楼', value: 'PARKING_LOT_SIGNAL_BUILDING', enLabel: 'Parking Signal Building'} ], SimulationType: [ @@ -212,7 +213,8 @@ export default { ControlConvertMenu: {enlabel: 'Control mode training', label:'控制模式实训'}, LimitControl: {enlabel: 'Control mode limit', label:'全线限速实训'}, TrainWindow: {enlabel: 'TrainWindow training', label:'车次窗实训'}, - Driver:{enlabel: 'Driver training', label:'司机实训'} + Driver:{enlabel: 'Driver training', label:'司机实训'}, + DirectionRod:{enlabel: 'Direction rod training', label:'方向杆实训'} }, interfaceErrorConfig: { '500000': { type: '权限错误:', message: '您尚未有该操作权限!'}, diff --git a/src/scripts/cmdPlugin/ValidateHandler.js b/src/scripts/cmdPlugin/ValidateHandler.js index 02be8563d..87706d888 100644 --- a/src/scripts/cmdPlugin/ValidateHandler.js +++ b/src/scripts/cmdPlugin/ValidateHandler.js @@ -57,7 +57,8 @@ class ValidateHandler { if (operate && standard && operate.code == standard.code && operate.operation == standard.operation && - operate.val == standard.val) { + operate.val == standard.val && + (!standard.subType || standard.subType && operate.subType == standard.subType) ) { valid = true; } } diff --git a/src/store/modules/socket.js b/src/store/modules/socket.js index b659b9c13..cbf64cbaf 100644 --- a/src/store/modules/socket.js +++ b/src/store/modules/socket.js @@ -141,6 +141,13 @@ function handle(state, data) { case 'Simulation_Alarm': state.simulationAlarmInfo = msg; break; + case 'Simulation_Scenes_Reload': + if (msg) { + store.dispatch('training/start'); + } else { + store.dispatch('training/over'); + } + break; } } diff --git a/src/utils/runPlan.js b/src/utils/runPlan.js index a3e0f9b80..4626244e5 100644 --- a/src/utils/runPlan.js +++ b/src/utils/runPlan.js @@ -22,6 +22,7 @@ export function createMartPoint(opt) { /** 创建一个车次数据点*/ export function createMartPointReverse(opt) { + debugger; const rotate = opt.directionCode == '1' ? 45 : (opt.directionCode == '2' ? -45 : 0); const position = opt.type ? 'insideBottomLeft' : 'insideTopLeft'; return { @@ -69,8 +70,8 @@ export function createMarkLineModels(stations, computedYaxis) { markLineModel.markLine.silent = true; markLineModel.markLine.data = []; markLineModel.markLine.lineStyle = { color: '#B0C4DE', width: 0.5 }; - markLineModel.markLine.symbol = 'none'; - markLineModel.elements = [] + markLineModel.markLine.symbol = 'none'; + markLineModel.elements = []; stations.forEach((elem, index) => { markLineModel.markLine.data.push( { diff --git a/src/views/newMap/chatView/chatBox.vue b/src/views/newMap/chatView/chatBox.vue index e792a0945..b4e84590a 100644 --- a/src/views/newMap/chatView/chatBox.vue +++ b/src/views/newMap/chatView/chatBox.vue @@ -88,6 +88,8 @@
+ + T @@ -138,6 +140,7 @@
+