diff --git a/src/api/chat.js b/src/api/chat.js index 81cedad06..7eaa66243 100644 --- a/src/api/chat.js +++ b/src/api/chat.js @@ -61,3 +61,19 @@ export function sendConversationText (group, id, data) { data }); } +/** 发送会话语音(新接口) */ +export function sendChatAudioBase64 (group, data) { + return request({ + url: `/simulation/${group}/operate/Conversation_Chat_Audio_Base64`, + method: 'post', + data + }); +} +/** 发送会话文字(新接口) */ +export function sendChatText (group, data) { + return request({ + url: `/simulation/${group}/operate/Conversation_Chat_Text`, + method: 'post', + data + }); +} diff --git a/src/api/jmap/training.js b/src/api/jmap/training.js index d88d7a1ce..144fa9c0d 100644 --- a/src/api/jmap/training.js +++ b/src/api/jmap/training.js @@ -158,3 +158,92 @@ export function getTrainingTypeAndNumByMapIdAndPrdType(params) { params }); } +/** 已发布实训分页列表 */ +export function getPublishTrainingListPaged(data) { + return request({ + url: `/api/v2/training/published/page`, + method: 'post', + data + }); +} +/** 已发布实训上架 */ +export function publishTrainingPutOn(data) { + return request({ + url: `/api/v2/training/published/put/on`, + method: 'post', + data + }); +} +/** 已发布实训下架 */ +export function publishTrainingPutOff(data) { + return request({ + url: `/api/v2/training/published/pull/off`, + method: 'post', + data + }); +} +/** 已发布实训删除 */ +export function publishTrainingDelete(data) { + return request({ + url: `/api/v2/training/published`, + method: 'delete', + data + }); +} +/** 根据mapId查所有的已发布单操实训的基础信息 */ +export function getPublishSingleList(mapId) { + return request({ + url: `/api/v2/training/published/${mapId}/singles`, + method: 'get' + }); +} +/** 根据mapId查所有的已发布场景实训的基础信息 */ +export function getPublishScenesList(mapId) { + return request({ + url: `/api/v2/training/published/${mapId}/scenes`, + method: 'get' + }); +} +/** 根据实训id查该已发布实训的所有信息 */ +export function getPublishTrainingDetail(trainingId) { + return request({ + url: `/api/v2/training/published/${trainingId}`, + method: 'get' + }); +} +/** 加载发布实训 */ +export function loadPublishTraining(group, trainingId) { + return request({ + url: `/api/training2Simulation/${group}/load/${trainingId}`, + method: 'post' + }); +} +/** 加载草稿实训 */ +export function loadDraftTraining(group, trainingId) { + return request({ + url: ` /api/training2Simulation/${group}/load/draft/${trainingId}`, + method: 'post' + }); +} +/** 开始实训 */ +export function startTraining(group, params) { + return request({ + url: `/api/training2Simulation/${group}/start`, + method: 'put', + params + }); +} +/** 结束实训 */ +export function endTraining(group) { + return request({ + url: `/api/training2Simulation/${group}/finish`, + method: 'put' + }); +} +/** 实训完成步骤 */ +export function endTrainingStep(group, stepId) { + return request({ + url: `/api/training2Simulation/${group}/completion/step/${stepId}`, + method: 'put' + }); +} diff --git a/src/api/pushMessage.js b/src/api/pushMessage.js index 0a13502d1..3621017d7 100644 --- a/src/api/pushMessage.js +++ b/src/api/pushMessage.js @@ -28,6 +28,7 @@ export function postLicenseValidate(data) { return request({ url: `/api/license/validate`, method: 'post', + production: true, // baseURL: 'https://joylink.club/jlcloud', data }); diff --git a/src/api/trainingManage.js b/src/api/trainingManage.js new file mode 100644 index 000000000..9af992810 --- /dev/null +++ b/src/api/trainingManage.js @@ -0,0 +1,96 @@ +import request from '@/utils/request'; + +/** 获取当前用户的所有实训草稿数据 */ +export function getAllTrainingList(params) { + return request({ + url: `/api/v2/draft/training/all`, + method: 'get', + params + }); +} +/** 分页获取当前用户的实训草稿数据 */ +export function getTrainingList(data) { + return request({ + url: `/api/v2/draft/training/info/page`, + method: 'post', + data + }); +} +/** 创建实训草稿 */ +export function createTraining(data) { + return request({ + url: `/api/v2/draft/training/create`, + method: 'post', + data + }); +} +/** 更新当前用户的某个实训草稿 */ +export function updateTraining(data) { + return request({ + url: `/api/v2/draft/training/update/info`, + method: 'post', + data + }); +} +/** 查询步骤列表 */ +export function getTrainingStepList(trainingId) { + return request({ + url: `/api/v2/draft/training/${trainingId}/step/list`, + method: 'get' + }); +} +/** 修改实训所有步骤 */ +export function updateTrainingStep(id, data) { + return request({ + url: `/api/v2/draft/training/${id}/step/update`, + method: 'put', + data: data + }); +} +/** 删除当前用户的实训草稿 */ +export function deleteTraining(data) { + return request({ + url: `/api/v2/draft/training`, + method: 'delete', + data: {trainingDraftIds: data} + }); +} +/** 当前用户发布自己的实训草稿 */ +export function publishTraining(data) { + return request({ + url: `/api/v2/draft/training/publish`, + method: 'post', + data + }); +} +/** 更新当前用户的某个实训草稿的大字段信息 */ +export function updateTrainingContent(data) { + return request({ + url: `/api/v2/draft/training/update/content`, + method: 'post', + data + }); +} +/** 获取当前用户的某个实训草稿的所有信息 */ +export function getTrainingAll(trainingId) { + return request({ + url: `/api/v2/draft/training/all/${trainingId}`, + method: 'get' + }); +} +/** 单独更新当前用户的某个实训草稿的初始背景 */ +export function updateTrainingBackgroud(data) { + return request({ + url: `/api/v2/draft/training/update/content/backgroud`, + method: 'post', + data + }); +} +/** 更新当前用户实训草稿定位 */ +export function updateTrainingMaplocation(data) { + return request({ + url: `/api/v2/draft/training/update/content/maplocation`, + method: 'post', + data + }); +} diff --git a/src/components/QueryListPage/QueryListPage.vue b/src/components/QueryListPage/QueryListPage.vue index ffc413e88..43b60a9e0 100644 --- a/src/components/QueryListPage/QueryListPage.vue +++ b/src/components/QueryListPage/QueryListPage.vue @@ -657,4 +657,7 @@ export default { margin-left: 8px; } .pageContainerView{text-align: center; margin: 10px 0; height: 40px;} +.hideOutContent { + min-height: 12px; +} diff --git a/src/i18n/langs/en/index.js b/src/i18n/langs/en/index.js index 6b247f001..1687a124b 100644 --- a/src/i18n/langs/en/index.js +++ b/src/i18n/langs/en/index.js @@ -28,6 +28,7 @@ import approval from './approval'; import systemGenerate from './systemGenerate'; import login from './login'; import designPlatform from './designPlatform'; +import trainingManage from './trainingManage'; export default { enLocale, @@ -59,5 +60,6 @@ export default { approval, systemGenerate, login, - designPlatform + designPlatform, + trainingManage }; diff --git a/src/i18n/langs/en/map.js b/src/i18n/langs/en/map.js index e06cea63c..656b1fcaf 100644 --- a/src/i18n/langs/en/map.js +++ b/src/i18n/langs/en/map.js @@ -271,6 +271,8 @@ export default { isStandTrack: 'Platform rail:', standTrackName: 'Platform track name:', standTrackNamePosition: 'Platform track name offset:', + stopCDPosition:'stopCD offset', + isHasStopCD:'is stopCD', relStandCode: 'The platform code:', isReentryTrack: 'Whether to return to orbit:', reentryTrackName: 'Name of reentrant rail:', diff --git a/src/i18n/langs/en/router.js b/src/i18n/langs/en/router.js index 8bbad7997..9fd78d3f9 100644 --- a/src/i18n/langs/en/router.js +++ b/src/i18n/langs/en/router.js @@ -97,6 +97,7 @@ export default { boardManage: 'Message Board Manage', publishIBPManage:'publish IBP Manage', publishISCSManage:'publish ISCS Manage', + publishTrainingManage: 'publish Training Manage', voiceTraining: 'Voice Training', mapGroup: 'Map Group', drawingMange:'Drawing Mange', diff --git a/src/i18n/langs/en/trainingManage.js b/src/i18n/langs/en/trainingManage.js new file mode 100644 index 000000000..4c414f914 --- /dev/null +++ b/src/i18n/langs/en/trainingManage.js @@ -0,0 +1,25 @@ +export default { + create: 'create', + editTagTitle: 'Training establishment', + name: 'The name of the training', + description: 'description', + type: 'type', + labelJson: 'tag', + operate: 'operate', + record: 'record', + modify: 'modify', + delete: 'delete', + publish: 'publish', + preview: 'preview', + mapLocation: 'Save map positioning', + saveBackground: 'Save Background', + saveData: 'Save Data', + stepNum: 'Step number', + stepDescription: 'Steps describe', + rulesId: 'Please enter the step number', + rulesDescription: 'Enter the prompt information', + createStepInfo: 'Creating Procedure Information', + editStepInfo: 'Modifying Step Information', + saveStepData: 'Save Step Information', + roleSelect: 'role choices' +}; diff --git a/src/i18n/langs/zh/index.js b/src/i18n/langs/zh/index.js index 3974061e3..36de12e12 100644 --- a/src/i18n/langs/zh/index.js +++ b/src/i18n/langs/zh/index.js @@ -28,6 +28,7 @@ import approval from './approval'; import systemGenerate from './systemGenerate'; import login from './login'; import designPlatform from './designPlatform'; +import trainingManage from './trainingManage'; export default { cnLocale, @@ -59,5 +60,6 @@ export default { approval, systemGenerate, login, - designPlatform + designPlatform, + trainingManage }; diff --git a/src/i18n/langs/zh/map.js b/src/i18n/langs/zh/map.js index 489bee208..be86c68a0 100644 --- a/src/i18n/langs/zh/map.js +++ b/src/i18n/langs/zh/map.js @@ -255,6 +255,8 @@ export default { isStandTrack: '是否站台轨:', standTrackName: '站台轨名称:', standTrackNamePosition: '站台轨名称偏移量:', + stopCDPosition:'停车倒计时偏移量', + isHasStopCD:'停车倒计时', relStandCode: '站台编码:', isReentryTrack: '是否折返轨:', reentryTrackName: '折返轨名称:', diff --git a/src/i18n/langs/zh/router.js b/src/i18n/langs/zh/router.js index f74e62b56..c5349e2fe 100644 --- a/src/i18n/langs/zh/router.js +++ b/src/i18n/langs/zh/router.js @@ -101,6 +101,7 @@ export default { boardManage: '留言板管理', publishIBPManage:'发布IBP盘管理', publishISCSManage:'发布ISCS管理', + publishTrainingManage: '发布实训管理', voiceTraining: '语音训练', mapGroup: '地图分组', drawingMange:'图纸管理', diff --git a/src/i18n/langs/zh/trainingManage.js b/src/i18n/langs/zh/trainingManage.js new file mode 100644 index 000000000..b84cbb897 --- /dev/null +++ b/src/i18n/langs/zh/trainingManage.js @@ -0,0 +1,25 @@ +export default { + create: '创建', + editTagTitle: '实训编制', + name: '实训名称', + description: '描述', + type: '类型', + labelJson: '标签', + operate: '操作', + record: '编制', + modify: '修改', + delete: '删除', + publish: '发布', + preview: '预览', + mapLocation: '保存地图定位', + saveBackground: '保存背景', + saveData: '保存数据', + stepNum: '步骤序号', + stepDescription: '步骤描述', + rulesId: '请输入步骤序号', + rulesDescription: '请输入步骤提示信息', + createStepInfo: '创建步骤信息', + editStepInfo: '修改步骤信息', + saveStepData: '保存步骤', + roleSelect: '角色选择' +}; diff --git a/src/jmapNew/config/deviceStyle.js b/src/jmapNew/config/deviceStyle.js index 32e333d85..252568bd6 100644 --- a/src/jmapNew/config/deviceStyle.js +++ b/src/jmapNew/config/deviceStyle.js @@ -16,7 +16,8 @@ const mapDeviceStyle = { '15': 'datie_01', // 大铁线路一 '16': 'datie_02', // 大铁线路二 '17':'datie_tky', // 铁科院大铁线路 - '18':'datie_jd1a' + '18':'datie_jd1a', + '19': 'datie_ksk' // 大铁 卡斯柯 }; export function selectLineCode(code) { diff --git a/src/jmapNew/config/skinCode/bejing_01.js b/src/jmapNew/config/skinCode/bejing_01.js index 6275f77d2..d630c6e58 100644 --- a/src/jmapNew/config/skinCode/bejing_01.js +++ b/src/jmapNew/config/skinCode/bejing_01.js @@ -207,7 +207,6 @@ class SkinCode extends defaultStyle { }; this[deviceType.StationTurnBack] = { // 站后折返 - displayCondition: '01', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) lamp: { fill: '#f1f1f1', // 填充色 radiusR: 7 // 控制灯大小 @@ -256,7 +255,6 @@ class SkinCode extends defaultStyle { /** 引导总锁 */ this[deviceType.GuideLock] = { // 是否显示 - displayCondition: '03', // 显示条件 prdType text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -591,7 +589,6 @@ class SkinCode extends defaultStyle { }; this[deviceType.AutomaticRoute] = { // 是否显示 - displayCondition: '03', // 显示条件 prdType text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 diff --git a/src/jmapNew/config/skinCode/chengdu_01.js b/src/jmapNew/config/skinCode/chengdu_01.js index 852a84947..e51d8c18b 100644 --- a/src/jmapNew/config/skinCode/chengdu_01.js +++ b/src/jmapNew/config/skinCode/chengdu_01.js @@ -516,7 +516,6 @@ class SkinCode extends defaultStyle { }; this[deviceType.AutomaticRoute] = { // 是否显示 - displayCondition: '03', // 显示条件 prdType text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -530,8 +529,6 @@ class SkinCode extends defaultStyle { }; /** 引导总锁 */ this[deviceType.GuideLock] = { - // 是否显示 - displayCondition: '03', // 显示条件 prdType text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 diff --git a/src/jmapNew/config/skinCode/chengdu_03.js b/src/jmapNew/config/skinCode/chengdu_03.js index 1e026a9e6..97d86d895 100644 --- a/src/jmapNew/config/skinCode/chengdu_03.js +++ b/src/jmapNew/config/skinCode/chengdu_03.js @@ -345,7 +345,6 @@ class SkinCode extends defaultStyle { }; this[deviceType.StationTurnBack] = { // 站后折返 - displayCondition: '01', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) lamp: { fill: '#f1f1f1', // 填充色 radiusR: 7 // 控制灯大小 @@ -497,7 +496,6 @@ class SkinCode extends defaultStyle { } }; this[deviceType.PowerSupply] = { - displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -511,7 +509,6 @@ class SkinCode extends defaultStyle { } }; this[deviceType.Maintain] = { - displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -523,7 +520,6 @@ class SkinCode extends defaultStyle { } }; this[deviceType.NoOneReturn] = { - displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, fontWeight: 'normal', @@ -535,7 +531,6 @@ class SkinCode extends defaultStyle { } }; this[deviceType.AtsControl] = { - displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -548,7 +543,6 @@ class SkinCode extends defaultStyle { } }; this[deviceType.MaintenanceLamps] = { - displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -560,7 +554,6 @@ class SkinCode extends defaultStyle { } }; this[deviceType.ZcCommunication] = { - displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -572,7 +565,6 @@ class SkinCode extends defaultStyle { } }; this[deviceType.ChainControl] = { - displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -585,7 +577,6 @@ class SkinCode extends defaultStyle { } }; this[deviceType.IntersiteControl] = { - displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -597,7 +588,6 @@ class SkinCode extends defaultStyle { } }; this[deviceType.CenterCommunication] = { - displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -609,7 +599,6 @@ class SkinCode extends defaultStyle { } }; this[deviceType.LeuControl] = { - displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -621,7 +610,6 @@ class SkinCode extends defaultStyle { } }; this[deviceType.LocalControl] = { - displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -683,8 +671,6 @@ class SkinCode extends defaultStyle { } }; this[deviceType.AutomaticRoute] = { - // 是否显示 - displayCondition: '03', // 显示条件prdType 为01 text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -726,8 +712,6 @@ class SkinCode extends defaultStyle { /** 引导总锁 */ this[deviceType.GuideLock] = { - // 是否显示 - displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 diff --git a/src/jmapNew/config/skinCode/datie_01.js b/src/jmapNew/config/skinCode/datie_01.js index ce52da05a..b572beeed 100644 --- a/src/jmapNew/config/skinCode/datie_01.js +++ b/src/jmapNew/config/skinCode/datie_01.js @@ -329,7 +329,6 @@ class SkinCode extends defaultStyle { }; this[deviceType.StationTurnBack] = { // 站后折返 - displayCondition: '01', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) lamp: { fill: '#f1f1f1', // 填充色 radiusR: 7 // 控制灯大小 @@ -395,8 +394,8 @@ class SkinCode extends defaultStyle { redColor: '#FF0000', // 控制模式红色 yellowColor: '#FFFF00', // 控制模式黄色 purpleColor:'#840084', // 控制模式紫色 - strokeColor: '#fff', - lineWidth: 1 + strokeColor: '#fff', + lineWidth: 1 }, emergencyControl: { // 紧急站控 show: false, @@ -427,25 +426,25 @@ class SkinCode extends defaultStyle { arrowShow: false, grayColor: '#7F7F7F' }, - veryControl: { - show: true, - offset: { x: 0, y: 0 }, - text: '非常站控' - }, - selfDiscipline: { - show: true, - offset: { x: 0, y: 0 }, - text: '允许自律' - }, - selfDisciplineControl: { - show: true, - offset: { x: 0, y: 0 }, - text: '自律控制' - }, - veryControlButton: { - offset: { x: 0, y: 0 }, - text: '非常站控' - } + veryControl: { + show: true, + offset: { x: 0, y: 0 }, + text: '非常站控' + }, + selfDiscipline: { + show: true, + offset: { x: 0, y: 0 }, + text: '允许自律' + }, + selfDisciplineControl: { + show: true, + offset: { x: 0, y: 0 }, + text: '自律控制' + }, + veryControlButton: { + offset: { x: 0, y: 0 }, + text: '非常站控' + } } }; @@ -515,7 +514,6 @@ class SkinCode extends defaultStyle { } }; this[deviceType.PowerSupply] = { - displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -529,7 +527,6 @@ class SkinCode extends defaultStyle { } }; this[deviceType.Maintain] = { - displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -541,7 +538,6 @@ class SkinCode extends defaultStyle { } }; this[deviceType.NoOneReturn] = { - displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, fontWeight: 'normal', @@ -553,7 +549,6 @@ class SkinCode extends defaultStyle { } }; this[deviceType.AtsControl] = { - displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -566,7 +561,6 @@ class SkinCode extends defaultStyle { } }; this[deviceType.MaintenanceLamps] = { - displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -578,7 +572,6 @@ class SkinCode extends defaultStyle { } }; this[deviceType.ZcCommunication] = { - displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -590,7 +583,6 @@ class SkinCode extends defaultStyle { } }; this[deviceType.ChainControl] = { - displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -603,7 +595,6 @@ class SkinCode extends defaultStyle { } }; this[deviceType.IntersiteControl] = { - displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -615,7 +606,6 @@ class SkinCode extends defaultStyle { } }; this[deviceType.CenterCommunication] = { - displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -627,7 +617,6 @@ class SkinCode extends defaultStyle { } }; this[deviceType.LeuControl] = { - displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -639,7 +628,6 @@ class SkinCode extends defaultStyle { } }; this[deviceType.LocalControl] = { - displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -701,8 +689,6 @@ class SkinCode extends defaultStyle { } }; this[deviceType.AutomaticRoute] = { - // 是否显示 - displayCondition: '03', // 显示条件prdType 为01 text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -744,8 +730,6 @@ class SkinCode extends defaultStyle { /** 引导总锁 */ this[deviceType.GuideLock] = { - // 是否显示 - displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -935,7 +919,6 @@ class SkinCode extends defaultStyle { this[deviceType.FloodGate] = {}; this[deviceType.DirectionRod] = {}; this[deviceType.IndicatorLight] = { - displayCondition: '01', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) indicator:{ radiusR:6, offset:{ x:0, y:20}, diff --git a/src/jmapNew/config/skinCode/datie_02.js b/src/jmapNew/config/skinCode/datie_02.js index 12bc6e4d6..c70041961 100644 --- a/src/jmapNew/config/skinCode/datie_02.js +++ b/src/jmapNew/config/skinCode/datie_02.js @@ -140,6 +140,7 @@ class SkinCode extends defaultStyle { endWidth: 2, // 尽头分隔符宽度 endColor: 'rgb(128,128,128)', // 尽头分隔符颜色 color: 'rgb(128,128,128)', // 区段边界符颜色 + invadeSpecial:true, // 特殊侵限 halfHeight: 3 // 区段分隔符高度的一半 }, @@ -163,16 +164,20 @@ class SkinCode extends defaultStyle { }, trainPosition:{ display: false // 列车实时位置显示 + }, + remainTime:{ + circleBack:'', + textColor:'' } }; this[deviceType.Signal] = { - distance: 10, // 设备距离区段的距离 + distance: 12, // 设备距离区段的距离 colorSpecial: true, // 特殊处理灯位颜色 post: { - standardLength: 6, // 高柱长度 - standardHeight: 6, // 灯柱高度 - standardColor: '#FFFFFF', // 灯柱颜色 + standardLength: 7, // 高柱长度 + standardHeight: 7, // 灯柱高度 + standardColor: 'rgb(85,120,182)', // 灯柱颜色 standardVerticalWidth: 2, // 灯柱竖杆宽度 standardRailWidth: 2 // 灯柱横杆宽度 }, @@ -182,8 +187,8 @@ class SkinCode extends defaultStyle { isAlignCenter: false, // 信号字体对其方式 fontSize: 11, // 信号机名称字体大小 fontWeight: 'bold', // 信号机名称字体粗细 - defaultColor: '#FFFFFF', // 信号灯字体默认色 - blockColor: '#FFFFFF', // 信号灯字体锁定颜色 + defaultColor: 'rgb(192,192,192)', // 信号灯字体默认色 + blockColor: 'rgb(192,192,192)', // 信号灯字体锁定颜色 checkColor: '#00FF00' // 信号保护区段检查颜色 }, remainTimeColor: '#F00', @@ -199,19 +204,21 @@ class SkinCode extends defaultStyle { notBlock:true, // 封锁不设置颜色 bgShow: false, // 是否被选中 guidName: 'singleRY', // 成都三号线引导类型 - borderVariable: false, // 信号灯边框可变 + borderVariable: true, // 信号灯边框可变 stopWidth: 2, // 禁止线宽度 - borderWidth: 2, // 信号灯边框线宽度 - borderColor: '#677DBB', // 信号灯边框线颜色 + borderWidth: 1, // 信号灯边框线宽度 + borderColor: 'rgb(85,120,182)', // 信号灯边框线颜色 + darkColor:'rgb(85,120,182)', // radiusR: 6, // 信号灯半径 grayColor: '#7F7F7F', // 信号灯灰色 redColor: '#FF0000', // 信号灯红色 greenColor: '#00FF00', // 信号灯绿色 yellowColor: '#FFFF00', // 信号灯黄色 whiteColor: '#FFFFFF', // 信号灯白色 - blueColor: '#0070C0', // 信号灯蓝色 + blueColor: 'rgb(60,66,235)', // 信号灯蓝色 faultType: 'light', // 信号机故障类型 (light闪) - special:true // 大铁类型信号机 + special:true, // 大铁类型信号机 + normalBorderShow:true }, route: { direction: true, // 自动通过方向 @@ -256,6 +263,15 @@ class SkinCode extends defaultStyle { } }; + this[deviceType.SignalButton] = { + width:12, + borderLine:1, + isShowBorder:true, + guideColor: 'rgb(80,80,255)', + trainColor:'rgb(0,128,0)', + strokeColor:'rgb(128,128,128)' + }; + // 供电线路 this[deviceType.Power] = { noElectricStrokeColor:'#808080', // 无电颜色 @@ -330,7 +346,6 @@ class SkinCode extends defaultStyle { }; this[deviceType.StationTurnBack] = { // 站后折返 - displayCondition: '01', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) lamp: { fill: '#f1f1f1', // 填充色 radiusR: 7 // 控制灯大小 @@ -453,6 +468,8 @@ class SkinCode extends defaultStyle { offset: { x: 0, y: 0 }, text: '非常站控', lightColor: '#ff0', + border:true, // 有边框 + borderLine:1, defaultColor: '#ccc' }, selfDisciplineThree: { @@ -514,7 +531,7 @@ class SkinCode extends defaultStyle { fontSize: 11, // 字体大小 fontColor: '#fff', // 道岔名称颜色 fontWeight: 'normal', // 字体粗细 - borderColor: '#FE0000', // 道岔边框颜色 + borderColor: '#FF0000', // 道岔边框颜色 lossColor: '#C00808', // 道岔失去颜色 locateColor: '#00FF00', // 道岔定位颜色 inversionColor: '#FFFF00', // 道岔反位颜色 @@ -534,7 +551,7 @@ class SkinCode extends defaultStyle { }, jointImg: { // 道岔 A B C D四元素属性配置 trapezoidLength: 8, // 直角梯形元素默认长度 - faultStatus: true, // 挤岔表示 + faultStatus: false, // 挤岔表示 fork: true, // 挤岔专用(如有挤岔操作 变为true) forKColor: 'red' // 挤岔颜色 配合挤岔专用 }, @@ -548,15 +565,15 @@ class SkinCode extends defaultStyle { rectWidth: 18, // 矩形框 宽高 rectBorderColor: '#fff', // 矩形边框颜色 block: true, // 封锁显示 - blockColor: 'red', // 封锁颜色 + blockColor: '#FF0000', // 封锁颜色 followName: true // 位置跟随名称确定 }, arcBlcok: { // 圆形封锁图形 show: true, // 显示 shapeR: 10, - arcBorderColor: 'red', // 默认边框颜色 - locationColor: 'red', // 定位封锁颜色 - inversionColor: 'red' // 反位封锁颜色 + arcBorderColor: '#FF0000', // 默认边框颜色 + locationColor: '#FF0000', // 定位封锁颜色 + inversionColor: '#FF0000' // 反位封锁颜色 } }; @@ -572,7 +589,6 @@ class SkinCode extends defaultStyle { } }; this[deviceType.PowerSupply] = { - displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -586,7 +602,6 @@ class SkinCode extends defaultStyle { } }; this[deviceType.Maintain] = { - displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -598,7 +613,6 @@ class SkinCode extends defaultStyle { } }; this[deviceType.NoOneReturn] = { - displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, fontWeight: 'normal', @@ -610,7 +624,6 @@ class SkinCode extends defaultStyle { } }; this[deviceType.AtsControl] = { - displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -623,7 +636,6 @@ class SkinCode extends defaultStyle { } }; this[deviceType.MaintenanceLamps] = { - displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -635,7 +647,6 @@ class SkinCode extends defaultStyle { } }; this[deviceType.ZcCommunication] = { - displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -647,7 +658,6 @@ class SkinCode extends defaultStyle { } }; this[deviceType.ChainControl] = { - displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -660,7 +670,6 @@ class SkinCode extends defaultStyle { } }; this[deviceType.IntersiteControl] = { - displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -668,11 +677,10 @@ class SkinCode extends defaultStyle { }, lamp: { radiusR: 6, // 控制灯大小 - controlColor: '#00FF00' // 控制灯颜色 + controlColor: '#00E600' // 控制灯颜色 } }; this[deviceType.CenterCommunication] = { - displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -684,7 +692,6 @@ class SkinCode extends defaultStyle { } }; this[deviceType.LeuControl] = { - displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -696,7 +703,6 @@ class SkinCode extends defaultStyle { } }; this[deviceType.LocalControl] = { - displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -758,8 +764,6 @@ class SkinCode extends defaultStyle { } }; this[deviceType.AutomaticRoute] = { - // 是否显示 - displayCondition: '03', // 显示条件prdType 为01 text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -801,8 +805,6 @@ class SkinCode extends defaultStyle { /** 引导总锁 */ this[deviceType.GuideLock] = { - // 是否显示 - displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -1004,7 +1006,6 @@ class SkinCode extends defaultStyle { this[deviceType.FloodGate] = {}; this[deviceType.DirectionRod] = {}; this[deviceType.IndicatorLight] = { - displayCondition: '01', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) indicator:{ radiusR:6, offset:{ x:0, y:20}, @@ -1017,7 +1018,7 @@ class SkinCode extends defaultStyle { } }; this[deviceType.DepartArrow] = { - triangleLength: 15, + triangleLength: 12, lineWidth: 8, length: 35, distance: 15, @@ -1032,7 +1033,7 @@ class SkinCode extends defaultStyle { noBlockStatusColor:'#ffff00' }; this[deviceType.PickArrow] = { - triangleLength: 15, + triangleLength: 12, lineWidth: 8, length: 35, distance: 15, diff --git a/src/jmapNew/config/skinCode/datie_jd1a.js b/src/jmapNew/config/skinCode/datie_jd1a.js index 893539850..f20ef0ec0 100644 --- a/src/jmapNew/config/skinCode/datie_jd1a.js +++ b/src/jmapNew/config/skinCode/datie_jd1a.js @@ -259,26 +259,25 @@ class SkinCode extends defaultStyle { this[deviceType.SignalButton] = { shape: 'roundWithDock', fillColor: '#808080', - showName: true, - } + showName: true + }; this[deviceType.SwitchFault] = { - displayCondition: '01', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 14, // 字体大小 fontWeight: 'normal', // 字体粗细 distance: -50 // 灯跟文字距离 }, lamp: { - square: true, // 方形 + square: true, // 方形 radiusR: 20, - switchState: true, // 是否用颜色表示道岔状态 - controlColor: '#00ff00', // 定位颜色 - reverseColor: '#ffff00', // 反位颜色 - switchingColor: '#999999', // 转换中颜色 - faultColor: '#ff0000', // 挤岔颜色 - blockColor: '#0000ff', // 单封颜色 - lockColor: '#ff0000', // 单锁颜色 + switchState: true, // 是否用颜色表示道岔状态 + controlColor: '#00ff00', // 定位颜色 + reverseColor: '#ffff00', // 反位颜色 + switchingColor: '#999999', // 转换中颜色 + faultColor: '#ff0000', // 挤岔颜色 + blockColor: '#0000ff', // 单封颜色 + lockColor: '#ff0000', // 单锁颜色 lineWidth: 2, strokeColor: '#FFFFFF' // 控制灯描边样式 } @@ -358,7 +357,6 @@ class SkinCode extends defaultStyle { }; this[deviceType.StationTurnBack] = { // 站后折返 - displayCondition: '01', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) lamp: { fill: '#f1f1f1', // 填充色 radiusR: 7 // 控制灯大小 @@ -424,8 +422,8 @@ class SkinCode extends defaultStyle { redColor: '#FF0000', // 控制模式红色 yellowColor: '#FFFF00', // 控制模式黄色 purpleColor:'#840084', // 控制模式紫色 - strokeColor: '#fff', - lineWidth: 1 + strokeColor: '#fff', + lineWidth: 1 }, emergencyControl: { // 紧急站控 show: false, @@ -456,81 +454,81 @@ class SkinCode extends defaultStyle { arrowShow: false, grayColor: '#7F7F7F' }, - veryControl: { - show: true, - offset: { x: 0, y: 0 }, - lightColor: '#f00', - defaultColor: '#7F7F7F', - text: '非常站控' - }, - selfDiscipline: { - show: true, - offset: { x: 0, y: 0 }, - text: '允许自律', + veryControl: { + show: true, + offset: { x: 0, y: 0 }, + lightColor: '#f00', defaultColor: '#7F7F7F', + text: '非常站控' + }, + selfDiscipline: { + show: true, + offset: { x: 0, y: 0 }, + text: '允许自律', + defaultColor: '#7F7F7F', + lightColor: '#ff0' + }, + selfDisciplineControl: { + show: true, + offset: { x: 0, y: 0 }, + lightColor: '#0f0', + defaultColor: '#7F7F7F', + text: '自律控制' + }, + veryControlButton: { + offset: { x: 0, y: 0 }, + text: '非常站控', lightColor: '#ff0', - }, - selfDisciplineControl: { - show: true, - offset: { x: 0, y: 0 }, - lightColor: '#0f0', - defaultColor: '#7F7F7F', - text: '自律控制' - }, - veryControlButton: { - offset: { x: 0, y: 0 }, - text: '非常站控', - lightColor: '#ff0', - defaultColor: '#ccc', - }, - selfDisciplineThree: { - offset: { x: 0, y: 0 }, - text: '分散自律', - lightColor: '#0f0', - defaultColor: '#ccc' - }, - graphRoad: { - show: true, - offset: { x: 0, y: 0 }, - text: '按图排路', - lightColor: '#0f0', - defaultColor: '#ccc' - }, - planControl: { - show: true, - offset: { x: 0, y: 0 }, - text: '计划控制', - lightColor: '#0f0', - defaultColor: '#ccc' - }, - centerCommunication: { - show: true, - offset: { x: 0, y: 30 }, - text: '中心通信', - lightColor: '#0f0', - defaultColor: '#ccc' - }, - selfDisciplineCommunication: { - show: true, - offset: { x: 0, y: 30 }, - text: '自律机通信', - lightColor: '#0f0', - defaultColor: '#ccc' - }, - allowedTurnBack: { - show: true, - offset: { x: 0, y: 30 }, - text: '允许转回', - lightColor: '#0f0', - defaultColor: '#ccc' - }, - trainControl: { - show: true, - offset: { x: 0, y: 30 }, - text: '列控', - lightColor: '#0f0', - defaultColor: '#ccc' - } + defaultColor: '#ccc' + }, + selfDisciplineThree: { + offset: { x: 0, y: 0 }, + text: '分散自律', + lightColor: '#0f0', + defaultColor: '#ccc' + }, + graphRoad: { + show: true, + offset: { x: 0, y: 0 }, + text: '按图排路', + lightColor: '#0f0', + defaultColor: '#ccc' + }, + planControl: { + show: true, + offset: { x: 0, y: 0 }, + text: '计划控制', + lightColor: '#0f0', + defaultColor: '#ccc' + }, + centerCommunication: { + show: true, + offset: { x: 0, y: 30 }, + text: '中心通信', + lightColor: '#0f0', + defaultColor: '#ccc' + }, + selfDisciplineCommunication: { + show: true, + offset: { x: 0, y: 30 }, + text: '自律机通信', + lightColor: '#0f0', + defaultColor: '#ccc' + }, + allowedTurnBack: { + show: true, + offset: { x: 0, y: 30 }, + text: '允许转回', + lightColor: '#0f0', + defaultColor: '#ccc' + }, + trainControl: { + show: true, + offset: { x: 0, y: 30 }, + text: '列控', + lightColor: '#0f0', + defaultColor: '#ccc' + } } }; @@ -584,13 +582,13 @@ class SkinCode extends defaultStyle { shapeR: 10, arcBorderColor: 'red', // 默认边框颜色 locationColor: 'red', // 定位封锁颜色 - inversionColor: 'red' // 反位封锁颜色 + inversionColor: 'red' // 反位封锁颜色 }, - switchDot: { // 岔心小圆点 + switchDot: { // 岔心小圆点 show: true, - monoLockColor: '#ff0000', // 单锁 红色 - lockColor: '#0000ff' // 单封 蓝色 - }, + monoLockColor: '#ff0000', // 单锁 红色 + lockColor: '#0000ff' // 单封 蓝色 + } }; this[deviceType.LcControl] = { @@ -605,7 +603,6 @@ class SkinCode extends defaultStyle { } }; this[deviceType.PowerSupply] = { - displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -619,7 +616,6 @@ class SkinCode extends defaultStyle { } }; this[deviceType.Maintain] = { - displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -631,7 +627,6 @@ class SkinCode extends defaultStyle { } }; this[deviceType.NoOneReturn] = { - displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, fontWeight: 'normal', @@ -643,7 +638,6 @@ class SkinCode extends defaultStyle { } }; this[deviceType.AtsControl] = { - displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -656,7 +650,6 @@ class SkinCode extends defaultStyle { } }; this[deviceType.MaintenanceLamps] = { - displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -668,7 +661,6 @@ class SkinCode extends defaultStyle { } }; this[deviceType.ZcCommunication] = { - displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -680,7 +672,6 @@ class SkinCode extends defaultStyle { } }; this[deviceType.ChainControl] = { - displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -693,7 +684,6 @@ class SkinCode extends defaultStyle { } }; this[deviceType.IntersiteControl] = { - displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -705,7 +695,6 @@ class SkinCode extends defaultStyle { } }; this[deviceType.CenterCommunication] = { - displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -717,7 +706,6 @@ class SkinCode extends defaultStyle { } }; this[deviceType.LeuControl] = { - displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -729,7 +717,6 @@ class SkinCode extends defaultStyle { } }; this[deviceType.LocalControl] = { - displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -791,8 +778,6 @@ class SkinCode extends defaultStyle { } }; this[deviceType.AutomaticRoute] = { - // 是否显示 - displayCondition: '03', // 显示条件prdType 为01 text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -834,8 +819,6 @@ class SkinCode extends defaultStyle { /** 引导总锁 */ this[deviceType.GuideLock] = { - // 是否显示 - displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -887,8 +870,8 @@ class SkinCode extends defaultStyle { lrPadding: 4, // 两边间隔 upPadding: 4, // 上边距离 trainBodyFillColor: '#88DF8E', // 列车车身填充颜色 - trainSidelineColor: '#F00', - trainSidelineStopColor: '#000', + trainSidelineColor: '#F00', + trainSidelineStopColor: '#000', // trainNameFormat: 'serviceNumber:targetCode'// 列车显示格式 trainNameFormat:'tripNumber' }, @@ -913,21 +896,21 @@ class SkinCode extends defaultStyle { trainNumber: { targetCodePrefix: '000', // 目的地码前缀 defaultTargetCode: 'DDD', // 默认目的地码 - fontColor: '#F00', - trainTargetTextAlign: 'left', // 目的地码文字显示位置 + fontColor: '#F00', + trainTargetTextAlign: 'left', // 目的地码文字显示位置 trainNumberOffset: { x: 24, y: 4}// 目的地码偏移量 }, trainServer: { serviceNumberPrefix: '000', // 服务号(表号)前缀 defaultServiceNumber: 'TTT', // 默认服务号(表号) defaultServerNoColor: '#F00', // 默认服务号状态显示颜色 - fontColor: '#F00', + fontColor: '#F00', trainServerOffset: { x: 4, y: 4} // 列车服务号偏移 }, trainTarget: { tripNumberPrefix: '', // 车次号前缀 // defaultTripNumber: 'DDD', // 默认车次号2 - defaultTripNumber: ' ', // 默认车次号 + defaultTripNumber: ' ', // 默认车次号 trainTargetOffset: { x: 36, y: 4}, // 列车车次号偏移 trainTargetTextAlign: 'right' // 车次号文字显示位置 }, @@ -939,13 +922,13 @@ class SkinCode extends defaultStyle { trainHead: { trainConntWidth: 10, // 列车竖杠的宽度 trainHeadFillColor: '#189B4D', // 列车车头矩形填充颜色 - trainHeadRectNoChange: true, // 列车车头矩形填充颜色不变 + trainHeadRectNoChange: true, // 列车车头矩形填充颜色不变 trainHeadRectHeight: 20, // 列车车头矩形高度 directionStopType:'specialAll', // special 西安二号线 停车 列车方向图标不消失 normal 正常 trainHeadHeight: 'trainBox', // 列车车头高度取决于trainBox高度 trainHeadArrowWidth: 15, // 列车车头三角宽度 trainHeadArrowOffsetX: 0, // 列车车头三角偏移 - trainHeadRectOffsetX: 10 + trainHeadRectOffsetX: 10 }, common: { trainHeight: 20, // 列车高度 @@ -995,16 +978,16 @@ class SkinCode extends defaultStyle { { type: 1, lineLShow: true, - arrowLShow: false, + arrowLShow: false, lineRShow: false, - arrowRShow: true + arrowRShow: true }, { type: 0, lineLShow: false, - arrowLShow: true, + arrowLShow: true, lineRShow: true, - arrowRShow: false + arrowRShow: false } ], // 列车停止方向类型对应车头显示状态 1从左往右 0从右往左 driveModeStatus: [ @@ -1039,7 +1022,6 @@ class SkinCode extends defaultStyle { this[deviceType.FloodGate] = {}; this[deviceType.DirectionRod] = {}; this[deviceType.IndicatorLight] = { - displayCondition: '01', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) indicator:{ radiusR:6, offset:{ x:0, y:20}, @@ -1052,125 +1034,125 @@ class SkinCode extends defaultStyle { } }; this[deviceType.DepartArrow] = { - triangleLength: 15, - lineWidth: 8, - length: 35, - distance: 15, - fill: '#000', - stroke: '#fff', - fontSize: 11, - defaultText: '发车', - defaultColor: '#ccc', + triangleLength: 15, + lineWidth: 8, + length: 35, + distance: 15, + fill: '#000', + stroke: '#fff', + fontSize: 11, + defaultText: '发车', + defaultColor: '#ccc', occupiedColor:'#f00', noOccupiedColor:'#00ff00', blockStatusColor:'#00ff00', - noBlockStatusColor:'#ffff00', - }; + noBlockStatusColor:'#ffff00' + }; this[deviceType.PickArrow] = { - triangleLength: 15, - lineWidth: 8, - length: 35, - distance: 15, - fill: '#000', - stroke: '#fff', - fontSize: 11, - defaultText: '接车', - defaultColor: '#ccc', + triangleLength: 15, + lineWidth: 8, + length: 35, + distance: 15, + fill: '#000', + stroke: '#fff', + fontSize: 11, + defaultText: '接车', + defaultColor: '#ccc', occupiedColor:'#f00', noOccupiedColor:'#ffff00', blockStatusColor:'#00ff00', - noBlockStatusColor:'#ffff00', - }; - this[deviceType.Occlusion] = { - text: { - fontSize: 11, // 字体大小 - fontWeight: 'normal', // 字体粗细 - distance: 5 // 灯跟文字距离 - }, - lamp: { - radiusR: 6, // 控制灯大小 - controlColor: '#ccc' // 控制灯颜色 - } - }; - this[deviceType.Accident] = { - text: { - fontSize: 11, - fontWeight: 'normal', - distance: 5 - }, - lamp: { - radiusR: 6, - controlColor: '#ccc' - } - }; - this[deviceType.Recovery] = { - text: { - fontSize: 11, - fontWeight: 'normal', - distance: 5 - }, - lamp: { - radiusR: 6, - controlColor: '#ccc' - } - }; - this[deviceType.PickAssist] = { - text: { - fontSize: 11, - fontWeight: 'normal', - distance: 5 - }, - lamp: { - radiusR: 6, - controlColor: '#ccc' - } - }; - this[deviceType.DepartAssist] = { - text: { - fontSize: 11, - fontWeight: 'normal', - distance: 5 - }, - lamp: { - radiusR: 6, - controlColor: '#ccc' - } - }; - this[deviceType.TotalAssist] = { - text: { - fontSize: 11, - fontWeight: 'normal', - distance: 5 - }, - lamp: { - radiusR: 6, - controlColor: '#ccc' - } - }; - this[deviceType.AssistStatus] = { - text: { - fontSize: 11, - fontWeight: 'normal', - distance: 5 - }, - lamp: { - radiusR: 6, - controlColor: '#ccc', - occupiedColor:'#ffffff', - } - }; - this[deviceType.SectionOccupied] = { - text: { - fontSize: 11, - fontWeight: 'normal', - distance: 5 - }, - lamp: { - radiusR: 6, - controlColor: '#ccc', - occupiedColor:'#ff0000', - } - }; + noBlockStatusColor:'#ffff00' + }; + this[deviceType.Occlusion] = { + text: { + fontSize: 11, // 字体大小 + fontWeight: 'normal', // 字体粗细 + distance: 5 // 灯跟文字距离 + }, + lamp: { + radiusR: 6, // 控制灯大小 + controlColor: '#ccc' // 控制灯颜色 + } + }; + this[deviceType.Accident] = { + text: { + fontSize: 11, + fontWeight: 'normal', + distance: 5 + }, + lamp: { + radiusR: 6, + controlColor: '#ccc' + } + }; + this[deviceType.Recovery] = { + text: { + fontSize: 11, + fontWeight: 'normal', + distance: 5 + }, + lamp: { + radiusR: 6, + controlColor: '#ccc' + } + }; + this[deviceType.PickAssist] = { + text: { + fontSize: 11, + fontWeight: 'normal', + distance: 5 + }, + lamp: { + radiusR: 6, + controlColor: '#ccc' + } + }; + this[deviceType.DepartAssist] = { + text: { + fontSize: 11, + fontWeight: 'normal', + distance: 5 + }, + lamp: { + radiusR: 6, + controlColor: '#ccc' + } + }; + this[deviceType.TotalAssist] = { + text: { + fontSize: 11, + fontWeight: 'normal', + distance: 5 + }, + lamp: { + radiusR: 6, + controlColor: '#ccc' + } + }; + this[deviceType.AssistStatus] = { + text: { + fontSize: 11, + fontWeight: 'normal', + distance: 5 + }, + lamp: { + radiusR: 6, + controlColor: '#ccc', + occupiedColor:'#ffffff' + } + }; + this[deviceType.SectionOccupied] = { + text: { + fontSize: 11, + fontWeight: 'normal', + distance: 5 + }, + lamp: { + radiusR: 6, + controlColor: '#ccc', + occupiedColor:'#ff0000' + } + }; } } diff --git a/src/jmapNew/config/skinCode/datie_02_1.js b/src/jmapNew/config/skinCode/datie_ksk.js similarity index 92% rename from src/jmapNew/config/skinCode/datie_02_1.js rename to src/jmapNew/config/skinCode/datie_ksk.js index 15b3e2f05..96a9d916d 100644 --- a/src/jmapNew/config/skinCode/datie_02_1.js +++ b/src/jmapNew/config/skinCode/datie_ksk.js @@ -258,7 +258,36 @@ class SkinCode extends defaultStyle { distanceY: 1 // 信号背景Y偏移距离 } }; - + this[deviceType.SignalButton] = { + shape: 'roundWithDock', + fillColor: '#808080', + showName: true, + selectColor: '#0000ff', + flashingColor: '#ffff00', + countOffset: { x: 0, y: -15 }, + typeList: ['PICK_ASSIST', 'DEPART_ASSIST', 'ASSIST', 'GUIDELOCK', 'SECTION_FAULT_UNLOCK', 'LOCATE', 'REVERSE', 'CANCEL', 'HUMAN_RELEASE_ROUTE', 'MONOLOCK', + 'UNLOCK', 'BLOCK', 'UNBLOCK', 'CHANGE_DIRECTION', 'ACCIDENT', 'RECOVERY', 'OCCLUSION', 'FAULT_NOTICE', 'GUIDE'] + }; + this[deviceType.SwitchFault] = { + text: { + fontSize: 14, // 字体大小 + fontWeight: 'normal', // 字体粗细 + distance: -50 // 灯跟文字距离 + }, + lamp: { + square: true, // 方形 + radiusR: 20, + switchState: true, // 是否用颜色表示道岔状态 + controlColor: '#00ff00', // 定位颜色 + reverseColor: '#ffff00', // 反位颜色 + switchingColor: '#999999', // 转换中颜色 + faultColor: '#ff0000', // 挤岔颜色 + blockColor: '#0000ff', // 单封颜色 + lockColor: '#ff0000', // 单锁颜色 + lineWidth: 2, + strokeColor: '#FFFFFF' // 控制灯描边样式 + } + }; // 供电线路 this[deviceType.Power] = { noElectricStrokeColor:'#808080', // 无电颜色 @@ -333,7 +362,6 @@ class SkinCode extends defaultStyle { }; this[deviceType.StationTurnBack] = { // 站后折返 - displayCondition: '01', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) lamp: { fill: '#f1f1f1', // 填充色 radiusR: 7 // 控制灯大小 @@ -394,13 +422,13 @@ class SkinCode extends defaultStyle { offset: {x: 0, y: 0}, // 偏移量 radiusR: 6, // 控制模式灯的半径 distance: 46, // 控制模式之间灯之间的距离 - grayColor: '#7F7F7F', // 控制模式灰色 + grayColor: '#1E1E1E', // 控制模式灰色 greenColor: '#00FF00', // 控制模式绿色 redColor: '#FF0000', // 控制模式红色 yellowColor: '#FFFF00', // 控制模式黄色 purpleColor:'#840084', // 控制模式紫色 - strokeColor: '#fff', - lineWidth: 1 + strokeColor: '#444444', + lineWidth: 3 }, emergencyControl: { // 紧急站控 show: false, @@ -432,7 +460,7 @@ class SkinCode extends defaultStyle { grayColor: '#7F7F7F' }, veryControl: { - show: true, + show: false, offset: { x: 0, y: 0 }, lightColor: '#f00', defaultColor: '#7F7F7F', @@ -440,23 +468,25 @@ class SkinCode extends defaultStyle { }, selfDiscipline: { show: true, - offset: { x: 0, y: 0 }, - text: '允许自律', - defaultColor: '#7F7F7F', - lightColor: '#ff0' + offset: { x: 70, y: 0 }, + text: '允许转回自律', + defaultColor: '#1E1E1E', + lightColor: '#ff0', + lineWidth: 3 }, selfDisciplineControl: { show: true, - offset: { x: 0, y: 0 }, + offset: { x: -40, y: 0 }, lightColor: '#0f0', - defaultColor: '#7F7F7F', - text: '自律控制' + defaultColor: '#1E1E1E', + text: '分散自律' }, veryControlButton: { + shape: 'arc', offset: { x: 0, y: 0 }, text: '非常站控', lightColor: '#ff0', - defaultColor: '#ccc' + defaultColor: '#f00' }, selfDisciplineThree: { offset: { x: 0, y: 0 }, @@ -539,7 +569,8 @@ class SkinCode extends defaultStyle { trapezoidLength: 8, // 直角梯形元素默认长度 faultStatus: true, // 挤岔表示 fork: true, // 挤岔专用(如有挤岔操作 变为true) - forKColor: 'red' // 挤岔颜色 配合挤岔专用 + forKColor: 'red', // 挤岔颜色 配合挤岔专用 + loseNameFlash: true // 失去表示时 道岔名闪 }, // arcBlcok: { // 圆形封锁图形 // show: false, // 显示 @@ -575,21 +606,19 @@ class SkinCode extends defaultStyle { } }; this[deviceType.PowerSupply] = { - displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 distance: 5 // 灯跟文字距离 }, lamp: { - radiusR: 6, // 控制灯大小 + radiusR: 3, // 控制灯大小 controlColor: '#00FF00', // 控制灯颜色 offColor: '#000', strokeColor: '#fff' } }; this[deviceType.Maintain] = { - displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -601,7 +630,6 @@ class SkinCode extends defaultStyle { } }; this[deviceType.NoOneReturn] = { - displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, fontWeight: 'normal', @@ -613,20 +641,18 @@ class SkinCode extends defaultStyle { } }; this[deviceType.AtsControl] = { - displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 distance: 5 // 灯跟文字距离 }, lamp: { - radiusR: 6, // 控制灯大小 + radiusR: 3, // 控制灯大小 controlColor: '#00FF00', // 控制灯颜色 offColor: '#FF0000' } }; this[deviceType.MaintenanceLamps] = { - displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -638,7 +664,6 @@ class SkinCode extends defaultStyle { } }; this[deviceType.ZcCommunication] = { - displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -650,44 +675,53 @@ class SkinCode extends defaultStyle { } }; this[deviceType.ChainControl] = { - displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, // 字体大小 - fontWeight: 'normal', // 字体粗细 + fontWeight: 'normal', // 字体粗细 distance: 5 // 灯跟文字距离 }, lamp: { - radiusR: 6, // 控制灯大小 + radiusR: 3, // 控制灯大小 controlColor: '#00FF00', // 控制灯颜色 - offColor: '#ff0000' + offColor: '#00FF00' + } + }; + this[deviceType.ThroatRoute] = { + text: { + fontSize: 11, // 字体大小 + fontWeight: 'normal', // 字体粗细 + distance: 5 // 灯跟文字距离 + }, + lamp: { + radiusR: 4, // 控制灯大小 + controlColor: '#1E1E1E', // 控制灯颜色 + strokeColor: '#404040', + lineWidth: 3 } }; this[deviceType.IntersiteControl] = { - displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 distance: 5 // 灯跟文字距离 }, lamp: { - radiusR: 6, // 控制灯大小 + radiusR: 3, // 控制灯大小 controlColor: '#00FF00' // 控制灯颜色 } }; this[deviceType.CenterCommunication] = { - displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 distance: 5 // 灯跟文字距离 }, lamp: { - radiusR: 6, // 控制灯大小 + radiusR: 3, // 控制灯大小 controlColor: '#00FF00' // 控制灯颜色 } }; this[deviceType.LeuControl] = { - displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -699,7 +733,6 @@ class SkinCode extends defaultStyle { } }; this[deviceType.LocalControl] = { - displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -762,7 +795,6 @@ class SkinCode extends defaultStyle { }; this[deviceType.AutomaticRoute] = { // 是否显示 - displayCondition: '03', // 显示条件prdType 为01 text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -805,7 +837,6 @@ class SkinCode extends defaultStyle { /** 引导总锁 */ this[deviceType.GuideLock] = { // 是否显示 - displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -1009,7 +1040,6 @@ class SkinCode extends defaultStyle { this[deviceType.FloodGate] = {}; this[deviceType.DirectionRod] = {}; this[deviceType.IndicatorLight] = { - displayCondition: '01', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) indicator:{ radiusR:6, offset:{ x:0, y:20}, @@ -1124,9 +1154,11 @@ class SkinCode extends defaultStyle { distance: 5 }, lamp: { - radiusR: 6, - controlColor: '#ccc', - occupiedColor:'#ffffff' + occupiedColor:'#ffffff', + radiusR: 4, // 控制灯大小 + controlColor: '#1E1E1E', // 控制灯颜色 + strokeColor: '#404040', + lineWidth: 3 } }; this[deviceType.SectionOccupied] = { @@ -1136,11 +1168,30 @@ class SkinCode extends defaultStyle { distance: 5 }, lamp: { - radiusR: 6, - controlColor: '#ccc', - occupiedColor:'#ff0000' + occupiedColor:'#ff0000', + radiusR: 4, // 控制灯大小 + controlColor: '#1E1E1E', // 控制灯颜色 + strokeColor: '#404040', + lineWidth: 3 } }; + this[deviceType.NoStatusLamp] = { + text: { + fontSize: 11, + fontWeight: 'normal', + distance: 5 + }, + lamp: { + radiusR: 4, // 控制灯大小 + controlColor: '#1E1E1E', // 控制灯颜色 + strokeColor: '#404040', + lineWidth: 3 + } + }; + this[deviceType.Counter] = { + fontSize: 11, + defaultColor: '#fff' + }; } } diff --git a/src/jmapNew/config/skinCode/foshan_01.js b/src/jmapNew/config/skinCode/foshan_01.js index fe33ac9b9..da310294f 100644 --- a/src/jmapNew/config/skinCode/foshan_01.js +++ b/src/jmapNew/config/skinCode/foshan_01.js @@ -331,8 +331,6 @@ class SkinCode extends defaultStyle { }; /** 引导总锁 */ this[deviceType.GuideLock] = { - // 是否显示 - displayCondition: '03', // 显示条件 prdType text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -471,8 +469,8 @@ class SkinCode extends defaultStyle { core: { length: 6, // 道岔单边长度 graphShow: true, // 图形显示 - graphInversionColor: '#FFFF00', // 反位颜色 - graphLocalColor: '#00FF00' // 定位颜色 + graphInversionColor: '#FFFF00', // 反位颜色 + graphLocalColor: '#00FF00' // 定位颜色 }, jointImg: { // 道岔 A B C D四元素属性配置 trapezoidLength: 8, // 直角梯形元素默认长度 @@ -563,8 +561,6 @@ class SkinCode extends defaultStyle { } }; this[deviceType.AutomaticRoute] = { - // 是否显示 - displayCondition: '03', // 显示条件 prdType text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -726,7 +722,7 @@ class SkinCode extends defaultStyle { }; this[deviceType.FloodGate] = {}; this[deviceType.DirectionRod] = {}; - this[deviceType.IndicatorLight] = {}; + this[deviceType.IndicatorLight] = {}; } } diff --git a/src/jmapNew/config/skinCode/fuzhou_01.js b/src/jmapNew/config/skinCode/fuzhou_01.js index f6d345ea0..1d80994af 100644 --- a/src/jmapNew/config/skinCode/fuzhou_01.js +++ b/src/jmapNew/config/skinCode/fuzhou_01.js @@ -328,8 +328,6 @@ class SkinCode extends defaultStyle { }; /** 引导总锁 */ this[deviceType.GuideLock] = { - // 是否显示 - displayCondition: '03', // 显示条件 prdType text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -553,8 +551,6 @@ class SkinCode extends defaultStyle { } }; this[deviceType.AutomaticRoute] = { - // 是否显示 - displayCondition: '03', // 显示条件 prdType text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 diff --git a/src/jmapNew/config/skinCode/haerbin_01.js b/src/jmapNew/config/skinCode/haerbin_01.js index bad02de60..40f25a446 100644 --- a/src/jmapNew/config/skinCode/haerbin_01.js +++ b/src/jmapNew/config/skinCode/haerbin_01.js @@ -377,8 +377,6 @@ class SkinCode extends defaultStyle { }; /** 引导总锁 */ this[deviceType.GuideLock] = { - // 是否显示 - displayCondition: '03', // 显示条件 prdType text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -615,8 +613,6 @@ class SkinCode extends defaultStyle { } }; this[deviceType.AutomaticRoute] = { - // 是否显示 - displayCondition: '03', text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -821,7 +817,6 @@ class SkinCode extends defaultStyle { }; this[deviceType.FloodGate] = {}; this[deviceType.DirectionRod] = { - displayCondition: '01', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) fillColor: '#0F0', fontColor: '#FFF', rodLength: 90, diff --git a/src/jmapNew/config/skinCode/nanjing_02.js b/src/jmapNew/config/skinCode/nanjing_02.js index 03699bcd8..c1d5a8552 100644 --- a/src/jmapNew/config/skinCode/nanjing_02.js +++ b/src/jmapNew/config/skinCode/nanjing_02.js @@ -444,8 +444,6 @@ class SkinCode extends defaultStyle { }; /** 引导总锁 */ this[deviceType.GuideLock] = { - // 是否显示 - displayCondition: '03', // 显示条件 prdType text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -695,8 +693,6 @@ class SkinCode extends defaultStyle { } }; this[deviceType.AutomaticRoute] = { - // 是否显示 - displayCondition: '03', text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -911,7 +907,6 @@ class SkinCode extends defaultStyle { }; this[deviceType.FloodGate] = {}; this[deviceType.DirectionRod] = { - displayCondition: '01', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) fillColor: '#0F0', fontColor: '#FFF', rodLength: 90, diff --git a/src/jmapNew/config/skinCode/ningbo_01.js b/src/jmapNew/config/skinCode/ningbo_01.js index 33c1eb51b..c0ec9dca2 100644 --- a/src/jmapNew/config/skinCode/ningbo_01.js +++ b/src/jmapNew/config/skinCode/ningbo_01.js @@ -451,7 +451,6 @@ class SkinCode extends defaultStyle { }; this[deviceType.StationTurnBack] = { // 站后折返 - displayCondition: '01', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) lamp: { fill: '#FFFF00', // 填充色 radiusR: 6 // 控制灯大小 @@ -499,8 +498,6 @@ class SkinCode extends defaultStyle { /** 引导总锁 */ this[deviceType.GuideLock] = { - // 是否显示 - displayCondition: '03', // 显示条件 prdType text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -615,8 +612,6 @@ class SkinCode extends defaultStyle { lineColor: '#FFFFFF' // 线条颜色 }; this[deviceType.AutomaticRoute] = { - // 是否显示 - displayCondition: '03', // 显示条件 prdType text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -629,8 +624,6 @@ class SkinCode extends defaultStyle { } }; this[deviceType.AxleReset] = { - // 是否显示 - displayCondition: '03', // 显示条件 prdType text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -645,8 +638,6 @@ class SkinCode extends defaultStyle { /** 引导总锁 */ this[deviceType.GuideLock] = { - // 是否显示 - displayCondition: '03', // 显示条件 prdType text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 diff --git a/src/jmapNew/config/skinCode/ningbo_03.js b/src/jmapNew/config/skinCode/ningbo_03.js index da0e069f0..a2ccbcd7c 100644 --- a/src/jmapNew/config/skinCode/ningbo_03.js +++ b/src/jmapNew/config/skinCode/ningbo_03.js @@ -489,7 +489,6 @@ class SkinCode extends defaultStyle { }; this[deviceType.StationTurnBack] = { // 站后折返 - displayCondition: '01', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) lamp: { fill: '#FFFF00', // 填充色 radiusR: 6 // 控制灯大小 @@ -537,8 +536,6 @@ class SkinCode extends defaultStyle { /** 引导总锁 */ this[deviceType.GuideLock] = { - // 是否显示 - displayCondition: '03', // 显示条件 prdType text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -623,8 +620,6 @@ class SkinCode extends defaultStyle { lineColor: '#FFFFFF' // 线条颜色 }; this[deviceType.AutomaticRoute] = { - // 是否显示 - displayCondition: '03', // 显示条件 prdType text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -637,8 +632,6 @@ class SkinCode extends defaultStyle { } }; this[deviceType.AxleReset] = { - // 是否显示 - displayCondition: '03', // 显示条件 prdType text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -653,8 +646,6 @@ class SkinCode extends defaultStyle { /** 引导总锁 */ this[deviceType.GuideLock] = { - // 是否显示 - displayCondition: '03', // 显示条件 prdType text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -872,7 +863,6 @@ class SkinCode extends defaultStyle { } }; this[deviceType.FloodGate] = { - displayCondition: '01', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) lineWidth: 2, // 防淹门描边宽度 spareStrokeColor: '#000', // 打开并锁闭-非打开并锁闭描边颜色 spareFillColor: 'rgba(0, 0, 0, 0)', // 打开并锁闭填充颜色 diff --git a/src/jmapNew/config/skinCode/race_01.js b/src/jmapNew/config/skinCode/race_01.js index aa4da8d91..2da1ca635 100644 --- a/src/jmapNew/config/skinCode/race_01.js +++ b/src/jmapNew/config/skinCode/race_01.js @@ -222,7 +222,6 @@ class SkinCode extends defaultStyle { }; this[deviceType.StationTurnBack] = { // 站后折返 - displayCondition: '01', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) lamp: { fill: '#f1f1f1', // 填充色 radiusR: 7 // 控制灯大小 @@ -270,8 +269,6 @@ class SkinCode extends defaultStyle { /** 引导总锁 */ this[deviceType.GuideLock] = { - // 是否显示 - displayCondition: '03', // 显示条件 prdType text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -625,8 +622,6 @@ class SkinCode extends defaultStyle { lineColor: '#FFFFFF' // 线条颜色 }; this[deviceType.AutomaticRoute] = { - // 是否显示 - displayCondition: '03', // 显示条件 prdType text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 diff --git a/src/jmapNew/config/skinCode/xian_01.js b/src/jmapNew/config/skinCode/xian_01.js index 37655a0ca..b74904b07 100644 --- a/src/jmapNew/config/skinCode/xian_01.js +++ b/src/jmapNew/config/skinCode/xian_01.js @@ -344,8 +344,6 @@ class SkinCode extends defaultStyle { }; /** 引导总锁 */ this[deviceType.GuideLock] = { - // 是否显示 - displayCondition: '03', // 显示条件 prdType text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -534,7 +532,6 @@ class SkinCode extends defaultStyle { } }; this[deviceType.SwitchFault] = { - displayCondition: '01', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 14, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -572,7 +569,6 @@ class SkinCode extends defaultStyle { }; this[deviceType.StationTurnBack] = { // 站后折返 - displayCondition: '01', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) lamp: { fill: '#FFFF00', // 填充色 radiusR: 6 // 控制灯大小 @@ -612,8 +608,6 @@ class SkinCode extends defaultStyle { } }; this[deviceType.AutomaticRoute] = { - // 是否显示 - displayCondition: '03', // 显示条件 prdType text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 diff --git a/src/jmapNew/config/skinCode/xian_02.js b/src/jmapNew/config/skinCode/xian_02.js index 7e631f9b2..d659abf05 100644 --- a/src/jmapNew/config/skinCode/xian_02.js +++ b/src/jmapNew/config/skinCode/xian_02.js @@ -435,7 +435,6 @@ class SkinCode extends defaultStyle { }; this[deviceType.StationTurnBack] = { // 站后折返 - displayCondition: '01', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) spliceShow: true, // 西安二号线特殊显示 lamp: { fill: '#FFFF00', // 填充色 @@ -556,8 +555,6 @@ class SkinCode extends defaultStyle { }; this[deviceType.AutomaticRoute] = { - // 是否显示 - displayCondition: '03', // 显示条件 prdType text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -570,8 +567,6 @@ class SkinCode extends defaultStyle { } }; this[deviceType.AxleReset] = { - // 是否显示 - displayCondition: '03', // 显示条件 prdType text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -585,8 +580,6 @@ class SkinCode extends defaultStyle { }; /** 引导总锁 */ this[deviceType.GuideLock] = { - // 是否显示 - displayCondition: '03', // 显示条件 prdType text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -607,14 +600,12 @@ class SkinCode extends defaultStyle { show: false // 车次窗是否显示 }; this[deviceType.NoOneReturn] = { - displayCondition: '01', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) showShape: 'Unmanned', // 显示形状 svg 的Unmanneds width: 25, // 无人折返宽度 defaultColor: '#9F9C9C', // 默认颜色 activeColor: '#FFFFFF' // 激活颜色 }; this[deviceType.Axle] = { - displayCondition: '01', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) lineLength: 14, lineWidth: 2, distance: 5, @@ -625,7 +616,6 @@ class SkinCode extends defaultStyle { resetFillColor: '#FFFF00' }; this[deviceType.FaultStatusGroup] = { // 故障状态 - displayCondition: '01', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) fontSize: 12, // 字体大小 distance: 30, // 模式间距 psd: { @@ -642,7 +632,6 @@ class SkinCode extends defaultStyle { } }; this[deviceType.ReturnModeGroup] = { - displayCondition: '01', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) insideDistance: 2, // 折返模块边框内部距离 outsideDistance: 10, // 折返模块边框之间距离 rectWidth: 20, // 折返模块宽度 @@ -652,7 +641,6 @@ class SkinCode extends defaultStyle { highlightColor: '#fff' // 高亮颜色 }; this[deviceType.ModeStatusGroup] = { // 车站状态模式 - displayCondition: '01', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) fontSize: 12, // 字体大小 distance: 30, // 模式间距 routeMode: { @@ -683,14 +671,12 @@ class SkinCode extends defaultStyle { } }; this[deviceType.ControlSwitch] = { // 控制开关 - displayCondition: '01', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) width: 25, defaultColor: '#FFFFFF', // 默认颜色 lcwColor: '#FFFF00', // LCW控制颜色 faultColor: '#FF0000' // 故障颜色 }; this[deviceType.LampFilament] = { // 灯丝告警 - displayCondition: '01', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) width: 12, defaultColor: '#9F9C9C', // 默认颜色 warningColor: '#FFFF00' // 告警颜色 @@ -810,16 +796,16 @@ class SkinCode extends defaultStyle { { type: 1, lineLShow: false, - arrowLShow: false, + arrowLShow: false, lineRShow: false, - arrowRShow: true, + arrowRShow: true }, { type: 0, lineLShow: false, - arrowLShow: true, + arrowLShow: true, lineRShow: false, - arrowRShow: false, + arrowRShow: false } ], // 列车停止方向类型对应车头显示状态 1从左往右 0从右往左 driveModeStatus: [ diff --git a/src/jmapNew/constant/deviceRender.js b/src/jmapNew/constant/deviceRender.js index e859ef897..19d6604bc 100644 --- a/src/jmapNew/constant/deviceRender.js +++ b/src/jmapNew/constant/deviceRender.js @@ -152,7 +152,7 @@ deviceRender[deviceType.AtsControl] = { }; /** CenterCommunication 中心通信表示灯 */ deviceRender[deviceType.CenterCommunication] = { - _type: deviceType.AtsControl, + _type: deviceType.CenterCommunication, zlevel: 1 }; /** ChainControl 连锁主备状态表示灯 */ @@ -287,52 +287,64 @@ deviceRender[deviceType.IndicatorLight] = { }; /** 接车指示灯 */ deviceRender[deviceType.PickArrow] = { - _type: deviceType.PickArrow, - zlevel: 1 + _type: deviceType.PickArrow, + zlevel: 1 }; /** 发车指示灯 */ deviceRender[deviceType.DepartArrow] = { - _type: deviceType.DepartArrow, - zlevel: 1 + _type: deviceType.DepartArrow, + zlevel: 1 }; /** 区间占用 区间监控 */ deviceRender[deviceType.SectionOccupied] = { - _type: deviceType.SectionOccupied, - zlevel: 1 + _type: deviceType.SectionOccupied, + zlevel: 1 }; /** 辅助状态 */ deviceRender[deviceType.AssistStatus] = { - _type: deviceType.AssistStatus, - zlevel: 1 + _type: deviceType.AssistStatus, + zlevel: 1 }; /** 总辅助状态 */ deviceRender[deviceType.TotalAssist] = { - _type: deviceType.TotalAssist, - zlevel: 1 + _type: deviceType.TotalAssist, + zlevel: 1 }; /** 发车辅助 */ deviceRender[deviceType.DepartAssist] = { - _type: deviceType.DepartAssist, - zlevel: 1 + _type: deviceType.DepartAssist, + zlevel: 1 }; /** 接车辅助 */ deviceRender[deviceType.PickAssist] = { - _type: deviceType.PickAssist, - zlevel: 1 + _type: deviceType.PickAssist, + zlevel: 1 }; /** 复原状态灯 */ deviceRender[deviceType.Recovery] = { - _type: deviceType.Recovery, - zlevel: 1 + _type: deviceType.Recovery, + zlevel: 1 }; /** 事故状态灯 */ deviceRender[deviceType.Accident] = { - _type: deviceType.Accident, - zlevel: 1 + _type: deviceType.Accident, + zlevel: 1 }; /** 闭塞状态灯 */ deviceRender[deviceType.Occlusion] = { - _type: deviceType.Occlusion, - zlevel: 1 + _type: deviceType.Occlusion, + zlevel: 1 +}; +deviceRender[deviceType.ThroatRoute] = { + _type: deviceType.ThroatRoute, + zlevel: 1 +}; +deviceRender[deviceType.NoStatusLamp] = { + _type: deviceType.NoStatusLamp, + zlevel: 1 +}; +deviceRender[deviceType.Counter] = { + _type: deviceType.Counter, + zlevel: 1 }; export default deviceRender; diff --git a/src/jmapNew/constant/deviceType.js b/src/jmapNew/constant/deviceType.js index 4d995bb06..acbf522e8 100644 --- a/src/jmapNew/constant/deviceType.js +++ b/src/jmapNew/constant/deviceType.js @@ -60,6 +60,9 @@ const deviceType = { DepartAssist: 'DepartAssist', TotalAssist: 'TotalAssist', AssistStatus: 'AssistStatus', - SectionOccupied: 'SectionOccupied' + SectionOccupied: 'SectionOccupied', + ThroatRoute: 'ThroatRoute', + NoStatusLamp: 'NoStatusLamp', + Counter: 'Counter' }; export default deviceType; diff --git a/src/jmapNew/constant/stateTransition.js b/src/jmapNew/constant/stateTransition.js index 4df564a51..46df4f7a2 100644 --- a/src/jmapNew/constant/stateTransition.js +++ b/src/jmapNew/constant/stateTransition.js @@ -24,6 +24,7 @@ class Status { assignSkip: device.assignSkip, // 是否指定跳停 runLevelTime: device.runLevelTime, // 区间运行时间 自动为 0 parkingTime: device.parkingTime, // 站台停车时间 自动为0 + remainTime:device.remainTime, // 当前剩余停站时间 fault: device.fault, /** 非故障*/ num:device.num }; @@ -95,6 +96,7 @@ class Status { offsetp:device.offsetp, /** 列车精确位置 (成都一号线使用)*/ physicalCode:device.physicalCode, /** 列车所在物理区段 */ num:device.num /** 列车上的人数*/ + // parkingRemainTime }; } handleStation(device) { diff --git a/src/jmapNew/map.js b/src/jmapNew/map.js index 654ac2284..80fac1f04 100644 --- a/src/jmapNew/map.js +++ b/src/jmapNew/map.js @@ -203,6 +203,7 @@ class Jlmap { } setCenterWithOffset(deviceCode, dx, offsetY) { + console.log('setCenterWithOffset'); const arr = Object.keys(this.mapDevice); if (arr.length != 0) { const device = this.mapDevice[deviceCode]; diff --git a/src/jmapNew/options.js b/src/jmapNew/options.js index b8840f9a2..1e4fb43a2 100644 --- a/src/jmapNew/options.js +++ b/src/jmapNew/options.js @@ -1,26 +1,29 @@ class Options { constructor(opts, trigger) { this.scaleIndex = 0; - this.scaleList = [ - 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, - 1, 1.2, 1.4, 1.6, 1.8, - 2, 2.2, 2.4, 2.6, 2.8, - 3, 3.2, 3.4, 3.6, 3.8, - 4, 4.2, 4.4, 4.6, 4.8, - 5, 5.2, 5.4, 5.6, 5.8, - 6, 6.2, 6.4, 6.6, 6.8, - 7, 7.2, 7.4, 7.6, 7.8, - 8 - ]; + // this.scaleList = [ + // 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, + // 1, 1.2, 1.4, 1.6, 1.8, + // 2, 2.2, 2.4, 2.6, 2.8, + // 3, 3.2, 3.4, 3.6, 3.8, + // 4, 4.2, 4.4, 4.6, 4.8, + // 5, 5.2, 5.4, 5.6, 5.8, + // 6, 6.2, 6.4, 6.6, 6.8, + // 7, 7.2, 7.4, 7.6, 7.8, + // 8 + // ]; + this.minScale = 0.1; + this.maxScale = 10; if (Number.isFinite(opts.scaleRate)) { - const idx = this.scaleList.indexOf(opts.scaleRate); + // const idx = this.scaleList.indexOf(opts.scaleRate); + const idx = opts.scaleRate * 20; if (idx >= 0) { this.scaleIndex = idx; } } - this.scaleRate = opts.scaleRate || this.scaleList[this.scaleIndex]; // 缩放比例 + this.scaleRate = opts.scaleRate || this.scaleIndex * 0.05; // 缩放比例 this.offsetX = opts.offsetX || 0; // x偏移 @@ -56,16 +59,19 @@ class Options { if (Number.isFinite(payload.scale)) { if (Number.isFinite(payload.scale)) { - if ((this.scaleIndex + payload.scale) >= 0 && (this.scaleIndex + payload.scale) < this.scaleList.length) { - this.scaleIndex = this.scaleIndex + payload.scale; + // if ((this.scaleIndex + payload.scale) >= 0 && (this.scaleIndex + payload.scale) < this.scaleList.length) { + // this.scaleIndex = this.scaleIndex + payload.scale; + // } + if ((payload.scale + this.scaleIndex >= 2) && (payload.scale + this.scaleIndex <= 200)) { + this.scaleIndex = payload.scale + this.scaleIndex; } } - this.scaleRate = this.scaleList[this.scaleIndex]; + this.scaleRate = (this.scaleIndex * 0.05).toFixed(2); } if (Number.isFinite(payload.scaleRate)) { - const idx = this.scaleList.indexOf(payload.scaleRate); - if (idx < 0) { + const idx = payload.scaleRate * 20; + if (idx < 2 || idx > 200) { return; } this.scaleIndex = idx; @@ -89,11 +95,11 @@ class Options { getScaleRate(scale) { if (Number.isFinite(scale)) { - if ((this.scaleIndex + scale) >= 0 && (this.scaleIndex + scale) < this.scaleList.length) { - return this.scaleList[this.scaleIndex + scale]; + if (( scale + this.scaleIndex) >= 2 && (scale + this.scaleIndex) <= 200) { + return ((scale + this.scaleIndex) * 0.05).toFixed(2); } } - return this.scaleList[this.scaleIndex]; + return (this.scaleIndex * 0.05).toFixed(2); } } diff --git a/src/jmapNew/parser/parser-graph.js b/src/jmapNew/parser/parser-graph.js index 141877f3b..a1fdfc591 100644 --- a/src/jmapNew/parser/parser-graph.js +++ b/src/jmapNew/parser/parser-graph.js @@ -359,6 +359,9 @@ export function updateMapData(state, model) { case deviceType.TotalAssist: updateForList(model, state, 'indicatorLightList'); break; case deviceType.AssistStatus: updateForList(model, state, 'indicatorLightList'); break; case deviceType.SectionOccupied: updateForList(model, state, 'indicatorLightList'); break; + case deviceType.ThroatRoute: updateForList(model, state, 'indicatorLightList'); break; + case deviceType.NoStatusLamp: updateForList(model, state, 'indicatorLightList'); break; + case deviceType.Counter: updateForList(model, state, 'indicatorLightList'); break; case deviceType.SplitStation: updateForList(model, state, 'splitStationList'); break; case deviceType.Arrow: updateForList(model, state, 'arrowList'); break; case deviceType.Power: updateForList(model, state, 'powerLineList'); break; diff --git a/src/jmapNew/shape/graph/SaidLamp/ECounter.js b/src/jmapNew/shape/graph/SaidLamp/ECounter.js new file mode 100644 index 000000000..3c171a877 --- /dev/null +++ b/src/jmapNew/shape/graph/SaidLamp/ECounter.js @@ -0,0 +1,57 @@ +import Group from 'zrender/src/container/Group'; +import Text from 'zrender/src/graphic/Text'; + +export default class ECounter extends Group { + constructor(model) { + super(); + this.model = model; + this.zlevel = model.zlevel; + this._subType = model._subType; + this.z = model.z; + this.onmouseover = model.mouseover; + this.onmouseout = model.mouseout; + this.create(model); + } + create(model) { + const style = model.style; + this.counter = new Text({ + zlevel: this.zlevel, + z: this.z, + style: { + x: model.x, + y: model.y, + fontWeight: style.textStyle.fontWeight, + fontSize: style.Counter.fontSize, + fontFamily: style.fontFamily, + text: '000', + textFill: style.Counter.defaultColor, + textAlign: style.textStyle.textAlign, + textVerticalAlign: style.textStyle.textVerticalAlign + } + }); + this.name = new Text({ + zlevel: this.zlevel, + z: this.z, + style: { + x: model.x, + y: model.y + 20, + fontWeight: style.textStyle.fontWeight, + fontSize: style.Counter.fontSize, + fontFamily: style.fontFamily, + text: model.text, + textFill: style.Counter.defaultColor, + textAlign: style.textStyle.textAlign, + textVerticalAlign: style.textStyle.textVerticalAlign + } + }); + this.add(this.counter); + this.add(this.name); + } + + recover() { + } + show() {} + setCount(count) { + this.counter && this.counter.setStyle({ text: count || '000' }); + } +} diff --git a/src/jmapNew/shape/graph/SaidLamp/index.js b/src/jmapNew/shape/graph/SaidLamp/index.js index d8fe3702c..e0d98ddf1 100644 --- a/src/jmapNew/shape/graph/SaidLamp/index.js +++ b/src/jmapNew/shape/graph/SaidLamp/index.js @@ -11,6 +11,7 @@ import EUnmanned from './EUnmanned'; import EAxle from './EAxle'; import EIndicatorLight from './EIndicatorLight'; import EPickOrDepartArrow from './EPickOrDepartArrow'; +import ECounter from './ECounter'; import store from '@/store/index'; export default class SaidLamp extends Group { @@ -39,7 +40,8 @@ export default class SaidLamp extends Group { create() { const model = this.model; const lampDevice = ['LeuControl', 'IntersiteControl', 'CenterCommunication', 'AtsControl', 'LocalControl', 'ChainControl', 'Maintain', - 'PowerSupply', 'MaintenanceLamps', 'ZcCommunication', 'SwitchFault', 'SectionOccupied', 'AssistStatus', 'TotalAssist', 'TotalAssist', 'PickAssist', 'Recovery', 'Accident', 'Occlusion']; + 'PowerSupply', 'MaintenanceLamps', 'ZcCommunication', 'SwitchFault', 'SectionOccupied', 'AssistStatus', 'TotalAssist', 'TotalAssist', 'PickAssist', 'Recovery', + 'Accident', 'Occlusion', 'ThroatRoute', 'NoStatusLamp']; if (lampDevice.includes(this._type)) { this.control = new EControl({ @@ -198,6 +200,17 @@ export default class SaidLamp extends Group { _subType: this._type }); this.add(this.control); + } else if (this._type === 'Counter' && this.style.Counter) { + this.control = new ECounter({ + zlevel: this.zlevel, + z: this.z, + x: this.computedPosition.x, + y: this.computedPosition.y, + text: model.name, + style: this.style, + _subType: this._type + }); + this.add(this.control); } } @@ -286,6 +299,11 @@ export default class SaidLamp extends Group { } } } + setCount(count) { + if (this.model._type === deviceType.Counter) { + this.control && this.control.setCount(count); + } + } recover() { this.control && this.control.show(); this.control && this.control.recover(); diff --git a/src/jmapNew/shape/graph/Section/index.js b/src/jmapNew/shape/graph/Section/index.js index 34cbb11a2..c05475ad6 100644 --- a/src/jmapNew/shape/graph/Section/index.js +++ b/src/jmapNew/shape/graph/Section/index.js @@ -1,4 +1,6 @@ import Group from 'zrender/src/container/Group'; +import Text from 'zrender/src/graphic/Text'; +import Arc from 'zrender/src/graphic/shape/Arc'; import ETextName from './ETextName'; // 名称文字 import ELimitLines from './ELimitLines'; // 区段限速 (私有) import ELines from './ELines'; // 创建多线条 曲线 (私有) @@ -132,6 +134,53 @@ export default class Section extends Group { }); this.add(this[element]); }); + if (this.style.Section.remainTime && this.model.type == '01' && this.model.hasStopCD) { + const stopCDPosition = this.model.stopCDPosition || {x:0, y:0}; + const computedPoints = this.computedPoints; + const drict = model.trainPosType != '01' ? 1 : -1; + const x = Math.min(computedPoints[0].x, computedPoints[computedPoints.length - 1].x) + Math.abs(computedPoints[computedPoints.length - 1].x - computedPoints[0].x) / 2; + const y = Math.min(computedPoints[0].y, computedPoints[computedPoints.length - 1].y) + Math.abs(computedPoints[computedPoints.length - 1].y - computedPoints[0].y) / 2; + this.remainTimeText = new Text({ + _subType: 'remainTimeText', + zlevel: this.zlevel, + z: this.z, + silent: model.silent || false, + style: { + x: x + stopCDPosition.x, + y: y - 23 * drict + stopCDPosition.y, + fontWeight: 'normal', + fontSize: 13, + fontFamily:style.fontFamily, + text: '0', + textFill:'#ff0000', + textAlign: 'center', // 水平对齐方式 + textPosition: 'inside', // 文字位置 + textVerticalAlign: 'middle' // 文字垂直对齐方式 + } + }); + this.remainTimeCircle = new Arc({ + _subType: 'remainTimeCircle', + zlevel: this.zlevel, + z: this.z, + shape: { + cx: x - 18 + stopCDPosition.x, + cy: y - 23 * drict + stopCDPosition.y, + r: 6 + }, + style: { + lineWidth: 1, + fill: style.backgroundColor, + stroke: '#ffffff' + } + }); + this.add(this.remainTimeText); + this.add(this.remainTimeCircle); + // this.remainTimeCircle.hide(); + const path = window.location.href; + if (!path.includes('/map/draw')) { // 公里标是否显示 + this.remainTimeText.hide(); + } + } } } @@ -167,6 +216,8 @@ export default class Section extends Group { this.speedLimitName && this.speedLimitName.hide(); this.separator && this.separator.show(); this.badShunt && this.badShunt.hide(); + // this.remainTimeText && this.remainTimeText.hide(); + // this.remainTimeCircle && this.remainTimeCircle.hide(); this.axle && this.axle.setStyle({ stroke: this.style.Section.line.spareColor, @@ -544,6 +595,15 @@ export default class Section extends Group { // 分路不良 // model.shuntingTypeList.length > 0 && model.badShunt && this.badShuntStatus(); + // 停车倒计时 + if (this.remainTimeText) { + if (model.stopCountDown) { + this.showRemainTime(model.stopCountDown); + } else { + this.hideRemainTime(); + } + } + } } @@ -655,4 +715,22 @@ export default class Section extends Group { y:rect.y }; } + + showRemainTime(remainTime) { + this.remainTimeText.show(); + // this.remainTimeCircle.show(); + this.remainTimeCircle && this.remainTimeCircle.animateStyle(true) + .when(0, { fill:this.style.backgroundColor }) + .when(1000, { fill: '#ffffff' }) + .when(2000, { fill:this.style.backgroundColor }) + .start(); + this.remainTimeText.setStyle('text', remainTime); + } + + hideRemainTime() { + this.remainTimeText.hide(); + this.remainTimeCircle && this.remainTimeCircle.stopAnimation(true); + // this.remainTimeCircle && this.remainTimeCircle.hide(); + } + } diff --git a/src/jmapNew/shape/graph/Signal/ESigLamp.js b/src/jmapNew/shape/graph/Signal/ESigLamp.js index 42dbf3263..624fea9f1 100644 --- a/src/jmapNew/shape/graph/Signal/ESigLamp.js +++ b/src/jmapNew/shape/graph/Signal/ESigLamp.js @@ -174,7 +174,11 @@ class ESigLamp extends Group { } setColor(color) { if (this.model.style.Signal.lamp.borderVariable) { - this.lamp.setStyle({ fill: color, stroke: color }); + if (this.model.style.Signal.lamp.normalBorderShow && color == this.model.style.backgroundColor) { + this.lamp.setStyle({ fill: color }); + } else { + this.lamp.setStyle({ fill: color, stroke: color }); + } } else { this.lamp.setStyle({ fill: color }); } diff --git a/src/jmapNew/shape/graph/Signal/index.js b/src/jmapNew/shape/graph/Signal/index.js index e1f642769..5f5d4544d 100644 --- a/src/jmapNew/shape/graph/Signal/index.js +++ b/src/jmapNew/shape/graph/Signal/index.js @@ -647,7 +647,6 @@ class Signal extends Group { } this.sigPost.setHorColor(this.style.Signal.post.openHorColor); } - } /* 侧向开放 */ openLateral(logicLight) { @@ -726,6 +725,14 @@ class Signal extends Group { this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.yellowColor); this.lamps[1] && this.lamps[1].setColor(this.style.Signal.lamp.greenColor); } + redFlash() { + this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.redColor); + this.lamps[0].setAnimationStart(this.style.Signal.lamp.redColor); + } + blueFlash() { + this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.blueColor); + this.lamps[0].setAnimationStart(this.style.Signal.lamp.blueColor); + } lampWhite() { if (this.lamps.length === 1) { this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.whiteColor); @@ -946,12 +953,12 @@ class Signal extends Group { showRemainTime(number) { this.remainTimeName.show(); this.remainTimeName && this.remainTimeName.setStyle({ text: number }); - this.model.signalButtonList && this.model.signalButtonList.length && this.model.signalButtonList.forEach(item => { - const button = store.getters['map/getDeviceByCode'](item); - if (button.type === 'PICK') { - button && button.instance && button.instance.startAnimate(); - } - }); + // this.model.signalButtonList && this.model.signalButtonList.length && this.model.signalButtonList.forEach(item => { + // const button = store.getters['map/getDeviceByCode'](item); + // if (button.type === 'PICK') { + // button && button.instance && button.instance.startAnimate(); + // } + // }); if (this.model.type === 'SHUNTING') { if (!this.style.Signal.dtTextNearSignalOffset) { this.sigName && this.sigName.setAnimationStart(this.style.Signal.text.defaultColor); @@ -1086,6 +1093,14 @@ class Signal extends Group { this.greenYellow(); break; } + case 'RF': { + this.redFlash(); + break; + } + case 'BF': { + this.blueFlash(); + break; + } default: { this.close(model.logicLight); // 信号关闭 break; @@ -1104,6 +1119,14 @@ class Signal extends Group { } }); } + if (model.lockedRouteCode) { + this.model.signalButtonList && this.model.signalButtonList.length && this.model.signalButtonList.forEach(item => { + const button = store.getters['map/getDeviceByCode'](item); + if (button.type === 'GUIDE') { + button && button.instance && button.instance.setState({ toSelected: 0, type: button.model, pressDown: button.pressDown }); + } + }); + } /** 信号机封锁 */ // 缺一个功能封锁 model.blockade && this.block(); // 因大铁处理信号按钮状态 封锁处理需在延时解锁时间之后处理 model.overlapLock && this.overlapLock(); diff --git a/src/jmapNew/shape/graph/SignalButton/index.js b/src/jmapNew/shape/graph/SignalButton/index.js index ecbf971d4..194d16e25 100644 --- a/src/jmapNew/shape/graph/SignalButton/index.js +++ b/src/jmapNew/shape/graph/SignalButton/index.js @@ -1,333 +1,443 @@ -import Group from 'zrender/src/container/Group' -import Rect from 'zrender/src/graphic/shape/Rect' -import Line from 'zrender/src/graphic/shape/Line' -import Text from 'zrender/src/graphic/Text' -import Arc from 'zrender/src/graphic/shape/Arc' -import Circle from 'zrender/src/graphic/shape/Circle' -import store from '@/store/index' +import Group from 'zrender/src/container/Group'; +import Rect from 'zrender/src/graphic/shape/Rect'; +import Line from 'zrender/src/graphic/shape/Line'; +import Text from 'zrender/src/graphic/Text'; +// import Arc from 'zrender/src/graphic/shape/Arc'; +import Circle from 'zrender/src/graphic/shape/Circle'; +import store from '@/store/index'; const typeList = [ - 'PICK_ASSIST', - 'DEPART_ASSIST', - 'ASSIST', - 'GUIDELOCK', - 'SECTION_FAULT_UNLOCK', - 'LOCATE', - 'REVERSE', - 'CANCEL', - 'HUMAN_RELEASE_ROUTE', - 'MONOLOCK', - 'UNLOCK', - 'BLOCK', - 'UNBLOCK', - 'CHANGE_DIRECTION' -] + 'PICK_ASSIST', + 'DEPART_ASSIST', + 'ASSIST', + 'GUIDELOCK', + 'SECTION_FAULT_UNLOCK', + 'LOCATE', + 'REVERSE', + 'CANCEL', + 'HUMAN_RELEASE_ROUTE', + 'MONOLOCK', + 'UNLOCK', + 'BLOCK', + 'UNBLOCK', + 'CHANGE_DIRECTION', + 'ACCIDENT', + 'RECOVERY', + 'OCCLUSION', + 'FAULT_NOTICE' +]; export default class SignalButton extends Group { - constructor(model, { style }) { - super() - this._code = model.code - this._type = model._type - this.zlevel = model.zlevel - const pictureDevice = store.getters['map/getPictureDeviceByCode'](model.code) - if (pictureDevice) { - this.computedPosition = pictureDevice.position - } else { - this.computedPosition = model.position - } - this.z = 0 - this.model = model - this.style = style - this.pressed = false - // Line - this.create() - this.setState(model) - } - - create() { - const model = this.model - const computedPosition = this.computedPosition - const fillColor = this.getTypeColor() - if (this.style.SignalButton && this.style.SignalButton.shape === 'roundWithDock' && typeList.includes(model.type)) { - const circle1 = new Circle({ - zlevel: this.zlevel, - z: this.z + 2, - shape: { - cx: computedPosition.x + 7, - cy: computedPosition.y + 7, - r: 7 - }, - style: { - stroke: '#69666E', - lineWidth: 1, - fill: fillColor - } - }) - const circle2 = new Circle({ - zlevel: this.zlevel, - z: this.z + 1, - shape: { - cx: computedPosition.x + 7, - cy: computedPosition.y + 9, - r: 8 - }, - style: { - fill: '#000' - } - }) - const circle3 = new Circle({ - zlevel: this.zlevel, - z: this.z, - shape: { - cx: computedPosition.x + 7, - cy: computedPosition.y + 9, - r: 9 - }, - style: { - fill: '#eee' - } - }) - this.arcShape = circle1 - this.arcShapeDock1 = circle2 - this.arcShapeDock2 = circle3 - this.add(circle1) - .add(circle2) - .add(circle3) - } else { - this.rectButton = new Rect({ - zlevel: this.zlevel, - z: this.z, - shape: { - x: computedPosition.x, - y: computedPosition.y, - width: 14, - height: 14 - }, - style: { - lineDash: null, - stroke: '#69666E', - lineWidth: 1, - fill: fillColor - } - }) - this.add(this.rectButton) - } - this.leftLine = new Line({ - zlevel: this.zlevel, - z: this.z + 1, - shape: { - x1: computedPosition.x + 1, - y1: computedPosition.y + 1, - x2: computedPosition.x + 13, - y2: computedPosition.y + 13 - }, - style: { - lineWidth: 2, - stroke: '#ff0000' - } - }) - this.add(this.leftLine) - this.leftLine.hide() - this.rightLine = new Line({ - zlevel: this.zlevel, - z: this.z + 1, - shape: { - x1: computedPosition.x + 13, - y1: computedPosition.y + 1, - x2: computedPosition.x + 1, - y2: computedPosition.y + 13 - }, - style: { - lineWidth: 2, - stroke: '#ff0000' - } - }) - this.add(this.rightLine) - this.rightLine.hide() - this.leftBoard = new Line({ - zlevel: this.zlevel, - z: this.z + 1, - shape: { - x1: computedPosition.x - 1, - y1: computedPosition.y - 1, - x2: computedPosition.x - 1, - y2: computedPosition.y + 15 - }, - style: { - lineWidth: 2, - stroke: '#FFFFFF' - } - }) - this.add(this.leftBoard) - this.leftBoard.hide() - this.topBoard = new Line({ - zlevel: this.zlevel, - z: this.z + 1, - shape: { - x1: computedPosition.x - 1, - y1: computedPosition.y - 1, - x2: computedPosition.x + 15, - y2: computedPosition.y - 1 - }, - style: { - lineWidth: 2, - stroke: '#FFFFFF' - } - }) - this.add(this.topBoard) - this.topBoard.hide() - this.rightBoard = new Line({ - zlevel: this.zlevel, - z: this.z + 1, - shape: { - x1: computedPosition.x + 15, - y1: computedPosition.y - 1, - x2: computedPosition.x + 15, - y2: computedPosition.y + 15 - }, - style: { - lineWidth: 2, - stroke: '#A0A0A0' - } - }) - this.add(this.rightBoard) - this.rightBoard.hide() - this.bottomBoard = new Line({ - zlevel: this.zlevel, - z: this.z + 1, - shape: { - x1: computedPosition.x - 1, - y1: computedPosition.y + 15, - x2: computedPosition.x + 15, - y2: computedPosition.y + 15 - }, - style: { - lineWidth: 2, - stroke: '#A0A0A0' - } - }) - this.add(this.bottomBoard) - this.bottomBoard.hide() - const hasTextList = ['PASS', 'ASSIST', 'PICK_ASSIST', 'DEPART_ASSIST', 'ACCIDENT', 'CHANGE_DIRECTION', 'RECOVERY', 'OCCLUSION'] - if (hasTextList.includes(model.type) || (this.style.SignalButton && this.style.SignalButton.showName)) { - this.buttonText = new Text({ - zlevel: this.zlevel, - z: this.z, - style: { - x: computedPosition.x + model.nameOffset.x, - y: computedPosition.y + model.nameOffset.y, - fontWeight: '400', - fontSize: 10, - fontFamily: '', - text: model.name, - textFill: '#C0C0C0', - textAlign: 'middle', - textVerticalAlign: 'top' - } - }) - this.add(this.buttonText) - } - } - startAnimate() { - this.rectButton && - this.rectButton - .animateStyle(true) - .when(0, { fill: '#000' }) - .when(1000, { fill: this.getTypeColor() }) - .when(2000, { fill: '#000' }) - .start() - } - stopAnimation() { - this.rectButton && this.rectButton.stopAnimation(true) - // this.arcFlash && this.arcFlash.stopAnimation(false); - } - getTypeColor() { - if (this.style.SignalButton && this.style.SignalButton.fillColor && typeList.includes(this.model.type)) { - return this.style.SignalButton.fillColor - } - let color = '' - const list = ['ASSIST', 'ACCIDENT', 'PICK_ASSIST', 'DEPART_ASSIST', 'CHANGE_DIRECTION', 'RECOVERY', 'OCCLUSION'] - if (this.model.type === 'FLEXIBLE' || this.model.type === 'SHUNT_TERMINAL') { - color = '#808080' - } else if (this.model.type === 'GUIDE') { - color = '#5050E1' - } else if (list.includes(this.model.type)) { - color = '#ccc' - } else { - color = '#008000' - } - return color - } // - recover() { - this.stopAnimation() - this.rectButton && this.rectButton.setStyle({ fill: this.getTypeColor() }) - this.arcShape && this.arcShape.setStyle({ fill: this.getTypeColor() }) - this.rightLine && this.rightLine.hide() - this.leftLine && this.leftLine.hide() - this.rectButton && this.rectButton.show() - this.arcShape && this.arcShape.show() - this.arcShapeDock1 && this.arcShapeDock1.show() - this.arcShapeDock2 && this.arcShapeDock2.show() - this.buttonText && this.buttonText.show() - this.leftBoard && this.leftBoard.hide() - this.rightBoard && this.rightBoard.hide() - this.topBoard && this.topBoard.hide() - this.bottomBoard && this.bottomBoard.hide() - } - blockShow() { - this.rightLine && this.rightLine.show() - this.leftLine && this.leftLine.show() - } - setState(model) { - this.recover() - // { value: 'ASSIST', label: '总辅助按钮' }, - // { value: 'PICK_ASSIST', label: '接辅助按钮' }, - // { value: 'DEPART_ASSIST', label: '发辅助按钮' }, - const list = ['ASSIST', 'PICK_ASSIST', 'DEPART_ASSIST', 'CHANGE_DIRECTION', 'ACCIDENT', 'RECOVERY', 'OCCLUSION'] - if (list.includes(model.type)) { - if (this.rectButton) { - if (model.pressDown) { - this.rectButton.setStyle({ fill: '#FFFF00' }) + constructor(model, { style }) { + super(); + this._code = model.code; + this._type = model._type; + this.zlevel = model.zlevel; + const pictureDevice = store.getters['map/getPictureDeviceByCode'](model.code); + if (pictureDevice) { + this.computedPosition = pictureDevice.position; } else { - this.rectButton.setStyle({ fill: this.getTypeColor() }) + this.computedPosition = model.position; } - } + this.z = 10; + this.model = model; + this.style = style; + this.pressed = false; + this.typeList = this.style.SignalButton.typeList || typeList; + // Line + this.create(); + this.setState(model); } - // { value: 'PICK', label: '接车按钮' }, - // { value: 'SHUNT_TERMINAL', label: '调车终端按钮' }, - if (!store.getters['map/checkDeviceShow'](this._code)) { - this.buttonText && this.buttonText.hide() - this.rectButton && this.rectButton.hide() - this.leftLine && this.leftLine.hide() - this.rightLine && this.rightLine.hide() - this.arcShape && this.arcShape.hide() - this.arcShapeDock1 && this.arcShapeDock1.hide() - this.arcShapeDock2 && this.arcShapeDock2.hide() - } else { - if (model.hasSelected) { - this.startAnimate() - } - } - } - 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() + + create() { + const model = this.model; + const computedPosition = this.computedPosition; + const fillColor = this.getTypeColor(); + if (this.style.SignalButton && this.style.SignalButton.shape === 'roundWithDock' && this.typeList.includes(model.type)) { + const circle1 = new Circle({ + zlevel: this.zlevel, + z: this.z + 2, + shape: { + cx: computedPosition.x + 7, + cy: computedPosition.y + 7, + r: 7 + }, + style: { + stroke: '#69666E', + lineWidth: 1, + fill: fillColor + } + }); + const circle2 = new Circle({ + zlevel: this.zlevel, + z: this.z + 1, + shape: { + cx: computedPosition.x + 7, + cy: computedPosition.y + 9, + r: 8 + }, + style: { + fill: '#000' + } + }); + const circle3 = new Circle({ + zlevel: this.zlevel, + z: this.z, + shape: { + cx: computedPosition.x + 7, + cy: computedPosition.y + 9, + r: 9 + }, + style: { + fill: '#eee' + } + }); + this.arcShape = circle1; + this.arcShapeDock1 = circle2; + this.arcShapeDock2 = circle3; + this.add(circle1) + .add(circle2) + .add(circle3); + } else { + const width = this.style.SignalButton && this.style.SignalButton.width ? this.style.SignalButton.width : 14; + this.rectButton = new Rect({ + zlevel: this.zlevel, + z: this.z, + shape: { + x: computedPosition.x, + y: computedPosition.y, + width:width, + height: width + }, + style: { + lineDash: null, + stroke: '#69666E', + lineWidth: 1, + fill: fillColor + } + }); + if (this.style.SignalButton && this.style.SignalButton.strokeColor) { + this.rectButton.setStyle('stroke', this.style.SignalButton.strokeColor); + } + this.add(this.rectButton); + } + const width = this.style.SignalButton && this.style.SignalButton.width ? this.style.SignalButton.width : 14; + this.leftLine = new Line({ + zlevel: this.zlevel, + z: this.z + 1, + shape: { + x1: computedPosition.x + 1, + y1: computedPosition.y + 1, + x2: computedPosition.x + width - 1, + y2: computedPosition.y + width - 1 + }, + style: { + lineWidth: 2, + stroke: '#ff0000' + } + }); + this.add(this.leftLine); + this.leftLine.hide(); + this.rightLine = new Line({ + zlevel: this.zlevel, + z: this.z + 1, + shape: { + x1: computedPosition.x + width - 1, + y1: computedPosition.y + 1, + x2: computedPosition.x + 1, + y2: computedPosition.y + width - 1 + }, + style: { + lineWidth: 2, + stroke: '#ff0000' + } + }); + this.add(this.rightLine); + this.rightLine.hide(); + const borderLine = this.style.SignalButton && this.style.SignalButton.borderLine ? this.style.SignalButton.borderLine : 2; + const isShowBorder = this.style.SignalButton && this.style.SignalButton.isShowBorder; + // 接车按钮 通过按钮 引导按钮 + const showBorderBtn = ['PICK', 'PASS', 'GUIDE', 'ASSIST', 'PICK_ASSIST', 'DEPART_ASSIST', 'CHANGE_DIRECTION', 'ACCIDENT', 'RECOVERY', 'OCCLUSION', 'FLEXIBLE']; + this.leftBoard = new Line({ + zlevel: this.zlevel, + z: this.z + 1, + shape: { + x1: computedPosition.x - (borderLine - 1), + y1: computedPosition.y - (borderLine - 1), + x2: computedPosition.x - (borderLine - 1), + y2: computedPosition.y + width + (borderLine - 1) + }, + style: { + lineWidth: borderLine, + stroke: '#FFFFFF' + } + }); + this.add(this.leftBoard); + if (!(isShowBorder && showBorderBtn.includes(model.type))) { this.leftBoard.hide(); } + this.topBoard = new Line({ + zlevel: this.zlevel, + z: this.z + 1, + shape: { + x1: computedPosition.x - (borderLine - 1), + y1: computedPosition.y - (borderLine - 1), + x2: computedPosition.x + width + (borderLine - 1), + y2: computedPosition.y - (borderLine - 1) + }, + style: { + lineWidth: borderLine, + stroke: '#FFFFFF' + } + }); + this.add(this.topBoard); + if (!(isShowBorder && showBorderBtn.includes(model.type))) { this.topBoard.hide(); } + this.rightBoard = new Line({ + zlevel: this.zlevel, + z: this.z + 1, + shape: { + x1: computedPosition.x + width + (borderLine - 1), + y1: computedPosition.y - (borderLine - 1), + x2: computedPosition.x + width + (borderLine - 1), + y2: computedPosition.y + width + (borderLine - 1) + }, + style: { + lineWidth: borderLine, + stroke: '#A0A0A0' + } + }); + this.add(this.rightBoard); + if (!(isShowBorder && showBorderBtn.includes(model.type))) { this.rightBoard.hide(); } + this.bottomBoard = new Line({ + zlevel: this.zlevel, + z: this.z + 1, + shape: { + x1: computedPosition.x - (borderLine - 1), + y1: computedPosition.y + width + (borderLine - 1), + x2: computedPosition.x + width + (borderLine - 1), + y2: computedPosition.y + width + (borderLine - 1) + }, + style: { + lineWidth: borderLine, + stroke: '#A0A0A0' + } + }); + this.add(this.bottomBoard); + if (!(isShowBorder && showBorderBtn.includes(model.type))) { this.bottomBoard.hide(); } + const hasTextList = ['PASS', 'ASSIST', 'PICK_ASSIST', 'DEPART_ASSIST', 'ACCIDENT', 'CHANGE_DIRECTION', 'RECOVERY', 'OCCLUSION', 'FAULT_NOTICE']; + if (hasTextList.includes(model.type) || (this.style.SignalButton && this.style.SignalButton.showName)) { + this.buttonText = new Text({ + zlevel: this.zlevel, + z: this.z, + style: { + x: computedPosition.x + model.nameOffset.x, + y: computedPosition.y + model.nameOffset.y, + fontWeight: '400', + fontSize: 10, + fontFamily: '', + text: model.name, + textFill: '#C0C0C0', + textAlign: 'middle', + textVerticalAlign: 'top' + } + }); + this.add(this.buttonText); + } + if (model.hasCount) { + const countOffset = { x: 0, y: 0 }; + if (this.style.SignalButton && this.style.SignalButton.countOffset) { + countOffset.x = this.style.SignalButton.countOffset.x; + countOffset.y = this.style.SignalButton.countOffset.y; + } + this.textCount = new Text({ + + zlevel: this.zlevel, + z: this.z, + style: { + x: computedPosition.x + 7 + countOffset.x, + y: computedPosition.y + countOffset.y, + fontWeight: '400', + fontSize: 10, + fontFamily: '', + text: '000', + textFill: '#C0C0C0', + textAlign: 'middle', + textVerticalAlign: 'top' + } + }); + this.add(this.textCount); } - } 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() {} + startAnimate(color) { + this.rectButton && + this.rectButton + .animateStyle(true) + .when(0, { fill: '#000' }) + .when(1000, { fill: color }) + .when(2000, { fill: '#000' }) + .start(); + } + stopAnimation() { + this.rectButton && this.rectButton.stopAnimation(true); + } + getTypeColor() { + if (this.style.SignalButton && this.style.SignalButton.fillColor && this.typeList.includes(this.model.type)) { + return this.style.SignalButton.fillColor; + } + let color = ''; + const list = ['ASSIST', 'ACCIDENT', 'PICK_ASSIST', 'DEPART_ASSIST', 'CHANGE_DIRECTION', 'RECOVERY', 'OCCLUSION', 'FAULT_NOTICE']; + if (this.model.type === 'FLEXIBLE' || this.model.type === 'SHUNT_TERMINAL') { + color = '#808080'; + } else if (this.model.type === 'GUIDE') { + if (this.style.SignalButton && this.style.SignalButton.guideColor) { + color = this.style.SignalButton.guideColor; + } else { + color = '#5050E1'; + } + } else if (list.includes(this.model.type)) { + color = '#ccc'; + } else { + if (this.style.SignalButton && this.style.SignalButton.trainColor) { + color = this.style.SignalButton.trainColor; + } else { + color = '#008000'; + } + } + return color; + } + recover() { + this.stopAnimation(); + this.rectButton && this.rectButton.setStyle({ fill: this.getTypeColor() }); + this.arcShape && this.arcShape.setStyle({ fill: this.getTypeColor() }); + this.rightLine && this.rightLine.hide(); + this.leftLine && this.leftLine.hide(); + this.rectButton && this.rectButton.show(); + this.arcShape && this.arcShape.show(); + this.arcShapeDock1 && this.arcShapeDock1.show(); + this.arcShapeDock2 && this.arcShapeDock2.show(); + this.buttonText && this.buttonText.show(); + // this.leftBoard && this.leftBoard.hide(); + // this.rightBoard && this.rightBoard.hide(); + // this.topBoard && this.topBoard.hide(); + // this.bottomBoard && this.bottomBoard.hide(); + } + blockShow() { + this.rightLine && this.rightLine.show(); + this.leftLine && this.leftLine.show(); + } + setState(model) { + this.recover(); + // { value: 'ASSIST', label: '总辅助按钮' }, + // { value: 'PICK_ASSIST', label: '接辅助按钮' }, + // { value: 'DEPART_ASSIST', label: '发辅助按钮' }, + const isShowBorder = this.style.SignalButton && this.style.SignalButton.isShowBorder; + const list = ['ASSIST', 'PICK_ASSIST', 'DEPART_ASSIST', 'CHANGE_DIRECTION', 'ACCIDENT', 'RECOVERY', 'OCCLUSION']; + if (list.includes(model.type)) { + if (this.rectButton) { + if (model.pressDown) { + this.rectButton.setStyle({ fill: '#FFFF00' }); + if (isShowBorder) { + this.leftBoard && this.leftBoard.setStyle('stroke', '#A0A0A0'); + this.topBoard && this.topBoard.setStyle('stroke', '#A0A0A0'); + this.rightBoard && this.rightBoard.setStyle('stroke', '#FFFFFF'); + this.bottomBoard && this.bottomBoard.setStyle('stroke', '#FFFFFF'); + } + } else { + this.rectButton.setStyle({ fill: this.getTypeColor() }); + if (isShowBorder) { + this.leftBoard && this.leftBoard.setStyle('stroke', '#FFFFFF'); + this.topBoard && this.topBoard.setStyle('stroke', '#FFFFFF'); + this.rightBoard && this.rightBoard.setStyle('stroke', '#A0A0A0'); + this.bottomBoard && this.bottomBoard.setStyle('stroke', '#A0A0A0'); + this.leftBoard && this.leftBoard.show(); + this.rightBoard && this.rightBoard.show(); + this.topBoard && this.topBoard.show(); + this.bottomBoard && this.bottomBoard.show(); + } + } + } + } + if (isShowBorder) { + if (model.type == 'FLEXIBLE') { + this.leftBoard && this.leftBoard.show(); + this.rightBoard && this.rightBoard.show(); + this.topBoard && this.topBoard.show(); + this.bottomBoard && this.bottomBoard.show(); + } + } + // 接车按钮 通过按钮 引导按钮 + const showBorderBtn = ['PICK', 'PASS', 'GUIDE']; + if (isShowBorder && showBorderBtn.includes(model.type)) { + if (this.rectButton) { + if (model.hasSelected || model.pressDown) { + this.leftBoard && this.leftBoard.setStyle('stroke', '#A0A0A0'); + this.topBoard && this.topBoard.setStyle('stroke', '#A0A0A0'); + this.rightBoard && this.rightBoard.setStyle('stroke', '#FFFFFF'); + this.bottomBoard && this.bottomBoard.setStyle('stroke', '#FFFFFF'); + } else { + this.leftBoard && this.leftBoard.setStyle('stroke', '#FFFFFF'); + this.topBoard && this.topBoard.setStyle('stroke', '#FFFFFF'); + this.rightBoard && this.rightBoard.setStyle('stroke', '#A0A0A0'); + this.bottomBoard && this.bottomBoard.setStyle('stroke', '#A0A0A0'); + this.leftBoard && this.leftBoard.show(); + this.rightBoard && this.rightBoard.show(); + this.topBoard && this.topBoard.show(); + this.bottomBoard && this.bottomBoard.show(); + } + // else if (model.hasSelected && (model.type == 'PICK' || model.type == 'PASS')) { + // this.leftBoard && this.leftBoard.setStyle('stroke', '#A0A0A0'); + // this.topBoard && this.topBoard.setStyle('stroke', '#A0A0A0'); + // this.rightBoard && this.rightBoard.setStyle('stroke', '#FFFFFF'); + // this.bottomBoard && this.bottomBoard.setStyle('stroke', '#FFFFFF'); + } + } + + // { value: 'PICK', label: '接车按钮' }, + // { value: 'SHUNT_TERMINAL', label: '调车按钮' }, + if (!store.getters['map/checkDeviceShow'](this._code)) { + this.buttonText && this.buttonText.hide(); + this.rectButton && this.rectButton.hide(); + this.leftLine && this.leftLine.hide(); + this.rightLine && this.rightLine.hide(); + this.arcShape && this.arcShape.hide(); + this.arcShapeDock1 && this.arcShapeDock1.hide(); + this.arcShapeDock2 && this.arcShapeDock2.hide(); + this.leftBoard && this.leftBoard.hide(); + this.rightBoard && this.rightBoard.hide(); + this.topBoard && this.topBoard.hide(); + this.bottomBoard && this.bottomBoard.hide(); + } else { + if (model.hasSelected) { + if (this.style.SignalButton && this.style.SignalButton.selectColor) { + this.rectButton && this.rectButton.setStyle({fill:this.style.SignalButton.selectColor}); + } else { + this.startAnimate(this.getTypeColor()); + } + } else if (model.toSelected) { + this.startAnimate(this.style.SignalButton.flashingColor); + } + } + } + setCount(count) { + this.textCount && this.textCount.setStyle({text: count || '000'}); + } + 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() {} } diff --git a/src/jmapNew/shape/graph/Station/index.js b/src/jmapNew/shape/graph/Station/index.js index 06a4f250e..96fe16def 100644 --- a/src/jmapNew/shape/graph/Station/index.js +++ b/src/jmapNew/shape/graph/Station/index.js @@ -13,11 +13,13 @@ import { arrow } from '../utils/ShapePoints'; import Rect from 'zrender/src/graphic/shape/Rect'; import Text from 'zrender/src/graphic/Text'; import store from '@/store/index'; +import Line from 'zrender/src/graphic/shape/Line'; import EStationText from './EStationText'; import { traverseLineElements } from '../utils/ShapeStatusCovert'; import Vue from 'vue'; +import Circle from 'zrender/src/graphic/shape/Circle'; export default class Station extends Group { constructor(model, {style}) { @@ -90,13 +92,6 @@ export default class Station extends Group { this.add(this.mileageText); } - - // if (!model.visible) { // 隐藏车站 - // // this.subheadText && this.subheadText.setStyle('textFill', 'rgba(0,0,0,0)'); - // // this.mileageText && this.mileageText.setStyle('textFill', 'rgba(0,0,0,0)'); - // // this.stationText && this.stationText.setStyle('textFill', 'rgba(0,0,0,0)'); - // this.eachChild(elem => { elem.hide(); }); - // } } createTurnBack() { // 创建按图折返 const model = this.model; @@ -167,7 +162,7 @@ export default class Station extends Group { const queryCtc = queryList.find(item => { return item.includes('ctc'); }); - if (queryCtc) { + if (queryCtc && model.createControlMode) { this.createCtcControlMode(); } else if (this.style.Station.StationControl.special) { if (model.visible && model.createControlMode) { // model.createControlMode 控制模式 @@ -355,7 +350,7 @@ export default class Station extends Group { zlevel: this.zlevel, z: this.z, style: { - x: computedControlModePoint.x + this.style.Station.StationControl.text.offsetX * 0, + x: computedControlModePoint.x + this.style.Station.StationControl.text.offsetX, y: computedControlModePoint.y + this.style.Station.StationControl.text.offsetY, fontWeight: this.style.Station.StationControl.text.fontWeight, fontSize: this.style.Station.StationControl.text.fontSize, @@ -450,7 +445,6 @@ export default class Station extends Group { } } createSelfDiscipline() { - // const model = this.model; const computedControlModePoint = this.computedControlModePoint; if (this.style.Station.StationControl.selfDiscipline) { this.selfDiscipline = new ESingleControl({ @@ -467,7 +461,7 @@ export default class Station extends Group { }); this.add(this.selfDiscipline); } - if (this.style.Station.StationControl.selfDisciplineControl) { + if (this.style.Station.StationControl.selfDisciplineControl && this.style.Station.StationControl.selfDisciplineControl.show) { this.selfDisciplineControl = new ESingleControl({ _subType: 'self_discipline_control', style: this.style, @@ -486,7 +480,7 @@ export default class Station extends Group { createVeryControl() { // const model = this.model; const computedControlModePoint = this.computedControlModePoint; - if (this.style.Station.StationControl.veryControl) { + if (this.style.Station.StationControl.veryControl && this.style.Station.StationControl.veryControl.show) { this.veryControl = new ESingleControl({ _subType: 'very', style: this.style, @@ -502,23 +496,132 @@ export default class Station extends Group { this.add(this.veryControl); } if (this.style.Station.StationControl.veryControlButton) { - this.veryControlButton = new Rect({ - zlevel: this.zlevel, - z: this.z, - _subType: 'veryControlButton', - shape: { - x: computedControlModePoint.x + this.style.Station.StationControl.lamp.distance * 3 / 2 + this.style.Station.StationControl.veryControlButton.offset.x - this.style.Station.StationControl.lamp.radiusR, - y: computedControlModePoint.y + this.style.Station.StationControl.veryControlButton.offset.y - this.style.Station.StationControl.lamp.radiusR, - width: this.style.Station.StationControl.lamp.radiusR * 2, - height: this.style.Station.StationControl.lamp.radiusR * 2 - }, - style: { - lineWidth: 1, - stroke: '#fff', - fill: this.style.Station.StationControl.veryControlButton.defaultColor - } - }); + if (this.style.Station.StationControl.veryControlButton.shape === 'arc') { + this.veryControlButton = new Circle({ + zlevel: this.zlevel, + z: this.z + 2, + _subType: 'veryControlButton', + shape: { + cx: computedControlModePoint.x + this.style.Station.StationControl.lamp.distance * 3 / 2 + this.style.Station.StationControl.veryControlButton.offset.x - this.style.Station.StationControl.lamp.radiusR, + cy: computedControlModePoint.y + this.style.Station.StationControl.veryControlButton.offset.y - this.style.Station.StationControl.lamp.radiusR, + r: this.style.Station.StationControl.lamp.radiusR + }, + style: { + lineWidth: 1, + stroke: '#69666E', + fill: this.style.Station.StationControl.veryControlButton.defaultColor + } + }); + this.veryControlButtonDock1 = new Circle({ + zlevel: this.zlevel, + z: this.z + 1, + shape: { + cx: computedControlModePoint.x + this.style.Station.StationControl.lamp.distance * 3 / 2 + this.style.Station.StationControl.veryControlButton.offset.x - this.style.Station.StationControl.lamp.radiusR, + cy: computedControlModePoint.y + this.style.Station.StationControl.veryControlButton.offset.y - this.style.Station.StationControl.lamp.radiusR + 2, + r: this.style.Station.StationControl.lamp.radiusR + 1 + }, + style: { + fill: '#000' + } + }); + this.veryControlButtonDock2 = new Circle({ + zlevel: this.zlevel, + z: this.z, + shape: { + cx: computedControlModePoint.x + this.style.Station.StationControl.lamp.distance * 3 / 2 + this.style.Station.StationControl.veryControlButton.offset.x - this.style.Station.StationControl.lamp.radiusR, + cy: computedControlModePoint.y + this.style.Station.StationControl.veryControlButton.offset.y - this.style.Station.StationControl.lamp.radiusR + 2, + r: this.style.Station.StationControl.lamp.radiusR + 2 + }, + style: { + fill: '#eee' + } + }); + this.add(this.veryControlButtonDock1).add(this.veryControlButtonDock2); + } else { + this.veryControlButton = new Rect({ + zlevel: this.zlevel, + z: this.z, + _subType: 'veryControlButton', + shape: { + x: computedControlModePoint.x + this.style.Station.StationControl.lamp.distance * 3 / 2 + this.style.Station.StationControl.veryControlButton.offset.x - this.style.Station.StationControl.lamp.radiusR, + y: computedControlModePoint.y + this.style.Station.StationControl.veryControlButton.offset.y - this.style.Station.StationControl.lamp.radiusR, + width: this.style.Station.StationControl.lamp.radiusR * 2, + height: this.style.Station.StationControl.lamp.radiusR * 2 + }, + style: { + lineWidth: 1, + stroke: '#fff', + fill: this.style.Station.StationControl.veryControlButton.defaultColor + } + }); + } this.add(this.veryControlButton); + if (this.style.Station.StationControl.veryControlButton && this.style.Station.StationControl.veryControlButton.border) { + const borderLine = this.style.Station.StationControl.veryControlButton.borderLine || 1; + const width = this.style.Station.StationControl.lamp.radiusR * 2; + const leftUpX = computedControlModePoint.x + this.style.Station.StationControl.lamp.distance * 3 / 2 + this.style.Station.StationControl.veryControlButton.offset.x - this.style.Station.StationControl.lamp.radiusR; + const leftUpY = computedControlModePoint.y + this.style.Station.StationControl.veryControlButton.offset.y - this.style.Station.StationControl.lamp.radiusR; + this.leftBoard = new Line({ + zlevel: this.zlevel, + z: this.z + 2, + shape: { + x1: leftUpX - (borderLine - 1), + y1: leftUpY - (borderLine - 1), + x2: leftUpX - (borderLine - 1), + y2: leftUpY + width + (borderLine - 1) + }, + style: { + lineWidth: borderLine, + stroke: '#FFFFFF' + } + }); + this.add(this.leftBoard); + this.rightBoard = new Line({ + zlevel: this.zlevel, + z: this.z + 1, + shape: { + x1: leftUpX + width + (borderLine - 1), + y1: leftUpY - (borderLine - 1), + x2: leftUpX + width + (borderLine - 1), + y2: leftUpY + width + (borderLine - 1) + }, + style: { + lineWidth: borderLine, + stroke: '#A0A0A0' + } + }); + this.add(this.rightBoard); + this.bottomBoard = new Line({ + zlevel: this.zlevel, + z: this.z + 1, + shape: { + x1: leftUpX + (borderLine - 1), + y1: leftUpY + width - (borderLine - 1), + x2: leftUpX + width + (borderLine - 1), + y2: leftUpY + width + (borderLine - 1) + }, + style: { + lineWidth: borderLine, + stroke: '#A0A0A0' + } + }); + this.add(this.bottomBoard); + this.topBoard = new Line({ + zlevel: this.zlevel, + z: this.z + 1, + shape: { + x1: leftUpX - (borderLine - 1), + y1: leftUpY - (borderLine - 1), + x2: leftUpX + width + (borderLine - 1), + y2: leftUpY - (borderLine - 1) + }, + style: { + lineWidth: borderLine, + stroke: '#FFFFFF' + } + }); + this.add(this.topBoard); + } this.veryControlButtonText = new Text({ zlevel: this.zlevel, z: this.z, @@ -794,6 +897,12 @@ export default class Station extends Group { this.interconnectedControl && this.interconnectedControl.setTextColor(this.style.Station.StationControl.lamp.purpleColor); this.veryControl && this.veryControl.setColor(this.style.Station.StationControl.veryControl.lightColor); this.veryControlButton && this.veryControlButton.setStyle({ fill: this.style.Station.StationControl.veryControlButton.lightColor }); + if (this.style.Station.StationControl.veryControlButton && this.style.Station.StationControl.veryControlButton.border) { + this.leftBoard && this.leftBoard.setStyle('stroke', '#A0A0A0'); + this.topBoard && this.topBoard.setStyle('stroke', '#A0A0A0'); + this.rightBoard && this.rightBoard.setStyle('stroke', '#FFFFFF'); + this.bottomBoard && this.bottomBoard.setStyle('stroke', '#FFFFFF'); + } } handleNone() { // 空 @@ -834,6 +943,16 @@ export default class Station extends Group { } else { this.stationText && this.stationText.stopAnimate(); } + if (this.style.Station.StationControl.veryControlButton && this.style.Station.StationControl.veryControlButton.border) { + this.leftBoard && this.leftBoard.setStyle('stroke', '#FFFFFF'); + this.topBoard && this.topBoard.setStyle('stroke', '#FFFFFF'); + this.rightBoard && this.rightBoard.setStyle('stroke', '#A0A0A0'); + this.bottomBoard && this.bottomBoard.setStyle('stroke', '#A0A0A0'); + this.leftBoard && this.leftBoard.show(); + this.rightBoard && this.rightBoard.show(); + this.topBoard && this.topBoard.show(); + this.bottomBoard && this.bottomBoard.show(); + } } // 设置状态 @@ -881,6 +1000,19 @@ export default class Station extends Group { } }); } + if (model.counter) { + for (const deviceCode in model.counter) { + const device = store.getters['map/getDeviceByCode'](deviceCode); + let countNum = model.counter[deviceCode] + ''; + if (countNum.length === 1) { + countNum = '00' + countNum; + } else if (countNum.length === 2) { + countNum = '0' + countNum; + } + device && device.instance && device.instance.setCount(countNum); + } + } + } } handlePreResetLamp() { @@ -915,9 +1047,7 @@ export default class Station extends Group { } handleComplexControl(controller) { - // const controller = model.controller; const memberData = store.state.training.memberData; - // console.log(controller, memberData[controller], memberData[controller].userId, store.state.user.id, '88888888'); if (memberData[controller].userId && memberData[controller].userId == store.state.user.id) { this.stationText.setColor(this.style.Station.stationText.currentModeColor); } else { @@ -925,7 +1055,6 @@ export default class Station extends Group { this.stationText.setColor(this.style.Station.stationText.dispatherColor); } else if (memberData[controller].type == 'STATION_SUPERVISOR') { const deviceCode = memberData[controller].deviceCode; - // console.log(deviceCode, '999999999'); if (deviceCode) { const device = store.getters['map/getDeviceByCode'](deviceCode); if (device.centralized) { diff --git a/src/jmapNew/shape/graph/Switch/index.js b/src/jmapNew/shape/graph/Switch/index.js index 36b36e2e1..3657c219a 100644 --- a/src/jmapNew/shape/graph/Switch/index.js +++ b/src/jmapNew/shape/graph/Switch/index.js @@ -479,24 +479,31 @@ export default class Switch extends Group { .when(500, { stroke: '#F00' }) .when(1000, { stroke: this.style.backgroundColor }) .start(); + if (this.style.Switch.jointImg.loseNameFlash) { + this.name.getNameText().animateStyle(true) + .when(0, { textFill: this.style.backgroundColor }) + .when(1000, { textFill: this.style.Switch.text.lossColor }) + .when(2000, { textFill: this.style.backgroundColor }) + .start(); + } } // N-定位 R-反位 NO-无(失表) EX-挤叉 setSwitchFault(model) { - const { pos, fault, /* 单锁 */singleLock, /* 封锁 */blockade } = model + const { pos, fault, /* 单锁 */singleLock, /* 封锁 */blockade } = model; const faultList = ['SPLIT', 'SQUEEZE', 'NORMAL_SPLIT', 'REVERSE_SPLIT', 'SPLIT_1']; if (this.model.switchFaultCode) { const switchFault = this.mapDevice[this.model.switchFaultCode]; if (this.style.SwitchFault.lamp.switchState) { - 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 === 'NO') switchFault.instance.setControlColor(this.style.SwitchFault.lamp.switchingColor) - else if (pos === 'EX') switchFault.instance.setControlColor(this.style.SwitchFault.lamp.faultColor) - if (singleLock) switchFault.instance.setControlColor(this.style.SwitchFault.lamp.lockColor) - if (blockade === 'EX') switchFault.instance.setControlColor(this.style.SwitchFault.lamp.blockColor) + 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 === 'NO') switchFault.instance.setControlColor(this.style.SwitchFault.lamp.switchingColor); + else if (pos === 'EX') switchFault.instance.setControlColor(this.style.SwitchFault.lamp.faultColor); + if (singleLock) switchFault.instance.setControlColor(this.style.SwitchFault.lamp.lockColor); + if (blockade === 'EX') switchFault.instance.setControlColor(this.style.SwitchFault.lamp.blockColor); } else { if ( fault && faultList.includes(fault) ) { switchFault.instance.setControlColor('#F00', true); - } else { + } else { switchFault.instance.setControlColor(this.style.backgroundColor, false); } } @@ -545,6 +552,13 @@ export default class Switch extends Group { } else { this.setLossAction(fault); // 若不是具有特殊的挤岔,则显示状态和失表一样 } + if (this.style.Switch.jointImg.loseNameFlash) { + this.name.getNameText().animateStyle(true) + .when(0, { textFill: this.style.backgroundColor }) + .when(1000, { textFill: this.style.Switch.text.lossColor }) + .when(2000, { textFill: this.style.backgroundColor }) + .start(); + } } /** 单锁*/ diff --git a/src/jmapNew/shape/graph/element/EControl.js b/src/jmapNew/shape/graph/element/EControl.js index c9cb12aa4..9ce8c7864 100644 --- a/src/jmapNew/shape/graph/element/EControl.js +++ b/src/jmapNew/shape/graph/element/EControl.js @@ -13,12 +13,12 @@ export default class EControl extends Group { this.z = model.z; this.style = model.style; this.textStyle = model.text; - this.controlStyle = model.control; + this.controlStyle = model.control || model.arc; this.create(); } create() { - this.control = this.controlStyle.isSquare ? new Rect({ + this.control = this.controlStyle && this.controlStyle.isSquare ? new Rect({ _subType: this.controlStyle.subType, zlevel: this.zlevel, z: this.z, @@ -26,7 +26,7 @@ export default class EControl extends Group { width: this.controlStyle.shape.r, height: this.controlStyle.shape.r, x: this.controlStyle.shape.cx - this.controlStyle.shape.r / 2, - y: this.controlStyle.shape.cy - this.controlStyle.shape.r / 2, + y: this.controlStyle.shape.cy - this.controlStyle.shape.r / 2 }, style: { lineWidth: this.controlStyle.lineWidth, diff --git a/src/jmapNew/shape/graph/index.js b/src/jmapNew/shape/graph/index.js index 7260b670e..0ce89fc8f 100644 --- a/src/jmapNew/shape/graph/index.js +++ b/src/jmapNew/shape/graph/index.js @@ -87,6 +87,9 @@ mapShape[deviceType.DepartAssist] = SaidLamp; mapShape[deviceType.TotalAssist] = SaidLamp; mapShape[deviceType.AssistStatus] = SaidLamp; mapShape[deviceType.SectionOccupied] = SaidLamp; +mapShape[deviceType.ThroatRoute] = SaidLamp; +mapShape[deviceType.NoStatusLamp] = SaidLamp; +mapShape[deviceType.Counter] = SaidLamp; mapShape[deviceType.SplitStation] = SplitStation; mapShape[deviceType.Arrow] = Arrow; mapShape[deviceType.Power] = Power; diff --git a/src/jmapNew/shape/systemGraph/Arrow/index.js b/src/jmapNew/shape/systemGraph/Arrow/index.js index c5da95478..f9ce4b30d 100644 --- a/src/jmapNew/shape/systemGraph/Arrow/index.js +++ b/src/jmapNew/shape/systemGraph/Arrow/index.js @@ -13,7 +13,6 @@ export default class Arrow extends Group { this.isShowShape = true; this.create(); this.setState(model); - this.setShowMode(); } create() { @@ -44,16 +43,7 @@ export default class Arrow extends Group { setState(model) { if (!this.isShowShape) return; } - // 设置显示模式 - setShowMode() { - const showMode = this.model.showMode; - const showConditions = this.model.showConditions; - if (!showConditions || showConditions === '01' || showMode === showConditions) { - this.arrow.show(); - } else { - this.arrow.hide(); - } - } + setShowStation(stationCode) { if (!stationCode || this.model.stationCode === stationCode) { this.show(); diff --git a/src/jmapNew/shape/systemGraph/Line/index.js b/src/jmapNew/shape/systemGraph/Line/index.js index a76c0d719..066448e02 100644 --- a/src/jmapNew/shape/systemGraph/Line/index.js +++ b/src/jmapNew/shape/systemGraph/Line/index.js @@ -14,7 +14,6 @@ export default class Line2 extends Group { this.isShowShape = true; this.create(); this.setState(model); - this.setShowMode(); } create() { @@ -115,18 +114,6 @@ export default class Line2 extends Group { if (!this.isShowShape) return; this.setLineType(model.type); } - // 设置显示模式 - setShowMode() { - const showMode = this.model.showMode; - const showConditions = this.model.showConditions; - if (!showConditions || showConditions === '01' || showMode === showConditions) { - this.segment && this.segment.show(); - this.viceSegment && this.viceSegment.show(); - } else { - this.segment && this.segment.hide(); - this.viceSegment && this.viceSegment.hide(); - } - } setShowStation(stationCode) { if (!stationCode || this.model.stationCode === stationCode) { this.segment && this.segment.show(); diff --git a/src/jmapNew/shape/systemGraph/Rect/index.js b/src/jmapNew/shape/systemGraph/Rect/index.js index bee2233fe..41edfaf09 100644 --- a/src/jmapNew/shape/systemGraph/Rect/index.js +++ b/src/jmapNew/shape/systemGraph/Rect/index.js @@ -16,7 +16,6 @@ export default class Rect2 extends Group { this.isShowShape = true; this.create(); this.setState(model); - this.setShowMode(); } create() { @@ -50,10 +49,7 @@ export default class Rect2 extends Group { return new BoundingRect(this.model.position.x, this.model.position.y, 0, 0); } } - // 设置显示模式 - setShowMode() { - } setShowStation(stationCode) { } diff --git a/src/jmapNew/shape/systemGraph/Text/index.js b/src/jmapNew/shape/systemGraph/Text/index.js index 8670a567d..1504e7315 100644 --- a/src/jmapNew/shape/systemGraph/Text/index.js +++ b/src/jmapNew/shape/systemGraph/Text/index.js @@ -16,7 +16,6 @@ export default class Text2 extends Group { this.isBigScreen = false; this.create(); this.setState(model); - this.setShowMode(); } create() { @@ -54,20 +53,7 @@ export default class Text2 extends Group { return new BoundingRect(this.model.position.x, this.model.position.y, 0, 0); } } - // 设置显示模式 - setShowMode() { - const showMode = this.model.showMode; - if (showMode == '04') { - this.text && this.text.hide(); - return; - } - const showConditions = this.model.showConditions; - if (!showConditions || showConditions === '01' || showMode === showConditions) { - this.text && this.text.show(); - } else { - this.text && this.text.hide(); - } - } + setShowStation(stationCode) { if (!stationCode || this.model.stationCode === stationCode) { this.eachChild(item => { diff --git a/src/jmapNew/theme/beijing_01/menus/menuTrain.vue b/src/jmapNew/theme/beijing_01/menus/menuTrain.vue index 61852ce0b..bcd4c2205 100644 --- a/src/jmapNew/theme/beijing_01/menus/menuTrain.vue +++ b/src/jmapNew/theme/beijing_01/menus/menuTrain.vue @@ -38,7 +38,7 @@ import TrainFlag from './dialog/trainFlag'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import SpeedLimit from '@/jmapNew/theme/components/menus/dialog/trainSpeedLimit'; -import { menuOperate, commitOperate, commitTrainSend } from '@/jmapNew/theme/components/utils/menuOperate'; +import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate'; // import CMD from '@/scripts/cmdPlugin/CommandEnum'; export default { @@ -230,18 +230,18 @@ export default { } ], menuDirective: [ - { - label: '确认运行至前方站', - handler: this.nextStation - }, - { - label: '越引导信号行驶', - handler: this.handleOverFuideSignal - }, - { - label: '越红灯行驶', - handler: this.handleOverEedLight - }, + // { + // label: '确认运行至前方站', + // handler: this.nextStation + // }, + // { + // label: '越引导信号行驶', + // handler: this.handleOverFuideSignal + // }, + // { + // label: '越红灯行驶', + // handler: this.handleOverEedLight + // }, { label: '开关门', handler: this.handleOpenOrCloseDoor @@ -381,39 +381,21 @@ export default { this.$store.dispatch('training/setTriggerFaultCount', this.selected); }, nextStation() { - const group = this.$route.query.group; - const param = { - commandType: 'Drive_Ahead', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate})=>{ + commitOperate(menuOperate.Driver.driveAhead, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handleOverFuideSignal() { - const group = this.$route.query.group; - const param = { - commandType: 'Drive_Through_The_Guide_Signal', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate})=>{ + commitOperate(menuOperate.Driver.driveThroughTheGuideSignal, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handleOverEedLight() { - const group = this.$route.query.group; - const param = { - commandType: 'Drive_Through_The_Red_Light', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate})=>{ + commitOperate(menuOperate.Driver.driveThroughTheRedLight, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); @@ -421,13 +403,7 @@ export default { }, // 开关门 handleOpenOrCloseDoor() { - const group = this.$route.query.group; - const param = { - commandType: 'Open_Or_Close_Door', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate}) => { + commitOperate(menuOperate.Driver.openOrCloseDoor, { groupNumber: this.selected.code }, 3).then(({valid, operate}) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); @@ -438,13 +414,7 @@ export default { }, // 回库 setInbound() { - const group = this.$route.query.group; - const param = { - commandType: 'Inbound', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate}) => { + commitOperate(menuOperate.Driver.inbound, { groupNumber: this.selected.code }, 3).then(({valid, operate}) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); @@ -460,78 +430,42 @@ export default { }, // 换端 handleTurnDirection() { - const group = this.$route.query.group; - const param = { - commandType: 'Turn_Direction', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate}) => { + commitOperate(menuOperate.Train.turnDirection, { groupNumber: this.selected.code }, 3).then(({valid, operate}) => { }).catch((error)=> { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplyAmcMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'AM_C' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'AM_C' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplySmcMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'SM_C' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'SM_C' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplyAmiMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'AM_I' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'AM_I' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplySmiMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'SM_I' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'SM_I' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplyRmMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'RM' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'RM' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); diff --git a/src/jmapNew/theme/chengdu_01/menus/menuTrain.vue b/src/jmapNew/theme/chengdu_01/menus/menuTrain.vue index c4c77eec2..3a83f1f7d 100644 --- a/src/jmapNew/theme/chengdu_01/menus/menuTrain.vue +++ b/src/jmapNew/theme/chengdu_01/menus/menuTrain.vue @@ -143,18 +143,18 @@ export default { } ], menuDirective: [ - { - label: '确认运行至前方站', - handler: this.nextStation - }, - { - label: '越引导信号行驶', - handler: this.handleOverFuideSignal - }, - { - label: '越红灯行驶', - handler: this.handleOverEedLight - }, + // { + // label: '确认运行至前方站', + // handler: this.nextStation + // }, + // { + // label: '越引导信号行驶', + // handler: this.handleOverFuideSignal + // }, + // { + // label: '越红灯行驶', + // handler: this.handleOverEedLight + // }, { label: '开关门', handler: this.handleOpenOrCloseDoor @@ -291,39 +291,21 @@ export default { this.$store.dispatch('training/setTriggerFaultCount', this.selected); }, nextStation() { - const group = this.$route.query.group; - const param = { - commandType: 'Drive_Ahead', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate})=>{ + commitOperate(menuOperate.Driver.driveAhead, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handleOverFuideSignal() { - const group = this.$route.query.group; - const param = { - commandType: 'Drive_Through_The_Guide_Signal', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate})=>{ + commitOperate(menuOperate.Driver.driveThroughTheGuideSignal, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handleOverEedLight() { - const group = this.$route.query.group; - const param = { - commandType: 'Drive_Through_The_Red_Light', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate})=>{ + commitOperate(menuOperate.Driver.driveThroughTheRedLight, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); @@ -331,13 +313,7 @@ export default { }, // 开关门 handleOpenOrCloseDoor() { - const group = this.$route.query.group; - const param = { - commandType: 'Open_Or_Close_Door', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate}) => { + commitOperate(menuOperate.Driver.openOrCloseDoor, { groupNumber: this.selected.code }, 3).then(({valid, operate}) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); @@ -356,13 +332,7 @@ export default { }, // 回库 setInbound() { - const group = this.$route.query.group; - const param = { - commandType: 'Inbound', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate}) => { + commitOperate(menuOperate.Driver.inbound, { groupNumber: this.selected.code }, 3).then(({valid, operate}) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); @@ -370,78 +340,42 @@ export default { }, // 换端 handleTurnDirection() { - const group = this.$route.query.group; - const param = { - commandType: 'Turn_Direction', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate}) => { + commitOperate(menuOperate.Train.turnDirection, { groupNumber: this.selected.code }, 3).then(({valid, operate}) => { }).catch((error)=> { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplyAmcMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'AM_C' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'AM_C' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplySmcMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'SM_C' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'SM_C' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplyAmiMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'AM_I' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'AM_I' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplySmiMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'SM_I' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'SM_I' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplyRmMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'RM' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitTrainSend(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'RM' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); diff --git a/src/jmapNew/theme/chengdu_03/menus/menuTrain.vue b/src/jmapNew/theme/chengdu_03/menus/menuTrain.vue index 13e535c27..8754f070f 100644 --- a/src/jmapNew/theme/chengdu_03/menus/menuTrain.vue +++ b/src/jmapNew/theme/chengdu_03/menus/menuTrain.vue @@ -29,7 +29,7 @@ import CancelMouseState from '@/mixin/CancelMouseState'; import CMD from '@/scripts/cmdPlugin/CommandEnum'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; -import { menuOperate, commitOperate, commitTrainSend } from '@/jmapNew/theme/components/utils/menuOperate'; +import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate'; import SpeedLimit from '@/jmapNew/theme/components/menus/dialog/trainSpeedLimit'; export default { @@ -126,18 +126,18 @@ export default { } ], menuDirective: [ - { - label: '确认运行至前方站', - handler: this.nextStation - }, - { - label: '越引导信号行驶', - handler: this.handleOverFuideSignal - }, - { - label: '越红灯行驶', - handler: this.handleOverEedLight - }, + // { + // label: '确认运行至前方站', + // handler: this.nextStation + // }, + // { + // label: '越引导信号行驶', + // handler: this.handleOverFuideSignal + // }, + // { + // label: '越红灯行驶', + // handler: this.handleOverEedLight + // }, { label: '开关门', handler: this.handleOpenOrCloseDoor @@ -262,39 +262,21 @@ export default { this.$store.dispatch('training/setTriggerFaultCount', this.selected); }, nextStation() { - const group = this.$route.query.group; - const param = { - commandType: 'Drive_Ahead', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate})=>{ + commitOperate(menuOperate.Driver.driveAhead, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handleOverFuideSignal() { - const group = this.$route.query.group; - const param = { - commandType: 'Drive_Through_The_Guide_Signal', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate})=>{ + commitOperate(menuOperate.Driver.driveThroughTheGuideSignal, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handleOverEedLight() { - const group = this.$route.query.group; - const param = { - commandType: 'Drive_Through_The_Red_Light', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate})=>{ + commitOperate(menuOperate.Driver.driveThroughTheRedLight, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); @@ -302,13 +284,7 @@ export default { }, // 开关门 handleOpenOrCloseDoor() { - const group = this.$route.query.group; - const param = { - commandType: 'Open_Or_Close_Door', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate}) => { + commitOperate(menuOperate.Driver.openOrCloseDoor, { groupNumber: this.selected.code }, 3).then(({valid, operate}) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); @@ -327,13 +303,7 @@ export default { }, // 回库 setInbound() { - const group = this.$route.query.group; - const param = { - commandType: 'Inbound', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate}) => { + commitOperate(menuOperate.Driver.inbound, { groupNumber: this.selected.code }, 3).then(({valid, operate}) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); @@ -341,78 +311,42 @@ export default { }, // 换端 handleTurnDirection() { - const group = this.$route.query.group; - const param = { - commandType: 'Turn_Direction', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate}) => { + commitOperate(menuOperate.Train.turnDirection, { groupNumber: this.selected.code }, 3).then(({valid, operate}) => { }).catch((error)=> { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplyAmcMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'AM_C' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'AM_C' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplySmcMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'SM_C' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'SM_C' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplyAmiMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'AM_I' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'AM_I' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplySmiMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'SM_I' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'SM_I' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplyRmMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'RM' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'RM' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); diff --git a/src/jmapNew/theme/components/menus/dialog/setFault.vue b/src/jmapNew/theme/components/menus/dialog/setFault.vue index ce093d2d8..93200a45d 100644 --- a/src/jmapNew/theme/components/menus/dialog/setFault.vue +++ b/src/jmapNew/theme/components/menus/dialog/setFault.vue @@ -23,11 +23,13 @@ - + - 越红灯行驶 - 越引导行驶 - + 越红灯行驶
+ 越引导行驶
+ 运行至前方车站
+ 进路闭塞法行车
+
diff --git a/src/jmapNew/theme/components/utils/menuOperate.js b/src/jmapNew/theme/components/utils/menuOperate.js index b8b53b994..d35626233 100644 --- a/src/jmapNew/theme/components/utils/menuOperate.js +++ b/src/jmapNew/theme/components/utils/menuOperate.js @@ -537,6 +537,73 @@ export const menuOperate = { cmdType: CMD.Driver.CMD_DRIVER_CHANGE_HEAD } }, + Driver: { + // 驾驶至 + driveAhead: { + operation: OperationEvent.Driver.driveAhead.menu.operation, + cmdType: CMD.Driver.CMD_DRIVE_AHEAD + }, + // 进路闭塞法行车 + routeBlockDrive: { + operation: OperationEvent.Driver.routeBlockDrive.menu.operation, + cmdType: CMD.Driver.CMD_ROUTE_BLOCK_DRIVE + }, + // 越红灯行驶 + driveThroughTheRedLight: { + operation: OperationEvent.Driver.driveThroughTheRedLight.menu.operation, + cmdType: CMD.Driver.CMD_DRIVE_THROUGH_THE_RED_LIGHT + }, + // 越引导信号行驶 + driveThroughTheGuideSignal: { + operation: OperationEvent.Driver.driveThroughTheGuideSignal.menu.operation, + cmdType: CMD.Driver.CMD_DRIVE_THROUGH_THE_GUIDE_SIGNAL + }, + // 开关门 + openOrCloseDoor: { + operation: OperationEvent.Driver.openOrCloseDoor.menu.operation, + cmdType: CMD.Driver.CMD_OPEN_OR_CLOSE_DOOR + }, + // 设置限速 + setSpeedLimit: { + operation: OperationEvent.Driver.setSpeedLimit.menu.operation, + cmdType: CMD.Driver.CMD_SET_SPEED_LIMIT + }, + // 换端 + // turnDirection: { + // operation: OperationEvent.Driver.turnDirection.menu.operation, + // cmdType: CMD.Driver.CMD_TURN_DIRECTION + // }, + // 驾驶至 + driveTo: { + operation: OperationEvent.Driver.driveTo.menu.operation, + cmdType: CMD.Driver.CMD_DRIVE_TO + }, + // 回库 + inbound: { + operation: OperationEvent.Driver.inbound.menu.operation, + cmdType: CMD.Driver.CMD_INBOUND + }, + // 修改预选模式 + changePreselectionMode: { + operation: OperationEvent.Driver.changePreselectionMode.menu.operation, + cmdType: CMD.Driver.CMD_CHANGE_PRESELECTION_MODE + }, + // 转NRM模式 + applyNrm: { + operation: OperationEvent.Driver.applyNrm.menu.operation, + cmdType: CMD.Driver.CMD_APPLY_NRM + }, + // 发车 + departTrain: { + operation: OperationEvent.Driver.departTrain.menu.operation, + cmdType: CMD.Driver.CMD_DEPART_TRAIN + }, + // 停车 + parkingTrain: { + operation: OperationEvent.Driver.parkingTrain.menu.operation, + cmdType: CMD.Driver.CMD_PARKING_TRAIN + } + }, CTC: { // 完成接预 receivingNotice: { @@ -687,8 +754,14 @@ export const menuOperate = { // 增加列车固定径路 addTrainFixedPath:{ operation: OperationEvent.CTCCommand.addTrainFixedPath.menu.operation, - cmdType: CMD.CTC.CTC_ADD_RUN_PLAN_LIST_TO_EDIT_AREA + cmdType: CMD.CTC.CTC_REGULAR_TRAIN_LINE_EDIT }, + // 批量增加列车固定径路 + batchTrainFixedPath:{ + operation: OperationEvent.CTCCommand.batchTrainFixedPath.menu.operation, + cmdType: CMD.CTC.CTC_REGULAR_TRAIN_LINE_BATCH + }, + // 导入列车固定径路 importTrainFixedPath:{ operation: OperationEvent.CTCCommand.importTrainFixedPath.menu.operation, @@ -697,12 +770,52 @@ export const menuOperate = { // 删除列车固定径路 deleteTrainFixedPath:{ operation: OperationEvent.CTCCommand.deleteTrainFixedPath.menu.operation, - cmdType: CMD.CTC.CTC_REMOVE_RUN_PLAN_FROM_EDIT_AREA + cmdType: CMD.CTC.CTC_REGULAR_TRAIN_LINE_DELETE }, - // 运行计划发布至CTC + // 清空列车固定径路 + clearTrainFixedPath:{ + operation: OperationEvent.CTCCommand.clearTrainFixedPath.menu.operation, + cmdType: CMD.CTC.CTC_REGULAR_TRAIN_LINE_CLEAR + }, + // 列车固定径路发布生效区 releaseTrainFixedPath:{ operation: OperationEvent.CTCCommand.releaseTrainFixedPath.menu.operation, - cmdType: CMD.CTC.CTC_RELEASE_RUN_PLAN_TO_SIMULATION + cmdType: CMD.CTC.CTC_REGULAR_TRAIN_LINE_PUBLISH + }, + // 获取股道列表 + getStationTrack:{ + operation: OperationEvent.CTCCommand.getStationTrack.menu.operation, + cmdType: CMD.CTC.CTC_STATION_DETAIL_LIST + }, + // 修改股道信息 + modifyStationTrack:{ + operation: OperationEvent.CTCCommand.modifyStationTrack.menu.operation, + cmdType: CMD.CTC.CTC_STATION_DETAIL_EDIT + }, + // 股道发布生效区 + releaseStationTrack:{ + operation: OperationEvent.CTCCommand.releaseStationTrack.menu.operation, + cmdType: CMD.CTC.CTC_STATION_DETAIL_PUBLISH + }, + // 获取固定列车径路列表 + getTrainFixedPath:{ + operation: OperationEvent.CTCCommand.getTrainFixedPath.menu.operation, + cmdType: CMD.CTC.CTC_REGULAR_TRAIN_LINE_LIST + }, + // 获取出入口列表 + getStationDirection:{ + operation: OperationEvent.CTCCommand.getStationDirection.menu.operation, + cmdType: CMD.CTC.CTC_STATION_IO_GATE_LIST + }, + // 修改出入口 + modifyStationDirection:{ + operation: OperationEvent.CTCCommand.modifyStationDirection.menu.operation, + cmdType: CMD.CTC.CTC_STATION_IO_GATE_EDIT + }, + // 出入口发布生效区 + releaseStationDirection:{ + operation: OperationEvent.CTCCommand.releaseStationDirection.menu.operation, + cmdType: CMD.CTC.CTC_STATION_IO_GATE_PUBLISH }, setRoute: { operation: OperationEvent.CTCCommand.setRoute.menu.operation, diff --git a/src/jmapNew/theme/datie_01/menus/menuTrain.vue b/src/jmapNew/theme/datie_01/menus/menuTrain.vue index 4f9b2ae38..215595047 100644 --- a/src/jmapNew/theme/datie_01/menus/menuTrain.vue +++ b/src/jmapNew/theme/datie_01/menus/menuTrain.vue @@ -28,7 +28,7 @@ import CancelMouseState from '@/mixin/CancelMouseState'; import CMD from '@/scripts/cmdPlugin/CommandEnum'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; -import { menuOperate, commitOperate, commitTrainSend } from '@/jmapNew/theme/components/utils/menuOperate'; +import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate'; export default { name: 'MenuTrain', @@ -123,22 +123,22 @@ export default { } ], menuDirective: [ - { - label: '确认运行至前方站', - handler: this.nextStation - }, - { - label: '进路闭塞法行车', - handler: this.routeBlockRun - }, - { - label: '越引导信号行驶', - handler: this.handleOverFuideSignal - }, - { - label: '越红灯行驶', - handler: this.handleOverEedLight - } + // { + // label: '确认运行至前方站', + // handler: this.nextStation + // }, + // { + // label: '进路闭塞法行车', + // handler: this.routeBlockRun + // } + // { + // label: '越引导信号行驶', + // handler: this.handleOverFuideSignal + // }, + // { + // label: '越红灯行驶', + // handler: this.handleOverEedLight + // } ], menuSpeed: [ { @@ -218,52 +218,28 @@ export default { this.$store.dispatch('training/setTriggerFaultCount', this.selected); }, nextStation() { - const group = this.$route.query.group; - const param = { - commandType: 'Drive_Ahead', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate})=>{ + commitOperate(menuOperate.Driver.driveAhead, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, routeBlockRun() { - const group = this.$route.query.group; - const param = { - commandType: 'Route_Block_Drive', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate})=>{ + commitOperate(menuOperate.Driver.routeBlockDrive, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handleOverFuideSignal() { - const group = this.$route.query.group; - const param = { - commandType: 'Drive_Through_The_Guide_Signal', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate})=>{ + commitOperate(menuOperate.Driver.driveThroughTheGuideSignal, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handleOverEedLight() { - const group = this.$route.query.group; - const param = { - commandType: 'Drive_Through_The_Red_Light', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate})=>{ + commitOperate(menuOperate.Driver.driveThroughTheRedLight, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); diff --git a/src/jmapNew/theme/datie_02/menus/components/menu.vue b/src/jmapNew/theme/datie_02/menus/components/menu.vue new file mode 100644 index 000000000..2bee15e49 --- /dev/null +++ b/src/jmapNew/theme/datie_02/menus/components/menu.vue @@ -0,0 +1,77 @@ + + + + + diff --git a/src/jmapNew/theme/datie_02/menus/dialog/boardViewSetting.vue b/src/jmapNew/theme/datie_02/menus/dialog/boardViewSetting.vue new file mode 100644 index 000000000..7d8201a82 --- /dev/null +++ b/src/jmapNew/theme/datie_02/menus/dialog/boardViewSetting.vue @@ -0,0 +1,339 @@ + + + + + diff --git a/src/jmapNew/theme/datie_02/menus/dialog/childDialog/passwordInputBox.vue b/src/jmapNew/theme/datie_02/menus/dialog/childDialog/passwordInputBox.vue index eec77511b..03c8e7432 100644 --- a/src/jmapNew/theme/datie_02/menus/dialog/childDialog/passwordInputBox.vue +++ b/src/jmapNew/theme/datie_02/menus/dialog/childDialog/passwordInputBox.vue @@ -1,20 +1,20 @@ + + diff --git a/src/jmapNew/theme/datie_02/menus/index.vue b/src/jmapNew/theme/datie_02/menus/index.vue index 550d390de..a3f33f84c 100644 --- a/src/jmapNew/theme/datie_02/menus/index.vue +++ b/src/jmapNew/theme/datie_02/menus/index.vue @@ -37,6 +37,19 @@
提示信息窗
{{ '操控A:主机' + ' ' + dateString + ' ' + time }}
+
+
{{ tipContent.time+": "+tipContent.message }}
+
+
+
+
联锁I
+
联锁II
+
操作A
+
操作B
+
维修机
+
+
+
@@ -108,6 +121,7 @@ import CtcBarIcon18 from '@/assets/ctc_icon/pic18.png'; import cmdManage from '@/views/dispatcherStationManage/cmdManage.vue'; import signedCmd from '@/views/dispatcherStationManage/signedCmd.vue'; import {getRunplanInStation} from '@/api/runplan'; +import { deviceFaultType, deviceType} from '@/scripts/cmdPlugin/Config'; export default { name: 'Menus', @@ -163,6 +177,7 @@ export default { { id: 6, message: '这是预警信息六' }, { id: 7, message: '这是预警信息七' } ], + tipContentList:[], time: '00:00:00', dateString: '', dateString1: '', @@ -238,6 +253,24 @@ export default { const text = station.name + msg.arriveRunPlan.tripNumber + '次发车预告'; this.speechSynthesis(text); }); + }, + '$store.state.socket.simulationAlarmInfo': function(val) { + (val || []).forEach(item => { + if (!item.confirmed) { + const device = this.$store.getters['map/getDeviceByCode'](item.deviceCode); + let fault = ''; + deviceFaultType[device._type].forEach(deviceFault=>{ + if (deviceFault.value == item.description) { + fault = deviceFault.label; + } + }); + if ( item.description == 'FAULT_LOCK' ) { fault = '故障锁闭'; } + this.tipContentList.push({time:item.time, message:deviceType[device._type] + (device.name || device.groupNumber) + fault}); + if (this.tipContentList.length > 15) { + this.tipContentList.shift(); + } + } + }); } // // 地图加载完成 // '$store.state.map.mapViewLoadedCount': function (val) { // 地图数据加载完成 @@ -272,6 +305,12 @@ export default { this.$store.dispatch('map/setPictureDeviceMap', {}); }, methods: { + changeSignedStatus(info) { + this.$refs.cmdManage.changeSignedStatus(info); + }, + signedCmdClose() { + this.$refs.cmdManage.doShow(); + }, getRunplanInStationData() { getRunplanInStation(this.group).then(response => { // debugger; @@ -354,9 +393,23 @@ export default { for (const key in mapDevice) { list.push(mapDevice[key]); } - this.$jlmap.updateShowStation(list, this.$store.state.map.showCentralizedStationCode || this.showCentralizedStationCode); - this.$jlmap.setCenter(this.$store.state.map.showCentralizedStationCode || this.showCentralizedStationCode); - this.$jlmap.updateTransform(map.scaling, map.origin); + if (this.$store.state.map.map && this.$store.state.map.map.pictureList) { + const picture = this.$store.state.map.map.pictureList.find(picture => picture.stationCode === this.showCentralizedStationCode && picture.type === 'chainStation'); + if (picture) { + this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap); + const deviceList = []; + const mapDevice = this.$store.state.map.mapDevice; + for (const deviceCode in mapDevice) { + deviceList.push(deviceCode); + } + this.$jlmap.updatePicture(deviceList); + this.$jlmap.updateTransform(picture.scaling, picture.origin); + } + } else { + this.$jlmap.updateShowStation(list, this.$store.state.map.showCentralizedStationCode || this.showCentralizedStationCode); + this.$jlmap.setCenter(this.$store.state.map.showCentralizedStationCode || this.showCentralizedStationCode); + this.$jlmap.updateTransform(map.scaling, map.origin); + } }, getRailwaySimulationRunplanSend() { const stationCode = this.$store.state.training.roleDeviceCode; @@ -973,4 +1026,70 @@ export default { 50% {background:#ff1900;} 100% {background:#f0f0f0;} } + .simulationAlarmInfo{ + position: absolute; + width: 320px; + background: #cb204d; + height: 100px; + z-index: 2; + top: 50px; + left: 10px; + padding: 5px; + overflow:auto; + } + .eachTipContent{margin-top:5px;font-size:14px;} + + .simulationAlarmInfo::-webkit-scrollbar { + width: 5px; + } + .simulationAlarmInfo::-webkit-scrollbar-thumb { + border-radius: 10px; + background: #c3c3c3; + } + + .simulationAlarmInfo::-webkit-scrollbar-track { + border-radius: 0; + background: #cb204d; + } + .simulationTellInfo{ + position: absolute; + width: 328px; + top: 50px; + right: 10px; + padding: 0px 0px 0px 0px; + overflow: auto; + background: #c3c3c3; + z-index: 2; + display: inline-block; + font-size: 0; + } + .simulationDeviceInfo{ + position: absolute; + width: 328px; + height: 100px; + top: 83px; + right:10px; + padding: 5px; + overflow:auto; + background: #c3c3c3; + z-index: 2; + } + .simulationTellInfoTop{ + display: inline-block; + font-size: 0; + } + .simulationTellInfoTopEach{ + padding: 6px 11px; + display: inline-block; + background: #dedede; + font-size: 15px; + border-top:2px #9c868b solid; + border-left:2px #9c868b solid; + border-right:2px #ecfbe2 solid ; + border-bottom:2px #ecfbe2 solid; + + } + .backRed{background: #ff0000;} + .backYellow{background: #ffff00;} + .backGreen{background: #00ff00;} diff --git a/src/jmapNew/theme/datie_02/menus/menuButton.vue b/src/jmapNew/theme/datie_02/menus/menuButton.vue index dbdbf1299..599a2d68d 100644 --- a/src/jmapNew/theme/datie_02/menus/menuButton.vue +++ b/src/jmapNew/theme/datie_02/menus/menuButton.vue @@ -1,6 +1,6 @@ + diff --git a/src/jmapNew/theme/datie_ksk/menus/dialog/addSpareTrain.vue b/src/jmapNew/theme/datie_ksk/menus/dialog/addSpareTrain.vue new file mode 100644 index 000000000..f2964cbb2 --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/dialog/addSpareTrain.vue @@ -0,0 +1,210 @@ + + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/dialog/childDialog/confirmControl.vue b/src/jmapNew/theme/datie_ksk/menus/dialog/childDialog/confirmControl.vue new file mode 100644 index 000000000..d298f8bc1 --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/dialog/childDialog/confirmControl.vue @@ -0,0 +1,141 @@ + + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/dialog/childDialog/confirmControlSpeed.vue b/src/jmapNew/theme/datie_ksk/menus/dialog/childDialog/confirmControlSpeed.vue new file mode 100644 index 000000000..d49556383 --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/dialog/childDialog/confirmControlSpeed.vue @@ -0,0 +1,156 @@ + + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/dialog/childDialog/confirmTip.vue b/src/jmapNew/theme/datie_ksk/menus/dialog/childDialog/confirmTip.vue new file mode 100644 index 000000000..6852074ca --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/dialog/childDialog/confirmTip.vue @@ -0,0 +1,74 @@ + + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/dialog/childDialog/confirmTrain.vue b/src/jmapNew/theme/datie_ksk/menus/dialog/childDialog/confirmTrain.vue new file mode 100644 index 000000000..494347b75 --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/dialog/childDialog/confirmTrain.vue @@ -0,0 +1,173 @@ + + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/dialog/childDialog/passwordInputBox.vue b/src/jmapNew/theme/datie_ksk/menus/dialog/childDialog/passwordInputBox.vue new file mode 100644 index 000000000..eec77511b --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/dialog/childDialog/passwordInputBox.vue @@ -0,0 +1,193 @@ + + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/dialog/childDialog/popupAlarm.vue b/src/jmapNew/theme/datie_ksk/menus/dialog/childDialog/popupAlarm.vue new file mode 100644 index 000000000..b6b925622 --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/dialog/childDialog/popupAlarm.vue @@ -0,0 +1,94 @@ + + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/dialog/defectiveShunting.vue b/src/jmapNew/theme/datie_ksk/menus/dialog/defectiveShunting.vue new file mode 100644 index 000000000..2d2491d3f --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/dialog/defectiveShunting.vue @@ -0,0 +1,137 @@ + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/dialog/deleteRunplan.vue b/src/jmapNew/theme/datie_ksk/menus/dialog/deleteRunplan.vue new file mode 100644 index 000000000..0b9134b52 --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/dialog/deleteRunplan.vue @@ -0,0 +1,99 @@ + + diff --git a/src/jmapNew/theme/datie_ksk/menus/dialog/drawSelect.vue b/src/jmapNew/theme/datie_ksk/menus/dialog/drawSelect.vue new file mode 100644 index 000000000..10fb5b5cd --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/dialog/drawSelect.vue @@ -0,0 +1,163 @@ + + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/dialog/mapVisual.vue b/src/jmapNew/theme/datie_ksk/menus/dialog/mapVisual.vue new file mode 100644 index 000000000..6f0e8d119 --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/dialog/mapVisual.vue @@ -0,0 +1,244 @@ + + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/dialog/modifyAdjacentStation.vue b/src/jmapNew/theme/datie_ksk/menus/dialog/modifyAdjacentStation.vue new file mode 100644 index 000000000..53bf85a71 --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/dialog/modifyAdjacentStation.vue @@ -0,0 +1,154 @@ + + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/dialog/modifyTripNumber.vue b/src/jmapNew/theme/datie_ksk/menus/dialog/modifyTripNumber.vue new file mode 100644 index 000000000..dd92fc91d --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/dialog/modifyTripNumber.vue @@ -0,0 +1,224 @@ + + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/dialog/recDep.vue b/src/jmapNew/theme/datie_ksk/menus/dialog/recDep.vue new file mode 100644 index 000000000..65de25b3d --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/dialog/recDep.vue @@ -0,0 +1,132 @@ + + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/dialog/routeDetail.vue b/src/jmapNew/theme/datie_ksk/menus/dialog/routeDetail.vue new file mode 100644 index 000000000..b7211c025 --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/dialog/routeDetail.vue @@ -0,0 +1,196 @@ + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/dialog/routeGuide.vue b/src/jmapNew/theme/datie_ksk/menus/dialog/routeGuide.vue new file mode 100644 index 000000000..11cba9131 --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/dialog/routeGuide.vue @@ -0,0 +1,278 @@ + + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/dialog/routeHandControl.vue b/src/jmapNew/theme/datie_ksk/menus/dialog/routeHandControl.vue new file mode 100644 index 000000000..69ce0d572 --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/dialog/routeHandControl.vue @@ -0,0 +1,267 @@ + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/dialog/routeSelection.vue b/src/jmapNew/theme/datie_ksk/menus/dialog/routeSelection.vue new file mode 100644 index 000000000..12014afb3 --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/dialog/routeSelection.vue @@ -0,0 +1,325 @@ + + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/dialog/routeSelection1.vue b/src/jmapNew/theme/datie_ksk/menus/dialog/routeSelection1.vue new file mode 100644 index 000000000..c34eb1e49 --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/dialog/routeSelection1.vue @@ -0,0 +1,308 @@ + + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/dialog/sectionDetail.vue b/src/jmapNew/theme/datie_ksk/menus/dialog/sectionDetail.vue new file mode 100644 index 000000000..7e6a03371 --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/dialog/sectionDetail.vue @@ -0,0 +1,114 @@ + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/dialog/sendRunplan.vue b/src/jmapNew/theme/datie_ksk/menus/dialog/sendRunplan.vue new file mode 100644 index 000000000..26e4fb5dd --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/dialog/sendRunplan.vue @@ -0,0 +1,265 @@ + + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/dialog/shuntRoute.vue b/src/jmapNew/theme/datie_ksk/menus/dialog/shuntRoute.vue new file mode 100644 index 000000000..78727e7cc --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/dialog/shuntRoute.vue @@ -0,0 +1,62 @@ + + + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/dialog/stageRunplan.vue b/src/jmapNew/theme/datie_ksk/menus/dialog/stageRunplan.vue new file mode 100644 index 000000000..6a55e1b49 --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/dialog/stageRunplan.vue @@ -0,0 +1,191 @@ + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/dialog/standControl.vue b/src/jmapNew/theme/datie_ksk/menus/dialog/standControl.vue new file mode 100644 index 000000000..e8c96940f --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/dialog/standControl.vue @@ -0,0 +1,603 @@ + + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/dialog/standDetail.vue b/src/jmapNew/theme/datie_ksk/menus/dialog/standDetail.vue new file mode 100644 index 000000000..efe048e52 --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/dialog/standDetail.vue @@ -0,0 +1,217 @@ + + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/dialog/trainControl.vue b/src/jmapNew/theme/datie_ksk/menus/dialog/trainControl.vue new file mode 100644 index 000000000..738d9509e --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/dialog/trainControl.vue @@ -0,0 +1,332 @@ + + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/dialog/trainCreate.vue b/src/jmapNew/theme/datie_ksk/menus/dialog/trainCreate.vue new file mode 100644 index 000000000..59f7935b6 --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/dialog/trainCreate.vue @@ -0,0 +1,133 @@ + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/dialog/trainCreateNumber.vue b/src/jmapNew/theme/datie_ksk/menus/dialog/trainCreateNumber.vue new file mode 100644 index 000000000..e56f2f80d --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/dialog/trainCreateNumber.vue @@ -0,0 +1,181 @@ + + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/dialog/trainDelete.vue b/src/jmapNew/theme/datie_ksk/menus/dialog/trainDelete.vue new file mode 100644 index 000000000..99797f879 --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/dialog/trainDelete.vue @@ -0,0 +1,150 @@ + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/dialog/trainDeleteNumber.vue b/src/jmapNew/theme/datie_ksk/menus/dialog/trainDeleteNumber.vue new file mode 100644 index 000000000..210e2dc87 --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/dialog/trainDeleteNumber.vue @@ -0,0 +1,176 @@ + + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/dialog/trainDetailInfo.vue b/src/jmapNew/theme/datie_ksk/menus/dialog/trainDetailInfo.vue new file mode 100644 index 000000000..907727139 --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/dialog/trainDetailInfo.vue @@ -0,0 +1,378 @@ + + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/dialog/trainEditNumber.vue b/src/jmapNew/theme/datie_ksk/menus/dialog/trainEditNumber.vue new file mode 100644 index 000000000..570e22144 --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/dialog/trainEditNumber.vue @@ -0,0 +1,174 @@ + + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/dialog/trainMove.vue b/src/jmapNew/theme/datie_ksk/menus/dialog/trainMove.vue new file mode 100644 index 000000000..82c84dc13 --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/dialog/trainMove.vue @@ -0,0 +1,200 @@ + + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/dialog/trainMoveNumber.vue b/src/jmapNew/theme/datie_ksk/menus/dialog/trainMoveNumber.vue new file mode 100644 index 000000000..7e7635d23 --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/dialog/trainMoveNumber.vue @@ -0,0 +1,193 @@ + + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/dialog/trainRoute.vue b/src/jmapNew/theme/datie_ksk/menus/dialog/trainRoute.vue new file mode 100644 index 000000000..98e3e4b46 --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/dialog/trainRoute.vue @@ -0,0 +1,51 @@ + + + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/dialog/trainSetPlan.vue b/src/jmapNew/theme/datie_ksk/menus/dialog/trainSetPlan.vue new file mode 100644 index 000000000..30383b617 --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/dialog/trainSetPlan.vue @@ -0,0 +1,181 @@ + + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/dialog/trainSwitch.vue b/src/jmapNew/theme/datie_ksk/menus/dialog/trainSwitch.vue new file mode 100644 index 000000000..b0d3731d4 --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/dialog/trainSwitch.vue @@ -0,0 +1,207 @@ + + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/dialog/updateTrip.vue b/src/jmapNew/theme/datie_ksk/menus/dialog/updateTrip.vue new file mode 100644 index 000000000..49a60e088 --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/dialog/updateTrip.vue @@ -0,0 +1,155 @@ + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/index.vue b/src/jmapNew/theme/datie_ksk/menus/index.vue new file mode 100644 index 000000000..645d03ed7 --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/index.vue @@ -0,0 +1,878 @@ + + + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/menuBar.vue b/src/jmapNew/theme/datie_ksk/menus/menuBar.vue new file mode 100644 index 000000000..d16b8bc18 --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/menuBar.vue @@ -0,0 +1,335 @@ + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/menuButton.vue b/src/jmapNew/theme/datie_ksk/menus/menuButton.vue new file mode 100644 index 000000000..3d78a4d6f --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/menuButton.vue @@ -0,0 +1,1040 @@ + + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/menuButtonCtc.vue b/src/jmapNew/theme/datie_ksk/menus/menuButtonCtc.vue new file mode 100644 index 000000000..da166116e --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/menuButtonCtc.vue @@ -0,0 +1,827 @@ + + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/menuDialog/childDialog/twoConfirmation.vue b/src/jmapNew/theme/datie_ksk/menus/menuDialog/childDialog/twoConfirmation.vue new file mode 100644 index 000000000..c1f7b93a3 --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/menuDialog/childDialog/twoConfirmation.vue @@ -0,0 +1,133 @@ + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/menuDialog/childDialog/userAdd.vue b/src/jmapNew/theme/datie_ksk/menus/menuDialog/childDialog/userAdd.vue new file mode 100644 index 000000000..b0ebdb408 --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/menuDialog/childDialog/userAdd.vue @@ -0,0 +1,167 @@ + + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/menuDialog/childDialog/userDelete.vue b/src/jmapNew/theme/datie_ksk/menus/menuDialog/childDialog/userDelete.vue new file mode 100644 index 000000000..6bda8340d --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/menuDialog/childDialog/userDelete.vue @@ -0,0 +1,139 @@ + + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/menuDialog/childDialog/userEdit.vue b/src/jmapNew/theme/datie_ksk/menus/menuDialog/childDialog/userEdit.vue new file mode 100644 index 000000000..35b11bbfa --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/menuDialog/childDialog/userEdit.vue @@ -0,0 +1,184 @@ + + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/menuDialog/helpAbout.vue b/src/jmapNew/theme/datie_ksk/menus/menuDialog/helpAbout.vue new file mode 100644 index 000000000..5bee2a166 --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/menuDialog/helpAbout.vue @@ -0,0 +1,136 @@ + + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/menuDialog/limitSpeed.vue b/src/jmapNew/theme/datie_ksk/menus/menuDialog/limitSpeed.vue new file mode 100644 index 000000000..e45a673c3 --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/menuDialog/limitSpeed.vue @@ -0,0 +1,138 @@ + + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/menuDialog/manageUser.vue b/src/jmapNew/theme/datie_ksk/menus/menuDialog/manageUser.vue new file mode 100644 index 000000000..56c92607c --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/menuDialog/manageUser.vue @@ -0,0 +1,303 @@ + + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/menuDialog/passwordBox.vue b/src/jmapNew/theme/datie_ksk/menus/menuDialog/passwordBox.vue new file mode 100644 index 000000000..69fa03d70 --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/menuDialog/passwordBox.vue @@ -0,0 +1,221 @@ + + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/menuDialog/routeCancel.vue b/src/jmapNew/theme/datie_ksk/menus/menuDialog/routeCancel.vue new file mode 100644 index 000000000..ef57c9cd2 --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/menuDialog/routeCancel.vue @@ -0,0 +1,154 @@ + + + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/menuDialog/setLimitSpeed.vue b/src/jmapNew/theme/datie_ksk/menus/menuDialog/setLimitSpeed.vue new file mode 100644 index 000000000..32dd83a21 --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/menuDialog/setLimitSpeed.vue @@ -0,0 +1,286 @@ + + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/menuDialog/stationControlConvert.vue b/src/jmapNew/theme/datie_ksk/menus/menuDialog/stationControlConvert.vue new file mode 100644 index 000000000..046b66327 --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/menuDialog/stationControlConvert.vue @@ -0,0 +1,433 @@ + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/menuDialog/trainAdd.vue b/src/jmapNew/theme/datie_ksk/menus/menuDialog/trainAdd.vue new file mode 100644 index 000000000..fba049a10 --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/menuDialog/trainAdd.vue @@ -0,0 +1,168 @@ + + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/menuDialog/trainDelete.vue b/src/jmapNew/theme/datie_ksk/menus/menuDialog/trainDelete.vue new file mode 100644 index 000000000..a27d71f29 --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/menuDialog/trainDelete.vue @@ -0,0 +1,151 @@ + + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/menuDialog/trainTranstalet.vue b/src/jmapNew/theme/datie_ksk/menus/menuDialog/trainTranstalet.vue new file mode 100644 index 000000000..97918ae44 --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/menuDialog/trainTranstalet.vue @@ -0,0 +1,158 @@ + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/menuDialog/viewName.vue b/src/jmapNew/theme/datie_ksk/menus/menuDialog/viewName.vue new file mode 100644 index 000000000..4a32473d5 --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/menuDialog/viewName.vue @@ -0,0 +1,256 @@ + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/menuPanel.vue b/src/jmapNew/theme/datie_ksk/menus/menuPanel.vue new file mode 100644 index 000000000..bf2c9df6b --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/menuPanel.vue @@ -0,0 +1,302 @@ + + + + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/menuSection.vue b/src/jmapNew/theme/datie_ksk/menus/menuSection.vue new file mode 100644 index 000000000..3612d1f02 --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/menuSection.vue @@ -0,0 +1,264 @@ + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/menuSignal.vue b/src/jmapNew/theme/datie_ksk/menus/menuSignal.vue new file mode 100644 index 000000000..ecd9aded5 --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/menuSignal.vue @@ -0,0 +1,399 @@ + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/menuStation.vue b/src/jmapNew/theme/datie_ksk/menus/menuStation.vue new file mode 100644 index 000000000..0dec74176 --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/menuStation.vue @@ -0,0 +1,213 @@ + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/menuStationStand.vue b/src/jmapNew/theme/datie_ksk/menus/menuStationStand.vue new file mode 100644 index 000000000..8dafb5bef --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/menuStationStand.vue @@ -0,0 +1,220 @@ + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/menuSwitch.vue b/src/jmapNew/theme/datie_ksk/menus/menuSwitch.vue new file mode 100644 index 000000000..8ffa4b7c3 --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/menuSwitch.vue @@ -0,0 +1,341 @@ + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/menuTool.vue b/src/jmapNew/theme/datie_ksk/menus/menuTool.vue new file mode 100644 index 000000000..95bc382b2 --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/menuTool.vue @@ -0,0 +1,211 @@ + + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/menuTrain.vue b/src/jmapNew/theme/datie_ksk/menus/menuTrain.vue new file mode 100644 index 000000000..fafd63ef0 --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/menuTrain.vue @@ -0,0 +1,585 @@ + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/passiveDialog/alarm.vue b/src/jmapNew/theme/datie_ksk/menus/passiveDialog/alarm.vue new file mode 100644 index 000000000..afbff9ddc --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/passiveDialog/alarm.vue @@ -0,0 +1,216 @@ + + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/passiveDialog/timeout.vue b/src/jmapNew/theme/datie_ksk/menus/passiveDialog/timeout.vue new file mode 100644 index 000000000..e4ef062a6 --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/passiveDialog/timeout.vue @@ -0,0 +1,109 @@ + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/runplanPane.vue b/src/jmapNew/theme/datie_ksk/menus/runplanPane.vue new file mode 100644 index 000000000..036da1041 --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/runplanPane.vue @@ -0,0 +1,1125 @@ + + + + diff --git a/src/jmapNew/theme/datie_ksk/model.js b/src/jmapNew/theme/datie_ksk/model.js new file mode 100644 index 000000000..9c09fd633 --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/model.js @@ -0,0 +1,82 @@ +import deviceType from '../../constant/deviceType'; + +class Model { + constructor() { + this.screenLine = 3; + // 公共字段部分默认初始值 + this['public'] = {}; + this['public'][deviceType.Signal] = { + lampPositionType: '02', + lampPostType: '02' + }; + + // 私有字段部分默认初始值 + this['private'] = {}; + this['private'][deviceType.StationControl] = { + indicatorShow: true // 标识灯名称显示 + }; + this['private'][deviceType.Station] = { + kmPostShow: true // 公里标显示 + }; + this['private'][deviceType.Switch] = { + nameShow: true + }; + this['private'][deviceType.Section] = { + nameShow: true, + borderBorderShow: true, // 区段边界显示 + destinationNameShow: true, // 目的地码名称显示 + standTrackNameShow: true, // 站台轨名称显示 + reentryTrackNameShow: true, // 折返轨名称显示 + transferTrackNameShow: true // 转换轨名称显示 + }; + this['private'][deviceType.Signal] = { + nameShow: true, // 信号机名称显示 + linkageAutoRouteShow: true, // 联锁自动进路表示灯显示 + atsAutoTriggerShow: true // ATS自动触发表示灯显示 + }; + this['private'][deviceType.Train] = { + }; + this['private'][deviceType.TrainWindow] = { + trainWindowShow: true + }; + } + + initPublicProps(model) { + if (model) { + const modelInitial = this.public[model._type]; + if (modelInitial) { + for (const prop in modelInitial) { + model[prop] = modelInitial[prop]; + } + } + } + + return model; + } + + initPrivateProps(model) { + if (model) { + const modelInitial = this.private[model._type]; + if (modelInitial) { + for (const prop in modelInitial) { + model[prop] = modelInitial[prop]; + } + } + } + + return model; + } + + deletePrivateProps(model) { + if (model) { + const modelInitial = this.private[model._type]; + if (modelInitial) { + for (const prop in modelInitial) { + delete model[prop]; + } + } + } + } +} + +export default new Model(); diff --git a/src/jmapNew/theme/datie_ksk/operationConfig.js b/src/jmapNew/theme/datie_ksk/operationConfig.js new file mode 100644 index 000000000..dc4d3a910 --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/operationConfig.js @@ -0,0 +1,5 @@ +// import CMD from '@/scripts/cmdPlugin/CommandEnum'; +export default { + list: [ + ] +}; diff --git a/src/jmapNew/theme/datie_ksk/planConfig.js b/src/jmapNew/theme/datie_ksk/planConfig.js new file mode 100644 index 000000000..e0e5a1967 --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/planConfig.js @@ -0,0 +1,74 @@ +import { convertSheetToList } from '../parser/util'; + +export default { + /** 运行图解析方式*/ + type: 'Ratio', + + /** 边缘高度*/ + edge: 600, + + /** 间隔高度*/ + multiple: 1, + + /** 偏移时间*/ + translation: 60 * 60 * 2, + + /** excel解析配置*/ + excelConfig: { + beginRow: 1, + beginCol: 0, + fieldNum: 8, + sepField: '车次', + columns: { + '车站名称': { key: 'stationName', formatter: (val) => { return val; } }, + '到点': { key: 'arriveTime', formatter: (val) => { return val; } }, + '发点': { key: 'departureTime', formatter: (val) => { return val; } } + } + }, + + /** 解析excel数据转换为Json后台数据*/ + importData(Sheet, JsonData) { + var dataList = convertSheetToList(Sheet, false); + var needList = Object.keys(this.excelConfig.columns); + if (dataList && dataList.length) { + for (var rowIndex = this.excelConfig.beginRow; rowIndex < dataList.length; rowIndex += 1) { + for (var colIndex = this.excelConfig.beginCol; colIndex < dataList[this.excelConfig.beginCol].length; colIndex += this.excelConfig.fieldNum + 1) { + var tripNew, tripObj; + var stationObj = {}; + + tripNew = tripObj = { code: '', arrivalList: [] }; + for (var index = 0; index < this.excelConfig.fieldNum; index += 1) { + var title = dataList[0][colIndex + index]; + var value = dataList[rowIndex][colIndex + index]; + + if (title && value) { + var titleStr = `${title}`.trim(); + var valueStr = `${value}`.trim(); + + if (titleStr.includes(this.excelConfig.sepField)) { + tripObj.code = valueStr; + JsonData.forEach(elem => { + if (elem.code == valueStr) { + tripObj = elem; + return; + } + }); + } + + // 取需要的字段 + if (needList.findIndex(elem => { return elem == titleStr; }) >= 0) { + stationObj[this.excelConfig.columns[titleStr].key] = this.excelConfig.columns[titleStr].formatter(valueStr); + } + } + } + + tripObj.arrivalList.push(stationObj); + if (tripObj.code && tripObj == tripNew) { + JsonData.push(tripObj); + } + } + } + } + return JsonData; + } +}; diff --git a/src/jmapNew/theme/datie_tky/menus/menuTrain.vue b/src/jmapNew/theme/datie_tky/menus/menuTrain.vue index 0b16452a6..ceab65302 100644 --- a/src/jmapNew/theme/datie_tky/menus/menuTrain.vue +++ b/src/jmapNew/theme/datie_tky/menus/menuTrain.vue @@ -34,7 +34,7 @@ import CancelMouseState from '@/mixin/CancelMouseState'; import CMD from '@/scripts/cmdPlugin/CommandEnum'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; -import { menuOperate, commitOperate, commitTrainSend } from '@/jmapNew/theme/components/utils/menuOperate'; +import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate'; import SpeedLimit from '@/jmapNew/theme/components/menus/dialog/trainSpeedLimit'; import TrainStop from '@/jmapNew/theme/components/menus/dialog/trainStop'; @@ -185,22 +185,22 @@ export default { } ] }, - { - label: '确认运行至前方站', - handler: this.nextStation - }, - { - label: '进路闭塞法行车', - handler: this.routeBlockRun - }, - { - label: '越引导信号行驶', - handler: this.handleOverFuideSignal - }, - { - label: '越红灯行驶', - handler: this.handleOverEedLight - }, + // { + // label: '确认运行至前方站', + // handler: this.nextStation + // }, + // { + // label: '进路闭塞法行车', + // handler: this.routeBlockRun + // }, + // { + // label: '越引导信号行驶', + // handler: this.handleOverFuideSignal + // }, + // { + // label: '越红灯行驶', + // handler: this.handleOverEedLight + // }, // { // label: '限速指令', // handler: this.handleSpeedLimit @@ -211,12 +211,12 @@ export default { }, { label: '换端', - handler: this.handleTurnDirection - }, - { - label: '发车', - handler: this.handleDepartTrain + handler: this.turnDirection }, + // { + // label: '发车', + // handler: this.handleDepartTrain + // }, { label: '停车', handler: this.handleParkingTrain @@ -303,25 +303,19 @@ export default { this.$store.dispatch('training/setTriggerFaultCount', this.selected); }, nextStation() { - this.trainSend('Drive_Ahead'); + this.trainSend(menuOperate.Driver.driveAhead); }, routeBlockRun() { - this.trainSend('Route_Block_Drive'); + this.trainSend(menuOperate.Driver.routeBlockDrive); }, handleOverFuideSignal() { - this.trainSend('Drive_Through_The_Guide_Signal'); + this.trainSend(menuOperate.Driver.driveThroughTheGuideSignal); }, handleOverEedLight() { - this.trainSend('Drive_Through_The_Red_Light'); + this.trainSend(menuOperate.Driver.driveThroughTheRedLight); }, trainSend(type) { - const group = this.$route.query.group; - const param = { - commandType: type, - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate})=>{ + commitOperate(type, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); @@ -493,65 +487,35 @@ export default { }); }, handlerApplyAmcMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'AM_C' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'AM_C' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplySmcMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'SM_C' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'SM_C' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplyAmiMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'AM_I' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'AM_I' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplySmiMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'SM_I' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'SM_I' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplyRmMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'RM' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'RM' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); @@ -576,33 +540,13 @@ export default { this.$refs.noticeInfo.doShow(); }); }, - // 换端 - handleTurnDirection() { - const group = this.$route.query.group; - const param = { - commandType: 'Turn_Direction', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate}) => { - }).catch((error)=> { - console.error(error); - this.$refs.noticeInfo.doShow(); - }); - }, - handleDepartTrain() { - const group = this.$route.query.group; - const param = { - commandType: 'Depart_Train', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate}) => { - }).catch((error)=> { - console.error(error); - this.$refs.noticeInfo.doShow(); - }); - }, + // handleDepartTrain() { + // commitOperate(menuOperate.Driver.departTrain, { groupNumber: this.selected.groupNumber }, 3).then(({valid, operate}) => { + // }).catch((error)=> { + // console.error(error); + // this.$refs.noticeInfo.doShow(); + // }); + // }, handleParkingTrain() { commitOperate(menuOperate.Train.driverStop, {groupNumber:this.selected.groupNumber}, 0).then(({valid, operate})=>{ if (valid) { diff --git a/src/jmapNew/theme/factory.js b/src/jmapNew/theme/factory.js index 0e95d2520..6d2d41951 100644 --- a/src/jmapNew/theme/factory.js +++ b/src/jmapNew/theme/factory.js @@ -53,7 +53,8 @@ class Theme { '15': 'datie_01', '16': 'datie_02', '17': 'datie_tky', - '18': 'datie_jd1a' + '18': 'datie_jd1a', + '19': 'datie_ksk' }; this._runplan = { @@ -75,7 +76,8 @@ class Theme { '15': 'datie_01', '16': 'datie_02', '17': 'datie_tky', - '18': 'datie_jd1a' + '18': 'datie_jd1a', + '19': 'datie_ksk' }; this._localShowMode = { // 现地显示模式 @@ -96,7 +98,8 @@ class Theme { '15':'all', '16':'ecStation', '17': 'all', - '18': 'all' + '18': 'all', + '19': 'all' }; } diff --git a/src/jmapNew/theme/foshan_01/menus/menuTrain.vue b/src/jmapNew/theme/foshan_01/menus/menuTrain.vue index fc232cea6..efe9dfc0e 100644 --- a/src/jmapNew/theme/foshan_01/menus/menuTrain.vue +++ b/src/jmapNew/theme/foshan_01/menus/menuTrain.vue @@ -37,7 +37,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import CMD from '@/scripts/cmdPlugin/CommandEnum'; -import { menuOperate, commitOperate, commitTrainSend } from '@/jmapNew/theme/components/utils/menuOperate'; +import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate'; export default { name: 'MenuTrain', @@ -134,18 +134,18 @@ export default { } ], menuDirective: [ - { - label: '确认运行至前方站', - handler: this.nextStation - }, - { - label: '越引导信号行驶', - handler: this.handleOverFuideSignal - }, - { - label: '越红灯行驶', - handler: this.handleOverEedLight - }, + // { + // label: '确认运行至前方站', + // handler: this.nextStation + // }, + // { + // label: '越引导信号行驶', + // handler: this.handleOverFuideSignal + // }, + // { + // label: '越红灯行驶', + // handler: this.handleOverEedLight + // }, { label: '开关门', handler: this.handleOpenOrCloseDoor @@ -278,50 +278,26 @@ export default { this.$store.dispatch('training/setTriggerFaultCount', this.selected); }, nextStation() { - const group = this.$route.query.group; - const param = { - commandType: 'Drive_Ahead', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate})=>{ + commitOperate(menuOperate.Driver.driveAhead, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ }).catch(() => { this.$refs.noticeInfo.doShow(); }); }, handleOverFuideSignal() { - const group = this.$route.query.group; - const param = { - commandType: 'Drive_Through_The_Guide_Signal', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate})=>{ + commitOperate(menuOperate.Driver.driveThroughTheGuideSignal, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ }).catch(() => { this.$refs.noticeInfo.doShow(); }); }, handleOverEedLight() { - const group = this.$route.query.group; - const param = { - commandType: 'Drive_Through_The_Red_Light', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate})=>{ + commitOperate(menuOperate.Driver.driveThroughTheRedLight, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ }).catch(() => { this.$refs.noticeInfo.doShow(); }); }, // 开关门 handleOpenOrCloseDoor() { - const group = this.$route.query.group; - const param = { - commandType: 'Open_Or_Close_Door', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate}) => { + commitOperate(menuOperate.Driver.openOrCloseDoor, { groupNumber: this.selected.code }, 3).then(({valid, operate}) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); @@ -340,13 +316,7 @@ export default { }, // 回库 setInbound() { - const group = this.$route.query.group; - const param = { - commandType: 'Inbound', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate}) => { + commitOperate(menuOperate.Driver.inbound, { groupNumber: this.selected.code }, 3).then(({valid, operate}) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); @@ -354,78 +324,42 @@ export default { }, // 换端 handleTurnDirection() { - const group = this.$route.query.group; - const param = { - commandType: 'Turn_Direction', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate}) => { + commitOperate(menuOperate.Train.turnDirection, { groupNumber: this.selected.code }, 3).then(({valid, operate}) => { }).catch((error)=> { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplyAmcMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'AM_C' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'AM_C' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplySmcMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'SM_C' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'SM_C' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplyAmiMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'AM_I' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'AM_I' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplySmiMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'SM_I' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'SM_I' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplyRmMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'RM' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'RM' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); diff --git a/src/jmapNew/theme/fuzhou_01/menus/menuTrain.vue b/src/jmapNew/theme/fuzhou_01/menus/menuTrain.vue index ef46aeb00..b9b2a13b1 100644 --- a/src/jmapNew/theme/fuzhou_01/menus/menuTrain.vue +++ b/src/jmapNew/theme/fuzhou_01/menus/menuTrain.vue @@ -108,18 +108,18 @@ export default { } ], menuDirective: [ - { - label: '确认运行至前方站', - handler: this.nextStation - }, - { - label: '越引导信号行驶', - handler: this.handleOverFuideSignal - }, - { - label: '越红灯行驶', - handler: this.handleOverEedLight - }, + // { + // label: '确认运行至前方站', + // handler: this.nextStation + // }, + // { + // label: '越引导信号行驶', + // handler: this.handleOverFuideSignal + // }, + // { + // label: '越红灯行驶', + // handler: this.handleOverEedLight + // }, { label: '开关门', handler: this.handleOpenOrCloseDoor @@ -270,39 +270,21 @@ export default { this.$store.dispatch('training/setTriggerFaultCount', this.selected); }, nextStation() { - const group = this.$route.query.group; - const param = { - commandType: 'Drive_Ahead', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate})=>{ + commitOperate(menuOperate.Driver.driveAhead, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handleOverFuideSignal() { - const group = this.$route.query.group; - const param = { - commandType: 'Drive_Through_The_Guide_Signal', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate})=>{ + commitOperate(menuOperate.Driver.driveThroughTheGuideSignal, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handleOverEedLight() { - const group = this.$route.query.group; - const param = { - commandType: 'Drive_Through_The_Red_Light', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate})=>{ + commitOperate(menuOperate.Driver.driveThroughTheRedLight, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); @@ -310,13 +292,7 @@ export default { }, // 开关门 handleOpenOrCloseDoor() { - const group = this.$route.query.group; - const param = { - commandType: 'Open_Or_Close_Door', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate}) => { + commitTrainSend(menuOperate.Driver.openOrCloseDoor, { groupNumber: this.selected.code }, 3).then(({valid, operate}) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); @@ -335,13 +311,7 @@ export default { }, // 回库 setInbound() { - const group = this.$route.query.group; - const param = { - commandType: 'Inbound', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate}) => { + commitOperate(menuOperate.Driver.inbound, { groupNumber: this.selected.code }, 3).then(({valid, operate}) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); @@ -349,91 +319,49 @@ export default { }, // 换端 handleTurnDirection() { - const group = this.$route.query.group; - const param = { - commandType: 'Turn_Direction', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate}) => { + commitOperate(menuOperate.Train.turnDirection, { groupNumber: this.selected.code }, 3).then(({valid, operate}) => { }).catch((error)=> { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplyAmcMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'AM_C' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'AM_C' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplySmcMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'SM_C' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'SM_C' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplyAmiMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'AM_I' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'AM_I' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplySmiMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'SM_I' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'SM_I' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplyRmMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'RM' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'RM' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplyNrmMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Apply_NRM', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.applyNrm, { groupNumber: this.selected.code }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); diff --git a/src/jmapNew/theme/haerbin_01/menus/menuTrain.vue b/src/jmapNew/theme/haerbin_01/menus/menuTrain.vue index c09e266bc..0838f2cfc 100644 --- a/src/jmapNew/theme/haerbin_01/menus/menuTrain.vue +++ b/src/jmapNew/theme/haerbin_01/menus/menuTrain.vue @@ -75,18 +75,18 @@ export default { } ], menuDirective: [ - { - label: '确认运行至前方站', - handler: this.nextStation - }, - { - label: '越引导信号行驶', - handler: this.handleOverFuideSignal - }, - { - label: '越红灯行驶', - handler: this.handleOverEedLight - }, + // { + // label: '确认运行至前方站', + // handler: this.nextStation + // }, + // { + // label: '越引导信号行驶', + // handler: this.handleOverFuideSignal + // }, + // { + // label: '越红灯行驶', + // handler: this.handleOverEedLight + // }, { label: '开关门', handler: this.handleOpenOrCloseDoor @@ -240,39 +240,21 @@ export default { }); }, nextStation() { - const group = this.$route.query.group; - const param = { - commandType: 'Drive_Ahead', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate})=>{ + commitOperate(menuOperate.Driver.driveAhead, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handleOverFuideSignal() { - const group = this.$route.query.group; - const param = { - commandType: 'Drive_Through_The_Guide_Signal', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate})=>{ + commitOperate(menuOperate.Driver.driveThroughTheGuideSignal, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handleOverEedLight() { - const group = this.$route.query.group; - const param = { - commandType: 'Drive_Through_The_Red_Light', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate})=>{ + commitOperate(menuOperate.Driver.driveThroughTheRedLight, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); @@ -280,13 +262,7 @@ export default { }, // 开关门 handleOpenOrCloseDoor() { - const group = this.$route.query.group; - const param = { - commandType: 'Open_Or_Close_Door', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate}) => { + commitOperate(menuOperate.Driver.openOrCloseDoor, { groupNumber: this.selected.code }, 3).then(({valid, operate}) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); @@ -305,13 +281,7 @@ export default { }, // 回库 setInbound() { - const group = this.$route.query.group; - const param = { - commandType: 'Inbound', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate}) => { + commitOperate(menuOperate.Driver.inbound, { groupNumber: this.selected.code }, 3).then(({valid, operate}) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); @@ -319,78 +289,42 @@ export default { }, // 换端 handleTurnDirection() { - const group = this.$route.query.group; - const param = { - commandType: 'Turn_Direction', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate}) => { + commitOperate(menuOperate.Train.turnDirection, { groupNumber: this.selected.code }, 3).then(({valid, operate}) => { }).catch((error)=> { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplyAmcMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'AM_C' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'AM_C' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplySmcMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'SM_C' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'SM_C' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplyAmiMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'AM_I' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'AM_I' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplySmiMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'SM_I' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'SM_I' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplyRmMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'RM' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitTrainSend(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'RM' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); diff --git a/src/jmapNew/theme/nanjing_02/menus/menuTrain.vue b/src/jmapNew/theme/nanjing_02/menus/menuTrain.vue index 79b9e8e0b..5744d6904 100644 --- a/src/jmapNew/theme/nanjing_02/menus/menuTrain.vue +++ b/src/jmapNew/theme/nanjing_02/menus/menuTrain.vue @@ -27,7 +27,7 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum'; // import TrainEditNumber from './dialog/trainEditNumber'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import SpeedLimit from '@/jmapNew/theme/components/menus/dialog/trainSpeedLimit'; -import { menuOperate, commitOperate, commitTrainSend } from '@/jmapNew/theme/components/utils/menuOperate'; +import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate'; export default { name: 'MenuTrain', @@ -75,18 +75,18 @@ export default { } ], menuDirective: [ - { - label: '确认运行至前方站', - handler: this.nextStation - }, - { - label: '越引导信号行驶', - handler: this.handleOverFuideSignal - }, - { - label: '越红灯行驶', - handler: this.handleOverEedLight - }, + // { + // label: '确认运行至前方站', + // handler: this.nextStation + // }, + // { + // label: '越引导信号行驶', + // handler: this.handleOverFuideSignal + // }, + // { + // label: '越红灯行驶', + // handler: this.handleOverEedLight + // }, { label: '开关门', handler: this.handleOpenOrCloseDoor @@ -240,38 +240,20 @@ export default { }); }, nextStation() { - const group = this.$route.query.group; - const param = { - commandType: 'Drive_Ahead', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate})=>{ - }).catch((error) => { + commitOperate(menuOperate.Driver.driveAhead, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ + }).catch(() => { this.$refs.noticeInfo.doShow(); }); }, handleOverFuideSignal() { - const group = this.$route.query.group; - const param = { - commandType: 'Drive_Through_The_Guide_Signal', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate})=>{ + commitOperate(menuOperate.Driver.driveThroughTheGuideSignal, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handleOverEedLight() { - const group = this.$route.query.group; - const param = { - commandType: 'Drive_Through_The_Red_Light', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate})=>{ + commitOperate(menuOperate.Driver.driveThroughTheRedLight, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); @@ -279,13 +261,7 @@ export default { }, // 开关门 handleOpenOrCloseDoor() { - const group = this.$route.query.group; - const param = { - commandType: 'Open_Or_Close_Door', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate}) => { + commitOperate(menuOperate.Driver.openOrCloseDoor, { groupNumber: this.selected.code }, 3).then(({valid, operate}) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); @@ -304,13 +280,7 @@ export default { }, // 回库 setInbound() { - const group = this.$route.query.group; - const param = { - commandType: 'Inbound', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate}) => { + commitOperate(menuOperate.Driver.inbound, { groupNumber: this.selected.code }, 3).then(({valid, operate}) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); @@ -318,78 +288,42 @@ export default { }, // 换端 handleTurnDirection() { - const group = this.$route.query.group; - const param = { - commandType: 'Turn_Direction', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate}) => { + commitOperate(menuOperate.Train.turnDirection, { groupNumber: this.selected.code }, 3).then(({valid, operate}) => { }).catch((error)=> { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplyAmcMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'AM_C' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'AM_C' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplySmcMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'SM_C' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'SM_C' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplyAmiMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'AM_I' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'AM_I' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplySmiMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'SM_I' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'SM_I' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplyRmMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'RM' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'SM_I' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); diff --git a/src/jmapNew/theme/ningbo_01/menus/menuTrain.vue b/src/jmapNew/theme/ningbo_01/menus/menuTrain.vue index 237f4f6de..1251a633d 100644 --- a/src/jmapNew/theme/ningbo_01/menus/menuTrain.vue +++ b/src/jmapNew/theme/ningbo_01/menus/menuTrain.vue @@ -32,7 +32,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import CMD from '@/scripts/cmdPlugin/CommandEnum'; -import { menuOperate, commitOperate, commitTrainSend } from '@/jmapNew/theme/components/utils/menuOperate'; +import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate'; export default { name: 'MenuTrain', @@ -214,18 +214,18 @@ export default { } ], menuDirective: [ - { - label: '确认运行至前方站', - handler: this.nextStation - }, - { - label: '越引导信号行驶', - handler: this.handleOverFuideSignal - }, - { - label: '越红灯行驶', - handler: this.handleOverEedLight - }, + // { + // label: '确认运行至前方站', + // handler: this.nextStation + // }, + // { + // label: '越引导信号行驶', + // handler: this.handleOverFuideSignal + // }, + // { + // label: '越红灯行驶', + // handler: this.handleOverEedLight + // }, { label: '开关门', handler: this.handleOpenOrCloseDoor @@ -351,39 +351,21 @@ export default { this.$store.dispatch('training/setTriggerFaultCount', this.selected); }, nextStation() { - const group = this.$route.query.group; - const param = { - commandType: 'Drive_Ahead', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate})=>{ + commitOperate(menuOperate.Driver.driveAhead, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handleOverFuideSignal() { - const group = this.$route.query.group; - const param = { - commandType: 'Drive_Through_The_Guide_Signal', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate})=>{ + commitOperate(menuOperate.Driver.driveThroughTheGuideSignal, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handleOverEedLight() { - const group = this.$route.query.group; - const param = { - commandType: 'Drive_Through_The_Red_Light', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate})=>{ + commitOperate(menuOperate.Driver.driveThroughTheRedLight, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); @@ -394,13 +376,7 @@ export default { }, // 开关门 handleOpenOrCloseDoor() { - const group = this.$route.query.group; - const param = { - commandType: 'Open_Or_Close_Door', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate}) => { + commitOperate(menuOperate.Driver.openOrCloseDoor, { groupNumber: this.selected.code }, 3).then(({valid, operate}) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); @@ -416,13 +392,7 @@ export default { }, // 回库 setInbound() { - const group = this.$route.query.group; - const param = { - commandType: 'Inbound', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate}) => { + commitOperate(menuOperate.Driver.inbound, { groupNumber: this.selected.code }, 3).then(({valid, operate}) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); @@ -430,78 +400,42 @@ export default { }, // 换端 handleTurnDirection() { - const group = this.$route.query.group; - const param = { - commandType: 'Turn_Direction', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate}) => { + commitOperate(menuOperate.Train.turnDirection, { groupNumber: this.selected.code }, 3).then(({valid, operate}) => { }).catch((error)=> { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplyAmcMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'AM_C' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'AM_C' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplySmcMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'SM_C' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'SM_C' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplyAmiMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'AM_I' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'AM_I' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplySmiMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'SM_I' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'SM_I' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplyRmMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'RM' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'RM' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); diff --git a/src/jmapNew/theme/ningbo_03/menus/menuTrain.vue b/src/jmapNew/theme/ningbo_03/menus/menuTrain.vue index 32f5cc2a6..2e21da03c 100644 --- a/src/jmapNew/theme/ningbo_03/menus/menuTrain.vue +++ b/src/jmapNew/theme/ningbo_03/menus/menuTrain.vue @@ -33,7 +33,7 @@ import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import CMD from '@/scripts/cmdPlugin/CommandEnum'; // import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus'; -import { menuOperate, commitOperate, commitTrainSend } from '@/jmapNew/theme/components/utils/menuOperate'; +import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate'; export default { name: 'MenuTrain', @@ -215,18 +215,18 @@ export default { } ], menuDirective: [ - { - label: '确认运行至前方站', - handler: this.nextStation - }, - { - label: '越引导信号行驶', - handler: this.handleOverFuideSignal - }, - { - label: '越红灯行驶', - handler: this.handleOverEedLight - }, + // { + // label: '确认运行至前方站', + // handler: this.nextStation + // }, + // { + // label: '越引导信号行驶', + // handler: this.handleOverFuideSignal + // }, + // { + // label: '越红灯行驶', + // handler: this.handleOverEedLight + // }, { label: '开关门', handler: this.handleOpenOrCloseDoor @@ -351,39 +351,21 @@ export default { this.$store.dispatch('training/setTriggerFaultCount', this.selected); }, nextStation() { - const group = this.$route.query.group; - const param = { - commandType: 'Drive_Ahead', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate})=>{ + commitOperate(menuOperate.Driver.driveAhead, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handleOverFuideSignal() { - const group = this.$route.query.group; - const param = { - commandType: 'Drive_Through_The_Guide_Signal', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate})=>{ + commitOperate(menuOperate.Driver.driveThroughTheGuideSignal, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handleOverEedLight() { - const group = this.$route.query.group; - const param = { - commandType: 'Drive_Through_The_Red_Light', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate})=>{ + commitOperate(menuOperate.Driver.driveThroughTheRedLight, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); @@ -391,13 +373,7 @@ export default { }, // 开关门 handleOpenOrCloseDoor() { - const group = this.$route.query.group; - const param = { - commandType: 'Open_Or_Close_Door', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate}) => { + commitOperate(menuOperate.Driver.openOrCloseDoor, { groupNumber: this.selected.code }, 3).then(({valid, operate}) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); @@ -416,13 +392,7 @@ export default { }, // 回库 setInbound() { - const group = this.$route.query.group; - const param = { - commandType: 'Inbound', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate}) => { + commitOperate(menuOperate.Driver.inbound, { groupNumber: this.selected.code }, 3).then(({valid, operate}) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); @@ -430,78 +400,42 @@ export default { }, // 换端 handleTurnDirection() { - const group = this.$route.query.group; - const param = { - commandType: 'Turn_Direction', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate}) => { + commitOperate(menuOperate.Train.turnDirection, { groupNumber: this.selected.code }, 3).then(({valid, operate}) => { }).catch((error)=> { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplyAmcMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'AM_C' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'AM_C' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplySmcMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'SM_C' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'SM_C' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplyAmiMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'AM_I' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'AM_I' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplySmiMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'SM_I' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'SM_I' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplyRmMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'RM' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'RM' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); diff --git a/src/jmapNew/theme/race_01/menus/menuTrain.vue b/src/jmapNew/theme/race_01/menus/menuTrain.vue index bdd0956ac..75cb2ceed 100644 --- a/src/jmapNew/theme/race_01/menus/menuTrain.vue +++ b/src/jmapNew/theme/race_01/menus/menuTrain.vue @@ -229,22 +229,22 @@ export default { } ], menuDirective: [ - { - label: '确认运行至前方站', - handler: this.nextStation - }, + // { + // label: '确认运行至前方站', + // handler: this.nextStation + // }, // { // label: '限速指令', // handler: this.handleSpeedLimit // }, - { - label: '越引导信号行驶', - handler: this.handleOverFuideSignal - }, - { - label: '越红灯行驶', - handler: this.handleOverEedLight - }, + // { + // label: '越引导信号行驶', + // handler: this.handleOverFuideSignal + // }, + // { + // label: '越红灯行驶', + // handler: this.handleOverEedLight + // }, { label: '开/关门', handler: this.handleOpenCloseDoor @@ -399,39 +399,21 @@ export default { }); }, nextStation() { - const group = this.$route.query.group; - const param = { - commandType: 'Drive_Ahead', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate})=>{ + commitOperate(menuOperate.Driver.driveAhead, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handleOverFuideSignal() { - const group = this.$route.query.group; - const param = { - commandType: 'Drive_Through_The_Guide_Signal', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate})=>{ + commitOperate(menuOperate.Driver.driveThroughTheGuideSignal, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handleOverEedLight() { - const group = this.$route.query.group; - const param = { - commandType: 'Drive_Through_The_Red_Light', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate})=>{ + commitOperate(menuOperate.Driver.driveThroughTheRedLight, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); @@ -441,65 +423,35 @@ export default { this.$refs.speedLimit.doShow(this.selected); }, handlerApplyAmcMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'AM_C' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'AM_C' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplySmcMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'SM_C' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'SM_C' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplyAmiMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'AM_I' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'AM_I' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplySmiMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'SM_I' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'SM_I' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplyRmMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'RM' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'RM' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); @@ -507,13 +459,7 @@ export default { }, // 操作列车 开/关门 handleOpenCloseDoor() { - const group = this.$route.query.group; - const param = { - commandType: 'Open_Or_Close_Door', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate})=>{ + commitOperate(menuOperate.Driver.openOrCloseDoor, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); @@ -529,13 +475,7 @@ export default { }, // 换端 handleTurnDirection() { - const group = this.$route.query.group; - const param = { - commandType: 'Turn_Direction', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate}) => { + commitOperate(menuOperate.Train.turnDirection, { groupNumber: this.selected.code }, 3).then(({valid, operate}) => { }).catch((error)=> { console.error(error); this.$refs.noticeInfo.doShow(); diff --git a/src/jmapNew/theme/xian_01/menus/menuTrain.vue b/src/jmapNew/theme/xian_01/menus/menuTrain.vue index 71a6e33ef..a9e454299 100644 --- a/src/jmapNew/theme/xian_01/menus/menuTrain.vue +++ b/src/jmapNew/theme/xian_01/menus/menuTrain.vue @@ -33,7 +33,7 @@ import TrainDetail from './dialog/trainDetail'; import SetTrainOperation from '@/jmapNew/theme/components/menus/dialog/setTrainOperation'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import SpeedLimit from '@/jmapNew/theme/components/menus/dialog/trainSpeedLimit'; -import { menuOperate, commitOperate, commitTrainSend } from '@/jmapNew/theme/components/utils/menuOperate'; +import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate'; export default { name: 'MenuTrain', @@ -159,18 +159,18 @@ export default { label: '转NRM模式', handler: this.handlerApplyNrmMode }, - { - label: '确认运行至前方站', - handler: this.nextStation - }, - { - label: '越引导信号行驶', - handler: this.handleOverFuideSignal - }, - { - label: '越红灯行驶', - handler: this.handleOverEedLight - }, + // { + // label: '确认运行至前方站', + // handler: this.nextStation + // }, + // { + // label: '越引导信号行驶', + // handler: this.handleOverFuideSignal + // }, + // { + // label: '越红灯行驶', + // handler: this.handleOverEedLight + // }, { label: '开关门', handler: this.handleOpenOrCloseDoor @@ -302,13 +302,7 @@ export default { }); }, handlerApplyNrmMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Apply_NRM', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.applyNrm, { groupNumber: this.selected.code }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); @@ -395,13 +389,7 @@ export default { // }); // }, nextStation() { - const group = this.$route.query.group; - const param = { - commandType: 'Drive_Ahead', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate})=>{ + commitOperate(menuOperate.Driver.driveAhead, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); @@ -422,26 +410,14 @@ export default { // }); // }, handleOverFuideSignal() { - const group = this.$route.query.group; - const param = { - commandType: 'Drive_Through_The_Guide_Signal', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate})=>{ + commitOperate(menuOperate.Driver.driveThroughTheGuideSignal, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handleOverEedLight() { - const group = this.$route.query.group; - const param = { - commandType: 'Drive_Through_The_Red_Light', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate})=>{ + commitOperate(menuOperate.Driver.driveThroughTheRedLight, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); @@ -449,13 +425,7 @@ export default { }, // 开关门 handleOpenOrCloseDoor() { - const group = this.$route.query.group; - const param = { - commandType: 'Open_Or_Close_Door', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate}) => { + commitOperate(menuOperate.Driver.openOrCloseDoor, { groupNumber: this.selected.code }, 3).then(({valid, operate}) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); @@ -482,13 +452,7 @@ export default { }, // 回库 setInbound() { - const group = this.$route.query.group; - const param = { - commandType: 'Inbound', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate}) => { + commitOperate(menuOperate.Driver.inbound, { groupNumber: this.selected.code }, 3).then(({valid, operate}) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); @@ -496,78 +460,42 @@ export default { }, // 换端 handleTurnDirection() { - const group = this.$route.query.group; - const param = { - commandType: 'Turn_Direction', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate}) => { + commitOperate(menuOperate.Train.turnDirection, { groupNumber: this.selected.code }, 3).then(({valid, operate}) => { }).catch((error)=> { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplyAmcMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'AM_C' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'AM_C' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplySmcMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'SM_C' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'SM_C' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplyAmiMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'AM_I' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'AM_I' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplySmiMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'SM_I' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'SM_I' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplyRmMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'RM' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'RM' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); diff --git a/src/jmapNew/theme/xian_02/menus/menuTrain.vue b/src/jmapNew/theme/xian_02/menus/menuTrain.vue index c83de0af9..a045c6ea1 100644 --- a/src/jmapNew/theme/xian_02/menus/menuTrain.vue +++ b/src/jmapNew/theme/xian_02/menus/menuTrain.vue @@ -35,7 +35,7 @@ import { mapGetters } from 'vuex'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; import CMD from '@/scripts/cmdPlugin/CommandEnum'; -import { menuOperate, commitOperate, commitTrainSend } from '@/jmapNew/theme/components/utils/menuOperate'; +import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate'; export default { name: 'MenuTrain', @@ -237,18 +237,18 @@ export default { } ], menuDirective: [ - { - label: '确认运行至前方站', - handler: this.nextStation - }, - { - label: '越引导信号行驶', - handler: this.handleOverFuideSignal - }, - { - label: '越红灯行驶', - handler: this.handleOverEedLight - }, + // { + // label: '确认运行至前方站', + // handler: this.nextStation + // }, + // { + // label: '越引导信号行驶', + // handler: this.handleOverFuideSignal + // }, + // { + // label: '越红灯行驶', + // handler: this.handleOverEedLight + // }, { label: '开关门', handler: this.handleOpenOrCloseDoor @@ -381,39 +381,21 @@ export default { }); }, nextStation() { - const group = this.$route.query.group; - const param = { - commandType: 'Drive_Ahead', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate})=>{ + commitOperate(menuOperate.Driver.driveAhead, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handleOverFuideSignal() { - const group = this.$route.query.group; - const param = { - commandType: 'Drive_Through_The_Guide_Signal', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate})=>{ + commitOperate(menuOperate.Driver.driveThroughTheGuideSignal, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handleOverEedLight() { - const group = this.$route.query.group; - const param = { - commandType: 'Drive_Through_The_Red_Light', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate})=>{ + commitOperate(menuOperate.Driver.driveThroughTheRedLight, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); @@ -421,13 +403,7 @@ export default { }, // 开关门 handleOpenOrCloseDoor() { - const group = this.$route.query.group; - const param = { - commandType: 'Open_Or_Close_Door', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate}) => { + commitOperate(menuOperate.Driver.openOrCloseDoor, { groupNumber: this.selected.code }, 3).then(({valid, operate}) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); @@ -446,78 +422,42 @@ export default { }, // 换端 handleTurnDirection() { - const group = this.$route.query.group; - const param = { - commandType: 'Turn_Direction', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate}) => { + commitOperate(menuOperate.Train.turnDirection, { groupNumber: this.selected.code }, 3).then(({valid, operate}) => { }).catch((error)=> { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplyAmcMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'AM_C' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'AM_C' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplySmcMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'SM_C' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'SM_C' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplyAmiMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'AM_I' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'AM_I' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplySmiMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'SM_I' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'SM_I' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); }); }, handlerApplyRmMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Change_Preselection_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: { preselectionMode: 'RM' } - }; - commitTrainSend(group, param).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'RM' }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); @@ -525,26 +465,7 @@ export default { }, // 回库 setInbound() { - const group = this.$route.query.group; - const param = { - commandType: 'Inbound', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate}) => { - }).catch((error) => { - console.error(error); - this.$refs.noticeInfo.doShow(); - }); - }, - handleApplyAmMode() { - const group = this.$route.query.group; - const param = { - commandType: 'Apply_AM_Mode', - targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, - params: {} - }; - commitTrainSend(group, param).then(({valid, operate}) => { + commitOperate(menuOperate.Driver.inbound, { groupNumber: this.selected.code }, 0).then(({valid, operate}) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); diff --git a/src/jmapNew/utils/handlePath.js b/src/jmapNew/utils/handlePath.js deleted file mode 100644 index 145fbe908..000000000 --- a/src/jmapNew/utils/handlePath.js +++ /dev/null @@ -1,16 +0,0 @@ -export function isShowThePrdType (prdType, showConditions) { - const path = window.location.href; - if (path.includes('jointTrainingNew')) { - return true; - } - if (showConditions === '01' || (showConditions === '02' && prdType === '02') || (showConditions === '03' && prdType === '01')) { - return true; - } else if (!showConditions) { - return true; // 兼容老数据没有showConditions - } - -} -export function isPreviewOrMapDraw() { - const path = window.location.href; - return path.indexOf('map/draw') !== -1 || path.indexOf('mapPreviewNew') !== -1; -} diff --git a/src/router/index.js b/src/router/index.js index 6762baaca..e7a4c0a99 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -117,6 +117,8 @@ const DesignPlatform = () => import('@/views/designPlatform/index'); const MapPreviewNew = () => import('@/views/designPlatform/mapPreviewNew'); const BigScreen = () => import('@/views/designPlatform/bigScreen'); const BigSplitScreen = () => import('@/views/designPlatform/bigSplitScreen'); +const TrainingDesign = () => import('@/views/designPlatform/trainingDesign'); +const TrainingPreview = () => import('@/views/designPlatform/trainingPreview'); const TestRunplan = () => import('@/views/designPlatform/testRunplan'); const Package = () => import('@/views/package/index'); @@ -133,6 +135,7 @@ const PublishExamRule = () => import('@/views/publish/examRule/index'); const PublishExamRuleDraft = () => import('@/views/publish/examRule/draft/index'); const PublishIBP = () => import('@/views/publish/publishIBP/index'); const PublishISCS = () => import('@/views/publish/publishISCS/index'); +const PublishTraining = () => import('@/views/publish/publishTraining/index'); const TrainingPlatform = () => import('@/views/trainingPlatform/index'); @@ -478,6 +481,16 @@ export const publicAsyncRoute = [ component: BigSplitScreen, hidden: true }, + { // 实训设计 + path: '/trainingDesign', + component: TrainingDesign, + hidden: true + }, + { + path: '/trainingPreview', + component: TrainingPreview, + hidden: true + }, { path: '/jointTrainingNew', component: JointTrainingNew, @@ -975,6 +988,13 @@ export const asyncRouter = [ meta: { i18n: 'router.mapGroup' } + }, + { + path: 'training', + component: PublishTraining, + meta: { + i18n: 'router.publishTrainingManage' + } } ] }, diff --git a/src/scripts/ConstConfig.js b/src/scripts/ConstConfig.js index 7113fab16..373696a28 100644 --- a/src/scripts/ConstConfig.js +++ b/src/scripts/ConstConfig.js @@ -151,13 +151,6 @@ export default { {label:'交路', value:'ROUTING'}, {label:'站间运行等级', value:'RUN_LEVEL'} ], - - showConditionsList: [ - { enlabel:'Local&Center', label: '现地&行调', value: '01'}, - { enlabel:'Local', label: '现地', value: '03' }, - { enlabel:'Center', label: '行调', value: '02'} - ], - QuestionTypeList: [ { label: '选择题', value: 'select' }, { label: '判断题', value: 'judge' }, @@ -260,6 +253,17 @@ export default { { label: 'S', value: 'S' }, { label: 'SF', value: 'SF' }, { label: 'SD', value: 'SD' } + ], + trainingType: [ // 实训类型 + { enlabel: 'single operation', label: '单操', value: 'SINGLE'}, + { enlabel: 'scene operation', label: '场景', value: 'SCENE'} + ], + ioDirectionList:[ // 出入口类型 + {value:'DOWN_IN_STATION', label:'下行进站'}, + {value:'UP_IN_STATION', label :'上行进站'}, + {value:'DOWN_OUT_STATION', label:'下行出站'}, + {value:'UP_OUT_STATION', label:'上行出站'}, + {value:'BOTH_WAY_STATION', label:'双向'} ] } }; diff --git a/src/scripts/ProjectConfig.js b/src/scripts/ProjectConfig.js index a2f03b430..5ef7daecd 100644 --- a/src/scripts/ProjectConfig.js +++ b/src/scripts/ProjectConfig.js @@ -144,6 +144,16 @@ export const loginInfo = { logoWidth: '0', systemType: '011' }, + wh: { + title: '城市轨道交通实训平台', + loginPath: '/login?project=wh', + loginParam: 'WH', + loginTitle: '空串', + navigationLogoWidth: '40px', + navigationMarginLeft: '60px', + logoWidth: '0', + systemType: '011' + }, drts: { title: '全国行车调度员大赛训练系统', loginPath: '/login?project=drts', @@ -767,6 +777,7 @@ export const ProjectIcon = { hls: FaviconHls, designhls: FaviconHls, wjls: Favicon, + wh: Favicon, drts: Favicon, designdrts: Favicon, hlsdrts: FaviconHls, @@ -821,6 +832,7 @@ export const ProjectCode = { xadt: 'XADT', designxadt: 'XADT', wjls: 'WJLS', + wh: 'WH', drts: 'DRTS', designdrts: 'DRTS', hlsdrts: 'DRTS', @@ -876,7 +888,7 @@ export const GetMapListByProjectList = ['xty', 'designxty', 'gzb', 'designgzb', 'nty', 'designnty', 'sdy', 'designsdy', 'ntyc', 'designntyc', 'ntyl', 'designntyl', 'designbjd', 'cgy', 'designcgy', 'zzww', 'zzwwtest', 'richor', 'richorlesson3d', 'richorjoint', 'designrichorjoint', 'nologo', 'designnologo', 'srsandbox', 'designsrsandbox', 'designhlsdrts', 'hlsdrts', 'jxgm', 'designjxgm', 'richorygy', 'designrichorygy', 'say', 'designsay', 'unittecsty', 'designunittecsty', 'richorhhcj', 'designrichorhhcj', 'teaching', 'designteaching', 'richorcxjs', - 'designrichorcxjs', 'hydrailway', 'designhydrailway']; + 'designrichorcxjs', 'hydrailway', 'designhydrailway', 'wh']; /** 案例展示隐藏的项目 */ export const CaseHideProjectList = ['heb', 'designheb', 'cgy', 'designcgy']; /** 登录页右下角版本开发基于不展示 */ @@ -987,7 +999,8 @@ export const ProjectList = [ {value: 'richor_hhcj', label: '红河财经'}, {value: 'teaching', label: '教学通用'}, {value: 'richor_cxjs', label: '长兴技校'}, - {value: 'hyd_railway', label: '哈盈达大铁'} + {value: 'hyd_railway', label: '哈盈达大铁'}, + {value: 'wh', label: '武汉8号线'} ]; /** 本地项目打包 */ export const localPackageProject = { diff --git a/src/scripts/cmdPlugin/CommandEnum.js b/src/scripts/cmdPlugin/CommandEnum.js index 703f71bc9..41216365f 100644 --- a/src/scripts/cmdPlugin/CommandEnum.js +++ b/src/scripts/cmdPlugin/CommandEnum.js @@ -92,7 +92,20 @@ export default { CMD_DRIVER_DOOR_MODE:{value:'Driver_Door_Mode', label:'列车门模式'}, CMD_DRIVER_DOOR_SELECTION:{value:'Driver_Door_Selection', label:'列车门选择'}, CMD_DRIVER_CONFIRM:{value:'Driver_Confirm', label:'确认'}, - CMD_DRIVER_STOP:{value: 'Driver_Stop', label: '停车'} + CMD_DRIVER_STOP:{value: 'Driver_Stop', label: '停车'}, + CMD_DRIVE_AHEAD:{value: 'Drive_Ahead', label: '确认运行至前方站'}, + CMD_ROUTE_BLOCK_DRIVE: {value: 'Route_Block_Drive', label: '进路闭塞法行车'}, + // CMD_DRIVE_THROUGH_THE_RED_LIGHT : {value: 'Drive_Through_The_Red_Light', label: '越红灯行驶'}, + // CMD_DRIVE_THROUGH_THE_GUIDE_SIGNAL : {value: 'Drive_Through_The_Guide_Signal', label: '越引导信号行驶'}, + CMD_OPEN_OR_CLOSE_DOOR : {value: 'Open_Or_Close_Door', label: '开关门'}, + // CMD_SET_SPEED_LIMIT : {value: 'Set_Speed_Limit', label: '设置限速'}, + // CMD_TURN_DIRECTION: {value: 'Turn_Direction', label: '换端'}, + CMD_DRIVE_TO : {value: 'Drive_To', label: '驾驶至'}, + CMD_INBOUND: {value: 'Inbound', label: '回库'}, + CMD_CHANGE_PRESELECTION_MODE: {value: 'Change_Preselection_Mode', label: '修改预选模式'}, + CMD_APPLY_NRM: {value: 'Apply_NRM', label: '转NRM模式'} + // CMD_DEPART_TRAIN: {value: 'Depart_Train', label: '发车'}, + // CMD_PARKING_TRAIN : {value: 'Parking_Train', label: '停车'} }, // 信号机操作 @@ -339,7 +352,7 @@ export default { /** 列车取消指定站台的跳停 */ CMD_TRAIN_CANCEL_SKIP_STOP : { value: 'Train_Cancel_Skip_Stop', label: '取消指定站台跳停' }, /** 换端 */ - CMD_TRAIN_TURN_DIRECTION: { value: 'Turn_Direction', label: '换端' }, + // CMD_TRAIN_TURN_DIRECTION: { value: 'Turn_Direction', label: '换端' }, /** 选择调度模式 */ CMD_TRAIN_REGULATION : { value:'Train_Regulation', label:'选择调度模式' }, /** 计算列车间隔 */ @@ -429,10 +442,22 @@ export default { CTC_LOG_SET_TRANSFINITE:{value: 'CTC_LOG_SET_TRANSFINITE', label: '设置超限'}, CTC_LOG_SAVE_RUN_PLAN:{value: 'CTC_LOG_SAVE_RUN_PLAN', label: '保存运行计划'}, - CTC_ADD_RUN_PLAN_LIST_TO_EDIT_AREA:{value: 'CTC_ADD_RUN_PLAN_LIST_TO_EDIT_AREA', label: '增加列车固定径路'}, + // CTC_ADD_RUN_PLAN_LIST_TO_EDIT_AREA:{value: 'CTC_ADD_RUN_PLAN_LIST_TO_EDIT_AREA', label: '增加列车固定径路'}, CTC_COVER_RUN_PLAN_LIST_TO_EDIT_AREA:{value: 'CTC_COVER_RUN_PLAN_LIST_TO_EDIT_AREA', label: '导入列车固定径路'}, - CTC_REMOVE_RUN_PLAN_FROM_EDIT_AREA:{value: 'CTC_REMOVE_RUN_PLAN_FROM_EDIT_AREA', label: '删除列车固定径路'}, - CTC_RELEASE_RUN_PLAN_TO_SIMULATION:{value: 'CTC_RELEASE_RUN_PLAN_TO_SIMULATION', label: '运行计划发布至CTC'}, + CTC_REGULAR_TRAIN_LINE_CLEAR:{value: 'REGULAR_TRAIN_LINE_CLEAR', label: '清空列车固定径路'}, + CTC_REGULAR_TRAIN_LINE_DELETE:{value: 'REGULAR_TRAIN_LINE_DELETE', label: '删除列车固定径路'}, + // CTC_RELEASE_RUN_PLAN_TO_SIMULATION:{value: 'RELEASE_RUN_PLAN_TO_SIMULATION', label: '运行计划发布至CTC'}, + CTC_REGULAR_TRAIN_LINE_PUBLISH:{value: 'REGULAR_TRAIN_LINE_PUBLISH', label: '列车固定径路发布生效区'}, + CTC_STATION_DETAIL_PUBLISH:{value: 'STATION_DETAIL_PUBLISH', label: '股道发布生效区'}, + CTC_STATION_DETAIL_LIST:{value: 'STATION_DETAIL_LIST', label: ' 获取股道列表'}, + CTC_REGULAR_TRAIN_LINE_LIST:{value: 'REGULAR_TRAIN_LINE_LIST', label: ' 获取固定列车径路'}, + CTC_STATION_DETAIL_EDIT:{value: 'STATION_DETAIL_EDIT', label: '修改股道信息'}, + CTC_STATION_IO_GATE_PUBLISH:{value: 'STATION_IO_GATE_PUBLISH', label: '出入口发布生效区'}, + CTC_STATION_IO_GATE_LIST:{value: 'STATION_IO_GATE_LIST', label: '获取出入口列表'}, + CTC_STATION_IO_GATE_EDIT:{value: 'STATION_IO_GATE_EDIT', label: '修改出入口'}, + CTC_REGULAR_TRAIN_LINE_EDIT:{value: 'REGULAR_TRAIN_LINE_EDIT', label: '增加列车固定径路'}, + CTC_REGULAR_TRAIN_LINE_BATCH:{value: 'REGULAR_TRAIN_LINE_BATCH', label: '批量增加列车固定径路'}, + CTC_SET_ROUTE:{value: 'CTC_SET_ROUTE', label: 'CTC办理进路'}, CTC_STATION_SIGN_RUN_PLAN:{value:'CTC_STATION_SIGN_RUN_PLAN', label: '车站签收阶段计划'}, @@ -459,5 +484,9 @@ export default { CMD_RAIL_FILL_IN_REGISTER: {value: 'RAIL_FILL_IN_REGISTER', label: '填写行车簿册'}, CMD_RAIL_QUERY_REGISTER: {value: 'RAIL_QUERY_REGISTER', label: '查询行车簿册'}, CMD_RAIL_GIVE_TICKET_TO: {value: 'RAIL_GIVE_TICKET_TO', label: '给出票据'} + }, + Conversation: { + CMD_Conversation_Chat_Text: {value: 'Conversation_Chat_Text', label: '发送文本消息'}, + CMD_Conversation_Chat_Audio_Base64: {value: 'Conversation_Chat_Audio_Base64', label: '发送语音消息'} } }; diff --git a/src/scripts/cmdPlugin/CommandHandler.js b/src/scripts/cmdPlugin/CommandHandler.js index 768043571..e8961c27d 100644 --- a/src/scripts/cmdPlugin/CommandHandler.js +++ b/src/scripts/cmdPlugin/CommandHandler.js @@ -77,6 +77,42 @@ class CommandHandle { Driver_Stop: { operate: 'Driver_Stop', paramList: [{name: 'groupNumber'}, {name: 'eb'}] + }, + Depart_Train: { + operate: 'Depart_Train', + paramList: [{name: 'groupNumber'}] + }, + Drive_Ahead: { + operate: 'Drive_Ahead', + paramList: [{name: 'groupNumber'}] + }, + Route_Block_Drive: { + operate: 'Route_Block_Drive', + paramList: [{name: 'groupNumber'}] + }, + Open_Or_Close_Door: { + operate: 'Open_Or_Close_Door', + paramList: [{name: 'groupNumber'}] + }, + Change_Preselection_Mode: { + operate: 'Change_Preselection_Mode', + paramList: [{name: 'groupNumber'}, {name: 'preselectionMode'}] + }, + Apply_NRM: { + operate: 'Apply_NRM', + paramList: [{name: 'groupNumber'}] + }, + Inbound: { + operate: 'Inbound', + paramList: [{name: 'groupNumber'}] + }, + RAIL_QUERY_REGISTER: { + operate: 'RAIL_QUERY_REGISTER', + paramList: [{name: 'stationCode'}] + }, + RAIL_FILL_IN_REGISTER: { + operate: 'RAIL_FILL_IN_REGISTER', + paramList: [{name: 'stationCode'}, {name: 'line'}] } } }; diff --git a/src/scripts/cmdPlugin/OperationHandler.js b/src/scripts/cmdPlugin/OperationHandler.js index ac0303f1e..4d750df27 100644 --- a/src/scripts/cmdPlugin/OperationHandler.js +++ b/src/scripts/cmdPlugin/OperationHandler.js @@ -3958,8 +3958,70 @@ export const OperationEvent = { operation: '1149', domId: '_Tips-CTC-logSaveRunplan-Menu{TOP}' } + }, + // 获取股道列表 + getStationTrack:{ + menu: { + operation: '1150', + domId: 'getStationTrackTerminalStationTree' + } + }, + // 获取固定列车径路列表 + getTrainFixedPath:{ + menu: { + operation: '1151', + domId: 'getTrainFixedPathTerminalStationTree' + } + }, + // 清空列车固定径路 + clearTrainFixedPath:{ + menu: { + operation: '1152', + domId: '_Tips-CTC-clearTrainFixedPath-Menu{TOP}' + } + }, + // 股道发布生效区 + releaseStationTrack:{ + menu: { + operation: '1153', + domId: '_Tips-CTC-releaseStationTrack-Menu{TOP}' + } + }, + // 修改股道信息 + modifyStationTrack:{ + menu: { + operation: '1154', + domId: '_Tips-CTC-modifyStationTrack-Menu{TOP}' + } + }, + // 出入口发布生效区 + releaseStationDirection:{ + menu: { + operation: '1155', + domId: '_Tips-CTC-releaseStationDirection-Menu{TOP}' + } + }, + // 获取出入口列表 + getStationDirection:{ + menu: { + operation: '1156', + domId: '_Tips-CTC-getStationDirection-Menu{TOP}' + } + }, + // 修改出入口 + modifyStationDirection:{ + menu: { + operation: '1157', + domId: '_Tips-CTC-modifyStationDirection-Menu{TOP}' + } + }, + // 批量增加列车固定径路 + batchTrainFixedPath:{ + menu: { + operation: '1158', + domId: '_Tips-CTC-batchTrainFixedPath-Menu{TOP}' + } } - // // CTC_ZONE_SAVE_TRIP_NUMBER // CTC_ZONE_SAVE_STATION }, @@ -3994,6 +4056,86 @@ export const OperationEvent = { domId: '_Tips-Rail-railGiveTicketTo' } } + }, + Driver: { + driveAhead: { + menu: { + operation: '1301', + domId: '_Tips-Driver-driveAhead' + } + }, + routeBlockDrive: { + menu: { + operation: '1302', + domId: '_Tips-Driver-routeBlockDrive' + } + }, + driveThroughTheRedLight: { + menu: { + operation: '1303', + domId: '_Tips-Driver-driveThroughTheRedLight' + } + }, + driveThroughTheGuideSignal: { + menu: { + operation: '1304', + domId: '_Tips-Driver-driveThroughTheGuideSignal' + } + }, + openOrCloseDoor: { + menu: { + operation: '1305', + domId: '_Tips-Driver-openOrCloseDoor' + } + }, + setSpeedLimit: { + menu: { + operation: '1306', + domId: '_Tips-Driver-setSpeedLimit' + } + }, + // turnDirection: { + // menu: { + // operation: '1307', + // domId: '_Tips-Driver-turnDirection' + // } + // }, + driveTo: { + menu: { + operation: '1308', + domId: '_Tips-Driver-driveTo' + } + }, + inbound: { + menu: { + operation: '1309', + domId: '_Tips-Driver-inbound' + } + }, + changePreselectionMode: { + menu: { + operation: '130a', + domId: '_Tips-Driver-changePreselectionMode' + } + }, + applyNrm: { + menu: { + operation: '130b', + domId: '_Tips-Driver-applyNrm' + } + }, + departTrain: { + menu: { + operation: '130c', + domId: '_Tips-Driver-departTrain' + } + }, + parkingTrain: { + menu: { + operation: '130d', + domId: '_Tips-Driver-parkingTrain' + } + } } }; diff --git a/src/scripts/cmdPlugin/ValidateHandler.js b/src/scripts/cmdPlugin/ValidateHandler.js index 5ff0d1639..6d5a1831c 100644 --- a/src/scripts/cmdPlugin/ValidateHandler.js +++ b/src/scripts/cmdPlugin/ValidateHandler.js @@ -32,7 +32,6 @@ class ValidateHandler { const order = Handler.getOrder(); let valid = false; - console.log(operate, steps[order]); if (operate.over && steps.length == 1) { // 右键菜单直接发送校验 if (operate && steps[0] && operate.code == steps[0].code && diff --git a/src/scripts/translate.js b/src/scripts/translate.js index f9f46434c..b77fe827a 100644 --- a/src/scripts/translate.js +++ b/src/scripts/translate.js @@ -250,6 +250,7 @@ export const translate = { { key: 'kmRangeRight', tHeader: '右侧公里标(米)', formatter: (val) => { return val ? Number(val) : 0; } }, { key: 'region', tHeader: '区间编码', formatter: (val) => { return val || ''; } }, { key: 'isStandTrack', tHeader: '是否站台轨', formatter: (val) => { return val || false; } }, + { key: 'hasStopCD', tHeader: '是否停车倒计时', formatter: (val) => { return val || false; } }, { key: 'isReentryTrack', tHeader: '是否折返轨', formatter: (val) => { return val || false; } }, { key: 'isSwitchSection', tHeader: '是否道岔区段', formatter: (val) => { return val || false; } }, { key: 'isTransferTrack', tHeader: '是否转换轨', formatter: (val) => { return val || false; } }, @@ -264,6 +265,7 @@ export const translate = { { key: 'destinationCodePoint', tHeader: '目的地码坐标', formatter: (val) => { return val ? JSON.parse(val) : ''; } }, { key: 'standTrackName', tHeader: '站台轨名称', formatter: (val) => { return val || ''; } }, { key: 'standTrackNamePosition', tHeader: '站台轨名称坐标', formatter: (val) => { return val ? JSON.parse(val) : ''; } }, + { key: 'stopCDPosition', tHeader: '停车倒计时偏移量', formatter: (val) => { return val ? JSON.parse(val) : ''; } }, { key: 'transferTrackName', tHeader: '转换轨名称', formatter: (val) => { return val || ''; } }, { key: 'transferTrackNamePosition', tHeader: '转换轨名称坐标', formatter: (val) => { return val ? JSON.parse(val) : ''; } }, { key: 'isCurve', tHeader: '是否曲线', formatter: (val) => { return val || false; } } diff --git a/src/store/index.js b/src/store/index.js index e5553b3e4..2b18f7145 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -18,6 +18,7 @@ import order from './modules/order'; import iscs from './modules/iscs'; import rpTools from './modules/rpTools'; import race from './modules/race'; +import trainingNew from './modules/trainingNew'; import getters from './getters'; @@ -42,7 +43,8 @@ const store = new Vuex.Store({ order, iscs, rpTools, - race + race, + trainingNew }, getters }); diff --git a/src/store/modules/socket.js b/src/store/modules/socket.js index 1f73bf0fe..cdde0e7b1 100644 --- a/src/store/modules/socket.js +++ b/src/store/modules/socket.js @@ -96,6 +96,9 @@ function handle(state, data) { case 'Simulation_Conversation': // 仿真-用户交互消息(聊天/命令) handleSimulationInfo(state, msg); break; + case 'Simulation_Conversation_Operation': // 仿真-用户交互消息(聊天/命令)-新 + handleSimulationInfo(state, {id: msg.id, message: msg, messageType: 'MESSAGE'}); + break; case 'Simulation_PlayBack_Conversation': // 回放-用户交互消息 handleSimulationInfo(state, msg); break; @@ -283,6 +286,10 @@ function handle(state, data) { case 'SIMULATION_RAIL_TICKET': state.ticketInfo = msg; break; + // 实训提示消息 + case 'Simulation_Training_Step_Tip': + state.trainingStepTip = msg; + break; // // // 大铁项目 调度台 运行图信息 初始化消息 // case 'SIMULATION_RAILWAY_RUN_PLAN_INIT': @@ -469,7 +476,8 @@ const socket = { railwaySimulationRunplanSendMap:{}, // 大铁项目 调度台 发布 行车计划 railwaySimulationRunplanSendChange:0, // 大铁项目 调度台 发布 行车计划变化 voiceBroadcastMsgs: [], // 语音播报信息 - voiceBroadcastChange: 0 // 语音播报信息变化 + voiceBroadcastChange: 0, // 语音播报信息变化 + trainingStepTip: '' // 新实训推送消息 // railwaySimulationRpMsg:{}, // 大铁项目 调度台 调度台 // railwaySimulationRpChange:0 // 大铁项目 调度台 运行图信息变化 }, @@ -577,6 +585,9 @@ const socket = { const code = element.stationCode + '' + element.code; state.railCtcRunplanInitMsg[code] = element; }); + }, + clearTrainingStepTip: (state) => { + state.trainingStepTip = ''; } }, @@ -680,6 +691,9 @@ const socket = { }, initRailCtcRunplanInitMsg:({ commit }, list) => { commit('initRailCtcRunplanInitMsg', list); + }, + clearTrainingStepTip: ({ commit }) => { + commit('clearTrainingStepTip'); } } }; diff --git a/src/store/modules/trainingNew.js b/src/store/modules/trainingNew.js new file mode 100644 index 000000000..4f2bc0d05 --- /dev/null +++ b/src/store/modules/trainingNew.js @@ -0,0 +1,45 @@ +const training = { + namespaced: true, + state: { + teachMode: '', // 实训模式 + trainingDetail: null, // 实训详情 + trainingSwitch: false // 实训开始结束标志 + }, + getters: { + teachMode: (state) => { + return state.teachMode; + }, + trainingDetail: (state) => { + return state.trainingDetail; + }, + trainingSwitch: (state) => { + return state.trainingSwitch; + } + }, + mutations: { + changeTeachMode: (state, teachMode) => { + state.teachMode = teachMode; + }, + setTrainingDetail: (state, detail) => { + state.trainingDetail = detail; + }, + setTrainingSwitch: (state, flag) => { + state.trainingSwitch = flag; + } + }, + actions: { + changeTeachMode: ({ commit }, teachMode) => { + commit('changeTeachMode', teachMode); + }, + setTrainingDetail: ({ commit }, detail) => { + commit('setTrainingDetail', detail); + }, + trainingStart: ({commit}) => { + commit('setTrainingSwitch', true); + }, + trainingEnd: ({commit}) => { + commit('setTrainingSwitch', false); + } + } +}; +export default training; diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index b27593aec..a1a9e525a 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -24,14 +24,14 @@ export function handlerUrl(data) { if (process.env.NODE_ENV === 'development') { // const data = null; // BASE_API = 'https://joylink.club/jlcloud'; - BASE_API = 'https://test.joylink.club/jlcloud'; + // BASE_API = 'https://test.joylink.club/jlcloud'; // BASE_API = 'http://192.168.3.233/rtss-server'; // BASE_API = 'http://114.116.51.125/jlcloud'; // BASE_API = 'http://192.168.8.152:9000'; // 袁琪 // BASE_API = 'http://192.168.3.94:9000'; // 旭强 // BASE_API = 'http://192.168.3.15:9000'; // 张赛 - // BASE_API = 'http://192.168.8.140:9000'; // 杜康 - // BASE_API = 'http://192.168.3.37:9000'; // 卫志宏 + // BASE_API = 'http://192.168.3.5:9000'; // 夏增彬 + BASE_API = 'http://192.168.3.37:9000'; // 卫志宏 // BASE_API = 'http://b29z135112.zicp.vip'; // BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康 // BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛 @@ -66,5 +66,6 @@ export function handlerUrl(data) { UPLOAD_API = 'http://joylink.club/jlfile'; BASE_SITE = 'https://joylink.club/cbtc'; } - return {BASE_API, VOICE_API, UPLOAD_API, BASE_SITE}; + const PROD_API = 'https://joylink.club/jlcloud'; + return {BASE_API, VOICE_API, UPLOAD_API, BASE_SITE, PROD_API}; } diff --git a/src/utils/request.js b/src/utils/request.js index 5049fbb20..f31c561f9 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -32,7 +32,9 @@ service.interceptors.request.use(config => { if (config.upload) { config.baseURL = urlData.UPLOAD_API; } - + if (config.production) { + config.baseURL = urlData.PROD_API; + } if (config.time) { config.timeout = config.time; // 让每个请求携带自定义token 请根据实际情况自行修改 } diff --git a/src/utils/stomp.js b/src/utils/stomp.js index 77d0f668c..a97a55091 100644 --- a/src/utils/stomp.js +++ b/src/utils/stomp.js @@ -52,7 +52,9 @@ export function creatSubscribe(topic, header) { if (!Vue.prototype.$stomp) { Vue.prototype.$stomp = new StompClient(); } - Vue.prototype.$stomp.subscribe(topic, callback, header); + if (!Vue.prototype.$stomp.subscribeMap[topic]) { + Vue.prototype.$stomp.subscribe(topic, callback, header); + } } catch (error) { console.error('websocket订阅失败', error, topic, header); } diff --git a/src/views/bigTrainRunplanManage/addRunplan.vue b/src/views/bigTrainRunplanManage/addRunplan.vue index 090857746..dba9dcc5f 100644 --- a/src/views/bigTrainRunplanManage/addRunplan.vue +++ b/src/views/bigTrainRunplanManage/addRunplan.vue @@ -4,16 +4,16 @@ class="datie-02__systerm" :title="title" :visible.sync="show" - width="460px" + width="500px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false" >
- + - + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - - + + + + 技术停点 + 交令 + 机车 + 货检 + 乘降 + 摘挂 + 换乘 + 装卸 + 吸污 + 道口 + 车号 + 上水 + 列检 + 综控 + 站务 + 交票 + 列尾 +
@@ -123,30 +142,54 @@ export default { return { dialogShow: false, loading: false, - mapStationDirectionList:[], + title:'', + // mapStationDirectionList:[], + mapStationDirectionMap:{}, + enterDirList:[], // 入口列表 + outDirList:[], filterSectionList:[], addModel:{ - stationCode:'', // 车站编码 - trackSectionCode:'', // 运行计划的默认股道 - arriveTripNumber:'', // 到达车次 - departTripNumber:'', // 出发车次 + code:'', // 只有修改的时候需要添加此参数 + stationCode:'', // 车站编码code + masterCode:'', // 股道code + arriveTipNum:'', // 到达车次 + leaveTipNum:'', // 出发车次 arriveTime:'', // 到达时间 - departTime:'', // 出发时间 - arriveDirectionCode:'', // 入口 - departDirectionCode:'', // 出口 - arriveStationCode:'', // 到达车站 - departStationCode:'' // 出发车站 + leaveTime:'', // 出发时间 + enterDirCode:'', // 入口 + outDirCode:'', // 出口 + fontStationCode:'', // 前方车站 + backStationCode:'', // 后方车站 + appendData:{ // 附加数据 + ZHUANGXIE:false, // 装卸 + LIEJIAN:false, // 列检 + JIAO_LING:false, // 交令 + ZONGKONG:false, // 综控 + XIWU:false, // 吸污 + HUOJIAN:false, // 货检 + CHENGJIANG:false, // 乘降 + JISHU_STOP:false, // 技术停点 + JIAOPIAO:false, // 交票 + HUANCHENG:false, // 换乘 + SHANGSHUI:false, // 上水 + ZHANWU:false, // 站务 + ZHAIGUA:false, // 摘挂 + LIEWEI:false, // 列尾 + DAOKOU:false, // 道口 + JICHE:false, // 机车 + CHEHAO:false // 车号 + } }, rules: { // trackSectionCode: [ // { required: true, message: '请选择股道', trigger: 'blur' }, // { required: true, message: '请选择股道', trigger: 'change' } // ], - arriveTripNumber:[ + arriveTipNum:[ { required: true, validator: validateTripNumber, trigger: 'blur' } // message: '请输入到达车次' ], - departTripNumber:[ + leaveTipNum:[ { required: true, validator: validateTripNumber, trigger: 'blur' } ] // message: '请输入出发车次' @@ -189,35 +232,76 @@ export default { }, domIdConfirm() { return this.dialogShow ? OperationEvent.CTCCommand.addTrainFixedPath.menu.domId : ''; - }, - title() { - return '列车固定径路'; } }, methods:{ - doShow({stationCode, filterSectionMap, mapStationDirectionMap}) { - this.mapStationDirectionList = Object.values(mapStationDirectionMap); + doShow({stationCode, filterSectionMap, mapStationDirectionMap, row}) { + this.mapStationDirectionMap = mapStationDirectionMap; + const mapStationDirectionList = Object.values(mapStationDirectionMap); + this.enterDirList = mapStationDirectionList.filter(stationDirection=>{ + return stationDirection.runStatus == 'R'; + }); + this.outDirList = mapStationDirectionList.filter(stationDirection=>{ + return stationDirection.runStatus == 'D'; + }); + if (row) { + this.addModel = Object.assign({}, row); + this.title = '修改列车固定径路'; + } else { + this.title = '增加列车固定径路'; + this.addModel.stationCode = stationCode; + } this.filterSectionList = Object.values(filterSectionMap); this.dialogShow = true; - this.addModel.stationCode = stationCode; this.$nextTick(function () { this.$store.dispatch('training/emitTipFresh'); }); }, + changeEnterDirCode(code) { + const mapStationDirection = this.mapStationDirectionMap[code]; + this.addModel.backStationCode = mapStationDirection.relativeStationCode; + }, + changeOutDirCode(code) { + const mapStationDirection = this.mapStationDirectionMap[code]; + this.addModel.fontStationCode = mapStationDirection.relativeStationCode; + }, doClose() { this.loading = false; this.dialogShow = false; this.addModel = { - stationCode:'', // 车站编码 - trackSectionCode:'', // 运行计划的默认股道 - arriveTripNumber:'', // 到达车次 - departTripNumber:'', // 出发车次 + code:'', // 只有修改的时候需要添加此参数 + stationCode:'', // 车站编码code + masterCode:'', // 股道code + arriveTipNum:'', // 到达车次 + leaveTipNum:'', // 出发车次 arriveTime:'', // 到达时间 - departTime:'', // 出发时间 - arriveDirectionCode:'', // 入口 - departDirectionCode:'', // 出口 - arriveStationCode:'', // 到达车站 - departStationCode:'' // 出发车站 + leaveTime:'', // 出发时间 + enterDirCode:'', // 车站入口 + outDirCode:'', // 出口 + fontStationCode:'', // 前方车站 + backStationCode:'', // 后方车站 + // 以下参数使用前端自己的缓存数据,取logicDataNew下面的DraftMapStationDirectionList的参数: + // 1.runStatus接发口类型 R=接车,D=发车,NO=无2.relativeStationCode + // 相对车站code接车时此code指的是后方车站发车时此code指的是前方车站 + appendData:{ // 附加数据 + ZHUANGXIE:false, // 装卸 + LIEJIAN:false, // 列检 + JIAO_LING:false, // 交令 + ZONGKONG:false, // 综控 + XIWU:false, // 吸污 + HUOJIAN:false, // 货检 + CHENGJIANG:false, // 乘降 + JISHU_STOP:false, // 技术停点 + JIAOPIAO:false, // 交票 + HUANCHENG:false, // 换乘 + SHANGSHUI:false, // 上水 + ZHANWU:false, // 站务 + ZHAIGUA:false, // 摘挂 + LIEWEI:false, // 列尾 + DAOKOU:false, // 道口 + JICHE:false, // 机车 + CHEHAO:false // 车号 + } }; this.$refs.form && this.$refs.form.resetFields(); this.$store.dispatch('training/emitTipFresh'); @@ -226,10 +310,12 @@ export default { this.$refs.form.validate((valid) => { if (valid) { this.loading = true; - const param = {stationCode:this.addModel.stationCode, runPlanParamList:[this.addModel]}; + const param = Object.assign({}, this.addModel); + if (this.title == '增加列车固定径路') { delete param.code; } commitOperate(menuOperate.CTC.addTrainFixedPath, param, 3).then(({valid})=>{ if (valid) { this.doClose(); + this.$emit('refresh'); } }).catch(() => { this.doClose(); @@ -257,7 +343,7 @@ export default { .DpRunplanPane{margin-bottom: 15px;} .DpRunplanPane .el-form-item{ display:inline-block; - width:210px; + // width:210px; margin-bottom:20px; } .DpRunplanPane .el-form-item__content{ @@ -343,6 +429,9 @@ export default { .datie-02__systerm .el-dialog .el-checkbox__label { color: #000 !important; + padding-left: 5px; + vertical-align: top; + line-height: 23px; } .datie-02__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__inner { @@ -370,6 +459,9 @@ export default { left: 4px; top: 1px; } + .eachAppendData{ + display:inline-block; + } // .chengdou-03__systerm .el-dialog .el-radio__inner { // border: 1px inset #dcdfe6 !important; diff --git a/src/views/bigTrainRunplanManage/batchTrainFxPath.vue b/src/views/bigTrainRunplanManage/batchTrainFxPath.vue new file mode 100644 index 000000000..8a2f04acb --- /dev/null +++ b/src/views/bigTrainRunplanManage/batchTrainFxPath.vue @@ -0,0 +1,306 @@ + + + diff --git a/src/views/bigTrainRunplanManage/directionInformation.vue b/src/views/bigTrainRunplanManage/directionInformation.vue new file mode 100644 index 000000000..e6a437e8e --- /dev/null +++ b/src/views/bigTrainRunplanManage/directionInformation.vue @@ -0,0 +1,170 @@ + + + + + diff --git a/src/views/bigTrainRunplanManage/index.vue b/src/views/bigTrainRunplanManage/index.vue index cdf6d8d35..b4cc585f1 100644 --- a/src/views/bigTrainRunplanManage/index.vue +++ b/src/views/bigTrainRunplanManage/index.vue @@ -3,7 +3,7 @@
车站股道
-
车站出入口
+
车站出入口
列车固定路径
车站用户管理
备份区名称
@@ -37,6 +37,7 @@ import { getToken } from '@/utils/auth'; import StationTrack from './stationTrack'; import TrainFixedPath from './trainFixedPath'; +import StationDirection from './stationDirection'; import { loadMapDataById } from '@/utils/loaddata'; import { creatSubscribe, clearSubscribe, getTopic, displayTopic } from '@/utils/stomp'; import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'; @@ -97,7 +98,7 @@ export default { this.currentTabs = tabs.filter(tab => tab.name !== targetName); }, addTab(name) { - const nameMap = {'StationTrack':{title:'车站股道', component:StationTrack }, 'TrainFixedPath':{title:'列车固定路径', component:TrainFixedPath}}; + const nameMap = {'StationTrack':{title:'车站股道', component:StationTrack }, 'TrainFixedPath':{title:'列车固定路径', component:TrainFixedPath}, 'StationDirection':{title:'出入口', component:StationDirection}}; const findTab = this.currentTabs.find(tab=>{ return tab.name == name; }); diff --git a/src/views/bigTrainRunplanManage/stationDirection.vue b/src/views/bigTrainRunplanManage/stationDirection.vue new file mode 100644 index 000000000..d1537c88c --- /dev/null +++ b/src/views/bigTrainRunplanManage/stationDirection.vue @@ -0,0 +1,221 @@ + + + + diff --git a/src/views/bigTrainRunplanManage/stationTrack.vue b/src/views/bigTrainRunplanManage/stationTrack.vue index f83eaf113..bea9c169d 100644 --- a/src/views/bigTrainRunplanManage/stationTrack.vue +++ b/src/views/bigTrainRunplanManage/stationTrack.vue @@ -2,7 +2,7 @@
- +
@@ -13,7 +13,7 @@
版本号 备份 - 更新至生效区 + 更新至生效区 导入 比较
@@ -37,18 +37,31 @@ label="序号" width="100" /> + + + > + + + + + + + +
- +
+ diff --git a/src/views/designPlatform/trainingDesign.vue b/src/views/designPlatform/trainingDesign.vue new file mode 100644 index 000000000..a11058c73 --- /dev/null +++ b/src/views/designPlatform/trainingDesign.vue @@ -0,0 +1,170 @@ + + + diff --git a/src/views/designPlatform/trainingList.vue b/src/views/designPlatform/trainingList.vue new file mode 100644 index 000000000..bbca1a900 --- /dev/null +++ b/src/views/designPlatform/trainingList.vue @@ -0,0 +1,165 @@ + + + + diff --git a/src/views/designPlatform/trainingPreview.vue b/src/views/designPlatform/trainingPreview.vue new file mode 100644 index 000000000..551579c76 --- /dev/null +++ b/src/views/designPlatform/trainingPreview.vue @@ -0,0 +1,220 @@ + + + diff --git a/src/views/designPlatform/trainingTip.vue b/src/views/designPlatform/trainingTip.vue new file mode 100644 index 000000000..44d8de8ee --- /dev/null +++ b/src/views/designPlatform/trainingTip.vue @@ -0,0 +1,40 @@ + + + + + + diff --git a/src/views/dispatcherLoger/index.vue b/src/views/dispatcherLoger/index.vue index 11db9a439..f994a6062 100644 --- a/src/views/dispatcherLoger/index.vue +++ b/src/views/dispatcherLoger/index.vue @@ -295,13 +295,13 @@ export default { } }); }, + changeArriveRunPlan(event, row, index) { this.modifyDispatcherLogerRpSection(row, row.arriveSectionCode, 'R'); }, changeDepartRunPlan(event, row, index) { this.modifyDispatcherLogerRpSection(row, row.departSectionCode, 'D'); }, - // changeArrivePlanTime(event, row, index) { this.modifyDispatcherLogerRpPlanTime(row, row.arrivePlanTime, 'R'); @@ -315,6 +315,7 @@ export default { changeDepartDirectionCode(event, row, index) { this.modifyDispatcherLogerRpDirection(row, row.departDirectionCode, 'D'); }, + // 调度台行车计划修改出入口 modifyDispatcherLogerRpDirection(row, directionCode, type) { const params = {stationCode:row.stationCode, runPlanCode:row.runPlanCode, directionCode:directionCode, model:type}; diff --git a/src/views/newMap/chatView/chatContent.vue b/src/views/newMap/chatView/chatContent.vue index 68bf4fc04..2b5d953de 100644 --- a/src/views/newMap/chatView/chatContent.vue +++ b/src/views/newMap/chatView/chatContent.vue @@ -7,7 +7,12 @@
{{ covertName(chatContent.memberId) }}
{{ covertTime(chatContent.time) }}
-
+
+
+ {{ chatContent.content }} +
+
+
@@ -20,9 +25,9 @@
-
+
@@ -220,28 +225,29 @@ export default { margin-left: 10px; margin-top: 10px; display: inline-block; + max-width: 80%; } .rightUser{ float: right; margin-right: 10px; margin-top: 10px; display: inline-block; + max-width: 80%; } .userHeader{margin-bottom: 2px;} .userName{font-size: 12px;display:inline-block;margin-right:10px;} .userChatTime{font-size: 12px;display:inline-block;} .userBubble{ font-size: 12px; - // max-width: 200px; // padding: 10px; padding: 5px 10px 6px 10px; - width: 140px; + min-width: 140px; background: #ccc; border-radius: 5px; cursor: pointer; display:inline-block; - height: 30px; - overflow: hidden; + // height: 30px; + // overflow: hidden; } .playicon{ font-size: 20px; @@ -307,9 +313,12 @@ export default { .userMessage{ position: relative; } -.messageText{line-height: 20px;} +.messageText{ + line-height: 20px; + word-break: break-all; +} .chatContentInClass{ - display: inline-block; + display: inline-block; width: 100%; } diff --git a/src/views/newMap/chatView/voiceChatBox.vue b/src/views/newMap/chatView/voiceChatBox.vue new file mode 100644 index 000000000..09276a89c --- /dev/null +++ b/src/views/newMap/chatView/voiceChatBox.vue @@ -0,0 +1,1221 @@ + + + + diff --git a/src/views/newMap/displayNew/demonChat.vue b/src/views/newMap/displayNew/demonChat.vue index 42bb23329..665be16a3 100644 --- a/src/views/newMap/displayNew/demonChat.vue +++ b/src/views/newMap/displayNew/demonChat.vue @@ -1,6 +1,13 @@