diff --git a/.eslintrc.js b/.eslintrc.js index 8a6e863bc..01fef3a03 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -25,31 +25,31 @@ module.exports = { "vue/no-v-html": "off", 'accessor-pairs': 2, "arrow-spacing": 0,//=>的前/后括号 - 'block-spacing': [2, 'always'], - 'brace-style': [2, '1tbs', { + 'block-spacing': [2, 'always'], // 禁止或强制在代码块中开括号前和闭括号后有空格 { return 11 } + 'brace-style': [2, '1tbs', { // 强制在代码块中使用一致的大括号风格 'allowSingleLine': true }], - 'camelcase': [0, { + 'camelcase': [0, { // 强制使用驼峰拼写法命名规定 'properties': 'always' }], - 'comma-dangle': [2, 'never'], - 'comma-spacing': [2, { + 'comma-dangle': [2, 'never'], // 要求或禁止末尾逗号 + 'comma-spacing': [2, { // 强制在逗号前后使用一致的空格 'before': false, 'after': true }], - 'comma-style': [2, 'last'], - 'constructor-super': 2, - 'curly': [2, 'multi-line'], - 'dot-location': [2, 'property'], - 'eol-last': 2, + 'comma-style': [2, 'last'], // 强制在逗号前后使用一致的空格 + 'constructor-super': 2, // 要求在构造函数中有super()调用 + 'curly': [2, 'multi-line'], // 强制所有控制语句使用一致的括号风格 + 'dot-location': [2, 'property'], // 强制在点号之前和之后一致的换行 + 'eol-last': 2, // 禁止文件末尾存在空行禁止文件末尾存在空行 'generator-star-spacing': [2, { 'before': true, 'after': true }], 'handle-callback-err': [2, '^(err|error)$'], - 'indent': ["error", "tab"], - 'jsx-quotes': [2, 'prefer-single'], - 'key-spacing': [2, { + 'indent': [2, 4], // 强制使用一致的缩进 + 'jsx-quotes': [2, 'prefer-single'], // 强制在JSX属性中一致地使用双引号或单引号 + 'key-spacing': [0, { // 强制要求在对象字面量的属性中键和值之间使用一致的间距 'beforeColon': false, 'afterColon': true }], @@ -58,8 +58,8 @@ module.exports = { 'after': true }], "new-cap": 2,//函数名首行大写必须使用new方式调用,首行小写必须用不带new方式调用 - 'new-parens': 2, - 'no-array-constructor': 2, + 'new-parens': 2, // 要求构造无参构造函数时有圆括号 + 'no-array-constructor': 2, // 禁用Array构造函数 'no-caller': 2, 'no-console': 'off', 'no-class-assign': 2, @@ -94,9 +94,10 @@ module.exports = { }], 'no-lone-blocks': 2, "no-mixed-spaces-and-tabs": [2, false],//禁止混用tab和空格 - "no-multi-spaces": 1,//不能用多余的空格 + "no-multi-spaces": 1,// 不能用多余的空格 'no-multi-str': 2, - 'no-multiple-empty-lines': [2, { + 'no-multiple-empty-lines': [2, { // 禁止出现多行空行 + // 最大连续空行数 'max': 1 }], 'no-native-reassign': 2, @@ -121,7 +122,7 @@ module.exports = { 'no-sparse-arrays': 2, 'no-this-before-super': 2, 'no-throw-literal': 2, - "no-trailing-spaces": 1,//一行结束后面不要有空格 + "no-trailing-spaces": 1,// 禁止行尾空格 'no-undef': 2, 'no-undef-init': 2, 'no-unexpected-multiline': 2, @@ -139,7 +140,7 @@ module.exports = { 'no-useless-computed-key': 2, 'no-useless-constructor': 2, 'no-useless-escape': 0, - 'no-whitespace-before-property': 2, + 'no-whitespace-before-property': 2, // 禁止属性前有空白 'no-with': 2, 'one-var': [2, { 'initialized': 'never' @@ -150,21 +151,21 @@ module.exports = { ':': 'before' } }], - "padded-blocks": 0,//块语句内行首行尾是否要空行 + "padded-blocks": 0, // 块语句内行首行尾是否要空行 'quotes': [2, 'single', { 'avoidEscape': true, 'allowTemplateLiterals': true }], - 'semi': [2, 'always'], //语句强制分号结尾 - 'semi-spacing': [2, { + 'semi': [2, 'always'], // 语句强制分号结尾 + 'semi-spacing': [2, { // 强制分号之前和之后使用一致的空格 'before': false, 'after': true }], "strict": 2,//使用严格模式 - 'space-before-blocks': [2, 'always'], //不以新行开始的块{前面要不要有空格 - "space-before-function-paren": [0, "always"],//函数定义时括号前面要不要有空格 - "space-in-parens": [0, "never"],//小括号里面要不要有空格 - "space-infix-ops": 0,//中缀操作符周围要不要有空格 + 'space-before-blocks': [2, 'always'], // 不以新行开始的块{前面要不要有空格 强制在块之前使用一致的空格 + "space-before-function-paren": [0, "always"],// 函数定义时括号前面要不要有空格 + "space-in-parens": [0, "never"],// 小括号里面要不要有空格 + "space-infix-ops": 2,// 要求操作符周围有空格 'space-unary-ops': [2, { 'words': true, 'nonwords': false @@ -172,7 +173,7 @@ module.exports = { 'spaced-comment': [2, 'always', { 'markers': ['global', 'globals', 'eslint', 'eslint-disable', '*package', '!', ','] }], //注释风格要不要有空格什么的 - 'template-curly-spacing': [2, 'never'], + // 'template-curly-spacing': [2, 'never'], 'use-isnan': 2, //禁止比较时使用NaN,只能用isNaN() 'valid-typeof': 2, //必须使用合法的typeof的值 "wrap-iife": [2, "inside"],//立即执行函数表达式的小括号风格 @@ -180,7 +181,7 @@ module.exports = { 'yoda': [2, 'never'], //禁止尤达条件 'prefer-const': 2, 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0, - "object-curly-spacing": [0, "never"],//大括号内是否允许不必要的空格 - "array-bracket-spacing": [2, "never"], //是否允许非空数组里面有多余的空格 + "object-curly-spacing": [0, "never"], // 强制在大括号中使用一致的空格 + "array-bracket-spacing": [2, "never"], // 禁止或强制在括号内使用空格 } } diff --git a/public/favicon.png b/public/favicon.png index e250916ab..0af73dedc 100644 Binary files a/public/favicon.png and b/public/favicon.png differ diff --git a/src/App.vue b/src/App.vue index fe435c8d0..297ff87f8 100644 --- a/src/App.vue +++ b/src/App.vue @@ -7,53 +7,67 @@ diff --git a/src/api/chat.js b/src/api/chat.js index b567e69c5..bc2dd4e5f 100644 --- a/src/api/chat.js +++ b/src/api/chat.js @@ -238,3 +238,29 @@ export function getPermissionJoint(group) { } }); } + +// 添加或更新真实设备和仿真对象连接 +export function setRealDevice(group, data) { + return request({ + url: `/api/jointTraining/room/realDevice?group=${group}`, + method: 'post', + data: data + }); +} + +// 删除真实设备和仿真对象连接 +export function delRealDevice(id, group) { + return request({ + url: `/api/jointTraining/room/realDevice/${id}`, + method: 'delete', + params: { group: group } + }); +} + +// 获取真实设备列表 +export function getRealDevices(group) { + return request({ + url: `/api/jointTraining/room/${group}/devices`, + method: 'get' + }); +} diff --git a/src/api/designPlatform.js b/src/api/designPlatform.js new file mode 100644 index 000000000..ac86826f4 --- /dev/null +++ b/src/api/designPlatform.js @@ -0,0 +1,188 @@ +import request from '@/utils/request'; + +export function getDraftLesson(params, mapId) { + /** 根据mapId获取草稿课程 */ + return request({ + url: `/api/mapSystem/findDraftLessonBy/${mapId}`, + method: 'get', + params + }); +} +/** 获取用户地图树 */ +export function getUserMapTree(cityCode) { + return request({ + url: `/api/mapSystem/findDraftMapByCityCode?cityCode=${cityCode}`, + method: 'get' + }); +} + +/** 运行图*/ +export function getRpListByUserMapId(mapId) { + return request({ + url: `/api/draftMap/runPlan/findByDraftMapId/${mapId}`, + method: 'get' + }); +} +export function getMapList(cityCode) { + /** 根据cityCode获取地图列表 */ + return request({ + url: `/api/mapSystem/queryMapByCityCode/${cityCode}`, + method: 'get' + }); +} + +/** 获取用户自己的运行图详情*/ +export function getRpDetailByUserMapId(planId) { + return request({ + url: `/api/draftMap/runPlan/selectDiagramData/${planId}`, + method: 'get' + }); +} + +/** 获取用户自己创建的草稿地图详情*/ +export function getUserMapDetailByMapId(mapId) { + return request({ + url: `/api/mapBuild/findById/${mapId}`, + method: 'get' + }); +} + +/** 用户自己的运行图仿真测试*/ +export function runUserPlanNotify({ planId }) { + return request({ + url: `/api/draftMap/runPlan/simulationCheck/${planId}`, + method: 'get' + }); +} + +/** 管理员获取需审核的课程列表 */ +export function reviewLessonList(params) { + return request({ + url: `/api/review/query/lesson`, + method: 'get', + params + }); +} + +/** 管理员发布课程接口 */ +export function adminPublishLesson(data, id) { + return request({ + url: `/api/review/${id}/publishLesson`, + method: 'post', + data: data + }); +} + +/** 管理员驳回课程发布申请 */ +export function rejectedLessonRelease(data, id) { + return request({ + url: `/api/review/lesson/${id}`, + method: 'post', + data: data + }); +} + +/** 普通用户申请课程发布和撤销申请 */ +export function releaseOrCancel(id, status) { + return request({ + url: `/api/review/lesson/releaseOrCancel/${id}/${status}`, + method: 'get' + }); +} + +/** 管理员获取需审核的剧本列表 ok */ +export function reviewScriptList(params) { + return request({ + url: `/api/review/query/script`, + method: 'get', + params + }); +} +/** 管理员发布剧本 ok */ +export function publishScript(id) { + return request({ + url: `/api/review/${id}/publishScript`, + method: 'post' + }); +} +/** 管理员剧本申请驳回 ok */ +export function rejectScript(id, data) { + return request({ + url: `/api/review/script/${id}`, + method: 'post', + data: data + }); +} + +/** 管理员获取需审核的运行图列表 */ +export function reviewRunPlanList(params) { + return request({ + url: `/api/review/query/runPlan`, + method: 'get', + params + }); +} + +/** 管理员发布运行图 */ +export function publishRunPlan(planId, data) { + return request({ + url: `/api/review/${planId}/publishRunPlan`, + method: 'post', + data: data + }); +} +/** 普通用户申请或撤销运行图发布 */ +export function releaseOrCancelRunPlan(planId, status) { + return request({ + url: `/api/review/runPlan/releaseOrCancel/${planId}/${status}`, + method: 'get' + }); +} +/** 管理员运行图申请驳回 */ +export function rejectRunPlan(id, data) { + return request({ + url: `/api/review/runPlan/${id}`, + method: 'post', + data: data + }); +} + +/** 用户申请发布剧本或者撤销剧本申请 */ +export function releaseScript(id, status) { + return request({ + url: `/api/review/script/releaseOrCancel/${id}/${status}`, + method: 'get' + }); +} + +/** 查看课程详情 */ +export function reviewLessonDetail(id) { + return request({ + url: `/api/review/previewLesson/${id}`, + method: 'get' + }); +} +/** 管理员预览草稿运行图*/ +export function previewRunPlan(planId) { + return request({ + url: `/api/review/previewRunPlan/${planId}`, + method: 'get' + }); +} + +/** 加载剧本 */ +export function loadDraftScript(scriptId, memberId, group) { + return request({ + url: `api/simulation/${group}/scriptDraft/${scriptId}?memberId=${memberId}`, + method: 'post' + }); +} + +/** 获取已发布的有地图的城市列表*/ +export function publisMapCityList(data) { + return request({ + url: `/api/map/city?dicCode=${data}`, + method: 'get' + }); +} + diff --git a/src/api/jlmap3d/load3ddata.js b/src/api/jlmap3d/load3ddata.js index 942d0eadf..d45385004 100644 --- a/src/api/jlmap3d/load3ddata.js +++ b/src/api/jlmap3d/load3ddata.js @@ -1,17 +1,17 @@ import request from '@/utils/request'; /** 根据皮肤获取地图版本信息*/ -export function getPublishMapVersion(skinCode) { +export function getPublishMapVersion(id) { return request({ - url: `/api/map/skin/${skinCode}/version`, + url: `/api/map/${id}/version`, method: 'get' }); } /** 根据皮肤获取发布地图详细内容*/ -export function getPublishMapDetail(skinCode) { +export function getPublishMapDetail(id) { const datad = request({ - url: `/api/map/skin/${skinCode}/details`, + url: `/api/map/${id}/details`, method: 'get' }); return datad.then(); @@ -66,9 +66,9 @@ export function loadmap3dModel() { method: 'get' }); } -export function getPublish3dMapDetail(skinCode) { +export function getPublish3dMapDetail(id) { const datad = request({ - url: `/api/map/${skinCode}/3dMapData`, + url: `/api/map/${id}/3dMapData`, method: 'get' }); return datad.then(); diff --git a/src/api/jmap/lesson.js b/src/api/jmap/lesson.js index fbb3187b4..ab71d37a2 100644 --- a/src/api/jmap/lesson.js +++ b/src/api/jmap/lesson.js @@ -2,67 +2,74 @@ import request from '@/utils/request'; /** 获取发布的课程列表*/ export function getPublishLessonList() { - return request({ - url: '/api/lesson', - method: 'get' - }); + return request({ + url: '/api/lesson', + method: 'get' + }); } /** 获取发布列表树*/ -export function getPublishLessonTree(params) { - return request({ - url: '/api/lesson/tree', - method: 'get', - params: params || {} - }); +export function getPublishLessonTree(id) { + return request({ + url: `/api/lesson/${id}/tree`, + method: 'get' + }); } /** 获取发布课程列表*/ export function getPublishLessonDetail(data) { - return request({ - url: `/api/lesson/${data.id}`, - method: 'get' - }); + return request({ + url: `/api/lesson/${data.id}`, + method: 'get' + }); } /** 发布课程分页列表列表*/ export function publishLessonList(param) { - return request({ - url: `/api/lesson/publishedLesson`, - method: 'get', - params: param - }); + return request({ + url: `/api/lesson/publishedLesson`, + method: 'get', + params: param + }); } /** 删除发布课程*/ export function delPublishLesson(lessonId) { - return request({ - url: `/api/lesson/publishedLesson/${lessonId}`, - method: 'delete' - }); + return request({ + url: `/api/lesson/publishedLesson/${lessonId}`, + method: 'delete' + }); } /** 发布课程上架*/ export function putLessonOnLine(id) { - return request({ - url: `/api/lesson/${id}/onLine`, - method: 'put' - }); + return request({ + url: `/api/lesson/${id}/onLine`, + method: 'put' + }); } /** 发布课程下架*/ export function putLessonOffLine(id) { - return request({ - url: `/api/lesson/${id}/offLine`, - method: 'put' - }); + return request({ + url: `/api/lesson/${id}/offLine`, + method: 'put' + }); } -/** - * 获取地图产品下的课程列表 - */ -export function getCommodityProductLesson(prdCode) { - return request({ - url: `/api/lesson/${prdCode}/list`, - method: 'get' - }); +/** 更新发布课程信息*/ +export function updatePublishLesson(data) { + return request({ + url: `/api/lesson/${data.id}/nameAndRemarks`, + method: 'put', + data: data + }); +} + +/** 获取某个地图下的发布的课程列表*/ +export function getPublishLessonListByMapId(params) { + return request({ + url: '/api/lesson/listOfMap', + method: 'get', + params + }); } diff --git a/src/api/jmap/lessondraft.js b/src/api/jmap/lessondraft.js index 0c7a177c8..69b47b7c1 100644 --- a/src/api/jmap/lessondraft.js +++ b/src/api/jmap/lessondraft.js @@ -1,105 +1,104 @@ import request from '@/utils/request'; -/** 获取课程树*/ -export function getLessonTree(params) { - return request({ - url: '/api/lessonDraft/tree', - method: 'get', - params: params - }); +// /** 获取课程树*/ +export function getLessonTree(lessonId) { + return request({ + url: `/api/lessonDraft/${lessonId}/tree`, + method: 'get' + }); } /** 获取课程详细内容*/ export function getLessonDetail(data) { - return request({ - url: `/api/lessonDraft/${data.id}`, - method: 'get' - }); + return request({ + url: `/api/lessonDraft/${data.id}`, + method: 'get' + }); } /** 创建课程*/ export function createLesson(data) { - return request({ - url: '/api/lessonDraft', - method: 'post', - data: data - }); + return request({ + url: '/api/lessonDraft', + method: 'post', + data: data + }); } /** 从发布课程创建*/ export function createLessonFromPublish(data) { - return request({ - url: '/api/lessonDraft/createForm', - method: 'post', - data: data - }); + return request({ + url: '/api/lessonDraft/createForm', + method: 'post', + data: data + }); } /** 更新课程*/ export function updateLesson(data) { - return request({ - url: `/api/lessonDraft/${data.id}`, - method: 'put', - data: data - }); + return request({ + url: `/api/lessonDraft/${data.id}`, + method: 'put', + data: data + }); } /** 删除课程*/ export function delLesson(data) { - return request({ - url: `/api/lessonDraft/${data.id}`, - method: 'delete', - data: data - }); + return request({ + url: `/api/lessonDraft/${data.id}`, + method: 'delete', + data: data + }); } /** 创建课程章节*/ export function createLessonChapter(data) { - return request({ - url: `/api/lessonDraft/${data.lessonId}/chapter`, - method: 'post', - data: data - }); + return request({ + url: `/api/lessonDraft/${data.lessonId}/chapter`, + method: 'post', + data: data + }); } /** 更新课程章节*/ export function updateLessonChapter(data) { - return request({ - url: `/api/lessonDraft/chapter/${data.id}`, - method: 'put', - data: data - }); + return request({ + url: `/api/lessonDraft/chapter/${data.id}`, + method: 'put', + data: data + }); } /** 创建课程章节详细内容*/ export function getLessonChapterDetail(data) { - return request({ - url: `/api/lessonDraft/chapter/${data.id}`, - method: 'get' - }); + return request({ + url: `/api/lessonDraft/chapter/${data.id}`, + method: 'get' + }); } /** 发布课程*/ export function publishLesson(data) { - return request({ - url: `/api/lessonDraft/${data.id}/publish`, - method: 'post', - data: data - }); + return request({ + url: `/api/lessonDraft/${data.id}/publish`, + method: 'post', + data: data + }); } /** 课程章节拖拽排序*/ export function dragSortLessonChapter(data) { - return request({ - url: '/api/lessonDraft/dragSort', - method: 'put', - data: data - }); + return request({ + url: '/api/lessonDraft/dragSort', + method: 'put', + data: data + }); } -/** 根据lessonId获取课程名称*/ -export function getLessonNameByMapIdAndLessonId(model) { - return request({ - url: `/api/lessonDraft/${model.mapId}/${model.lessonId}`, - method: 'get' - }); +export function getLessonDrftList(mapId, params) { + return request({ + url: `/api/lessonDraft/${mapId}/list`, + method: 'get', + params: params + }); } diff --git a/src/api/jmap/map.js b/src/api/jmap/map.js index e4d7a29dc..3ddda2021 100644 --- a/src/api/jmap/map.js +++ b/src/api/jmap/map.js @@ -2,123 +2,150 @@ import request from '@/utils/request'; /** 获取发布地图管理分页*/ export function getPublishMapList(params) { - return request({ - url: '/api/map', - method: 'get', - params: params - }); + return request({ + url: '/api/map', + method: 'get', + params: params + }); +} +/** 获取所有可用地图列表*/ +export function getPublishMapListOnline() { + return request({ + url: '/api/map/listOnline', + method: 'get' + }); } /** 根据皮肤获取发布地图列表*/ -export function getPublishMapListBySkinCode(skinCode) { - return request({ - url: `/api/map/${skinCode}/list`, - method: 'get' - }); -} - -/** 根据皮肤获取地图版本信息*/ -export function getPublishMapVersion(skinCode) { - return request({ - url: `/api/map/skin/${skinCode}/version`, - method: 'get' - }); -} - -/** 根据皮肤获取发布地图详细内容*/ -export function getPublishMapDetail(skinCode) { - return request({ - url: `/api/map/skin/${skinCode}/details`, - method: 'get' - }); +export function getPublishMapListByLineCode(lineCode) { + return request({ + url: `/api/map/${lineCode}/list`, + method: 'get' + }); } /** 根据地图id获取地图版本信息*/ export function getPublishMapVersionById(id) { - return request({ - url: `/api/map/${id}/version`, - method: 'get' - }); + return request({ + url: `/api/map/${id}/version`, + method: 'get' + }); } /** 根据地图id获取发布地图详细内容*/ export function getPublishMapDetailById(id) { - return request({ - url: `/api/map/${id}/details`, - method: 'get' - }); + return request({ + url: `/api/map/${id}/details`, + method: 'get' + }); } -/** 获取发布地图列车列表*/ -export function getPublishTrainList(skinCode) { - return request({ - url: `/api/map/${skinCode}/train`, - method: 'get' - }); -} - -/** 获取发布地图列表*/ -export function listPublishMap() { - return request({ - url: '/api/map/list', - method: 'get' - }); +/** 获取发布地图列表(不包含项目线路)*/ +export function listPublishMap(params) { + return request({ + url: `/api/map/list`, + method: 'get', + params + }); } /** 根据地图id获取地图信息*/ export function getPublishMapInfo(mapId) { - return request({ - url: `/api/map/${mapId}`, - method: 'get' - }); + return request({ + url: `/api/map/${mapId}`, + method: 'get' + }); } /** 发布地图数据导出*/ export function getPublishMapExport(mapId) { - return request({ - url: `/api/map/${mapId}/export`, - method: 'get' - }); + return request({ + url: `/api/map/${mapId}/export`, + method: 'get' + }); } /** 删除发布地图*/ export function delPublishMap(mapId) { - return request({ - url: `/api/map/${mapId}`, - method: 'DELETE' - }); + return request({ + url: `/api/map/${mapId}`, + method: 'DELETE' + }); } /** 发布地图上架*/ export function putMapOnLine(mapId) { - return request({ - url: `/api/map/${mapId}/onLine`, - method: 'put' - }); + return request({ + url: `/api/map/${mapId}/onLine`, + method: 'put' + }); } /** 发布地图下架*/ export function putMapOffLine(mapId) { - return request({ - url: `/api/map/${mapId}/offLine`, - method: 'put' - }); + return request({ + url: `/api/map/${mapId}/offLine`, + method: 'put' + }); } /** 修改发布地图名称*/ export function updatePublishMapName(data) { - return request({ - url: `/api/map/${data.mapId}/updateName`, - method: 'put', - data: data - }); + return request({ + url: `/api/map/${data.mapId}/updateName`, + method: 'put', + data: data + }); } -/** 修改发布地图名称*/ +/** 获取发布地图详情*/ export function getPublishMapDetailList(params, code) { - return request({ - url: `/api/map/${code}/versions`, - method: 'get', - params: params - }); + return request({ + url: `/api/map/${code}/versions`, + method: 'get', + params: params + }); +} + +/** 获取有屏蔽门的站台列表*/ +export function hasDoorStationList(mapId) { + return request({ + url: `/api/map/${mapId}/stand/hasDoor`, + method: 'get' + }); +} + +/** 修改发布地图城市*/ +export function updatePublishMapCity(data) { + return request({ + url: `/api/map/${data.mapId}/city`, + method: 'put', + data: data + }); +} + +/** 设置归属项目 */ +export function setMapProject(data) { + return request({ + url: `/api/map/${data.id}/project`, + method: 'put', + data: data + }); +} + +/** 根据定制项目编号查询地图列表 */ +export function getMapListByProjectCode(projectCode) { + return request({ + url: `/api/map/project/${projectCode}/list`, + method: 'get' + }); +} + +/** 复制地图线路数据 */ +export function copyMapAs(mapId, data) { + return request({ + url: `/api/map/copy/${mapId}`, + method: 'post', + data: data + }); } diff --git a/src/api/jmap/mapdraft.js b/src/api/jmap/mapdraft.js index ccd219bb9..538d77fb5 100644 --- a/src/api/jmap/mapdraft.js +++ b/src/api/jmap/mapdraft.js @@ -264,3 +264,10 @@ export function putAutoSignal(data) { }); } +export function getListByCityCode(cityCode) { + return request({ + url: `/api/mapBuild/${cityCode}/list`, + method: 'get' + }); +} + diff --git a/src/api/jmap/training.js b/src/api/jmap/training.js index 516158387..5104ceede 100644 --- a/src/api/jmap/training.js +++ b/src/api/jmap/training.js @@ -2,194 +2,186 @@ import request from '@/utils/request'; /** 清除实训数据*/ export function clearTraining(args) { - return request({ - url: `/api/training/${args.id}`, - method: 'delete' - }); + return request({ + url: `/api/training/${args.id}`, + method: 'delete' + }); } /** 开始实训*/ export function startTraining(args, group) { - return request({ - url: `/api/training/${args.id}/start`, - method: 'get', - params: { - group - } - }); + return request({ + url: `/api/training/${args.id}/start`, + method: 'get', + params: { + group + } + }); } /** 实训结束*/ export function endTraining(args, group) { - return request({ - url: `/api/training/${args.lessonId}/${args.id}/end`, - method: 'get', - params: { - mode: args.mode, - usedTime: args.usedTime, - group - } - }); + return request({ + url: `/api/training/${args.lessonId}/${args.id}/end`, + method: 'get', + params: { + mode: args.mode, + usedTime: args.usedTime, + group + } + }); } /** 发送步骤数据*/ export function sendTrainingNextStep(data, group) { - return request({ - url: `/api/training/${data.trainingId}/nextStep`, - method: 'post', - data: data.operate, - params: { - group - } - }); -} - -/** 获取实训树*/ -export function getTrainingTree() { - return request({ - url: `/api/training/tree`, - method: 'get' - }); + return request({ + url: `/api/training/${data.trainingId}/nextStep`, + method: 'post', + data: data.operate, + params: { + group + } + }); } /** 获取章节基本信息*/ export function getTrainingDetail(trainingId) { - return request({ - url: `/api/training/${trainingId}`, - method: 'get' - }); + return request({ + url: `/api/training/${trainingId}`, + method: 'get' + }); } /** 添加实训*/ export function addTraining(data) { - return request({ - url: '/api/training', - method: 'post', - data: data - }); + return request({ + url: '/api/training', + method: 'post', + data: data + }); } /** 更新实训*/ export function updateTraining(data) { - return request({ - url: `/api/training/${data.id}`, - method: 'put', - data: data - }); + return request({ + url: `/api/training/${data.id}`, + method: 'put', + data: data + }); } /** 保存实训初始状态*/ export function saveTrainingInitStatus(data, group) { - return request({ - url: `/api/training/${data.id}/detailSave?group=${group}`, - method: 'post', - data: data - }); + return request({ + url: `/api/training/${data.id}/detailSave?group=${group}`, + method: 'post', + data: data + }); } /** 保存实训步骤数据*/ export function saveTrainingStepsData(data) { - return request({ - url: `/api/training/${data.id}/stepsSave`, - method: 'post', - data: data - }); + return request({ + url: `/api/training/${data.id}/stepsSave`, + method: 'post', + data: data + }); } /** 获取实训步骤数据*/ export function getTrainingStepsDetail(trainingId, params) { - return request({ - url: `/api/training/${trainingId}/detail`, - method: 'get', - params: params - }); + return request({ + url: `/api/training/${trainingId}/detail`, + method: 'get', + params: params + }); } /** 查询实训列表*/ export function pageQueryTraining(params) { - return request({ - url: `/api/training/pagedQuery`, - method: 'get', - params: params - }); + return request({ + url: `/api/training/pagedQuery`, + method: 'get', + params: params + }); } /** 自动生成实训操作*/ export function addAutoTraining(data) { - return request({ - url: `/api/training/generate`, - method: 'post', - data: data - }); + return request({ + url: `/api/training/generate`, + method: 'post', + data: data + }); } /** 修改自动删除实训操作*/ export function updateAutoTraining(data) { - return request({ - url: `/api/training/batchUpdateGenerate`, - method: 'put', - data: data - }); + return request({ + url: `/api/training/batchUpdateGenerate`, + method: 'put', + data: data + }); } /** 删除自动生成实训*/ export function deleteAutoTraining(params) { - return request({ - url: `/api/training/generate`, - method: 'delete', - params: params - }); + return request({ + url: `/api/training/generate`, + method: 'delete', + params: params + }); } /** 获取用户实训列表*/ export function getTrainingList(data) { - return request({ - url: `/api/training/list`, - method: 'get', - params: data - }); + return request({ + url: `/api/training/list`, + method: 'get', + params: data + }); } export function sendCommand(group, command) { - return request({ - url: `/api/training/deviceChange?group=${group}`, - method: 'put', - data: { - param: command.val, - type: command.type, - code: command.code, - operation: command.operation - } - }); + return request({ + url: `/api/training/deviceChange?group=${group}`, + method: 'put', + data: { + param: command.val, + type: command.type, + code: command.code, + operation: command.operation + } + }); } export function updateLesson(data) { - return request({ - url: `/api/training/userTraining/${data.id}`, - method: 'put', - data: data - }); + return request({ + url: `/api/training/userTraining/${data.id}`, + method: 'put', + data: data + }); } // 添加用户实训数据 export function addUserTraining(data) { - return request({ - url: `/api/training/userTraining`, - method: 'post', - data: data - }); + return request({ + url: `/api/training/userTraining`, + method: 'post', + data: data + }); } // 更新用户实训数据 export function putUserTraining(data) { - return request({ - url: `/api/training/userTraining/${data.id}`, - method: 'put', - data: data - }); + return request({ + url: `/api/training/userTraining/${data.id}`, + method: 'put', + data: data + }); } // 清除实训数据 export function deleteUserTraining(statsId) { - return request({ - url: `/api/training/userTraining/${statsId}`, - method: 'delete' - }); + return request({ + url: `/api/training/userTraining/${statsId}`, + method: 'delete' + }); } diff --git a/src/api/management/author.js b/src/api/management/author.js index 55e894fd8..ec965167c 100644 --- a/src/api/management/author.js +++ b/src/api/management/author.js @@ -3,125 +3,115 @@ import request from '@/utils/request'; /** 分页获取课程权限数据*/ export function getLessonPermissonPageList(params) { - return request({ - url: '/api/permission', - method: 'get', - params: params - }); + return request({ + url: '/api/permission', + method: 'get', + params: params + }); } /** 创建课程权限*/ export function createLessonPermisson(data) { - return request({ - url: '/api/permission', - method: 'post', - data: data - }); + return request({ + url: '/api/permission', + method: 'post', + data: data + }); } /** 获取权限详情*/ export function getPermissonDetail(id) { - return request({ - url: `/api/permission/${id}/package`, - method: 'get' - }); + return request({ + url: `/api/permission/${id}/package`, + method: 'get' + }); } /** 修改权限*/ export function putPermissonDetail(data) { - return request({ - url: `/api/permission/${data.id}`, - method: 'put', - data: data - }); + return request({ + url: `/api/permission/${data.id}`, + method: 'put', + data: data + }); } /** 一键生成所有权限*/ export function postPermissonList(mapId) { - return request({ - url: `/api/permission/${mapId}/generate`, - method: 'post' - }); + return request({ + url: `/api/permission/${mapId}/generate`, + method: 'post' + }); } /** 获取用户某课程某段时间内可用的权限数量*/ export function getTotalRemains(params) { - return request({ - url: '/api/userPermission/totalRemains', - method: 'get', - params: params - }); + return request({ + url: '/api/userPermission/totalRemains', + method: 'get', + params: params + }); } /** 设置权限失效或有效*/ export function setLessonPermisson(data) { - return request({ - url: `/api/userPermission/${data.id}/status`, - method: 'put', - data: data - }); + return request({ + url: `/api/userPermission/${data.id}/status`, + method: 'put', + data: data + }); } /** 设置权限失效或有效*/ export function getPermissionList(id) { - return request({ - url: `/api/permission/${id}`, - method: 'get' - }); -} - -/** - * 查询仿真权限列表 - */ -export function queryPermissionSimulation(data) { - return request({ - url: `/api/userPermission/${data.mapId}/${data.prdCode}/simulation`, - method: 'get' - }); + return request({ + url: `/api/permission/${id}`, + method: 'get' + }); } /** 获取大屏权限列表*/ export function queryPermissionScreen() { - return request({ - url: `/api/userPermission/bigScreen`, - method: 'get' - }); + return request({ + url: `/api/userPermission/bigScreen`, + method: 'get' + }); } /** * 用户权限列表 */ export function listPermision(params) { - return request({ - url: `/api/userPermission`, - method: 'get', - params: params - }); + return request({ + url: `/api/userPermission`, + method: 'get', + params: params + }); } /** * 个人权限列表 */ export function listUserPermision(params) { - return request({ - url: `/api/userPermission/my`, - method: 'get', - params: params - }); + return request({ + url: `/api/userPermission/my`, + method: 'get', + params: params + }); } /** 用户权限列表 */ export function getDistribute(id) { - return request({ - url: `/api/distribute/${id}`, - method: 'get' - }); + return request({ + url: `/api/distribute/${id}`, + method: 'get' + }); } /** 设置权限所有者 */ export function putPermissionOwner(data) { - return request({ - url: `/api/userPermission/${data.id}/owner`, - method: 'put', - data: data.owner - }); + return request({ + url: `/api/userPermission/${data.id}/owner`, + method: 'put', + data: data.owner + }); } diff --git a/src/api/management/distribute.js b/src/api/management/distribute.js index b2ab482f6..73ca4a825 100644 --- a/src/api/management/distribute.js +++ b/src/api/management/distribute.js @@ -2,140 +2,159 @@ import request from '@/utils/request'; /** 权限转增*/ export function getLessons(data) { - return request({ - url: '/api/distribute/getLessons', - method: 'get', - data: data - }); + return request({ + url: '/api/distribute/getLessons', + method: 'get', + data: data + }); } /** 权限分发*/ export function giveLessons(data) { - return request({ - url: '/api/distribute/distribute', - method: 'post', - data: data - }); + return request({ + url: '/api/distribute/distribute', + method: 'post', + data: data + }); } /** 权限转增*/ export function permissionTurnAdd(data) { - return request({ - url: '/api/distribute/transfer', - method: 'post', - data: data - }); + return request({ + url: '/api/distribute/transfer', + method: 'post', + data: data + }); } /** 从订单分发权限(获取二维码)*/ export function postDistribute(data) { - return request({ - url: `/api/distribute/${data.code}/distribute`, - method: 'post', - data: data - }); + return request({ + url: `/api/distribute/${data.code}/distribute`, + method: 'post', + data: data + }); } /** 权限获取*/ export function getPermission(state) { - return request({ - url: `/api/distribute/getPermission?state=${state}`, - method: 'get' - }); + return request({ + url: `/api/distribute/getPermission?state=${state}`, + method: 'get' + }); } /** 接收课程权限*/ export function receiveLessons(data) { - return request({ - url: '/api/distribute/receiveLessons', - method: 'get', - data: data - }); + return request({ + url: '/api/distribute/receiveLessons', + method: 'get', + data: data + }); } /** 考试权限分发*/ export function giveExams(data) { - return request({ - url: `/api/distribute/giveExams`, - method: 'post', - data: data - }); + return request({ + url: `/api/distribute/giveExams`, + method: 'post', + data: data + }); } /** 权限打包分页查询*/ export function listPackagePermission(params) { - return request({ - url: '/api/distribute', - method: 'get', - params: params - }); + return request({ + url: '/api/distribute', + method: 'get', + params: params + }); } /** 打包权限*/ export function packagePermissionDistribute(data) { - return request({ - url: `/api/distribute/givePermission/package`, - method: 'post', - data: data - }); + return request({ + url: `/api/distribute/givePermission/package`, + method: 'post', + data: data + }); } /** 权限回收*/ export function restorePackagePermission(id) { - return request({ - url: `/api/distribute/${id}/restore`, - method: 'put' - }); + return request({ + url: `/api/distribute/${id}/restore`, + method: 'put' + }); } /** 生成打包权限二维码*/ export function getPackageQrCode(params) { - return request({ - url: `/api/distribute/package/qrCode`, - method: 'get', - params: params - }); + return request({ + url: `/api/distribute/package/qrCode`, + method: 'get', + params: params + }); } /** 权限分发打包详情*/ export function getPermissionPackageDetail(id, params) { - return request({ - url: `/api/distribute/package/${id}/detail`, - method: 'get', - params: params - }); + return request({ + url: `/api/distribute/package/${id}/detail`, + method: 'get', + params: params + }); } /** 权限分发打包*/ export function permissionDistributePackage(data) { - return request({ - url: `/api/distribute/package`, - method: 'post', - data: data - }); + return request({ + url: `/api/distribute/package`, + method: 'post', + data: data + }); } /** 权限分发解包*/ export function permissionDistributeUnPackage(permissionId) { - return request({ - url: `/api/distribute/${permissionId}/unPackage`, - method: 'delete' - }); + return request({ + url: `/api/distribute/${permissionId}/unPackage`, + method: 'delete' + }); } /** 查询可打包的权限分发*/ export function listCanPackagePermission(params) { - return request({ - url: `/api/distribute/package`, - method: 'get', - params: params - }); + return request({ + url: `/api/distribute/package`, + method: 'get', + params: params + }); } // 设置权限分发列表 权限失效 export function setCommodityStatus(id) { - return request({ - url: `/api/distribute/${id}/invalid`, - method: 'get' - }); + return request({ + url: `/api/distribute/${id}/invalid`, + method: 'get' + }); } + +/** 获取用户可以分发/转增的权限*/ +export function getAvailableUserPermission(params) { + return request({ + url: `/api/userPermission/getAvailableUserPermission`, + method: 'get', + params: params + }); +} + +/** 用户权限转增分发打包生成权限*/ +export function givePermission(data) { + return request({ + url: `/api/distribute/packageUserPermission`, + method: 'post', + data: data + }); +} + diff --git a/src/api/management/exam.js b/src/api/management/exam.js index 93f5a801b..beca0ffee 100644 --- a/src/api/management/exam.js +++ b/src/api/management/exam.js @@ -1,96 +1,87 @@ import request from '@/utils/request'; -/** 获取考试列表树*/ -export function getCourseLessonTree(params) { - return request({ - url: '/api/exam/tree', - method: 'get', - params: params - }); -} - /** 创建对应课程考题 */ export function setCourseList(data) { - return request({ - url: `/api/exam`, - method: 'post', - data: data - }); + return request({ + url: `/api/exam`, + method: 'post', + data: data + }); } /** 获取对应课程下类型 */ export function getCourseTypeList(data) { - return request({ - url: `/api/exam/${data.lessonId}/trainingTypes`, - method: 'get' - }); + return request({ + url: `/api/exam/${data.lessonId}/trainingTypes`, + method: 'get' + }); } /** 获取考试课程详情 */ export function getCourseLessonDetail(data) { - return request({ - url: `/api/exam/${data.lessonId}/list`, - method: 'get' - }); + return request({ + url: `/api/exam/${data.lessonId}/list`, + method: 'get' + }); } /** 获取试卷详情 */ export function getExamLessonDetail(examId) { - return request({ - url: `/api/exam/${examId}`, - method: 'get' - }); + return request({ + url: `/api/exam/${examId}`, + method: 'get' + }); } /** 获取试卷列表 */ export function getExamList(data) { - return request({ - url: '/api/exam/list', - method: 'get', - params: data - }); + return request({ + url: '/api/exam/list', + method: 'get', + params: data + }); } /** 删除试卷 */ export function deleteExam(data) { - return request({ - url: `/api/exam/${data.id}`, - method: 'delete' - }); + return request({ + url: `/api/exam/${data.id}`, + method: 'delete' + }); } /** 设置试卷下架 */ export function setExamEfficacy(data) { - return request({ - url: `/api/exam/${data.id}/offLine`, - method: 'put' - }); + return request({ + url: `/api/exam/${data.id}/offLine`, + method: 'put' + }); } /** 设置试卷上架 */ export function setExamEffectivey(data) { - return request({ - url: `/api/exam/${data.id}/onLine`, - method: 'put' - }); + return request({ + url: `/api/exam/${data.id}/onLine`, + method: 'put' + }); } /** 查询课程下类型题数 */ export function getLessonTypeNum(data) { - return request({ - url: `/api/exam/trainingNum/${data.lessonId}/${data.trainingType}`, - method: 'get', - params: { - operateType: data.operateType - } - }); + return request({ + url: `/api/exam/trainingNum/${data.lessonId}/${data.trainingType}`, + method: 'get', + params: { + operateType: data.operateType + } + }); } /** 更新考试规则*/ export function updateExamRules(data) { - return request({ - url: `/api/exam/${data.id}`, - method: 'put', - data: data - }); + return request({ + url: `/api/exam/${data.id}`, + method: 'put', + data: data + }); } diff --git a/src/api/management/mapline.js b/src/api/management/mapline.js new file mode 100644 index 000000000..345914d09 --- /dev/null +++ b/src/api/management/mapline.js @@ -0,0 +1,69 @@ +import request from '@/utils/request'; + +/** 分页查询真实线路*/ +export function getSkinCodePageList(params) { + return request({ + url: `/api/realLine`, + method: 'get', + params: params + }); +} + +/** 添加真实线路*/ +export function addSkinCode(data) { + return request({ + url: `/api/realLine`, + method: 'post', + data: data + }); +} + +/** 删除真实线路*/ +export function delSkinCode(id) { + return request({ + url: `/api/realLine/${id}`, + method: 'delete' + }); +} + +/** 根据id查询真实线路 */ +export function querySkinCode(id) { + return request({ + url: `/api/realLine/${id}`, + method: 'get' + }); +} + +/** 修改真实线路*/ +export function updateSkinCode(data) { + return request({ + url: `/api/realLine/${data.id}`, + method: 'put', + data: data + }); +} + +/** 通过皮肤Code更新地图皮肤*/ +export function updateSkinCodeByCode(data) { + return request({ + url: `/api/realLine/${data.code}/update`, + method: 'put', + data: data + }); +} + +/** 检查code是否存在*/ +export function querySkinCodeExistByCode(code) { + return request({ + url: `/api/realLine/${code}/exist`, + method: 'get' + }); +} + +/** 获取真实线路列表*/ +export function getLineCodeList() { + return request({ + url: `/api/realLine/list`, + method: 'get' + }); +} diff --git a/src/api/management/mapprd.js b/src/api/management/mapprd.js index 384e5759c..e9a8c6257 100644 --- a/src/api/management/mapprd.js +++ b/src/api/management/mapprd.js @@ -2,113 +2,113 @@ import request from '@/utils/request'; /** 获取发布地图树*/ export function getPublishMapTree(cityCode) { - return request({ - url: `/api/mapPrd/${cityCode}/tree`, - method: 'get' - }); + return request({ + url: `/api/mapPrd/${cityCode}/tree`, + method: 'get' + }); } /** 获取产品详细内容*/ -export function getProductDetail(prdCode) { - return request({ - url: `/api/mapPrd/${prdCode}`, - method: 'get' - }); +export function getProductDetail(prdId) { + return request({ + url: `/api/mapPrd/${prdId}`, + method: 'get' + }); } /** 检查实训编码是否已存在*/ export function checkCodeExist(data) { - return request({ - url: '/api/mapPrd/checkCodeExist', - method: 'get', - params: data - }); + return request({ + url: '/api/mapPrd/checkCodeExist', + method: 'get', + params: data + }); } -/** 获取产品类目数*/ +/** 获取产品树*/ export function getProductTree() { - return request({ - url: `/api/mapPrd/tree`, - method: 'get' - }); + return request({ + url: `/api/mapPrd/tree`, + method: 'get' + }); } /** 创建实训类目*/ export function createTrainingCategory(data) { - return request({ - url: '/api/mapPrd', - method: 'post', - data: data - }); + return request({ + url: '/api/mapPrd', + method: 'post', + data: data + }); } /** 更新实训类目*/ export function updateTrainingCategory(data) { - return request({ - url: `/api/mapPrd/${data.id}`, - method: 'put', - data: data - }); + return request({ + url: `/api/mapPrd/${data.id}`, + method: 'put', + data: data + }); } /** 删除实训类目*/ export function deleteTrainingCategory(data) { - return request({ - url: `/api/mapPrd/${data.id}`, - method: 'delete' - }); + return request({ + url: `/api/mapPrd/${data.id}`, + method: 'delete' + }); } /** * 获取地图下的产品列表 */ -export function getCommodityMapProduct(skinCode) { - return request({ - url: `/api/mapPrd/${skinCode}/list`, - method: 'get' - }); +export function getCommodityMapProduct(mapId) { + return request({ + url: `/api/mapPrd/${mapId}/list`, + method: 'get' + }); } /** * 获取地图下的产品详情 */ -export function getMapProductDetail(prdCode) { - return request({ - url: `/api/mapPrd/${prdCode}`, - method: 'get' - }); +export function getMapProductDetail(prdId) { + return request({ + url: `/api/mapPrd/${prdId}`, + method: 'get' + }); } /** 获取产品管理列表*/ export function getProductList(data) { - return request({ - url: `/api/mapPrd/list`, - method: 'get', - params: data - }); + return request({ + url: `/api/mapPrd/list`, + method: 'get', + params: data + }); } /** 发布地图产品上架*/ export function putMapProductOnLine(id) { - return request({ - url: `/api/mapPrd/${id}/onLine`, - method: 'put' - }); + return request({ + url: `/api/mapPrd/${id}/onLine`, + method: 'put' + }); } /** 发布地图产品下架*/ export function putMapProductOffLine(id) { - return request({ - url: `/api/mapPrd/${id}/offLine`, - method: 'put' - }); + return request({ + url: `/api/mapPrd/${id}/offLine`, + method: 'put' + }); } /** 校验产品code是否已存在*/ export function checkMapProductCodeExist(params) { - return request({ - url: `/api/mapPrd/checkCodeExist`, - method: 'get', - params: params - }); + return request({ + url: `/api/mapPrd/checkCodeExist`, + method: 'get', + params: params + }); } diff --git a/src/api/management/mapskin.js b/src/api/management/mapskin.js deleted file mode 100644 index 7ca93831d..000000000 --- a/src/api/management/mapskin.js +++ /dev/null @@ -1,69 +0,0 @@ -import request from '@/utils/request'; - -/** 分页查询皮肤*/ -export function getSkinCodePageList(params) { - return request({ - url: `/api/mapSkin`, - method: 'get', - params: params - }); -} - -/** 添加皮肤*/ -export function addSkinCode(data) { - return request({ - url: `/api/mapSkin`, - method: 'post', - data: data - }); -} - -/** 删除皮肤*/ -export function delSkinCode(id) { - return request({ - url: `/api/mapSkin/${id}`, - method: 'delete' - }); -} - -/** 查询地图皮肤 */ -export function querySkinCode(id) { - return request({ - url: `/api/mapSkin/${id}`, - method: 'get' - }); -} - -/** 修改地图皮肤*/ -export function updateSkinCode(data) { - return request({ - url: `/api/mapSkin/${data.id}`, - method: 'put', - data: data - }); -} - -/** 通过皮肤Code更新地图皮肤*/ -export function updateSkinCodeByCode(data) { - return request({ - url: `/api/mapSkin/${data.code}/update`, - method: 'put', - data: data - }); -} - -/** 查询皮肤是否存在*/ -export function querySkinCodeExistByCode(code) { - return request({ - url: `/api/mapSkin/${code}/exist`, - method: 'get' - }); -} - -/** 获取皮肤列表*/ -export function getSkinCodeList() { - return request({ - url: `/api/mapSkin/list`, - method: 'get' - }); -} diff --git a/src/api/management/operation.js b/src/api/management/operation.js index 9bee8d558..6505119b4 100644 --- a/src/api/management/operation.js +++ b/src/api/management/operation.js @@ -5,131 +5,130 @@ import request from '@/utils/request'; * 获取实训规则列表 */ export function getTrainingRulesList(params) { - return request({ - url: `/api/operate`, - method: 'get', - params: params - }); + return request({ + url: `/api/operate`, + method: 'get', + params: params + }); } /** * 生成考试定义规则 */ export function postTrainingRulesData(data) { - return request({ - url: `/api/operate`, - method: 'post', - data: data - }); + return request({ + url: `/api/operate`, + method: 'post', + data: data + }); } /** * 修改考试定义规则 */ export function putTrainingRulesData(data) { - return request({ - url: `/api/operate/${data.id}`, - method: 'put', - data: data - }); + return request({ + url: `/api/operate/${data.id}`, + method: 'put', + data: data + }); } /** * 删除考试定义规则 */ export function deleteTrainingRulesData(id) { - return request({ - url: `/api/operate/${id}`, - method: 'DELETE' - }); + return request({ + url: `/api/operate/${id}`, + method: 'DELETE' + }); } /** * 获取实训规则步骤详情列表 */ export function getOperateStepDataList(id, params) { - return request({ - url: `/api/operate/${id}/step`, - method: 'get', - params: params - }); + return request({ + url: `/api/operate/${id}/step`, + method: 'get', + params: params + }); } /** * 创建操作步骤 */ export function postOperateStepData(params) { - return request({ - url: `/api/operate/${params.definitionId}/step`, - method: 'post', - data: params - }); + return request({ + url: `/api/operate/${params.definitionId}/step`, + method: 'post', + data: params + }); } /** * 修改操作步骤 */ export function putOperateStepData(params) { - return request({ - url: `/api/operate/step/${params.id}`, - method: 'put', - data: params - }); + return request({ + url: `/api/operate/step/${params.id}`, + method: 'put', + data: params + }); } /** * 修改操作步骤 */ export function deleteOperateStepData(id) { - return request({ - url: `/api/operate/step/${id}`, - method: 'delete' - }); + return request({ + url: `/api/operate/step/${id}`, + method: 'delete' + }); } /** * 批量生成操作列表 */ -export function addTrainingRulesList(skinCode, data) { - return request({ - url: `/api/operate/${skinCode}/generate`, - method: 'post', - data: data - }); +export function addTrainingRulesList(mapId, data) { + return request({ + url: `/api/operate/${mapId}/generate`, + method: 'post', + data: data + }); } /** * 获取操作占位列表 */ export function getPlaceholderList(data) { - return request({ - url: `/api/operate/placeholder`, - method: 'get', - params: { - trainingType: data.trainingType, - skinCode: data.skinCode - } - }); + return request({ + url: `/api/operate/placeholder`, + method: 'get', + params: { + trainingType: data.trainingType + } + }); } /** * 获取产品下实训操作列表 */ export function getOperateTrainingList(data) { - return request({ - url: `/api/operate/type`, - method: 'get', - params: { - productType: data.productType, - skinCode: data.skinCode - } - }); + return request({ + url: `/api/operate/type`, + method: 'get', + params: { + productType: data.productType, + mapId: data.mapId + } + }); } // 另存为 操作定义 -export function postOperateSaveAs(skinCode, other) { - return request({ - url: `/api/operate/${skinCode}/saveAs/${other}`, - method: 'post' - }); +export function postOperateSaveAs(mapId, other) { + return request({ + url: `/api/operate/${mapId}/saveAs/${other}`, + method: 'post' + }); } diff --git a/src/api/management/order.js b/src/api/management/order.js index 4ce0acf14..9879f0c94 100644 --- a/src/api/management/order.js +++ b/src/api/management/order.js @@ -3,123 +3,123 @@ import request from '@/utils/request'; /** 分页获取订单数据*/ export function getOrderPageList(params) { - return request({ - url: '/api/order', - method: 'get', - params: params - }); + return request({ + url: '/api/order', + method: 'get', + params: params + }); } /** 根据ID获取订单数据*/ export function getOrderDetail(id, params) { - return request({ - url: `/api/order/${id}`, - method: 'get', - params: params - }); + return request({ + url: `/api/order/${id}`, + method: 'get', + params: params + }); } /** 创建一个订单*/ export function createOrder(data) { - return request({ - url: '/api/order', - method: 'post', - data: data - }); + return request({ + url: '/api/order', + method: 'post', + data: data + }); } /** 更新订单*/ export function updateOrder(data) { - return request({ - url: '/api/order', - method: 'put', - data: data - }); + return request({ + url: '/api/order', + method: 'put', + data: data + }); } export function deleteOrder(id) { - return request({ - url: `/api/order/${id}`, - method: 'delete' - }); + return request({ + url: `/api/order/${id}`, + method: 'delete' + }); } /** 订单权限领取*/ export function getOrder(params) { - return request({ - url: '/api/order/getOrder', - method: 'get', - params: params - }); + return request({ + url: '/api/order/getOrder', + method: 'get', + params: params + }); } /** 订单权限分发*/ export function giveOrder(data) { - return request({ - url: '/api/order/giveOrder', - method: 'post', - data: data - }); + return request({ + url: '/api/order/giveOrder', + method: 'post', + data: data + }); } /** 订单续费*/ export function getOrderCharge(id) { - return request({ - url: `/api/order/${id}/charge`, - method: 'get' - }); + return request({ + url: `/api/order/${id}/charge`, + method: 'get' + }); } /** 计算总价*/ export function calcuteOrderSumPrice(args) { - return request({ - url: `/api/order/price`, - method: 'get', - params: args - }); + return request({ + url: `/api/order/price`, + method: 'get', + params: args + }); } /** 提交订单*/ export function commitOrder(data) { - return request({ - url: '/api/order/submit', - method: 'post', - data: data - }); + return request({ + url: '/api/order/submit', + method: 'post', + data: data + }); } /** 确认订单*/ export function confirmOrder(data) { - return request({ - url: `/api/order/${data.orderId}/${data.type}/pay`, - method: 'get' - }); + return request({ + url: `/api/order/${data.orderId}/${data.type}/pay`, + method: 'get' + }); } /** 取消订单*/ export function cancalOrder(orderId) { - return request({ - url: `/api/order/${orderId}/cancelPay`, - method: 'put' - }); + return request({ + url: `/api/order/${orderId}/cancelPay`, + method: 'put' + }); } // 快速创建权限 export function createPermission(data) { - return request({ - url: `/api/order/quicklyGenerateOrder`, - method: 'post', - data: data - }); + return request({ + url: `/api/order/quicklyGenerateOrder`, + method: 'post', + data: data + }); } // 校验是否存在所选择权限对应的权限包 export function postFindPermission(ids) { - return request({ - url: `/api/permission/findPermission`, - method: 'post', - data: { - relPermissions: ids - } - }); + return request({ + url: `/api/permission/findPermission`, + method: 'post', + data: { + relPermissions: ids + } + }); } diff --git a/src/api/management/user.js b/src/api/management/user.js index f2a0dd297..4de744578 100644 --- a/src/api/management/user.js +++ b/src/api/management/user.js @@ -1,112 +1,180 @@ import request from '@/utils/request'; /** 注册用户*/ export function createUserInfo(data) { - return request({ - url: '/api/userinfo/create', - method: 'put', - data: data - }); + return request({ + url: '/api/userinfo/create', + method: 'put', + data: data + }); } /** 根据用户Id获取用户信息*/ export function getUserInfoByOpenId(params) { - return request({ - url: '/api/userinfo/getByOpenId', - method: 'get', - params: params - }); + return request({ + url: '/api/userinfo/getByOpenId', + method: 'get', + params: params + }); } /** 根据姓名或者手机号查询用户*/ export function getUserInfoByNameOrMobile(params) { - return request({ - url: '/api/userinfo/nameOrMobile', - method: 'get', - params: params - }); + return request({ + url: '/api/userinfo/nameOrMobile', + method: 'get', + params: params + }); } /** 查询用户参数*/ export function getUserConfigInfo() { - return request({ - url: '/api/user/config', - method: 'get' - }); + return request({ + url: '/api/user/config', + method: 'get' + }); } /** 设置用户参数*/ export function setUserConfigInfo(data) { - return request({ - url: '/api/user/config', - method: 'post', - data: data - }); + return request({ + url: '/api/user/config', + method: 'post', + data: data + }); } /** 获取销售列表*/ export function getSellerList() { - return request({ - url: `/api/user/seller`, - method: 'get' - }); + return request({ + url: `/api/user/seller`, + method: 'get' + }); } /** 查询用户列表*/ export function getUserList(params) { - return request({ - url: `/api/user`, - method: 'get', - params: params - }); + return request({ + url: `/api/user`, + method: 'get', + params: params + }); } /** 模糊查询用户 昵称、名称、手机号*/ export function getDimUserList(params) { - return request({ - url: `/api/user/fuzzy`, - method: 'get', - params: params - }); + return request({ + url: `/api/user/fuzzy`, + method: 'get', + params: params + }); } /** 获取用户订阅地图列表*/ export function getUserSubscribe(userId) { - return request({ - url: `/api/user/subscribe/${userId}`, - method: 'get' - }); + return request({ + url: `/api/user/subscribe/${userId}`, + method: 'get' + }); } /** 保存用户订阅地图列表*/ export function saveUserSubscribe(data) { - return request({ - url: '/api/user/subscribe', - method: 'post', - data: data - }); + return request({ + url: '/api/user/subscribe', + method: 'post', + data: data + }); } // 修改用户权限 export function putRoles(data) { - return request({ - url: `/api/user/${data.id}/role`, - method: 'put', - data: data - }); + return request({ + url: `/api/user/${data.id}/role`, + method: 'put', + data: data + }); } // 获取缓存列表数据 export function getCacheList(params) { - return request({ - url: `/api/cache/keys`, - method: 'get', - params: params - }); + return request({ + url: `/api/cache/keys`, + method: 'get', + params: params + }); } // 删除缓存列表 export function delCacheList(key) { - return request({ - url: `/api/cache/${key}`, - method: 'delete' - }); + return request({ + url: `/api/cache/${key}`, + method: 'delete' + }); +} + +// 更新用户真实姓名 +export function getUserinfoName(id, name) { + return request({ + url: `/api/userinfo/${id}/name?name=${name}`, + method: 'put' + }); +} + +// 更新用户昵称 +export function getUserinfoNickname(id, nickname) { + return request({ + url: `/api/userinfo/${id}/nickname?nickname=${nickname}`, + method: 'put' + }); +} + +// 更新用户手机号 +export function getUserinfoMobile(id, data) { + return request({ + url: `/api/userinfo/${id}/mobile`, + method: 'put', + data: data + }); +} + +// 发送手机验证码 +export function getUserinfoMobileCode(data) { + return request({ + url: `/api/userinfo/mobile/code`, + method: 'post', + data: data + }); +} + +// 更新用户邮箱 +export function getUserinfoEmail(id, data) { + return request({ + url: `/api/userinfo/${id}/email`, + method: 'put', + data: data + }); +} + +// 发送邮箱验证码 +export function getUserinfoEmailCode(email) { + return request({ + url: `/api/userinfo/email/code?email=${email}`, + method: 'post' + }); +} + +// 更新用户登陆密码 +export function getUserinfoPassword(id, data) { + return request({ + url: `/api/userinfo/${id}/password`, + method: 'put', + data: data + }); +} + +// 获取当前用户数量 +export function getOnlineNmuber() { + return request({ + url: `/api/cache/onlineUser`, + method: 'get' + }); } diff --git a/src/api/pushMessage.js b/src/api/pushMessage.js new file mode 100644 index 000000000..bcb4c75c8 --- /dev/null +++ b/src/api/pushMessage.js @@ -0,0 +1,10 @@ +import request from '@/utils/request'; + +/** 推送通知消息*/ +export function pushMessage(data) { + return request({ + url: `/api/pushMessage`, + method: 'post', + data: data + }); +} diff --git a/src/api/quest.js b/src/api/quest.js index 7baa7b116..c807a6b59 100644 --- a/src/api/quest.js +++ b/src/api/quest.js @@ -1,55 +1,74 @@ import request from '@/utils/request'; -/** 查找个人录制的仿真任务*/ -export function getQuestPageList(mapId) { - return request({ - url: `/api/script/${mapId}/list`, - method: 'get' - }); +/** 分页查找个人录制的仿真任务*/ +export function getQuestPageList(mapId, params) { + return request({ + url: `/api/script/draft/${mapId}/list`, + method: 'get', + params: params + }); } /** 创建任务 */ export function createQuest(data) { - return request({ - url: `/api/script`, - method: 'post', - data - }); + return request({ + url: `/api/script/draft`, + method: 'post', + data + }); } /** 根据任务id删除任务 */ export function deleteQuest(id) { - return request({ - url: `/api/script/${id}`, - method: 'delete' - }); + return request({ + url: `/api/script/draft/${id}`, + method: 'delete' + }); } /** 根据id查询任务基础信息 */ export function getQuestById(id) { - return request({ - url: `/api/script/${id}/basic`, - method: 'get' - }); + return request({ + url: `/api/script/draft/${id}`, + method: 'get' + }); } -/** 根据id查询任务基础信息 */ +/** 根据id查询任务详情信息 */ export function getQuestByIdList(id) { - return request({ - url: `/api/quest/${id}/detail`, - method: 'get' - }); + return request({ + url: `/api/script/draft/${id}/detail`, + method: 'get' + }); } /** 更新任务基本信息 */ export function updateQuest(id, data) { - return request({ - url: `/api/script/${id}`, - method: 'put', - data - }); + return request({ + url: `/api/script/draft/${id}`, + method: 'put', + data + }); } /** 分页查找上线的仿真任务*/ export function getQuestPageListOnline(params) { - return request({ - url: `/api/quest/paging/online`, - method: 'get', - params: params - }); + return request({ + url: `/api/quest/paging/online`, + method: 'get', + params: params + }); } + +/** 剧本发布 */ +export function publishQuest(id, data) { + return request({ + url: `/api/script/draft/${id}/publish`, + method: 'put', + data + }); +} + +/** 剧本撤销发布 */ +export function retractQuest(id, data) { + return request({ + url: `/api/script/draft/${id}/retract`, + method: 'put' + }); +} + diff --git a/src/api/runplan.js b/src/api/runplan.js index b2235dfb0..0a370a528 100644 --- a/src/api/runplan.js +++ b/src/api/runplan.js @@ -1,417 +1,371 @@ import request from '@/utils/request'; -/** - * 获取运行图列表 - */ -export function getRunPlanList() { - return request({ - url: '/api/runPlan/draft/tree', - method: 'get' - }); -} - -/** - * 获取地图速度等级列表 - */ -export function getSpeedLevels(skinCode) { - return request({ - url: `/api/runPlan/draft/${skinCode}/speed`, - method: 'get' - }); -} - /** * 新建地图速度等级列表 */ export function newSpeedLevels(data) { - return request({ - url: '/api/runPlan/draft/speed', - method: 'post', - data: data - }); + return request({ + url: '/api/runPlan/draft/speed', + method: 'post', + data: data + }); } /** * 获取运行图的车站列表 */ export function getStationList(mapId) { - return request({ - url: `/api/runPlan/draft/station/${mapId}`, - method: 'get' - }); -} - -/** - * 通过皮肤获取运行图车站列表 - */ -export function getStationListBySkinCode(skinCode) { - return request({ - url: `/api/runPlan/draft/station/${skinCode}/bySkin`, - method: 'get' - }); + return request({ + url: `/api/runPlan/draft/station/${mapId}`, + method: 'get' + }); } /** * 创建运行图 */ export function newRunPlan(data) { - return request({ - url: '/api/runPlan/draft', - method: 'post', - data: data - }); + return request({ + url: '/api/runPlan/draft', + method: 'post', + data: data + }); } /** * 查询运行图获取数据 */ export function queryRunPlan(planId) { - return request({ - url: `/api/runPlan/draft/${planId}`, - method: 'get' - }); + return request({ + url: `/api/runPlan/draft/${planId}`, + method: 'get' + }); } -// 根据skinCode查询发布运行图列表 -export function queryRunPlanList(skinCode) { - return request({ - url: `/api/runPlan/template/skin/${skinCode}`, - method: 'get' - }); +// 根据mapId查询发布运行图列表 +export function queryRunPlanList(mapId) { + return request({ + url: `/api/runPlan/template/${mapId}/list`, + method: 'get' + }); } // 从发布运行图创建新运行图 export function postCreatePlan(data) { - return request({ - url: `/api/runPlan/draft/createFrom/${data.templateId}`, - method: 'post', - data: data - }); + return request({ + url: `/api/runPlan/draft/createFrom/${data.templateId}`, + method: 'post', + data: data + }); } // 删除运行图 export function deleteRunPlan(planId) { - return request({ - url: `/api/runPlan/draft/${planId}`, - method: 'delete' - }); + return request({ + url: `/api/runPlan/draft/${planId}`, + method: 'delete' + }); } // 修改运行图内容 export function putRunPlanDetail(data) { - return request({ - url: `/api/runPlan/draft/${data.planId}`, - method: 'put', - data: data - }); + return request({ + url: `/api/runPlan/draft/${data.planId}`, + method: 'put', + data: data + }); } /** * 发布运行图 */ export function publishRunPlan(data) { - return request({ - url: `/api/runPlan/draft/${data.planId}/publish`, - method: 'post', - data: data - }); + return request({ + url: `/api/runPlan/draft/${data.planId}/publish`, + method: 'post', + data: data + }); } /** * 导入真实运行图 */ export function importRunPlan(data) { - return request({ - url: `/api/runPlan/draft/${data.skinCode}/prdPlan`, - method: 'post', - data: data.runPlanList - }); -} - -/** 获取运行图停车点列表*/ -export function getRunPlanStopPointList(skinCode) { - return request({ - url: `/api/runPlan/draft/stopPoint/${skinCode}`, - method: 'get' - }); + return request({ + url: `/api/runPlan/draft/${data.mapId}/prdPlan`, + method: 'post', + data: data.runPlanList + }); } /** 运行图*/ export function getRpListByMapId(mapId) { - return request({ - url: `/api/runPlan/draft/${mapId}/list`, - method: 'get' - }); + return request({ + url: `/api/runPlan/draft/${mapId}/list`, + method: 'get' + }); } /** 获取站间运行时间*/ -export function getStationRunning(skinCode) { - return request({ - url: `/api/runPlan/draft/${skinCode}/stationRunning`, - method: 'get' - }); +export function getStationRunning(mapId) { + return request({ + url: `/api/runPlan/draft/${mapId}/stationRunning`, + method: 'get' + }); } /** 设置站间运行时间*/ -export function setStationRunning(skinCode, data) { - return request({ - url: `/api/runPlan/draft/${skinCode}/stationRunning`, - method: 'put', - data: data - }); +export function setStationRunning(mapId, data) { + return request({ + url: `/api/runPlan/draft/${mapId}/stationRunning`, + method: 'put', + data: data + }); } /** 创建运行图*/ export function createEmptyPlan(data) { - return request({ - url: `/api/runPlan/draft`, - method: 'post', - data: data - }); + return request({ + url: `/api/runPlan/draft`, + method: 'post', + data: data + }); } /** 查询运行图服务号是否存在*/ export function checkServiceNumberExist({ planId, serviceNumber }) { - return request({ - url: `/api/runPlan/draft/${planId}/${serviceNumber}/service`, - method: 'get' - }); + return request({ + url: `/api/runPlan/draft/${planId}/${serviceNumber}/service`, + method: 'get' + }); } /** 查询交路列表*/ export function getRoutingList(planId) { - return request({ - url: `/api/runPlan/draft/${planId}/routingList`, - method: 'get' - }); + return request({ + url: `/api/runPlan/draft/${planId}/routingList`, + method: 'get' + }); } /** 根据交路查询交路区段列表*/ export function querySectionListByRouting({ planId, routingCode }) { - return request({ - url: `/api/runPlan/draft/${planId}/${routingCode}/routingSectionList`, - method: 'get' - }); + return request({ + url: `/api/runPlan/draft/${planId}/${routingCode}/routingSectionList`, + method: 'get' + }); } /** 有效性检查*/ export function planEffectiveCheck(planId) { - return request({ - url: `/api/runPlan/draft/${planId}/check`, - method: 'get' - }); + return request({ + url: `/api/runPlan/draft/${planId}/check`, + method: 'get' + }); } /** 增加计划*/ export function addPlanService(data) { - return request({ - url: `/api/runPlan/draft/${data.planId}/service`, - method: 'post', - data: data - }); + return request({ + url: `/api/runPlan/draft/${data.planId}/service`, + method: 'post', + data: data + }); } /** 删除计划*/ export function deletePlanService(data) { - return request({ - url: `/api/runPlan/draft/${data.planId}/service/${data.serviceNumber}`, - method: 'delete' - }); + return request({ + url: `/api/runPlan/draft/${data.planId}/service/${data.serviceNumber}`, + method: 'delete' + }); } /** 复制计划*/ export function duplicateService(data) { - return request({ - url: `/api/runPlan/draft/${data.planId}/service/${data.serviceNumber}`, - method: 'post', - data: data - }); + return request({ + url: `/api/runPlan/draft/${data.planId}/service/${data.serviceNumber}`, + method: 'post', + data: data + }); } /** 增加任务*/ export function addPlanTrip(data) { - return request({ - url: `/api/runPlan/draft/${data.planId}/${data.serviceNumber}/trip`, - method: 'post', - data: data - }); + return request({ + url: `/api/runPlan/draft/${data.planId}/${data.serviceNumber}/trip`, + method: 'post', + data: data + }); } /** 删除任务*/ export function deletePlanTrip(params) { - return request({ - url: `/api/runPlan/draft/${params.planId}/trip/${params.SDTNumber}`, - method: 'delete', - params: { deleteBefore: params.deleteBefore } - }); + return request({ + url: `/api/runPlan/draft/${params.planId}/trip/${params.SDTNumber}`, + method: 'delete', + params: { deleteBefore: params.deleteBefore } + }); } /** 修改任务*/ export function updatePlanTrip(data) { - return request({ - url: `/api/runPlan/draft/${data.planId}/trip/${data.SDTNumber}`, - method: 'put', - data: data - }); + return request({ + url: `/api/runPlan/draft/${data.planId}/trip/${data.SDTNumber}`, + method: 'put', + data: data + }); } /** 根据车次号查询交路*/ export function getRoutingBySDTNumber(params) { - return request({ - url: `/api/runPlan/draft/${params.planId}/routing`, - method: 'get', - params: { - SDTNumber: params.SDTNumber - } - }); + return request({ + url: `/api/runPlan/draft/${params.planId}/routing`, + method: 'get', + params: { + SDTNumber: params.SDTNumber + } + }); } /** 运行图仿真测试*/ export function runPlanNotify({ planId }) { - return request({ - url: `/api/runPlan/draft/${planId}/simulation`, - method: 'get' - }); + return request({ + url: `/api/runPlan/draft/${planId}/simulation`, + method: 'get' + }); } /** 获取运行计划模板列表*/ export function runPlanTemplateList(params) { - return request({ - url: '/api/runPlan/template', - method: 'get', - params: params - }); + return request({ + url: '/api/runPlan/template', + method: 'get', + params: params + }); } /** 删除运行图模板*/ export function deleteRunPlanTemplate(planId) { - return request({ - url: `/api/runPlan/template/${planId}`, - method: 'delete' - }); + return request({ + url: `/api/runPlan/template/${planId}`, + method: 'delete' + }); } /** 生成通用每日运行图*/ export function generateCommonRunPlanEveryDay(planId, params) { - return request({ - url: `/api/runPlan/template/generate/${planId}`, - method: 'post', - params - }); + return request({ + url: `/api/runPlan/template/generate/${planId}`, + method: 'post', + params + }); } /** 获取运行计划每日列表*/ export function runPlanEveryDayList(params) { - return request({ - url: '/api/runPlan/daily', - method: 'get', - params: params - }); + return request({ + url: '/api/runPlan/daily', + method: 'get', + params: params + }); } /** 删除运行图每日计划*/ export function deleteRunPlanEveryDay(planId) { - return request({ - url: `/api/runPlan/daily/${planId}`, - method: 'delete' - }); + return request({ + url: `/api/runPlan/daily/${planId}`, + method: 'delete' + }); } -/** 获取地图运行图的车次号*/ -// export function getPublishMapTrainNos(skinCode) { -// return request({ -// url: `/api/runPlan/daily/${skinCode}/trainNos`, -// method: 'get' -// }); -// } - /** 分页查询加载计划*/ export function getRunPlanLoadList(params) { - return request({ - url: `/api/runPlan/daily/runPlanLoad`, - method: 'get', - params: params - }); + return request({ + url: `/api/runPlan/daily/runPlanLoad`, + method: 'get', + params: params + }); } /** 创建加载计划*/ export function createRunPlanLoad(data) { - return request({ - url: `/api/runPlan/daily/runPlanLoad`, - method: 'post', - data: data - }); + return request({ + url: `/api/runPlan/daily/runPlanLoad`, + method: 'post', + data: data + }); } /** 管理创建通用加载计划*/ export function createRunPlanCommon(data) { - return request({ - url: `/api/runPlan/daily/runPlanLoad/common`, - method: 'post', - data: data - }); + return request({ + url: `/api/runPlan/daily/runPlanLoad/common`, + method: 'post', + data: data + }); } /** 删除加载计划*/ export function deleteRunPlanLoad(planId) { - return request({ - url: `/api/runPlan/daily/runPlanLoad/${planId}`, - method: 'delete' - }); + return request({ + url: `/api/runPlan/daily/runPlanLoad/${planId}`, + method: 'delete' + }); } /** 查询模板运行图数据*/ export function queryRunPlanTemplate(planId) { - return request({ - url: `/api/runPlan/template/${planId}`, - method: 'get' - }); + return request({ + url: `/api/runPlan/template/${planId}`, + method: 'get' + }); } /** 查询当日运行图数据*/ export function queryRunPlanDaily(planId) { - return request({ - url: `/api/runPlan/daily/${planId}`, - method: 'get' - }); + return request({ + url: `/api/runPlan/daily/${planId}`, + method: 'get' + }); } /** 获取模板运行图列表*/ export function listAllTempLateRunPlan() { - return request({ - url: `/api/runPlan/template/all`, - method: 'get' - }); + return request({ + url: `/api/runPlan/template/all`, + method: 'get' + }); } // 删除加载计划 export function deleteDailyRunPlanLoad(id) { - return request({ - url: `/api/runPlan/daily/runPlanLoad/${id}`, - method: 'DELETE' - }); + return request({ + url: `/api/runPlan/daily/runPlanLoad/${id}`, + method: 'DELETE' + }); } // 从加载计划创建每日计划 export function postDailyRunPlanLoadGenerate(id) { - return request({ - url: `/api/runPlan/daily/runPlanLoad/${id}/generate`, - method: 'post' - }); + return request({ + url: `/api/runPlan/daily/runPlanLoad/${id}/generate`, + method: 'post' + }); } // 加载通用排班计划 export function postSchedulingCommonGenerate(mapId) { - return request({ - url: `/api/scheduling/common/generate?mapId=${mapId}`, - method: 'post' - }); + return request({ + url: `/api/scheduling/common/generate?mapId=${mapId}`, + method: 'post' + }); } // 从加载计划创建每日计划 export function postRunPlanTemplate(data) { - return request({ - url: `/api/runPlan/template/${data.id}/copyAs/${data.skinCode}?name=${data.name}`, - method: 'post' - }); -} \ No newline at end of file + return request({ + url: `/api/runPlan/template/${data.id}/copyAs/${data.mapId}?name=${data.name}`, + method: 'post' + }); +} diff --git a/src/api/script.js b/src/api/script.js index 2e58fe548..a400453b7 100644 --- a/src/api/script.js +++ b/src/api/script.js @@ -4,6 +4,7 @@ import request from '@/utils/request'; export function getScriptPageListOnline(params) { return request({ url: `/api/script/paging/online`, + // url: `/api/script/paging/published`, method: 'get', params: params }); @@ -17,10 +18,17 @@ export function getScriptByIdList(id) { }); } -/** 通过ID查询剧本的基础信息 */ +/** 通过ID查询发布的剧本的详细信息 */ export function getScriptById(id) { return request({ url: `/api/script/${id}/detail`, method: 'get' }); } +/** 通过ID查询未发布剧本的详细信息 */ +export function getDraftScriptByGroup(group) { + return request({ + url: `/api/simulation/${group}/script/loadedScript`, + method: 'get' + }); +} diff --git a/src/api/simulation.js b/src/api/simulation.js index 6c091c4dc..12364061f 100644 --- a/src/api/simulation.js +++ b/src/api/simulation.js @@ -2,78 +2,78 @@ import request from '@/utils/request'; /** 获取故障规则列表*/ export function getFailureGenerateRules(params) { - return request({ - url: `/api/simulation/failureGenerateRules`, - method: 'get', - params: params - }); + return request({ + url: `/api/simulation/failureGenerateRules`, + method: 'get', + params: params + }); } /** 设置自动故障*/ export function setFailureMode(data, group) { - return request({ - url: `/api/simulation/${group}/failureMode`, - method: 'post', - data: data - }); + return request({ + url: `/api/simulation/${group}/failureMode`, + method: 'post', + data: data + }); } /** * 仿真系统按计划行车 */ export function runDiagramStart(params, group) { - return request({ - url: `/api/simulation/${group}/start`, - method: 'put', - params: params - }); + return request({ + url: `/api/simulation/${group}/start`, + method: 'put', + params: params + }); } /** * 仿真系统结束计划行车 */ export function runDiagramOver(group) { - return request({ - url: `/api/simulation/${group}/over`, - method: 'put' - }); + return request({ + url: `/api/simulation/${group}/over`, + method: 'put' + }); } /** * 退出仿真系统 */ export function runDiagramQuit(group) { - return request({ - url: `/api/simulation/${group}/quit`, - method: 'put' - }); + return request({ + url: `/api/simulation/${group}/quit`, + method: 'put' + }); } /** 获取仿真系统时间*/ export function runDiagramGetTime(group) { - return request({ - url: `/api/simulation/${group}/systemTime`, - method: 'get' - }); + return request({ + url: `/api/simulation/${group}/systemTime`, + method: 'get' + }); } // 查看是否开始按计划行车 export function runDiagramIsStart(group) { - return request({ - url: `/api/simulation/${group}/isRunPlanStart`, - method: 'get' - }); + return request({ + url: `/api/simulation/${group}/isRunPlanStart`, + method: 'get' + }); } /** * 仿真系统CBTC * @param {*} mapId */ -export function simulationNotify({ mapId, code }) { - return request({ - url: `/api/simulation/${mapId}/${code}`, - method: 'get' - }); +export function simulationNotify({ mapId, mapPrdId }) { + return request({ + url: `/api/simulation/${mapId}/${mapPrdId}`, + method: 'get' + }); } /** @@ -81,10 +81,10 @@ export function simulationNotify({ mapId, code }) { * @param {*} mapId */ export function bitScreenNotify({ mapId }) { - return request({ - url: `/api/simulation/bigScreen/${mapId}`, - method: 'get' - }); + return request({ + url: `/api/simulation/bigScreen/${mapId}`, + method: 'get' + }); } /** @@ -92,10 +92,10 @@ export function bitScreenNotify({ mapId }) { * @param {*} data */ export function trainingNotify({ trainingId }) { - return request({ - url: `/api/simulation/training/${trainingId}`, - method: 'get' - }); + return request({ + url: `/api/simulation/training/${trainingId}`, + method: 'get' + }); } /** @@ -103,308 +103,334 @@ export function trainingNotify({ trainingId }) { * @param {*} data */ export function examNotify({ examId }) { - return request({ - url: `/api/simulation/exam/${examId}`, - method: 'get' - }); + return request({ + url: `/api/simulation/exam/${examId}`, + method: 'get' + }); } /** 获取用户实训列表*/ export function getSimulationList(data) { - return request({ - url: `/api/simulation/stats`, - method: 'get', - params: data - }); + return request({ + url: `/api/simulation/stats`, + method: 'get', + params: data + }); } /** 添加用户仿真数据*/ export function postSimulationStats(data) { - return request({ - url: `/api/simulation/stats`, - method: 'post', - data: data - }); + return request({ + url: `/api/simulation/stats`, + method: 'post', + data: data + }); } /** 更新用户仿真数据*/ export function putSimulationStats(data) { - return request({ - url: `/api/simulation/${data.id}/stats`, - method: 'put', - data: data - }); + return request({ + url: `/api/simulation/${data.id}/stats`, + method: 'put', + data: data + }); } /** 删除用户仿真数据*/ export function deleteSimulationStats(statsId) { - return request({ - url: `/api/simulation/${statsId}`, - method: 'delete' - }); + return request({ + url: `/api/simulation/${statsId}`, + method: 'delete' + }); } /** 获取用户鼠标左键选中的设备信息*/ export function letfMouseSelectDevice(deviceCode, group) { - return request({ - url: `/api/simulation/${group}/device/${deviceCode}`, - method: 'get' - }); + return request({ + url: `/api/simulation/${group}/device/${deviceCode}`, + method: 'get' + }); } /** 获取每日运行图*/ export function getEveryDayRunPlanData(group) { - return request({ - url: `/api/simulation/${group}/runPlan`, - method: 'get' - }); + return request({ + url: `/api/simulation/${group}/runPlan`, + method: 'get' + }); } /** 录制脚本仿真*/ export function scriptRecordNotify(scriptId) { - return request({ - url: `/api/simulation/scriptWrite/${scriptId}`, - method: 'get' - }); + return request({ + url: `/api/simulation/scriptWrite/${scriptId}`, + method: 'get' + }); } /** 保存剧本背景*/ export function saveScriptScenes(group) { - return request({ - url: `/api/simulation/${group}/scriptWrite/scenes`, - method: 'put' - }); + return request({ + url: `/api/simulation/${group}/scriptWrite/scenes`, + method: 'put' + }); } /** 保存录制任务数据*/ export function saveScriptData(group) { - return request({ - url: `/api/simulation/${group}/scriptWrite/saveData`, - method: 'put' - }); + return request({ + url: `/api/simulation/${group}/scriptWrite/saveData`, + method: 'put' + }); } /** 更新任务地图定位信息*/ export function updateMapLocation(group, data) { - return request({ - url: `/api/simulation/${group}/scriptWrite/mapLocation`, - method: 'put', - data - }); + return request({ + url: `/api/simulation/${group}/scriptWrite/mapLocation`, + method: 'put', + data + }); } /** 获取剧本编制的所有成员角色*/ export function getScriptMemberData(group) { - return request({ - url: `/api/simulation/${group}/scriptWrite/members`, - method: 'get' - }); + return request({ + url: `/api/simulation/${group}/scriptWrite/members`, + method: 'get' + }); } /** 获取剧本出演成员角色 */ export function getScriptPlayMember(group) { - return request({ - url: `/api/simulation/${group}/scriptWrite/players`, - method: 'get' - }); + return request({ + url: `/api/simulation/${group}/scriptWrite/players`, + method: 'get' + }); } /** 取消剧本演出成员角色 */ export function cancleScriptMembers(group, data) { - return request({ - url: `/api/simulation/${group}/scriptWrite/removePlayers`, - method: 'put', - data - }); + return request({ + url: `/api/simulation/${group}/scriptWrite/removePlayers`, + method: 'put', + data + }); } /** 选择剧本演出成员角色 */ export function selectScriptMembers(group, data) { - return request({ - url: `/api/simulation/${group}/scriptWrite/choosePlayers`, - method: 'put', - data - }); + return request({ + url: `/api/simulation/${group}/scriptWrite/choosePlayers`, + method: 'put', + data + }); } /** 修改剧本演出成员性别 */ export function modifyScriptMemberSex(group, playerId, data) { - return request({ - url: `/api/simulation/${group}/scriptWrite/player/${playerId}?gender=${data.gender}`, - method: 'put' - }); + return request({ + url: `/api/simulation/${group}/scriptWrite/player/${playerId}?gender=${data.gender}`, + method: 'put' + }); } /** 清除仿真剧本数据*/ export function dumpScriptData(group) { - return request({ - url: `/api/simulation/${group}/scriptWrite/saveData`, - method: 'delete' - }); + return request({ + url: `/api/simulation/${group}/scriptWrite/saveData`, + method: 'delete' + }); } /** 查询录制剧本步骤*/ export function queryScriptStep(group) { - return request({ - url: `/api/simulation/${group}/scriptRecordStage`, - method: 'get' - }); + return request({ + url: `/api/simulation/${group}/scriptRecordStage`, + method: 'get' + }); } /** 获取指定时间里可加载列车的个数*/ export function getDesignatedTimeTrainNum(params, group) { - return request({ - url: `/api/simulation/${group}/plan/trainNum`, - method: 'get', - params - }); + return request({ + url: `/api/simulation/${group}/plan/trainNum`, + method: 'get', + params + }); } /** 添加剧本动作 */ export function addScriptAction(group, data) { - return request({ - url: `/api/simulation/${group}/scriptWrite/action`, - method: 'post', - data - }); + return request({ + url: `/api/simulation/${group}/scriptWrite/action`, + method: 'post', + data + }); } /** 删除剧本动作 */ export function deleteScriptAction(group, actionId) { - return request({ - url: `/api/simulation/${group}/scriptWrite/action/${actionId}`, - method: 'delete' - }); + return request({ + url: `/api/simulation/${group}/scriptWrite/action/${actionId}`, + method: 'delete' + }); } /** 修改剧本动作 */ export function modifyScriptAction(group, actionId, data) { - return request({ - url: `/api/simulation/${group}/scriptWrite/action/${actionId}`, - method: 'put', - data - }); + return request({ + url: `/api/simulation/${group}/scriptWrite/action/${actionId}`, + method: 'put', + data + }); } /** 分页查询存在的仿真 */ export function getExistingSimulation(params) { - return request({ - url: `/api/simulation/manage/page`, - method: 'get', - params - }); + return request({ + url: `/api/simulation/manage/page`, + method: 'get', + params + }); } /** 删除存在的仿真 */ export function deleteExistingSimulation(group) { - return request({ - url: `/api/simulation/manage/${group}`, - method: 'delete' - }); + return request({ + url: `/api/simulation/manage/${group}`, + method: 'delete' + }); } /** 根据设备类型获取设备列表 */ export function getDeviceCodeByDeviceType(group, params) { - return request({ - url: `/api/simulation/${group}/deviceType/devices`, - method: 'get', - params - }); + return request({ + url: `/api/simulation/${group}/deviceType/devices`, + method: 'get', + params + }); } /** 获取任务录制的数据 */ export function getScriptRecord(group) { - return request({ - url: `/api/simulation/${group}/scriptWrite`, - method: 'get' - }); + return request({ + url: `/api/simulation/${group}/scriptWrite`, + method: 'get' + }); } /** 加载任务*/ export function loadQuest(questId, memberId, group) { - return request({ - url: `/api/simulation/${group}/quest/${questId}?memberId=${memberId}`, - method: 'post' - }); + return request({ + url: `/api/simulation/${group}/quest/${questId}?memberId=${memberId}`, + method: 'post' + }); } /** 加载剧本 */ export function loadScript(scriptId, memberId, group) { - return request({ - url: `api/simulation/${group}/script/${scriptId}?memberId=${memberId}`, - method: 'post' - }); + return request({ + url: `api/simulation/${group}/script/${scriptId}?memberId=${memberId}`, + method: 'post' + }); } /** 退出剧本*/ export function quitScript(group) { - return request({ - url: `/api/simulation/${group}/script`, - method: 'delete' - }); + return request({ + url: `/api/simulation/${group}/script`, + method: 'delete' + }); } /** 退出任务*/ export function quitQuest(group) { - return request({ - url: `/api/simulation/${group}/quest`, - method: 'put' - }); + return request({ + url: `/api/simulation/${group}/quest`, + method: 'put' + }); } /** 根据group获取仿真对象*/ export function getSimulationInfo(group) { - return request({ - url: `/api/simulation/${group}`, - method: 'get' - }); + return request({ + url: `/api/simulation/${group}`, + method: 'get' + }); } /** 获取可用的设备指令*/ export function getAvailableDeviceCommand(params) { - return request({ - url: `/api/simulation/deviceCommand/available`, - method: 'get', - params - }); + return request({ + url: `/api/simulation/deviceCommand/available`, + method: 'get', + params + }); } /** 保存/修改任务剧本*/ export function saveTaskScript(group, data) { - return request({ - url: `/api/simulation/${group}/questRecord/script`, - method: 'post', - data - }); + return request({ + url: `/api/simulation/${group}/questRecord/script`, + method: 'post', + data + }); } /** 暂停剧本编制的仿真 */ export function scriptPause(group) { - return request({ - url: `/api/simulation/${group}/scriptWrite/pause`, - method: 'post' - }); + return request({ + url: `/api/simulation/${group}/scriptWrite/pause`, + method: 'post' + }); } /** 恢复仿真运行并执行刚编辑的剧本动作 */ export function executeScript(group) { - return request({ - url: `/api/simulation/${group}/scriptWrite/execute`, - method: 'post' - }); + return request({ + url: `/api/simulation/${group}/scriptWrite/execute`, + method: 'post' + }); } /** 生成用户自己的当日运行图*/ export function generateDayRunPlan(planId, group) { - return request({ - url: `/api/simulation/${group}/loadRunPlan/${planId}`, - method: 'post' - }); + return request({ + url: `/api/simulation/${group}/loadRunPlan/${planId}`, + method: 'post' + }); } /** 创建派班计划仿真*/ export function schedulingNotify(params) { - return request({ - url: `/api/scheduling/simulation`, - method: 'post', - params - }); + return request({ + url: `/api/scheduling/simulation`, + method: 'post', + params + }); } + +/** 获取PLC网关 */ +export function getPlcGateway(group) { + return request({ + url: `/api/simulation/${group}/plcGateway`, + method: 'get' + }); +} + +/** 处理ibp盘事件 */ +export function handlerIbpEvent(group, data) { + return request({ + url: `/api/simulation/${group}/ibp/event`, + method: 'post', + data: data + }); +} + +/** 预览脚本仿真*/ +export function scriptDraftRecordNotify(scriptId) { + return request({ + url: `/api/simulation/scriptDraft/${scriptId}`, + method: 'get' + }); +} + diff --git a/src/api/trainingPlatform.js b/src/api/trainingPlatform.js new file mode 100644 index 000000000..15738bce9 --- /dev/null +++ b/src/api/trainingPlatform.js @@ -0,0 +1,86 @@ +import request from '@/utils/request'; + +export function getTrainingSystemList(cityCode, params) { + /** 根据cityCode后去对应地图及其子系统 */ + return request({ + url: `/api/mapSystem/city/${cityCode}`, + method: 'get', + params + }); +} + +export function getTrainingSystemListByMapId(mapId) { + /** 根据mapId去获取其子系统 */ + return request({ + url: `/api/mapSystem/${mapId}`, + method: 'get' + }); +} + +export function generateMapSystem(mapId) { + /** 根据mapId生成地图子系统 */ + return request({ + url: `/api/mapSystem/generate/${mapId}`, + method: 'post' + }); +} + +export function getSubSystemInfo(id) { + /** 查询子系统信息 */ + return request({ + url: `/api/mapSystem/${id}`, + method: 'get' + }); +} + +export function getSubSystemDetail(id) { + /** 查询子系统详情*/ + return request({ + url: `/api/mapSystem/${id}/detail`, + method: 'get' + }); +} + +export function getMapSystemPageList(params) { + /** 分页查询地图系统 */ + return request({ + url: `/api/mapSystem`, + method: 'get', + params + }); +} + +export function createMapSubSystem(data) { + /** 创建地图系统 */ + return request({ + url: `/api/mapSystem`, + method: 'post', + data: data + }); +} + +export function updateSubSystem(id, data) { + /** 查询子系统信息 */ + return request({ + url: `/api/mapSystem/${id}`, + method: 'put', + data: data + }); +} + +export function deleteSubSystem(id) { + /** 删除地图系统 */ + return request({ + url: `/api/mapSystem/${id}`, + method: 'delete' + }); +} + +export function getSubSystemByProjectCode(projectCode) { + /** 根据项目编号查询地图子系统 */ + return request({ + url: `/api/mapSystem/project/${projectCode}`, + method: 'get' + }); +} + diff --git a/src/assets/erCode.jpg b/src/assets/erCode.jpg new file mode 100644 index 000000000..645f77b66 Binary files /dev/null and b/src/assets/erCode.jpg differ diff --git a/src/assets/icon/favicon.png b/src/assets/icon/favicon.png new file mode 100644 index 000000000..0af73dedc Binary files /dev/null and b/src/assets/icon/favicon.png differ diff --git a/src/assets/icon/favicon_xty.png b/src/assets/icon/favicon_xty.png new file mode 100644 index 000000000..49294e236 Binary files /dev/null and b/src/assets/icon/favicon_xty.png differ diff --git a/src/assets/logo_changan.png b/src/assets/logo_changan.png new file mode 100644 index 000000000..79b86d820 Binary files /dev/null and b/src/assets/logo_changan.png differ diff --git a/src/assets/logo_xty.png b/src/assets/logo_xty.png new file mode 100644 index 000000000..49294e236 Binary files /dev/null and b/src/assets/logo_xty.png differ diff --git a/src/components/PopMenu/index.vue b/src/components/PopMenu/index.vue index 5b504f164..8ad4795a5 100644 --- a/src/components/PopMenu/index.vue +++ b/src/components/PopMenu/index.vue @@ -87,132 +87,133 @@ diff --git a/src/components/QueryListPage/DataForm.vue b/src/components/QueryListPage/DataForm.vue index ad0f2ea5e..3ca61721e 100644 --- a/src/components/QueryListPage/DataForm.vue +++ b/src/components/QueryListPage/DataForm.vue @@ -39,6 +39,7 @@ @@ -131,6 +133,7 @@ :key="option.value" :label="option.label" :value="option.value" + :disabled="option.disabled" /> @@ -146,6 +149,7 @@ :key="option.value" :label="option.label" :value="option.value" + :disabled="option.disabled" /> @@ -162,6 +166,7 @@ :key="option.value" :label="option.label" :value="option.value" + :disabled="option.disabled" /> @@ -177,6 +182,7 @@ :key="option.value" :label="option.label" :value="option.value" + :disabled="option.disabled" /> @@ -232,52 +238,52 @@ diff --git a/src/components/QueryListPage/QueryListPage.vue b/src/components/QueryListPage/QueryListPage.vue index 1faf56ee3..6e3981850 100644 --- a/src/components/QueryListPage/QueryListPage.vue +++ b/src/components/QueryListPage/QueryListPage.vue @@ -1,9 +1,11 @@ @@ -78,7 +68,6 @@ export default { dialogShow: false, loading: false, selected: null, - row: null, operation: '', display: true, stationName: '', @@ -160,47 +149,40 @@ export default { this.$store.dispatch('training/emitTipFresh'); }); }, + passWordCommit(data) { + const operate = { + send: true, + type: data.type, + operation: data.operateNext + }; + + this.loading = true; + this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.loading = false; + if (valid) { + this.doClose(); + } + }).catch(() => { + this.loading = false; + this.doClose(); + this.$refs.noticeInfo.doShow(operate); + }); + }, doClose() { this.loading = false; this.dialogShow = false; - this.guide(); this.$refs.table.setCurrentRow(); this.$store.dispatch('training/emitTipFresh'); mouseCancelState(this.selected); }, - guide() { - // 恢复之前选中设备 - if (this.beforeSectionList && this.beforeSectionList.length) { - this.beforeSectionList.forEach(elem => { - elem.cutOff = false; - }); - } - - this.$store.dispatch('training/updateMapState', [...this.beforeSectionList]); - this.beforeSectionList = []; - }, clickEvent(row, event, column) { - this.row = row; if (row) { - // 恢复进路区段的切除状态 - this.guide(); - row.canSetting = true; - // 设置选中区段为切除状态 - if (row.containSectionList && row.containSectionList.length) { - // 设置新选的进路区段为切除状态 - row.containSectionList.forEach(elem => { - elem.cutOff = true; - }); - } - - this.$store.dispatch('training/updateMapState', [...row.containSectionList]); - this.beforeSectionList = row.containSectionList || []; - - // 设置选中指令 const operate = { + repeat: true, type: MapDeviceType.Signal.type, operation: OperationEvent.Signal.guide.choose.operation, - val: row.code + val: row.code, + selection: row }; this.$store.dispatch('training/next', operate).then(({ valid }) => { @@ -216,7 +198,7 @@ export default { const operate = { type: MapDeviceType.Signal.type, operation: OperationEvent.Signal.guide.menu.operation, - operateCode: OperationEvent.Signal.guide.confirm.operation + operateNext: OperationEvent.Signal.guide.confirm.operation }; this.loading = true; diff --git a/src/jmap/theme/chengdu_03/menus/dialog/routeHandControl.vue b/src/jmap/theme/chengdu_03/menus/dialog/routeHandControl.vue new file mode 100644 index 000000000..1d0b730c5 --- /dev/null +++ b/src/jmap/theme/chengdu_03/menus/dialog/routeHandControl.vue @@ -0,0 +1,285 @@ + + + diff --git a/src/jmap/theme/chengdu_03/menus/dialog/sectionControl.vue b/src/jmap/theme/chengdu_03/menus/dialog/sectionControl.vue index 3b262fa86..ddf690e1e 100644 --- a/src/jmap/theme/chengdu_03/menus/dialog/sectionControl.vue +++ b/src/jmap/theme/chengdu_03/menus/dialog/sectionControl.vue @@ -27,7 +27,7 @@ - + @@ -129,6 +129,22 @@ export default { this.fault(); } }, + passWordCommit(data) { + const operate = { + send: true, + type: data.type, + operation: data.operateNext + }; + + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.doClose(); + } + }).catch(() => { + this.doClose(); + this.$refs.noticeInfo.doShow(operate); + }); + }, // 道岔单锁 lock() { const operate = { @@ -192,10 +208,9 @@ export default { // 区故解 fault() { const operate = { - // send: true, type: MapDeviceType.Section.type, operation: OperationEvent.Section.fault.menu.operation, - operateCode: OperationEvent.Section.fault.confirm.operation + operateNext: OperationEvent.Section.fault.confirm.operation }; this.loading = true; diff --git a/src/jmap/theme/chengdu_03/menus/dialog/switchControl.vue b/src/jmap/theme/chengdu_03/menus/dialog/switchControl.vue index 4de269dad..911e471b5 100644 --- a/src/jmap/theme/chengdu_03/menus/dialog/switchControl.vue +++ b/src/jmap/theme/chengdu_03/menus/dialog/switchControl.vue @@ -31,7 +31,7 @@ - + @@ -153,6 +153,22 @@ export default { this.openPasswordBox(this.operation, OperationEvent.Switch.fault.confirm.operation); } }, + passWordCommit(data) { + const operate = { + send: true, + type: data.type, + operation: data.operateNext + }; + + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.doClose(); + } + }).catch(() => { + this.doClose(); + this.$refs.noticeInfo.doShow(operate); + }); + }, // 道岔单锁 lock() { const operate = { @@ -311,11 +327,11 @@ export default { }); }, // 打开密码输入框 - openPasswordBox(operation, code) { + openPasswordBox(operation, operateNext) { const operate = { type: MapDeviceType.Switch.type, operation: operation, - operateCode: code + operateNext: operateNext }; this.loading = true; this.$store.dispatch('training/next', operate).then(({ valid }) => { diff --git a/src/jmap/theme/chengdu_03/menus/dialog/trainControl.vue b/src/jmap/theme/chengdu_03/menus/dialog/trainControl.vue index 5e1fc5612..e4e95d303 100644 --- a/src/jmap/theme/chengdu_03/menus/dialog/trainControl.vue +++ b/src/jmap/theme/chengdu_03/menus/dialog/trainControl.vue @@ -97,241 +97,233 @@ diff --git a/src/jmap/theme/fuzhou_01/menus/menuSection.vue b/src/jmap/theme/fuzhou_01/menus/menuSection.vue index bebfc9d15..f2a03250d 100644 --- a/src/jmap/theme/fuzhou_01/menus/menuSection.vue +++ b/src/jmap/theme/fuzhou_01/menus/menuSection.vue @@ -22,386 +22,386 @@ import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic'; import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus'; export default { - name: 'SectionMenu', - components: { - PopMenu, - SectionControl, - SectionCmdControl, - SpeedCmdControl, - TrainCreate, - NoticeInfo - }, - props: { - selected: { - type: Object, - default() { - return null; - } - } - }, - data() { - return { - menu: [], - menuNormal: { - local: [ - { - label: this.$t('menu.menuSection.sectionFaultUnlock'), - handler: this.fault, - disabledCallback: MenuDisabledState.Section.fault, - auth: { station: true, center: false } - }, - { - label: this.$t('menu.menuSection.sectionResection'), - handler: this.split, - disabledCallback: MenuDisabledState.Section.split, - auth: { station: true, center: false } - }, - { - label: this.$t('menu.menuSection.sectionActive'), - handler: this.active, - disabledCallback: MenuDisabledState.Section.active, - auth: { station: true, center: false } - }, - { - label: this.$t('menu.menuSection.sectionAxisPreReset'), - handler: this.axlePreReset, - disabledCallback: MenuDisabledState.Section.axlePreReset, - auth: { station: true, center: false } - }, - { - label: this.$t('menu.menuSection.sectionBlockade'), - handler: this.lock, - disabledCallback: MenuDisabledState.Section.lock, - auth: { station: true, center: false } - }, - { - label: this.$t('menu.menuSection.sectionUnblock'), - handler: this.unlock, - disabledCallback: MenuDisabledState.Section.unlock, - auth: { station: true, center: false } - }, - { - label: this.$t('menu.menuSection.sectionSetSpeedLimit'), - handler: this.setSpeed, - disabledCallback: MenuDisabledState.Section.setSpeed, - auth: { station: true, center: false } - }, - { - label: this.$t('menu.menuSection.sectionCancelSpeedLimit'), - handler: this.cancelSpeed, - disabledCallback: MenuDisabledState.Section.cancelSpeed, - auth: { station: true, center: false } - } - ], - central: [ - { - label: this.$t('menu.menuSection.sectionFaultUnlock'), - handler: this.fault, - disabledCallback: MenuDisabledState.Section.fault, - auth: { station: false, center: true } - }, - { - label: this.$t('menu.menuSection.sectionResection'), - handler: this.split, - disabledCallback: MenuDisabledState.Section.split, - auth: { station: false, center: true } - }, - { - label: this.$t('menu.menuSection.sectionActive'), - handler: this.active, - disabledCallback: MenuDisabledState.Section.active, - auth: { station: false, center: true } - }, - { - label: this.$t('menu.menuSection.axisPreReset'), - handler: this.axlePreReset, - disabledCallback: MenuDisabledState.Section.axlePreReset, - auth: { station: false, center: false } - }, - { - label: this.$t('menu.menuSection.sectionBlockade'), - handler: this.lock, - disabledCallback: MenuDisabledState.Section.lock, - auth: { station: false, center: true } - }, - { - label: this.$t('menu.menuSection.sectionUnblock'), - handler: this.unlock, - disabledCallback: MenuDisabledState.Section.unlock, - auth: { station: false, center: true } - }, - { - label: this.$t('menu.menuSection.sectionSetSpeedLimit'), - handler: this.setSpeed, - disabledCallback: MenuDisabledState.Section.setSpeed, - auth: { station: false, center: true } - }, - { - label: this.$t('menu.menuSection.sectionCancelSpeedLimit'), - handler: this.cancelSpeed, - disabledCallback: MenuDisabledState.Section.cancelSpeed, - auth: { station: false, center: true } - } - ] - }, - menuTrain: [ - { - label: this.$t('menu.menuSection.createTrain'), - handler: this.newTrain, - disabledCallback: MenuDisabledState.Section.newTrain - } - ], - menuForce: [ - { - label: this.$t('menu.menuSection.setFault'), - handler: this.setStoppage, - disabledCallback: MenuDisabledState.Section.setStoppage - }, - { - label: this.$t('menu.menuSection.cancelFault'), - handler: this.cancelStoppage, - disabledCallback: MenuDisabledState.Section.cancelStoppage - } - ] - }; - }, - computed: { - ...mapGetters('training', [ - 'mode', - 'operatemode' - ]), - ...mapGetters('menuOperation', [ - 'buttonOperation' - ]) - }, - watch: { - '$store.state.menuOperation.menuCount': function (val) { - if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Section) && !this.buttonOperation) { - this.doShow(this.$store.state.menuOperation.menuPosition); - } else { - this.doClose(); - } - } - }, - methods: { - clickEvent() { - const self = this; - window.onclick = function (e) { - self.doClose(); - }; - }, - initMenu() { - // 编辑模式菜单列表 - this.menu = menuFiltration(this.menuNormal); - if (this.operatemode === OperateMode.ADMIN) { - this.menu = [...this.menu, ...this.menuForce, ...this.menuTrain]; - } + name: 'SectionMenu', + components: { + PopMenu, + SectionControl, + SectionCmdControl, + SpeedCmdControl, + TrainCreate, + NoticeInfo + }, + props: { + selected: { + type: Object, + default() { + return null; + } + } + }, + data() { + return { + menu: [], + menuNormal: { + local: [ + { + label: this.$t('menu.menuSection.sectionFaultUnlock'), + handler: this.fault, + disabledCallback: MenuDisabledState.Section.fault, + auth: { station: true, center: false } + }, + { + label: this.$t('menu.menuSection.sectionResection'), + handler: this.split, + disabledCallback: MenuDisabledState.Section.split, + auth: { station: true, center: false } + }, + { + label: this.$t('menu.menuSection.sectionActive'), + handler: this.active, + disabledCallback: MenuDisabledState.Section.active, + auth: { station: true, center: false } + }, + { + label: this.$t('menu.menuSection.sectionAxisPreReset'), + handler: this.axlePreReset, + disabledCallback: MenuDisabledState.Section.axlePreReset, + auth: { station: true, center: false } + }, + { + label: this.$t('menu.menuSection.sectionBlockade'), + handler: this.lock, + disabledCallback: MenuDisabledState.Section.lock, + auth: { station: true, center: false } + }, + { + label: this.$t('menu.menuSection.sectionUnblock'), + handler: this.unlock, + disabledCallback: MenuDisabledState.Section.unlock, + auth: { station: true, center: false } + }, + { + label: this.$t('menu.menuSection.sectionSetSpeedLimit'), + handler: this.setSpeed, + disabledCallback: MenuDisabledState.Section.setSpeed, + auth: { station: true, center: false } + }, + { + label: this.$t('menu.menuSection.sectionCancelSpeedLimit'), + handler: this.cancelSpeed, + disabledCallback: MenuDisabledState.Section.cancelSpeed, + auth: { station: true, center: false } + } + ], + central: [ + { + label: this.$t('menu.menuSection.sectionFaultUnlock'), + handler: this.fault, + disabledCallback: MenuDisabledState.Section.fault, + auth: { station: false, center: true } + }, + { + label: this.$t('menu.menuSection.sectionResection'), + handler: this.split, + disabledCallback: MenuDisabledState.Section.split, + auth: { station: false, center: true } + }, + { + label: this.$t('menu.menuSection.sectionActive'), + handler: this.active, + disabledCallback: MenuDisabledState.Section.active, + auth: { station: false, center: true } + }, + { + label: this.$t('menu.menuSection.axisPreReset'), + handler: this.axlePreReset, + disabledCallback: MenuDisabledState.Section.axlePreReset, + auth: { station: false, center: false } + }, + { + label: this.$t('menu.menuSection.sectionBlockade'), + handler: this.lock, + disabledCallback: MenuDisabledState.Section.lock, + auth: { station: false, center: true } + }, + { + label: this.$t('menu.menuSection.sectionUnblock'), + handler: this.unlock, + disabledCallback: MenuDisabledState.Section.unlock, + auth: { station: false, center: true } + }, + { + label: this.$t('menu.menuSection.sectionSetSpeedLimit'), + handler: this.setSpeed, + disabledCallback: MenuDisabledState.Section.setSpeed, + auth: { station: false, center: true } + }, + { + label: this.$t('menu.menuSection.sectionCancelSpeedLimit'), + handler: this.cancelSpeed, + disabledCallback: MenuDisabledState.Section.cancelSpeed, + auth: { station: false, center: true } + } + ] + }, + menuTrain: [ + { + label: this.$t('menu.menuSection.createTrain'), + handler: this.newTrain, + disabledCallback: MenuDisabledState.Section.newTrain + } + ], + menuForce: [ + { + label: this.$t('menu.menuSection.setFault'), + handler: this.setStoppage, + disabledCallback: MenuDisabledState.Section.setStoppage + }, + { + label: this.$t('menu.menuSection.cancelFault'), + handler: this.cancelStoppage, + disabledCallback: MenuDisabledState.Section.cancelStoppage + } + ] + }; + }, + computed: { + ...mapGetters('training', [ + 'mode', + 'operatemode' + ]), + ...mapGetters('menuOperation', [ + 'buttonOperation' + ]) + }, + watch: { + '$store.state.menuOperation.menuCount': function (val) { + if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Section) && !this.buttonOperation) { + this.doShow(this.$store.state.menuOperation.menuPosition); + } else { + this.doClose(); + } + } + }, + methods: { + clickEvent() { + const self = this; + window.onclick = function (e) { + self.doClose(); + }; + }, + initMenu() { + // 编辑模式菜单列表 + this.menu = menuFiltration(this.menuNormal); + if (this.operatemode === OperateMode.ADMIN) { + this.menu = [...this.menu, ...this.menuForce, ...this.menuTrain]; + } - // 故障模式菜单列表 - if (this.operatemode === OperateMode.FAULT) { - this.menu = this.menuForce; - } + // 故障模式菜单列表 + if (this.operatemode === OperateMode.FAULT) { + this.menu = this.menuForce; + } - this.menu = menuConvert(this.menu); - }, - doShow(point) { - this.clickEvent(); - this.initMenu(); - if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) { - this.$refs.popMenu.resetShowPosition(point); - } - }, - doClose() { - if (this.$refs && this.$refs.popMenu) { - this.$refs.popMenu.close(); - } - }, - // 设置故障 - setStoppage() { - const operate = { - start: true, - send: true, - code: this.selected.code, - type: MapDeviceType.Section.type, - label: MapDeviceType.Section.label, - operation: OperationEvent.Section.stoppage.menu.operation - }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - } else { - this.$refs.noticeInfo.doShow(operate); - } - }).catch(() => { - this.$refs.noticeInfo.doShow(operate); - }); - }, - // 取消故障 - cancelStoppage() { - const operate = { - start: true, - send: true, - code: this.selected.code, - type: MapDeviceType.Section.type, - label: MapDeviceType.Section.label, - operation: OperationEvent.Section.cancelStoppage.menu.operation - }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - } else { - this.$refs.noticeInfo.doShow(operate); - } - }).catch(() => { - this.$refs.noticeInfo.doShow(operate); - }); - }, - // 故障解锁 - fault() { - const operate = { - start: true, - code: this.selected.code, - type: MapDeviceType.Section.type, - label: MapDeviceType.Section.label, - operation: OperationEvent.Section.fault.menu.operation - }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.sectionCmdControl.doShow(operate, this.selected); - } - }); - }, - // 切除 - split() { - const operate = { - start: true, - code: this.selected.code, - type: MapDeviceType.Section.type, - label: MapDeviceType.Section.label, - operation: OperationEvent.Section.split.menu.operation - }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.sectionControl.doShow(operate, this.selected); - } - }); - }, - // 激活 - active() { - const operate = { - start: true, - code: this.selected.code, - type: MapDeviceType.Section.type, - label: MapDeviceType.Section.label, - operation: OperationEvent.Section.active.menu.operation - }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.sectionControl.doShow(operate, this.selected); - } - }); - }, - // 区段计轴预复位 - axlePreReset() { - const operate = { - start: true, - code: this.selected.code, - type: MapDeviceType.Section.type, - label: MapDeviceType.Section.label, - operation: OperationEvent.Section.axlePreReset.menu.operation - }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.sectionCmdControl.doShow(operate, this.selected); - } - }); - }, - // 区段解锁 - lock() { - const operate = { - start: true, - code: this.selected.code, - type: MapDeviceType.Section.type, - label: MapDeviceType.Section.label, - operation: OperationEvent.Section.lock.menu.operation - }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.sectionControl.doShow(operate, this.selected); - } - }); - }, - // 区段封锁 - unlock() { - const operate = { - start: true, - code: this.selected.code, - type: MapDeviceType.Section.type, - label: MapDeviceType.Section.label, - operation: OperationEvent.Section.unlock.menu.operation - }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.sectionCmdControl.doShow(operate, this.selected); - } - }); - }, - // 设置速度 - setSpeed() { - const operate = { - start: true, - code: this.selected.code, - type: MapDeviceType.Section.type, - label: MapDeviceType.Section.label, - operation: OperationEvent.Section.setSpeed.menu.operation - }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.speedCmdControl.doShow(operate, this.selected); - } - }); - }, - // 取消速度 - cancelSpeed() { - const operate = { - start: true, - send: true, - code: this.selected.code, - type: MapDeviceType.Section.type, - label: MapDeviceType.Section.label, - operation: OperationEvent.Section.cancelSpeed.menu.operation - }; - this.$store.dispatch('training/next', operate).then(({ valid, response }) => { - if (valid) { - const tempData = response.data; - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.speedCmdControl.doShow(operate, this.selected, tempData); - } - }); - }, - // 新建列车 - newTrain() { - const operate = { - start: true, - code: this.selected.code, - type: MapDeviceType.Section.type, - label: MapDeviceType.Section.label, - operation: OperationEvent.Section.newtrain.menu.operation - }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.trainCreate.doShow(operate, this.selected); - } - }); - } - } + this.menu = menuConvert(this.menu); + }, + doShow(point) { + this.clickEvent(); + this.initMenu(); + if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) { + this.$refs.popMenu.resetShowPosition(point); + } + }, + doClose() { + if (this.$refs && this.$refs.popMenu) { + this.$refs.popMenu.close(); + } + }, + // 设置故障 + setStoppage() { + const operate = { + start: true, + send: true, + code: this.selected.code, + type: MapDeviceType.Section.type, + label: MapDeviceType.Section.label, + operation: OperationEvent.Section.stoppage.menu.operation + }; + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + } else { + this.$refs.noticeInfo.doShow(operate); + } + }).catch(() => { + this.$refs.noticeInfo.doShow(operate); + }); + }, + // 取消故障 + cancelStoppage() { + const operate = { + start: true, + send: true, + code: this.selected.code, + type: MapDeviceType.Section.type, + label: MapDeviceType.Section.label, + operation: OperationEvent.Section.cancelStoppage.menu.operation + }; + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + } else { + this.$refs.noticeInfo.doShow(operate); + } + }).catch(() => { + this.$refs.noticeInfo.doShow(operate); + }); + }, + // 故障解锁 + fault() { + const operate = { + start: true, + code: this.selected.code, + type: MapDeviceType.Section.type, + label: MapDeviceType.Section.label, + operation: OperationEvent.Section.fault.menu.operation + }; + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.$refs.sectionCmdControl.doShow(operate, this.selected); + } + }); + }, + // 切除 + split() { + const operate = { + start: true, + code: this.selected.code, + type: MapDeviceType.Section.type, + label: MapDeviceType.Section.label, + operation: OperationEvent.Section.split.menu.operation + }; + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.$refs.sectionControl.doShow(operate, this.selected); + } + }); + }, + // 激活 + active() { + const operate = { + start: true, + code: this.selected.code, + type: MapDeviceType.Section.type, + label: MapDeviceType.Section.label, + operation: OperationEvent.Section.active.menu.operation + }; + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.$refs.sectionControl.doShow(operate, this.selected); + } + }); + }, + // 区段计轴预复位 + axlePreReset() { + const operate = { + start: true, + code: this.selected.code, + type: MapDeviceType.Section.type, + label: MapDeviceType.Section.label, + operation: OperationEvent.Section.axlePreReset.menu.operation + }; + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.$refs.sectionCmdControl.doShow(operate, this.selected); + } + }); + }, + // 区段解锁 + lock() { + const operate = { + start: true, + code: this.selected.code, + type: MapDeviceType.Section.type, + label: MapDeviceType.Section.label, + operation: OperationEvent.Section.lock.menu.operation + }; + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.$refs.sectionControl.doShow(operate, this.selected); + } + }); + }, + // 区段封锁 + unlock() { + const operate = { + start: true, + code: this.selected.code, + type: MapDeviceType.Section.type, + label: MapDeviceType.Section.label, + operation: OperationEvent.Section.unlock.menu.operation + }; + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.$refs.sectionCmdControl.doShow(operate, this.selected); + } + }); + }, + // 设置速度 + setSpeed() { + const operate = { + start: true, + code: this.selected.code, + type: MapDeviceType.Section.type, + label: MapDeviceType.Section.label, + operation: OperationEvent.Section.setSpeed.menu.operation + }; + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.$refs.speedCmdControl.doShow(operate, this.selected); + } + }); + }, + // 取消速度 + cancelSpeed() { + const operate = { + start: true, + send: true, + code: this.selected.code, + type: MapDeviceType.Section.type, + label: MapDeviceType.Section.label, + operation: OperationEvent.Section.cancelSpeed.menu.operation + }; + this.$store.dispatch('training/next', operate).then(({ valid, response }) => { + if (valid) { + const tempData = response.data; + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.$refs.speedCmdControl.doShow(operate, this.selected, tempData); + } + }); + }, + // 新建列车 + newTrain() { + const operate = { + start: true, + code: this.selected.code, + type: MapDeviceType.Section.type, + label: MapDeviceType.Section.label, + operation: OperationEvent.Section.newtrain.menu.operation + }; + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.$refs.trainCreate.doShow(operate, this.selected); + } + }); + } + } }; diff --git a/src/jmap/theme/fuzhou_01/menus/menuSignal.vue b/src/jmap/theme/fuzhou_01/menus/menuSignal.vue index 8924000c7..1bc1ac780 100644 --- a/src/jmap/theme/fuzhou_01/menus/menuSignal.vue +++ b/src/jmap/theme/fuzhou_01/menus/menuSignal.vue @@ -26,513 +26,513 @@ import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic'; import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus'; export default { - name: 'SignalMenu', - components: { - PopMenu, - RouteControl, - RouteSelection, - RouteLock, - RouteCmdControl, - RouteHandControl, - RouteDetail, - NoticeInfo - }, - props: { - selected: { - type: Object, - default() { - return null; - } - } - }, - data() { - return { - menu: [], - menuNormal: { - local: [ - { - label: this.$t('menu.menuSignal.routeSelect'), - handler: this.arrangementRoute, - disabledCallback: MenuDisabledState.Signal.arrangementRoute, - auth: { station: true, center: false } - }, - { - label: this.$t('menu.menuSignal.routeCancel'), - handler: this.cancelTrainRoute, - disabledCallback: MenuDisabledState.Signal.cancelTrainRoute, - auth: { station: true, center: false } - }, - { - label: this.$t('menu.menuSignal.signalBlock'), - handler: this.lock, - disabledCallback: MenuDisabledState.Signal.lock, - auth: { station: true, center: false } - }, - { - label: this.$t('menu.menuSignal.signalDeblock'), - handler: this.unlock, - disabledCallback: MenuDisabledState.Signal.unlock, - auth: { station: true, center: false } - }, - { - label: this.$t('menu.menuSignal.signalReopen'), - handler: this.reopenSignal, - disabledCallback: MenuDisabledState.Signal.reopenSignal, - auth: { station: true, center: false } - }, - { - label: this.$t('menu.menuSignal.guideRouteHandle'), - handler: this.guide, - disabledCallback: MenuDisabledState.Signal.guide, - auth: { station: true, center: false } - }, - { - label: this.$t('menu.menuSignal.setInterlockAutoRoute'), - handler: this.setAutoInterlock, - disabledCallback: MenuDisabledState.Signal.setAutoInterlock, - auth: { station: true, center: false } - }, - { - label: this.$t('menu.menuSignal.cancelInterlockAutoRoute'), - handler: this.cancelAutoInterlock, - disabledCallback: MenuDisabledState.Signal.cancelAutoInterlock, - auth: { station: true, center: false } - }, - { - label: this.$t('menu.menuSignal.setInterlockAutoTrigger'), - handler: this.setAutoTrigger, - disabledCallback: MenuDisabledState.Signal.setAutoTrigger, - auth: { station: true, center: false } - }, - { - label: this.$t('menu.menuSignal.cancelInterlockAutoTrigger'), - handler: this.cancelAutoTrigger, - disabledCallback: MenuDisabledState.Signal.cancelAutoTrigger, - auth: { station: true, center: false } - }, - { - label: this.$t('menu.menuSignal.signalOff'), - handler: this.signalClose, - disabledCallback: MenuDisabledState.Signal.signalClose, - auth: { station: true, center: false } - } - ], - central: [ - { - label: this.$t('menu.menuSignal.routeSelect'), - handler: this.arrangementRoute, - disabledCallback: MenuDisabledState.Signal.arrangementRoute, - auth: { station: false, center: true } - }, - { - label: this.$t('menu.menuSignal.routeCancel'), - handler: this.cancelTrainRoute, - disabledCallback: MenuDisabledState.Signal.cancelTrainRoute, - auth: { station: false, center: true } - }, - { - label: this.$t('menu.menuSignal.signalBlock'), - handler: this.lock, - disabledCallback: MenuDisabledState.Signal.lock, - auth: { station: false, center: true } - }, - { - label: this.$t('menu.menuSignal.signalDeblock'), - handler: this.unlock, - disabledCallback: MenuDisabledState.Signal.unlock, - auth: { station: false, center: true } - }, - { - label: this.$t('menu.menuSignal.signalOff'), - handler: this.signalClose, - disabledCallback: MenuDisabledState.Signal.signalClose, - auth: { station: false, center: true } - }, - { - label: this.$t('menu.menuSignal.signalReopen'), - handler: this.reopenSignal, - disabledCallback: MenuDisabledState.Signal.reopenSignal, - auth: { station: false, center: true } - }, - { - label: this.$t('menu.menuSignal.routeGuide'), - handler: this.guide, - disabledCallback: MenuDisabledState.Signal.guide, - auth: { station: false, center: false } - }, - { - label: this.$t('menu.menuSignal.humanControl'), - handler: this.humanControl, - disabledCallback: MenuDisabledState.Signal.humanControl, - auth: { station: false, center: true } - }, - { - label: this.$t('menu.menuSignal.atsAutoControl'), - handler: this.atsAutoControl, - disabledCallback: MenuDisabledState.Signal.atsAutoControl, - auth: { station: false, center: true } - }, - { - label: this.$t('menu.menuSignal.queryRouteControlMode'), - handler: this.detail, - disabledCallback: MenuDisabledState.Signal.detail, - auth: { station: true, center: true } - } - ] - }, - menuForce: [ - { - label: this.$t('menu.menuSignal.setFault'), - handler: this.setStoppage, - disabledCallback: MenuDisabledState.Signal.setStoppage - }, - { - label: this.$t('menu.menuSignal.cancelFault'), - handler: this.cancelStoppage, - disabledCallback: MenuDisabledState.Signal.cancelStoppage - } - ] - }; - }, - computed: { - ...mapGetters('training', [ - 'mode', - 'operatemode' - ]), - ...mapGetters('menuOperation', [ - 'buttonOperation' - ]) - }, - watch: { - '$store.state.menuOperation.menuCount': function (val) { - if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Signal) && !this.buttonOperation) { - this.doShow(this.$store.state.menuOperation.menuPosition); - } else { - this.doClose(); - } - } - }, - methods: { - clickEvent() { - const self = this; - window.onclick = function (e) { - self.doClose(); - }; - }, - initMenu() { - // 编辑模式菜单列表 - this.menu = menuFiltration(this.menuNormal); - if (this.operatemode === OperateMode.ADMIN) { - this.menu = [...this.menu, ...this.menuForce]; - } + name: 'SignalMenu', + components: { + PopMenu, + RouteControl, + RouteSelection, + RouteLock, + RouteCmdControl, + RouteHandControl, + RouteDetail, + NoticeInfo + }, + props: { + selected: { + type: Object, + default() { + return null; + } + } + }, + data() { + return { + menu: [], + menuNormal: { + local: [ + { + label: this.$t('menu.menuSignal.routeSelect'), + handler: this.arrangementRoute, + disabledCallback: MenuDisabledState.Signal.arrangementRoute, + auth: { station: true, center: false } + }, + { + label: this.$t('menu.menuSignal.routeCancel'), + handler: this.cancelTrainRoute, + disabledCallback: MenuDisabledState.Signal.cancelTrainRoute, + auth: { station: true, center: false } + }, + { + label: this.$t('menu.menuSignal.signalBlock'), + handler: this.lock, + disabledCallback: MenuDisabledState.Signal.lock, + auth: { station: true, center: false } + }, + { + label: this.$t('menu.menuSignal.signalDeblock'), + handler: this.unlock, + disabledCallback: MenuDisabledState.Signal.unlock, + auth: { station: true, center: false } + }, + { + label: this.$t('menu.menuSignal.signalReopen'), + handler: this.reopenSignal, + disabledCallback: MenuDisabledState.Signal.reopenSignal, + auth: { station: true, center: false } + }, + { + label: this.$t('menu.menuSignal.guideRouteHandle'), + handler: this.guide, + disabledCallback: MenuDisabledState.Signal.guide, + auth: { station: true, center: false } + }, + { + label: this.$t('menu.menuSignal.setInterlockAutoRoute'), + handler: this.setAutoInterlock, + disabledCallback: MenuDisabledState.Signal.setAutoInterlock, + auth: { station: true, center: false } + }, + { + label: this.$t('menu.menuSignal.cancelInterlockAutoRoute'), + handler: this.cancelAutoInterlock, + disabledCallback: MenuDisabledState.Signal.cancelAutoInterlock, + auth: { station: true, center: false } + }, + { + label: this.$t('menu.menuSignal.setInterlockAutoTrigger'), + handler: this.setAutoTrigger, + disabledCallback: MenuDisabledState.Signal.setAutoTrigger, + auth: { station: true, center: false } + }, + { + label: this.$t('menu.menuSignal.cancelInterlockAutoTrigger'), + handler: this.cancelAutoTrigger, + disabledCallback: MenuDisabledState.Signal.cancelAutoTrigger, + auth: { station: true, center: false } + }, + { + label: this.$t('menu.menuSignal.signalOff'), + handler: this.signalClose, + disabledCallback: MenuDisabledState.Signal.signalClose, + auth: { station: true, center: false } + } + ], + central: [ + { + label: this.$t('menu.menuSignal.routeSelect'), + handler: this.arrangementRoute, + disabledCallback: MenuDisabledState.Signal.arrangementRoute, + auth: { station: false, center: true } + }, + { + label: this.$t('menu.menuSignal.routeCancel'), + handler: this.cancelTrainRoute, + disabledCallback: MenuDisabledState.Signal.cancelTrainRoute, + auth: { station: false, center: true } + }, + { + label: this.$t('menu.menuSignal.signalBlock'), + handler: this.lock, + disabledCallback: MenuDisabledState.Signal.lock, + auth: { station: false, center: true } + }, + { + label: this.$t('menu.menuSignal.signalDeblock'), + handler: this.unlock, + disabledCallback: MenuDisabledState.Signal.unlock, + auth: { station: false, center: true } + }, + { + label: this.$t('menu.menuSignal.signalOff'), + handler: this.signalClose, + disabledCallback: MenuDisabledState.Signal.signalClose, + auth: { station: false, center: true } + }, + { + label: this.$t('menu.menuSignal.signalReopen'), + handler: this.reopenSignal, + disabledCallback: MenuDisabledState.Signal.reopenSignal, + auth: { station: false, center: true } + }, + { + label: this.$t('menu.menuSignal.routeGuide'), + handler: this.guide, + disabledCallback: MenuDisabledState.Signal.guide, + auth: { station: false, center: false } + }, + { + label: this.$t('menu.menuSignal.humanControl'), + handler: this.humanControl, + disabledCallback: MenuDisabledState.Signal.humanControl, + auth: { station: false, center: true } + }, + { + label: this.$t('menu.menuSignal.atsAutoControl'), + handler: this.atsAutoControl, + disabledCallback: MenuDisabledState.Signal.atsAutoControl, + auth: { station: false, center: true } + }, + { + label: this.$t('menu.menuSignal.queryRouteControlMode'), + handler: this.detail, + disabledCallback: MenuDisabledState.Signal.detail, + auth: { station: true, center: true } + } + ] + }, + menuForce: [ + { + label: this.$t('menu.menuSignal.setFault'), + handler: this.setStoppage, + disabledCallback: MenuDisabledState.Signal.setStoppage + }, + { + label: this.$t('menu.menuSignal.cancelFault'), + handler: this.cancelStoppage, + disabledCallback: MenuDisabledState.Signal.cancelStoppage + } + ] + }; + }, + computed: { + ...mapGetters('training', [ + 'mode', + 'operatemode' + ]), + ...mapGetters('menuOperation', [ + 'buttonOperation' + ]) + }, + watch: { + '$store.state.menuOperation.menuCount': function (val) { + if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Signal) && !this.buttonOperation) { + this.doShow(this.$store.state.menuOperation.menuPosition); + } else { + this.doClose(); + } + } + }, + methods: { + clickEvent() { + const self = this; + window.onclick = function (e) { + self.doClose(); + }; + }, + initMenu() { + // 编辑模式菜单列表 + this.menu = menuFiltration(this.menuNormal); + if (this.operatemode === OperateMode.ADMIN) { + this.menu = [...this.menu, ...this.menuForce]; + } - // 故障模式菜单列表 - if (this.operatemode === OperateMode.FAULT) { - this.menu = this.menuForce; - } + // 故障模式菜单列表 + if (this.operatemode === OperateMode.FAULT) { + this.menu = this.menuForce; + } - this.menu = menuConvert(this.menu); + this.menu = menuConvert(this.menu); - }, - doShow(point) { - this.clickEvent(); - this.initMenu(); - if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) { - this.$refs.popMenu.resetShowPosition(point); - } - }, - doClose() { - if (this.$refs && this.$refs.popMenu) { - this.$refs.popMenu.close(); - } - }, - // 设置故障 - setStoppage() { - const operate = { - start: true, - send: true, - code: this.selected.code, - type: MapDeviceType.Signal.type, - label: MapDeviceType.Signal.label, - operation: OperationEvent.Signal.stoppage.menu.operation - }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - } else { - this.$refs.noticeInfo.doShow(operate); - } - }).catch(() => { - this.$refs.noticeInfo.doShow(operate); - }); - }, - // 取消故障 - cancelStoppage() { - const operate = { - start: true, - send: true, - code: this.selected.code, - type: MapDeviceType.Signal.type, - label: MapDeviceType.Signal.label, - operation: OperationEvent.Signal.cancelStoppage.menu.operation - }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - } else { - this.$refs.noticeInfo.doShow(operate); - } - }).catch(() => { - this.$refs.noticeInfo.doShow(operate); - }); - }, - // 排列进路 - arrangementRoute() { - const operate = { - start: true, - send: true, - code: this.selected.code, - type: MapDeviceType.Signal.type, - label: MapDeviceType.Signal.label, - operation: OperationEvent.Signal.arrangementRoute.menu.operation - }; + }, + doShow(point) { + this.clickEvent(); + this.initMenu(); + if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) { + this.$refs.popMenu.resetShowPosition(point); + } + }, + doClose() { + if (this.$refs && this.$refs.popMenu) { + this.$refs.popMenu.close(); + } + }, + // 设置故障 + setStoppage() { + const operate = { + start: true, + send: true, + code: this.selected.code, + type: MapDeviceType.Signal.type, + label: MapDeviceType.Signal.label, + operation: OperationEvent.Signal.stoppage.menu.operation + }; + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + } else { + this.$refs.noticeInfo.doShow(operate); + } + }).catch(() => { + this.$refs.noticeInfo.doShow(operate); + }); + }, + // 取消故障 + cancelStoppage() { + const operate = { + start: true, + send: true, + code: this.selected.code, + type: MapDeviceType.Signal.type, + label: MapDeviceType.Signal.label, + operation: OperationEvent.Signal.cancelStoppage.menu.operation + }; + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + } else { + this.$refs.noticeInfo.doShow(operate); + } + }).catch(() => { + this.$refs.noticeInfo.doShow(operate); + }); + }, + // 排列进路 + arrangementRoute() { + const operate = { + start: true, + send: true, + code: this.selected.code, + type: MapDeviceType.Signal.type, + label: MapDeviceType.Signal.label, + operation: OperationEvent.Signal.arrangementRoute.menu.operation + }; - this.$store.dispatch('training/next', operate).then(({ valid, response }) => { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - if (valid) { - var tempData = null; - if (response) { - tempData = response.data; - } - this.$refs.routeSelection.doShow(operate.operation, this.selected, tempData); - } - }).catch(() => { - this.$refs.noticeInfo.doShow(operate); - }); - }, - // 取消进路 - cancelTrainRoute() { - const operate = { - start: true, - code: this.selected.code, - type: MapDeviceType.Signal.type, - label: MapDeviceType.Signal.label, - operation: OperationEvent.Signal.cancelTrainRoute.menu.operation - }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - if (valid) { - this.$refs.routeControl.doShow(operate, this.selected); - } - }); - }, - // 信号封锁 - lock() { - const operate = { - start: true, - send: true, - code: this.selected.code, - type: MapDeviceType.Signal.type, - label: MapDeviceType.Signal.label, - operation: OperationEvent.Signal.lock.menu.operation - }; + this.$store.dispatch('training/next', operate).then(({ valid, response }) => { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + if (valid) { + var tempData = null; + if (response) { + tempData = response.data; + } + this.$refs.routeSelection.doShow(operate.operation, this.selected, tempData); + } + }).catch(() => { + this.$refs.noticeInfo.doShow(operate); + }); + }, + // 取消进路 + cancelTrainRoute() { + const operate = { + start: true, + code: this.selected.code, + type: MapDeviceType.Signal.type, + label: MapDeviceType.Signal.label, + operation: OperationEvent.Signal.cancelTrainRoute.menu.operation + }; + this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + if (valid) { + this.$refs.routeControl.doShow(operate, this.selected); + } + }); + }, + // 信号封锁 + lock() { + const operate = { + start: true, + send: true, + code: this.selected.code, + type: MapDeviceType.Signal.type, + label: MapDeviceType.Signal.label, + operation: OperationEvent.Signal.lock.menu.operation + }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.routeLock.doShow(operate.operation, this.selected); - } - }).catch(() => { - this.$refs.noticeInfo.doShow(operate); - }); - }, - // 信号解封 - unlock() { - const operate = { - start: true, - code: this.selected.code, - type: MapDeviceType.Signal.type, - label: MapDeviceType.Signal.label, - operation: OperationEvent.Signal.unlock.menu.operation - }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.routeCmdControl.doShow(operate, this.selected); - } - }); - }, - // 信号重开 - reopenSignal() { - const operate = { - start: true, - code: this.selected.code, - type: MapDeviceType.Signal.type, - label: MapDeviceType.Signal.label, - operation: OperationEvent.Signal.reopenSignal.menu.operation - }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.routeControl.doShow(operate, this.selected); - } - }); - }, - // 进路引导 - guide() { - const operate = { - start: true, - code: this.selected.code, - type: MapDeviceType.Signal.type, - label: MapDeviceType.Signal.label, - operation: OperationEvent.Signal.guide.menu.operation - }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - if (valid) { - this.$refs.routeCmdControl.doShow(operate, this.selected); - } - }); - }, - // 设置联锁自动进路 - setAutoInterlock() { - const operate = { - start: true, - code: this.selected.code, - type: MapDeviceType.Signal.type, - label: MapDeviceType.Signal.label, - operation: OperationEvent.Signal.setAutoInterlock.menu.operation - }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.routeControl.doShow(operate, this.selected); - } - }); - }, - // 取消联锁自动进路 - cancelAutoInterlock() { - const operate = { - start: true, - code: this.selected.code, - type: MapDeviceType.Signal.type, - label: MapDeviceType.Signal.label, - operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation - }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.routeControl.doShow(operate, this.selected); - } - }); - }, - // 设置联锁自动触发 - setAutoTrigger() { - const operate = { - start: true, - code: this.selected.code, - type: MapDeviceType.Signal.type, - label: MapDeviceType.Signal.label, - operation: OperationEvent.Signal.setAutoTrigger.menu.operation - }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.routeControl.doShow(operate, this.selected); - } - }); - }, - // 取消联锁自动触发 - cancelAutoTrigger() { - const operate = { - start: true, - code: this.selected.code, - type: MapDeviceType.Signal.type, - label: MapDeviceType.Signal.label, - operation: OperationEvent.Signal.cancelAutoTrigger.menu.operation - }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.routeControl.doShow(operate, this.selected); - } - }); - }, - // 信号关灯 - signalClose() { - const operate = { - start: true, - code: this.selected.code, - type: MapDeviceType.Signal.type, - label: MapDeviceType.Signal.label, - operation: OperationEvent.Signal.signalClose.menu.operation - }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.routeControl.doShow(operate, this.selected); - } - }); - }, - // 自排关(进路交人工控) - humanControl() { - const operate = { - start: true, - send: true, - code: this.selected.code, - type: MapDeviceType.Signal.type, - label: MapDeviceType.Signal.label, - operation: OperationEvent.Signal.humanControl.menu.operation - }; - this.$store.dispatch('training/next', operate).then(({ valid, response }) => { - if (valid) { - let tempData = null; - if (response) { - tempData = response.data; - } - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.routeHandControl.doShow(operate, this.selected, tempData); - } - }); - }, - // 自排关(进路交ATS自动控) - atsAutoControl() { - const operate = { - start: true, - send: true, - code: this.selected.code, - type: MapDeviceType.Signal.type, - label: MapDeviceType.Signal.label, - operation: OperationEvent.Signal.atsAutoControl.menu.operation - }; - this.$store.dispatch('training/next', operate).then(({ valid, response }) => { - if (valid) { - let tempData = null; - if (response) { - tempData = response.data; - } - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.routeHandControl.doShow(operate, this.selected, tempData); - } - }); - }, - // 查询进路状态 - detail() { - const operate = { - start: true, - send: true, - code: this.selected.code, - type: MapDeviceType.Signal.type, - label: MapDeviceType.Signal.label, - operation: OperationEvent.Signal.detail.menu.operation - }; - this.$store.dispatch('training/next', operate).then(({ valid, response }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.routeDetail.doShow(operate, this.selected, response.data); - } - }); - } - } + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.$refs.routeLock.doShow(operate.operation, this.selected); + } + }).catch(() => { + this.$refs.noticeInfo.doShow(operate); + }); + }, + // 信号解封 + unlock() { + const operate = { + start: true, + code: this.selected.code, + type: MapDeviceType.Signal.type, + label: MapDeviceType.Signal.label, + operation: OperationEvent.Signal.unlock.menu.operation + }; + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.$refs.routeCmdControl.doShow(operate, this.selected); + } + }); + }, + // 信号重开 + reopenSignal() { + const operate = { + start: true, + code: this.selected.code, + type: MapDeviceType.Signal.type, + label: MapDeviceType.Signal.label, + operation: OperationEvent.Signal.reopenSignal.menu.operation + }; + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.$refs.routeControl.doShow(operate, this.selected); + } + }); + }, + // 进路引导 + guide() { + const operate = { + start: true, + code: this.selected.code, + type: MapDeviceType.Signal.type, + label: MapDeviceType.Signal.label, + operation: OperationEvent.Signal.guide.menu.operation + }; + this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + if (valid) { + this.$refs.routeCmdControl.doShow(operate, this.selected); + } + }); + }, + // 设置联锁自动进路 + setAutoInterlock() { + const operate = { + start: true, + code: this.selected.code, + type: MapDeviceType.Signal.type, + label: MapDeviceType.Signal.label, + operation: OperationEvent.Signal.setAutoInterlock.menu.operation + }; + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.$refs.routeControl.doShow(operate, this.selected); + } + }); + }, + // 取消联锁自动进路 + cancelAutoInterlock() { + const operate = { + start: true, + code: this.selected.code, + type: MapDeviceType.Signal.type, + label: MapDeviceType.Signal.label, + operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation + }; + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.$refs.routeControl.doShow(operate, this.selected); + } + }); + }, + // 设置联锁自动触发 + setAutoTrigger() { + const operate = { + start: true, + code: this.selected.code, + type: MapDeviceType.Signal.type, + label: MapDeviceType.Signal.label, + operation: OperationEvent.Signal.setAutoTrigger.menu.operation + }; + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.$refs.routeControl.doShow(operate, this.selected); + } + }); + }, + // 取消联锁自动触发 + cancelAutoTrigger() { + const operate = { + start: true, + code: this.selected.code, + type: MapDeviceType.Signal.type, + label: MapDeviceType.Signal.label, + operation: OperationEvent.Signal.cancelAutoTrigger.menu.operation + }; + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.$refs.routeControl.doShow(operate, this.selected); + } + }); + }, + // 信号关灯 + signalClose() { + const operate = { + start: true, + code: this.selected.code, + type: MapDeviceType.Signal.type, + label: MapDeviceType.Signal.label, + operation: OperationEvent.Signal.signalClose.menu.operation + }; + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.$refs.routeControl.doShow(operate, this.selected); + } + }); + }, + // 自排关(进路交人工控) + humanControl() { + const operate = { + start: true, + send: true, + code: this.selected.code, + type: MapDeviceType.Signal.type, + label: MapDeviceType.Signal.label, + operation: OperationEvent.Signal.humanControl.menu.operation + }; + this.$store.dispatch('training/next', operate).then(({ valid, response }) => { + if (valid) { + let tempData = null; + if (response) { + tempData = response.data; + } + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.$refs.routeHandControl.doShow(operate, this.selected, tempData); + } + }); + }, + // 自排关(进路交ATS自动控) + atsAutoControl() { + const operate = { + start: true, + send: true, + code: this.selected.code, + type: MapDeviceType.Signal.type, + label: MapDeviceType.Signal.label, + operation: OperationEvent.Signal.atsAutoControl.menu.operation + }; + this.$store.dispatch('training/next', operate).then(({ valid, response }) => { + if (valid) { + let tempData = null; + if (response) { + tempData = response.data; + } + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.$refs.routeHandControl.doShow(operate, this.selected, tempData); + } + }); + }, + // 查询进路状态 + detail() { + const operate = { + start: true, + send: true, + code: this.selected.code, + type: MapDeviceType.Signal.type, + label: MapDeviceType.Signal.label, + operation: OperationEvent.Signal.detail.menu.operation + }; + this.$store.dispatch('training/next', operate).then(({ valid, response }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.$refs.routeDetail.doShow(operate, this.selected, response.data); + } + }); + } + } }; diff --git a/src/jmap/theme/fuzhou_01/menus/menuStationStand.vue b/src/jmap/theme/fuzhou_01/menus/menuStationStand.vue index 6b7ea9466..a0c7f8d5b 100644 --- a/src/jmap/theme/fuzhou_01/menus/menuStationStand.vue +++ b/src/jmap/theme/fuzhou_01/menus/menuStationStand.vue @@ -26,463 +26,463 @@ import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic'; import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus'; export default { - name: 'StationStandMenu', - components: { - PopMenu, - StandControl, - StandDetail, - StandRunLevel, - NoticeInfo, - StandBackStrategy, - StandStopTime, - StandDetainTrainAll - }, - props: { - selected: { - type: Object, - default() { - return null; - } - } - }, - data() { - return { - menu: [], - menuNormal: { - local: [ - { - label: this.$t('menu.menuStationStand.detainTrain'), - handler: this.setDetainTrain, - disabledCallback: MenuDisabledState.StationStand.setDetainTrain, - auth: { station: true, center: false } - }, - { - label: this.$t('menu.menuStationStand.cancelDetainTrain'), - handler: this.cancelDetainTrain, - disabledCallback: MenuDisabledState.StationStand.cancelDetainTrain, - auth: { station: true, center: false } - }, - { - label: this.$t('menu.menuStationStand.cancelDetainTrainForce'), - handler: this.cancelDetainTrainForce, - disabledCallback: MenuDisabledState.StationStand.cancelDetainTrainForce, - auth: { station: true, center: false } - }, - { - label: this.$t('menu.menuStationStand.jumpStop'), - handler: this.setJumpStop, - disabledCallback: MenuDisabledState.StationStand.setJumpStop, - auth: { station: true, center: false } - }, - { - label: this.$t('menu.menuStationStand.cancelJumpStop'), - handler: this.cancelJumpStop, - disabledCallback: MenuDisabledState.StationStand.cancelJumpStop, - auth: { station: true, center: false } - }, - { - label: this.$t('menu.menuStationStand.setRunLevel'), - handler: this.setRunLevel, - disabledCallback: MenuDisabledState.StationStand.setRunLevel, - auth: { station: false, center: false } - }, - { - label: this.$t('menu.menuStationStand.setEarlyDeparture'), - handler: this.earlyDeparture, - disabledCallback: MenuDisabledState.StationStand.earlyDeparture, - auth: { station: false, center: false } - }, - { - label: this.$t('menu.menuStationStand.setBackStrategy'), - handler: this.setBackStrategy, - disabledCallback: MenuDisabledState.StationStand.setBackStrategy, - auth: { station: false, center: false } - }, - { - label: this.$t('menu.menuStationStand.getStationStandStatus'), - handler: this.detail, - disabledCallback: MenuDisabledState.StationStand.detail, - auth: { station: true, center: false } - } - ], - central: [ - { - label: this.$t('menu.menuStationStand.detainTrain'), - handler: this.setDetainTrain, - disabledCallback: MenuDisabledState.StationStand.setDetainTrain, - auth: { station: false, center: true } - }, - { - label: this.$t('menu.menuStationStand.cancelDetainTrain'), - handler: this.cancelDetainTrain, - disabledCallback: MenuDisabledState.StationStand.cancelDetainTrain, - auth: { station: false, center: true } - }, - { - label: this.$t('menu.menuStationStand.cancelDetainTrainForce'), - handler: this.cancelDetainTrainForce, - disabledCallback: MenuDisabledState.StationStand.cancelDetainTrainForce, - auth: { station: false, center: false } - }, - { - label: this.$t('menu.menuStationStand.cancelDetainTrainAll'), - handler: this.cancelDetainTrainAll, - disabledCallback: MenuDisabledState.StationStand.cancelDetainTrainAll, - auth: { station: false, center: true } - }, - { - label: this.$t('menu.menuStationStand.jumpStop'), - handler: this.setJumpStop, - disabledCallback: MenuDisabledState.StationStand.setJumpStop, - auth: { station: false, center: true } - }, - { - label: this.$t('menu.menuStationStand.cancelJumpStop'), - handler: this.cancelJumpStop, - disabledCallback: MenuDisabledState.StationStand.cancelJumpStop, - auth: { station: true, center: true } - }, - { - label: this.$t('menu.menuStationStand.setStopTime'), - handler: this.setStopTime, - disabledCallback: MenuDisabledState.StationStand.setStopTime, - auth: { station: false, center: true } - }, - { - label: this.$t('menu.menuStationStand.setRunLevel'), - handler: this.setRunLevel, - disabledCallback: MenuDisabledState.StationStand.setRunLevel, - auth: { station: false, center: true } - }, - { - label: this.$t('menu.menuStationStand.setEarlyDeparture'), - handler: this.earlyDeparture, - disabledCallback: MenuDisabledState.StationStand.earlyDeparture, - auth: { station: false, center: true } - }, - { - label: this.$t('menu.menuStationStand.setBackStrategy'), - handler: this.setBackStrategy, - disabledCallback: MenuDisabledState.StationStand.setBackStrategy, - auth: { station: false, center: true } - }, - { - label: this.$t('menu.menuStationStand.getStationStandStatus'), - handler: this.detail, - disabledCallback: MenuDisabledState.StationStand.detail, - auth: { station: true, center: true } - } - ] - }, - menuForce: [ - { - label: this.$t('menu.menuStationStand.setFault'), - handler: this.setStoppage, - disabledCallback: MenuDisabledState.StationStand.setStoppage - }, - { - label: this.$t('menu.menuStationStand.cancelFault'), - handler: this.cancelStoppage, - disabledCallback: MenuDisabledState.StationStand.cancelStoppage - } - ] - }; - }, - computed: { - ...mapGetters('training', [ - 'mode', - 'operatemode' - ]), - ...mapGetters('menuOperation', [ - 'buttonOperation' - ]) - }, - watch: { - '$store.state.menuOperation.menuCount': function (val) { - if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.StationStand) && !this.buttonOperation) { - this.doShow(this.$store.state.menuOperation.menuPosition); - } else { - this.doClose(); - } - } - }, - methods: { - clickEvent() { - const self = this; - window.onclick = function (e) { - self.doClose(); - }; - }, - initMenu() { - // 编辑模式菜单列表 - this.menu = menuFiltration(this.menuNormal); - if (this.operatemode === OperateMode.ADMIN) { - this.menu = [...this.menu, ...this.menuForce]; - } + name: 'StationStandMenu', + components: { + PopMenu, + StandControl, + StandDetail, + StandRunLevel, + NoticeInfo, + StandBackStrategy, + StandStopTime, + StandDetainTrainAll + }, + props: { + selected: { + type: Object, + default() { + return null; + } + } + }, + data() { + return { + menu: [], + menuNormal: { + local: [ + { + label: this.$t('menu.menuStationStand.detainTrain'), + handler: this.setDetainTrain, + disabledCallback: MenuDisabledState.StationStand.setDetainTrain, + auth: { station: true, center: false } + }, + { + label: this.$t('menu.menuStationStand.cancelDetainTrain'), + handler: this.cancelDetainTrain, + disabledCallback: MenuDisabledState.StationStand.cancelDetainTrain, + auth: { station: true, center: false } + }, + { + label: this.$t('menu.menuStationStand.cancelDetainTrainForce'), + handler: this.cancelDetainTrainForce, + disabledCallback: MenuDisabledState.StationStand.cancelDetainTrainForce, + auth: { station: true, center: false } + }, + { + label: this.$t('menu.menuStationStand.jumpStop'), + handler: this.setJumpStop, + disabledCallback: MenuDisabledState.StationStand.setJumpStop, + auth: { station: true, center: false } + }, + { + label: this.$t('menu.menuStationStand.cancelJumpStop'), + handler: this.cancelJumpStop, + disabledCallback: MenuDisabledState.StationStand.cancelJumpStop, + auth: { station: true, center: false } + }, + { + label: this.$t('menu.menuStationStand.setRunLevel'), + handler: this.setRunLevel, + disabledCallback: MenuDisabledState.StationStand.setRunLevel, + auth: { station: false, center: false } + }, + { + label: this.$t('menu.menuStationStand.setEarlyDeparture'), + handler: this.earlyDeparture, + disabledCallback: MenuDisabledState.StationStand.earlyDeparture, + auth: { station: false, center: false } + }, + { + label: this.$t('menu.menuStationStand.setBackStrategy'), + handler: this.setBackStrategy, + disabledCallback: MenuDisabledState.StationStand.setBackStrategy, + auth: { station: false, center: false } + }, + { + label: this.$t('menu.menuStationStand.getStationStandStatus'), + handler: this.detail, + disabledCallback: MenuDisabledState.StationStand.detail, + auth: { station: true, center: false } + } + ], + central: [ + { + label: this.$t('menu.menuStationStand.detainTrain'), + handler: this.setDetainTrain, + disabledCallback: MenuDisabledState.StationStand.setDetainTrain, + auth: { station: false, center: true } + }, + { + label: this.$t('menu.menuStationStand.cancelDetainTrain'), + handler: this.cancelDetainTrain, + disabledCallback: MenuDisabledState.StationStand.cancelDetainTrain, + auth: { station: false, center: true } + }, + { + label: this.$t('menu.menuStationStand.cancelDetainTrainForce'), + handler: this.cancelDetainTrainForce, + disabledCallback: MenuDisabledState.StationStand.cancelDetainTrainForce, + auth: { station: false, center: false } + }, + { + label: this.$t('menu.menuStationStand.cancelDetainTrainAll'), + handler: this.cancelDetainTrainAll, + disabledCallback: MenuDisabledState.StationStand.cancelDetainTrainAll, + auth: { station: false, center: true } + }, + { + label: this.$t('menu.menuStationStand.jumpStop'), + handler: this.setJumpStop, + disabledCallback: MenuDisabledState.StationStand.setJumpStop, + auth: { station: false, center: true } + }, + { + label: this.$t('menu.menuStationStand.cancelJumpStop'), + handler: this.cancelJumpStop, + disabledCallback: MenuDisabledState.StationStand.cancelJumpStop, + auth: { station: true, center: true } + }, + { + label: this.$t('menu.menuStationStand.setStopTime'), + handler: this.setStopTime, + disabledCallback: MenuDisabledState.StationStand.setStopTime, + auth: { station: false, center: true } + }, + { + label: this.$t('menu.menuStationStand.setRunLevel'), + handler: this.setRunLevel, + disabledCallback: MenuDisabledState.StationStand.setRunLevel, + auth: { station: false, center: true } + }, + { + label: this.$t('menu.menuStationStand.setEarlyDeparture'), + handler: this.earlyDeparture, + disabledCallback: MenuDisabledState.StationStand.earlyDeparture, + auth: { station: false, center: true } + }, + { + label: this.$t('menu.menuStationStand.setBackStrategy'), + handler: this.setBackStrategy, + disabledCallback: MenuDisabledState.StationStand.setBackStrategy, + auth: { station: false, center: true } + }, + { + label: this.$t('menu.menuStationStand.getStationStandStatus'), + handler: this.detail, + disabledCallback: MenuDisabledState.StationStand.detail, + auth: { station: true, center: true } + } + ] + }, + menuForce: [ + { + label: this.$t('menu.menuStationStand.setFault'), + handler: this.setStoppage, + disabledCallback: MenuDisabledState.StationStand.setStoppage + }, + { + label: this.$t('menu.menuStationStand.cancelFault'), + handler: this.cancelStoppage, + disabledCallback: MenuDisabledState.StationStand.cancelStoppage + } + ] + }; + }, + computed: { + ...mapGetters('training', [ + 'mode', + 'operatemode' + ]), + ...mapGetters('menuOperation', [ + 'buttonOperation' + ]) + }, + watch: { + '$store.state.menuOperation.menuCount': function (val) { + if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.StationStand) && !this.buttonOperation) { + this.doShow(this.$store.state.menuOperation.menuPosition); + } else { + this.doClose(); + } + } + }, + methods: { + clickEvent() { + const self = this; + window.onclick = function (e) { + self.doClose(); + }; + }, + initMenu() { + // 编辑模式菜单列表 + this.menu = menuFiltration(this.menuNormal); + if (this.operatemode === OperateMode.ADMIN) { + this.menu = [...this.menu, ...this.menuForce]; + } - // 故障模式菜单列表 - if (this.operatemode === OperateMode.FAULT) { - this.menu = this.menuForce; - } + // 故障模式菜单列表 + if (this.operatemode === OperateMode.FAULT) { + this.menu = this.menuForce; + } - this.menu = menuConvert(this.menu); - }, - doShow(point) { - this.clickEvent(); - this.initMenu(); - if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) { - this.$refs.popMenu.resetShowPosition(point); - } - }, - doClose() { - if (this.$refs && this.$refs.popMenu) { - this.$refs.popMenu.close(); - } - }, - // 设置故障 - setStoppage() { - const operate = { - start: true, - send: true, - code: this.selected.code, - type: MapDeviceType.StationStand.type, - label: MapDeviceType.StationStand.label, - operation: OperationEvent.StationStand.stoppage.menu.operation - }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - } else { - this.$refs.noticeInfo.doShow(operate); - } - }).catch(() => { - this.$refs.noticeInfo.doShow(operate); - }); - }, - // 取消故障 - cancelStoppage() { - const operate = { - start: true, - send: true, - code: this.selected.code, - type: MapDeviceType.StationStand.type, - label: MapDeviceType.StationStand.label, - operation: OperationEvent.StationStand.cancelStoppage.menu.operation - }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - } else { - this.$refs.noticeInfo.doShow(operate); - } - }).catch(() => { - this.$refs.noticeInfo.doShow(operate); - }); - }, - // 设置扣车 - setDetainTrain() { - const operate = { - start: true, - code: this.selected.code, - type: MapDeviceType.StationStand.type, - label: MapDeviceType.StationStand.label, - operation: OperationEvent.StationStand.setDetainTrain.menu.operation - }; + this.menu = menuConvert(this.menu); + }, + doShow(point) { + this.clickEvent(); + this.initMenu(); + if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) { + this.$refs.popMenu.resetShowPosition(point); + } + }, + doClose() { + if (this.$refs && this.$refs.popMenu) { + this.$refs.popMenu.close(); + } + }, + // 设置故障 + setStoppage() { + const operate = { + start: true, + send: true, + code: this.selected.code, + type: MapDeviceType.StationStand.type, + label: MapDeviceType.StationStand.label, + operation: OperationEvent.StationStand.stoppage.menu.operation + }; + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + } else { + this.$refs.noticeInfo.doShow(operate); + } + }).catch(() => { + this.$refs.noticeInfo.doShow(operate); + }); + }, + // 取消故障 + cancelStoppage() { + const operate = { + start: true, + send: true, + code: this.selected.code, + type: MapDeviceType.StationStand.type, + label: MapDeviceType.StationStand.label, + operation: OperationEvent.StationStand.cancelStoppage.menu.operation + }; + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + } else { + this.$refs.noticeInfo.doShow(operate); + } + }).catch(() => { + this.$refs.noticeInfo.doShow(operate); + }); + }, + // 设置扣车 + setDetainTrain() { + const operate = { + start: true, + code: this.selected.code, + type: MapDeviceType.StationStand.type, + label: MapDeviceType.StationStand.label, + operation: OperationEvent.StationStand.setDetainTrain.menu.operation + }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.standControl.doShow(operate, this.selected); - } - }); - }, - // 取消扣车 - cancelDetainTrain() { - const operate = { - start: true, - code: this.selected.code, - type: MapDeviceType.StationStand.type, - label: MapDeviceType.StationStand.label, - operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation - }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.standControl.doShow(operate, this.selected); - } - }); - }, - // 强制取消扣车 - cancelDetainTrainForce() { - const operate = { - start: true, - code: this.selected.code, - type: MapDeviceType.StationStand.type, - label: MapDeviceType.StationStand.label, - operation: OperationEvent.StationStand.cancelDetainTrainForce.menu.operation - }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.standControl.doShow(operate, this.selected); - } - }); - }, - // 全线取消扣车 - cancelDetainTrainAll() { - const operate = { - start: true, - code: this.selected.code, - type: MapDeviceType.StationStand.type, - label: MapDeviceType.StationStand.label, - operation: OperationEvent.StationStand.cancelDetainTrainAll.menu.operation - }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.standDetainTrainAll.doShow(operate, this.selected); - } - }); - }, - // 设置跳停 - setJumpStop() { - const operate = { - start: true, - code: this.selected.code, - type: MapDeviceType.StationStand.type, - label: MapDeviceType.StationStand.label, - operation: OperationEvent.StationStand.setJumpStop.menu.operation - }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.standControl.doShow(operate, this.selected); - } - }); - }, - // 取消跳停 - cancelJumpStop() { - const operate = { - start: true, - code: this.selected.code, - type: MapDeviceType.StationStand.type, - label: MapDeviceType.StationStand.label, - operation: OperationEvent.StationStand.cancelJumpStop.menu.operation - }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.standControl.doShow(operate, this.selected); - } - }); - }, - // 设置停站时间 - setStopTime() { - const operate = { - start: true, - send: true, - code: this.selected.code, - type: MapDeviceType.StationStand.type, - label: MapDeviceType.StationStand.label, - operation: OperationEvent.StationStand.setStopTime.menu.operation - }; - this.$store.dispatch('training/next', operate).then(({ valid, response }) => { - if (valid) { - let tempDate = null; - if (response) { - tempDate = response.data; - } - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.standStopTime.doShow(operate, this.selected, tempDate); - } - }).catch(() => { - this.$refs.noticeInfo.doShow(operate); - }); - }, - // 设置运行等级 - setRunLevel() { - const operate = { - start: true, - send: true, - code: this.selected.code, - type: MapDeviceType.StationStand.type, - label: MapDeviceType.StationStand.label, - operation: OperationEvent.StationStand.setRunLevel.menu.operation - }; - this.$store.dispatch('training/next', operate).then(({ valid, response }) => { - if (valid) { - let tempDate = null; - if (response) { - tempDate = response.data; - } - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.standRunLevel.doShow(operate, this.selected, tempDate); - } - }).catch(() => { - this.$refs.noticeInfo.doShow(operate); - }); - }, - // 设置提前发车 - earlyDeparture() { - const operate = { - start: true, - code: this.selected.code, - type: MapDeviceType.StationStand.type, - operation: OperationEvent.StationStand.earlyDeparture.menu.operation - }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.standControl.doShow(operate, this.selected); - } - }); - }, - // 设置折返策略 - setBackStrategy() { - const operate = { - start: true, - send: true, - code: this.selected.code, - type: MapDeviceType.StationStand.type, - operation: OperationEvent.StationStand.setBackStrategy.menu.operation - }; + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.$refs.standControl.doShow(operate, this.selected); + } + }); + }, + // 取消扣车 + cancelDetainTrain() { + const operate = { + start: true, + code: this.selected.code, + type: MapDeviceType.StationStand.type, + label: MapDeviceType.StationStand.label, + operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation + }; + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.$refs.standControl.doShow(operate, this.selected); + } + }); + }, + // 强制取消扣车 + cancelDetainTrainForce() { + const operate = { + start: true, + code: this.selected.code, + type: MapDeviceType.StationStand.type, + label: MapDeviceType.StationStand.label, + operation: OperationEvent.StationStand.cancelDetainTrainForce.menu.operation + }; + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.$refs.standControl.doShow(operate, this.selected); + } + }); + }, + // 全线取消扣车 + cancelDetainTrainAll() { + const operate = { + start: true, + code: this.selected.code, + type: MapDeviceType.StationStand.type, + label: MapDeviceType.StationStand.label, + operation: OperationEvent.StationStand.cancelDetainTrainAll.menu.operation + }; + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.$refs.standDetainTrainAll.doShow(operate, this.selected); + } + }); + }, + // 设置跳停 + setJumpStop() { + const operate = { + start: true, + code: this.selected.code, + type: MapDeviceType.StationStand.type, + label: MapDeviceType.StationStand.label, + operation: OperationEvent.StationStand.setJumpStop.menu.operation + }; + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.$refs.standControl.doShow(operate, this.selected); + } + }); + }, + // 取消跳停 + cancelJumpStop() { + const operate = { + start: true, + code: this.selected.code, + type: MapDeviceType.StationStand.type, + label: MapDeviceType.StationStand.label, + operation: OperationEvent.StationStand.cancelJumpStop.menu.operation + }; + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.$refs.standControl.doShow(operate, this.selected); + } + }); + }, + // 设置停站时间 + setStopTime() { + const operate = { + start: true, + send: true, + code: this.selected.code, + type: MapDeviceType.StationStand.type, + label: MapDeviceType.StationStand.label, + operation: OperationEvent.StationStand.setStopTime.menu.operation + }; + this.$store.dispatch('training/next', operate).then(({ valid, response }) => { + if (valid) { + let tempDate = null; + if (response) { + tempDate = response.data; + } + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.$refs.standStopTime.doShow(operate, this.selected, tempDate); + } + }).catch(() => { + this.$refs.noticeInfo.doShow(operate); + }); + }, + // 设置运行等级 + setRunLevel() { + const operate = { + start: true, + send: true, + code: this.selected.code, + type: MapDeviceType.StationStand.type, + label: MapDeviceType.StationStand.label, + operation: OperationEvent.StationStand.setRunLevel.menu.operation + }; + this.$store.dispatch('training/next', operate).then(({ valid, response }) => { + if (valid) { + let tempDate = null; + if (response) { + tempDate = response.data; + } + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.$refs.standRunLevel.doShow(operate, this.selected, tempDate); + } + }).catch(() => { + this.$refs.noticeInfo.doShow(operate); + }); + }, + // 设置提前发车 + earlyDeparture() { + const operate = { + start: true, + code: this.selected.code, + type: MapDeviceType.StationStand.type, + operation: OperationEvent.StationStand.earlyDeparture.menu.operation + }; + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.$refs.standControl.doShow(operate, this.selected); + } + }); + }, + // 设置折返策略 + setBackStrategy() { + const operate = { + start: true, + send: true, + code: this.selected.code, + type: MapDeviceType.StationStand.type, + operation: OperationEvent.StationStand.setBackStrategy.menu.operation + }; - this.$store.dispatch('training/next', operate).then(({ valid, response }) => { - if (valid) { - let tempDate = null; - if (response) { - tempDate = response.data; - } - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.standBackStrategy.doShow(operate, this.selected, tempDate); - } - }).catch(() => { - this.$refs.noticeInfo.doShow(operate); - }); - }, - // 查询站台状态 - detail() { - const operate = { - start: true, - send: true, - code: this.selected.code, - type: MapDeviceType.StationStand.type, - label: MapDeviceType.StationStand.label, - operation: OperationEvent.StationStand.detail.menu.operation - }; - this.$store.dispatch('training/next', operate).then(({ valid, response }) => { - if (valid) { - let tempDate = null; - if (response) { - tempDate = response.data; - } - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.standDetail.doShow(operate, this.selected, tempDate); - } - }).catch(() => { - this.$refs.noticeInfo.doShow(operate); - }); - } - } + this.$store.dispatch('training/next', operate).then(({ valid, response }) => { + if (valid) { + let tempDate = null; + if (response) { + tempDate = response.data; + } + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.$refs.standBackStrategy.doShow(operate, this.selected, tempDate); + } + }).catch(() => { + this.$refs.noticeInfo.doShow(operate); + }); + }, + // 查询站台状态 + detail() { + const operate = { + start: true, + send: true, + code: this.selected.code, + type: MapDeviceType.StationStand.type, + label: MapDeviceType.StationStand.label, + operation: OperationEvent.StationStand.detail.menu.operation + }; + this.$store.dispatch('training/next', operate).then(({ valid, response }) => { + if (valid) { + let tempDate = null; + if (response) { + tempDate = response.data; + } + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.$refs.standDetail.doShow(operate, this.selected, tempDate); + } + }).catch(() => { + this.$refs.noticeInfo.doShow(operate); + }); + } + } }; diff --git a/src/jmap/theme/fuzhou_01/menus/passiveDialog/alarm.vue b/src/jmap/theme/fuzhou_01/menus/passiveDialog/alarm.vue index ee1a74227..393599ff2 100644 --- a/src/jmap/theme/fuzhou_01/menus/passiveDialog/alarm.vue +++ b/src/jmap/theme/fuzhou_01/menus/passiveDialog/alarm.vue @@ -1,209 +1,209 @@ diff --git a/src/layout/components/Language.vue b/src/layout/components/Language.vue deleted file mode 100644 index 7140c0f5e..000000000 --- a/src/layout/components/Language.vue +++ /dev/null @@ -1,63 +0,0 @@ - - - - - diff --git a/src/layout/components/Logout.vue b/src/layout/components/Logout.vue index 927e3f0d3..ace26a3e5 100644 --- a/src/layout/components/Logout.vue +++ b/src/layout/components/Logout.vue @@ -1,6 +1,6 @@ diff --git a/src/layout/components/Title.vue b/src/layout/components/Title.vue new file mode 100644 index 000000000..fc4b19358 --- /dev/null +++ b/src/layout/components/Title.vue @@ -0,0 +1,55 @@ + + + + diff --git a/src/layout/components/index.js b/src/layout/components/index.js index 6744940ba..4cd35432d 100644 --- a/src/layout/components/index.js +++ b/src/layout/components/index.js @@ -1,3 +1,3 @@ export { default as Navbar } from './Navbar'; export { default as Sidebar } from './Sidebar'; -export { default as AppMain } from './AppMain'; +// export { default as AppMain } from './AppMain'; diff --git a/src/layout/components/userInfo.vue b/src/layout/components/userInfo.vue new file mode 100644 index 000000000..a55edd0a7 --- /dev/null +++ b/src/layout/components/userInfo.vue @@ -0,0 +1,465 @@ + + + + + + diff --git a/src/layout/index.vue b/src/layout/index.vue index edf1684bd..672640ea3 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -2,57 +2,64 @@
- +
+ + + +
+ +
{{ $t('global.companyInfo') }}  {{ $t('global.companyTel') }}
+
{{ $t('global.companyICP') }}
+
@@ -67,6 +74,10 @@ export default { overflow: hidden; } + .app-main{ + overflow-y: auto; + } + .drawer-bg { background: #000; opacity: 0.3; @@ -76,5 +87,65 @@ export default { height: 100%; position: absolute; z-index: 999; - } + } + .footers{ + line-height: 30px; + position: absolute; + width: 100%; + bottom: 0; + background: #fff; + border-top: 1px #ebeef5 solid; + } + + diff --git a/src/main.js b/src/main.js index 7d13b4a18..f9ffc387f 100644 --- a/src/main.js +++ b/src/main.js @@ -19,7 +19,13 @@ import router from './router'; import '@/icons'; // icon import '@/permission'; // permission control import '@/scripts/GlobalPlugin'; -import '@/directives'; +// import '@/directives'; +import '@/directive/dialogDrag/index.js'; +import '@/directive/dialogDragWidth/index.js'; +import '@/directive/drag/index.js'; +import '@/directive/focus/index.js'; +import '@/directive/quickMenuDrag/index.js'; +import '@/directive/waves/index.js'; import messages from '@/i18n/index'; Vue.use(ElementUI); diff --git a/src/permission.js b/src/permission.js index 1cfac6f57..3caafc04c 100644 --- a/src/permission.js +++ b/src/permission.js @@ -3,106 +3,130 @@ import store from '@/store'; import router from './router'; import NProgress from 'nprogress'; // Progress 进度条 import 'nprogress/nprogress.css';// Progress 进度条样式 -import { admin } from './router'; -import { getToken, getScreenToken, getPlanToken } from '@/utils/auth'; // 验权 +import { admin, userDesign} from './router'; +import { getToken, getDesignToken} from '@/utils/auth'; // 验权 import { LoginParams } from '@/utils/login'; +import { getSessionStorage } from '@/utils/auth'; +import localStore from 'storejs'; function hasPermission(roles, permissionRoles) { - if (roles.indexOf(admin) >= 0) return true; - if (!permissionRoles) return true; - return roles.some(role => permissionRoles.indexOf(role) >= 0); + if (roles.indexOf(admin) >= 0) return true; + if (!permissionRoles) return true; + return roles.some(role => permissionRoles.indexOf(role) >= 0); } -const whiteList = ['/login', '/dp/login', '/plan/login', '/en/login']; // 不重定向白名单 +const whiteList = ['/login', '/design/login', '/xty/login', '/designxty/login']; // 不重定向白名单 const loginPage = whiteList[0]; -const loginScreenPage = whiteList[1]; +const loginDesignPage = whiteList[1]; -const loginPlanPage = whiteList[2]; +const loginXtyPage = whiteList[2]; + +const loginDesignXtyPage = whiteList[3]; // 获取路径数据 function getRouteInfo(to) { - let loginPath = '/'; - let getTokenInfo = () => { }; - let clientId = ''; - const toRoutePath = to.redirectedFrom || to.path; + let loginPath = '/'; + let getTokenInfo = () => { }; + let clientId = ''; + const toRoutePath = to.redirectedFrom || to.path; + if (/^\/designxty/.test(toRoutePath)) { + loginPath = loginDesignXtyPage; + getTokenInfo = getDesignToken; + clientId = LoginParams.Design.clientId; + } else if (/^\/design/.test(toRoutePath) || /^\/scriptDisplay/.test(toRoutePath) || /^\/publish/.test(toRoutePath) || /^\/orderauthor/.test(toRoutePath) || /^\/system/.test(toRoutePath) || /^\/display\/record/.test(toRoutePath) || /^\/display\/manage/.test(toRoutePath) || /^\/apply/.test(toRoutePath)) { + loginPath = getSessionStorage('project') === 'designxty' ? loginDesignXtyPage : loginDesignPage; + getTokenInfo = getDesignToken; + clientId = LoginParams.Design.clientId; + } else if (/^\/plan/.test(toRoutePath) || /^\/display\/plan/.test(toRoutePath)) { + if (getSessionStorage('project').startsWith('design')) { + loginPath = getSessionStorage('project') === 'designxty' ? loginDesignXtyPage : loginDesignPage; + getTokenInfo = getDesignToken; + clientId = LoginParams.Design.clientId; + } else { + loginPath = getSessionStorage('project') === 'xty' ? loginXtyPage : loginPage; + getTokenInfo = getToken; + clientId = null; + } + } else if ( /^\/xty/.test(toRoutePath)) { + loginPath = loginXtyPage; + getTokenInfo = getToken; + clientId = null; + } else { + loginPath = getSessionStorage('project') === 'xty' ? loginXtyPage : loginPage; + getTokenInfo = getToken; + clientId = null; + } - if (/^\/dp/.test(toRoutePath) || /^\/display\/dp/.test(toRoutePath)) { - loginPath = loginScreenPage; - getTokenInfo = getScreenToken; - clientId = LoginParams.DaPing.clientId; - } else if (/^\/plan/.test(toRoutePath) || /^\/display\/plan/.test(toRoutePath) || /^\/planEdit/.test(toRoutePath)) { - loginPath = loginPlanPage; - getTokenInfo = getPlanToken; - clientId = LoginParams.LianJiHua.clientId; - } else { - loginPath = loginPage; - getTokenInfo = getToken; - clientId = null; - } - - return { clientId, loginPath, getTokenInfo }; + return { clientId, loginPath, getTokenInfo }; } function handleRoute(to, from, next, routeInfo) { - if (store.getters.roles.length === 0) { - // 拉取用户信息 - store.dispatch('GetInfo', routeInfo.getTokenInfo).then(res => { - // 根据roles权限生成可访问的路由表 - const roles = res.roles; + if (store.getters.roles.length === 0) { + // 拉取用户信息 + store.dispatch('GetInfo', routeInfo.getTokenInfo).then(res => { + // 根据roles权限生成可访问的路由表 + const roles = res.roles; + if (getSessionStorage('project').startsWith('design')) { + roles.push(userDesign); + } + store.dispatch('GenerateRoutes', { roles, clientId: routeInfo.clientId }).then(() => { + // 动态添加可访问路由表 + router.addRoutes(store.getters.addRouters); + // router.addRoutes(asyncRouter1); + if (to.redirectedFrom) { + next({ path: to.redirectedFrom, replace: true }); + } else { + next({ ...to, replace: true }); + } + }); - store.dispatch('GenerateRoutes', { roles, clientId: routeInfo.clientId }).then(() => { - // 动态添加可访问路由表 - router.addRoutes(store.getters.addRouters); - if (to.redirectedFrom) { - next({ path: to.redirectedFrom, replace: true }); - } else { - next({ ...to, replace: true }); - } - }); - - }).catch(() => { - store.dispatch('FedLogOut', routeInfo.clientId).then(() => { - Vue.prototype.$messageBox('验证失败,请重新登陆!'); - next({ path: routeInfo.loginPath }); - }); - }); - } else { - // 除没有动态改变权限的需求可直接next() 删下方权限判断 - if (hasPermission(store.getters.roles, to.meta.roles)) { - next(); - } else { - next({ path: '/401', replace: true, query: { noGoBack: true } }); - } - } + }).catch(() => { + store.dispatch('FedLogOut', routeInfo.clientId).then(() => { + Vue.prototype.$messageBox('验证失败,请重新登录!'); + next({ path: routeInfo.loginPath }); + }); + }); + } else { + // 除没有动态改变权限的需求可直接next() 删下方权限判断 + if (hasPermission(store.getters.roles, to.meta.roles)) { + if (to.path === '/404' && to.redirectedFrom === '/') { + next(localStore.get('trainingPlatformRoute' + store.getters.id) || '/trainingPlatform'); + } else { + next(); + } + } else { + next({ path: '/401', replace: true, query: { noGoBack: true } }); + } + } } router.beforeEach((to, from, next) => { - NProgress.start(); - const routeInfo = getRouteInfo(to); - if (routeInfo.getTokenInfo()) { - // 已登录 - if (to.path === routeInfo.loginPath) { - // 登录页面不拦截 - next(); - } else { - // 进入系统重新计算路由 - handleRoute(to, from, next, routeInfo); - } - } else { - // 未登录情况下 - if (whiteList.indexOf(to.path) !== -1) { - // 在免登录白名单,直接进入 - next(); - } else { - // 否则全部重定向到登录页 - next(routeInfo.loginPath); - } - } + NProgress.start(); + const routeInfo = getRouteInfo(to); + if (routeInfo.getTokenInfo()) { + // 已登录 + if (to.path === routeInfo.loginPath) { + // 登录页面不拦截 + next(); + } else { + // 进入系统重新计算路由 + handleRoute(to, from, next, routeInfo); + } + } else { + // 未登录情况下 + if (whiteList.indexOf(to.path) !== -1) { + // 在免登录白名单,直接进入 + next(); + } else { + // 否则全部重定向到登录页 + next(routeInfo.loginPath); + } + } }); router.afterEach(() => { - // 结束Progress - NProgress.done(); + // 结束Progress + NProgress.done(); }); diff --git a/src/router/index.js b/src/router/index.js index 682093884..b1a72884e 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -6,87 +6,81 @@ Vue.use(Router); /* Layout */ import Layout from '@/layout'; import Login from '@/views/login/index'; -// 英文默认登陆窗口 -import LoginEn from '@/views/login/loginEn'; - -// import LoginNewScreen from '@/views/login/loginNewScreen'; -import LoginScreen from '@/views/login/loginScreen'; -import LoginPlan from '@/views/login/loginPlan'; import Jlmap3dedit from '@/views/jlmap3d/edit/jlmap3dedit'; import Jlmap3d from '@/views/jlmap3d/drive/jl3ddrive'; import Display from '@/views/display/index'; +import DesignDisplay from '@/views/display/designIndex'; + import TrainRoom from '@/views/trainRoom/index'; import JointTraining from '@/views/jointTraining/index'; import Error401 from '@/views/error-page/401'; import Errpr404 from '@/views/error-page/404'; -import Dashboard from '@/views/dashboard/index'; -import Dashboard1 from '@/views/dashboard/index.vue'; -import SkinCode from '@/views/map/skinCode/index'; -import SkinCodeDraft from '@/views/map/skinCode/draft'; -import Mapdraft from '@/views/map/mapdraft/index'; -import Mapedit from '@/views/map/mapdraft/mapedit/index'; -import Runplan from '@/views/map/runplan/index'; -import MapProduct from '@/views/map/product/index'; -import RunplanView from '@/views/map/runplan/chart'; -import Trainingrecord from '@/views/lesson/trainingrecord/index'; -import TrainingrecordManage from '@/views/lesson/trainingrecord/manage/index'; + +import MapProduct from '@/views/system/product/index'; +import Dictionary from '@/views/system/dictionary/index'; +import DictionaryDetail from '@/views/system/dictionaryDetail/index'; +import UserControl from '@/views/system/userControl/index'; +import UserTraining from '@/views/system/userTraining/index'; +import UserExam from '@/views/system/userExam/index'; +import UserSimulation from '@/views/system/userSimulation/index'; +import ExistingSimulation from '@/views/system/existingSimulation/index'; +import CacheControl from '@/views/system/cacheControl/index'; +import SystemGenerate from '@/views/system/systemGenerate/index'; +import IbpDraw from '@/views/system/ibpDraw/index'; + +import Mapedit from '@/views/mapdraft/index'; + import Taskmanage from '@/views/lesson/taskmanage/list'; import TrainingRuleList from '@/views/lesson/trainingRule/list'; import TrainingRuleEdit from '@/views/lesson/trainingRule/detail/index'; import Trainingmanage from '@/views/lesson/trainingmanage/index'; -import Lessoncategory from '@/views/lesson/lessoncategory/index'; -// import Scriptmanage from '@/views/lesson/scriptmanage/list'; +import LessonEdit from '@/views/lesson/lessoncategory/index'; +import LessonHome from '@/views/lesson/home'; +import LessonDetail from '@/views/lesson/details'; -import Scriptmanage from '@/views/scriptManage/index'; import ScriptmanageHome from '@/views/scriptManage/home'; import ScriptDisplay from '@/views/scriptManage/display/index'; -import ScriptDetail from '@/views/scriptManage/detail/index'; -import Teach from '@/views/teach/index'; -import TeachHome from '@/views/teach/home'; import TeachDetail from '@/views/teach/detail/index'; -import TeachPractical from '@/views/teach/practical/index'; +import TeachHome from '@/views/teach/index'; import Pay from '@/views/components/pay/index'; -import Exam from '@/views/exam/index'; -import ExamHome from '@/views/exam/home'; + +import ExamHome from '@/views/exam/index'; +import ExamResult from '@/views/exam/result'; import ExamDetail from '@/views/exam/detail/examDetail'; import ExamCourseDetail from '@/views/exam/detail/courseDetail'; -import ExamQuestionDetail from '@/views/exam/detail/questionDetail'; -import ExamResult from '@/views/exam/result'; -import PublishExamRule from '@/views/publish/examRule/index'; -import PublishExamRuleDraft from '@/views/publish/examRule/draft/index'; - -import Demonstration from '@/views/demonstration/index'; -import DemonstrationHome from '@/views/demonstration/home'; import DemonstrationDetail from '@/views/demonstration/detail/index'; -import ScreenMonitor from '@/views/screenMonitor/index'; -import ScreenMonitorHome from '@/views/screenMonitor/home'; -import ScreenMonitorDetail from '@/views/screenMonitor/detail/index'; import PlanMonitorEditTool from '@/views/planMonitor/editTool/index'; -import PlanMonitor from '@/views/planMonitor/index'; -import PlanMonitorHome from '@/views/planMonitor/home'; +import PlanMonitorEditUserTool from '@/views/planMonitor/editTool/userindex'; import PlanMonitorDetail from '@/views/planMonitor/detail'; -import Replay from '@/views/replay/index'; +import DesignPlatformHome from '@/views/designPlatform/home'; +import DesignPlatform from '@/views/designPlatform/index'; +import MapPreview from '@/views/designPlatform/mapPreview'; + +import DesignPlatformUser from '@/views/designUser/index'; + import Package from '@/views/package/index'; import PackageDraft from '@/views/package/draft/ruleForm'; import PackageDetail from '@/views/package/detail'; import PublishMap from '@/views/publish/publishMap/index'; -import PublishMapDraft from '@/views/publish/publishMap/draft'; -import PublishMapDetail from '@/views/publish/publishMap/list'; -import RunPlanCommon from '@/views/publish/runPlanCommon/index'; -import RunPlanCommonDraft from '@/views/publish/runPlanCommon/draft'; -import RunPlanTemplate from '@/views/publish/runPlanTemplate/index'; -import RunPlanEveryDay from '@/views/publish/runPlanEveryDay/index'; +import PublishMapDetail from '@/views/publish/publishMap/list'; // 发布历史 import ProductStatus from '@/views/publish/productStatus/index'; import PublishLesson from '@/views/publish/publishLesson/index'; -// import SimulationScript from '@/views/publish/simulationScript/index'; -import IbpEdit from '@/views/ibp/ibpDraft/ibpEdit/index'; +import RunPlanTemplate from '@/views/publish/runPlanTemplate/index'; +import RunPlanCommon from '@/views/publish/runPlanCommon/index'; +import RunPlanCommonDraft from '@/views/publish/runPlanCommon/draft'; +import RunPlanEveryDay from '@/views/publish/runPlanEveryDay/index'; +import RunplanView from '@/views/publish/runPlanEveryDay/runPlanView'; +import PublishExamRule from '@/views/publish/examRule/index'; +import PublishExamRuleDraft from '@/views/publish/examRule/draft/index'; + +import TrainingPlatform from '@/views/trainingPlatform/index'; import Commodity from '@/views/orderauthor/commodity/index'; import CommodityDraft from '@/views/orderauthor/commodity/draft'; @@ -94,24 +88,20 @@ import OrderList from '@/views/orderauthor/order/list'; import OrderDraft from '@/views/orderauthor/order/draft'; import Author from '@/views/orderauthor/author/index'; import AuthorDraft from '@/views/orderauthor/author/draft/ruleForm'; - import Permission from '@/views/orderauthor/permission/index'; import PermissionDetail from '@/views/orderauthor/permission/detail'; -import PermissionDraft from '@/views/orderauthor/permission/draft/ruleForm'; +import PermissionDraft from '@/views/orderauthor/permission/package/ruleForm'; import PermissionCreate from '@/views/orderauthor/permission/create/index'; - import UserRules from '@/views/orderauthor/rules/index'; import UserRulesDetail from '@/views/orderauthor/rules/detail'; -import Dictionary from '@/views/management/dictionary/index'; -import DictionaryDetail from '@/views/management/dictionaryDetail/index'; -import UserControl from '@/views/management/userControl/index'; -import UserTraining from '@/views/management/userTraining/index'; -import UserExam from '@/views/management/userExam/index'; -import UserSimulation from '@/views/management/userSimulation/index'; -import ExistingSimulation from '@/views/management/existingSimulation/index'; +import LessonApproval from '@/views/approval/lesson/index'; +import ScriptApproval from '@/views/approval/script/index'; +import RunPlanApproval from '@/views/approval/runPlan/index'; +import News from '@/views/news/index'; -import CacheControl from '@/views/management/cacheControl/index'; +import { loginTitle } from '@/scripts/ConstDic'; +import { getSessionStorage } from '@/utils/auth'; /** * Note: sub-menu only appear when route children.length >= 1 @@ -143,98 +133,94 @@ export const userLesson = '012'; // 教学系统 export const userSimulation = '013'; // 仿真系统 export const userScreen = '014'; // 大屏系统 export const userPlan = '015'; // 计划系统 +export const userDesign = '016'; // 设计系统 +const isDev = process.env.NODE_ENV === 'development'; export const UrlConfig = { - display: '/display', - scriptDisplay: '/scriptDisplay', - examRuleDraft: '/examRule/draft', - examRuleManage: '/examRule/manage', - map: { - prefix: '/map', - draft: '/map/draw', - skinCode: '/map/skinCode', - skinCodeDraft: '/map/skinCode/draft', - runPlan: '/map/runPlan', - runPlanView: '/map/runPlan/view', - product: '/map/product', - productDraft: '/map/product/draft' - }, - lesson: { - prefix: '/lesson', - record: '/lesson/record/training', - manage: '/lesson/manage/training' - }, - teach: { - prefix: '/teach', - detail: '/teach/detail', - practical: '/teach/practical', - pay: '/teach/pay' - }, - exam: { - prefix: '/exam', - detail: '/exam/detail', - course: '/exam/course', - examRuleManage: '/exam/examRule/manage', - pay: '/exam/pay' - }, - demonstration: { - prefix: '/demonstration', - detail: '/demonstration/detail', - pay: '/demonstration/pay' - }, - dp: { - prefix: '/dp', - detail: '/dp/detail', - pay: '/dp/pay' - - }, - plan: { - prefix: '/plan', - tool: '/plan/tool', - detail: '/plan/detail', - pay: '/plan/pay' - }, - replay: { - prefix: '/replay' - }, - permission: { - prefix: '/permission', - permissionList: '/permission/manage', - permissionDraft: '/permission/draft', - permission: '/permission/restore' - }, - publish: { - prefix: '/publish', - map: '/publish/map', - mapDraft: '/publish/map/draft', - runPlanEveryDay: '/publish/runPlan/everyDay', - runPlanTemplate: '/publish/runPlan/template', - runPlanCommon: '/publish/runPlan/common', - runPlanView: '/publish/runPlan/view' - }, - orderauthor: { - prefix: '/orderauthor', - commodityManage: '/orderauthor/commodity/manage', - commodityDraft: '/orderauthor/commodity/draft', - orderManage: '/orderauthor/order/manage', - orderDraft: '/orderauthor/order/draft', - authorMange: '/orderauthor/author/manage', - authorDetail: '/orderauthor/author/detail', - authorDraft: '/orderauthor/author/draft', - transferDetail: '/orderauthor/transfer/detail', - trainferPackage: '/orderauthor/transfer/package', - createPackage: '/orderauthor/transfer/create' - }, - script: { - prefix: '/script', - detail: '/script/detail', - display: '/script/display' - }, - ibp: { - prefix: 'ibp', - draft: '/ibp/draft', - edit: 'ibp/edit' - } + display: '/display', + scriptDisplay: '/scriptDisplay', + examRuleDraft: '/examRule/draft', + examRuleManage: '/examRule/manage', + lesson: { + prefix: '/lesson', + record: '/system/record/training', + manage: '/lesson/manage/training' + }, + design: { + prefix: '/design/home', + mapDraw: '/design/map/draw', + lessonEdit: '/design/lesson/edit', + lessonHome: '/design/lesson/home', + lessonManage: '/design/lesson/manage', + taskManage: '/design/lesson/taskManage', + trainingRule: '/design/lesson/trainingRule', + trainingRuleDetail: '/design/lesson/trainingRule/detail', + trainingManage: '/design/lesson/trainingManage', + lessonTraining: '/design/lesson/training', + trainingRecord: '/design/lesson/training', + runPlan: '/design/runPlan/detail', + scriptHome: '/design/script/home', + display: '/design/display', + mapPreview: '/design/mapPreview' + }, + designUser: { + prefix: '/design/userlist/home', + scriptHome: '/design/userlist/script/home', + mapDraw: '/design/userlist/map/draw', + lessonHome: '/design/userlist/lesson/home', + runPlan: '/design/userlist/runPlan/detail' + }, + replay: { + prefix: '/replay' + }, + publish: { + prefix: '/publish', + map: '/publish/map', + runPlanEveryDay: '/publish/runPlan/everyDay', + runPlanTemplate: '/publish/runPlan/template', + runPlanCommon: '/publish/runPlan/common', + runPlanView: '/publish/runPlan/view' + }, + orderauthor: { + prefix: '/orderauthor', + commodityManage: '/orderauthor/commodity/manage', + commodityDraft: '/orderauthor/commodity/draft', + orderManage: '/orderauthor/order/manage', + orderDraft: '/orderauthor/order/draft', + authorMange: '/orderauthor/author/manage', + authorDetail: '/orderauthor/author/detail', + authorDraft: '/orderauthor/author/draft', + transferDetail: '/orderauthor/transfer/detail', + trainferPackage: '/orderauthor/transfer/package', + createPackage: '/orderauthor/transfer/create' + }, + script: { + prefix: '/script', + detail: '/script/detail', + display: '/script/display' + }, + ibp: { + prefix: 'ibp', + draft: '/ibp/draft', + edit: 'ibp/edit' + }, + trainingPlatform: { + trainingPlatform: '/trainingPlatform', + prodDetail: '/trainingPlatform/detail', + teachDetail: '/trainingPlatform/teach', + teachHome: '/trainingPlatform/teachHome', + examDetail: '/trainingPlatform/exam', + examHome: '/trainingPlatform/examHome', + examRuleManage: '/trainingPlatform/examRule/manage', + examRuleDraft: '/trainingPlatform/examRule/Draft', + course: '/trainingPlatform/course', + practical: '/trainingPlatform/practical', + permission: '/trainingPlatform/permission', + permissionDetails: '/trainingPlatform/permission/detail', + draft: '/trainingPlatform/draft', + pay: '/trainingPlatform/pay', + runPlan: '/trainingPlatform/runPlan/manage' + } }; /** @@ -243,785 +229,641 @@ export const UrlConfig = { * all roles can be accessed */ export const constantRoutes = [ - // 默认登陆窗口 - { - path: '/login', - component: Login, - hidden: true - }, - // 英文登陆窗口 - { - path: '/en/login', - component: LoginEn, - hidden: true - }, - // 大屏登录 - { - path: '/dp/login', - component: LoginScreen, - hidden: true - }, - // 琏计划登陆 - { - path: '/plan/login', - component: LoginPlan, - hidden: true - }, + // 实训平台登录 + { + path: '/login', + component: Login, + hidden: true + }, + // 项目系统登录 + { + path: '/xty/login', + component: Login, + hidden: true + }, + { + path: '/xty', + redirect: '/xty/login', + hidden: true + }, + // 设计平台登录 + { + path: '/design/login', + component: Login, + hidden: true + }, + { + path: '/designxty/login', + component: Login, + hidden: true + }, + { + path: '/designxty', + redirect: '/designxty/login', + hidden: true + }, + { + path: '/design/jlmap3d/edit', + component: Jlmap3dedit, + hidden: true + }, + { + path: '/401', + component: Error401, + hidden: true + }, - { - path: '/jlmap3d/edit', - component: Jlmap3dedit, - hidden: true - }, - { - path: '/401', - component: Error401, - hidden: true - }, - - { - path: '/404', - component: Errpr404, - hidden: true - }, - - { - path: '/', - component: Layout, - redirect: '/dashboard', - children: [{ - path: 'dashboard', - component: Dashboard, - meta: { - i18n: 'router.homePage', - icon: 'dashboard' - } - }] - }, - - { path: '*', redirect: '/404', hidden: true } + { + path: '/404', + component: Errpr404, + hidden: true + }, + { path: '*', redirect: '/404', hidden: true } ]; export const asyncRouter = [ - { - path: '/', - component: Layout, - redirect: '/dashboard', - hidden: true, - children: [ - { - path: 'dashboard', - component: Dashboard1 - } - ] - }, - { - path: '/display/:mode', - component: Display, - meta: { - }, - hidden: true - }, - { - path: '/scriptDisplay/:mode', - component: ScriptDisplay, - meta: { - }, - hidden: true - }, - { - path: '/trainroom', - component: TrainRoom, - meta: { - }, - hidden: true - }, - { - path: '/jointTraining', - component: JointTraining, - hidden: true - }, - { - path: '/jlmap3d', - component: Jlmap3d, - meta: { - }, - hidden: true - }, - { - path: '/map', - meta: { - i18n: 'router.mapManage', - roles: [admin, mapCreater] - }, - component: Layout, - children: [ - { - path: 'skinCode', - component: SkinCode, - meta: { - i18n: 'router.skinManage' - } - }, - { - path: 'skinCode/draft/:mode/:skinCodeId', - hidden: true, - component: SkinCodeDraft - }, - { - path: 'draw', - redirect: '/map/draw/0/draft', - component: Mapdraft, - meta: { - i18n: 'router.mapDraw' - }, - children: [ - { - path: ':mapId/:view', - component: Mapedit, - hidden: true - } - ] - }, - { - path: 'ibp/edit', - component: IbpEdit, - meta: { - i18n: 'router.ibpDraw' - } - }, - { - path: 'runPlan', - redirect: '/map/runPlan/view/draft', - component: Runplan, - meta: { - i18n: 'router.runPlanManage' - }, - children: [{ - path: 'view/:mode', - component: RunplanView, - hidden: true - }] - }, - { - path: 'product', - component: MapProduct, - meta: { - i18n: 'router.productEdit' - } - } - ] - }, - { - path: '/lesson', - component: Layout, - meta: { - i18n: 'router.lessaonManage', - roles: [admin, lessonCreater] - }, - children: [ - { - path: 'record', - redirect: '/lesson/record/training/0/null', - component: Trainingrecord, - meta: { - i18n: 'router.trainingRecord' - }, - children: [ - { - path: 'training/:trainingId/:trainingName', - component: TrainingrecordManage, - hidden: true - } - ] - }, - { - path: 'manage/taskManage', - component: Taskmanage, - meta: { - i18n: 'router.taskManage' - } - }, - { - path: 'manage/trainingRule', - component: TrainingRuleList, - meta: { - i18n: 'router.trainingRule' - } - }, - { - path: 'manage/trainingRule/detail', - hidden: true, - component: TrainingRuleEdit, - meta: { - } - }, - { - path: 'manage/training', - component: Trainingmanage, - meta: { - i18n: 'router.trainingManage' - } - }, - { - path: 'edit', - component: Lessoncategory, - meta: { - i18n: 'router.lessonEdit' - } - } - ] - }, - { - path: '/script', - component: Layout, - meta: { - roles: [admin, lessonCreater, user] - }, - children: [ - { - path: '', - redirect: '/script/home', - component: Scriptmanage, - meta: { - i18n: 'router.scriptManage' - }, - children: [ - { - path: 'home', - component: ScriptmanageHome, - meta: { - i18n: 'router.scriptManage' - } - }, - { - path: 'detail/:scriptId', - component: ScriptDetail, - hidden: true - } - ] - } - ] - }, - { - path: '/teach', - component: Layout, - meta: { - roles: [admin, userLesson, user] - }, - children: [ - { - path: '', - redirect: '/teach/home', - component: Teach, - meta: { - i18n: 'router.teachSystem' - }, - children: [ - { - path: 'home', - component: TeachHome - }, - { - // 课程详情 - path: 'detail/:lessonId', - component: TeachDetail, - meta: { - }, - hidden: true - }, - { - // 实训详情 - path: 'practical/:trainingId/:lessonId', - component: TeachPractical, - meta: { - }, - hidden: true - }, - { - path: 'pay/:lessonId', - component: Pay, - meta: { - }, - hidden: true - } - ] - } - ] - }, - { - path: '/exam', - component: Layout, - meta: { - roles: [admin, userExam, user] - }, - children: [ - { - path: '', - redirect: '/exam/home', - component: Exam, - meta: { - i18n: 'router.examSystem' - }, - children: [ - { - path: 'home', - component: ExamHome - }, - { - // 试卷详情 - path: 'detail/:examId', - component: ExamDetail, - hidden: true - }, - { - path: 'course/:lessonId', - component: ExamCourseDetail, - hidden: true - }, - { - // 规则管理 - path: 'examRule/manage', - component: PublishExamRule, - hidden: true - }, - { - path: 'examRule/draft/:mode/:ruleId/:lessonId', - hidden: true, - component: PublishExamRuleDraft - }, - { - path: 'pay/:lessonId', - component: Pay, - hidden: true - }, - { - // 开始考试 - path: 'questionDetail/:examQuestionId', - component: ExamQuestionDetail, - hidden: true - }, - { - // 考试结果 - path: 'result/:userExamId', - component: ExamResult, - hidden: true - } - ] - } - ] - }, - { - path: '/demonstration', - component: Layout, - meta: { - roles: [admin, userSimulation, user] - }, - children: [ - { - path: '', - redirect: '/demonstration/home', - component: Demonstration, - meta: { - i18n: 'router.demonstrationSystem' - }, - children: [ - { - path: 'home', - component: DemonstrationHome, - meta: { - i18n: 'router.demonstrationSystem' - } - }, - { - path: 'detail/:mapId', - component: DemonstrationDetail, - hidden: true - }, - { - path: 'pay/:lessonId', - component: Pay, - hidden: true - } - ] - } - ] - }, - { - path: '/dp', - redirect: '/dp/home', - component: ScreenMonitor, - meta: { - roles: [admin, userScreen, user] - }, - children: [ - { - path: 'home', - component: ScreenMonitorHome, - meta: { - i18n: 'router.dpSystem' - }, - target: true - }, - { - path: 'detail/:lessonId', - component: ScreenMonitorDetail, - hidden: true - }, - { - path: 'pay/:lessonId', - component: Pay, - hidden: true - } - ] - }, - { - path: '/plan/tool', - component: PlanMonitorEditTool, - meta: { - }, - hidden: true - }, - { - path: '/plan', - redirect: '/plan/home', - component: PlanMonitor, - meta: { - roles: [admin, user] - }, - children: [ - { - path: 'home', - component: PlanMonitorHome, - meta: { - i18n: 'router.planSystem' - }, - target: true - }, - { - path: 'detail/:lessonId', - component: PlanMonitorDetail, - hidden: true - }, - { - path: 'pay/:lessonId', - component: Pay, - hidden: true - } - ] - }, - { - path: '/replay', - component: Layout, - meta: { - roles: [admin] - }, - children: [ - { - path: 'manage', - component: Replay, - meta: { - i18n: 'router.replayManage' - } - } - ] - }, - { - path: '/permission', - component: Layout, - meta: { - roles: [admin, user] - }, - children: [ - { - path: 'manage', - component: Package, - meta: { - i18n: 'router.selfPermission' - } - }, - { - path: 'manage/detail/:id', - component: PackageDetail, - hidden: true - }, - { - path: 'draft', - component: PackageDraft, - hidden: true - } - ] - }, - { - path: '/publish', - component: Layout, - meta: { - i18n: 'router.pulishManage', - roles: [admin] - }, - children: [ - { - path: 'map', - component: PublishMap, - meta: { - i18n: 'router.publishMapManage' - } - }, - { - path: 'map/detail', - hidden: true, - component: PublishMapDetail - }, - { - path: 'product', - component: ProductStatus, - meta: { - i18n: 'router.productStateManage' - } - }, - { - path: 'lesson', - component: PublishLesson, - meta: { - i18n: 'router.publishLessonManage' - } - }, - // { - // path: 'script', - // component: SimulationScript, - // meta: { - // title: '仿真脚本管理', - // } - // }, - { - path: 'runPlan/template', - component: RunPlanTemplate, - meta: { - i18n: 'router.runPlanTemplateManage' - } - }, - { - path: 'runPlan/common', - component: RunPlanCommon, - meta: { - i18n: 'router.runPlanCommonManage' - } - }, - { - path: 'runPlan/everyDay', - component: RunPlanEveryDay, - meta: { - i18n: 'router.runPlanEveryDayManage' - } - }, - { - path: 'examRule/manage', - component: PublishExamRule, - meta: { - i18n: 'router.examRuleManage' - } - }, - { - path: 'map/draft/:mode/:mapId', - component: PublishMapDraft, - hidden: true - }, - { - path: 'examRule/draft/:mode/:ruleId/:lessonId', - component: PublishExamRuleDraft, - hidden: true - }, - { - path: 'runPlan/common/:mode', - component: RunPlanCommonDraft, - hidden: true - }, - { - path: 'runPlan/view/:mode', - component: RunplanView, - hidden: true - } - ] - }, - { - path: '/orderauthor', - component: Layout, - meta: { - i18n: 'router.orderAuthorityManage', - roles: [admin] - }, - children: [ - { - path: 'author/manage', - component: Author, - meta: { - i18n: 'router.authorityManage' - } - }, - { - path: 'commodity/manage', - component: Commodity, - meta: { - i18n: 'router.commodityManage' - } - }, - { - path: 'order/manage', - component: OrderList, - meta: { - i18n: 'router.orderManage' - } - }, - { - path: 'transfer/manage', - component: Permission, - meta: { - i18n: 'router.authorityTransferManage' - } - }, - { - path: 'rules/manage', - component: UserRules, - meta: { - i18n: 'router.userRulesManage' - } - }, - { - path: 'rules/manage/detail/:id', - hidden: true, - component: UserRulesDetail, - meta: { - i18n: 'router.userRulesManage' - } - }, - { - path: 'commodity/draft/:mode/:commodityId', - hidden: true, - component: CommodityDraft, - meta: { - i18n: 'router.addCommodity' - } - }, - { - path: 'order/draft/:mode/:orderId', - hidden: true, - component: OrderDraft, - meta: { - i18n: 'router.addOrder' - } - }, - { - path: 'author/manage/rules', - hidden: true, - component: AuthorDraft, - meta: { - i18n: 'router.addCoursePermissions' - } - }, - { - path: 'transfer/detail/:permissionId', - component: PermissionDetail, - hidden: true - }, - { - path: 'transfer/package', - component: PermissionDraft, - hidden: true - }, - { - path: 'transfer/create', - component: PermissionCreate, - hidden: true - } - ] - }, - { - path: '/system', - component: Layout, - meta: { - i18n: 'router.systemManage', - roles: [admin] - }, - children: [ - { - path: 'dictionary', - component: Dictionary, - meta: { - i18n: 'router.dataDictionary' - } - }, - { - path: 'dictionary/detail', - hidden: true, - component: DictionaryDetail, - meta: { - i18n: 'router.dataDictionaryDetails' - } - }, - { - path: 'userManage', - component: UserControl, - meta: { - i18n: 'router.userManage' - } - }, - { - path: 'cache', - component: CacheControl, - meta: { - i18n: 'router.cacheManage' - } - }, - { - path: 'userTrainingManage', - component: UserTraining, - meta: { - i18n: 'router.userTrainingManage' - } - }, - { - path: 'userExamManage', - component: UserExam, - meta: { - i18n: 'router.userExamManage' - } - }, - { - path: 'userSimulationManage', - component: UserSimulation, - meta: { - i18n: 'router.userSimulationManage' - } - }, - { - path: 'existingSimulation', - component: ExistingSimulation, - meta: { - i18n: 'router.existingSimulation' - } - } - ] - } + { // 公共地图 + path: '/design', + component: Layout, + redirect: '/design/home', + meta: { + roles: [admin, user, userDesign] + }, + children: [ + { + path: '', + redirect: '/design/home', + component: DesignPlatform, + meta: { + i18n: 'router.designhomePage', + icon: 'design' + }, + children: [ + { + path: 'home', + component: DesignPlatformHome, + meta: { + } + }, + { // 运行图设计 + path: 'runPlan/detail/:mapId', + component: PlanMonitorDetail, + hidden: true + }, + { // 剧本 + path: 'script/home/:mapId', + component: ScriptmanageHome, + meta: { + i18n: 'router.scriptManage' + }, + hidden: true + }, + { // 课程列表 + path: 'lesson/home/:mapId', + component: LessonHome, + hidden: true + }, + { // 操作定义 + path: 'lesson/trainingRule', + component: TrainingRuleList, + hidden: true + }, + { // 操作定义步骤 + path: 'lesson/trainingRule/detail', + hidden: true, + component: TrainingRuleEdit + }, + { // 任务管理 + path: 'lesson/taskManage', + component: Taskmanage, + hidden: true + }, + { // 实训管理 + path: 'lesson/trainingManage', + component: Trainingmanage, + hidden: true + }, + { // 创建课程 + path: 'lesson/edit/:type', + component: LessonEdit, + hidden: true + }, + { // 课程详情 + path: 'lesson/details', + component: LessonDetail, + hidden: true, + children: [ + { + path: 'edit/:type', + component: LessonEdit, + hidden: true + } + ] + }, + { // 地图预览 + path: 'mapPreview/:mapId', + component: MapPreview, + hidden: true + + } + ] + } + ] + }, + { // 个人地图 + path: '/design/userlist', + redirect: '/design/userlist/home', + component: Layout, + meta: { + roles: [admin, user, userDesign] + }, + children: [ + { + path: '', + redirect: '/design/userlist/home', + component: DesignPlatformUser, + meta: { + i18n: 'router.designUserPage', + icon: 'design' + }, + children: [ + { + path: 'home', + component: DesignPlatformHome, + meta: { + } + }, + { // 地图绘制 + path: 'map/draw/:mapId/:view', + component: Mapedit, + hidden: true + }, + { // 运行图设计 + path: 'runPlan/detail/:mapId', + component: PlanMonitorDetail, + hidden: true + } + ] + } + ] + }, + { // 全屏战场图 + path: '/display/:mode', + component: Display, + meta: { + }, + hidden: true + }, + { + path: '/design/display/:mode', + component: DesignDisplay, + meta: { + }, + hidden: true + }, + { // 剧本编辑 战场图 + path: '/scriptDisplay/:mode', + component: ScriptDisplay, + meta: { + }, + hidden: true + }, + { // 综合演练室 + path: '/trainroom', + component: TrainRoom, + meta: { + }, + hidden: true + }, + { + path: '/jointTraining', + component: JointTraining, + hidden: true + }, + { + path: '/jlmap3d', + component: Jlmap3d, + meta: { + }, + hidden: true + }, + { // 实训平台 + path: '/trainingPlatform', + component: Layout, + hidden: true, + meta: { + roles: [admin, userSimulation, user] + }, + children: [ + { + path: '', + component: TrainingPlatform, + meta: { + }, + children: [ + { // 仿真详情 + path: 'detail/:subSystem', + component: DemonstrationDetail, + hidden: true + }, + { // 教学系统 课程列表 + path: 'teachHome/:subSystem', + component: TeachHome, + hidden: true + }, + { // 课程详情 + path: 'teach/:subSystem', + component: TeachDetail, + hidden: true + }, + { // 试卷列表 + path: 'course/:subSystem', + component: ExamCourseDetail, + hidden: true + }, + { // 考试系统 课程列表 + path: 'examHome/:subSystem', + component: ExamHome, + hidden: true + }, + { // 试卷详情 + path: 'exam/:examId', + component: ExamDetail, + hidden: true + }, + { // 试卷列表 + path: 'examRule/manage', + component: PublishExamRule, + hidden: true + }, + { // 创建试卷 + path: 'examRule/draft/:mode/:ruleId/:lessonId', + component: PublishExamRuleDraft, + hidden: true + }, + { // 购买 + path: 'pay/:lessonId', + component: Pay, + hidden: true + }, + { // 考试结果 + path: 'result/:userExamId', + component: ExamResult, + hidden: true + }, + { // 线路权限列表 + path: 'permission/:mapId', + component: Package, + hidden: true + }, + { // 打包详情 + path: 'permission/detail/:id', + component: PackageDetail, + hidden: true + }, + { // 权限打包 + path: 'draft', + component: PackageDraft, + hidden: true + }, + { + path: 'runPlan/manage/:mapId', + component: PlanMonitorDetail, + hidden: true + } + ] + } + ] + }, + { // 运行图编辑 + path: '/plan/usertool', + component: PlanMonitorEditUserTool, + meta: { + }, + hidden: true + }, + { // 运行图编辑 + path: '/plan/tool', + component: PlanMonitorEditTool, + meta: { + }, + hidden: true + }, + { // 发布内容管理 + path: '/publish', + component: Layout, + meta: { + i18n: 'router.pulishManage', + roles: [admin, userDesign] + }, + children: [ + { // 发布地图 + path: 'map', + component: PublishMap, + meta: { + i18n: 'router.publishMapManage' + } + }, + { // 发布历史 + path: 'map/detail', + hidden: true, + component: PublishMapDetail + }, + { // 产品状态 + path: 'product', + component: ProductStatus, + meta: { + i18n: 'router.productStateManage' + } + }, + { // 发布课程 + path: 'lesson', + component: PublishLesson, + meta: { + i18n: 'router.publishLessonManage' + } + }, + { // 模板运行图 + path: 'runPlan/template', + component: RunPlanTemplate, + meta: { + i18n: 'router.runPlanTemplateManage' + } + }, + { // 加载运行图管理 + path: 'runPlan/common', + component: RunPlanCommon, + meta: { + i18n: 'router.runPlanCommonManage' + } + }, + { // 新增加载运行图 + path: 'runPlan/common/:mode', + component: RunPlanCommonDraft, + hidden: true + }, + { // 运行图预览 + path: 'runPlan/view/:mode', + component: RunplanView, + hidden: true + }, + { // 每日运行图 + path: 'runPlan/everyDay', + component: RunPlanEveryDay, + meta: { + i18n: 'router.runPlanEveryDayManage' + } + }, + { // 考试规则列表 + path: 'examRule/manage', + component: PublishExamRule, + meta: { + i18n: 'router.examRuleManage' + } + }, + { + path: 'examRule/draft/:mode/:ruleId/:lessonId', + component: PublishExamRuleDraft, + hidden: true + } + ] + }, + { // 订单权限管理 + path: '/orderauthor', + component: Layout, + meta: { + i18n: 'router.orderAuthorityManage', + roles: [admin, userDesign] + }, + children: [ + { + path: 'author/manage', + component: Author, + meta: { + i18n: 'router.authorityManage' + } + }, + { + path: 'commodity/manage', + component: Commodity, + meta: { + i18n: 'router.commodityManage' + } + }, + { + path: 'order/manage', + component: OrderList, + meta: { + i18n: 'router.orderManage' + } + }, + { + path: 'transfer/manage', + component: Permission, + meta: { + i18n: 'router.authorityTransferManage' + } + }, + { + path: 'rules/manage', + component: UserRules, + meta: { + i18n: 'router.userRulesManage' + } + }, + { + path: 'rules/manage/detail/:id', + hidden: true, + component: UserRulesDetail, + meta: { + i18n: 'router.userRulesManage' + } + }, + { + path: 'commodity/draft/:mode/:commodityId', + hidden: true, + component: CommodityDraft, + meta: { + i18n: 'router.addCommodity' + } + }, + { + path: 'order/draft/:mode/:orderId', + hidden: true, + component: OrderDraft, + meta: { + i18n: 'router.addOrder' + } + }, + { + path: 'author/manage/rules', + hidden: true, + component: AuthorDraft, + meta: { + i18n: 'router.addCoursePermissions' + } + }, + { + path: 'transfer/detail/:permissionId', + component: PermissionDetail, + hidden: true + }, + { + path: 'transfer/package', + component: PermissionDraft, + hidden: true + }, + { + path: 'transfer/create', + component: PermissionCreate, + hidden: true + } + ] + }, + { // 系统管理 + path: '/system', + component: Layout, + meta: { + i18n: 'router.systemManage', + roles: [admin, userDesign] + }, + children: [ + { + path: 'ibp/edit', + component: IbpDraw, + meta: { + i18n: 'router.ibpDraw' + } + }, + { + path: 'dictionary', + component: Dictionary, + meta: { + i18n: 'router.dataDictionary' + } + }, + { + path: 'dictionary/detail', + hidden: true, + component: DictionaryDetail, + meta: { + i18n: 'router.dataDictionaryDetails' + } + }, + { + // 用户管理 + path: 'userManage', + component: UserControl, + meta: { + i18n: 'router.userManage' + } + }, + { + // 缓存管理 + path: 'cache', + component: CacheControl, + meta: { + i18n: 'router.cacheManage' + } + }, + { + path: 'userTrainingManage', + component: UserTraining, + meta: { + i18n: 'router.userTrainingManage' + } + }, + { + path: 'userExamManage', + component: UserExam, + meta: { + i18n: 'router.userExamManage' + } + }, + { + path: 'userSimulationManage', + component: UserSimulation, + meta: { + i18n: 'router.userSimulationManage' + } + }, + { + path: 'existingSimulation', + component: ExistingSimulation, + meta: { + i18n: 'router.existingSimulation' + } + }, + { + // 子系统生成 + path: 'systemGenerate', + component: SystemGenerate, + meta: { + i18n: 'router.subsystemGeneration' + } + }, + { + // 产品编辑 + path: 'product', + component: MapProduct, + meta: { + i18n: 'router.productEdit' + } + }, + { + path: 'news', + component: News, + meta: { + i18n: 'router.newsBulletin' + } + } + ] + }, + { // 发布申请 + path: '/apply', + component: Layout, + meta: { + i18n: 'router.releaseApplication', + roles: [admin, userDesign] + }, + children: [ + { + path: 'lesson', + component: LessonApproval, + meta: { + i18n: 'router.courseApplication' + } + }, + { + path: 'script', + component: ScriptApproval, + meta: { + i18n: 'router.scriptReleaseApplication' + } + }, + { + path: 'runGraph', + component: RunPlanApproval, + meta: { + i18n: 'router.runGraphReleaseApplication' + } + } + ] + } ]; const createRouter = () => new Router({ - mode: 'history', // require service support - scrollBehavior: () => ({ y: 0 }), - routes: constantRoutes + mode: 'history', // require service support + scrollBehavior: () => ({ y: 0 }), + routes: constantRoutes }); const router = createRouter(); router.beforeEach((to, from, next) => { - const name = to.fullPath; - if (name.includes('/dp/') || name.includes('display/dp')) { - document.title = '琏课堂-大屏系统'; - } else if (name.includes('/plan/') || name.includes('/planEdit/')) { - document.title = '琏计划'; - } else { - document.title = '琏课堂'; - } - next(); + const project = getSessionStorage('project'); + document.title = loginTitle[project || 'login']; + next(); }); export default router; diff --git a/src/scripts/ConstConfig.js b/src/scripts/ConstConfig.js index 16d1ae6f5..14822f5ae 100644 --- a/src/scripts/ConstConfig.js +++ b/src/scripts/ConstConfig.js @@ -1,103 +1,122 @@ export default { - ConstSelect: { - Status: [ - { label: '无效', value: '0' }, - { label: '有效', value: '1' } - ], + ConstSelect: { + Status: [ + { label: '无效', value: '0' }, + { label: '有效', value: '1' } + ], - Whether: [ - { label: '否', value: false }, - { label: '是', value: true } - ], + Whether: [ + { label: '否', value: false }, + { label: '是', value: true } + ], - LinkTypeList: [ - { label: '起始Link', value: '0' }, - { label: '正向Link', value: '1' }, - { label: '侧向Link', value: '2' } - ], + LinkTypeList: [ + { label: '起始Link', value: '0' }, + { label: '正向Link', value: '1' }, + { label: '侧向Link', value: '2' } + ], - LinkDriectTypeList: [ - { label: '左侧', value: 'L' }, - { label: '右侧', value: 'R' } - ], + LinkDriectTypeList: [ + { label: '左侧', value: 'L' }, + { label: '右侧', value: 'R' } + ], - DirectionCodeList: [ - { value: '2', label: '上行' }, - { value: '1', label: '下行' } - ], + DirectionCodeList: [ + { value: '2', label: '上行' }, + { value: '1', label: '下行' } + ], - SignalLeftOrRightList: [ - { label: '左侧', value: '0' }, - { label: '右侧', value: '1' } - ], + SignalLeftOrRightList: [ + { label: '左侧', value: '0' }, + { label: '右侧', value: '1' } + ], - roleList: [ - { label: '实训用户', value: '01' }, - { label: '地图生产者', value: '02' }, - { label: '课程生成者', value: '03' }, - { label: '系统管理员', value: '04' }, - { label: '超级管理员', value: '05' }, - { label: '销售用户', value: '06' } - ], + roleList: [ + { label: '实训用户', value: '01' }, + { label: '地图生产者', value: '02' }, + { label: '课程生成者', value: '03' }, + { label: '系统管理员', value: '04' }, + { label: '超级管理员', value: '05' }, + { label: '销售用户', value: '06' } + ], - examResultList: [ - { label: '未计算', value: '01' }, - { label: '通过', value: '02' }, - { label: '未通过', value: '03' }, - { label: '已放弃', value: '04' } - ], + examResultList: [ + { label: '未计算', value: '01' }, + { label: '通过', value: '02' }, + { label: '未通过', value: '03' }, + { label: '已放弃', value: '04' } + ], - PermissionUseList: [ - { label: '公用', value: true }, - { label: '专用', value: false } - ], + PermissionUseList: [ + { label: '公用', value: true }, + { label: '专用', value: false } + ], - RegionTypeList: [ - { label: '零点西上行', value: '01' }, - { label: '零点西下行', value: '02' }, - { label: '零西渡线/', value: '03' }, - { label: '零西渡线\\', value: '04' }, - { label: 'PGY一联段线', value: '05' }, - { label: '零点东上行', value: '06' }, - { label: '零点东下行', value: '07' }, - { label: '零东渡线/', value: '08' }, - { label: '零东渡线\\', value: '09' }, - { label: '库线1', value: '10' }, - { label: '库线2', value: '11' }, - { label: '库线渡线/', value: '12' }, - { label: '库线渡线\\', value: '13' }, - { label: '联络线1', value: '14' }, - { label: '联络线2', value: '15' }, - { label: 'SHZ一联段线', value: '16' }, - { label: 'SHZ二联段线', value: '17' }, - { label: 'SHD三联段线', value: '18' }, - { label: 'SHD四联段线', value: '19' } - ], - roleType: [ - {label: '管理员', value: 'Admin', enLabel: 'Admin '}, - {label: '教员', value: 'Instructor', enLabel: 'Instructor '}, - {label: '行调', value: 'Dispatcher', enLabel: 'Dispatcher '}, - {label: '行值', value: 'Attendant', enLabel: 'Attendant '}, - {label: '观众', value: 'Audience', enLabel: 'Audience '}, - {label: '司机', value: 'Driver', enLabel: 'Driver '}, - {label: '通号', value: 'Repair', enLabel: 'Repair '} - ], + PermissionUseListEn: [ + { label: 'Public', value: true }, + { label: 'Private', value: false } + ], - SimulationType: [ - { label: '实训', value: 'Training'}, - { label: '仿真(行调/现地/司机)', value: 'Simulation'}, - { label: '综合演练', value: 'Joint'}, - { label: '大屏', value: 'BigScreen'}, - { label: '琏计划', value: 'RunPlan'}, - { label: '剧本录制', value: 'ScriptWrite'} - ], + RegionTypeList: [ + { label: '零点西上行', value: '01' }, + { label: '零点西下行', value: '02' }, + { label: '零西渡线/', value: '03' }, + { label: '零西渡线\\', value: '04' }, + { label: 'PGY一联段线', value: '05' }, + { label: '零点东上行', value: '06' }, + { label: '零点东下行', value: '07' }, + { label: '零东渡线/', value: '08' }, + { label: '零东渡线\\', value: '09' }, + { label: '库线1', value: '10' }, + { label: '库线2', value: '11' }, + { label: '库线渡线/', value: '12' }, + { label: '库线渡线\\', value: '13' }, + { label: '联络线1', value: '14' }, + { label: '联络线2', value: '15' }, + { label: 'SHZ一联段线', value: '16' }, + { label: 'SHZ二联段线', value: '17' }, + { label: 'SHD三联段线', value: '18' }, + { label: 'SHD四联段线', value: '19' } + ], + roleType: [ + {label: '管理员', value: 'Admin', enLabel: 'Admin '}, + {label: '教员', value: 'Instructor', enLabel: 'Instructor '}, + {label: '行调', value: 'Dispatcher', enLabel: 'Dispatcher '}, + {label: '行值', value: 'Attendant', enLabel: 'Attendant '}, + {label: '观众', value: 'Audience', enLabel: 'Audience '}, + {label: '司机', value: 'Driver', enLabel: 'Driver '}, + {label: '通号', value: 'Repair', enLabel: 'Repairman '} + ], - skinCode: [ - { label: '福州一号线', value: '02'}, - { label: '北京一号线', value: '03'}, - { label: '成都三号线', value: '04'}, - { label: '北京八通线', value: '05'} - ] + SimulationType: [ + { label: '实训', value: 'Training'}, + { label: '仿真(行调/现地/司机)', value: 'Simulation'}, + { label: '综合演练', value: 'Joint'}, + { label: '大屏', value: 'BigScreen'}, + { label: '琏计划', value: 'RunPlan'}, + { label: '剧本录制', value: 'ScriptWrite'} + ], - } + skinCode: [ + { label: '福州一号线', value: '02'}, + { label: '北京一号线', value: '03'}, + { label: '成都三号线', value: '04'}, + { label: '北京八通线', value: '05'} + ], + releaseReview: [ + { enlabel: 'Unpublished', label: '未发布', value: '0'}, + { enlabel: 'Pending review', label: '待审核', value: '1'}, + { enlabel: 'Successfully released', label: '发布成功', value: '2'}, + { enlabel: 'Overrule', label: '被驳回', value: '3'} + ], + productType: [ + { enlabel: 'Lesson System', label: '教学系统', value: 'Lesson'}, + { enlabel: 'Exam System', label: '考试系统', value: 'Exam'}, + { enlabel: 'Simulation System', label: '仿真系统', value: 'Simulation'}, + { enlabel: 'Plan Draw', label: '运行图编制', value: 'Plan'} + ], + customeredProductType: [ + { enlabel: 'Plan Draw', label: '运行图编制', value: 'Plan'} + ] + } }; diff --git a/src/scripts/ConstDic.js b/src/scripts/ConstDic.js index f6b51cc68..e383f41a6 100644 --- a/src/scripts/ConstDic.js +++ b/src/scripts/ConstDic.js @@ -1,69 +1,78 @@ +/** + * 真实设备类型 + */ +export const RealDeviceType = { + Section: '区段', + Switch: '道岔', + Signal: '信号机', + ScreenDoor: '屏蔽门' +}; /** * 权限类型 */ export const PermissionType = { - LESSON: '01', - EXAM: '02', - SIMULATION: '03', - SCREEN: '04', - PLAN: '05', - REPLAY: '06' + LESSON: '01', + EXAM: '02', + SIMULATION: '03', + SCREEN: '04', + PLAN: '05', + REPLAY: '06' }; /** * 地图视图 */ export const ViewMode = { - LOGIC: '01', - PHYSICAL: '02', - MIX: '03' + LOGIC: '01', + PHYSICAL: '02', + MIX: '03' }; /** * 实训模式 */ export const TrainingMode = { - MAP_EDIT: '00', - EDIT: '01', - TEACH: '02', - PRACTICE: '03', - TEST: '04', - EXAM: '05', - NORMAL: '06' + MAP_EDIT: '00', + EDIT: '01', + TEACH: '02', + PRACTICE: '03', + TEST: '04', + EXAM: '05', + NORMAL: '06' }; /** * 教练/正常 */ export const OperateMode = { - ADMIN: '00', - NORMAL: '01', - FAULT: '02' + ADMIN: '00', + NORMAL: '01', + FAULT: '02' }; /** * 分发、转赠 */ export const OperatorModel = { - DISTRIBUTE: '01', - TRANSFER: '02' + DISTRIBUTE: '01', + TRANSFER: '02' }; /** * 地图设备类型 */ export const MapDeviceType = { - Link: { type: '01', label: 'Link' }, - Switch: { type: '02', label: '道岔' }, - Section: { type: '03', label: '区段' }, - Signal: { type: '04', label: '信号机' }, - StationControl: { type: '05', label: '控制模式' }, - StationStand: { type: '06', label: '站台' }, - Train: { type: '07', label: '列车' }, - Station: { type: '08', label: '车站' }, - TrainWindow: { type: '09', label: '车次窗' }, - LimitControl: { type: '10', label: '限速' }, - MixinCommand: { type: '11', label: '混合命令' } + Link: { type: '01', label: 'Link' }, + Switch: { type: '02', label: '道岔' }, + Section: { type: '03', label: '区段' }, + Signal: { type: '04', label: '信号机' }, + StationControl: { type: '05', label: '控制模式' }, + StationStand: { type: '06', label: '站台' }, + Train: { type: '07', label: '列车' }, + Station: { type: '08', label: '车站' }, + TrainWindow: { type: '09', label: '车次窗' }, + LimitControl: { type: '10', label: '限速' }, + MixinCommand: { type: '11', label: '混合命令' } }; @@ -72,38 +81,38 @@ export const MapDeviceType = { * @param {*} code */ export function getDeviceTypeByDic(code) { - for (var field in MapDeviceType) { - if (code === MapDeviceType[field].type) { - return field; - } - } - return null; + for (var field in MapDeviceType) { + if (code === MapDeviceType[field].type) { + return field; + } + } + return null; } /** * 菜单编号 */ export const DeviceMenu = { - Cancel: '00', - Link: '01', - Switch: '02', - Section: '03', - Signal: '04', - StationControl: '05', - StationStand: '06', - Train: '07', - Station: '08', - TrainWindow: '09', - LimitControl: '10', + Cancel: '00', + Link: '01', + Switch: '02', + Section: '03', + Signal: '04', + StationControl: '05', + StationStand: '06', + Train: '07', + Station: '08', + TrainWindow: '09', + LimitControl: '10', - Map: '100', - PrdCategory: '101', - Training: '102', - Lesson: '103', - RunPlan: '104', - JointRoom: '105', - SetDriver: '106', - Script: '107' + Map: '100', + PrdCategory: '101', + Training: '102', + Lesson: '103', + RunPlan: '104', + JointRoom: '105', + SetDriver: '106', + Script: '107' }; /** @@ -111,2004 +120,2008 @@ export const DeviceMenu = { * @param {*} type */ export function getDeviceMenuByDeviceType(type) { - for (var item in DeviceMenu) { - if (item == type) { - return DeviceMenu[item]; - } - } - return null; + for (var item in DeviceMenu) { + if (item == type) { + return DeviceMenu[item]; + } + } + return null; } /** * 操作事件类型 */ export const OperationEvent = { - // 直接指令 - Command: { - // 取消操作 - cancel: { - menu: { - operation: '000', - domId: '_Tips-Cancel-Menu' - } - }, - // 关闭对话框 - close: { - menu: { - operation: '001', - domId: '_Tips-Close-Menu' - }, - password: { - operation: '0011', - domId: '_Tips-Close-Password' - }, - confirm: { - operation: '0012', - domId: '_Tips-Close-Confirm' - }, - alarm: { - operation: '0013', - domId: '_Tips-Close-Alarm' - }, - notice: { - operation: '0014', - domId: '_Tips-Close-Notice' - } - }, - // 菜单 - mBar: { - /** 系统 */ - system: { - operation: '002', - domId: '_Tips-Mbar-0-System' - }, - /** 查看 */ - check: { - operation: '0021', - domId: '_Tips-Mbar-0-Check' - }, - /** 刷新 */ - fresh: { - operation: '0022', - domId: '_Tips-Mbar-0-Fresh' - }, - /** 显示 */ - view: { - operation: '0023', - domId: '_Tips-Mbar-0-View' - }, - /** 控制模式菜单 */ - remoteControl: { - operation: '0024', - domId: '_Tips-Mbar-0-StationControl' - }, - /** 请求区域 */ - requestZone: { - operation: '0025', - domId: '_Tips-Mbar-0-StationControl' - }, - /** 历史查询 */ - historyQuery: { - operation: '0026', - domId: '_Tips-Mbar-0-HistoryQuery' - }, - /** 用户管理 */ - userManage: { - operation: '0027', - domId: '_Tips-Mbar-0-UserManage' - }, - /** 帮助 */ - help: { - operation: '0028', - domId: '_Tips-Mbar-0-Help' - }, - /** 计划车操作 */ - planTrain: { - operation: '0029', - domId: '_Tips-Mbar-0-PlanTrain' - }, - /** 扣车*/ - detainControl: { - operation: '00291', - domId: '_Tips-Mbar-0-detainControl' - } - }, - // 前端视图指令 - view: { - /** 设置列车识别号显示*/ - setTrainIdDisplay: { - operation: '003', - domId: '_Tips-View-SetTrainIdDisplay' - }, - /** 设置名称显示*/ - setNameDisplay: { - operation: '0031', - domId: '_Tips-View-SetNameDisplay' - }, - /** 设置设备显示*/ - setDeviceDisplay: { - operation: '0032', - domId: '_Tips-View-SetDeviceDisplay' - }, - setSection: { - operation: '0033', - domId: '_Tips-View-SetSection' - }, - setSwitch: { - operation: '0034', - domId: '_Tips-View-SetSwitch' - }, - setSignal: { - operation: '0035', - domId: '_Tips-View-SetSignal' - }, - setTrainN: { - operation: '0036', - domId: '_Tips-View-SetTrainN' - }, - setTrainB: { - operation: '0037', - domId: '_Tips-View-SetTrainB' - }, - amplification: { - operation: '0038', - domId: '_Tips-View-Amplification' - }, - dpShowTrainN: { - operation: '0039', - domId: '_Tips-View-DpShowTrainN' - } - }, - // 计划车指令 - planTrain: { - /** 添加计划车*/ - addPlanTrain: { - operation: '004', - domId: '_Tips-PlanTrain-AddPlanTrain' - }, - /** 平移计划车*/ - translatPlanTrain: { - operation: '0041', - domId: '_Tips-PlanTrain-TranslatPlanTrain' - }, - /** 删除计划车*/ - delPlanTrain: { - operation: '0042', - domId: '_Tips-PlanTrain-DelPlanTrain' - } - }, - // 管理指令 - manage: { - /** 用户管理*/ - userManage: { - operation: '005', - domId: '_Tips-Manage-UserManage' - }, - /** 添加用户*/ - addUser: { - operation: '0051', - domId: '_Tips-Manage-AddUser' - }, - /** 修改用户*/ - editUser: { - operation: '0052', - domId: '_Tips-Manage-EditUser' - }, - /** 删除用户*/ - delUser: { - operation: '0053', - domId: '_Tips-Manage-DelUser' - }, - /** 选择用户*/ - chooseUser: { - operation: '0054', - domId: '_Tips-Manage-ChooseUser' - }, - /** 刷新用户*/ - freshUser: { - operation: '0055', - domId: '_Tips-Manage-FreshUser' - } - }, - // 帮助 - help: { - about: { - operation: '006', - domId: '_Tips-Help-About' - } - }, - // 无设备关联的指令 - order: { - choose: { - operation: '007', - domId: '_Tips-Order-Choose' - }, - choose1: { - operation: '0071', - domId: '_Tips-Order-Choose1' - } - } - }, + // 直接指令 + Command: { + // 取消操作 + cancel: { + menu: { + operation: '000', + domId: '_Tips-Cancel-Menu' + }, + clearMbm: { + operation: '00012', + domId: '_Tips-mbm_clear{TOP}' + } + }, + // 关闭对话框 + close: { + menu: { + operation: '001', + domId: '_Tips-Close-Menu' + }, + password: { + operation: '0011', + domId: '_Tips-Close-Password' + }, + confirm: { + operation: '0012', + domId: '_Tips-Close-Confirm' + }, + alarm: { + operation: '0013', + domId: '_Tips-Close-Alarm' + }, + notice: { + operation: '0014', + domId: '_Tips-Close-Notice' + } + }, + // 菜单 + mBar: { + /** 系统 */ + system: { + operation: '002', + domId: '_Tips-Mbar-0-System' + }, + /** 查看 */ + check: { + operation: '0021', + domId: '_Tips-Mbar-0-Check' + }, + /** 刷新 */ + fresh: { + operation: '0022', + domId: '_Tips-Mbar-0-Fresh' + }, + /** 显示 */ + view: { + operation: '0023', + domId: '_Tips-Mbar-0-View' + }, + /** 控制模式菜单 */ + remoteControl: { + operation: '0024', + domId: '_Tips-Mbar-0-StationControl' + }, + /** 请求区域 */ + requestZone: { + operation: '0025', + domId: '_Tips-Mbar-0-StationControl' + }, + /** 历史查询 */ + historyQuery: { + operation: '0026', + domId: '_Tips-Mbar-0-HistoryQuery' + }, + /** 用户管理 */ + userManage: { + operation: '0027', + domId: '_Tips-Mbar-0-UserManage' + }, + /** 帮助 */ + help: { + operation: '0028', + domId: '_Tips-Mbar-0-Help' + }, + /** 计划车操作 */ + planTrain: { + operation: '0029', + domId: '_Tips-Mbar-0-PlanTrain' + }, + /** 扣车*/ + detainControl: { + operation: '00291', + domId: '_Tips-Mbar-0-detainControl' + } + }, + // 前端视图指令 + view: { + /** 设置列车识别号显示*/ + setTrainIdDisplay: { + operation: '003', + domId: '_Tips-View-SetTrainIdDisplay' + }, + /** 设置名称显示*/ + setNameDisplay: { + operation: '0031', + domId: '_Tips-View-SetNameDisplay' + }, + /** 设置设备显示*/ + setDeviceDisplay: { + operation: '0032', + domId: '_Tips-View-SetDeviceDisplay' + }, + setSection: { + operation: '0033', + domId: '_Tips-View-SetSection' + }, + setSwitch: { + operation: '0034', + domId: '_Tips-View-SetSwitch' + }, + setSignal: { + operation: '0035', + domId: '_Tips-View-SetSignal' + }, + setTrainN: { + operation: '0036', + domId: '_Tips-View-SetTrainN' + }, + setTrainB: { + operation: '0037', + domId: '_Tips-View-SetTrainB' + }, + amplification: { + operation: '0038', + domId: '_Tips-View-Amplification' + }, + dpShowTrainN: { + operation: '0039', + domId: '_Tips-View-DpShowTrainN' + } + }, + // 计划车指令 + planTrain: { + /** 添加计划车*/ + addPlanTrain: { + operation: '004', + domId: '_Tips-PlanTrain-AddPlanTrain' + }, + /** 平移计划车*/ + translatPlanTrain: { + operation: '0041', + domId: '_Tips-PlanTrain-TranslatPlanTrain' + }, + /** 删除计划车*/ + delPlanTrain: { + operation: '0042', + domId: '_Tips-PlanTrain-DelPlanTrain' + } + }, + // 管理指令 + manage: { + /** 用户管理*/ + userManage: { + operation: '005', + domId: '_Tips-Manage-UserManage' + }, + /** 添加用户*/ + addUser: { + operation: '0051', + domId: '_Tips-Manage-AddUser' + }, + /** 修改用户*/ + editUser: { + operation: '0052', + domId: '_Tips-Manage-EditUser' + }, + /** 删除用户*/ + delUser: { + operation: '0053', + domId: '_Tips-Manage-DelUser' + }, + /** 选择用户*/ + chooseUser: { + operation: '0054', + domId: '_Tips-Manage-ChooseUser' + }, + /** 刷新用户*/ + freshUser: { + operation: '0055', + domId: '_Tips-Manage-FreshUser' + } + }, + // 帮助 + help: { + about: { + operation: '006', + domId: '_Tips-Help-About' + } + }, + // 无设备关联的指令 + order: { + choose: { + operation: '007', + domId: '_Tips-Order-Choose' + }, + choose1: { + operation: '0071', + domId: '_Tips-Order-Choose1' + } + } + }, - // 道岔操作 - Switch: { - // 取消故障 - cancelStoppage: { - event: '999', - menu: { - operation: '199' - } - }, - // 道岔故障 - stoppage: { - event: '0', - menu: { - operation: '100' - } - }, - // 道岔总定/定位操作 - locate: { - event: '1', - button: { - operation: '1010', - domId: '_Tips-Switch-Locate-Mbm{TOP}' - }, - menu: { - operation: '101', - domId: '_Tips-Switch-Locate-Menu' - } - }, - // 道岔总反/反位操作 - reverse: { - event: '2', - button: { - operation: '1020', - domId: '_Tips-Switch-Reverse-Mbm{TOP}' - }, - menu: { - operation: '102', - domId: '_Tips-Switch-Reverse-Menu' - } - }, - // 道岔单锁 - lock: { - event: '3', - button: { - operation: '1030', - domId: '_Tips-Switch-Lock-Mbm{TOP}' - }, - menu: { - operation: '103', - domId: '_Tips-Switch-Lock-Menu' - } - }, - // 道岔解锁 - unlock: { - event: '4', - button: { - operation: '1040', - domId: '_Tips-Switch-Unlock-Mbm{TOP}' - }, - menu: { - operation: '104', - domId: '_Tips-Switch-Unlock-Menu' - }, - order: { - operation: '1041', - domId: '_Tips-Switch-Unlock-Order' - }, - confirm: { - operation: '1042', - domId: '_Tips-Switch-Unlock-Confirm' - }, - confirm1: { - operation: '1043', - domId: '_Tips-Switch-Unlock-Confirm1' - }, - confirm2: { - operation: '1044', - domId: '_Tips-Switch-Unlock-Confirm2' - }, - stop: { - operation: '1045', - domId: '_Tips-Switch-Unlock-Stop' - } - }, - // 道岔封闭 - block: { - event: '5', - menu: { - operation: '105', - domId: '_Tips-Switch-Block-Menu' - }, - confirm: { - operation: '1051', - domId: '_Tips-Switch-Block-Confirm' - } - }, - // 道岔解封 - unblock: { - event: '6', - menu: { - operation: '106', - domId: '_Tips-Switch-Unblock-menu' - }, - order: { - operation: '1061', - domId: '_Tips-Switch-Unblock-Order' - }, - confirm: { - operation: '1062', - domId: '_Tips-Switch-Unblock-Confirm' - }, - confirm1: { - operation: '1063', - domId: '_Tips-Switch-Unblock-Confirm1' - }, - confirm2: { - operation: '1064', - domId: '_Tips-Switch-Unblock-Confirm2' - }, - stop: { - operation: '1065', - domId: '_Tips-Switch-Unblock-Stop' - } - }, - // 转动 - turnout: { - event: '7', - menu: { - operation: '107', - domId: '_Tips-Switch-Turnout-Menu' - } - }, - // 强制扳动 - turnoutForce: { - event: '8', - menu: { - operation: '108', - domId: '_Tips-Switch-TurnoutForce-Menu' - } - }, - // 道岔故障解锁 - fault: { - event: '9', - menu: { - operation: '109', - domId: '_Tips-Switch-Fault-Menu' - }, - order: { - operation: '1091', - domId: '_Tips-Switch-Fault-Order' - }, - confirm: { - operation: '1092', - domId: '_Tips-Switch-Fault-Confirm' - }, - confirm1: { - operation: '1093', - domId: '_Tips-Switch-Fault-Confirm1' - }, - confirm2: { - operation: '1094', - domId: '_Tips-Switch-Fault-Confirm2' - }, - stop: { - operation: '1095', - domId: '_Tips-Switch-Fault-Stop' - } - }, - // 计轴预复位 - axlePreReset: { - event: '10', - menu: { - operation: '110', - domId: '_Tips-Switch-AxlePreReset-Menu' - }, - order: { - operation: '1101', - domId: '_Tips-Switch-AxlePreReset-Order' - }, - confirm: { - operation: '1102', - domId: '_Tips-Switch-AxlePreReset-Confirm' - }, - confirm1: { - operation: '1103', - domId: '_Tips-Switch-AxlePreReset-Confirm1' - }, - confirm2: { - operation: '1104', - domId: '_Tips-Switch-AxlePreReset-Confirm2' - }, - stop: { - operation: '1105', - domId: '_Tips-Switch-AxlePreReset-Stop' - } - }, - // 切除 - split: { - event: '11', - menu: { - operation: '111', - domId: '_Tips-Switch-Split-Menu' - }, - mbar: { - operation: '1111', - domId: '_Tips-Switch-Split-Mbar' - } - }, - // 激活 - active: { - event: '12', - menu: { - operation: '112', - domId: '_Tips-Switch-Active-Menu' - }, - mbar: { - operation: '1121', - domId: '_Tips-Switch-Active-Mbar' - } - }, - // 设置速度 - setSpeed: { - event: '13', - menu: { - operation: '113', - domId: '_Tips-Switch-SetSpeed-Menu' - }, - order: { - operation: '1131', - domId: '_Tips-Switch-SetSpeed-Order' - }, - confirm: { - operation: '1132', - domId: '_Tips-Switch-SetSpeed-Confirm' - }, - confirm1: { - operation: '1133', - domId: '_Tips-Switch-SetSpeed-Confirm1' - }, - confirm2: { - operation: '1134', - domId: '_Tips-Switch-SetSpeed-Confirm2' - }, - stop: { - operation: '1135', - domId: '_Tips-Switch-SetSpeed-Stop' - }, - choose: { - operation: '1136', - domId: '_Tips-Switch-SetSpeed-Choose' - } - }, - // 取消速度 - cancelSpeed: { - event: { query: '15', confirm: '14' }, - menu: { - operation: '114', - domId: '_Tips-Switch-CancelSpeed-Menu' - }, - order: { - operation: '1141', - domId: '_Tips-Switch-CancelSpeed-Order' - }, - confirm: { - operation: '1142', - domId: '_Tips-Switch-CancelSpeed-Confirm' - }, - confirm1: { - operation: '1143', - domId: '_Tips-Switch-CancelSpeed-Confirm1' - }, - confirm2: { - operation: '1144', - domId: '_Tips-Switch-CancelSpeed-Confirm2' - }, - stop: { - operation: '1145', - domId: '_Tips-Switch-CancelSpeed-Stop' - } - }, - // 查询区段详情 - query: { - event: '15', - menu: { - operation: '115', - domId: '_Tips-Switch-Query-Menu' - } - }, - // 设置限速 - setLimitSpeed: { - event: '16', - menu: { - operation: '116', - domId: '_Tips-Switch-SetSpeed-Menu' - } - }, - // 确认计轴有效 - alxeEffective: { - event: '17', - menu: { - operation: '117', - domId: '_Tips-Switch-Alxe-Effective-Menu' - }, - choose1: { - operation: '1171', - domId: '_Tips-Switch-Alxe-Effective-Choose-1' - }, - choose2: { - operation: '1172', - domId: '_Tips-Switch-Alxe-Effective-Choose-2' - }, - confirm1: { - operation: '1173', - domId: '_Tips-Switch-Alxe-Effective-Confirm-1' - }, - confirm2: { - operation: '1174', - domId: '_Tips-Switch-Alxe-Effective-Confirm-2' - } - }, - // 引导总锁 - guideLock: { - event: '18', - button: { - operation: '1180', - domId: '_Tips-Switch-GuideLock-Button{TOP}' - } - } - }, + // 道岔操作 + Switch: { + // 取消故障 + cancelStoppage: { + event: '999', + menu: { + operation: '199' + } + }, + // 道岔故障 + stoppage: { + event: '0', + menu: { + operation: '100' + } + }, + // 道岔总定/定位操作 + locate: { + event: '1', + button: { + operation: '1010', + domId: '_Tips-Switch-Locate-Mbm{TOP}' + }, + menu: { + operation: '101', + domId: '_Tips-Switch-Locate-Menu' + } + }, + // 道岔总反/反位操作 + reverse: { + event: '2', + button: { + operation: '1020', + domId: '_Tips-Switch-Reverse-Mbm{TOP}' + }, + menu: { + operation: '102', + domId: '_Tips-Switch-Reverse-Menu' + } + }, + // 道岔单锁 + lock: { + event: '3', + button: { + operation: '1030', + domId: '_Tips-Switch-Lock-Mbm{TOP}' + }, + menu: { + operation: '103', + domId: '_Tips-Switch-Lock-Menu' + } + }, + // 道岔解锁 + unlock: { + event: '4', + button: { + operation: '1040', + domId: '_Tips-Switch-Unlock-Mbm{TOP}' + }, + menu: { + operation: '104', + domId: '_Tips-Switch-Unlock-Menu' + }, + order: { + operation: '1041', + domId: '_Tips-Switch-Unlock-Order' + }, + confirm: { + operation: '1042', + domId: '_Tips-Switch-Unlock-Confirm' + }, + confirm1: { + operation: '1043', + domId: '_Tips-Switch-Unlock-Confirm1' + }, + confirm2: { + operation: '1044', + domId: '_Tips-Switch-Unlock-Confirm2' + }, + stop: { + operation: '1045', + domId: '_Tips-Switch-Unlock-Stop' + } + }, + // 道岔封闭 + block: { + event: '5', + menu: { + operation: '105', + domId: '_Tips-Switch-Block-Menu' + }, + confirm: { + operation: '1051', + domId: '_Tips-Switch-Block-Confirm' + } + }, + // 道岔解封 + unblock: { + event: '6', + menu: { + operation: '106', + domId: '_Tips-Switch-Unblock-menu' + }, + order: { + operation: '1061', + domId: '_Tips-Switch-Unblock-Order' + }, + confirm: { + operation: '1062', + domId: '_Tips-Switch-Unblock-Confirm' + }, + confirm1: { + operation: '1063', + domId: '_Tips-Switch-Unblock-Confirm1' + }, + confirm2: { + operation: '1064', + domId: '_Tips-Switch-Unblock-Confirm2' + }, + stop: { + operation: '1065', + domId: '_Tips-Switch-Unblock-Stop' + } + }, + // 转动 + turnout: { + event: '7', + menu: { + operation: '107', + domId: '_Tips-Switch-Turnout-Menu' + } + }, + // 强制扳动 + turnoutForce: { + event: '8', + menu: { + operation: '108', + domId: '_Tips-Switch-TurnoutForce-Menu' + } + }, + // 道岔故障解锁 + fault: { + event: '9', + menu: { + operation: '109', + domId: '_Tips-Switch-Fault-Menu' + }, + order: { + operation: '1091', + domId: '_Tips-Switch-Fault-Order' + }, + confirm: { + operation: '1092', + domId: '_Tips-Switch-Fault-Confirm' + }, + confirm1: { + operation: '1093', + domId: '_Tips-Switch-Fault-Confirm1' + }, + confirm2: { + operation: '1094', + domId: '_Tips-Switch-Fault-Confirm2' + }, + stop: { + operation: '1095', + domId: '_Tips-Switch-Fault-Stop' + } + }, + // 计轴预复位 + axlePreReset: { + event: '10', + menu: { + operation: '110', + domId: '_Tips-Switch-AxlePreReset-Menu' + }, + order: { + operation: '1101', + domId: '_Tips-Switch-AxlePreReset-Order' + }, + confirm: { + operation: '1102', + domId: '_Tips-Switch-AxlePreReset-Confirm' + }, + confirm1: { + operation: '1103', + domId: '_Tips-Switch-AxlePreReset-Confirm1' + }, + confirm2: { + operation: '1104', + domId: '_Tips-Switch-AxlePreReset-Confirm2' + }, + stop: { + operation: '1105', + domId: '_Tips-Switch-AxlePreReset-Stop' + } + }, + // 切除 + split: { + event: '11', + menu: { + operation: '111', + domId: '_Tips-Switch-Split-Menu' + }, + mbar: { + operation: '1111', + domId: '_Tips-Switch-Split-Mbar' + } + }, + // 激活 + active: { + event: '12', + menu: { + operation: '112', + domId: '_Tips-Switch-Active-Menu' + }, + mbar: { + operation: '1121', + domId: '_Tips-Switch-Active-Mbar' + } + }, + // 设置速度 + setSpeed: { + event: '13', + menu: { + operation: '113', + domId: '_Tips-Switch-SetSpeed-Menu' + }, + order: { + operation: '1131', + domId: '_Tips-Switch-SetSpeed-Order' + }, + confirm: { + operation: '1132', + domId: '_Tips-Switch-SetSpeed-Confirm' + }, + confirm1: { + operation: '1133', + domId: '_Tips-Switch-SetSpeed-Confirm1' + }, + confirm2: { + operation: '1134', + domId: '_Tips-Switch-SetSpeed-Confirm2' + }, + stop: { + operation: '1135', + domId: '_Tips-Switch-SetSpeed-Stop' + }, + choose: { + operation: '1136', + domId: '_Tips-Switch-SetSpeed-Choose' + } + }, + // 取消速度 + cancelSpeed: { + event: { query: '15', confirm: '14' }, + menu: { + operation: '114', + domId: '_Tips-Switch-CancelSpeed-Menu' + }, + order: { + operation: '1141', + domId: '_Tips-Switch-CancelSpeed-Order' + }, + confirm: { + operation: '1142', + domId: '_Tips-Switch-CancelSpeed-Confirm' + }, + confirm1: { + operation: '1143', + domId: '_Tips-Switch-CancelSpeed-Confirm1' + }, + confirm2: { + operation: '1144', + domId: '_Tips-Switch-CancelSpeed-Confirm2' + }, + stop: { + operation: '1145', + domId: '_Tips-Switch-CancelSpeed-Stop' + } + }, + // 查询区段详情 + query: { + event: '15', + menu: { + operation: '115', + domId: '_Tips-Switch-Query-Menu' + } + }, + // 设置限速 + setLimitSpeed: { + event: '16', + menu: { + operation: '116', + domId: '_Tips-Switch-SetSpeed-Menu' + } + }, + // 确认计轴有效 + alxeEffective: { + event: '17', + menu: { + operation: '117', + domId: '_Tips-Switch-Alxe-Effective-Menu' + }, + choose1: { + operation: '1171', + domId: '_Tips-Switch-Alxe-Effective-Choose-1' + }, + choose2: { + operation: '1172', + domId: '_Tips-Switch-Alxe-Effective-Choose-2' + }, + confirm1: { + operation: '1173', + domId: '_Tips-Switch-Alxe-Effective-Confirm-1' + }, + confirm2: { + operation: '1174', + domId: '_Tips-Switch-Alxe-Effective-Confirm-2' + } + }, + // 引导总锁 + guideLock: { + event: '18', + button: { + operation: '1180', + domId: '_Tips-Switch-GuideLock-Button{TOP}' + } + } + }, - // 控制模式操作 - StationControl: { - // 取消故障 - cancelStoppage: { - event: '999', - menu: { - operation: '299' - } - }, - // 故障 - stoppage: { - event: '0', - menu: { - operation: '200' - } - }, - // 紧急站控 - emergencyStationControl: { - event: '1', - menu: { - operation: '201', - domId: '_Tips-Control-Emergency-Menu' - }, - mbar: { - operation: '2011', - domId: '_Tips-Control-Emergency-Mbar' - }, - choose: { - operation: '2012', - domId: '_Tips-Control-Emergency-Choose' - }, - confirm: { - operation: '2013', - domId: '_Tips-Control-Emergency-Confirm' - } - }, - // 请求站控 - requestStationControl: { - event: '2', - menu: { - operation: '202', - domId: '_Tips-Control-Request-Menu' - }, - mbar: { - operation: '2021', - domId: '_Tips-Control-Request-Mbar' - }, - choose: { - operation: '2022', - domId: '_Tips-Control-Request-Choose' - }, - confirm: { - operation: '2023', - domId: '_Tips-Control-Request-Confirm' - } - }, - // 强行站控 - forcedStationControl: { - event: '3', - menu: { - operation: '203', - domId: '_Tips-Control-Forced-Menu' - }, - mbar: { - operation: '2031', - domId: '_Tips-Control-Forced-Mbar' - }, - choose: { - operation: '2032', - domId: '_Tips-Control-Forced-Choose' - }, - confirm: { - operation: '2033', - domId: '_Tips-Control-Forced-Confirm' - }, - password: { - operation: '2034', - domId: '_Tips-Control-Forced-Password' - }, - passwordConfirm: { - operation: '2035', - domId: '_Tips-Control-Forced-PasswordConfirm' - } - }, - // 请求中控 - requestCentralControl: { - event: '4', - menu: { - operation: '204', - domId: '_Tips-Control-Central-Menu' - }, - mbar: { - operation: '2041', - domId: '_Tips-Control-Central-Mbar' - }, - choose: { - operation: '2042', - domId: '_Tips-Control-Central-Choose' - }, - confirm: { - operation: '2043', - domId: '_Tips-Control-Central-Confirm' - } - }, - // 控制模式应答同意 - controlResponse: { - event: { centralAgree: '5', centralRefuse: '6', stationAgree: '7', stationRefuse: '8' }, - menu: { - operation: '205', - domId: '_Tips-Control-Response-Menu' - }, - choose: { - operation: '2052', - domId: '_Tips-Control-Response-Choose' - }, - agree: { - operation: '2053', - domId: '_Tips-Control-Response-Agree' - }, - refuse: { - operation: '2054', - domId: '_Tips-Control-Response-Refuse' - } - } - }, + // 控制模式操作 + StationControl: { + // 取消故障 + cancelStoppage: { + event: '999', + menu: { + operation: '299' + } + }, + // 故障 + stoppage: { + event: '0', + menu: { + operation: '200' + } + }, + // 紧急站控 + emergencyStationControl: { + event: '1', + menu: { + operation: '201', + domId: '_Tips-Control-Emergency-Menu' + }, + mbar: { + operation: '2011', + domId: '_Tips-Control-Emergency-Mbar' + }, + choose: { + operation: '2012', + domId: '_Tips-Control-Emergency-Choose' + }, + confirm: { + operation: '2013', + domId: '_Tips-Control-Emergency-Confirm' + } + }, + // 请求站控 + requestStationControl: { + event: '2', + menu: { + operation: '202', + domId: '_Tips-Control-Request-Menu' + }, + mbar: { + operation: '2021', + domId: '_Tips-Control-Request-Mbar' + }, + choose: { + operation: '2022', + domId: '_Tips-Control-Request-Choose' + }, + confirm: { + operation: '2023', + domId: '_Tips-Control-Request-Confirm' + } + }, + // 强行站控 + forcedStationControl: { + event: '3', + menu: { + operation: '203', + domId: '_Tips-Control-Forced-Menu' + }, + mbar: { + operation: '2031', + domId: '_Tips-Control-Forced-Mbar' + }, + choose: { + operation: '2032', + domId: '_Tips-Control-Forced-Choose' + }, + confirm: { + operation: '2033', + domId: '_Tips-Control-Forced-Confirm' + }, + password: { + operation: '2034', + domId: '_Tips-Control-Forced-Password' + }, + passwordConfirm: { + operation: '2035', + domId: '_Tips-Control-Forced-PasswordConfirm' + } + }, + // 请求中控 + requestCentralControl: { + event: '4', + menu: { + operation: '204', + domId: '_Tips-Control-Central-Menu' + }, + mbar: { + operation: '2041', + domId: '_Tips-Control-Central-Mbar' + }, + choose: { + operation: '2042', + domId: '_Tips-Control-Central-Choose' + }, + confirm: { + operation: '2043', + domId: '_Tips-Control-Central-Confirm' + } + }, + // 控制模式应答同意 + controlResponse: { + event: { centralAgree: '5', centralRefuse: '6', stationAgree: '7', stationRefuse: '8' }, + menu: { + operation: '205', + domId: '_Tips-Control-Response-Menu' + }, + choose: { + operation: '2052', + domId: '_Tips-Control-Response-Choose' + }, + agree: { + operation: '2053', + domId: '_Tips-Control-Response-Agree' + }, + refuse: { + operation: '2054', + domId: '_Tips-Control-Response-Refuse' + } + } + }, - // 信号机操作 - Signal: { - // 取消故障 - cancelStoppage: { - event: '999', - menu: { - operation: '399' - } - }, - // 故障 - stoppage: { - event: '0', - menu: { - operation: '300' - } - }, - // 查询进路 - query: { - event: '1' - }, - // 排列进路 - arrangementRoute: { - event: { query: '1', confirm: '2' }, - button: { - operation: '3010', - domId: '_Tips-Signal-ArrangementRoute-Mbm{TOP}' - }, - menu: { - operation: '301', - domId: '_Tips-Signal-ArrangementRoute-Menu' - }, - choose: { - operation: '3011', - domId: '_Tips-Signal-ArrangementRoute-Choose' - }, - confirm: { - operation: '3012', - domId: '_Tips-Signal-ArrangementRoute-Confirm' - } - }, - // 取消进路 - cancelTrainRoute: { - event: '3', - button: { - operation: '3030', - domId: '_Tips-Signal-CancelTrainRoute-Mbm{TOP}' - }, - menu: { - operation: '303', - domId: '_Tips-Signal-CancelTrainRoute-Menu' - }, - confirm: { - operation: '3031', - domId: '_Tips-Signal-CancelTrainRoute-Confirm' - } - }, - // 信号重开 - reopenSignal: { - event: '4', - button: { - operation: '3040', - domId: '_Tips-Signal-Reopen-Mbm' - }, - menu: { - operation: '304', - domId: '_Tips-Signal-Reopen-Menu' - }, - confirm: { - operation: '3041', - domId: '_Tips-Signal-Reopen-Confirm' - } - }, - // 人解列车进路 - humanTrainRoute: { - event: '5', - button: { - operation: '3050', - domId: '_Tips-Signal-HumanTrainRoute-Mbm{TOP}' - }, - menu: { - operation: '305', - domId: '_Tips-Signal-HumanTrainRoute-Menu' - }, - confirm: { - operation: '3051', - domId: '_Tips-Signal-HumanTrainRoute-Confirm' - } - }, - // 封锁 - lock: { - event: '6', - menu: { - operation: '306', - domId: '_Tips-Signal-Lock-Menu' - }, - confirm: { - operation: '3061', - domId: '_Tips-Signal-Lock-Confirm' - } - }, - // 解锁 - unlock: { - event: '7', - menu: { - operation: '307', - domId: '_Tips-Signal-Unlock-Menu' - }, - order: { - operation: '3071', - domId: '_Tips-Signal-Unlock-Order' - }, - confirm: { - operation: '3072', - domId: '_Tips-Signal-Unlock-Confirm' - }, - confirm1: { - operation: '3073', - domId: '_Tips-Signal-Unlock-Confirm1' - }, - confirm2: { - operation: '3074', - domId: '_Tips-Signal-Unlock-Confirm2' - }, - stop: { - operation: '3075', - domId: '_Tips-Signal-Unlock-Stop' - } - }, - // 引导 - guide: { - event: { query: '1', confirm: '8' }, - button: { - operation: '3080', - domId: '_Tips-Signal-Guide-Mbm{TOP}' - }, - menu: { - operation: '308', - domId: '_Tips-Signal-Guide-Menu' - }, - order: { - operation: '3081', - domId: '_Tips-Signal-Guide-Order' - }, - confirm: { - operation: '3082', - domId: '_Tips-Signal-Guide-Confirm' - }, - confirm1: { - operation: '3083', - domId: '_Tips-Signal-Guide-Confirm1' - }, - confirm2: { - operation: '3084', - domId: '_Tips-Signal-Guide-Confirm2' - }, - stop: { - operation: '3085', - domId: '_Tips-Signal-Guide-Stop' - }, - choose: { - operation: '3085', - domId: '_Tips-Signal-Guide-Choose' - } - }, - // 设置联锁自动进路 - setAutoInterlock: { - event: '9', - button: { - operation: '3090', - domId: '_Tips-Signal-SetAutoInterlock-Mbm' - }, - menu: { - operation: '309', - domId: '_Tips-Signal-SetAutoInterlock-Menu' - } - }, - // 取消联锁自动进路 - cancelAutoInterlock: { - event: '10', - menu: { - operation: '310', - domId: '_Tips-Signal-CancelAutoInterlock-Menu' - } - }, - // 设置联锁自动触发 - setAutoTrigger: { - event: '11', - menu: { - operation: '311', - domId: '_Tips-Signal-SetAutoTrigger-Menu' - } - }, - // 取消联锁自动触发 - cancelAutoTrigger: { - event: '12', - menu: { - operation: '312', - domId: '_Tips-Signal-CancelAutoTrigger-Menu' - } - }, - // 信号关灯 - signalClose: { - event: '13', - menu: { - operation: '313', - domId: '_Tips-Signal-SignalClose-Menu' - }, - confirm: { - operation: '3131', - domId: '_Tips-Signal-SignalClose-Confirm' - } - }, - // 进路交人工控 - humanControl: { - event: { query: '1', confirm: '14' }, - button: { - operation: '3140', - domId: '_Tips-Signal-HumanControl-Button{TOP}' - }, - menu: { - operation: '314', - domId: '_Tips-Signal-HumanControl-Menu' - }, - choose: { - operation: '3141', - domId: '_Tips-Signal-HumanControl-Choose' - }, - confirm: { - operation: '3142', - domId: '_Tips-Signal-HumanControl-Confirm' - } - }, - // 进路交自动控 - atsAutoControl: { - event: { query: '1', confirm: '15' }, - button: { - operation: '3150', - domId: '_Tips-Signal-AtsAutoControl-Button{TOP}' - }, - menu: { - operation: '315', - domId: '_Tips-Signal-AtsAutoControl-Menu' - }, - choose: { - operation: '3151', - domId: '_Tips-Signal-AtsAutoControl-Choose' - }, - confirm: { - operation: '3152', - domId: '_Tips-Signal-AtsAutoControls-Confirm' - } - }, - // 查询进路状态 - detail: { - event: { query: '1', confirm: '16' }, - menu: { - operation: '316', - domId: '_Tips-Signal-Detail-Menu' - } - } - }, + // 信号机操作 + Signal: { + // 取消故障 + cancelStoppage: { + event: '999', + menu: { + operation: '399' + } + }, + // 故障 + stoppage: { + event: '0', + menu: { + operation: '300' + } + }, + // 查询进路 + query: { + event: '1' + }, + // 排列进路 + arrangementRoute: { + event: { query: '1', confirm: '2' }, + button: { + operation: '3010', + domId: '_Tips-Signal-ArrangementRoute-Mbm{TOP}' + }, + menu: { + operation: '301', + domId: '_Tips-Signal-ArrangementRoute-Menu' + }, + choose: { + operation: '3011', + domId: '_Tips-Signal-ArrangementRoute-Choose' + }, + confirm: { + operation: '3012', + domId: '_Tips-Signal-ArrangementRoute-Confirm' + } + }, + // 取消进路 + cancelTrainRoute: { + event: '3', + button: { + operation: '3030', + domId: '_Tips-Signal-CancelTrainRoute-Mbm{TOP}' + }, + menu: { + operation: '303', + domId: '_Tips-Signal-CancelTrainRoute-Menu' + }, + confirm: { + operation: '3031', + domId: '_Tips-Signal-CancelTrainRoute-Confirm' + } + }, + // 信号重开 + reopenSignal: { + event: '4', + button: { + operation: '3040', + domId: '_Tips-Signal-Reopen-Mbm' + }, + menu: { + operation: '304', + domId: '_Tips-Signal-Reopen-Menu' + }, + confirm: { + operation: '3041', + domId: '_Tips-Signal-Reopen-Confirm' + } + }, + // 人解列车进路 (总人解) + humanTrainRoute: { + event: '5', + button: { + operation: '3050', + domId: '_Tips-Signal-HumanTrainRoute-Mbm{TOP}' + }, + menu: { + operation: '305', + domId: '_Tips-Signal-HumanTrainRoute-Menu' + }, + confirm: { + operation: '3051', + domId: '_Tips-Signal-HumanTrainRoute-Confirm' + } + }, + // 封锁 + lock: { + event: '6', + menu: { + operation: '306', + domId: '_Tips-Signal-Lock-Menu' + }, + confirm: { + operation: '3061', + domId: '_Tips-Signal-Lock-Confirm' + } + }, + // 解锁 + unlock: { + event: '7', + menu: { + operation: '307', + domId: '_Tips-Signal-Unlock-Menu' + }, + order: { + operation: '3071', + domId: '_Tips-Signal-Unlock-Order' + }, + confirm: { + operation: '3072', + domId: '_Tips-Signal-Unlock-Confirm' + }, + confirm1: { + operation: '3073', + domId: '_Tips-Signal-Unlock-Confirm1' + }, + confirm2: { + operation: '3074', + domId: '_Tips-Signal-Unlock-Confirm2' + }, + stop: { + operation: '3075', + domId: '_Tips-Signal-Unlock-Stop' + } + }, + // 引导 + guide: { + event: { query: '1', confirm: '8' }, + button: { + operation: '3080', + domId: '_Tips-Signal-Guide-Mbm{TOP}' + }, + menu: { + operation: '308', + domId: '_Tips-Signal-Guide-Menu' + }, + order: { + operation: '3081', + domId: '_Tips-Signal-Guide-Order' + }, + confirm: { + operation: '3082', + domId: '_Tips-Signal-Guide-Confirm' + }, + confirm1: { + operation: '3083', + domId: '_Tips-Signal-Guide-Confirm1' + }, + confirm2: { + operation: '3084', + domId: '_Tips-Signal-Guide-Confirm2' + }, + stop: { // 福州线 关闭弹窗操作 + operation: '3085', + domId: '_Tips-Signal-Guide-Stop' + }, + choose: { + operation: '3086', + domId: '_Tips-Signal-Guide-Choose' + } + }, + // 设置联锁自动进路 + setAutoInterlock: { + event: '9', + button: { + operation: '3090', + domId: '_Tips-Signal-SetAutoInterlock-Mbm' + }, + menu: { + operation: '309', + domId: '_Tips-Signal-SetAutoInterlock-Menu' + } + }, + // 取消联锁自动进路 + cancelAutoInterlock: { + event: '10', + menu: { + operation: '310', + domId: '_Tips-Signal-CancelAutoInterlock-Menu' + } + }, + // 设置联锁自动触发 + setAutoTrigger: { + event: '11', + menu: { + operation: '311', + domId: '_Tips-Signal-SetAutoTrigger-Menu' + } + }, + // 取消联锁自动触发 + cancelAutoTrigger: { + event: '12', + menu: { + operation: '312', + domId: '_Tips-Signal-CancelAutoTrigger-Menu' + } + }, + // 信号关灯 + signalClose: { + event: '13', + menu: { + operation: '313', + domId: '_Tips-Signal-SignalClose-Menu' + }, + confirm: { + operation: '3131', + domId: '_Tips-Signal-SignalClose-Confirm' + } + }, + // 进路交人工控 + humanControl: { + event: { query: '1', confirm: '14' }, + button: { + operation: '3140', + domId: '_Tips-Signal-HumanControl-Button{TOP}' + }, + menu: { + operation: '314', + domId: '_Tips-Signal-HumanControl-Menu' + }, + choose: { + operation: '3141', + domId: '_Tips-Signal-HumanControl-Choose' + }, + confirm: { + operation: '3142', + domId: '_Tips-Signal-HumanControl-Confirm' + } + }, + // 进路交自动控 + atsAutoControl: { + event: { query: '1', confirm: '15' }, + button: { + operation: '3150', + domId: '_Tips-Signal-AtsAutoControl-Button{TOP}' + }, + menu: { + operation: '315', + domId: '_Tips-Signal-AtsAutoControl-Menu' + }, + choose: { + operation: '3151', + domId: '_Tips-Signal-AtsAutoControl-Choose' + }, + confirm: { + operation: '3152', + domId: '_Tips-Signal-AtsAutoControls-Confirm' + } + }, + // 查询进路状态 + detail: { + event: { query: '1', confirm: '16' }, + menu: { + operation: '316', + domId: '_Tips-Signal-Detail-Menu' + } + } + }, - // 物理区段操作 - Section: { - // 取消故障 - cancelStoppage: { - event: '999', - menu: { - operation: '499' - } - }, - // 故障 - stoppage: { - event: '0', - menu: { - operation: '400' - } - }, - // 设置计轴失效 - alxeFailure: { - event: '001', - menu: { - operation: '4001' - } - }, + // 物理区段操作 + Section: { + // 取消故障 + cancelStoppage: { + event: '999', + menu: { + operation: '499' + } + }, + // 故障 + stoppage: { + event: '0', + menu: { + operation: '400' + } + }, + // 设置计轴失效 + alxeFailure: { + event: '001', + menu: { + operation: '4001' + } + }, - // 查询区段详情 - query: { - event: '1', - menu: { - operation: '401', - domId: '_Tips-Section-Query-Menu' - } - }, - // 区故解 - fault: { - event: '2', - button: { - operation: '4020', - domId: '_Tips-Section-Fault-Mbm{TOP}' - }, - menu: { - operation: '402', - domId: '_Tips-Section-Fault-Menu' - }, - prepare: { - operation: '4021', - domId: '_Tips-Section-Fault-Prepare' - }, - select: { - operation: '4022', - domId: '_Tips-Section-Fault-Select' - }, - confirm: { - operation: '4023', - domId: '_Tips-Section-Fault-Confirm' - }, - confirm1: { - operation: '4024', - domId: '_Tips-Section-Fault-Confirm1' - }, - confirm2: { - operation: '4025', - domId: '_Tips-Section-Fault-Confirm2' - }, - order: { - operation: '4026', - domId: '_Tips-Section-Fault-Order' - }, - stop: { - operation: '4027', - domId: '_Tips-Section-Fault-Stop' - } - }, - // 封锁 - lock: { - event: '3', - menu: { - operation: '403', - domId: '_Tips-Section-Lock-Menu' - } - }, - // 解锁 - unlock: { - event: '4', - menu: { - operation: '404', - domId: '_Tips-Section-Unlock-Menu' - }, - order: { - operation: '4041', - domId: '_Tips-Section-Unlock-Order' - }, - confirm: { - operation: '4042', - domId: '_Tips-Section-Unlock-Confirm' - }, - confirm1: { - operation: '4043', - domId: '_Tips-Section-Unlock-Confirm1' - }, - confirm2: { - operation: '4044', - domId: '_Tips-Section-Unlock-Confirm2' - }, - stop: { - operation: '4045', - domId: '_Tips-Section-Unlock-Stop' - } - }, - // 切除 - split: { - event: '5', - menu: { - operation: '405', - domId: '_Tips-Section-split-Menu' - }, - mbar: { - operation: '4051', - domId: '_Tips-Section-split-Mbar' - } - }, - // 激活 - active: { - event: '6', - menu: { - operation: '406', - domId: '_Tips-Section-Active-Menu' - }, - mbar: { - operation: '4061', - domId: '_Tips-Section-Active-mbar' - } - }, - // 设置速度 - setSpeed: { - event: '7', - menu: { - operation: '407', - domId: '_Tips-Section-SetSpeed-Menu' - }, - order: { - operation: '4071', - domId: '_Tips-Section-SetSpeed-Order' - }, - confirm: { - operation: '4072', - domId: '_Tips-Section-SetSpeed-Confirm' - }, - confirm1: { - operation: '4073', - domId: '_Tips-Section-SetSpeed-Confirm1' - }, - confirm2: { - operation: '4074', - domId: '_Tips-Section-SetSpeed-Confirm2' - }, - stop: { - operation: '4075', - domId: '_Tips-Section-SetSpeed-Stop' - }, - choose: { - operation: '4076', - domId: '_Tips-Section-SetSpeed-Choose' - } - }, - // 取消速度 - cancelSpeed: { - event: { query: '1', confirm: '8' }, - menu: { - operation: '408', - domId: '_Tips-Section-CancelSpeed-Menu' - }, - order: { - operation: '4081', - domId: '_Tips-Section-CancelSpeed-Order' - }, - confirm: { - operation: '4082', - domId: '_Tips-Section-CancelSpeed-Confirm' - }, - confirm1: { - operation: '4083', - domId: '_Tips-Section-CancelSpeed-Confirm1' - }, - confirm2: { - operation: '4084', - domId: '_Tips-Section-CancelSpeed-Confirm2' - }, - stop: { - operation: '4085', - domId: '_Tips-Section-CancelSpeed-Stop' - } - }, - // 计轴预复位 - axlePreReset: { - event: '9', - button: { - operation: '4090', - domId: '_Tips-Section-AxlePreReset-Mbm' - }, - menu: { - operation: '409', - domId: '_Tips-Section-AxlePreReset-Menu' - }, - order: { - operation: '4091', - domId: '_Tips-Section-AxlePreReset-Order' - }, - confirm: { - operation: '4092', - domId: '_Tips-Section-AxlePreReset-Confirm' - }, - confirm1: { - operation: '4093', - domId: '_Tips-Section-AxlePreReset-Confirm1' - }, - confirm2: { - operation: '4094', - domId: '_Tips-Section-AxlePreReset-Confirm2' - }, - stop: { - operation: '4095', - domId: '_Tips-Section-AxlePreReset-Stop' - } - }, - // 设备状态 - detail: { - event: '10', - menu: { - operation: '410', - domId: '_Tips-Section-detail-Menu' - } - }, - // 新建列车 - newtrain: { - event: '11', - menu: { - operation: '411', - domId: '_Tips-Section-Newtrain-Menu' - } - }, - // 确认计轴有效 - alxeEffective: { - event: '12', - menu: { - operation: '412', - domId: '_Tips-Section-Alxe-Effective-Menu' - }, - choose1: { - operation: '4121', - domId: '_Tips-Section-Alxe-Effective-Choose-1' - }, - choose2: { - operation: '4122', - domId: '_Tips-Section-Alxe-Effective-Choose-2' - }, - confirm1: { - operation: '4123', - domId: '_Tips-Section-Alxe-Effective-Confirm-1' - }, - confirm2: { - operation: '4124', - domId: '_Tips-Section-Alxe-Effective-Confirm-2' - } - }, - // 设置临时限速 - setLimitSpeed: { - event: '13', - menu: { - operation: '413', - domId: '_Tips-Section-SetLimitSpeed-Menu' - }, - openConversation: { - operation: '4131', - domId: '_Tips-Section-SetLimitSpeed-OpenConversation' - }, - closeConversation: { - operation: '4132', - domId: '_Tips-Section-SetLimitSpeed-CloseConversation' - }, - firstLimitSpeed: { - operation: '4133', - domId: '_Tips-Section-SetLimitSpeed-FirstLimitSpeed{TOP}' - }, - firstStartSection: { - operation: '4134', - domId: '_Tips-Section-SetLimitSpeed-FirstStartSection{TOP}' - }, - firstStartvalue: { - operation: '4135', - domId: '_Tips-Section-SetLimitSpeed-FirstStartvalue' - }, - firstEndSection: { - operation: '4136', - domId: '_Tips-Section-SetLimitSpeed-FirstEndSection{TOP}' - }, - firstEndvalue: { - operation: '4137', - domId: '_Tips-Section-SetLimitSpeed-FirstEndvalue' - }, - firstCheck: { - operation: '4138', - domId: '_Tips-Section-SetLimitSpeed-FirstCheck' - }, - firstComfirm: { - operation: '4139', - domId: '_Tips-Section-SetLimitSpeed-FirstComfirm' - }, - secondLimitSpeed: { - operation: '41310', - domId: '_Tips-Section-SetLimitSpeed-SecondLimitSpeed{TOP}' - }, - secondStartSection: { - operation: '41311', - domId: '_Tips-Section-SetLimitSpeed-SecondStartSection{TOP}' - }, - secondStartvalue: { - operation: '41312', - domId: '_Tips-Section-SetLimitSpeed-SecondStartvalue{TOP}' - }, - secondEndSection: { - operation: '41313', - domId: '_Tips-Section-SetLimitSpeed-SecondEndSection{TOP}' - }, - secondEndvalue: { - operation: '41314', - domId: '_Tips-Section-SetLimitSpeed-SecondEndvalue{TOP}' - }, - secondCheck: { - operation: '41315', - domId: '_Tips-Section-SetLimitSpeed-SecondCheck' - }, - secondComfirm: { - operation: '41316', - domId: '_Tips-Section-SetLimitSpeed-SecondComfirm' - }, - domIdClose: { - operation: '41317', - domId: '_Tips-Section-SetLimitSpeed-DomIdClose' - }, - close: { - operation: '41318', - domId: '_Tips-Section-SetLimitSpeed-close' - } - }, - // 确认临时限速 - confirmLimit: { - event: '14', - menu: { - operation: '414', - domId: '_Tips-Section-Confirm-Limit-Menu' - } - } - // 区段详情 - // detail: { - // event: '15', - // menu: { - // operation: '415', - // domId: '_Tips-Section-Detail-Menu' - // } - // } - }, + // 查询区段详情 + query: { + event: '1', + menu: { + operation: '401', + domId: '_Tips-Section-Query-Menu' + } + }, + // 区故解 + fault: { + event: '2', + button: { + operation: '4020', + domId: '_Tips-Section-Fault-Mbm{TOP}' + }, + menu: { + operation: '402', + domId: '_Tips-Section-Fault-Menu' + }, + prepare: { + operation: '4021', + domId: '_Tips-Section-Fault-Prepare' + }, + select: { + operation: '4022', + domId: '_Tips-Section-Fault-Select' + }, + confirm: { + operation: '4023', + domId: '_Tips-Section-Fault-Confirm' + }, + confirm1: { + operation: '4024', + domId: '_Tips-Section-Fault-Confirm1' + }, + confirm2: { + operation: '4025', + domId: '_Tips-Section-Fault-Confirm2' + }, + order: { + operation: '4026', + domId: '_Tips-Section-Fault-Order' + }, + stop: { + operation: '4027', + domId: '_Tips-Section-Fault-Stop' + } + }, + // 封锁 + lock: { + event: '3', + menu: { + operation: '403', + domId: '_Tips-Section-Lock-Menu' + } + }, + // 解锁 + unlock: { + event: '4', + menu: { + operation: '404', + domId: '_Tips-Section-Unlock-Menu' + }, + order: { + operation: '4041', + domId: '_Tips-Section-Unlock-Order' + }, + confirm: { + operation: '4042', + domId: '_Tips-Section-Unlock-Confirm' + }, + confirm1: { + operation: '4043', + domId: '_Tips-Section-Unlock-Confirm1' + }, + confirm2: { + operation: '4044', + domId: '_Tips-Section-Unlock-Confirm2' + }, + stop: { + operation: '4045', + domId: '_Tips-Section-Unlock-Stop' + } + }, + // 切除 + split: { + event: '5', + menu: { + operation: '405', + domId: '_Tips-Section-split-Menu' + }, + mbar: { + operation: '4051', + domId: '_Tips-Section-split-Mbar' + } + }, + // 激活 + active: { + event: '6', + menu: { + operation: '406', + domId: '_Tips-Section-Active-Menu' + }, + mbar: { + operation: '4061', + domId: '_Tips-Section-Active-mbar' + } + }, + // 设置速度 + setSpeed: { + event: '7', + menu: { + operation: '407', + domId: '_Tips-Section-SetSpeed-Menu' + }, + order: { + operation: '4071', + domId: '_Tips-Section-SetSpeed-Order' + }, + confirm: { + operation: '4072', + domId: '_Tips-Section-SetSpeed-Confirm' + }, + confirm1: { + operation: '4073', + domId: '_Tips-Section-SetSpeed-Confirm1' + }, + confirm2: { + operation: '4074', + domId: '_Tips-Section-SetSpeed-Confirm2' + }, + stop: { + operation: '4075', + domId: '_Tips-Section-SetSpeed-Stop' + }, + choose: { + operation: '4076', + domId: '_Tips-Section-SetSpeed-Choose' + } + }, + // 取消速度 + cancelSpeed: { + event: { query: '1', confirm: '8' }, + menu: { + operation: '408', + domId: '_Tips-Section-CancelSpeed-Menu' + }, + order: { + operation: '4081', + domId: '_Tips-Section-CancelSpeed-Order' + }, + confirm: { + operation: '4082', + domId: '_Tips-Section-CancelSpeed-Confirm' + }, + confirm1: { + operation: '4083', + domId: '_Tips-Section-CancelSpeed-Confirm1' + }, + confirm2: { + operation: '4084', + domId: '_Tips-Section-CancelSpeed-Confirm2' + }, + stop: { + operation: '4085', + domId: '_Tips-Section-CancelSpeed-Stop' + } + }, + // 计轴预复位 + axlePreReset: { + event: '9', + button: { + operation: '4090', + domId: '_Tips-Section-AxlePreReset-Mbm' + }, + menu: { + operation: '409', + domId: '_Tips-Section-AxlePreReset-Menu' + }, + order: { + operation: '4091', + domId: '_Tips-Section-AxlePreReset-Order' + }, + confirm: { + operation: '4092', + domId: '_Tips-Section-AxlePreReset-Confirm' + }, + confirm1: { + operation: '4093', + domId: '_Tips-Section-AxlePreReset-Confirm1' + }, + confirm2: { + operation: '4094', + domId: '_Tips-Section-AxlePreReset-Confirm2' + }, + stop: { + operation: '4095', + domId: '_Tips-Section-AxlePreReset-Stop' + } + }, + // 设备状态 + detail: { + event: '10', + menu: { + operation: '410', + domId: '_Tips-Section-detail-Menu' + } + }, + // 新建列车 + newtrain: { + event: '11', + menu: { + operation: '411', + domId: '_Tips-Section-Newtrain-Menu' + } + }, + // 确认计轴有效 + alxeEffective: { + event: '12', + menu: { + operation: '412', + domId: '_Tips-Section-Alxe-Effective-Menu' + }, + choose1: { + operation: '4121', + domId: '_Tips-Section-Alxe-Effective-Choose-1' + }, + choose2: { + operation: '4122', + domId: '_Tips-Section-Alxe-Effective-Choose-2' + }, + confirm1: { + operation: '4123', + domId: '_Tips-Section-Alxe-Effective-Confirm-1' + }, + confirm2: { + operation: '4124', + domId: '_Tips-Section-Alxe-Effective-Confirm-2' + } + }, + // 设置临时限速 + setLimitSpeed: { + event: '13', + menu: { + operation: '413', + domId: '_Tips-Section-SetLimitSpeed-Menu' + }, + openConversation: { + operation: '4131', + domId: '_Tips-Section-SetLimitSpeed-OpenConversation' + }, + closeConversation: { + operation: '4132', + domId: '_Tips-Section-SetLimitSpeed-CloseConversation' + }, + firstLimitSpeed: { + operation: '4133', + domId: '_Tips-Section-SetLimitSpeed-FirstLimitSpeed{TOP}' + }, + firstStartSection: { + operation: '4134', + domId: '_Tips-Section-SetLimitSpeed-FirstStartSection{TOP}' + }, + firstStartvalue: { + operation: '4135', + domId: '_Tips-Section-SetLimitSpeed-FirstStartvalue' + }, + firstEndSection: { + operation: '4136', + domId: '_Tips-Section-SetLimitSpeed-FirstEndSection{TOP}' + }, + firstEndvalue: { + operation: '4137', + domId: '_Tips-Section-SetLimitSpeed-FirstEndvalue' + }, + firstCheck: { + operation: '4138', + domId: '_Tips-Section-SetLimitSpeed-FirstCheck' + }, + firstComfirm: { + operation: '4139', + domId: '_Tips-Section-SetLimitSpeed-FirstComfirm' + }, + secondLimitSpeed: { + operation: '41310', + domId: '_Tips-Section-SetLimitSpeed-SecondLimitSpeed{TOP}' + }, + secondStartSection: { + operation: '41311', + domId: '_Tips-Section-SetLimitSpeed-SecondStartSection{TOP}' + }, + secondStartvalue: { + operation: '41312', + domId: '_Tips-Section-SetLimitSpeed-SecondStartvalue{TOP}' + }, + secondEndSection: { + operation: '41313', + domId: '_Tips-Section-SetLimitSpeed-SecondEndSection{TOP}' + }, + secondEndvalue: { + operation: '41314', + domId: '_Tips-Section-SetLimitSpeed-SecondEndvalue{TOP}' + }, + secondCheck: { + operation: '41315', + domId: '_Tips-Section-SetLimitSpeed-SecondCheck' + }, + secondComfirm: { + operation: '41316', + domId: '_Tips-Section-SetLimitSpeed-SecondComfirm' + }, + domIdClose: { + operation: '41317', + domId: '_Tips-Section-SetLimitSpeed-DomIdClose' + }, + close: { + operation: '41318', + domId: '_Tips-Section-SetLimitSpeed-close' + } + }, + // 确认临时限速 + confirmLimit: { + event: '14', + menu: { + operation: '414', + domId: '_Tips-Section-Confirm-Limit-Menu' + } + } + // 区段详情 + // detail: { + // event: '15', + // menu: { + // operation: '415', + // domId: '_Tips-Section-Detail-Menu' + // } + // } + }, - // 站台 - StationStand: { - // 取消故障 - cancelStoppage: { - event: '999', - menu: { - operation: '599' - } - }, - // 故障 - stoppage: { - event: '0', - menu: { - operation: '500' - } - }, - // 提前发车 - earlyDeparture: { - event: '1', - menu: { - operation: '501', - domId: '_Tips-Stand-EarlyDeparture-Menu' - }, - upSelect: { - operation: '5011', - domId: '_Tips-Stand-EarlyDeparture-upSelect' - }, - downSelect: { - operation: '5012', - domId: '_Tips-Stand-EarlyDeparture-downSelect' - } - }, - // 设置跳停 - setJumpStop: { - event: '2', - menu: { - operation: '502', - domId: '_Tips-Stand-SetJumpStop-Menu' - }, - choose: { - operation: '5021', - domId: '_Tips-Stand-SetJumpStop-Choose' - }, - select: { - operation: '5022', - domId: '_Tips-Stand-SetJumpStop-Select' - }, - selfStationStand: { - operation: '5023', - domId: '_Tips-Stand-SetJumpStop-selfStationStand' - }, - otherStationStand: { - operation: '5024', - domId: '_Tips-Stand-SetJumpStop-otherStationStand' - } - }, - // 取消跳停 - cancelJumpStop: { - event: '3', - menu: { - operation: '503', - domId: '_Tips-Stand-CancelJumpStop-Menu' - }, - choose: { - operation: '5031', - domId: '_Tips-Stand-CancelJumpStop-Choose' - }, - select: { - operation: '5032', - domId: '_Tips-Stand-CancelJumpStop-Select' - }, - selfStationStand: { - operation: '5033', - domId: '_Tips-Stand-CancelJumpStop-selfStationStand' - }, - otherStationStand: { - operation: '5034', - domId: '_Tips-Stand-CancelJumpStop-otherStationStand' - } - }, - // 设置扣车 - setDetainTrain: { - event: '4', - menu: { - operation: '504', - domId: '_Tips-Stand-SetDetainTrain-Menu' - } - }, - // 取消扣车 - cancelDetainTrain: { - event: '5', - menu: { - operation: '505', - domId: '_Tips-Stand-CancelDetainTrain-Menu' - }, - choose: { - operation: '5051', - domId: '_Tips-Stand-cancelDetainTrain-Choose' - } - }, - // 强制取消扣车 - cancelDetainTrainForce: { - event: '6', - menu: { - operation: '506', - domId: '_Tips-Stand-CancelDetainTrainForce-Menu' - } - }, - // 站台详细信息 - detail: { - event: '7', - menu: { - operation: '507', - domId: '_Tips-Stand-Detail-Menu' - } - }, - // 全线取消扣车 - cancelDetainTrainAll: { - event: '8', - menu: { - operation: '508', - domId: '_Tips-Stand-CancelDetainTrainAll-Menu' - }, - choose: { - operation: '5081', - domId: '_Tips-Stand-CancelDetainTrainAll-Choose' - }, - mbar: { - operation: '5082', - domId: '_Tips-Stand-CancelDetainTrainAll-Mbar' - }, - confirm: { - operation: '5083', - domId: '_Tips-Stand-CancelDetainTrainAll-Confirm' - } - }, - // 设置停站时间 - setStopTime: { - event: { query: '7', confirm: '9' }, - menu: { - operation: '509', - domId: '_Tips-Stand-SetStopTime-Menu' - }, - confirm: { - operation: '5091', - domId: '_Tips-Stand-SetStopTime-Confirm' - }, - choose1: { - operation: '5092', - domId: '_Tips-Stand-SetStopTime-Choose-1' - }, - choose2: { - operation: '5093', - domId: '_Tips-Stand-SetStopTime-Choose-2' - }, - input: { - operation: '5094', - domId: '_Tips-Stand-SetStopTime-Input' - } - }, - // 设置运行等级 - setRunLevel: { - event: { query: '7', confirm: '10' }, - menu: { - operation: '510', - domId: '_Tips-Stand-SetRunLevel-Menu' - }, - choose: { - operation: '5101', - domId: '_Tips-Stand-SetRunLevel-Choose' - }, - confirm: { - operation: '5102', - domId: '_Tips-Stand-SetRunLevel-confirm' - }, - check: { - operation: '5103', - domId: '_Tips-Stand-SetRunLevel-check' - }, - chooseLevel: { - operation: '5104', - domId: '_Tips-Stand-SetRunLevel-chooseLevel' - }, - chooseTrain: { - operation: '5105', - domId: '_Tips-Stand-SetRunLevel-chooseTrain' - }, - choose1: { - operation: '5106', - domId: '_Tips-Stand-SetRunLevel-Choose-1' - }, - choose2: { - operation: '5107', - domId: '_Tips-Stand-SetRunLevel-Choose-2' - } - }, - // 设置折返策略 - setBackStrategy: { - event: { query: '7', confirm: '11' }, - menu: { - operation: '511', - domId: '_Tips-Stand-SetBackStrategy-Menu' - }, - choose: { - operation: '5111', - domId: '_Tips-Stand-setBackStrategy-Choose' - }, - confirm: { - operation: '5112', - domId: '_Tips-Stand-setBackStrategy-confirm' - } - }, - // 设置全线扣车 - setDetainTrainAll: { - event: 12, - menu: { - operation: '512', - domId: '_Tips-Stand-SetBackStrategy-Menu' - }, - mbar: { - operation: '5121', - domId: '_Tips-Stand-setDetainTrainAll-Mbar' - }, - confirm: { - operation: '5122', - domId: '_Tips-Stand-setDetainTrainAll-confirm' - } - }, - cancelUpDetainTrainAll: { - event: 13, - menu: { - operation: '513', - domId: '_Tips-Stand-SetBackStrategy-Menu' - }, - mbar: { - operation: '5131', - domId: '_Tips-Stand-clearUpCar-Mbar' - }, - confirm: { - operation: '5132', - domId: '_Tips-Stand-clearUpCar-confirm' - } - }, - cancelDownDetainTrainAll: { - event: 14, - menu: { - operation: '514', - domId: '_Tips-Stand-SetBackStrategy-Menu' - }, - mbar: { - operation: '5141', - domId: '_Tips-Stand-clearDownCar-Mbar' - }, - confirm: { - operation: '5142', - domId: '_Tips-Stand-clearDownCar-confirm' - } - } - }, + // 站台 + StationStand: { + // 取消故障 + cancelStoppage: { + event: '999', + menu: { + operation: '599' + } + }, + // 故障 + stoppage: { + event: '0', + menu: { + operation: '500' + } + }, + // 提前发车 + earlyDeparture: { + event: '1', + menu: { + operation: '501', + domId: '_Tips-Stand-EarlyDeparture-Menu' + }, + upSelect: { + operation: '5011', + domId: '_Tips-Stand-EarlyDeparture-upSelect' + }, + downSelect: { + operation: '5012', + domId: '_Tips-Stand-EarlyDeparture-downSelect' + } + }, + // 设置跳停 + setJumpStop: { + event: '2', + menu: { + operation: '502', + domId: '_Tips-Stand-SetJumpStop-Menu' + }, + choose: { + operation: '5021', + domId: '_Tips-Stand-SetJumpStop-Choose' + }, + select: { + operation: '5022', + domId: '_Tips-Stand-SetJumpStop-Select' + }, + selfStationStand: { + operation: '5023', + domId: '_Tips-Stand-SetJumpStop-selfStationStand' + }, + otherStationStand: { + operation: '5024', + domId: '_Tips-Stand-SetJumpStop-otherStationStand' + } + }, + // 取消跳停 + cancelJumpStop: { + event: '3', + menu: { + operation: '503', + domId: '_Tips-Stand-CancelJumpStop-Menu' + }, + choose: { + operation: '5031', + domId: '_Tips-Stand-CancelJumpStop-Choose' + }, + select: { + operation: '5032', + domId: '_Tips-Stand-CancelJumpStop-Select' + }, + selfStationStand: { + operation: '5033', + domId: '_Tips-Stand-CancelJumpStop-selfStationStand' + }, + otherStationStand: { + operation: '5034', + domId: '_Tips-Stand-CancelJumpStop-otherStationStand' + } + }, + // 设置扣车 + setDetainTrain: { + event: '4', + menu: { + operation: '504', + domId: '_Tips-Stand-SetDetainTrain-Menu' + } + }, + // 取消扣车 + cancelDetainTrain: { + event: '5', + menu: { + operation: '505', + domId: '_Tips-Stand-CancelDetainTrain-Menu' + }, + choose: { + operation: '5051', + domId: '_Tips-Stand-cancelDetainTrain-Choose' + } + }, + // 强制取消扣车 + cancelDetainTrainForce: { + event: '6', + menu: { + operation: '506', + domId: '_Tips-Stand-CancelDetainTrainForce-Menu' + } + }, + // 站台详细信息 + detail: { + event: '7', + menu: { + operation: '507', + domId: '_Tips-Stand-Detail-Menu' + } + }, + // 全线取消扣车 + cancelDetainTrainAll: { + event: '8', + menu: { + operation: '508', + domId: '_Tips-Stand-CancelDetainTrainAll-Menu' + }, + choose: { + operation: '5081', + domId: '_Tips-Stand-CancelDetainTrainAll-Choose' + }, + mbar: { + operation: '5082', + domId: '_Tips-Stand-CancelDetainTrainAll-Mbar' + }, + confirm: { + operation: '5083', + domId: '_Tips-Stand-CancelDetainTrainAll-Confirm' + } + }, + // 设置停站时间 + setStopTime: { + event: { query: '7', confirm: '9' }, + menu: { + operation: '509', + domId: '_Tips-Stand-SetStopTime-Menu' + }, + confirm: { + operation: '5091', + domId: '_Tips-Stand-SetStopTime-Confirm' + }, + choose1: { + operation: '5092', + domId: '_Tips-Stand-SetStopTime-Choose-1' + }, + choose2: { + operation: '5093', + domId: '_Tips-Stand-SetStopTime-Choose-2' + }, + input: { + operation: '5094', + domId: '_Tips-Stand-SetStopTime-Input' + } + }, + // 设置运行等级 + setRunLevel: { + event: { query: '7', confirm: '10' }, + menu: { + operation: '510', + domId: '_Tips-Stand-SetRunLevel-Menu' + }, + choose: { + operation: '5101', + domId: '_Tips-Stand-SetRunLevel-Choose' + }, + confirm: { + operation: '5102', + domId: '_Tips-Stand-SetRunLevel-confirm' + }, + check: { + operation: '5103', + domId: '_Tips-Stand-SetRunLevel-check' + }, + chooseLevel: { + operation: '5104', + domId: '_Tips-Stand-SetRunLevel-chooseLevel' + }, + chooseTrain: { + operation: '5105', + domId: '_Tips-Stand-SetRunLevel-chooseTrain' + }, + choose1: { + operation: '5106', + domId: '_Tips-Stand-SetRunLevel-Choose-1' + }, + choose2: { + operation: '5107', + domId: '_Tips-Stand-SetRunLevel-Choose-2' + } + }, + // 设置折返策略 + setBackStrategy: { + event: { query: '7', confirm: '11' }, + menu: { + operation: '511', + domId: '_Tips-Stand-SetBackStrategy-Menu' + }, + choose: { + operation: '5111', + domId: '_Tips-Stand-setBackStrategy-Choose' + }, + confirm: { + operation: '5112', + domId: '_Tips-Stand-setBackStrategy-confirm' + } + }, + // 设置全线扣车 + setDetainTrainAll: { + event: 12, + menu: { + operation: '512', + domId: '_Tips-Stand-SetBackStrategy-Menu' + }, + mbar: { + operation: '5121', + domId: '_Tips-Stand-setDetainTrainAll-Mbar' + }, + confirm: { + operation: '5122', + domId: '_Tips-Stand-setDetainTrainAll-confirm' + } + }, + cancelUpDetainTrainAll: { + event: 13, + menu: { + operation: '513', + domId: '_Tips-Stand-SetBackStrategy-Menu' + }, + mbar: { + operation: '5131', + domId: '_Tips-Stand-clearUpCar-Mbar' + }, + confirm: { + operation: '5132', + domId: '_Tips-Stand-clearUpCar-confirm' + } + }, + cancelDownDetainTrainAll: { + event: 14, + menu: { + operation: '514', + domId: '_Tips-Stand-SetBackStrategy-Menu' + }, + mbar: { + operation: '5141', + domId: '_Tips-Stand-clearDownCar-Mbar' + }, + confirm: { + operation: '5142', + domId: '_Tips-Stand-clearDownCar-confirm' + } + } + }, - Station: { - // 取消故障 - cancelStoppage: { - event: '999', - menu: { - operation: '699' - } - }, - // 故障 - stoppage: { - event: '0', - menu: { - operation: '600' - } - }, - // 全站设置联锁自动触发 - setAutoTrigger: { - event: '1', - menu: { - operation: '601', - domId: '_Tips-Station-SetAutoTrigger-Menu' - } - }, - // 全站取消联锁自动触发 - cancelAutoTrigger: { - event: '2', - menu: { - operation: '602', - domId: '_Tips-Station-CancelAutoTrigger-Menu' - } - }, - // 上电解锁 - powerUnLock: { - event: '3', - menu: { - operation: '603', - domId: '_Tips-Station-PowerUnLock-Menu' - }, - order: { - operation: '6031', - domId: '_Tips-Station-PowerUnLock-Order' - }, - confirm: { - operation: '6032', - domId: '_Tips-Station-PowerUnLock-Confirm' - }, - confirm1: { - operation: '6033', - domId: '_Tips-Station-PowerUnLock-Confirm1' - }, - confirm2: { - operation: '6034', - domId: '_Tips-Station-PowerUnLock-Confirm2' - }, - stop: { - operation: '6035', - domId: '_Tips-Station-PowerUnLock-Stop' - } - }, - // 执行关键操作测试 - execKeyOperationTest: { - event: '4', - menu: { - operation: '604', - domId: '_Tips-Station-ExecKeyOperationTest-Menu' - }, - order: { - operation: '6041', - domId: '_Tips-Station-ExecKeyOperationTest-Order' - }, - confirm: { - operation: '6042', - domId: '_Tips-Station-ExecKeyOperationTest-Confirm' - }, - confirm1: { - operation: '6043', - domId: '_Tips-Station-ExecKeyOperationTest-Confirm1' - }, - confirm2: { - operation: '6044', - domId: '_Tips-Station-ExecKeyOperationTest-Confirm2' - }, - stop: { - operation: '6045', - domId: '_Tips-Station-ExecKeyOperationTest-Stop' - } - }, - // 所有进路自排关 - humanControlALL: { - event: '5', - menu: { - operation: '605', - domId: '_Tips-Station-HumanControlALL-Menu' - } - }, - // 所有进路自排开 - atsAutoControlALL: { - event: '6', - menu: { - operation: '606', - domId: '_Tips-Station-AtsAutoControlALL-Menu' - } - }, - split: { - event: '7', - mbar: { - operation: '6071', - domId: '_Tips-Stand-Split-Mbar' - }, - choose: { - operation: '6072', - domId: '_Tips-Stand-Split-Mbar' - }, - confirm: { - operation: '6073', - domId: '_Tips-Stand-Split-confirm' - } - }, - active: { - event: '8', - mbar: { - operation: '6081', - domId: '_Tips-Stand-Active-Mbar' - }, - choose: { - operation: '6082', - domId: '_Tips-Stand-Split-Mbar' - }, - confirm: { - operation: '6083', - domId: '_Tips-Stand-Active-confirm' - } - } - }, + Station: { + // 取消故障 + cancelStoppage: { + event: '999', + menu: { + operation: '699' + } + }, + // 故障 + stoppage: { + event: '0', + menu: { + operation: '600' + } + }, + // 全站设置联锁自动触发 + setAutoTrigger: { + event: '1', + menu: { + operation: '601', + domId: '_Tips-Station-SetAutoTrigger-Menu' + } + }, + // 全站取消联锁自动触发 + cancelAutoTrigger: { + event: '2', + menu: { + operation: '602', + domId: '_Tips-Station-CancelAutoTrigger-Menu' + } + }, + // 上电解锁 + powerUnLock: { + event: '3', + menu: { + operation: '603', + domId: '_Tips-Station-PowerUnLock-Menu' + }, + order: { + operation: '6031', + domId: '_Tips-Station-PowerUnLock-Order' + }, + confirm: { + operation: '6032', + domId: '_Tips-Station-PowerUnLock-Confirm' + }, + confirm1: { + operation: '6033', + domId: '_Tips-Station-PowerUnLock-Confirm1' + }, + confirm2: { + operation: '6034', + domId: '_Tips-Station-PowerUnLock-Confirm2' + }, + stop: { + operation: '6035', + domId: '_Tips-Station-PowerUnLock-Stop' + } + }, + // 执行关键操作测试 + execKeyOperationTest: { + event: '4', + menu: { + operation: '604', + domId: '_Tips-Station-ExecKeyOperationTest-Menu' + }, + order: { + operation: '6041', + domId: '_Tips-Station-ExecKeyOperationTest-Order' + }, + confirm: { + operation: '6042', + domId: '_Tips-Station-ExecKeyOperationTest-Confirm' + }, + confirm1: { + operation: '6043', + domId: '_Tips-Station-ExecKeyOperationTest-Confirm1' + }, + confirm2: { + operation: '6044', + domId: '_Tips-Station-ExecKeyOperationTest-Confirm2' + }, + stop: { + operation: '6045', + domId: '_Tips-Station-ExecKeyOperationTest-Stop' + } + }, + // 所有进路自排关 + humanControlALL: { + event: '5', + menu: { + operation: '605', + domId: '_Tips-Station-HumanControlALL-Menu' + } + }, + // 所有进路自排开 + atsAutoControlALL: { + event: '6', + menu: { + operation: '606', + domId: '_Tips-Station-AtsAutoControlALL-Menu' + } + }, + split: { + event: '7', + mbar: { + operation: '6071', + domId: '_Tips-Stand-Split-Mbar' + }, + choose: { + operation: '6072', + domId: '_Tips-Stand-Split-Mbar' + }, + confirm: { + operation: '6073', + domId: '_Tips-Stand-Split-confirm' + } + }, + active: { + event: '8', + mbar: { + operation: '6081', + domId: '_Tips-Stand-Active-Mbar' + }, + choose: { + operation: '6082', + domId: '_Tips-Stand-Split-Mbar' + }, + confirm: { + operation: '6083', + domId: '_Tips-Stand-Active-confirm' + } + } + }, - // 列车 - Train: { - // 取消故障 - cancelStoppage: { - event: '999', - menu: { - operation: '799' - } - }, - // 故障 - stoppage: { - event: '0', - menu: { - operation: '700' - } - }, - // 添加列车识别号 - addTrainId: { - event: '1', - menu: { - operation: '701', - domId: '_Tips-Train-AddTrainId-Menu' - }, - trainNumberChange: { - operation: '7011', - domId: '_Tips-Train-AddTrainId-TrainNumberChange' - }, - trainTypeChange: { - operation: '7012', - domId: '_Tips-Train-AddTrainId-trainTypeChange' - }, - serverNoChange: { - operation: '7013', - domId: '_Tips-Train-AddTrainId-serverNoChange' - }, - trainNoChange: { - operation: '7014', - domId: '_Tips-Train-AddTrainId-trainNoChange' - }, - targetCodeChange: { - operation: '7015', - domId: '_Tips-Train-AddTrainId-targetCodeChange' - }, - confirm: { - operation: '7016', - domId: '_Tips-Train-AddTrainId-Confirm' - }, - input: { - operation: '7017', - domId: '_Tips-Train-AddTrainId-Input' - } - }, - // 修改列车识别号 - editTrainId: { - event: '2', - menu: { - operation: '702', - domId: '_Tips-Train-EditTrainId-Menu' - }, - trainNumberChange: { - operation: '7021', - domId: '_Tips-Train-EditTrainId-TrainNumberChange' - }, - trainTypeChange: { - operation: '7022', - domId: '_Tips-Train-EditTrainId-trainTypeChange' - }, - serverNoChange: { - operation: '7023', - domId: '_Tips-Train-EditTrainId-serverNoChange' - }, - trainNoChange: { - operation: '7024', - domId: '_Tips-Train-EditTrainId-trainNoChange' - }, - targetCodeChange: { - operation: '7025', - domId: '_Tips-Train-EditTrainId-targetCodeChange' - }, - confirm: { - operation: '7026', - domId: '_Tips-Train-EditTrainId-Confirm' - }, - input: { - operation: '7027', - domId: '_Tips-Train-EditTrainId-Input' - } - }, - // 删除列车识别号 - delTrainId: { - event: '3', - menu: { - operation: '703', - domId: '_Tips-Train-DelTrainId-Menu' - }, - trainNumberChange: { - operation: '7031', - domId: '_Tips-Train-DelTrainId-TrainNumberChange' - }, - confirm: { - operation: '7032', - domId: '_Tips-Train-DelTrainId-Confirm' - }, - input: { - operation: '7033', - domId: '_Tips-Train-DelTrainId-Input' - } - }, - // 移动列车识别号 - moveTrainId: { - event: '4', - menu: { - operation: '704', - domId: '_Tips-Train-MoveTrainId-Menu' - }, - confirm: { - operation: '7041', - domId: '_Tips-Train-MoveTrainId-Confirm' - } - }, + // 列车 + Train: { + // 取消故障 + cancelStoppage: { + event: '999', + menu: { + operation: '799' + } + }, + // 故障 + stoppage: { + event: '0', + menu: { + operation: '700' + } + }, + // 添加列车识别号 + addTrainId: { + event: '1', + menu: { + operation: '701', + domId: '_Tips-Train-AddTrainId-Menu' + }, + trainNumberChange: { + operation: '7011', + domId: '_Tips-Train-AddTrainId-TrainNumberChange' + }, + trainTypeChange: { + operation: '7012', + domId: '_Tips-Train-AddTrainId-trainTypeChange' + }, + serverNoChange: { + operation: '7013', + domId: '_Tips-Train-AddTrainId-serverNoChange' + }, + trainNoChange: { + operation: '7014', + domId: '_Tips-Train-AddTrainId-trainNoChange' + }, + targetCodeChange: { + operation: '7015', + domId: '_Tips-Train-AddTrainId-targetCodeChange' + }, + confirm: { + operation: '7016', + domId: '_Tips-Train-AddTrainId-Confirm' + }, + input: { + operation: '7017', + domId: '_Tips-Train-AddTrainId-Input' + } + }, + // 修改列车识别号 + editTrainId: { + event: { query: '9', confirm: '2' }, + menu: { + operation: '702', + domId: '_Tips-Train-EditTrainId-Menu' + }, + trainNumberChange: { + operation: '7021', + domId: '_Tips-Train-EditTrainId-TrainNumberChange' + }, + trainTypeChange: { + operation: '7022', + domId: '_Tips-Train-EditTrainId-trainTypeChange' + }, + serverNoChange: { + operation: '7023', + domId: '_Tips-Train-EditTrainId-serverNoChange' + }, + trainNoChange: { + operation: '7024', + domId: '_Tips-Train-EditTrainId-trainNoChange' + }, + targetCodeChange: { + operation: '7025', + domId: '_Tips-Train-EditTrainId-targetCodeChange' + }, + confirm: { + operation: '7026', + domId: '_Tips-Train-EditTrainId-Confirm' + }, + input: { + operation: '7027', + domId: '_Tips-Train-EditTrainId-Input' + } + }, + // 删除列车识别号 + delTrainId: { + event: '3', + menu: { + operation: '703', + domId: '_Tips-Train-DelTrainId-Menu' + }, + trainNumberChange: { + operation: '7031', + domId: '_Tips-Train-DelTrainId-TrainNumberChange' + }, + confirm: { + operation: '7032', + domId: '_Tips-Train-DelTrainId-Confirm' + }, + input: { + operation: '7033', + domId: '_Tips-Train-DelTrainId-Input' + } + }, + // 移动列车识别号 + moveTrainId: { + event: '4', + menu: { + operation: '704', + domId: '_Tips-Train-MoveTrainId-Menu' + }, + confirm: { + operation: '7041', + domId: '_Tips-Train-MoveTrainId-Confirm' + } + }, - // 交换列车识别号 - switchTrainId: { - event: '5', - menu: { - operation: '705', - domId: '_Tips-Train-SwitchTrainId-Menu' - }, - confirm: { - operation: '7051', - domId: '_Tips-Train-SwitchTrainId-Confirm' - } - }, - // 修改车组号 - editTrainNo: { - event: '6', - menu: { - operation: '706', - domId: '_Tips-Train-DditTrainNo-Menu' - }, - confirm: { - operation: '7061', - domId: '_Tips-Train-DditTrainNo-Confirm' - } - }, - // 限速行驶 - limitSpeed: { - event: '7', - menu: { - operation: '707', - domId: '_Tips-Train-LimitSpeed-Menu' - } - }, - // 设置计划车 - setPlanTrainId: { - event: '8', - menu: { - operation: '708', - domId: '_Tips-Train-SetPlanTrainId-Menu' - }, - confirm: { - operation: '7081', - domId: '_Tips-Train-SetPlanTrainId-Confirm' - }, - trainSource: { - operation: '7082', - domId: '_Tips-Train-SetPlanTrainId-TrainSource' - } - }, - // 添加计划车 - addPlanTrainId: { - event: '9', - menu: { - operation: '709', - domId: '_Tips-Train-addPlanTrainId-Menu' - }, - confirm: { - operation: '7091', - domId: '_Tips-Train-addPlanTrainId-Confirm' - }, - trainSource: { - operation: '7092', - domId: '_Tips-Train-addPlanTrainId-TrainSource' - } - }, - // 平移计划车 - moveEventlyTrainId: { - event: 'a', - menu: { - operation: '70a', - domId: '_Tips-Train-moveEventlyTrainId-Menu' - }, - confirm: { - operation: '70a1', - domId: '_Tips-Train-moveEventlyTrainId-Confirm' - }, - trainSource: { - operation: '70a2', - domId: '_Tips-Train-moveEventlyTrainId-TrainSource' - } - }, - // 删除计划车 - deletePlanTrainId: { - event: 'b', - menu: { - operation: '70b', - domId: '_Tips-Train-deletePlanTrainId-Menu' - }, - confirm: { - operation: '70b1', - domId: '_Tips-Train-deletePlanTrainId-Confirm' - }, - trainSource: { - operation: '70b2', - domId: '_Tips-Train-deletePlanTrainId-TrainSource' - } - }, - // 设目的地车 - destinationTrainId: { - event: 'c', - menu: { - operation: '70c', - domId: '_Tips-Train-destinationTrainId-Menu' - } - }, - // 设人工车 - artificialTrainId: { - event: 'd', - menu: { - operation: '70d', - domId: '_Tips-Train-artificialTrainId-Menu' - } - } + // 交换列车识别号 + switchTrainId: { + event: '5', + menu: { + operation: '705', + domId: '_Tips-Train-SwitchTrainId-Menu' + }, + confirm: { + operation: '7051', + domId: '_Tips-Train-SwitchTrainId-Confirm' + } + }, + // 修改车组号 + editTrainNo: { + event: '6', + menu: { + operation: '706', + domId: '_Tips-Train-DditTrainNo-Menu' + }, + confirm: { + operation: '7061', + domId: '_Tips-Train-DditTrainNo-Confirm' + } + }, + // 限速行驶 + limitSpeed: { + event: '7', + menu: { + operation: '707', + domId: '_Tips-Train-LimitSpeed-Menu' + } + }, + // 设置计划车 + setPlanTrainId: { + event: '8', + menu: { + operation: '708', + domId: '_Tips-Train-SetPlanTrainId-Menu' + }, + confirm: { + operation: '7081', + domId: '_Tips-Train-SetPlanTrainId-Confirm' + }, + trainSource: { + operation: '7082', + domId: '_Tips-Train-SetPlanTrainId-TrainSource' + } + }, + // 添加计划车 + addPlanTrainId: { + event: '9', + menu: { + operation: '709', + domId: '_Tips-Train-addPlanTrainId-Menu' + }, + confirm: { + operation: '7091', + domId: '_Tips-Train-addPlanTrainId-Confirm' + }, + trainSource: { + operation: '7092', + domId: '_Tips-Train-addPlanTrainId-TrainSource' + } + }, + // 平移计划车 + moveEventlyTrainId: { + event: 'a', + menu: { + operation: '70a', + domId: '_Tips-Train-moveEventlyTrainId-Menu' + }, + confirm: { + operation: '70a1', + domId: '_Tips-Train-moveEventlyTrainId-Confirm' + }, + trainSource: { + operation: '70a2', + domId: '_Tips-Train-moveEventlyTrainId-TrainSource' + } + }, + // 删除计划车 + deletePlanTrainId: { + event: 'b', + menu: { + operation: '70b', + domId: '_Tips-Train-deletePlanTrainId-Menu' + }, + confirm: { + operation: '70b1', + domId: '_Tips-Train-deletePlanTrainId-Confirm' + }, + trainSource: { + operation: '70b2', + domId: '_Tips-Train-deletePlanTrainId-TrainSource' + } + }, + // 设目的地车 + destinationTrainId: { + event: 'c', + menu: { + operation: '70c', + domId: '_Tips-Train-destinationTrainId-Menu' + } + }, + // 设人工车 + artificialTrainId: { + event: 'd', + menu: { + operation: '70d', + domId: '_Tips-Train-artificialTrainId-Menu' + } + } - }, + }, - // 取消全线临时限速 - LimitControl: { - CancelAllLimit: { - event: '1', - menu: { - operation: '800', - domId: '_Tips-Cancel-Limit-All-Menu' - }, - openMessage: { - operation: '8001', - domId: '_Tips-Cancel-Limit-open-message-Menu' - }, - closeMessage: { - operation: '8002', - domId: '_Tips-Cancel-Limit-close-message-Menu' - }, - confirm1: { - operation: '8003', - domId: '_Tips-Cancel-Limit-close-confirm1-Menu' - }, - confirm2: { - operation: '8004', - domId: '_Tips-Cancel-Limit-close-confirm2-Menu' - }, - confirm: { - operation: '8005', - domId: '_Tips-Cancel-Limit-confirm-Menu' - }, - close: { - operation: '8006', - domId: '_Tips-Cancel-Limit-close-Menu' - } - } - }, + // 取消全线临时限速 + LimitControl: { + CancelAllLimit: { + event: '1', + menu: { + operation: '800', + domId: '_Tips-Cancel-Limit-All-Menu' + }, + openMessage: { + operation: '8001', + domId: '_Tips-Cancel-Limit-open-message-Menu' + }, + closeMessage: { + operation: '8002', + domId: '_Tips-Cancel-Limit-close-message-Menu' + }, + confirm1: { + operation: '8003', + domId: '_Tips-Cancel-Limit-close-confirm1-Menu' + }, + confirm2: { + operation: '8004', + domId: '_Tips-Cancel-Limit-close-confirm2-Menu' + }, + confirm: { + operation: '8005', + domId: '_Tips-Cancel-Limit-confirm-Menu' + }, + close: { + operation: '8006', + domId: '_Tips-Cancel-Limit-close-Menu' + } + } + }, - // 混合指令 - MixinCommand: { - /** 控制模式操作 */ - remoteControl: { - mbar: { - operation: '2999', - domId: '_Tips-Control-StationControl-Mbar' - } - }, - // 封锁 - block: { - event: '90', - button: { - operation: '2991', - domId: '_Tips-Block-Button{TOP}' - } - }, - // 解封 - unblock: { - event: '91', - button: { - operation: '2992', - domId: '_Tips-Unblock-Button{TOP}' - } - }, - // 功能按钮 - functionButton: { - button: { - operation: '2993', - domId: '_Tips-FunctionButton-Button{TOP}' - } - } - } + // 混合指令 + MixinCommand: { + /** 控制模式操作 */ + remoteControl: { + mbar: { + operation: '2999', + domId: '_Tips-Control-StationControl-Mbar' + } + }, + // 封锁 + block: { + event: '90', + button: { + operation: '2991', + domId: '_Tips-Block-Button{TOP}' + } + }, + // 解封 + unblock: { + event: '91', + button: { + operation: '2992', + domId: '_Tips-Unblock-Button{TOP}' + } + }, + // 功能按钮 + functionButton: { + button: { + operation: '2993', + domId: '_Tips-FunctionButton-Button{TOP}' + } + } + } }; @@ -2117,17 +2130,17 @@ export const OperationEvent = { * @param {*} */ export function generateDomIdOperationRel() { - const domIdOperationRel = {}; - for (const deviceType in OperationEvent) { - for (const operate in OperationEvent[deviceType]) { - for (const orderType in OperationEvent[deviceType][operate]) { - if (OperationEvent[deviceType][operate][orderType].operation) { - domIdOperationRel[OperationEvent[deviceType][operate][orderType].operation] = OperationEvent[deviceType][operate][orderType].domId; - } - } - } - } - return domIdOperationRel; + const domIdOperationRel = {}; + for (const deviceType in OperationEvent) { + for (const operate in OperationEvent[deviceType]) { + for (const orderType in OperationEvent[deviceType][operate]) { + if (OperationEvent[deviceType][operate][orderType].operation) { + domIdOperationRel[OperationEvent[deviceType][operate][orderType].operation] = OperationEvent[deviceType][operate][orderType].domId; + } + } + } + } + return domIdOperationRel; } export const DomIdOperationRel = generateDomIdOperationRel(); @@ -2138,17 +2151,17 @@ export const DomIdOperationRel = generateDomIdOperationRel(); * @param {*} operation */ export function getOperateTypeBy(deviceType, operation) { - if (OperationEvent[deviceType]) { - for (var operate in OperationEvent[deviceType]) { - for (var orderType in OperationEvent[deviceType][operate]) { - if (OperationEvent[deviceType][operate][orderType] && + if (OperationEvent[deviceType]) { + for (var operate in OperationEvent[deviceType]) { + for (var orderType in OperationEvent[deviceType][operate]) { + if (OperationEvent[deviceType][operate][orderType] && OperationEvent[deviceType][operate][orderType].operation === operation) { - return OperationEvent[deviceType][operate][orderType].operation; - } - } - } - } - return null; + return OperationEvent[deviceType][operate][orderType].operation; + } + } + } + } + return null; } /** @@ -2156,21 +2169,51 @@ export function getOperateTypeBy(deviceType, operation) { * @param {*} operation */ export function getDomIdByOperation(operation) { - let domIdDict = DomIdOperationRel; - if (!domIdDict) { - domIdDict = generateDomIdOperationRel(); - } - return domIdDict[operation]; + let domIdDict = DomIdOperationRel; + if (!domIdDict) { + domIdDict = generateDomIdOperationRel(); + } + return domIdDict[operation]; } /** * 根据操作类型和操作原子判断是否属于该原子 */ export function checkOperationIsCurrentOperate(operation, operate) { - for (const order in operate) { - if (operate[order] && + for (const order in operate) { + if (operate[order] && operate[order].operation === operation) { - return true; - } - } + return true; + } + } } +/** + * ibp操作 + */ +export const IbpOperation = { + Up_Hold_Train: {operate: '01', status: 'on'}, + Up_Cancel_Hold_Train: {operate: '02', status: 'off'}, + Down_Hold_Train: {operate: '03', status: 'on'}, + Down_Cancel_Hold_Train: {operate: '04', status: 'off'} +}; + +import LangStorage from '@/utils/lang'; +import Favicon from '@/assets/icon/favicon.png'; +import FaviconXty from '@/assets/icon/favicon_xty.png'; +export const loginTitle = { + xty: '西安铁路职业技术学院城市轨道交通实训平台', + login: LangStorage.getLang() == 'en' ? ' Urban Rail Transit Practical Training Platform' : '城市轨道交通实训平台', + design: LangStorage.getLang() == 'en' ? ' Urban Rail Transit Design Platform' : '城市轨道交通设计平台', + designxty: '西安铁路职业技术学院城市轨道交通设计平台' +}; +export const ProjectIcon = { + xty: FaviconXty, + login: Favicon, + design: Favicon, + designxty: FaviconXty +}; + +export const ProjectCode = { + xty: 'XTY', + designxty: 'XTY' +}; diff --git a/src/scripts/DeviceTypeDic.js b/src/scripts/DeviceTypeDic.js deleted file mode 100644 index 68be8bc23..000000000 --- a/src/scripts/DeviceTypeDic.js +++ /dev/null @@ -1,26 +0,0 @@ -export default { - ConstSelect: { - // 剧本录制模块枚举 - deviceType: [ - {label: '进路', value: 'Route'}, - {label: '区段', value: 'Section'}, - {label: '信号机', value: 'Signal'}, - {label: '站台', value: 'StationStand'}, - {label: '集中站', value: 'Station'}, - {label: '控制模式', value: 'StationControl'}, - {label: '道岔', value: 'Switch'}, - {label: '列车', value: 'Train'} - ], - // 行为触发条件类型 - triggerType: [ - {label: '对话', value: 'Conversation'}, - {label: '设备', value: 'DeviceCondition'}, - {label: '无', value: 'None'} - ], - // 动作类型 - actionType: [ - {label: '对话', value: 'Conversation'}, - {label: '指令', value: 'Command'} - ] - } -}; diff --git a/src/scripts/DictionaryData.js b/src/scripts/DictionaryData.js index d44de2c7c..12ae0e84c 100644 --- a/src/scripts/DictionaryData.js +++ b/src/scripts/DictionaryData.js @@ -1,262 +1,262 @@ import { getDetailList } from '@/api/management/dictionary'; function loadDictionary() { - function queryData(code, that, field) { - return new Promise((resolve, reject) => { - if (that[field].length) { - resolve(that[field]); - } - getDetailList(code).then(response => { - that[field] = response.data; - resolve(that[field]); - }).catch(error => { - console.log('获取字典失败:' + error.message); - reject(error); - }); - }); - } + function queryData(code, that, field) { + return new Promise((resolve, reject) => { + if (that[field].length) { + resolve(that[field]); + } + getDetailList(code).then(response => { + that[field] = response.data; + resolve(that[field]); + }).catch(error => { + console.log('获取字典失败:' + error.message); + reject(error); + }); + }); + } - function Dictionary() { } + function Dictionary() { } - Dictionary.prototype = { - _TrainingType: [], + Dictionary.prototype = { + _TrainingType: [], - _SectionType: [], + _SectionType: [], - _SectionSepType: [], + _SectionSepType: [], - _SignalPotLampType: [], - _SignalLampPostType: [], - _SignalLampPositionType: [], - _SignalDirectionType: [], - _SignalPositionType: [], - _SignalUseType: [], + _SignalPotLampType: [], + _SignalLampPostType: [], + _SignalLampPositionType: [], + _SignalDirectionType: [], + _SignalPositionType: [], + _SignalUseType: [], - _DoorLocationType: [], + _DoorLocationType: [], - _WhetherType: [], // 是/否 - _EffectiveType: [], // 生效/失效 + _WhetherType: [], // 是/否 + _EffectiveType: [], // 生效/失效 - _RouteNatureType: [], - _RouteAutoType: [], - _SwitchLocateType: [], + _RouteNatureType: [], + _RouteAutoType: [], + _SwitchLocateType: [], - _BizType: [], - _OrderType: [], - _PayType: [], - _PayStatus: [], + _BizType: [], + _OrderType: [], + _PayType: [], + _PayStatus: [], - _LogicalViewType: {}, - _PhysicalViewType: [], + _LogicalViewType: {}, + _PhysicalViewType: [], - _PermissionType: [], - _ProductPostType: [], + _PermissionType: [], + _ProductPostType: [], - _ProductType: [], + _ProductType: [], - _TimeStyle: [], + _TimeStyle: [], - _RunDirectionType: [], + _RunDirectionType: [], - _TrainPositionType: [], + _TrainPositionType: [], - _CityType: [], + _CityType: [], - _LineType: [], + _LineType: [], - _TaskList: [], // 任务类型列表 + _TaskList: [], // 任务类型列表 - _TaskStatus: [], // 任务状态 + _TaskStatus: [], // 任务状态 - _StationControl: [], // 控制权操作类型 + _StationControl: [], // 控制权操作类型 - _SignalOperation: [], // 信号灯操作类型 + _SignalOperation: [], // 信号灯操作类型 - _SwitchOperation: [], // 道岔操作类型 + _SwitchOperation: [], // 道岔操作类型 - _SectionOperation: [], // 区段操作类型 + _SectionOperation: [], // 区段操作类型 - _StationStandOperation: [], // 站台操作类型 + _StationStandOperation: [], // 站台操作类型 - _TrainPlanOperation: [], // 行车计划操作类型 + _TrainPlanOperation: [], // 行车计划操作类型 - _TrainOperation: [], // 列车操作类型 + _TrainOperation: [], // 列车操作类型 - _RegionTypeList: [], // 区间类型列表 + _RegionTypeList: [], // 区间类型列表 - _LimitOperation: [], + _LimitOperation: [], - regionTypeList: function () { - return queryData('region_type_list', this, '_RegionTypeList'); - }, + regionTypeList: function () { + return queryData('region_type_list', this, '_RegionTypeList'); + }, - limitOperation: function () { - return queryData('limit_operation', this, '_LimitOperation'); - }, + limitOperation: function () { + return queryData('limit_operation', this, '_LimitOperation'); + }, - stationControl: function () { - return queryData('station_control', this, '_StationControl'); - }, + stationControl: function () { + return queryData('station_control', this, '_StationControl'); + }, - signalOperation: function () { - return queryData('signal_operation', this, '_SignalOperation'); - }, + signalOperation: function () { + return queryData('signal_operation', this, '_SignalOperation'); + }, - switchOperation: function () { - return queryData('switch_operation', this, '_SwitchOperation'); - }, + switchOperation: function () { + return queryData('switch_operation', this, '_SwitchOperation'); + }, - sectionOperation: function () { - return queryData('section_operation', this, '_SectionOperation'); - }, + sectionOperation: function () { + return queryData('section_operation', this, '_SectionOperation'); + }, - stationStandOperation: function () { - return queryData('station_stand_operation', this, '_StationStandOperation'); - }, + stationStandOperation: function () { + return queryData('station_stand_operation', this, '_StationStandOperation'); + }, - trainPlanOperation: function () { - return queryData('train_plan_operation', this, '_TrainPlanOperation'); - }, + trainPlanOperation: function () { + return queryData('train_plan_operation', this, '_TrainPlanOperation'); + }, - trainOperation: function () { - return queryData('train_operation', this, '_TrainOperation'); - }, + trainOperation: function () { + return queryData('train_operation', this, '_TrainOperation'); + }, - taskList: function () { - return queryData('task_type', this, '_TaskList'); - }, - taskStatus: function () { - return queryData('task_status', this, '_TaskStatus'); - }, - trainingType: function () { - return queryData('training_type', this, '_TrainingType'); - }, + taskList: function () { + return queryData('task_type', this, '_TaskList'); + }, + taskStatus: function () { + return queryData('task_status', this, '_TaskStatus'); + }, + trainingType: function () { + return queryData('training_type', this, '_TrainingType'); + }, - sectionType: function () { - return queryData('section_type', this, '_SectionType'); - }, + sectionType: function () { + return queryData('section_type', this, '_SectionType'); + }, - sectionSepType: function () { - return queryData('section_sep_type', this, '_SectionSepType'); - }, + sectionSepType: function () { + return queryData('section_sep_type', this, '_SectionSepType'); + }, - signalPotLampType: function () { - return queryData('signal_pot_lamp_type', this, '_SignalPotLampType'); - }, - signalLampPostType: function () { - return queryData('signal_lamp_post_type', this, '_SignalLampPostType'); - }, - signalLampPositionType: function () { - return queryData('signal_lamp_position_type', this, '_SignalLampPositionType'); - }, - signalDirectionType: function () { - return queryData('signal_direction_type', this, '_SignalDirectionType'); - }, - signalPositionType: function () { - return queryData('signal_position_type', this, '_SignalPositionType'); - }, - signalUseType: function () { - return queryData('signal_use_type', this, '_SignalUseType'); - }, + signalPotLampType: function () { + return queryData('signal_pot_lamp_type', this, '_SignalPotLampType'); + }, + signalLampPostType: function () { + return queryData('signal_lamp_post_type', this, '_SignalLampPostType'); + }, + signalLampPositionType: function () { + return queryData('signal_lamp_position_type', this, '_SignalLampPositionType'); + }, + signalDirectionType: function () { + return queryData('signal_direction_type', this, '_SignalDirectionType'); + }, + signalPositionType: function () { + return queryData('signal_position_type', this, '_SignalPositionType'); + }, + signalUseType: function () { + return queryData('signal_use_type', this, '_SignalUseType'); + }, - doorLocationType: function () { - return queryData('door_location_type', this, '_DoorLocationType'); - }, + doorLocationType: function () { + return queryData('door_location_type', this, '_DoorLocationType'); + }, - whetherType: function () { - return queryData('whether_type', this, '_WhetherType'); - }, - effectiveType: function () { - return queryData('effective_type', this, '_EffectiveType'); - }, + whetherType: function () { + return queryData('whether_type', this, '_WhetherType'); + }, + effectiveType: function () { + return queryData('effective_type', this, '_EffectiveType'); + }, - routeNatureType: function () { - return queryData('route_nature_type', this, '_RouteNatureType'); - }, - routeAutoType: function () { - return queryData('route_auto_type', this, '_RouteAutoType'); - }, - switchLocateType: function () { - return queryData('switch_locate_type', this, '_SwitchLocateType'); - }, - productPostType: function () { - return queryData('product_post_type', this, '_ProductPostType'); - }, - bizType: function () { - return queryData('biz_type', this, '_BizType'); - }, - orderType: function () { - return queryData('order_type', this, '_OrderType'); - }, - payType: function () { - return queryData('pay_type', this, '_PayType'); - }, - payStatus: function () { - return queryData('pay_status', this, '_PayStatus'); - }, + routeNatureType: function () { + return queryData('route_nature_type', this, '_RouteNatureType'); + }, + routeAutoType: function () { + return queryData('route_auto_type', this, '_RouteAutoType'); + }, + switchLocateType: function () { + return queryData('switch_locate_type', this, '_SwitchLocateType'); + }, + productPostType: function () { + return queryData('product_post_type', this, '_ProductPostType'); + }, + bizType: function () { + return queryData('biz_type', this, '_BizType'); + }, + orderType: function () { + return queryData('order_type', this, '_OrderType'); + }, + payType: function () { + return queryData('pay_type', this, '_PayType'); + }, + payStatus: function () { + return queryData('pay_status', this, '_PayStatus'); + }, - permissionType: function () { - return queryData('permission_type', this, '_PermissionType'); - }, + permissionType: function () { + return queryData('permission_type', this, '_PermissionType'); + }, - productType: function () { - return queryData('product_type', this, '_ProductType'); - }, + productType: function () { + return queryData('product_type', this, '_ProductType'); + }, - timeStyleType: function () { - return queryData('time_style', this, '_TimeStyle'); - }, + timeStyleType: function () { + return queryData('time_style', this, '_TimeStyle'); + }, - runDirectionType: function () { - return queryData('run_direction_type', this, '_RunDirectionType'); - }, + runDirectionType: function () { + return queryData('run_direction_type', this, '_RunDirectionType'); + }, - logicalViewType: function () { - return queryData('logical_view_Type', this, '_LogicalViewType'); - }, - physicalViewType: function () { - return queryData('physical_view_Type', this, '_PhysicalViewType'); - }, + logicalViewType: function () { + return queryData('logical_view_Type', this, '_LogicalViewType'); + }, + physicalViewType: function () { + return queryData('physical_view_Type', this, '_PhysicalViewType'); + }, - trainPositionType: function () { - return queryData('train_position_type', this, '_TrainPositionType'); - }, + trainPositionType: function () { + return queryData('train_position_type', this, '_TrainPositionType'); + }, - cityType: function () { - return queryData('city_type', this, '_CityType'); - }, + cityType: function () { + return queryData('city_type', this, '_CityType'); + }, - lineType: function () { - return queryData('line_type', this, '_LineType'); - }, + lineType: function () { + return queryData('line_type', this, '_LineType'); + }, - translate: function (value, dic) { - return new Promise((resolve, reject) => { - if (this[dic] instanceof Function) { - this[dic]().then(list => { - if (list && list.length) { - const obj = list.filter(function (item) { - return item.value === value; - })[0]; - const label = obj && obj.label; - resolve(label); - } else { - console.warn('字典列表为空:"' + dic + '"'); - resolve(''); - } - }).catch(error => { - console.error('字典翻译异常:' + error.message); - reject(error); - }); - } else { - const error = new Error('"' + dic + '" 对象不存在'); - console.error('字典翻译异常:' + error.message); - reject(error); - } - }); - } - }; - return new Dictionary(); + translate: function (value, dic) { + return new Promise((resolve, reject) => { + if (this[dic] instanceof Function) { + this[dic]().then(list => { + if (list && list.length) { + const obj = list.filter(function (item) { + return item.value === value; + })[0]; + const label = obj && obj.label; + resolve(label); + } else { + console.warn('字典列表为空:"' + dic + '"'); + resolve(''); + } + }).catch(error => { + console.error('字典翻译异常:' + error.message); + reject(error); + }); + } else { + const error = new Error('"' + dic + '" 对象不存在'); + console.error('字典翻译异常:' + error.message); + reject(error); + } + }); + } + }; + return new Dictionary(); } // export function addCityNodeByTree(cityList, tree) { diff --git a/src/scripts/GlobalPlugin.js b/src/scripts/GlobalPlugin.js index ac3383427..8c78dc5fb 100644 --- a/src/scripts/GlobalPlugin.js +++ b/src/scripts/GlobalPlugin.js @@ -87,7 +87,7 @@ Vue.prototype.$convertSpecifiedField = function(dataDict, enumList, key, value, }); }); } -}, +}; Vue.prototype.$convertList = function(FromList, ToList, checktypeFunction) { if (FromList) { diff --git a/src/scripts/OperationConfig.js b/src/scripts/OperationConfig.js index 912992bb6..797526947 100644 --- a/src/scripts/OperationConfig.js +++ b/src/scripts/OperationConfig.js @@ -6,8 +6,10 @@ // {id: "5", trainingType: "02", name: "信号机名称"} // {id: "6", trainingType: "02", name: "信号机编号"} // {id: "7", trainingType: "03", name: "道岔名称"} +// {id: "17", trainingType: "03", name: "道岔编码"} // {id: "8", trainingType: "04", name: "物理区段名称"} // {id: "9", trainingType: "04", name: "逻辑区段名称"} +// {id: "18", trainingType: "04", name: "逻辑区段编码"} // {id: "10", trainingType: "05", name: "车站名称"} // {id: "11", trainingType: "05", name: "站台行驶方向编号"} // {id: "12", trainingType: "05", name: "站台行驶方向"} @@ -16,2551 +18,2769 @@ // {id: "15", trainingType: "03", name: "道岔位置"} // {id: "16", trainingType: "03", name: "道岔位置(反)"} export const OperationList = { - '01': { - list: [] - }, - '02': { // 福州一号线 - list: [ - { - maxDuration: 20, - minDuration: 15, - operateType: '0103', - skinCode: '02', - trainingName: '转为中控({1})', - trainingRemark: '控制权限转换,站控转中控', - trainingType: '01', - productTypes: ['02'], - stepVOList: [ - { deviceType: 'bar', orderNum: 1, operateCode: '0024', tip: '鼠标左键点击顶部菜单栏【控制模式转换】' }, - { deviceType: 'bar', orderNum: 2, operateCode: '2041', tip: '鼠标左键点击【转为中控】' }, - { deviceType: '05', orderNum: 3, operateCode: '2042', tip: '鼠标左键选择所需要转换的控制区域【{1}】', val: '{2}' }, - { deviceType: '05', orderNum: 4, operateCode: '204', tip: '鼠标左键点击【请求中控】', val: '{2}' }, - { deviceType: '05', orderNum: 5, operateCode: '2043', tip: '鼠标左键点击【确认】按钮', val: '{2}' }, - { deviceType: '05', orderNum: 6, operateCode: '0013', tip: '鼠标左键点击【确定】按钮' }, - { deviceType: 'bar', orderNum: 7, operateCode: '000', tip: '鼠标左键点击【关闭】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0101', - skinCode: '02', - trainingName: '转为站控({1})', - trainingRemark: '控制权限转换,中控转站控', - trainingType: '01', - productTypes: ['01'], - stepVOList: [ - { deviceType: 'bar', orderNum: 1, operateCode: '0024', tip: '鼠标左键点击顶部菜单栏【控制模式转换】' }, - { deviceType: 'bar', orderNum: 2, operateCode: '2021', tip: '鼠标左键点击【转为站控】' }, - { deviceType: '05', orderNum: 3, operateCode: '2022', tip: '鼠标左键选择所需要转换的控制区域【{1}】', val: '{2}' }, - { deviceType: '05', orderNum: 4, operateCode: '202', tip: '鼠标左键点击【请求站控】', val: '{2}' }, - { deviceType: '05', orderNum: 5, operateCode: '2023', tip: '鼠标左键点击【确认】按钮', val: '{2}' }, - { deviceType: '05', orderNum: 6, operateCode: '0013', tip: '鼠标左键点击【确定】按钮' }, - { deviceType: 'bar', orderNum: 7, operateCode: '000', tip: '鼠标左键点击【关闭】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0102', - skinCode: '02', - trainingName: '强制站控({1})', - trainingRemark: '控制权限转换,强制站控', - trainingType: '01', - productTypes: ['01'], - stepVOList: [ - { deviceType: 'bar', orderNum: 1, operateCode: '0024', tip: '鼠标左键点击顶部菜单栏【控制模式转换】' }, - { deviceType: 'bar', orderNum: 2, operateCode: '2034', tip: '鼠标左键点击【强制站控】' }, - { deviceType: 'bar', orderNum: 3, operateCode: '2035', tip: '鼠标左键输入默认密码【123456】后,点击【确定】按钮' }, - { deviceType: '05', orderNum: 4, operateCode: '2032', tip: '鼠标左键选择所需要转换的控制区域【{1}】', val: '{2}' }, - { deviceType: '05', orderNum: 5, operateCode: '203', tip: '鼠标左键点击【强制站控】', val: '{2}' }, - { deviceType: '05', orderNum: 6, operateCode: '2033', tip: '鼠标左键点击【确认】按钮', val: '{2}' }, - { deviceType: '05', orderNum: 7, operateCode: '0013', tip: '鼠标左键点击【确定】按钮' }, - { deviceType: 'bar', orderNum: 8, operateCode: '000', tip: '鼠标左键点击【关闭】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0501', - skinCode: '02', - trainingName: '站台扣车({10}-{12}站台)', - trainingRemark: '设置扣车功能', - trainingType: '05', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '06', orderNum: 1, operateCode: '504', tip: '鼠标右键菜单选择【扣车】' }, - { deviceType: '06', orderNum: 2, operateCode: '504', tip: '鼠标左键点击【确定】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0502', - skinCode: '02', - trainingName: '站台取消扣车({10}-{12}站台)', - trainingRemark: '设置取消扣车功能', - trainingType: '05', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '06', orderNum: 1, operateCode: '505', tip: '鼠标右键菜单选择【取消扣车】' }, - { deviceType: '06', orderNum: 2, operateCode: '505', tip: '鼠标左键点击【确定】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0503', - skinCode: '02', - trainingName: '强制取消扣车({10}-{12}站台)', - trainingRemark: '强制取消扣车功能', - trainingType: '05', - productTypes: ['01'], - stepVOList: [ - { deviceType: '06', orderNum: 1, operateCode: '506', tip: '鼠标右键菜单选择【强制取消扣车】' }, - { deviceType: '06', orderNum: 2, operateCode: '506', tip: '鼠标左键点击【确定】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0504', - skinCode: '02', - trainingName: '全线取消扣车({10}-{12}站台)', - trainingRemark: '全线取消扣车功能(默认上行全线/下行全线,不做选择)', - trainingType: '05', - productTypes: ['02'], - stepVOList: [ - { deviceType: '06', orderNum: 1, operateCode: '508', tip: '鼠标右键菜单选择【全线取消扣车】' }, - { deviceType: '06', orderNum: 2, operateCode: '508', tip: '鼠标左键点击【确定】按钮', val: '{11}' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0504', - skinCode: '02', - trainingName: '全线取消扣车({10}-{12}站台)', - trainingRemark: '全线取消扣车功能(选择上/下行全线)', - trainingType: '05', - productTypes: ['02'], - stepVOList: [ - { deviceType: '06', orderNum: 1, operateCode: '508', tip: '鼠标右键菜单选择【全线取消扣车】' }, - { deviceType: '06', orderNum: 2, operateCode: '5081', tip: '鼠标右键菜单选择【{14}全线】', val: '{13}' }, - { deviceType: '06', orderNum: 3, operateCode: '508', tip: '鼠标左键点击【确定】按钮', val: '{13}' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0505', - skinCode: '02', - trainingName: '站台跳停({10}-{12}站台)', - trainingRemark: '设置跳停功能', - trainingType: '05', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '06', orderNum: 1, operateCode: '502', tip: '鼠标右键菜单选择【跳停】' }, - { deviceType: '06', orderNum: 2, operateCode: '502', tip: '鼠标左键点击【确定】按钮', val: '{11}' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0506', - skinCode: '02', - trainingName: '取消跳停({10}-{12}站台)', - trainingRemark: '设置取消跳停功能', - trainingType: '05', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '06', orderNum: 1, operateCode: '503', tip: '鼠标右键菜单选择【取消跳停】' }, - { deviceType: '06', orderNum: 2, operateCode: '503', tip: '鼠标左键点击【确定】按钮', val: '{11}' } - ] - }, - { - maxDuration: 8, - minDuration: 5, - operateType: '0507', - skinCode: '02', - trainingName: '查询站台状态({10}-{12}站台)', - trainingRemark: '查询站台状态功能', - trainingType: '05', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '06', orderNum: 1, operateCode: '507', tip: '鼠标右键菜单选择【查询站台状态】' }, - { deviceType: '06', orderNum: 2, operateCode: '0012', tip: '鼠标左键点击【确定】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0508', - skinCode: '02', - trainingName: '设置停站时间({10}-{12}站台)', - trainingRemark: '设置停站时间(自动, 一直有效)', - trainingType: '05', - productTypes: ['02'], - stepVOList: [ - { deviceType: '06', orderNum: 1, operateCode: '509', tip: '鼠标右键菜单选择【设置停站时间】' }, - { deviceType: '06', orderNum: 2, operateCode: '5092', tip: '鼠标左键点击,选择【自动】', val: '01' }, - { deviceType: '06', orderNum: 3, operateCode: '509', tip: '鼠标左键点击【确认】按钮', val: '01::20::true' }, - { deviceType: '06', orderNum: 4, operateCode: '5091', tip: '鼠标左键点击【确认】按钮', val: '01::20::true' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0508', - skinCode: '02', - trainingName: '设置停站时间({10}-{12}站台)', - trainingRemark: '设置停站时间(人工, 20秒, 一直有效)', - trainingType: '05', - productTypes: ['02'], - stepVOList: [ - { deviceType: '06', orderNum: 1, operateCode: '509', tip: '鼠标右键菜单选择【设置停站时间】' }, - { deviceType: '06', orderNum: 2, operateCode: '5092', tip: '鼠标左键点击,选择【人工】', val: '02' }, - { deviceType: '06', orderNum: 3, operateCode: '5094', tip: '输入或鼠标点击,调整为【20】', val: '20' }, - { deviceType: '06', orderNum: 4, operateCode: '509', tip: '鼠标左键点击【确认】按钮', val: '02::20::true' }, - { deviceType: '06', orderNum: 5, operateCode: '5091', tip: '鼠标左键点击【确认】按钮', val: '02::20::true' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0508', - skinCode: '02', - trainingName: '设置停站时间({10}-{12}站台)', - trainingRemark: '设置停站时间(人工, 20秒, 一次有效)', - trainingType: '05', - productTypes: ['02'], - stepVOList: [ - { deviceType: '06', orderNum: 1, operateCode: '509', tip: '鼠标右键菜单选择【设置停站时间】' }, - { deviceType: '06', orderNum: 2, operateCode: '5092', tip: '鼠标左键点击,选择【人工】', val: '02' }, - { deviceType: '06', orderNum: 3, operateCode: '5094', tip: '输入或鼠标点击,调整为【20】', val: '20' }, - { deviceType: '06', orderNum: 4, operateCode: '5093', tip: '鼠标左键点击,选择【一次有效】', val: 'false' }, - { deviceType: '06', orderNum: 5, operateCode: '509', tip: '鼠标左键点击【确认】按钮', val: '02::20::false' }, - { deviceType: '06', orderNum: 6, operateCode: '5091', tip: '鼠标左键点击【确认】按钮', val: '02::20::false' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0509', - skinCode: '02', - trainingName: '设置运行等级({10}-{12}站台)', - trainingRemark: '设置运行等级(设置区间运行时间为60,一直有效)', - trainingType: '05', - productTypes: ['02'], - stepVOList: [ - { deviceType: '06', orderNum: 1, operateCode: '510', tip: '鼠标右键菜单选择【设置运行等级】' }, - { deviceType: '06', orderNum: 2, operateCode: '5101', tip: '鼠标左键点击,选择【60】', val: '60' }, - { deviceType: '06', orderNum: 3, operateCode: '510', tip: '鼠标左键点击【确认】按钮', val: '60::true' }, - { deviceType: '06', orderNum: 4, operateCode: '5102', tip: '鼠标左键点击【确认】按钮', val: '60::true' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0509', - skinCode: '02', - trainingName: '设置运行等级({10}-{12}站台)', - trainingRemark: '设置运行等级(设置区间运行时间为60,一次有效)', - trainingType: '05', - productTypes: ['02'], - stepVOList: [ - { deviceType: '06', orderNum: 1, operateCode: '510', tip: '鼠标右键菜单选择【设置运行等级】' }, - { deviceType: '06', orderNum: 2, operateCode: '5101', tip: '鼠标左键点击,选择【60】', val: '60' }, - { deviceType: '06', orderNum: 3, operateCode: '5103', tip: '鼠标左键点击,取消选择【一直有效】', val: 'false' }, - { deviceType: '06', orderNum: 4, operateCode: '510', tip: '鼠标左键点击【确认】按钮', val: '60::false' }, - { deviceType: '06', orderNum: 5, operateCode: '5102', tip: '鼠标左键点击【确认】按钮', val: '60::false' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0510', - skinCode: '02', - trainingName: '设置提前发车({10}-{12}站台)', - trainingRemark: '设置提前发车功能', - trainingType: '05', - productTypes: ['02'], - stepVOList: [ - { deviceType: '06', orderNum: 1, operateCode: '501', tip: '鼠标右键菜单选择【设置提前发车】' }, - { deviceType: '06', orderNum: 2, operateCode: '501', tip: '鼠标左键点击【确定】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0511', - skinCode: '02', - trainingName: '人工折返策略设置({10}-{12}站台)', - trainingRemark: '人工折返策略设置功能', - trainingType: '05', - productTypes: ['02'], - stepVOList: [ - { deviceType: '06', orderNum: 1, operateCode: '511', tip: '鼠标右键菜单选择【人工折返策略设置】' }, - { deviceType: '06', orderNum: 2, operateCode: '5111', tip: '鼠标左键点击,选择【无折返】', val: '01' }, - { deviceType: '06', orderNum: 3, operateCode: '511', tip: '鼠标左键点击【确定】按钮', val: '01' } - ] - }, + '01': { + list: [] + }, + '02': { // 福州一号线 + list: [ + { + maxDuration: 20, + minDuration: 15, + operateType: '0103', + skinCode: '02', + trainingName: '转为中控({1})', + trainingRemark: '控制权限转换,站控转中控', + trainingType: '01', + productTypes: ['02'], + stepVOList: [ + { deviceType: 'bar', orderNum: 1, operateCode: '0024', tip: '鼠标左键点击顶部菜单栏【控制模式转换】' }, + { deviceType: 'bar', orderNum: 2, operateCode: '2041', tip: '鼠标左键点击【转为中控】' }, + { deviceType: '05', orderNum: 3, operateCode: '2042', tip: '鼠标左键选择所需要转换的控制区域【{1}】', val: '{2}' }, + { deviceType: '05', orderNum: 4, operateCode: '204', tip: '鼠标左键点击【请求中控】', val: '{2}' }, + { deviceType: '05', orderNum: 5, operateCode: '2043', tip: '鼠标左键点击【确认】按钮', val: '{2}' }, + { deviceType: '05', orderNum: 6, operateCode: '0013', tip: '鼠标左键点击【确定】按钮' }, + { deviceType: 'bar', orderNum: 7, operateCode: '000', tip: '鼠标左键点击【关闭】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0101', + skinCode: '02', + trainingName: '转为站控({1})', + trainingRemark: '控制权限转换,中控转站控', + trainingType: '01', + productTypes: ['01'], + stepVOList: [ + { deviceType: 'bar', orderNum: 1, operateCode: '0024', tip: '鼠标左键点击顶部菜单栏【控制模式转换】' }, + { deviceType: 'bar', orderNum: 2, operateCode: '2021', tip: '鼠标左键点击【转为站控】' }, + { deviceType: '05', orderNum: 3, operateCode: '2022', tip: '鼠标左键选择所需要转换的控制区域【{1}】', val: '{2}' }, + { deviceType: '05', orderNum: 4, operateCode: '202', tip: '鼠标左键点击【请求站控】', val: '{2}' }, + { deviceType: '05', orderNum: 5, operateCode: '2023', tip: '鼠标左键点击【确认】按钮', val: '{2}' }, + { deviceType: '05', orderNum: 6, operateCode: '0013', tip: '鼠标左键点击【确定】按钮' }, + { deviceType: 'bar', orderNum: 7, operateCode: '000', tip: '鼠标左键点击【关闭】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0102', + skinCode: '02', + trainingName: '强制站控({1})', + trainingRemark: '控制权限转换,强制站控', + trainingType: '01', + productTypes: ['01'], + stepVOList: [ + { deviceType: 'bar', orderNum: 1, operateCode: '0024', tip: '鼠标左键点击顶部菜单栏【控制模式转换】' }, + { deviceType: 'bar', orderNum: 2, operateCode: '2034', tip: '鼠标左键点击【强制站控】' }, + { deviceType: 'bar', orderNum: 3, operateCode: '2035', tip: '鼠标左键输入默认密码【123456】后,点击【确定】按钮' }, + { deviceType: '05', orderNum: 4, operateCode: '2032', tip: '鼠标左键选择所需要转换的控制区域【{1}】', val: '{2}' }, + { deviceType: '05', orderNum: 5, operateCode: '203', tip: '鼠标左键点击【强制站控】', val: '{2}' }, + { deviceType: '05', orderNum: 6, operateCode: '2033', tip: '鼠标左键点击【确认】按钮', val: '{2}' }, + { deviceType: '05', orderNum: 7, operateCode: '0013', tip: '鼠标左键点击【确定】按钮' }, + { deviceType: 'bar', orderNum: 8, operateCode: '000', tip: '鼠标左键点击【关闭】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0501', + skinCode: '02', + trainingName: '站台扣车({10}-{12}站台)', + trainingRemark: '设置扣车功能', + trainingType: '05', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '06', orderNum: 1, operateCode: '504', tip: '鼠标右键菜单选择【扣车】' }, + { deviceType: '06', orderNum: 2, operateCode: '504', tip: '鼠标左键点击【确定】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0502', + skinCode: '02', + trainingName: '站台取消扣车({10}-{12}站台)', + trainingRemark: '设置取消扣车功能', + trainingType: '05', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '06', orderNum: 1, operateCode: '505', tip: '鼠标右键菜单选择【取消扣车】' }, + { deviceType: '06', orderNum: 2, operateCode: '505', tip: '鼠标左键点击【确定】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0503', + skinCode: '02', + trainingName: '强制取消扣车({10}-{12}站台)', + trainingRemark: '强制取消扣车功能', + trainingType: '05', + productTypes: ['01'], + stepVOList: [ + { deviceType: '06', orderNum: 1, operateCode: '506', tip: '鼠标右键菜单选择【强制取消扣车】' }, + { deviceType: '06', orderNum: 2, operateCode: '506', tip: '鼠标左键点击【确定】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0504', + skinCode: '02', + trainingName: '全线取消扣车({10}-{12}站台)', + trainingRemark: '全线取消扣车功能(默认上行全线/下行全线,不做选择)', + trainingType: '05', + productTypes: ['02'], + stepVOList: [ + { deviceType: '06', orderNum: 1, operateCode: '508', tip: '鼠标右键菜单选择【全线取消扣车】' }, + { deviceType: '06', orderNum: 2, operateCode: '508', tip: '鼠标左键点击【确定】按钮', val: '{11}' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0504', + skinCode: '02', + trainingName: '全线取消扣车({10}-{12}站台)', + trainingRemark: '全线取消扣车功能(选择上/下行全线)', + trainingType: '05', + productTypes: ['02'], + stepVOList: [ + { deviceType: '06', orderNum: 1, operateCode: '508', tip: '鼠标右键菜单选择【全线取消扣车】' }, + { deviceType: '06', orderNum: 2, operateCode: '5081', tip: '鼠标右键菜单选择【{14}全线】', val: '{13}' }, + { deviceType: '06', orderNum: 3, operateCode: '508', tip: '鼠标左键点击【确定】按钮', val: '{13}' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0505', + skinCode: '02', + trainingName: '站台跳停({10}-{12}站台)', + trainingRemark: '设置跳停功能', + trainingType: '05', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '06', orderNum: 1, operateCode: '502', tip: '鼠标右键菜单选择【跳停】' }, + { deviceType: '06', orderNum: 2, operateCode: '502', tip: '鼠标左键点击【确定】按钮', val: '{11}' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0506', + skinCode: '02', + trainingName: '取消跳停({10}-{12}站台)', + trainingRemark: '设置取消跳停功能', + trainingType: '05', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '06', orderNum: 1, operateCode: '503', tip: '鼠标右键菜单选择【取消跳停】' }, + { deviceType: '06', orderNum: 2, operateCode: '503', tip: '鼠标左键点击【确定】按钮', val: '{11}' } + ] + }, + { + maxDuration: 8, + minDuration: 5, + operateType: '0507', + skinCode: '02', + trainingName: '查询站台状态({10}-{12}站台)', + trainingRemark: '查询站台状态功能', + trainingType: '05', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '06', orderNum: 1, operateCode: '507', tip: '鼠标右键菜单选择【查询站台状态】' }, + { deviceType: '06', orderNum: 2, operateCode: '0012', tip: '鼠标左键点击【确定】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0508', + skinCode: '02', + trainingName: '设置停站时间({10}-{12}站台)', + trainingRemark: '设置停站时间(自动, 一直有效)', + trainingType: '05', + productTypes: ['02'], + stepVOList: [ + { deviceType: '06', orderNum: 1, operateCode: '509', tip: '鼠标右键菜单选择【设置停站时间】' }, + { deviceType: '06', orderNum: 2, operateCode: '5092', tip: '鼠标左键点击,选择【自动】', val: '01' }, + { deviceType: '06', orderNum: 3, operateCode: '509', tip: '鼠标左键点击【确认】按钮', val: '01::20::true' }, + { deviceType: '06', orderNum: 4, operateCode: '5091', tip: '鼠标左键点击【确认】按钮', val: '01::20::true' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0508', + skinCode: '02', + trainingName: '设置停站时间({10}-{12}站台)', + trainingRemark: '设置停站时间(人工, 20秒, 一直有效)', + trainingType: '05', + productTypes: ['02'], + stepVOList: [ + { deviceType: '06', orderNum: 1, operateCode: '509', tip: '鼠标右键菜单选择【设置停站时间】' }, + { deviceType: '06', orderNum: 2, operateCode: '5092', tip: '鼠标左键点击,选择【人工】', val: '02' }, + { deviceType: '06', orderNum: 3, operateCode: '5094', tip: '输入或鼠标点击,调整为【20】', val: '20' }, + { deviceType: '06', orderNum: 4, operateCode: '509', tip: '鼠标左键点击【确认】按钮', val: '02::20::true' }, + { deviceType: '06', orderNum: 5, operateCode: '5091', tip: '鼠标左键点击【确认】按钮', val: '02::20::true' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0508', + skinCode: '02', + trainingName: '设置停站时间({10}-{12}站台)', + trainingRemark: '设置停站时间(人工, 20秒, 一次有效)', + trainingType: '05', + productTypes: ['02'], + stepVOList: [ + { deviceType: '06', orderNum: 1, operateCode: '509', tip: '鼠标右键菜单选择【设置停站时间】' }, + { deviceType: '06', orderNum: 2, operateCode: '5092', tip: '鼠标左键点击,选择【人工】', val: '02' }, + { deviceType: '06', orderNum: 3, operateCode: '5094', tip: '输入或鼠标点击,调整为【20】', val: '20' }, + { deviceType: '06', orderNum: 4, operateCode: '5093', tip: '鼠标左键点击,选择【一次有效】', val: 'false' }, + { deviceType: '06', orderNum: 5, operateCode: '509', tip: '鼠标左键点击【确认】按钮', val: '02::20::false' }, + { deviceType: '06', orderNum: 6, operateCode: '5091', tip: '鼠标左键点击【确认】按钮', val: '02::20::false' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0509', + skinCode: '02', + trainingName: '设置运行等级({10}-{12}站台)', + trainingRemark: '设置运行等级(设置区间运行时间为60,一直有效)', + trainingType: '05', + productTypes: ['02'], + stepVOList: [ + { deviceType: '06', orderNum: 1, operateCode: '510', tip: '鼠标右键菜单选择【设置运行等级】' }, + { deviceType: '06', orderNum: 2, operateCode: '5101', tip: '鼠标左键点击,选择【60】', val: '60' }, + { deviceType: '06', orderNum: 3, operateCode: '510', tip: '鼠标左键点击【确认】按钮', val: '60::true' }, + { deviceType: '06', orderNum: 4, operateCode: '5102', tip: '鼠标左键点击【确认】按钮', val: '60::true' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0509', + skinCode: '02', + trainingName: '设置运行等级({10}-{12}站台)', + trainingRemark: '设置运行等级(设置区间运行时间为60,一次有效)', + trainingType: '05', + productTypes: ['02'], + stepVOList: [ + { deviceType: '06', orderNum: 1, operateCode: '510', tip: '鼠标右键菜单选择【设置运行等级】' }, + { deviceType: '06', orderNum: 2, operateCode: '5101', tip: '鼠标左键点击,选择【60】', val: '60' }, + { deviceType: '06', orderNum: 3, operateCode: '5103', tip: '鼠标左键点击,取消选择【一直有效】', val: 'false' }, + { deviceType: '06', orderNum: 4, operateCode: '510', tip: '鼠标左键点击【确认】按钮', val: '60::false' }, + { deviceType: '06', orderNum: 5, operateCode: '5102', tip: '鼠标左键点击【确认】按钮', val: '60::false' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0510', + skinCode: '02', + trainingName: '设置提前发车({10}-{12}站台)', + trainingRemark: '设置提前发车功能', + trainingType: '05', + productTypes: ['02'], + stepVOList: [ + { deviceType: '06', orderNum: 1, operateCode: '501', tip: '鼠标右键菜单选择【设置提前发车】' }, + { deviceType: '06', orderNum: 2, operateCode: '501', tip: '鼠标左键点击【确定】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0511', + skinCode: '02', + trainingName: '人工折返策略设置({10}-{12}站台)', + trainingRemark: '人工折返策略设置功能', + trainingType: '05', + productTypes: ['02'], + stepVOList: [ + { deviceType: '06', orderNum: 1, operateCode: '511', tip: '鼠标右键菜单选择【人工折返策略设置】' }, + { deviceType: '06', orderNum: 2, operateCode: '5111', tip: '鼠标左键点击,选择【无折返】', val: '01' }, + { deviceType: '06', orderNum: 3, operateCode: '511', tip: '鼠标左键点击【确定】按钮', val: '01' } + ] + }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0401', - skinCode: '02', - trainingName: '区段故障解锁({8}{9})', - trainingRemark: '故障解锁功能', - trainingType: '04', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '03', orderNum: 1, operateCode: '402', tip: '鼠标右键菜单选择【区段故障解锁】' }, - { deviceType: '03', orderNum: 2, operateCode: '4026', tip: '鼠标左键点击【下达】按钮' }, - { deviceType: '03', orderNum: 3, operateCode: '4024', tip: '鼠标左键点击【确认1】按钮' }, - { deviceType: '03', orderNum: 4, operateCode: '4025', tip: '鼠标左键点击【确认2】按钮' }, - { deviceType: '03', orderNum: 5, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0402', - skinCode: '02', - trainingName: '区段切除({8}{9})', - trainingRemark: '区段切除', - trainingType: '04', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '03', orderNum: 1, operateCode: '405', tip: '鼠标右键菜单选择【区段切除】' }, - { deviceType: '03', orderNum: 2, operateCode: '405', tip: '鼠标左键点击【确定】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0403', - skinCode: '02', - trainingName: '区段激活({8}{9})', - trainingRemark: '区段激活功能', - trainingType: '04', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '03', orderNum: 1, operateCode: '406', tip: '鼠标右键菜单选择【区段激活】' }, - { deviceType: '03', orderNum: 2, operateCode: '406', tip: '鼠标左键点击【确定】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0404', - skinCode: '02', - trainingName: '计轴预复位({8}{9})', - trainingRemark: '计轴预复位功能', - trainingType: '04', - productTypes: ['01'], - stepVOList: [ - { deviceType: '03', orderNum: 1, operateCode: '409', tip: '鼠标右键菜单选择【区段计轴预复位】' }, - { deviceType: '03', orderNum: 2, operateCode: '4091', tip: '鼠标左键点击【下达】按钮' }, - { deviceType: '03', orderNum: 3, operateCode: '4093', tip: '鼠标左键点击【确认1】按钮' }, - { deviceType: '03', orderNum: 4, operateCode: '4094', tip: '鼠标左键点击【确认2】按钮' }, - { deviceType: '03', orderNum: 5, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0405', - skinCode: '02', - trainingName: '区段封锁({8}{9})', - trainingRemark: '区段封锁功能', - trainingType: '04', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '03', orderNum: 1, operateCode: '403', tip: '鼠标右键菜单选择【区段封锁】' }, - { deviceType: '03', orderNum: 2, operateCode: '403', tip: '鼠标左键点击【确定】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0406', - skinCode: '02', - trainingName: '区段解封({8}{9})', - trainingRemark: '区段解封功能', - trainingType: '04', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '03', orderNum: 1, operateCode: '404', tip: '鼠标右键菜单选择【区段解封】' }, - { deviceType: '03', orderNum: 2, operateCode: '4041', tip: '鼠标左键点击【下达】按钮' }, - { deviceType: '03', orderNum: 3, operateCode: '4043', tip: '鼠标左键点击【确认1】按钮' }, - { deviceType: '03', orderNum: 4, operateCode: '4044', tip: '鼠标左键点击【确认2】按钮' }, - { deviceType: '03', orderNum: 5, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0407', - skinCode: '02', - trainingName: '区段设置限速({8}{9})', - trainingRemark: '区段设置限速功能(限速值:5)', - trainingType: '04', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '03', orderNum: 1, operateCode: '407', tip: '鼠标右键菜单选择【区段设置限速】' }, - { deviceType: '03', orderNum: 2, operateCode: '4076', tip: '鼠标左键选择【限速值5】', val: '5' }, - { deviceType: '03', orderNum: 3, operateCode: '4071', tip: '鼠标左键点击【下达】按钮' }, - { deviceType: '03', orderNum: 4, operateCode: '4072', tip: '鼠标左键点击【确认】按钮' }, - { deviceType: '03', orderNum: 5, operateCode: '4073', tip: '鼠标左键点击【确认1】按钮' }, - { deviceType: '03', orderNum: 6, operateCode: '4074', tip: '鼠标左键点击【确认2】按钮', val: '5' }, - { deviceType: '03', orderNum: 7, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0408', - skinCode: '02', - trainingName: '区段取消限速({8}{9})', - trainingRemark: '区段取消限速功能', - trainingType: '04', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '03', orderNum: 1, operateCode: '408', tip: '鼠标右键菜单选择【区段取消限速】' }, - { deviceType: '03', orderNum: 2, operateCode: '4081', tip: '鼠标左键点击【下达】按钮' }, - { deviceType: '03', orderNum: 3, operateCode: '4082', tip: '鼠标左键点击【确认】按钮' }, - { deviceType: '03', orderNum: 4, operateCode: '4083', tip: '鼠标左键点击【确认1】按钮' }, - { deviceType: '03', orderNum: 5, operateCode: '4084', tip: '鼠标左键点击【确认2】按钮', val: '5' }, - { deviceType: '03', orderNum: 6, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' } - ] - }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0401', + skinCode: '02', + trainingName: '区段故障解锁({8}{9})', + trainingRemark: '故障解锁功能', + trainingType: '04', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '03', orderNum: 1, operateCode: '402', tip: '鼠标右键菜单选择【区段故障解锁】' }, + { deviceType: '03', orderNum: 2, operateCode: '4026', tip: '鼠标左键点击【下达】按钮' }, + { deviceType: '03', orderNum: 3, operateCode: '4024', tip: '鼠标左键点击【确认1】按钮' }, + { deviceType: '03', orderNum: 4, operateCode: '4025', tip: '鼠标左键点击【确认2】按钮' }, + { deviceType: '03', orderNum: 5, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0402', + skinCode: '02', + trainingName: '区段切除({8}{9})', + trainingRemark: '区段切除', + trainingType: '04', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '03', orderNum: 1, operateCode: '405', tip: '鼠标右键菜单选择【区段切除】' }, + { deviceType: '03', orderNum: 2, operateCode: '405', tip: '鼠标左键点击【确定】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0403', + skinCode: '02', + trainingName: '区段激活({8}{9})', + trainingRemark: '区段激活功能', + trainingType: '04', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '03', orderNum: 1, operateCode: '406', tip: '鼠标右键菜单选择【区段激活】' }, + { deviceType: '03', orderNum: 2, operateCode: '406', tip: '鼠标左键点击【确定】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0404', + skinCode: '02', + trainingName: '计轴预复位({8}{9})', + trainingRemark: '计轴预复位功能', + trainingType: '04', + productTypes: ['01'], + stepVOList: [ + { deviceType: '03', orderNum: 1, operateCode: '409', tip: '鼠标右键菜单选择【区段计轴预复位】' }, + { deviceType: '03', orderNum: 2, operateCode: '4091', tip: '鼠标左键点击【下达】按钮' }, + { deviceType: '03', orderNum: 3, operateCode: '4093', tip: '鼠标左键点击【确认1】按钮' }, + { deviceType: '03', orderNum: 4, operateCode: '4094', tip: '鼠标左键点击【确认2】按钮' }, + { deviceType: '03', orderNum: 5, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0405', + skinCode: '02', + trainingName: '区段封锁({8}{9})', + trainingRemark: '区段封锁功能', + trainingType: '04', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '03', orderNum: 1, operateCode: '403', tip: '鼠标右键菜单选择【区段封锁】' }, + { deviceType: '03', orderNum: 2, operateCode: '403', tip: '鼠标左键点击【确定】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0406', + skinCode: '02', + trainingName: '区段解封({8}{9})', + trainingRemark: '区段解封功能', + trainingType: '04', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '03', orderNum: 1, operateCode: '404', tip: '鼠标右键菜单选择【区段解封】' }, + { deviceType: '03', orderNum: 2, operateCode: '4041', tip: '鼠标左键点击【下达】按钮' }, + { deviceType: '03', orderNum: 3, operateCode: '4043', tip: '鼠标左键点击【确认1】按钮' }, + { deviceType: '03', orderNum: 4, operateCode: '4044', tip: '鼠标左键点击【确认2】按钮' }, + { deviceType: '03', orderNum: 5, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0407', + skinCode: '02', + trainingName: '区段设置限速({8}{9})', + trainingRemark: '区段设置限速功能(限速值:5)', + trainingType: '04', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '03', orderNum: 1, operateCode: '407', tip: '鼠标右键菜单选择【区段设置限速】' }, + { deviceType: '03', orderNum: 2, operateCode: '4076', tip: '鼠标左键选择【限速值5】', val: '5' }, + { deviceType: '03', orderNum: 3, operateCode: '4071', tip: '鼠标左键点击【下达】按钮' }, + { deviceType: '03', orderNum: 4, operateCode: '4072', tip: '鼠标左键点击【确认】按钮' }, + { deviceType: '03', orderNum: 5, operateCode: '4073', tip: '鼠标左键点击【确认1】按钮' }, + { deviceType: '03', orderNum: 6, operateCode: '4074', tip: '鼠标左键点击【确认2】按钮', val: '5' }, + { deviceType: '03', orderNum: 7, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0408', + skinCode: '02', + trainingName: '区段取消限速({8}{9})', + trainingRemark: '区段取消限速功能', + trainingType: '04', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '03', orderNum: 1, operateCode: '408', tip: '鼠标右键菜单选择【区段取消限速】' }, + { deviceType: '03', orderNum: 2, operateCode: '4081', tip: '鼠标左键点击【下达】按钮' }, + { deviceType: '03', orderNum: 3, operateCode: '4082', tip: '鼠标左键点击【确认】按钮' }, + { deviceType: '03', orderNum: 4, operateCode: '4083', tip: '鼠标左键点击【确认1】按钮' }, + { deviceType: '03', orderNum: 5, operateCode: '4084', tip: '鼠标左键点击【确认2】按钮', val: '5' }, + { deviceType: '03', orderNum: 6, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' } + ] + }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0301', - skinCode: '02', - trainingName: '道岔单锁({7})', - trainingRemark: '道岔单锁功能', - trainingType: '03', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '02', orderNum: 1, operateCode: '103', tip: '鼠标右键菜单选择【道岔单锁】' }, - { deviceType: '02', orderNum: 2, operateCode: '103', tip: '鼠标左键点击【确定】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0302', - skinCode: '02', - trainingName: '道岔单解({7})', - trainingRemark: '道岔单解功能', - trainingType: '03', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '02', orderNum: 1, operateCode: '104', tip: '鼠标右键菜单选择【道岔单解】' }, - { deviceType: '02', orderNum: 2, operateCode: '1041', tip: '鼠标左键点击【下达】按钮' }, - { deviceType: '02', orderNum: 3, operateCode: '1043', tip: '鼠标左键点击【确认1】按钮' }, - { deviceType: '02', orderNum: 4, operateCode: '1044', tip: '鼠标左键点击【确认2】按钮' }, - { deviceType: '02', orderNum: 5, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0303', - skinCode: '02', - trainingName: '道岔区段封闭({7})', - trainingRemark: '道岔区段封闭功能', - trainingType: '03', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '02', orderNum: 1, operateCode: '105', tip: '鼠标右键菜单选择【道岔区段封闭】' }, - { deviceType: '02', orderNum: 2, operateCode: '105', tip: '鼠标左键点击【确定】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0304', - skinCode: '02', - trainingName: '道岔区段解封({7})', - trainingRemark: '道岔区段解封功能', - trainingType: '03', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '02', orderNum: 1, operateCode: '106', tip: '鼠标右键菜单选择【道岔区段解封】' }, - { deviceType: '02', orderNum: 2, operateCode: '1061', tip: '鼠标左键点击【下达】按钮' }, - { deviceType: '02', orderNum: 3, operateCode: '1063', tip: '鼠标左键点击【确认1】按钮' }, - { deviceType: '02', orderNum: 4, operateCode: '1064', tip: '鼠标左键点击【确认2】按钮' }, - { deviceType: '02', orderNum: 5, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0305', - skinCode: '02', - trainingName: '道岔转动({7})', - trainingRemark: '道岔转动功能({15}转{16})', - trainingType: '03', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '02', orderNum: 1, operateCode: '107', tip: '鼠标右键菜单选择【道岔转动】' }, - { deviceType: '02', orderNum: 2, operateCode: '107', tip: '鼠标左键点击【确定】按钮' } - ] - }, - { - maxDuration: 20, - minDuration: 10, - operateType: '0306', - skinCode: '02', - trainingName: '道岔区段故障解锁({7})', - trainingRemark: '道岔区段故障解锁功能', - trainingType: '03', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '02', orderNum: 1, operateCode: '109', tip: '鼠标右键菜单选择【道岔区段故障解锁】' }, - { deviceType: '02', orderNum: 2, operateCode: '1091', tip: '鼠标左键点击【下达】按钮' }, - { deviceType: '02', orderNum: 3, operateCode: '1093', tip: '鼠标左键点击【确认1】按钮' }, - { deviceType: '02', orderNum: 4, operateCode: '1094', tip: '鼠标左键点击【确认2】按钮' }, - { deviceType: '02', orderNum: 5, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0307', - skinCode: '02', - trainingName: '道岔区段计轴预复位({7})', - trainingRemark: '道岔区段计轴预复位功能', - trainingType: '03', - productTypes: ['01'], - stepVOList: [ - { deviceType: '02', orderNum: 1, operateCode: '110', tip: '鼠标右键菜单选择【道岔区段计轴预复位】' }, - { deviceType: '02', orderNum: 2, operateCode: '1101', tip: '鼠标左键点击【下达】按钮' }, - { deviceType: '02', orderNum: 3, operateCode: '1103', tip: '鼠标左键点击【确认1】按钮' }, - { deviceType: '02', orderNum: 4, operateCode: '1104', tip: '鼠标左键点击【确认2】按钮' }, - { deviceType: '02', orderNum: 5, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0308', - skinCode: '02', - trainingName: '区段切除({7})', - trainingRemark: '区段切除', - trainingType: '03', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '02', orderNum: 1, operateCode: '111', tip: '鼠标右键菜单选择【区段切除】' }, - { deviceType: '02', orderNum: 2, operateCode: '111', tip: '鼠标左键点击【确定】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0309', - skinCode: '02', - trainingName: '区段激活({7})', - trainingRemark: '区段激活功能', - trainingType: '03', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '02', orderNum: 1, operateCode: '112', tip: '鼠标右键菜单选择【区段激活】' }, - { deviceType: '02', orderNum: 2, operateCode: '112', tip: '鼠标左键点击【确定】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0310', - skinCode: '02', - trainingName: '道岔区段设置限速({7})', - trainingRemark: '道岔区段设置限速功能(限速值:5)', - trainingType: '03', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '02', orderNum: 1, operateCode: '113', tip: '鼠标右键菜单选择【道岔区段设置限速】' }, - { deviceType: '02', orderNum: 2, operateCode: '1136', tip: '鼠标左键选择【限速值5】', val: '5' }, - { deviceType: '02', orderNum: 3, operateCode: '1131', tip: '鼠标左键点击【下达】按钮' }, - { deviceType: '02', orderNum: 4, operateCode: '1132', tip: '鼠标左键点击【确认】按钮' }, - { deviceType: '02', orderNum: 5, operateCode: '1133', tip: '鼠标左键点击【确认1】按钮' }, - { deviceType: '02', orderNum: 6, operateCode: '1134', tip: '鼠标左键点击【确认2】按钮', val: '5' }, - { deviceType: '02', orderNum: 7, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0311', - skinCode: '02', - trainingName: '道岔区段取消限速({7})', - trainingRemark: '道岔区段取消限速功能', - trainingType: '03', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '02', orderNum: 1, operateCode: '114', tip: '鼠标右键菜单选择【道岔区段取消限速】' }, - { deviceType: '02', orderNum: 2, operateCode: '1141', tip: '鼠标左键点击【下达】按钮' }, - { deviceType: '02', orderNum: 3, operateCode: '1142', tip: '鼠标左键点击【确认】按钮' }, - { deviceType: '02', orderNum: 4, operateCode: '1143', tip: '鼠标左键点击【确认1】按钮' }, - { deviceType: '02', orderNum: 5, operateCode: '1144', tip: '鼠标左键点击【确认2】按钮', val: '5' }, - { deviceType: '02', orderNum: 6, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' } - ] - }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0301', + skinCode: '02', + trainingName: '道岔单锁({7})', + trainingRemark: '道岔单锁功能', + trainingType: '03', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '02', orderNum: 1, operateCode: '103', tip: '鼠标右键菜单选择【道岔单锁】' }, + { deviceType: '02', orderNum: 2, operateCode: '103', tip: '鼠标左键点击【确定】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0302', + skinCode: '02', + trainingName: '道岔单解({7})', + trainingRemark: '道岔单解功能', + trainingType: '03', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '02', orderNum: 1, operateCode: '104', tip: '鼠标右键菜单选择【道岔单解】' }, + { deviceType: '02', orderNum: 2, operateCode: '1041', tip: '鼠标左键点击【下达】按钮' }, + { deviceType: '02', orderNum: 3, operateCode: '1043', tip: '鼠标左键点击【确认1】按钮' }, + { deviceType: '02', orderNum: 4, operateCode: '1044', tip: '鼠标左键点击【确认2】按钮' }, + { deviceType: '02', orderNum: 5, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0303', + skinCode: '02', + trainingName: '道岔区段封闭({7})', + trainingRemark: '道岔区段封闭功能', + trainingType: '03', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '02', orderNum: 1, operateCode: '105', tip: '鼠标右键菜单选择【道岔区段封闭】' }, + { deviceType: '02', orderNum: 2, operateCode: '105', tip: '鼠标左键点击【确定】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0304', + skinCode: '02', + trainingName: '道岔区段解封({7})', + trainingRemark: '道岔区段解封功能', + trainingType: '03', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '02', orderNum: 1, operateCode: '106', tip: '鼠标右键菜单选择【道岔区段解封】' }, + { deviceType: '02', orderNum: 2, operateCode: '1061', tip: '鼠标左键点击【下达】按钮' }, + { deviceType: '02', orderNum: 3, operateCode: '1063', tip: '鼠标左键点击【确认1】按钮' }, + { deviceType: '02', orderNum: 4, operateCode: '1064', tip: '鼠标左键点击【确认2】按钮' }, + { deviceType: '02', orderNum: 5, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0305', + skinCode: '02', + trainingName: '道岔转动({7})', + trainingRemark: '道岔转动功能({15}转{16})', + trainingType: '03', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '02', orderNum: 1, operateCode: '107', tip: '鼠标右键菜单选择【道岔转动】' }, + { deviceType: '02', orderNum: 2, operateCode: '107', tip: '鼠标左键点击【确定】按钮' } + ] + }, + { + maxDuration: 20, + minDuration: 10, + operateType: '0306', + skinCode: '02', + trainingName: '道岔区段故障解锁({7})', + trainingRemark: '道岔区段故障解锁功能', + trainingType: '03', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '02', orderNum: 1, operateCode: '109', tip: '鼠标右键菜单选择【道岔区段故障解锁】' }, + { deviceType: '02', orderNum: 2, operateCode: '1091', tip: '鼠标左键点击【下达】按钮' }, + { deviceType: '02', orderNum: 3, operateCode: '1093', tip: '鼠标左键点击【确认1】按钮' }, + { deviceType: '02', orderNum: 4, operateCode: '1094', tip: '鼠标左键点击【确认2】按钮' }, + { deviceType: '02', orderNum: 5, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0307', + skinCode: '02', + trainingName: '道岔区段计轴预复位({7})', + trainingRemark: '道岔区段计轴预复位功能', + trainingType: '03', + productTypes: ['01'], + stepVOList: [ + { deviceType: '02', orderNum: 1, operateCode: '110', tip: '鼠标右键菜单选择【道岔区段计轴预复位】' }, + { deviceType: '02', orderNum: 2, operateCode: '1101', tip: '鼠标左键点击【下达】按钮' }, + { deviceType: '02', orderNum: 3, operateCode: '1103', tip: '鼠标左键点击【确认1】按钮' }, + { deviceType: '02', orderNum: 4, operateCode: '1104', tip: '鼠标左键点击【确认2】按钮' }, + { deviceType: '02', orderNum: 5, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0308', + skinCode: '02', + trainingName: '区段切除({7})', + trainingRemark: '区段切除', + trainingType: '03', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '02', orderNum: 1, operateCode: '111', tip: '鼠标右键菜单选择【区段切除】' }, + { deviceType: '02', orderNum: 2, operateCode: '111', tip: '鼠标左键点击【确定】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0309', + skinCode: '02', + trainingName: '区段激活({7})', + trainingRemark: '区段激活功能', + trainingType: '03', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '02', orderNum: 1, operateCode: '112', tip: '鼠标右键菜单选择【区段激活】' }, + { deviceType: '02', orderNum: 2, operateCode: '112', tip: '鼠标左键点击【确定】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0310', + skinCode: '02', + trainingName: '道岔区段设置限速({7})', + trainingRemark: '道岔区段设置限速功能(限速值:5)', + trainingType: '03', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '02', orderNum: 1, operateCode: '113', tip: '鼠标右键菜单选择【道岔区段设置限速】' }, + { deviceType: '02', orderNum: 2, operateCode: '1136', tip: '鼠标左键选择【限速值5】', val: '5' }, + { deviceType: '02', orderNum: 3, operateCode: '1131', tip: '鼠标左键点击【下达】按钮' }, + { deviceType: '02', orderNum: 4, operateCode: '1132', tip: '鼠标左键点击【确认】按钮' }, + { deviceType: '02', orderNum: 5, operateCode: '1133', tip: '鼠标左键点击【确认1】按钮' }, + { deviceType: '02', orderNum: 6, operateCode: '1134', tip: '鼠标左键点击【确认2】按钮', val: '5' }, + { deviceType: '02', orderNum: 7, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0311', + skinCode: '02', + trainingName: '道岔区段取消限速({7})', + trainingRemark: '道岔区段取消限速功能', + trainingType: '03', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '02', orderNum: 1, operateCode: '114', tip: '鼠标右键菜单选择【道岔区段取消限速】' }, + { deviceType: '02', orderNum: 2, operateCode: '1141', tip: '鼠标左键点击【下达】按钮' }, + { deviceType: '02', orderNum: 3, operateCode: '1142', tip: '鼠标左键点击【确认】按钮' }, + { deviceType: '02', orderNum: 4, operateCode: '1143', tip: '鼠标左键点击【确认1】按钮' }, + { deviceType: '02', orderNum: 5, operateCode: '1144', tip: '鼠标左键点击【确认2】按钮', val: '5' }, + { deviceType: '02', orderNum: 6, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' } + ] + }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0201', - skinCode: '02', - trainingName: '进路选排({3})', - trainingRemark: '选择排列进路', - trainingType: '02', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '04', orderNum: 1, operateCode: '301', tip: '鼠标右键菜单选择【进路选排】' }, - { deviceType: '04', orderNum: 2, operateCode: '3011', tip: '鼠标左键选择进路名称【{3}】', val: '{4}' }, - { deviceType: '04', orderNum: 3, operateCode: '301', tip: '鼠标左键点击【确定】按钮' }, - { deviceType: '04', orderNum: 4, operateCode: '3012', tip: '鼠标左键点击【确定】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0202', - skinCode: '02', - trainingName: '进路取消({3})', - trainingRemark: '进路取消', - trainingType: '02', - productTypes: ['02'], - stepVOList: [ - { deviceType: '04', orderNum: 1, operateCode: '303', tip: '鼠标右键菜单选择【进路取消】' }, - { deviceType: '04', orderNum: 2, operateCode: '303', tip: '鼠标左键点击【确定】按钮' }, - { deviceType: '04', orderNum: 3, operateCode: '3031', tip: '鼠标左键点击【确定】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0202', - skinCode: '02', - trainingName: '进路取消({3})', - trainingRemark: '进路取消', - trainingType: '02', - productTypes: ['01'], - stepVOList: [ - { deviceType: '04', orderNum: 1, operateCode: '303', tip: '鼠标右键菜单选择【进路取消】' }, - { deviceType: '04', orderNum: 2, operateCode: '303', tip: '鼠标左键点击【确定】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0203', - skinCode: '02', - trainingName: '信号封闭({5})', - trainingRemark: '信号封闭', - trainingType: '02', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '04', orderNum: 1, operateCode: '306', tip: '鼠标右键菜单选择【信号封闭】' }, - { deviceType: '04', orderNum: 2, operateCode: '306', tip: '鼠标左键点击【确定】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0204', - skinCode: '02', - trainingName: '信号解封({5})', - trainingRemark: '信号解封', - trainingType: '02', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '04', orderNum: 1, operateCode: '307', tip: '鼠标右键菜单选择【信号解封】' }, - { deviceType: '04', orderNum: 2, operateCode: '3071', tip: '鼠标左键点击【下达】按钮' }, - { deviceType: '04', orderNum: 3, operateCode: '3072', tip: '鼠标左键点击【确认】按钮' }, - { deviceType: '04', orderNum: 4, operateCode: '3073', tip: '鼠标左键点击【确认1】按钮' }, - { deviceType: '04', orderNum: 5, operateCode: '3074', tip: '鼠标左键点击【确认2】按钮' }, - { deviceType: '04', orderNum: 6, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0205', - skinCode: '02', - trainingName: '信号关灯({3})', - trainingRemark: '信号关灯', - trainingType: '02', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '04', orderNum: 1, operateCode: '313', tip: '鼠标右键菜单选择【信号关灯】' }, - { deviceType: '04', orderNum: 2, operateCode: '313', tip: '鼠标左键点击【确定】按钮' }, - { deviceType: '04', orderNum: 3, operateCode: '3131', tip: '鼠标左键点击【确定】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0206', - skinCode: '02', - trainingName: '信号重开({3})', - trainingRemark: '信号重开', - trainingType: '02', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '04', orderNum: 1, operateCode: '304', tip: '鼠标右键菜单选择【信号重开】' }, - { deviceType: '04', orderNum: 2, operateCode: '304', tip: '鼠标左键点击【确定】按钮' }, - { deviceType: '04', orderNum: 3, operateCode: '3041', tip: '鼠标左键点击【确定】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0207', - skinCode: '02', - trainingName: '引导进路办理({3})', - trainingRemark: '进路办理信号引导', - trainingType: '02', - productTypes: ['01'], - stepVOList: [ - { deviceType: '04', orderNum: 1, operateCode: '308', tip: '鼠标右键菜单选择【引导进路办理】' }, - { deviceType: '04', orderNum: 2, operateCode: '3081', tip: '鼠标左键点击【下达】按钮' }, - { deviceType: '04', orderNum: 3, operateCode: '3083', tip: '鼠标左键点击【确认1】按钮' }, - { deviceType: '04', orderNum: 4, operateCode: '3084', tip: '鼠标左键点击【确认2】按钮' }, - { deviceType: '04', orderNum: 5, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0208', - skinCode: '02', - trainingName: '自排开({5})', - trainingRemark: '自排开', - trainingType: '02', - productTypes: ['02'], - stepVOList: [ - { deviceType: '04', orderNum: 1, operateCode: '315', tip: '鼠标右键菜单选择【自排开】' }, - { deviceType: '04', orderNum: 2, operateCode: '3151', tip: '鼠标左键选择控制状态为"人工"的进路', val: '{6}' }, - { deviceType: '04', orderNum: 3, operateCode: '315', tip: '鼠标左键点击【确定】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0209', - skinCode: '02', - trainingName: '自排关({5})', - trainingRemark: '自排关', - trainingType: '02', - productTypes: ['02'], - stepVOList: [ - { deviceType: '04', orderNum: 1, operateCode: '314', tip: '鼠标右键菜单选择【自排关】' }, - { deviceType: '04', orderNum: 2, operateCode: '3141', tip: '鼠标左键选择第一条进路', val: '{6}' }, - { deviceType: '04', orderNum: 3, operateCode: '314', tip: '鼠标左键点击【确定】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0210', - skinCode: '02', - trainingName: '查询进路控制状态({5})', - trainingRemark: '查询进路控制状态', - trainingType: '02', - productTypes: ['02'], - stepVOList: [ - { deviceType: '04', orderNum: 1, operateCode: '316', tip: '鼠标右键菜单选择【查询进路控制模式】' }, - { deviceType: '04', orderNum: 2, operateCode: '316', tip: '鼠标左键点击【确定】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0211', - skinCode: '02', - trainingName: '设置联锁自动进路({5})', - trainingRemark: '设置联锁自动进路', - trainingType: '02', - productTypes: ['01'], - stepVOList: [ - { deviceType: '04', orderNum: 1, operateCode: '309', tip: '鼠标右键菜单选择【设置联锁自动进路】' }, - { deviceType: '04', orderNum: 2, operateCode: '309', tip: '鼠标左键点击【确定】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0212', - skinCode: '02', - trainingName: '取消联锁自动进路({5})', - trainingRemark: '取消联锁自动进路', - trainingType: '02', - productTypes: ['01'], - stepVOList: [ - { deviceType: '04', orderNum: 1, operateCode: '310', tip: '鼠标右键菜单选择【取消联锁自动进路】' }, - { deviceType: '04', orderNum: 2, operateCode: '310', tip: '鼠标左键点击【确定】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0213', - skinCode: '02', - trainingName: '设置联锁自动触发({5})', - trainingRemark: '设置联锁自动触发', - trainingType: '02', - productTypes: ['01'], - stepVOList: [ - { deviceType: '04', orderNum: 1, operateCode: '311', tip: '鼠标右键菜单选择【设置联锁自动触发】' }, - { deviceType: '04', orderNum: 2, operateCode: '311', tip: '鼠标左键点击【确定】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0214', - skinCode: '02', - trainingName: '取消联锁自动触发({5})', - trainingRemark: '取消联锁自动触发', - trainingType: '02', - productTypes: ['01'], - stepVOList: [ - { deviceType: '04', orderNum: 1, operateCode: '312', tip: '鼠标右键菜单选择【取消联锁自动触发】' }, - { deviceType: '04', orderNum: 2, operateCode: '312', tip: '鼠标左键点击【确定】按钮' } - ] - } - ] - }, - '03': { // 北京一号线 - list: [ - { - maxDuration: 8, - minDuration: 5, - operateType: '0501', - skinCode: '03', - trainingName: '设置扣车({10}-{12} 站台)', - trainingRemark: '设置扣车功能', - trainingType: '05', - productTypes: ['01,02'], // 产品类型 01 现地 02 行调 - stepVOList: [ - { deviceType: '06', orderNum: 1, operateCode: '504', tip: '鼠标右键菜单选择【设置扣车】' }, - { deviceType: '06', orderNum: 2, operateCode: '504', tip: '鼠标左键点击【确定】按钮' } - ] - }, - { - maxDuration: 8, - minDuration: 5, - operateType: '0502', - skinCode: '03', - trainingName: '取消扣车({10}-{12} 站台)', - trainingRemark: '取消扣车功能', - trainingType: '05', - productTypes: ['01,02'], // 产品类型 01 现地 02 行调 - stepVOList: [ - { deviceType: '06', orderNum: 1, operateCode: '505', tip: '鼠标右键菜单选择【取消扣车】' }, - { deviceType: '06', orderNum: 2, operateCode: '505', tip: '鼠标左键点击【确定】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0505', - skinCode: '03', - trainingName: '设置跳停({10}-{12} 站台)', - trainingRemark: '设置跳停功能', - trainingType: '05', - productTypes: ['01,02'], // 产品类型 01 现地 02 行调 - stepVOList: [ - { deviceType: '06', orderNum: 1, operateCode: '502', tip: '鼠标右键菜单选择【设置跳停】' }, - { deviceType: '06', orderNum: 2, operateCode: '502', tip: '鼠标左键点击【确定】按钮', val: '{11}' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0505', - skinCode: '03', - trainingName: '设置跳停({10}-{12} 站台)', - trainingRemark: '设置指定001号列车跳停功能', - trainingType: '05', - productTypes: ['01,02'], // 产品类型 01 现地 02 行调 - stepVOList: [ - { deviceType: '06', orderNum: 1, operateCode: '502', tip: '鼠标右键菜单选择【设置跳停】' }, - { deviceType: '06', orderNum: 2, operateCode: '5024', tip: '鼠标左键点击' }, - { deviceType: '06', orderNum: 2, operateCode: '5022', tip: '请选择001号车', val: '001' }, - { deviceType: '06', orderNum: 2, operateCode: '502', tip: '鼠标左键点击【确定】按钮', val: '{11}::001' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0506', - skinCode: '03', - trainingName: '取消跳停({10}-{12} 站台)', - trainingRemark: '取消跳停功能', - trainingType: '05', - productTypes: ['01,02'], // 产品类型 01 现地 02 行调 - stepVOList: [ - { deviceType: '06', orderNum: 1, operateCode: '503', tip: '鼠标右键菜单选择【取消跳停】' }, - { deviceType: '06', orderNum: 2, operateCode: '503', tip: '鼠标左键点击【确定】按钮', val: '{11}' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0506', - skinCode: '03', - trainingName: '取消跳停({10}-{12} 站台)', - trainingRemark: '取消指定001号列车跳停功能', - trainingType: '05', - productTypes: ['01,02'], // 产品类型 01 现地 02 行调 - stepVOList: [ - { deviceType: '06', orderNum: 1, operateCode: '503', tip: '鼠标右键菜单选择【取消跳停】' }, - { deviceType: '06', orderNum: 2, operateCode: '5034', tip: '鼠标左键点击' }, - { deviceType: '06', orderNum: 2, operateCode: '5032', tip: '请选择001号车', val: '001' }, - { deviceType: '06', orderNum: 2, operateCode: '503', tip: '鼠标左键点击【确定】按钮', val: '{11}::001' } - ] - }, - { - maxDuration: 8, - minDuration: 5, - operateType: '0507', - skinCode: '03', - trainingName: '查询站台状态({10}-{12} 站台)', - trainingRemark: '查询站台状态功能', - trainingType: '05', - productTypes: ['01,02'], // 产品类型 01 现地 02 行调 - stepVOList: [ - { deviceType: '06', orderNum: 1, operateCode: '507', tip: '鼠标右键菜单选择【站台信息】' }, - { deviceType: '06', orderNum: 2, operateCode: '0012', tip: '鼠标左键点击【确定】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0508', - skinCode: '03', - trainingName: '停站时间控制({10}-{12} 站台)', - trainingRemark: '停站时间控制(自动, 一直有效)', - trainingType: '05', - productTypes: ['02'], - stepVOList: [ - { deviceType: '06', orderNum: 1, operateCode: '509', tip: '鼠标右键菜单选择【停站时间控制】' }, - { deviceType: '06', orderNum: 2, operateCode: '5092', tip: '鼠标左键点击,选择【自动】', val: '01' }, - { deviceType: '06', orderNum: 3, operateCode: '509', tip: '鼠标左键点击【确认】按钮', val: '01::20::true' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0508', - skinCode: '03', - trainingName: '停站时间控制({10}-{12} 站台)', - trainingRemark: '停站时间控制(人工, 20秒, 一直有效)', - trainingType: '05', - productTypes: ['02'], - stepVOList: [ - { deviceType: '06', orderNum: 1, operateCode: '509', tip: '鼠标右键菜单选择【停站时间控制】' }, - { deviceType: '06', orderNum: 2, operateCode: '5092', tip: '鼠标左键点击,选择【人工】', val: '02' }, - { deviceType: '06', orderNum: 3, operateCode: '5094', tip: '输入或鼠标点击,调整为【20】', val: '20' }, - { deviceType: '06', orderNum: 4, operateCode: '509', tip: '鼠标左键点击【确认】按钮', val: '02::20::true' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0508', - skinCode: '03', - trainingName: '停站时间控制({10}-{12} 站台)', - trainingRemark: '停站时间控制(人工, 20秒, 一次有效)', - trainingType: '05', - productTypes: ['02'], - stepVOList: [ - { deviceType: '06', orderNum: 1, operateCode: '509', tip: '鼠标右键菜单选择【停站时间控制】' }, - { deviceType: '06', orderNum: 2, operateCode: '5092', tip: '鼠标左键点击,选择【人工】', val: '02' }, - { deviceType: '06', orderNum: 3, operateCode: '5094', tip: '输入或鼠标点击,调整为【20】', val: '20' }, - { deviceType: '06', orderNum: 4, operateCode: '5093', tip: '鼠标左键点击,选择【一次有效】', val: 'false' }, - { deviceType: '06', orderNum: 5, operateCode: '509', tip: '鼠标左键点击【确认】按钮', val: '02::20::false' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0509', - skinCode: '03', - trainingName: '运行时间控制({10}-{12} 站台)', - trainingRemark: '运行时间控制(设置区间 运行等级1,运行时间为115,一直有效)', - trainingType: '05', - productTypes: ['02'], - stepVOList: [ - { deviceType: '06', orderNum: 1, operateCode: '510', tip: '鼠标右键菜单选择【运行时间控制】' }, - { deviceType: '06', orderNum: 2, operateCode: '5104', tip: '鼠标左键点击,选择【1】', val: '1' }, - { deviceType: '06', orderNum: 3, operateCode: '5101', tip: '鼠标左键点击,选择【115】', val: '115' }, - { deviceType: '06', orderNum: 4, operateCode: '510', tip: '鼠标左键点击【确认】按钮', val: '115::true' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0509', - skinCode: '03', - trainingName: '运行时间控制({10}-{12} 站台)', - trainingRemark: '运行时间控制(设置区间 运行等级1,运行时间为115,一次有效)', - trainingType: '05', - productTypes: ['02'], - stepVOList: [ - { deviceType: '06', orderNum: 1, operateCode: '510', tip: '鼠标右键菜单选择【运行时间控制】' }, - { deviceType: '06', orderNum: 2, operateCode: '5104', tip: '鼠标左键点击,选择【1】', val: '1' }, - { deviceType: '06', orderNum: 3, operateCode: '5101', tip: '鼠标左键点击,选择【115】', val: '115' }, - { deviceType: '06', orderNum: 4, operateCode: '5103', tip: '鼠标左键点击,取消选择【一直有效】', val: 'false' }, - { deviceType: '06', orderNum: 5, operateCode: '510', tip: '鼠标左键点击【确认】按钮', val: '115::false' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0510', - skinCode: '03', - trainingName: '提前发车({10}-{12} 站台)', - trainingRemark: '提前发车功能', - trainingType: '05', - productTypes: ['02'], - stepVOList: [ - { deviceType: '06', orderNum: 1, operateCode: '501', tip: '鼠标右键菜单选择【提前发车】' }, - { deviceType: '06', orderNum: 2, operateCode: '501', tip: '鼠标左键点击【确定】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0511', - skinCode: '03', - trainingName: '变通策略管理({10}-{12} 站台)', - trainingRemark: '变通策略管理功能', - trainingType: '05', - productTypes: ['02'], - stepVOList: [ - { deviceType: '06', orderNum: 1, operateCode: '511', tip: '鼠标右键菜单选择【变通策略管理】' }, - { deviceType: '06', orderNum: 2, operateCode: '5111', tip: '鼠标左键点击,选择【无折返】', val: '01' }, - { deviceType: '06', orderNum: 3, operateCode: '511', tip: '鼠标左键点击【确定】按钮', val: '01' } - ] - }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0201', + skinCode: '02', + trainingName: '进路选排({3})', + trainingRemark: '选择排列进路', + trainingType: '02', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '04', orderNum: 1, operateCode: '301', tip: '鼠标右键菜单选择【进路选排】' }, + { deviceType: '04', orderNum: 2, operateCode: '3011', tip: '鼠标左键选择进路名称【{3}】', val: '{4}' }, + { deviceType: '04', orderNum: 3, operateCode: '301', tip: '鼠标左键点击【确定】按钮' }, + { deviceType: '04', orderNum: 4, operateCode: '3012', tip: '鼠标左键点击【确定】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0202', + skinCode: '02', + trainingName: '进路取消({3})', + trainingRemark: '进路取消', + trainingType: '02', + productTypes: ['02'], + stepVOList: [ + { deviceType: '04', orderNum: 1, operateCode: '303', tip: '鼠标右键菜单选择【进路取消】' }, + { deviceType: '04', orderNum: 2, operateCode: '303', tip: '鼠标左键点击【确定】按钮' }, + { deviceType: '04', orderNum: 3, operateCode: '3031', tip: '鼠标左键点击【确定】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0202', + skinCode: '02', + trainingName: '进路取消({3})', + trainingRemark: '进路取消', + trainingType: '02', + productTypes: ['01'], + stepVOList: [ + { deviceType: '04', orderNum: 1, operateCode: '303', tip: '鼠标右键菜单选择【进路取消】' }, + { deviceType: '04', orderNum: 2, operateCode: '303', tip: '鼠标左键点击【确定】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0203', + skinCode: '02', + trainingName: '信号封闭({5})', + trainingRemark: '信号封闭', + trainingType: '02', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '04', orderNum: 1, operateCode: '306', tip: '鼠标右键菜单选择【信号封闭】' }, + { deviceType: '04', orderNum: 2, operateCode: '306', tip: '鼠标左键点击【确定】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0204', + skinCode: '02', + trainingName: '信号解封({5})', + trainingRemark: '信号解封', + trainingType: '02', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '04', orderNum: 1, operateCode: '307', tip: '鼠标右键菜单选择【信号解封】' }, + { deviceType: '04', orderNum: 2, operateCode: '3071', tip: '鼠标左键点击【下达】按钮' }, + { deviceType: '04', orderNum: 3, operateCode: '3072', tip: '鼠标左键点击【确认】按钮' }, + { deviceType: '04', orderNum: 4, operateCode: '3073', tip: '鼠标左键点击【确认1】按钮' }, + { deviceType: '04', orderNum: 5, operateCode: '3074', tip: '鼠标左键点击【确认2】按钮' }, + { deviceType: '04', orderNum: 6, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0205', + skinCode: '02', + trainingName: '信号关灯({3})', + trainingRemark: '信号关灯', + trainingType: '02', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '04', orderNum: 1, operateCode: '313', tip: '鼠标右键菜单选择【信号关灯】' }, + { deviceType: '04', orderNum: 2, operateCode: '313', tip: '鼠标左键点击【确定】按钮' }, + { deviceType: '04', orderNum: 3, operateCode: '3131', tip: '鼠标左键点击【确定】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0206', + skinCode: '02', + trainingName: '信号重开({3})', + trainingRemark: '信号重开', + trainingType: '02', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '04', orderNum: 1, operateCode: '304', tip: '鼠标右键菜单选择【信号重开】' }, + { deviceType: '04', orderNum: 2, operateCode: '304', tip: '鼠标左键点击【确定】按钮' }, + { deviceType: '04', orderNum: 3, operateCode: '3041', tip: '鼠标左键点击【确定】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0207', + skinCode: '02', + trainingName: '引导进路办理({3})', + trainingRemark: '进路办理信号引导', + trainingType: '02', + productTypes: ['01'], + stepVOList: [ + { deviceType: '04', orderNum: 1, operateCode: '308', tip: '鼠标右键菜单选择【引导进路办理】' }, + { deviceType: '04', orderNum: 2, operateCode: '3081', tip: '鼠标左键点击【下达】按钮' }, + { deviceType: '04', orderNum: 3, operateCode: '3083', tip: '鼠标左键点击【确认1】按钮' }, + { deviceType: '04', orderNum: 4, operateCode: '3084', tip: '鼠标左键点击【确认2】按钮' }, + { deviceType: '04', orderNum: 5, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0208', + skinCode: '02', + trainingName: '自排开({5})', + trainingRemark: '自排开', + trainingType: '02', + productTypes: ['02'], + stepVOList: [ + { deviceType: '04', orderNum: 1, operateCode: '315', tip: '鼠标右键菜单选择【自排开】' }, + { deviceType: '04', orderNum: 2, operateCode: '3151', tip: '鼠标左键选择控制状态为"人工"的进路', val: '{6}' }, + { deviceType: '04', orderNum: 3, operateCode: '315', tip: '鼠标左键点击【确定】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0209', + skinCode: '02', + trainingName: '自排关({5})', + trainingRemark: '自排关', + trainingType: '02', + productTypes: ['02'], + stepVOList: [ + { deviceType: '04', orderNum: 1, operateCode: '314', tip: '鼠标右键菜单选择【自排关】' }, + { deviceType: '04', orderNum: 2, operateCode: '3141', tip: '鼠标左键选择第一条进路', val: '{6}' }, + { deviceType: '04', orderNum: 3, operateCode: '314', tip: '鼠标左键点击【确定】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0210', + skinCode: '02', + trainingName: '查询进路控制状态({5})', + trainingRemark: '查询进路控制状态', + trainingType: '02', + productTypes: ['02'], + stepVOList: [ + { deviceType: '04', orderNum: 1, operateCode: '316', tip: '鼠标右键菜单选择【查询进路控制模式】' }, + { deviceType: '04', orderNum: 2, operateCode: '316', tip: '鼠标左键点击【确定】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0211', + skinCode: '02', + trainingName: '设置联锁自动进路({5})', + trainingRemark: '设置联锁自动进路', + trainingType: '02', + productTypes: ['01'], + stepVOList: [ + { deviceType: '04', orderNum: 1, operateCode: '309', tip: '鼠标右键菜单选择【设置联锁自动进路】' }, + { deviceType: '04', orderNum: 2, operateCode: '309', tip: '鼠标左键点击【确定】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0212', + skinCode: '02', + trainingName: '取消联锁自动进路({5})', + trainingRemark: '取消联锁自动进路', + trainingType: '02', + productTypes: ['01'], + stepVOList: [ + { deviceType: '04', orderNum: 1, operateCode: '310', tip: '鼠标右键菜单选择【取消联锁自动进路】' }, + { deviceType: '04', orderNum: 2, operateCode: '310', tip: '鼠标左键点击【确定】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0213', + skinCode: '02', + trainingName: '设置联锁自动触发({5})', + trainingRemark: '设置联锁自动触发', + trainingType: '02', + productTypes: ['01'], + stepVOList: [ + { deviceType: '04', orderNum: 1, operateCode: '311', tip: '鼠标右键菜单选择【设置联锁自动触发】' }, + { deviceType: '04', orderNum: 2, operateCode: '311', tip: '鼠标左键点击【确定】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0214', + skinCode: '02', + trainingName: '取消联锁自动触发({5})', + trainingRemark: '取消联锁自动触发', + trainingType: '02', + productTypes: ['01'], + stepVOList: [ + { deviceType: '04', orderNum: 1, operateCode: '312', tip: '鼠标右键菜单选择【取消联锁自动触发】' }, + { deviceType: '04', orderNum: 2, operateCode: '312', tip: '鼠标左键点击【确定】按钮' } + ] + } + ] + }, + '03': { // 北京一号线 + list: [ + { + maxDuration: 8, + minDuration: 5, + operateType: '0501', + skinCode: '03', + trainingName: '设置扣车({10}-{12} 站台)', + trainingRemark: '设置扣车功能', + trainingType: '05', + productTypes: ['01', '02'], // 产品类型 01 现地 02 行调 + stepVOList: [ + { deviceType: '06', orderNum: 1, operateCode: '504', tip: '鼠标右键菜单选择【设置扣车】' }, + { deviceType: '06', orderNum: 2, operateCode: '504', tip: '鼠标左键点击【确定】按钮' } + ] + }, + { + maxDuration: 8, + minDuration: 5, + operateType: '0502', + skinCode: '03', + trainingName: '取消扣车({10}-{12} 站台)', + trainingRemark: '取消扣车功能', + trainingType: '05', + productTypes: ['01', '02'], // 产品类型 01 现地 02 行调 + stepVOList: [ + { deviceType: '06', orderNum: 1, operateCode: '505', tip: '鼠标右键菜单选择【取消扣车】' }, + { deviceType: '06', orderNum: 2, operateCode: '505', tip: '鼠标左键点击【确定】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0505', + skinCode: '03', + trainingName: '设置跳停({10}-{12} 站台)', + trainingRemark: '设置跳停功能', + trainingType: '05', + productTypes: ['01', '02'], // 产品类型 01 现地 02 行调 + stepVOList: [ + { deviceType: '06', orderNum: 1, operateCode: '502', tip: '鼠标右键菜单选择【设置跳停】' }, + { deviceType: '06', orderNum: 2, operateCode: '502', tip: '鼠标左键点击【确定】按钮', val: '{11}' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0505', + skinCode: '03', + trainingName: '设置跳停({10}-{12} 站台)', + trainingRemark: '设置指定001号列车跳停功能', + trainingType: '05', + productTypes: ['01', '02'], // 产品类型 01 现地 02 行调 + stepVOList: [ + { deviceType: '06', orderNum: 1, operateCode: '502', tip: '鼠标右键菜单选择【设置跳停】' }, + { deviceType: '06', orderNum: 2, operateCode: '5024', tip: '鼠标左键点击' }, + { deviceType: '06', orderNum: 2, operateCode: '5022', tip: '请选择001号车', val: '001' }, + { deviceType: '06', orderNum: 2, operateCode: '502', tip: '鼠标左键点击【确定】按钮', val: '{11}::001' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0506', + skinCode: '03', + trainingName: '取消跳停({10}-{12} 站台)', + trainingRemark: '取消跳停功能', + trainingType: '05', + productTypes: ['01', '02'], // 产品类型 01 现地 02 行调 + stepVOList: [ + { deviceType: '06', orderNum: 1, operateCode: '503', tip: '鼠标右键菜单选择【取消跳停】' }, + { deviceType: '06', orderNum: 2, operateCode: '503', tip: '鼠标左键点击【确定】按钮', val: '{11}' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0506', + skinCode: '03', + trainingName: '取消跳停({10}-{12} 站台)', + trainingRemark: '取消指定001号列车跳停功能', + trainingType: '05', + productTypes: ['01', '02'], // 产品类型 01 现地 02 行调 + stepVOList: [ + { deviceType: '06', orderNum: 1, operateCode: '503', tip: '鼠标右键菜单选择【取消跳停】' }, + { deviceType: '06', orderNum: 2, operateCode: '5034', tip: '鼠标左键点击' }, + { deviceType: '06', orderNum: 2, operateCode: '5032', tip: '请选择001号车', val: '001' }, + { deviceType: '06', orderNum: 2, operateCode: '503', tip: '鼠标左键点击【确定】按钮', val: '{11}::001' } + ] + }, + { + maxDuration: 8, + minDuration: 5, + operateType: '0507', + skinCode: '03', + trainingName: '查询站台状态({10}-{12} 站台)', + trainingRemark: '查询站台状态功能', + trainingType: '05', + productTypes: ['01', '02'], // 产品类型 01 现地 02 行调 + stepVOList: [ + { deviceType: '06', orderNum: 1, operateCode: '507', tip: '鼠标右键菜单选择【站台信息】' }, + { deviceType: '06', orderNum: 2, operateCode: '0012', tip: '鼠标左键点击【确定】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0508', + skinCode: '03', + trainingName: '停站时间控制({10}-{12} 站台)', + trainingRemark: '停站时间控制(自动, 一直有效)', + trainingType: '05', + productTypes: ['02'], + stepVOList: [ + { deviceType: '06', orderNum: 1, operateCode: '509', tip: '鼠标右键菜单选择【停站时间控制】' }, + { deviceType: '06', orderNum: 2, operateCode: '5092', tip: '鼠标左键点击,选择【自动】', val: '01' }, + { deviceType: '06', orderNum: 3, operateCode: '509', tip: '鼠标左键点击【确认】按钮', val: '01::20::true' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0508', + skinCode: '03', + trainingName: '停站时间控制({10}-{12} 站台)', + trainingRemark: '停站时间控制(人工, 20秒, 一直有效)', + trainingType: '05', + productTypes: ['02'], + stepVOList: [ + { deviceType: '06', orderNum: 1, operateCode: '509', tip: '鼠标右键菜单选择【停站时间控制】' }, + { deviceType: '06', orderNum: 2, operateCode: '5092', tip: '鼠标左键点击,选择【人工】', val: '02' }, + { deviceType: '06', orderNum: 3, operateCode: '5094', tip: '输入或鼠标点击,调整为【20】', val: '20' }, + { deviceType: '06', orderNum: 4, operateCode: '509', tip: '鼠标左键点击【确认】按钮', val: '02::20::true' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0508', + skinCode: '03', + trainingName: '停站时间控制({10}-{12} 站台)', + trainingRemark: '停站时间控制(人工, 20秒, 一次有效)', + trainingType: '05', + productTypes: ['02'], + stepVOList: [ + { deviceType: '06', orderNum: 1, operateCode: '509', tip: '鼠标右键菜单选择【停站时间控制】' }, + { deviceType: '06', orderNum: 2, operateCode: '5092', tip: '鼠标左键点击,选择【人工】', val: '02' }, + { deviceType: '06', orderNum: 3, operateCode: '5094', tip: '输入或鼠标点击,调整为【20】', val: '20' }, + { deviceType: '06', orderNum: 4, operateCode: '5093', tip: '鼠标左键点击,选择【一次有效】', val: 'false' }, + { deviceType: '06', orderNum: 5, operateCode: '509', tip: '鼠标左键点击【确认】按钮', val: '02::20::false' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0509', + skinCode: '03', + trainingName: '运行时间控制({10}-{12} 站台)', + trainingRemark: '运行时间控制(设置区间 运行等级1,运行时间为115,一直有效)', + trainingType: '05', + productTypes: ['02'], + stepVOList: [ + { deviceType: '06', orderNum: 1, operateCode: '510', tip: '鼠标右键菜单选择【运行时间控制】' }, + { deviceType: '06', orderNum: 2, operateCode: '5104', tip: '鼠标左键点击,选择【1】', val: '1' }, + { deviceType: '06', orderNum: 3, operateCode: '5101', tip: '鼠标左键点击,选择【115】', val: '115' }, + { deviceType: '06', orderNum: 4, operateCode: '510', tip: '鼠标左键点击【确认】按钮', val: '115::true' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0509', + skinCode: '03', + trainingName: '运行时间控制({10}-{12} 站台)', + trainingRemark: '运行时间控制(设置区间 运行等级1,运行时间为115,一次有效)', + trainingType: '05', + productTypes: ['02'], + stepVOList: [ + { deviceType: '06', orderNum: 1, operateCode: '510', tip: '鼠标右键菜单选择【运行时间控制】' }, + { deviceType: '06', orderNum: 2, operateCode: '5104', tip: '鼠标左键点击,选择【1】', val: '1' }, + { deviceType: '06', orderNum: 3, operateCode: '5101', tip: '鼠标左键点击,选择【115】', val: '115' }, + { deviceType: '06', orderNum: 4, operateCode: '5103', tip: '鼠标左键点击,取消选择【一直有效】', val: 'false' }, + { deviceType: '06', orderNum: 5, operateCode: '510', tip: '鼠标左键点击【确认】按钮', val: '115::false' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0510', + skinCode: '03', + trainingName: '提前发车({10}-{12} 站台)', + trainingRemark: '提前发车功能', + trainingType: '05', + productTypes: ['02'], + stepVOList: [ + { deviceType: '06', orderNum: 1, operateCode: '501', tip: '鼠标右键菜单选择【提前发车】' }, + { deviceType: '06', orderNum: 2, operateCode: '501', tip: '鼠标左键点击【确定】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0511', + skinCode: '03', + trainingName: '变通策略管理({10}-{12} 站台)', + trainingRemark: '变通策略管理功能', + trainingType: '05', + productTypes: ['02'], + stepVOList: [ + { deviceType: '06', orderNum: 1, operateCode: '511', tip: '鼠标右键菜单选择【变通策略管理】' }, + { deviceType: '06', orderNum: 2, operateCode: '5111', tip: '鼠标左键点击,选择【无折返】', val: '01' }, + { deviceType: '06', orderNum: 3, operateCode: '511', tip: '鼠标左键点击【确定】按钮', val: '01' } + ] + }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0402', - skinCode: '03', - trainingName: '轨道切除({8}{9} 区段)', - trainingRemark: '轨道切除功能', - trainingType: '04', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '03', orderNum: 1, operateCode: '405', tip: '鼠标右键菜单选择【轨道切除】' }, - { deviceType: '03', orderNum: 2, operateCode: '405', tip: '鼠标左键点击【确定】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0403', - skinCode: '03', - trainingName: '轨道激活({8}{9} 区段)', - trainingRemark: '轨道激活功能', - trainingType: '04', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '03', orderNum: 1, operateCode: '406', tip: '鼠标右键菜单选择【轨道激活】' }, - { deviceType: '03', orderNum: 2, operateCode: '406', tip: '鼠标左键点击【确定】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0407', - skinCode: '03', - trainingName: '设置临时限速({8}{9} 区段)', - trainingRemark: '设置临时限速功能(限速值:15)', - trainingType: '04', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '03', orderNum: 1, operateCode: '407', tip: '鼠标右键菜单选择【设置临时限速】' }, - { deviceType: '03', orderNum: 2, operateCode: '4076', tip: '鼠标左键选择【限速值15】', val: '15' }, - { deviceType: '03', orderNum: 3, operateCode: '4071', tip: '鼠标左键点击【下达】按钮' }, - { deviceType: '03', orderNum: 4, operateCode: '4072', tip: '鼠标左键点击【确认】按钮' }, - { deviceType: '03', orderNum: 5, operateCode: '4073', tip: '鼠标左键点击【确认1】按钮' }, - { deviceType: '03', orderNum: 6, operateCode: '4074', tip: '鼠标左键点击【确认2】按钮', val: '15' }, - { deviceType: '03', orderNum: 7, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' } - ] - }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0402', + skinCode: '03', + trainingName: '轨道切除({8}{9} 区段)', + trainingRemark: '轨道切除功能', + trainingType: '04', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '03', orderNum: 1, operateCode: '405', tip: '鼠标右键菜单选择【轨道切除】' }, + { deviceType: '03', orderNum: 2, operateCode: '405', tip: '鼠标左键点击【确定】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0403', + skinCode: '03', + trainingName: '轨道激活({8}{9} 区段)', + trainingRemark: '轨道激活功能', + trainingType: '04', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '03', orderNum: 1, operateCode: '406', tip: '鼠标右键菜单选择【轨道激活】' }, + { deviceType: '03', orderNum: 2, operateCode: '406', tip: '鼠标左键点击【确定】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0407', + skinCode: '03', + trainingName: '设置临时限速({8}{9} 区段)', + trainingRemark: '设置临时限速功能(限速值:15)', + trainingType: '04', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '03', orderNum: 1, operateCode: '407', tip: '鼠标右键菜单选择【设置临时限速】' }, + { deviceType: '03', orderNum: 2, operateCode: '4076', tip: '鼠标左键选择【限速值15】', val: '15' }, + { deviceType: '03', orderNum: 3, operateCode: '4071', tip: '鼠标左键点击【下达】按钮' }, + { deviceType: '03', orderNum: 4, operateCode: '4072', tip: '鼠标左键点击【确认】按钮' }, + { deviceType: '03', orderNum: 5, operateCode: '4073', tip: '鼠标左键点击【确认1】按钮' }, + { deviceType: '03', orderNum: 6, operateCode: '4074', tip: '鼠标左键点击【确认2】按钮', val: '15' }, + { deviceType: '03', orderNum: 7, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' } + ] + }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0308', - skinCode: '03', - trainingName: '轨道切除({7} 道岔)', - trainingRemark: '轨道切除功能', - trainingType: '03', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '02', orderNum: 1, operateCode: '111', tip: '鼠标右键菜单选择【轨道切除】' }, - { deviceType: '02', orderNum: 2, operateCode: '111', tip: '鼠标左键点击【确定】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0309', - skinCode: '03', - trainingName: '轨道激活({7} 道岔)', - trainingRemark: '轨道激活功能', - trainingType: '03', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '02', orderNum: 1, operateCode: '112', tip: '鼠标右键菜单选择【轨道激活】' }, - { deviceType: '02', orderNum: 2, operateCode: '112', tip: '鼠标左键点击【确定】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0310', - skinCode: '03', - trainingName: '设置临时限速({7} 道岔)', - trainingRemark: '设置临时限速功能(限速值 35 零点西上行公里标0 - 零点西上行公里标3000)', - trainingType: '03', - productTypes: ['01,02'], - // stepVOList: [ - // { deviceType: '02', orderNum: 1, operateCode: '113', tip: '鼠标右键菜单选择【设置临时限速】' }, - // { deviceType: '02', orderNum: 2, operateCode: '1131', tip: '鼠标左键选择【打开会话】' }, - // { deviceType: '02', orderNum: 3, operateCode: '1132', tip: '选择【35】', val: '35' }, - // { deviceType: '02', orderNum: 4, operateCode: '1134', tip: '选择【零点西上行】', val: '01' }, - // { deviceType: '02', orderNum: 5, operateCode: '1135', tip: '输入0', val: '0' }, - // { deviceType: '02', orderNum: 6, operateCode: '1136', tip: '选择【零点西上行】', val: '01' }, - // { deviceType: '02', orderNum: 7, operateCode: '1137', tip: '输入3000', val: '3000' }, - // { deviceType: '02', orderNum: 8, operateCode: '1138', tip: '鼠标左键点击【确认设备】', val: '35::01::0::01::3000' }, - // { deviceType: '02', orderNum: 9, operateCode: '1139', tip: '鼠标左键点击【首次确认】' }, - // { deviceType: '02', orderNum: 10, operateCode: '11310', tip: '选择【35】', val: '35' }, - // { deviceType: '02', orderNum: 11, operateCode: '11311', tip: '选择【零点西上行】', val: '01' }, - // { deviceType: '02', orderNum: 12, operateCode: '11312', tip: '选择【0】', val: '0' }, - // { deviceType: '02', orderNum: 13, operateCode: '11313', tip: '选择【零点西上行】', val: '01' }, - // { deviceType: '02', orderNum: 14, operateCode: '11314', tip: '选择【3000】', val: '3000' }, - // { deviceType: '02', orderNum: 15, operateCode: '11315', tip: '鼠标左键点击【确认设备】' }, - // { deviceType: '02', orderNum: 16, operateCode: '114', tip: '鼠标左键点击【确认发送】', val: '35::01::0::01::3000' }, - // { deviceType: '02', orderNum: 17, operateCode: '11317', tip: '鼠标左键点击【关闭】' }, - // { deviceType: '02', orderNum: 18, operateCode: '11318', tip: '鼠标左键点击【确认】' }, - // ] - stepVOList: [ - { deviceType: '02', orderNum: 1, operateCode: '113', tip: '鼠标右键菜单选择【设置临时限速】' }, - { deviceType: '02', orderNum: 2, operateCode: '1136', tip: '鼠标左键选择【限速值35】', val: '35' }, - { deviceType: '02', orderNum: 3, operateCode: '1131', tip: '鼠标左键点击【下达】按钮' }, - { deviceType: '02', orderNum: 4, operateCode: '1132', tip: '鼠标左键点击【确认】按钮' }, - { deviceType: '02', orderNum: 5, operateCode: '1133', tip: '鼠标左键点击【确认1】按钮' }, - { deviceType: '02', orderNum: 6, operateCode: '1134', tip: '鼠标左键点击【确认2】按钮', val: '35' }, - { deviceType: '02', orderNum: 7, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' } - ] - }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0308', + skinCode: '03', + trainingName: '轨道切除({7} 道岔)', + trainingRemark: '轨道切除功能', + trainingType: '03', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '02', orderNum: 1, operateCode: '111', tip: '鼠标右键菜单选择【轨道切除】' }, + { deviceType: '02', orderNum: 2, operateCode: '111', tip: '鼠标左键点击【确定】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0309', + skinCode: '03', + trainingName: '轨道激活({7} 道岔)', + trainingRemark: '轨道激活功能', + trainingType: '03', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '02', orderNum: 1, operateCode: '112', tip: '鼠标右键菜单选择【轨道激活】' }, + { deviceType: '02', orderNum: 2, operateCode: '112', tip: '鼠标左键点击【确定】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0310', + skinCode: '03', + trainingName: '设置临时限速({7} 道岔)', + trainingRemark: '设置临时限速功能(限速值 35 零点西上行公里标0 - 零点西上行公里标3000)', + trainingType: '03', + productTypes: ['01', '02'], + // stepVOList: [ + // { deviceType: '02', orderNum: 1, operateCode: '113', tip: '鼠标右键菜单选择【设置临时限速】' }, + // { deviceType: '02', orderNum: 2, operateCode: '1131', tip: '鼠标左键选择【打开会话】' }, + // { deviceType: '02', orderNum: 3, operateCode: '1132', tip: '选择【35】', val: '35' }, + // { deviceType: '02', orderNum: 4, operateCode: '1134', tip: '选择【零点西上行】', val: '01' }, + // { deviceType: '02', orderNum: 5, operateCode: '1135', tip: '输入0', val: '0' }, + // { deviceType: '02', orderNum: 6, operateCode: '1136', tip: '选择【零点西上行】', val: '01' }, + // { deviceType: '02', orderNum: 7, operateCode: '1137', tip: '输入3000', val: '3000' }, + // { deviceType: '02', orderNum: 8, operateCode: '1138', tip: '鼠标左键点击【确认设备】', val: '35::01::0::01::3000' }, + // { deviceType: '02', orderNum: 9, operateCode: '1139', tip: '鼠标左键点击【首次确认】' }, + // { deviceType: '02', orderNum: 10, operateCode: '11310', tip: '选择【35】', val: '35' }, + // { deviceType: '02', orderNum: 11, operateCode: '11311', tip: '选择【零点西上行】', val: '01' }, + // { deviceType: '02', orderNum: 12, operateCode: '11312', tip: '选择【0】', val: '0' }, + // { deviceType: '02', orderNum: 13, operateCode: '11313', tip: '选择【零点西上行】', val: '01' }, + // { deviceType: '02', orderNum: 14, operateCode: '11314', tip: '选择【3000】', val: '3000' }, + // { deviceType: '02', orderNum: 15, operateCode: '11315', tip: '鼠标左键点击【确认设备】' }, + // { deviceType: '02', orderNum: 16, operateCode: '114', tip: '鼠标左键点击【确认发送】', val: '35::01::0::01::3000' }, + // { deviceType: '02', orderNum: 17, operateCode: '11317', tip: '鼠标左键点击【关闭】' }, + // { deviceType: '02', orderNum: 18, operateCode: '11318', tip: '鼠标左键点击【确认】' }, + // ] + stepVOList: [ + { deviceType: '02', orderNum: 1, operateCode: '113', tip: '鼠标右键菜单选择【设置临时限速】' }, + { deviceType: '02', orderNum: 2, operateCode: '1136', tip: '鼠标左键选择【限速值35】', val: '35' }, + { deviceType: '02', orderNum: 3, operateCode: '1131', tip: '鼠标左键点击【下达】按钮' }, + { deviceType: '02', orderNum: 4, operateCode: '1132', tip: '鼠标左键点击【确认】按钮' }, + { deviceType: '02', orderNum: 5, operateCode: '1133', tip: '鼠标左键点击【确认1】按钮' }, + { deviceType: '02', orderNum: 6, operateCode: '1134', tip: '鼠标左键点击【确认2】按钮', val: '35' }, + { deviceType: '02', orderNum: 7, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' } + ] + }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0201', - skinCode: '03', - trainingName: '排列进路({3} 进路)', - trainingRemark: '排列进路功能', - trainingType: '02', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '04', orderNum: 1, operateCode: '301', tip: '鼠标右键菜单选择【排列进路】' }, - { deviceType: '04', orderNum: 2, operateCode: '3011', tip: '鼠标左键选择进路名称【{3}】', val: '{4}' }, - { deviceType: '04', orderNum: 3, operateCode: '301', tip: '鼠标左键点击【确定】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0202', - skinCode: '03', - trainingName: '取消进路({3} 进路)', - trainingRemark: '取消进路功能', - trainingType: '02', - productTypes: ['02'], - stepVOList: [ - { deviceType: '04', orderNum: 1, operateCode: '303', tip: '鼠标右键菜单选择【取消进路】' }, - { deviceType: '04', orderNum: 2, operateCode: '303', tip: '鼠标左键点击【确定】按钮' } - ] - }, - { - maxDuration: 8, - minDuration: 5, - operateType: '0210', - skinCode: '03', - trainingName: '查询进路控制状态({5} 信号机)', - trainingRemark: '查询进路控制状态功能', - trainingType: '02', - productTypes: ['02'], - stepVOList: [ - { deviceType: '04', orderNum: 1, operateCode: '316', tip: '鼠标右键菜单选择【查询进路控制状态】' }, - { deviceType: '04', orderNum: 2, operateCode: '316', tip: '鼠标左键点击【确定】按钮' } - ] - }, - { - maxDuration: 8, - minDuration: 5, - operateType: '0208', - skinCode: '03', - trainingName: '进路交自动控({5} 信号机)', - trainingRemark: '进路交自动控功能', - trainingType: '02', - productTypes: ['02'], - stepVOList: [ - { deviceType: '04', orderNum: 1, operateCode: '315', tip: '鼠标右键菜单选择【进路交自动控】' }, - { deviceType: '04', orderNum: 2, operateCode: '3151', tip: '鼠标左键选择【{5}】', val: '{6}' }, - { deviceType: '04', orderNum: 3, operateCode: '315', tip: '鼠标左键点击【确定】按钮' } - ] - }, - { - maxDuration: 8, - minDuration: 5, - operateType: '0209', - skinCode: '03', - trainingName: '进路交人工控({5} 信号机)', - trainingRemark: '进路交人工控功能', - trainingType: '02', - productTypes: ['02'], - stepVOList: [ - { deviceType: '04', orderNum: 1, operateCode: '314', tip: '鼠标右键菜单选择【进路交人工控】' }, - { deviceType: '04', orderNum: 2, operateCode: '3141', tip: '鼠标左键选择【{5}】', val: '{6}' }, - { deviceType: '04', orderNum: 3, operateCode: '314', tip: '鼠标左键点击【确定】按钮' } - ] - }, - { - maxDuration: 8, - minDuration: 5, - operateType: '0206', - skinCode: '03', - trainingName: '信号重开({3} 进路)', - trainingRemark: '信号重开功能', - trainingType: '02', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '04', orderNum: 1, operateCode: '304', tip: '鼠标右键菜单选择【信号重开】' }, - { deviceType: '04', orderNum: 2, operateCode: '304', tip: '鼠标左键点击【确定】按钮' } - ] - }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0201', + skinCode: '03', + trainingName: '排列进路({3} 进路)', + trainingRemark: '排列进路功能', + trainingType: '02', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '04', orderNum: 1, operateCode: '301', tip: '鼠标右键菜单选择【排列进路】' }, + { deviceType: '04', orderNum: 2, operateCode: '3011', tip: '鼠标左键选择进路名称【{3}】', val: '{4}' }, + { deviceType: '04', orderNum: 3, operateCode: '301', tip: '鼠标左键点击【确定】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0202', + skinCode: '03', + trainingName: '取消进路({3} 进路)', + trainingRemark: '取消进路功能', + trainingType: '02', + productTypes: ['02'], + stepVOList: [ + { deviceType: '04', orderNum: 1, operateCode: '303', tip: '鼠标右键菜单选择【取消进路】' }, + { deviceType: '04', orderNum: 2, operateCode: '303', tip: '鼠标左键点击【确定】按钮' } + ] + }, + { + maxDuration: 8, + minDuration: 5, + operateType: '0210', + skinCode: '03', + trainingName: '查询进路控制状态({5} 信号机)', + trainingRemark: '查询进路控制状态功能', + trainingType: '02', + productTypes: ['02'], + stepVOList: [ + { deviceType: '04', orderNum: 1, operateCode: '316', tip: '鼠标右键菜单选择【查询进路控制状态】' }, + { deviceType: '04', orderNum: 2, operateCode: '316', tip: '鼠标左键点击【确定】按钮' } + ] + }, + { + maxDuration: 8, + minDuration: 5, + operateType: '0208', + skinCode: '03', + trainingName: '进路交自动控({5} 信号机)', + trainingRemark: '进路交自动控功能', + trainingType: '02', + productTypes: ['02'], + stepVOList: [ + { deviceType: '04', orderNum: 1, operateCode: '315', tip: '鼠标右键菜单选择【进路交自动控】' }, + { deviceType: '04', orderNum: 2, operateCode: '3151', tip: '鼠标左键选择【{5}】', val: '{6}' }, + { deviceType: '04', orderNum: 3, operateCode: '315', tip: '鼠标左键点击【确定】按钮' } + ] + }, + { + maxDuration: 8, + minDuration: 5, + operateType: '0209', + skinCode: '03', + trainingName: '进路交人工控({5} 信号机)', + trainingRemark: '进路交人工控功能', + trainingType: '02', + productTypes: ['02'], + stepVOList: [ + { deviceType: '04', orderNum: 1, operateCode: '314', tip: '鼠标右键菜单选择【进路交人工控】' }, + { deviceType: '04', orderNum: 2, operateCode: '3141', tip: '鼠标左键选择【{5}】', val: '{6}' }, + { deviceType: '04', orderNum: 3, operateCode: '314', tip: '鼠标左键点击【确定】按钮' } + ] + }, + { + maxDuration: 8, + minDuration: 5, + operateType: '0206', + skinCode: '03', + trainingName: '信号重开({3} 进路)', + trainingRemark: '信号重开功能', + trainingType: '02', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '04', orderNum: 1, operateCode: '304', tip: '鼠标右键菜单选择【信号重开】' }, + { deviceType: '04', orderNum: 2, operateCode: '304', tip: '鼠标左键点击【确定】按钮' } + ] + }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0801', - skinCode: '03', - trainingName: '全线取消临时限速', - trainingRemark: '全线取消临时限速功能', - trainingType: '08', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '10', orderNum: 1, operateCode: '800', tip: '鼠标右键菜单选择【取消全线临时限速】' }, - { deviceType: '10', orderNum: 2, operateCode: '8001', tip: '鼠标左键点击【打开会话】按钮' }, - { deviceType: '10', orderNum: 3, operateCode: '8003', tip: '鼠标左键点击【确认】按钮' }, - { deviceType: '10', orderNum: 4, operateCode: '8004', tip: '鼠标左键点击【确认】按钮' }, - { deviceType: '10', orderNum: 5, operateCode: '8005', tip: '鼠标左键点击【关闭】按钮' }, - { deviceType: '10', orderNum: 6, operateCode: '8006', tip: '鼠标左键点击【确定】按钮' } - ] - } - ] - }, - '04': { // 成都三号线 - list: [ - // 信号机列表 - { - maxDuration: 15, - minDuration: 8, - operateType: '0201', - skinCode: '04', - trainingName: '办理进路({3} 进路)', - trainingRemark: '办理进路功能', - trainingType: '02', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '04', orderNum: 1, operateCode: '301', tip: '鼠标右键菜单选择【办理进路】' }, - { deviceType: '04', orderNum: 2, operateCode: '3011', tip: '鼠标左键选择进路名称【{3}】', val: '{4}' }, - { deviceType: '04', orderNum: 3, operateCode: '301', tip: '鼠标左键点击【确定】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0207', - skinCode: '04', - trainingName: '办理引导进路({3})', - trainingRemark: '进路办理信号引导', - trainingType: '02', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '04', orderNum: 1, operateCode: '308', tip: '鼠标右键菜单选择【办理引导进路】' }, - { deviceType: '04', orderNum: 2, operateCode: '3085', tip: '鼠标左键选择进路名称【{3}】' }, - { deviceType: '04', orderNum: 3, operateCode: '308', tip: '鼠标左键点击【确认】按钮' }, - { deviceType: '04', orderNum: 4, operateCode: '0012', tip: '鼠标左键点击【确认】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0202', - skinCode: '04', - trainingName: '取消进路({3} 进路)', - trainingRemark: '取消进路功能', - trainingType: '02', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '04', orderNum: 1, operateCode: '303', tip: '鼠标右键菜单选择【取消进路】' }, - { deviceType: '04', orderNum: 2, operateCode: '303', tip: '鼠标左键点击【确定】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0207', - skinCode: '04', - trainingName: '总人解({3})', - trainingRemark: '总人解', - trainingType: '02', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '04', orderNum: 1, operateCode: '305', tip: '鼠标右键菜单选择【总人解】' }, - { deviceType: '04', orderNum: 2, operateCode: '305', tip: '鼠标左键点击【确定】按钮' }, - { deviceType: '04', orderNum: 3, operateCode: '3051', tip: '输入密码123456,点击【确定】按钮' } - ] - }, - { - maxDuration: 8, - minDuration: 5, - operateType: '0206', - skinCode: '04', - trainingName: '信号重开({3} 进路)', - trainingRemark: '信号重开功能', - trainingType: '02', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '04', orderNum: 1, operateCode: '304', tip: '鼠标右键菜单选择【信号重开】' }, - { deviceType: '04', orderNum: 2, operateCode: '304', tip: '鼠标左键点击【确定】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0203', - skinCode: '04', - trainingName: '信号封锁({5})', - trainingRemark: '信号封闭', - trainingType: '02', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '04', orderNum: 1, operateCode: '306', tip: '鼠标右键菜单选择【信号封闭】' }, - { deviceType: '04', orderNum: 2, operateCode: '306', tip: '鼠标左键点击【确定】按钮' }, - { deviceType: '04', orderNum: 3, operateCode: '3061', tip: '输入密码123456,点击【确定】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0204', - skinCode: '04', - trainingName: '信号解封({5})', - trainingRemark: '信号解封', - trainingType: '02', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '04', orderNum: 1, operateCode: '307', tip: '鼠标右键菜单选择【信号解封】' }, - { deviceType: '04', orderNum: 2, operateCode: '307', tip: '鼠标左键点击【确认】按钮' }, - { deviceType: '04', orderNum: 3, operateCode: '3072', tip: '输入密码123456,点击【确认】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0208', - skinCode: '04', - trainingName: '进路收人工控({5})', - trainingRemark: '进路收人工控', - trainingType: '02', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '04', orderNum: 1, operateCode: '315', tip: '鼠标右键菜单选择【自排开】' }, - { deviceType: '04', orderNum: 2, operateCode: '3151', tip: '鼠标左键选择控制状态为"人工"的进路', val: '{6}' }, - { deviceType: '04', orderNum: 3, operateCode: '315', tip: '鼠标左键点击【确定】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0209', - skinCode: '04', - trainingName: '进路交自动控({5})', - trainingRemark: '进路交自动控', - trainingType: '02', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '04', orderNum: 1, operateCode: '314', tip: '鼠标右键菜单选择【自排关】' }, - { deviceType: '04', orderNum: 2, operateCode: '3141', tip: '鼠标左键选择第一条进路', val: '{6}' }, - { deviceType: '04', orderNum: 3, operateCode: '314', tip: '鼠标左键点击【确定】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0210', - skinCode: '04', - trainingName: '查询进路控制状态({5})', - trainingRemark: '查询进路控制状态', - trainingType: '02', - productTypes: ['02'], - stepVOList: [ - { deviceType: '04', orderNum: 1, operateCode: '316', tip: '鼠标右键菜单选择【查询进路控制模式】' }, - { deviceType: '04', orderNum: 2, operateCode: '000', tip: '鼠标左键点击【关闭】按钮' } - ] - }, - // 道岔列表 - { - maxDuration: 15, - minDuration: 8, - operateType: '0305', - skinCode: '04', - trainingName: '单操到定位({7})', - trainingRemark: '单操到定位({15})', - trainingType: '03', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '02', orderNum: 1, operateCode: '101', tip: '鼠标右键菜单选择【单操到定位】' }, - { deviceType: '02', orderNum: 2, operateCode: '101', tip: '鼠标左键点击【确定】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0305', - skinCode: '04', - trainingName: '单操到反位({7})', - trainingRemark: '单操到反位({7})', - trainingType: '03', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '02', orderNum: 1, operateCode: '102', tip: '鼠标右键菜单选择【单操到反位】' }, - { deviceType: '02', orderNum: 2, operateCode: '102', tip: '鼠标左键点击【确定】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0301', - skinCode: '04', - trainingName: '道岔单锁({7})', - trainingRemark: '道岔单锁功能', - trainingType: '03', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '02', orderNum: 1, operateCode: '103', tip: '鼠标右键菜单选择【道岔单锁】' }, - { deviceType: '02', orderNum: 2, operateCode: '103', tip: '鼠标左键点击【确定】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0302', - skinCode: '04', - trainingName: '道岔解锁({7})', - trainingRemark: '道岔解锁功能', - trainingType: '03', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '02', orderNum: 1, operateCode: '104', tip: '鼠标右键菜单选择【道岔解锁】' }, - { deviceType: '02', orderNum: 5, operateCode: '104', tip: '鼠标左键点击【确定】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0303', - skinCode: '04', - trainingName: '道岔封锁({7})', - trainingRemark: '道岔封锁功能', - trainingType: '03', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '02', orderNum: 1, operateCode: '105', tip: '鼠标右键菜单选择【道岔封锁】' }, - { deviceType: '02', orderNum: 2, operateCode: '105', tip: '鼠标左键点击【确定】按钮' }, - { deviceType: '02', orderNum: 3, operateCode: '1051', tip: '输入密码123456,点击【确定】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0304', - skinCode: '04', - trainingName: '道岔解封({7})', - trainingRemark: '道岔解封功能', - trainingType: '03', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '02', orderNum: 1, operateCode: '106', tip: '鼠标右键菜单选择【道岔解封】' }, - { deviceType: '02', orderNum: 2, operateCode: '106', tip: '鼠标左键点击【确认】按钮' }, - { deviceType: '02', orderNum: 3, operateCode: '1062', tip: '输入密码123456,点击【确认】按钮' } - ] - }, - { - maxDuration: 20, - minDuration: 10, - operateType: '0306', - skinCode: '04', - trainingName: '区故解({7})', - trainingRemark: '道岔区段故障解锁功能', - trainingType: '03', - productTypes: ['02'], - stepVOList: [ - { deviceType: '02', orderNum: 1, operateCode: '109', tip: '鼠标右键菜单选择【区故解】' }, - { deviceType: '02', orderNum: 2, operateCode: '109', tip: '鼠标左键点击【确认】按钮' }, - { deviceType: '02', orderNum: 3, operateCode: '1092', tip: '输入密码123456,点击【确认】按钮' } - ] - }, - // 区段列表 - { - maxDuration: 15, - minDuration: 8, - operateType: '0401', - skinCode: '04', - trainingName: '区故解({8}{9})', - trainingRemark: '故障解锁功能', - trainingType: '04', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '03', orderNum: 1, operateCode: '402', tip: '鼠标右键菜单选择【区故解】' }, - { deviceType: '03', orderNum: 2, operateCode: '402', tip: '鼠标左键点击【确认】按钮' }, - { deviceType: '03', orderNum: 3, operateCode: '4023', tip: '输入密码123456,点击【确认】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0409', - skinCode: '04', - trainingName: '属性({8}{9})', - trainingRemark: '区段详情({8}{9})', - trainingType: '04', - productTypes: ['02'], - stepVOList: [ - { deviceType: '03', orderNum: 1, operateCode: '410', tip: '鼠标右键菜单选择【属性】' }, - { deviceType: '03', orderNum: 2, operateCode: '410', tip: '鼠标左键点击【确认】按钮' } - ] - }, - // 站台列表 - { - maxDuration: 15, - minDuration: 8, - operateType: '0501', - skinCode: '04', - trainingName: '设置扣车({10}-{12}站台)', - trainingRemark: '设置扣车功能', - trainingType: '05', - productTypes: ['02'], - stepVOList: [ - { deviceType: '06', orderNum: 1, operateCode: '504', tip: '鼠标右键菜单选择【设置扣车】' }, - { deviceType: '06', orderNum: 2, operateCode: '504', tip: '鼠标左键点击【确定】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0502', - skinCode: '04', - trainingName: '取消扣车({10}-{12}站台)', - trainingRemark: '设置取消扣车功能', - trainingType: '05', - productTypes: ['02'], - stepVOList: [ - { deviceType: '06', orderNum: 1, operateCode: '505', tip: '鼠标右键菜单选择【取消扣车】' }, - { deviceType: '06', orderNum: 2, operateCode: '505', tip: '鼠标左键点击【确定】按钮' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0502', - skinCode: '04', - trainingName: '取消扣车({10}-{12}站台)', - trainingRemark: '设置取消扣车功能(上行全线)', - trainingType: '05', - productTypes: ['02'], - stepVOList: [ - { deviceType: '06', orderNum: 1, operateCode: '505', tip: '鼠标右键菜单选择【取消扣车】' }, - { deviceType: '06', orderNum: 2, operateCode: '5051', tip: '鼠标左键点击【上行全线】按钮', val: '02' }, - { deviceType: '06', orderNum: 3, operateCode: '508', tip: '鼠标左键点击【确定】按钮', val: '02' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0505', - skinCode: '04', - trainingName: '设置跳停({10}-{12}站台)', - trainingRemark: '设置跳停功能', - trainingType: '05', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '06', orderNum: 1, operateCode: '502', tip: '鼠标右键菜单选择【跳停】' }, - { deviceType: '06', orderNum: 2, operateCode: '502', tip: '鼠标左键点击【确定】按钮', val: '{11}' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0506', - skinCode: '04', - trainingName: '取消跳停({10}-{12}站台)', - trainingRemark: '设置取消跳停功能', - trainingType: '05', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '06', orderNum: 1, operateCode: '503', tip: '鼠标右键菜单选择【取消跳停】' }, - { deviceType: '06', orderNum: 2, operateCode: '503', tip: '鼠标左键点击【确定】按钮', val: '{11}' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0508', - skinCode: '04', - trainingName: '设置停站时间({10}-{12}站台)', - trainingRemark: '设置停站时间(自动, 一直有效)', - trainingType: '05', - productTypes: ['02'], - stepVOList: [ - { deviceType: '06', orderNum: 1, operateCode: '509', tip: '鼠标右键菜单选择【设置停站时间】' }, - { deviceType: '06', orderNum: 2, operateCode: '5093', tip: '鼠标左键点击,选择【自动】', val: '02' }, - { deviceType: '06', orderNum: 3, operateCode: '509', tip: '鼠标左键点击【确认】按钮', val: '01::0::true' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0508', - skinCode: '04', - trainingName: '设置停站时间({10}-{12}站台)', - trainingRemark: '设置停站时间(人工, 20秒, 一直有效)', - trainingType: '05', - productTypes: ['02'], - stepVOList: [ - { deviceType: '06', orderNum: 1, operateCode: '509', tip: '鼠标右键菜单选择【设置停站时间】' }, - { deviceType: '06', orderNum: 2, operateCode: '5092', tip: '鼠标左键点击,选择【人工】', val: '02' }, - { deviceType: '06', orderNum: 3, operateCode: '5094', tip: '输入或鼠标点击,调整为【20】', val: '20' }, - { deviceType: '06', orderNum: 4, operateCode: '5093', tip: '标左键点击,选择【一直有效】', val: '02' }, - { deviceType: '06', orderNum: 5, operateCode: '509', tip: '鼠标左键点击【确认】按钮', val: '02::20::true' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0508', - skinCode: '04', - trainingName: '设置停站时间({10}-{12}站台)', - trainingRemark: '设置停站时间(人工, 20秒, 一次有效)', - trainingType: '05', - productTypes: ['02'], - stepVOList: [ - { deviceType: '06', orderNum: 1, operateCode: '509', tip: '鼠标右键菜单选择【设置停站时间】' }, - { deviceType: '06', orderNum: 2, operateCode: '5092', tip: '鼠标左键点击,选择【人工】', val: '02' }, - { deviceType: '06', orderNum: 3, operateCode: '5094', tip: '输入或鼠标点击,调整为【20】', val: '20' }, - { deviceType: '06', orderNum: 4, operateCode: '509', tip: '鼠标左键点击【确认】按钮', val: '02::20::false' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0509', - skinCode: '04', - trainingName: '设置站间运行等级({10}-{12}站台)', - trainingRemark: '设置站间运行等级(自动, 一直有效)', - trainingType: '05', - productTypes: ['02'], - stepVOList: [ - { deviceType: '06', orderNum: 1, operateCode: '510', tip: '鼠标右键菜单选择【设置站间运行等级】' }, - { deviceType: '06', orderNum: 2, operateCode: '5107', tip: '标左键点击,选择【一直有效】', val: '02' }, - { deviceType: '06', orderNum: 4, operateCode: '510', tip: '鼠标左键点击【确认】按钮', val: '01::01::true' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0509', - skinCode: '04', - trainingName: '设置站间运行等级({10}-{12}站台)', - trainingRemark: '设置站间运行等级(人工, 常速, 一直有效)', - trainingType: '05', - productTypes: ['02'], - stepVOList: [ - { deviceType: '06', orderNum: 1, operateCode: '510', tip: '鼠标右键菜单选择【设置站间运行等级】' }, - { deviceType: '06', orderNum: 2, operateCode: '5106', tip: '鼠标左键点击,选择【人工】', val: '02' }, - { deviceType: '06', orderNum: 3, operateCode: '5107', tip: '鼠标左键点击,取消选择【一直有效】', val: '02' }, - { deviceType: '06', orderNum: 4, operateCode: '510', tip: '鼠标左键点击【确认】按钮', val: '02::01::true' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0509', - skinCode: '04', - trainingName: '设置站间运行等级({10}-{12}站台)', - trainingRemark: '设置站间运行等级(人工, 常速, 一次有效)', - trainingType: '05', - productTypes: ['02'], - stepVOList: [ - { deviceType: '06', orderNum: 1, operateCode: '510', tip: '鼠标右键菜单选择【设置站间运行等级】' }, - { deviceType: '06', orderNum: 2, operateCode: '5106', tip: '鼠标左键点击,选择【人工】', val: '02' }, - { deviceType: '06', orderNum: 4, operateCode: '510', tip: '鼠标左键点击【确认】按钮', val: '02::01::false' } - ] - }, - { - maxDuration: 8, - minDuration: 5, - operateType: '0507', - skinCode: '04', - trainingName: '属性({10}-{12}站台)', - trainingRemark: '查询站台状态功能', - trainingType: '05', - productTypes: ['02'], - stepVOList: [ - { deviceType: '06', orderNum: 1, operateCode: '507', tip: '鼠标右键菜单选择【属性】' }, - { deviceType: '06', orderNum: 2, operateCode: '0012', tip: '鼠标左键点击【确定】按钮' } - ] - } - ] - }, - '05': { // 国际版线 - list: [ - { - maxDuration: 20, - minDuration: 15, - operateType: '0103', - skinCode: '05', - trainingName: 'To control({1})', - trainingRemark: 'Control permission conversion, station control to central control', - trainingType: '01', - productTypes: ['02'], - stepVOList: [ - { deviceType: 'bar', orderNum: 1, operateCode: '0024', tip: 'Click the top menu bar with the left mouse button' }, - { deviceType: 'bar', orderNum: 2, operateCode: '2041', tip: 'Click [turn to central control] with the left mouse button' }, - { deviceType: '05', orderNum: 3, operateCode: '2042', tip: 'The left mouse button selects the control area to be converted【{1}】', val: '{2}' }, - { deviceType: '05', orderNum: 4, operateCode: '204', tip: 'Click [request central control] with the left mouse button', val: '{2}' }, - { deviceType: '05', orderNum: 5, operateCode: '2043', tip: 'Click the [ok] button with the left mouse button', val: '{2}' }, - { deviceType: '05', orderNum: 6, operateCode: '0013', tip: 'Click the [ok] button with the left mouse button' }, - { deviceType: 'bar', orderNum: 7, operateCode: '000', tip: 'Click the [close] button with the left mouse button' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0101', - skinCode: '05', - trainingName: 'To stand accused of({1})', - trainingRemark: 'Control permission conversion, central control transfer station control', - trainingType: '01', - productTypes: ['01'], - stepVOList: [ - { deviceType: 'bar', orderNum: 1, operateCode: '0024', tip: 'Click the top menu bar with the left mouse button' }, - { deviceType: 'bar', orderNum: 2, operateCode: '2021', tip: 'Click the left mouse button [turn to station control]' }, - { deviceType: '05', orderNum: 3, operateCode: '2022', tip: 'The left mouse button selects the control area to be converted【{1}】', val: '{2}' }, - { deviceType: '05', orderNum: 4, operateCode: '202', tip: 'Click [request station control] with the left mouse button', val: '{2}' }, - { deviceType: '05', orderNum: 5, operateCode: '2023', tip: 'Click the [ok] button with the left mouse button', val: '{2}' }, - { deviceType: '05', orderNum: 6, operateCode: '0013', tip: 'Click the [ok] button with the left mouse button' }, - { deviceType: 'bar', orderNum: 7, operateCode: '000', tip: 'Click the [close] button with the left mouse button' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0102', - skinCode: '05', - trainingName: 'Forced to stand accused of({1})', - trainingRemark: 'Control permission conversion, mandatory station control', - trainingType: '01', - productTypes: ['01'], - stepVOList: [ - { deviceType: 'bar', orderNum: 1, operateCode: '0024', tip: 'Click the top menu bar with the left mouse button' }, - { deviceType: 'bar', orderNum: 2, operateCode: '2034', tip: 'Click [mandatory station control] with the left mouse button' }, - { deviceType: 'bar', orderNum: 3, operateCode: '2035', tip: 'After entering the default password [123456] with the left mouse button, click the "ok" button' }, - { deviceType: '05', orderNum: 4, operateCode: '2032', tip: 'The left mouse button selects the control area to be converted【{1}】', val: '{2}' }, - { deviceType: '05', orderNum: 5, operateCode: '203', tip: 'Click [mandatory station control] with the left mouse button', val: '{2}' }, - { deviceType: '05', orderNum: 6, operateCode: '2033', tip: 'Click the [ok] button with the left mouse button', val: '{2}' }, - { deviceType: '05', orderNum: 7, operateCode: '0013', tip: 'Click the [ok] button with the left mouse button' }, - { deviceType: 'bar', orderNum: 8, operateCode: '000', tip: 'Click the [close] button with the left mouse button' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0501', - skinCode: '05', - trainingName: 'The platform car buckle({10}-{12}station)', - trainingRemark: 'Set the button function', - trainingType: '05', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '06', orderNum: 1, operateCode: '504', tip: 'Right mouse button menu select [button car]' }, - { deviceType: '06', orderNum: 2, operateCode: '504', tip: 'Click the [ok] button with the left mouse button' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0502', - skinCode: '05', - trainingName: 'Stop at platform({10}-{12}The platform)', - trainingRemark: 'Set unbutton function', - trainingType: '05', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '06', orderNum: 1, operateCode: '505', tip: 'Right mouse button menu select [cancel car button]' }, - { deviceType: '06', orderNum: 2, operateCode: '505', tip: 'Click the [ok] button with the left mouse button' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0503', - skinCode: '05', - trainingName: 'Compulsory cancellation of car seizure({10}-{12}The platform)', - trainingRemark: 'Force to cancel the car button function', - trainingType: '05', - productTypes: ['01'], - stepVOList: [ - { deviceType: '06', orderNum: 1, operateCode: '506', tip: 'Right mouse button menu select [forced cancel car button]' }, - { deviceType: '06', orderNum: 2, operateCode: '506', tip: 'Click the [ok] button with the left mouse button' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0504', - skinCode: '05', - trainingName: 'Cancel all stops({10}-{12}The platform)', - trainingRemark: 'Cancel button function across the board (default uplink across the board/downlink across the board, no choice)', - trainingType: '05', - productTypes: ['02'], - stepVOList: [ - { deviceType: '06', orderNum: 1, operateCode: '508', tip: 'Right mouse button menu select [cancel car button across the board]' }, - { deviceType: '06', orderNum: 2, operateCode: '508', tip: 'Click the [ok] button with the left mouse button', val: '{11}' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0504', - skinCode: '05', - trainingName: 'Cancel all stops({10}-{12}The platform)', - trainingRemark: 'Cancel button function on all lines (select all lines up/down)', - trainingType: '05', - productTypes: ['02'], - stepVOList: [ - { deviceType: '06', orderNum: 1, operateCode: '508', tip: 'Right mouse button menu select [cancel car button across the board]' }, - { deviceType: '06', orderNum: 2, operateCode: '5081', tip: 'Right mouse button menu selection【{14}Across the board】', val: '{13}' }, - { deviceType: '06', orderNum: 3, operateCode: '508', tip: 'Click the [ok] button with the left mouse button', val: '{13}' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0505', - skinCode: '05', - trainingName: 'The platform jump stop({10}-{12}The platform)', - trainingRemark: 'Set the jump stop function', - trainingType: '05', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '06', orderNum: 1, operateCode: '502', tip: 'Right mouse button menu selection [jump stop]' }, - { deviceType: '06', orderNum: 2, operateCode: '502', tip: 'Click the [ok] button with the left mouse button', val: '{11}' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0506', - skinCode: '05', - trainingName: 'Cancel out({10}-{12}The platform)', - trainingRemark: 'Set to cancel jump stop function', - trainingType: '05', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '06', orderNum: 1, operateCode: '503', tip: 'Right mouse button menu select [cancel jump stop]' }, - { deviceType: '06', orderNum: 2, operateCode: '503', tip: 'Click the [ok] button with the left mouse button', val: '{11}' } - ] - }, - { - maxDuration: 8, - minDuration: 5, - operateType: '0507', - skinCode: '05', - trainingName: 'Query platform status({10}-{12}The platform)', - trainingRemark: 'Query platform status function', - trainingType: '05', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '06', orderNum: 1, operateCode: '507', tip: 'Right mouse button menu selection [query platform status]' }, - { deviceType: '06', orderNum: 2, operateCode: '0012', tip: 'Click the [ok] button with the left mouse button' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0508', - skinCode: '05', - trainingName: 'Set the stop time({10}-{12}The platform)', - trainingRemark: 'Set stop time (automatic, always in effect)', - trainingType: '05', - productTypes: ['02'], - stepVOList: [ - { deviceType: '06', orderNum: 1, operateCode: '509', tip: 'Right mouse button menu select [set stop time]' }, - { deviceType: '06', orderNum: 2, operateCode: '5092', tip: 'Click the left mouse button and select [auto]', val: '01' }, - { deviceType: '06', orderNum: 3, operateCode: '509', tip: 'Click the [ok] button with the left mouse button', val: '01::20::true' }, - { deviceType: '06', orderNum: 4, operateCode: '5091', tip: 'Click the [ok] button with the left mouse button', val: '01::20::true' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0508', - skinCode: '05', - trainingName: 'Set the stop time({10}-{12}The platform)', - trainingRemark: 'Set stop time (manual, 20 seconds, always valid)', - trainingType: '05', - productTypes: ['02'], - stepVOList: [ - { deviceType: '06', orderNum: 1, operateCode: '509', tip: 'Right mouse button menu select [set stop time]' }, - { deviceType: '06', orderNum: 2, operateCode: '5092', tip: 'Click the left mouse button and select [manual]', val: '02' }, - { deviceType: '06', orderNum: 3, operateCode: '5094', tip: 'Input or mouse click, adjust to [20]', val: '20' }, - { deviceType: '06', orderNum: 4, operateCode: '509', tip: 'Click the [ok] button with the left mouse button', val: '02::20::true' }, - { deviceType: '06', orderNum: 5, operateCode: '5091', tip: 'Click the [ok] button with the left mouse button', val: '02::20::true' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0508', - skinCode: '05', - trainingName: 'Set the stop time({10}-{12}The platform)', - trainingRemark: 'Set stop time (manual, 20 seconds, valid once)', - trainingType: '05', - productTypes: ['02'], - stepVOList: [ - { deviceType: '06', orderNum: 1, operateCode: '509', tip: 'Right mouse button menu select [set stop time]' }, - { deviceType: '06', orderNum: 2, operateCode: '5092', tip: 'Click the left mouse button and select [manual]', val: '02' }, - { deviceType: '06', orderNum: 3, operateCode: '5094', tip: 'Input or mouse click, adjust to [20]', val: '20' }, - { deviceType: '06', orderNum: 4, operateCode: '5093', tip: 'Click the left mouse button and select "valid once".', val: 'false' }, - { deviceType: '06', orderNum: 5, operateCode: '509', tip: 'Click the [ok] button with the left mouse button', val: '02::20::false' }, - { deviceType: '06', orderNum: 6, operateCode: '5091', tip: 'Click the [ok] button with the left mouse button', val: '02::20::false' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0509', - skinCode: '05', - trainingName: 'Set operation level({10}-{12}The platform)', - trainingRemark: 'Set the running level (set the interval running time to 60, which is always valid)', - trainingType: '05', - productTypes: ['02'], - stepVOList: [ - { deviceType: '06', orderNum: 1, operateCode: '510', tip: 'Right mouse button menu selection [set operation level]' }, - { deviceType: '06', orderNum: 2, operateCode: '5101', tip: 'Click the left mouse button and select [60]', val: '60' }, - { deviceType: '06', orderNum: 3, operateCode: '510', tip: 'Click the [ok] button with the left mouse button', val: '60::true' }, - { deviceType: '06', orderNum: 4, operateCode: '5102', tip: 'Click the [ok] button with the left mouse button', val: '60::true' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0509', - skinCode: '05', - trainingName: 'Set operation level({10}-{12}The platform)', - trainingRemark: 'Set the running level (set the interval running time to 60, valid once)', - trainingType: '05', - productTypes: ['02'], - stepVOList: [ - { deviceType: '06', orderNum: 1, operateCode: '510', tip: 'Right mouse button menu selection [set operation level]' }, - { deviceType: '06', orderNum: 2, operateCode: '5101', tip: 'Click the left mouse button and select [60]', val: '60' }, - { deviceType: '06', orderNum: 3, operateCode: '5103', tip: 'Click the left mouse button to deselect.', val: 'false' }, - { deviceType: '06', orderNum: 4, operateCode: '510', tip: 'Click the [ok] button with the left mouse button', val: '60::false' }, - { deviceType: '06', orderNum: 5, operateCode: '5102', tip: 'Click the [ok] button with the left mouse button', val: '60::false' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0510', - skinCode: '05', - trainingName: 'Set early departure({10}-{12}The platform)', - trainingRemark: 'Set the early departure function', - trainingType: '05', - productTypes: ['02'], - stepVOList: [ - { deviceType: '06', orderNum: 1, operateCode: '501', tip: 'Right mouse button menu select [set early departure]' }, - { deviceType: '06', orderNum: 2, operateCode: '501', tip: 'Click the [ok] button with the left mouse button' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0511', - skinCode: '05', - trainingName: 'Manual return policy setting({10}-{12}The platform)', - trainingRemark: 'Manual return policy setting function', - trainingType: '05', - productTypes: ['02'], - stepVOList: [ - { deviceType: '06', orderNum: 1, operateCode: '511', tip: 'Right mouse button menu selection [manual return strategy setting]' }, - { deviceType: '06', orderNum: 2, operateCode: '5111', tip: 'Click the left mouse button and select "no return".', val: '01' }, - { deviceType: '06', orderNum: 3, operateCode: '511', tip: 'Click the [ok] button with the left mouse button', val: '01' } - ] - }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0801', + skinCode: '03', + trainingName: '全线取消临时限速', + trainingRemark: '全线取消临时限速功能', + trainingType: '08', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '10', orderNum: 1, operateCode: '800', tip: '鼠标右键菜单选择【取消全线临时限速】' }, + { deviceType: '10', orderNum: 2, operateCode: '8001', tip: '鼠标左键点击【打开会话】按钮' }, + { deviceType: '10', orderNum: 3, operateCode: '8003', tip: '鼠标左键点击【确认】按钮' }, + { deviceType: '10', orderNum: 4, operateCode: '8004', tip: '鼠标左键点击【确认】按钮' }, + { deviceType: '10', orderNum: 5, operateCode: '8005', tip: '鼠标左键点击【关闭】按钮' }, + { deviceType: '10', orderNum: 6, operateCode: '8006', tip: '鼠标左键点击【确定】按钮' } + ] + } + ] + }, + '04': { // 成都三号线 + list: [ + // 信号机列表 + { + maxDuration: 15, + minDuration: 8, + operateType: '0201', + skinCode: '04', + trainingName: '办理进路({3} 进路)', + trainingRemark: '办理进路功能', + trainingType: '02', + productTypes: ['02'], + stepVOList: [ + { deviceType: '04', orderNum: 1, operateCode: '301', tip: '鼠标右键菜单选择【办理进路】' }, + { deviceType: '04', orderNum: 2, operateCode: '3011', tip: '鼠标左键选择进路名称【{3}】', val: '{4}' }, + { deviceType: '04', orderNum: 3, operateCode: '301', tip: '鼠标左键点击【确定】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0201', + skinCode: '04', + trainingName: '办理进路({3} 进路)', + trainingRemark: '办理进路功能', + trainingType: '02', + productTypes: ['01'], + stepVOList: [ + { deviceType: 'mbm', orderNum: 1, operateCode: '3010', tip: '鼠标左键点击【排列进路】' }, + { deviceType: '04', orderNum: 2, operateCode: '3010', tip: '鼠标左键点击【{5}】', val: '{6}' }, + { deviceType: '04', orderNum: 3, operateCode: '3010', tip: '鼠标左键点击【{5}】', val: '{6}' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0207', + skinCode: '04', + trainingName: '办理引导进路({3})', + trainingRemark: '进路办理信号引导', + trainingType: '02', + productTypes: ['02'], + stepVOList: [ + { deviceType: '04', orderNum: 1, operateCode: '308', tip: '鼠标右键菜单选择【办理引导进路】' }, + { deviceType: '04', orderNum: 2, operateCode: '3086', tip: '鼠标左键选择进路名称【{3}】', val: '{4}' }, // 进路编号值不正确 + { deviceType: '04', orderNum: 3, operateCode: '308', tip: '鼠标左键点击【确认】按钮' } + ] + }, + // { + // maxDuration: 15, + // minDuration: 8, + // operateType: '0207', + // skinCode: '04', + // trainingName: '引导进路({3})', + // trainingRemark: '进路办理信号引导', + // trainingType: '02', + // productTypes: ['01'], + // stepVOList: [ + // { deviceType: 'mbm', orderNum: 1, operateCode: '3080', tip: '鼠标左键点击【引导进路】' }, + // { deviceType: '04', orderNum: 2, operateCode: '3080', tip: '鼠标左键点击【{5}】', val: '{6}' }, // 进路编号值不正确 + // { deviceType: 'mbm', orderNum: 3, operateCode: '0011', tip: '输入密码123456,点击【确定】按钮' }, + // { deviceType: '04', orderNum: 4, operateCode: '3080', tip: '鼠标左键点击【{5}】', val: '{6}' } + // ] + // }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0202', + skinCode: '04', + trainingName: '取消进路({3} 进路)', + trainingRemark: '取消进路功能', + trainingType: '02', + productTypes: ['02'], + stepVOList: [ + { deviceType: '04', orderNum: 1, operateCode: '303', tip: '鼠标右键菜单选择【取消进路】' }, + { deviceType: '04', orderNum: 2, operateCode: '303', tip: '鼠标左键点击【确定】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0202', + skinCode: '04', + trainingName: '总取消({3} 进路)', + trainingRemark: '总取消功能', + trainingType: '02', + productTypes: ['01'], + stepVOList: [ + { deviceType: 'mbm', orderNum: 1, operateCode: '3030', tip: '鼠标左键点击【总取消】' }, + { deviceType: '04', orderNum: 2, operateCode: '3030', tip: '鼠标左键点击【{5}】按钮', val: '{6}' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0215', // 新增数据字典code + skinCode: '04', + trainingName: '总人解({3})', + trainingRemark: '总人解', + trainingType: '02', + productTypes: ['02'], + stepVOList: [ + { deviceType: '04', orderNum: 1, operateCode: '305', tip: '鼠标右键菜单选择【总人解】' }, + { deviceType: '04', orderNum: 2, operateCode: '305', tip: '鼠标左键点击【确定】按钮' }, + { deviceType: '04', orderNum: 3, operateCode: '3051', tip: '输入密码123456,点击【确定】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0215', // 新增数据字典code + skinCode: '04', + trainingName: '总人解({3})', + trainingRemark: '总人解', + trainingType: '02', + productTypes: ['01'], + stepVOList: [ + { deviceType: 'mbm', orderNum: 1, operateCode: '3050', tip: '鼠标左键点击【总人解】' }, + { deviceType: 'mbm', orderNum: 2, operateCode: '0011', tip: '输入密码123456,点击【确定】按钮' }, + { deviceType: '04', orderNum: 3, operateCode: '3050', tip: '鼠标左键点击【{5}】', val: '{6}' } + ] + }, + { + maxDuration: 8, + minDuration: 5, + operateType: '0206', + skinCode: '04', + trainingName: '信号重开({3} 进路)', + trainingRemark: '信号重开功能', + trainingType: '02', + productTypes: ['02'], + stepVOList: [ + { deviceType: '04', orderNum: 1, operateCode: '304', tip: '鼠标右键菜单选择【信号重开】' }, + { deviceType: '04', orderNum: 2, operateCode: '304', tip: '鼠标左键点击【确定】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0203', + skinCode: '04', + trainingName: '信号封锁({5})', + trainingRemark: '信号封闭', + trainingType: '02', + productTypes: ['02'], + stepVOList: [ + { deviceType: '04', orderNum: 1, operateCode: '306', tip: '鼠标右键菜单选择【信号封闭】' }, + { deviceType: '04', orderNum: 2, operateCode: '306', tip: '鼠标左键点击【确定】按钮' }, + { deviceType: '04', orderNum: 3, operateCode: '3061', tip: '输入密码123456,点击【确定】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0203', + skinCode: '04', + trainingName: '信号封锁({5})', + trainingRemark: '信号封锁功能', + trainingType: '02', + productTypes: ['01'], + stepVOList: [ + { deviceType: 'mbm', orderNum: 1, operateCode: '2991', tip: '鼠标左键菜单选择【封锁】' }, + { deviceType: '04', orderNum: 1, operateCode: '2991', tip: '鼠标左键点击【{5}】', val: '{6}' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0204', + skinCode: '04', + trainingName: '信号解封({5})', + trainingRemark: '信号解封', + trainingType: '02', + productTypes: ['02'], + stepVOList: [ + { deviceType: '04', orderNum: 1, operateCode: '307', tip: '鼠标右键菜单选择【信号解封】' }, + { deviceType: '04', orderNum: 2, operateCode: '307', tip: '鼠标左键点击【确认】按钮' }, + { deviceType: '04', orderNum: 3, operateCode: '3072', tip: '输入密码123456,点击【确认】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0204', + skinCode: '04', + trainingName: '信号解封({5})', + trainingRemark: '信号解封功能', + trainingType: '02', + productTypes: ['01'], + stepVOList: [ + { deviceType: 'mbm', orderNum: 1, operateCode: '2992', tip: '鼠标左键菜单选择【解封】' }, + { deviceType: 'mbm', orderNum: 2, operateCode: '0011', tip: '输入密码123456,点击【确认】按钮' }, + { deviceType: '04', orderNum: 3, operateCode: '2992', tip: '鼠标左键点击【{5}】', val: '{6}' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0208', + skinCode: '04', + trainingName: '进路收人工控({5})', + trainingRemark: '进路收人工控', + trainingType: '02', + productTypes: ['02'], + stepVOList: [ + { deviceType: '04', orderNum: 1, operateCode: '314', tip: '鼠标右键菜单选择【进路收人工控】' }, + { deviceType: '04', orderNum: 2, operateCode: '3141', tip: '鼠标左键选择进路名称【{3}】', val: '{4}' }, + { deviceType: '04', orderNum: 3, operateCode: '314', tip: '鼠标左键点击【确定】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0208', + skinCode: '04', + trainingName: '人工控({5})', + trainingRemark: '人工控', + trainingType: '02', + productTypes: ['01'], + stepVOList: [ + { deviceType: 'mbm', orderNum: 1, operateCode: '3140', tip: '鼠标左键点击【人工控】' }, + { deviceType: '04', orderNum: 2, operateCode: '3140', tip: '鼠标左键点击【{3}】', val: '{4}' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0209', + skinCode: '04', + trainingName: '进路交自动控({5})', + trainingRemark: '进路交自动控', + trainingType: '02', + productTypes: ['02'], + stepVOList: [ + { deviceType: '04', orderNum: 1, operateCode: '315', tip: '鼠标右键菜单选择【进路交自动控】' }, + { deviceType: '04', orderNum: 2, operateCode: '3151', tip: '鼠标左键选择进路名称【{3}】', val: '{4}' }, + { deviceType: '04', orderNum: 3, operateCode: '315', tip: '鼠标左键点击【确定】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0209', + skinCode: '04', + trainingName: '自动控({5})', + trainingRemark: '自动控', + trainingType: '02', + productTypes: ['01'], + stepVOList: [ + { deviceType: 'mbm', orderNum: 1, operateCode: '3150', tip: '鼠标左键点击【自动控】' }, + { deviceType: '04', orderNum: 2, operateCode: '3150', tip: '鼠标左键点击【{3}】', val: '{4}' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0210', + skinCode: '04', + trainingName: '查询进路控制状态({5})', + trainingRemark: '查询进路控制状态', + trainingType: '02', + productTypes: ['02'], + stepVOList: [ + { deviceType: '04', orderNum: 1, operateCode: '316', tip: '鼠标右键菜单选择【查询进路控制模式】' }, + { deviceType: '04', orderNum: 2, operateCode: '000', tip: '鼠标左键点击【关闭】按钮' } + ] + }, + // 道岔列表 + { + maxDuration: 15, + minDuration: 8, + operateType: '0312', // 0312 新增定位字典 + skinCode: '04', + trainingName: '单操到定位({7})', + trainingRemark: '单操到定位({15})', + trainingType: '03', + productTypes: ['02'], + stepVOList: [ + { deviceType: '02', orderNum: 1, operateCode: '101', tip: '鼠标右键菜单选择【单操到定位】' }, + { deviceType: '02', orderNum: 2, operateCode: '101', tip: '鼠标左键点击【确定】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0313', + skinCode: '04', + trainingName: '单操到定位({7})', + trainingRemark: '单操到定位({7})', + trainingType: '03', + productTypes: ['01'], + stepVOList: [ + { deviceType: '02', orderNum: 1, operateCode: '1010', tip: '鼠标左键菜单选择【道岔定操】' }, + { deviceType: '02', orderNum: 2, operateCode: '1010', tip: '鼠标左键点击【{7}】按钮', val: '{17}' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0313', // 0313 新增定位字典 + skinCode: '04', + trainingName: '单操到反位({7})', + trainingRemark: '单操到反位({7})', + trainingType: '03', + productTypes: ['02'], + stepVOList: [ + { deviceType: '02', orderNum: 1, operateCode: '102', tip: '鼠标右键菜单选择【单操到反位】' }, + { deviceType: '02', orderNum: 2, operateCode: '102', tip: '鼠标左键点击【确定】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0313', + skinCode: '04', + trainingName: '单操到反位({7})', + trainingRemark: '单操到反位({7})', + trainingType: '03', + productTypes: ['01'], + stepVOList: [ + { deviceType: '02', orderNum: 1, operateCode: '1020', tip: '鼠标左键菜单选择【道岔反操】' }, + { deviceType: '02', orderNum: 2, operateCode: '1020', tip: '鼠标左键点击【{7}】按钮', val: '{17}' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0301', + skinCode: '04', + trainingName: '道岔单锁({7})', + trainingRemark: '道岔单锁功能', + trainingType: '03', + productTypes: ['02'], + stepVOList: [ + { deviceType: '02', orderNum: 1, operateCode: '103', tip: '鼠标右键菜单选择【道岔单锁】' }, + { deviceType: '02', orderNum: 2, operateCode: '103', tip: '鼠标左键点击【确定】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0301', + skinCode: '04', + trainingName: '道岔单锁({7})', + trainingRemark: '道岔单锁功能', + trainingType: '03', + productTypes: ['01'], // 现地操作 + stepVOList: [ + { deviceType: '02', orderNum: 1, operateCode: '1030', tip: '鼠标左键菜单选择【道岔单锁】' }, + { deviceType: '02', orderNum: 2, operateCode: '1030', tip: '鼠标左键点击【{{7}}】', val: '{17}' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0302', + skinCode: '04', + trainingName: '道岔解锁({7})', + trainingRemark: '道岔解锁功能', + trainingType: '03', + productTypes: ['02'], + stepVOList: [ + { deviceType: '02', orderNum: 1, operateCode: '104', tip: '鼠标右键菜单选择【道岔解锁】' }, + { deviceType: '02', orderNum: 5, operateCode: '104', tip: '鼠标左键点击【确定】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0305', + skinCode: '04', + trainingName: '道岔解锁({7})', + trainingRemark: '道岔解锁功能', + trainingType: '03', + productTypes: ['01'], + stepVOList: [ + { deviceType: '02', orderNum: 1, operateCode: '1040', tip: '鼠标左键菜单选择【道岔解锁】' }, + { deviceType: '02', orderNum: 2, operateCode: '0011', tip: '输入密码123456,点击【确认】按钮' }, + { deviceType: '02', orderNum: 3, operateCode: '1040', tip: '鼠标左键点击【{7}】按钮', val: '{17}' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0303', + skinCode: '04', + trainingName: '道岔封锁({7})', + trainingRemark: '道岔封锁功能', + trainingType: '03', + productTypes: ['02'], + stepVOList: [ + { deviceType: '02', orderNum: 1, operateCode: '105', tip: '鼠标右键菜单选择【道岔封锁】' }, + { deviceType: '02', orderNum: 2, operateCode: '105', tip: '鼠标左键点击【确定】按钮' }, + { deviceType: '02', orderNum: 3, operateCode: '1051', tip: '输入密码123456,点击【确定】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0305', + skinCode: '04', + trainingName: '道岔封锁({7})', + trainingRemark: '道岔封锁功能', + trainingType: '03', + productTypes: ['01'], + stepVOList: [ + { deviceType: '02', orderNum: 1, operateCode: '2991', tip: '鼠标左键菜单选择【封锁】' }, + { deviceType: '02', orderNum: 2, operateCode: '2991', tip: '鼠标左键点击【{7}】按钮', val: '{17}' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0304', + skinCode: '04', + trainingName: '道岔解封({7})', + trainingRemark: '道岔解封功能', + trainingType: '03', + productTypes: ['02'], + stepVOList: [ + { deviceType: '02', orderNum: 1, operateCode: '106', tip: '鼠标右键菜单选择【道岔解封】' }, + { deviceType: '02', orderNum: 2, operateCode: '106', tip: '鼠标左键点击【确认】按钮' }, + { deviceType: '02', orderNum: 3, operateCode: '1062', tip: '输入密码123456,点击【确认】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0305', + skinCode: '04', + trainingName: '道岔解封({7})', + trainingRemark: '道岔解封功能', + trainingType: '03', + productTypes: ['01'], + stepVOList: [ + { deviceType: '02', orderNum: 1, operateCode: '2992', tip: '鼠标左键菜单选择【解封】' }, + { deviceType: '02', orderNum: 2, operateCode: '0011', tip: '输入密码123456,点击【确认】按钮' }, + { deviceType: '02', orderNum: 3, operateCode: '2992', tip: '鼠标左键点击【{7}】按钮', val: '{17}' } + ] + }, + { + maxDuration: 20, + minDuration: 10, + operateType: '0306', + skinCode: '04', + trainingName: '区故解({7})', + trainingRemark: '道岔区段故障解锁功能', + trainingType: '03', + productTypes: ['02'], + stepVOList: [ + { deviceType: '02', orderNum: 1, operateCode: '109', tip: '鼠标右键菜单选择【区故解】' }, + { deviceType: '02', orderNum: 2, operateCode: '109', tip: '鼠标左键点击【确认】按钮' }, + { deviceType: '02', orderNum: 3, operateCode: '1092', tip: '输入密码123456,点击【确认】按钮' } + ] + }, + // 区段列表 + { + maxDuration: 15, + minDuration: 8, + operateType: '0401', + skinCode: '04', + trainingName: '区故解({8}{9})', + trainingRemark: '故障解锁功能', + trainingType: '04', + productTypes: ['02'], + stepVOList: [ + { deviceType: '03', orderNum: 1, operateCode: '402', tip: '鼠标右键菜单选择【区故解】' }, + { deviceType: '03', orderNum: 2, operateCode: '402', tip: '鼠标左键点击【确认】按钮' }, + { deviceType: '03', orderNum: 3, operateCode: '4023', tip: '输入密码123456,点击【确认】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0401', + skinCode: '04', + trainingName: '区故解({9})', + trainingRemark: '故障解锁功能', + trainingType: '04', + productTypes: ['01'], + stepVOList: [ + { deviceType: 'mbm', orderNum: 1, operateCode: '4020', tip: '鼠标右键菜单选择【区故解】' }, + { deviceType: 'mbm', orderNum: 2, operateCode: '0011', tip: '输入密码123456,点击【确认】按钮' }, + { deviceType: '03', orderNum: 3, operateCode: '4020', tip: '鼠标左键点击【{9}】', val: '{18}' }, + { deviceType: 'mbm', orderNum: 4, operateCode: '00012', tip: '鼠标左键点击【清除】' } + ] + }, + { + maxDuration: 15, // 自动生成实训失败 + minDuration: 8, + operateType: '0409', + skinCode: '04', + trainingName: '属性({8}{9})', + trainingRemark: '区段详情({8}{9})', + trainingType: '04', + productTypes: ['02'], + stepVOList: [ + { deviceType: '03', orderNum: 1, operateCode: '410', tip: '鼠标右键菜单选择【属性】' }, + { deviceType: '03', orderNum: 2, operateCode: '410', tip: '鼠标左键点击【确认】按钮' } + ] + }, + // 站台列表 + { + maxDuration: 15, + minDuration: 8, + operateType: '0501', + skinCode: '04', + trainingName: '设置扣车({10}-{12}站台)', + trainingRemark: '设置扣车功能', + trainingType: '05', + productTypes: ['02'], + stepVOList: [ + { deviceType: '06', orderNum: 1, operateCode: '504', tip: '鼠标右键菜单选择【设置扣车】' }, + { deviceType: '06', orderNum: 2, operateCode: '504', tip: '鼠标左键点击【确定】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0502', + skinCode: '04', + trainingName: '取消扣车({10}-{12}站台)', + trainingRemark: '设置取消扣车功能', + trainingType: '05', + productTypes: ['02'], + stepVOList: [ + { deviceType: '06', orderNum: 1, operateCode: '505', tip: '鼠标右键菜单选择【取消扣车】' }, + { deviceType: '06', orderNum: 2, operateCode: '505', tip: '鼠标左键点击【确定】按钮' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0502', + skinCode: '04', + trainingName: '取消扣车({10}-{12}站台)', + trainingRemark: '设置取消扣车功能(上行全线)', + trainingType: '05', + productTypes: ['02'], + stepVOList: [ + { deviceType: '06', orderNum: 1, operateCode: '505', tip: '鼠标右键菜单选择【取消扣车】' }, + { deviceType: '06', orderNum: 2, operateCode: '5051', tip: '鼠标左键点击【上行全线】按钮', val: '02' }, + { deviceType: '06', orderNum: 3, operateCode: '508', tip: '鼠标左键点击【确定】按钮', val: '02' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0505', + skinCode: '04', + trainingName: '设置跳停({10}-{12}站台)', + trainingRemark: '设置跳停功能', + trainingType: '05', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '06', orderNum: 1, operateCode: '502', tip: '鼠标右键菜单选择【跳停】' }, + { deviceType: '06', orderNum: 2, operateCode: '502', tip: '鼠标左键点击【确定】按钮', val: '{11}' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0506', + skinCode: '04', + trainingName: '取消跳停({10}-{12}站台)', + trainingRemark: '设置取消跳停功能', + trainingType: '05', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '06', orderNum: 1, operateCode: '503', tip: '鼠标右键菜单选择【取消跳停】' }, + { deviceType: '06', orderNum: 2, operateCode: '503', tip: '鼠标左键点击【确定】按钮', val: '{11}' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0508', + skinCode: '04', + trainingName: '设置停站时间({10}-{12}站台)', + trainingRemark: '设置停站时间(自动, 一直有效)', + trainingType: '05', + productTypes: ['02'], + stepVOList: [ + { deviceType: '06', orderNum: 1, operateCode: '509', tip: '鼠标右键菜单选择【设置停站时间】' }, + { deviceType: '06', orderNum: 2, operateCode: '5093', tip: '鼠标左键点击,选择【自动】', val: '02' }, + { deviceType: '06', orderNum: 3, operateCode: '509', tip: '鼠标左键点击【确认】按钮', val: '01::0::true' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0508', + skinCode: '04', + trainingName: '设置停站时间({10}-{12}站台)', + trainingRemark: '设置停站时间(人工, 20秒, 一直有效)', + trainingType: '05', + productTypes: ['02'], + stepVOList: [ + { deviceType: '06', orderNum: 1, operateCode: '509', tip: '鼠标右键菜单选择【设置停站时间】' }, + { deviceType: '06', orderNum: 2, operateCode: '5092', tip: '鼠标左键点击,选择【人工】', val: '02' }, + { deviceType: '06', orderNum: 3, operateCode: '5094', tip: '输入或鼠标点击,调整为【20】', val: '20' }, + { deviceType: '06', orderNum: 4, operateCode: '5093', tip: '标左键点击,选择【一直有效】', val: '02' }, + { deviceType: '06', orderNum: 5, operateCode: '509', tip: '鼠标左键点击【确认】按钮', val: '02::20::true' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0508', + skinCode: '04', + trainingName: '设置停站时间({10}-{12}站台)', + trainingRemark: '设置停站时间(人工, 20秒, 一次有效)', + trainingType: '05', + productTypes: ['02'], + stepVOList: [ + { deviceType: '06', orderNum: 1, operateCode: '509', tip: '鼠标右键菜单选择【设置停站时间】' }, + { deviceType: '06', orderNum: 2, operateCode: '5092', tip: '鼠标左键点击,选择【人工】', val: '02' }, + { deviceType: '06', orderNum: 3, operateCode: '5094', tip: '输入或鼠标点击,调整为【20】', val: '20' }, + { deviceType: '06', orderNum: 4, operateCode: '509', tip: '鼠标左键点击【确认】按钮', val: '02::20::false' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0509', + skinCode: '04', + trainingName: '设置站间运行等级({10}-{12}站台)', + trainingRemark: '设置站间运行等级(自动, 一直有效)', + trainingType: '05', + productTypes: ['02'], + stepVOList: [ + { deviceType: '06', orderNum: 1, operateCode: '510', tip: '鼠标右键菜单选择【设置站间运行等级】' }, + { deviceType: '06', orderNum: 2, operateCode: '5107', tip: '标左键点击,选择【一直有效】', val: '02' }, + { deviceType: '06', orderNum: 4, operateCode: '510', tip: '鼠标左键点击【确认】按钮', val: '01::01::true' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0509', + skinCode: '04', + trainingName: '设置站间运行等级({10}-{12}站台)', + trainingRemark: '设置站间运行等级(人工, 常速, 一直有效)', + trainingType: '05', + productTypes: ['02'], + stepVOList: [ + { deviceType: '06', orderNum: 1, operateCode: '510', tip: '鼠标右键菜单选择【设置站间运行等级】' }, + { deviceType: '06', orderNum: 2, operateCode: '5106', tip: '鼠标左键点击,选择【人工】', val: '02' }, + { deviceType: '06', orderNum: 3, operateCode: '5107', tip: '鼠标左键点击,取消选择【一直有效】', val: '02' }, + { deviceType: '06', orderNum: 4, operateCode: '510', tip: '鼠标左键点击【确认】按钮', val: '02::01::true' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0509', + skinCode: '04', + trainingName: '设置站间运行等级({10}-{12}站台)', + trainingRemark: '设置站间运行等级(人工, 常速, 一次有效)', + trainingType: '05', + productTypes: ['02'], + stepVOList: [ + { deviceType: '06', orderNum: 1, operateCode: '510', tip: '鼠标右键菜单选择【设置站间运行等级】' }, + { deviceType: '06', orderNum: 2, operateCode: '5106', tip: '鼠标左键点击,选择【人工】', val: '02' }, + { deviceType: '06', orderNum: 4, operateCode: '510', tip: '鼠标左键点击【确认】按钮', val: '02::01::false' } + ] + }, + { + maxDuration: 8, // 自动生成实训失败 + minDuration: 5, + operateType: '0507', + skinCode: '04', + trainingName: '属性({10}-{12}站台)', + trainingRemark: '查询站台状态功能', + trainingType: '05', + productTypes: ['02'], + stepVOList: [ + { deviceType: '06', orderNum: 1, operateCode: '507', tip: '鼠标右键菜单选择【属性】' }, + { deviceType: '06', orderNum: 2, operateCode: '0012', tip: '鼠标左键点击【退出】按钮' } + ] + } + ] + }, + '05': { // 国际版线 + list: [ + { + maxDuration: 20, + minDuration: 15, + operateType: '0103', + skinCode: '05', + trainingName: 'Switch to central control ({1})', + trainingRemark: 'Control permission conversion, switch station control to central control', + trainingType: '01', + productTypes: ['02'], + stepVOList: [ + { deviceType: 'bar', orderNum: 1, operateCode: '0024', tip: 'Left click the menu bar [control mode conversion]on the top' }, + { deviceType: 'bar', orderNum: 2, operateCode: '2041', tip: 'Left click [switch to central control] ' }, + { deviceType: '05', orderNum: 3, operateCode: '2042', tip: 'Left click to select the control area to be converted【{1}】', val: '{2}' }, + { deviceType: '05', orderNum: 4, operateCode: '204', tip: 'Left click [request to central control] ', val: '{2}' }, + { deviceType: '05', orderNum: 5, operateCode: '2043', tip: 'Left click [confirm]', val: '{2}' }, + { deviceType: '05', orderNum: 6, operateCode: '0013', tip: 'Left click [confirm]' }, + { deviceType: 'bar', orderNum: 7, operateCode: '000', tip: 'Left click [close] ' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0101', + skinCode: '05', + trainingName: 'Switch to station control ({1})', + trainingRemark: 'Control permission conversion, Force to station control', + trainingType: '01', + productTypes: ['01'], + stepVOList: [ + { deviceType: 'bar', orderNum: 1, operateCode: '0024', tip: 'Left click the menu bar [control mode conversion]on the top' }, + { deviceType: 'bar', orderNum: 2, operateCode: '2021', tip: 'Left click [switch to station control' }, + { deviceType: '05', orderNum: 3, operateCode: '2022', tip: 'Left click to select the control area to be converted【{1}】', val: '{2}' }, + { deviceType: '05', orderNum: 4, operateCode: '202', tip: 'Left click [request to station control', val: '{2}' }, + { deviceType: '05', orderNum: 5, operateCode: '2023', tip: 'Left click [confirm] ', val: '{2}' }, + { deviceType: '05', orderNum: 6, operateCode: '0013', tip: 'Left click [confirm] ' }, + { deviceType: 'bar', orderNum: 7, operateCode: '000', tip: 'Left click [close] ' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0102', + skinCode: '05', + trainingName: 'Force to station control ({1})', + trainingRemark: 'Control permission conversion,Force to station control', + trainingType: '01', + productTypes: ['01'], + stepVOList: [ + { deviceType: 'bar', orderNum: 1, operateCode: '0024', tip: 'Left click the menu bar [control mode conversion]on the top' }, + { deviceType: 'bar', orderNum: 2, operateCode: '2034', tip: 'Left click[Force to station control]' }, + { deviceType: 'bar', orderNum: 3, operateCode: '2035', tip: 'Left click to input the password [123456],then left click the [confirm]' }, + { deviceType: '05', orderNum: 4, operateCode: '2032', tip: 'Left click to select the control area to be converted【{1}】', val: '{2}' }, + { deviceType: '05', orderNum: 5, operateCode: '203', tip: 'Left click [Foece to station control', val: '{2}' }, + { deviceType: '05', orderNum: 6, operateCode: '2033', tip: 'Left click [confirm] ', val: '{2}' }, + { deviceType: '05', orderNum: 7, operateCode: '0013', tip: 'Left click [confirm] ' }, + { deviceType: 'bar', orderNum: 8, operateCode: '000', tip: 'Left click [close] ' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0501', + skinCode: '05', + trainingName: 'Detain Train({10}-{12}station)', + trainingRemark: 'Set the detaining function', + trainingType: '05', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '06', orderNum: 1, operateCode: '504', tip: 'Right click to select [Detain Train]' }, + { deviceType: '06', orderNum: 2, operateCode: '504', tip: 'Left click [confirm] ' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0502', + skinCode: '05', + trainingName: 'Cancel Detaining({10}-{12}The platform)', + trainingRemark: 'Set cancelling detaining function', + trainingType: '05', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '06', orderNum: 1, operateCode: '505', tip: 'Right click to select [Cancel Detaining]]' }, + { deviceType: '06', orderNum: 2, operateCode: '505', tip: 'Left click [confirm] ' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0503', + skinCode: '05', + trainingName: 'Force Canceling Detaining({10}-{12}The platform)', + trainingRemark: 'Force to cancel train detaining function', + trainingType: '05', + productTypes: ['01'], + stepVOList: [ + { deviceType: '06', orderNum: 1, operateCode: '506', tip: 'Right click to select [Force Canceling Detaining]' }, + { deviceType: '06', orderNum: 2, operateCode: '506', tip: 'Left click [confirm] ' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0504', + skinCode: '05', + trainingName: 'Cancel train detaining along the whole line({10}-{12}The platform)', + trainingRemark: 'Cancel train detaining along the whole line (default the whole uplink and downlink )', + trainingType: '05', + productTypes: ['02'], + stepVOList: [ + { deviceType: '06', orderNum: 1, operateCode: '508', tip: 'Right click to select [Cancel train detaining along the whole line]' }, + { deviceType: '06', orderNum: 2, operateCode: '508', tip: 'Left click [confirm] ', val: '{11}' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0504', + skinCode: '05', + trainingName: 'Cancel train detaining along the whole line({10}-{12}The platform)', + trainingRemark: 'Cancel train detaining along the whole line (select the uplink or downlink ))', + trainingType: '05', + productTypes: ['02'], + stepVOList: [ + { deviceType: '06', orderNum: 1, operateCode: '508', tip: 'Right click to select [Cancel train detaining along the whole line]' }, + { deviceType: '06', orderNum: 2, operateCode: '5081', tip: 'Right click to select[{14}the whole line', val: '{13}' }, + { deviceType: '06', orderNum: 3, operateCode: '508', tip: 'Left click [confirm]', val: '{13}' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0505', + skinCode: '05', + trainingName: 'Skip this station to continue moving({10}-{12}The platform)', + trainingRemark: 'Set the skip to continue moving function', + trainingType: '05', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '06', orderNum: 1, operateCode: '502', tip: 'Right click to select [Skip this station to continue moving]' }, + { deviceType: '06', orderNum: 2, operateCode: '502', tip: 'Left click [confirm]', val: '{11}' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0506', + skinCode: '05', + trainingName: 'Cancel skiping({10}-{12}The platform)', + trainingRemark: 'Set cancelling skiping function', + trainingType: '05', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '06', orderNum: 1, operateCode: '503', tip: 'Right click to select [Cancel skiping]' }, + { deviceType: '06', orderNum: 2, operateCode: '503', tip: 'Left click [confirm]', val: '{11}' } + ] + }, + { + maxDuration: 8, + minDuration: 5, + operateType: '0507', + skinCode: '05', + trainingName: 'Query Platform status({10}-{12}The platform)', + trainingRemark: 'Query platform status function', + trainingType: '05', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '06', orderNum: 1, operateCode: '507', tip: 'Right click to select [Query Platform status]' }, + { deviceType: '06', orderNum: 2, operateCode: '0012', tip: 'Left click [confirm] ' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0508', + skinCode: '05', + trainingName: 'Set the stop time({10}-{12}The platform)', + trainingRemark: 'Set the stop time (auto, permanent validity)', + trainingType: '05', + productTypes: ['02'], + stepVOList: [ + { deviceType: '06', orderNum: 1, operateCode: '509', tip: 'Right click to select [Set the stop time]' }, + { deviceType: '06', orderNum: 2, operateCode: '5092', tip: 'Left click to select [auto]', val: '01' }, + { deviceType: '06', orderNum: 3, operateCode: '509', tip: 'Left click [confirm] ', val: '01::20::true' }, + { deviceType: '06', orderNum: 4, operateCode: '5091', tip: 'Left click [confirm] ', val: '01::20::true' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0508', + skinCode: '05', + trainingName: 'Set the stop time({10}-{12}The platform)', + trainingRemark: 'Set the stop time (manual, 20 seconds, permanent validity)', + trainingType: '05', + productTypes: ['02'], + stepVOList: [ + { deviceType: '06', orderNum: 1, operateCode: '509', tip: 'Right click to select [Set the stop time]' }, + { deviceType: '06', orderNum: 2, operateCode: '5092', tip: 'Left click to select [manual]', val: '02' }, + { deviceType: '06', orderNum: 3, operateCode: '5094', tip: 'Set time [20]', val: '20' }, + { deviceType: '06', orderNum: 4, operateCode: '509', tip: 'Left click [confirm] ', val: '02::20::true' }, + { deviceType: '06', orderNum: 5, operateCode: '5091', tip: 'Left click [confirm]', val: '02::20::true' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0508', + skinCode: '05', + trainingName: 'Set the stop time({10}-{12}The platform)', + trainingRemark: 'Set the stop time (manual, 20 seconds, once valid )', + trainingType: '05', + productTypes: ['02'], + stepVOList: [ + { deviceType: '06', orderNum: 1, operateCode: '509', tip: 'Right click to select [Set the stop time]' }, + { deviceType: '06', orderNum: 2, operateCode: '5092', tip: 'Left click to select [manual]', val: '02' }, + { deviceType: '06', orderNum: 3, operateCode: '5094', tip: 'Set time [20]', val: '20' }, + { deviceType: '06', orderNum: 4, operateCode: '5093', tip: 'Left click to select "once valid ".', val: 'false' }, + { deviceType: '06', orderNum: 5, operateCode: '509', tip: 'Left click [confirm] ', val: '02::20::false' }, + { deviceType: '06', orderNum: 6, operateCode: '5091', tip: 'Left click [confirm] ', val: '02::20::false' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0509', + skinCode: '05', + trainingName: 'Set Operation speed Level({10}-{12}The platform)', + trainingRemark: 'Set Operation speed Level(set the interval running time to 60, permanent validity)', + trainingType: '05', + productTypes: ['02'], + stepVOList: [ + { deviceType: '06', orderNum: 1, operateCode: '510', tip: 'Right click to select [Set Operation speed Level]' }, + { deviceType: '06', orderNum: 2, operateCode: '5101', tip: 'Left click to select [60]', val: '60' }, + { deviceType: '06', orderNum: 3, operateCode: '510', tip: 'Left click [confirm] ', val: '60::true' }, + { deviceType: '06', orderNum: 4, operateCode: '5102', tip: 'Left click [confirm] ', val: '60::true' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0509', + skinCode: '05', + trainingName: 'Set Operation speed Level({10}-{12}The platform)', + trainingRemark: 'Set Operation speed Level (set the interval running time to 60, once valid )', + trainingType: '05', + productTypes: ['02'], + stepVOList: [ + { deviceType: '06', orderNum: 1, operateCode: '510', tip: 'Right click to select [Set Operation speed Level]' }, + { deviceType: '06', orderNum: 2, operateCode: '5101', tip: 'Left click to select [60]', val: '60' }, + { deviceType: '06', orderNum: 3, operateCode: '5103', tip: 'Left click to cancel [permanent validity].', val: 'false' }, + { deviceType: '06', orderNum: 4, operateCode: '510', tip: 'Left click [confirm] ', val: '60::false' }, + { deviceType: '06', orderNum: 5, operateCode: '5102', tip: 'Left click [confirm] ', val: '60::false' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0510', + skinCode: '05', + trainingName: 'Set departure in advance({10}-{12}The platform)', + trainingRemark: 'Set departure inadvance function', + trainingType: '05', + productTypes: ['02'], + stepVOList: [ + { deviceType: '06', orderNum: 1, operateCode: '501', tip: 'Right click to select [Set departure in advance]' }, + { deviceType: '06', orderNum: 2, operateCode: '501', tip: 'Left click [confirm] ' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0511', + skinCode: '05', + trainingName: 'Manual return strategy setting({10}-{12}The platform)', + trainingRemark: 'Manual return strategy setting function', + trainingType: '05', + productTypes: ['02'], + stepVOList: [ + { deviceType: '06', orderNum: 1, operateCode: '511', tip: 'Right click to select [Manual return strategy setting]' }, + { deviceType: '06', orderNum: 2, operateCode: '5111', tip: 'Left click to select [No return]".', val: '01' }, + { deviceType: '06', orderNum: 3, operateCode: '511', tip: 'Left click [confirm] ', val: '01' } + ] + }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0401', - skinCode: '05', - trainingName: 'Section fault unlocking({8}{9})', - trainingRemark: 'Fault unlocking', - trainingType: '04', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '03', orderNum: 1, operateCode: '402', tip: 'Select "section fault unlocking" from the right mouse button menu' }, - { deviceType: '03', orderNum: 2, operateCode: '4026', tip: 'Click the [down] button with the left mouse button' }, - { deviceType: '03', orderNum: 3, operateCode: '4024', tip: 'Click the [confirm 1] button with the left mouse button' }, - { deviceType: '03', orderNum: 4, operateCode: '4025', tip: 'Click the [confirm 2] button with the left mouse button' }, - { deviceType: '03', orderNum: 5, operateCode: '001', tip: 'Click the [close] button with the left mouse button' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0402', - skinCode: '05', - trainingName: 'Segment resection({8}{9})', - trainingRemark: 'Segment resection', - trainingType: '04', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '03', orderNum: 1, operateCode: '405', tip: 'Right mouse button menu select [segment cut]' }, - { deviceType: '03', orderNum: 2, operateCode: '405', tip: 'Click the [ok] button with the left mouse button' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0403', - skinCode: '05', - trainingName: 'Section to activate({8}{9})', - trainingRemark: 'Section activation function', - trainingType: '04', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '03', orderNum: 1, operateCode: '406', tip: 'Right mouse button menu selection [section activation]' }, - { deviceType: '03', orderNum: 2, operateCode: '406', tip: 'Click the [ok] button with the left mouse button' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0404', - skinCode: '05', - trainingName: 'Axis pre-reset({8}{9})', - trainingRemark: 'Axis pre-reset function', - trainingType: '04', - productTypes: ['01'], - stepVOList: [ - { deviceType: '03', orderNum: 1, operateCode: '409', tip: 'Select from the right mouse button menu [segment-axis pre-reset]' }, - { deviceType: '03', orderNum: 2, operateCode: '4091', tip: 'Click the [down] button with the left mouse button' }, - { deviceType: '03', orderNum: 3, operateCode: '4093', tip: 'Click the [confirm 1] button with the left mouse button' }, - { deviceType: '03', orderNum: 4, operateCode: '4094', tip: 'Click the [confirm 2] button with the left mouse button' }, - { deviceType: '03', orderNum: 5, operateCode: '001', tip: 'Click the [close] button with the left mouse button' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0405', - skinCode: '05', - trainingName: 'Section block({8}{9})', - trainingRemark: 'Block blocking function', - trainingType: '04', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '03', orderNum: 1, operateCode: '403', tip: 'Right mouse button menu selection [block]' }, - { deviceType: '03', orderNum: 2, operateCode: '403', tip: 'Click the [ok] button with the left mouse button' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0406', - skinCode: '05', - trainingName: 'Section unlock({8}{9})', - trainingRemark: 'Section unsealing function', - trainingType: '04', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '03', orderNum: 1, operateCode: '404', tip: 'Right mouse button menu selection [section unsealing]' }, - { deviceType: '03', orderNum: 2, operateCode: '4041', tip: 'Click the [down] button with the left mouse button' }, - { deviceType: '03', orderNum: 3, operateCode: '4043', tip: 'Click the [confirm 1] button with the left mouse button' }, - { deviceType: '03', orderNum: 4, operateCode: '4044', tip: 'Click the [confirm 2] button with the left mouse button' }, - { deviceType: '03', orderNum: 5, operateCode: '001', tip: 'Click the [close] button with the left mouse button' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0407', - skinCode: '05', - trainingName: 'Section sets speed limit({8}{9})', - trainingRemark: 'Section setting speed limit function (speed limit value: 5)', - trainingType: '04', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '03', orderNum: 1, operateCode: '407', tip: 'Right mouse button menu selection [section to set speed limit]' }, - { deviceType: '03', orderNum: 2, operateCode: '4076', tip: 'Select [speed limit value 5] with the left mouse button', val: '5' }, - { deviceType: '03', orderNum: 3, operateCode: '4071', tip: 'Click the [down] button with the left mouse button' }, - { deviceType: '03', orderNum: 4, operateCode: '4072', tip: 'Click the [ok] button with the left mouse button' }, - { deviceType: '03', orderNum: 5, operateCode: '4073', tip: 'Click the [confirm 1] button with the left mouse button' }, - { deviceType: '03', orderNum: 6, operateCode: '4074', tip: 'Click the [confirm 2] button with the left mouse button', val: '5' }, - { deviceType: '03', orderNum: 7, operateCode: '001', tip: 'Click the [close] button with the left mouse button' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0408', - skinCode: '05', - trainingName: 'Section cancels speed limit({8}{9})', - trainingRemark: 'Section cancels speed limit', - trainingType: '04', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '03', orderNum: 1, operateCode: '408', tip: 'Right mouse button menu select [section cancel speed limit]' }, - { deviceType: '03', orderNum: 2, operateCode: '4081', tip: 'Click the [down] button with the left mouse button' }, - { deviceType: '03', orderNum: 3, operateCode: '4082', tip: 'Click the [ok] button with the left mouse button' }, - { deviceType: '03', orderNum: 4, operateCode: '4083', tip: 'Click the [confirm 1] button with the left mouse button' }, - { deviceType: '03', orderNum: 5, operateCode: '4084', tip: 'Click the [confirm 2] button with the left mouse button', val: '5' }, - { deviceType: '03', orderNum: 6, operateCode: '001', tip: 'Click the [close] button with the left mouse button' } - ] - }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0401', + skinCode: '05', + trainingName: 'Section fault unlocking({8}{9})', + trainingRemark: 'Fault unlocking', + trainingType: '04', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '03', orderNum: 1, operateCode: '402', tip: 'Right click to select [Section fault unlocking]' }, + { deviceType: '03', orderNum: 2, operateCode: '4026', tip: 'Left click [Execute] ' }, + { deviceType: '03', orderNum: 3, operateCode: '4024', tip: 'Left click [ok 1] ' }, + { deviceType: '03', orderNum: 4, operateCode: '4025', tip: 'Left click [ok 2] ' }, + { deviceType: '03', orderNum: 5, operateCode: '001', tip: 'Left click [close] ' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0402', + skinCode: '05', + trainingName: 'Section resection({8}{9})', + trainingRemark: 'Section resection', + trainingType: '04', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '03', orderNum: 1, operateCode: '405', tip: 'Right click to select [Section resection]' }, + { deviceType: '03', orderNum: 2, operateCode: '405', tip: 'Left click [confirm] ' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0403', + skinCode: '05', + trainingName: 'Section activation({8}{9})', + trainingRemark: 'Section activation function', + trainingType: '04', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '03', orderNum: 1, operateCode: '406', tip: 'Right click to select [Section activation]' }, + { deviceType: '03', orderNum: 2, operateCode: '406', tip: 'Left click [confirm]' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0404', + skinCode: '05', + trainingName: 'Axis pre-reset({8}{9})', + trainingRemark: 'Axis pre-reset function', + trainingType: '04', + productTypes: ['01'], + stepVOList: [ + { deviceType: '03', orderNum: 1, operateCode: '409', tip: 'Right click to select [Axis pre-reset]' }, + { deviceType: '03', orderNum: 2, operateCode: '4091', tip: 'Left click [Execute]' }, + { deviceType: '03', orderNum: 3, operateCode: '4093', tip: 'Left click [confirm1]' }, + { deviceType: '03', orderNum: 4, operateCode: '4094', tip: 'Left click [confirm2]' }, + { deviceType: '03', orderNum: 5, operateCode: '001', tip: 'Left click [close]' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0405', + skinCode: '05', + trainingName: 'Section blockade({8}{9})', + trainingRemark: 'Section blockade function', + trainingType: '04', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '03', orderNum: 1, operateCode: '403', tip: 'Right click to select [Section blockade]' }, + { deviceType: '03', orderNum: 2, operateCode: '403', tip: 'Left click [confirm] ' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0406', + skinCode: '05', + trainingName: 'Section unblockade({8}{9})', + trainingRemark: 'Section unblockade function', + trainingType: '04', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '03', orderNum: 1, operateCode: '404', tip: 'Right click to select [Section unblockade]' }, + { deviceType: '03', orderNum: 2, operateCode: '4041', tip: 'Left click [Execute]' }, + { deviceType: '03', orderNum: 3, operateCode: '4043', tip: 'Left click [confirm1]' }, + { deviceType: '03', orderNum: 4, operateCode: '4044', tip: 'Left click [confirm2]' }, + { deviceType: '03', orderNum: 5, operateCode: '001', tip: 'Left click [close]' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0407', + skinCode: '05', + trainingName: 'Set speed limit on the section({8}{9})', + trainingRemark: 'Set speed limit on the section (speed limit value: 5)', + trainingType: '04', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '03', orderNum: 1, operateCode: '407', tip: 'Right click to select [Set speed limit on the section]' }, + { deviceType: '03', orderNum: 2, operateCode: '4076', tip: 'Left click to select [speed limit 5] ', val: '5' }, + { deviceType: '03', orderNum: 3, operateCode: '4071', tip: 'Left click [Execute]' }, + { deviceType: '03', orderNum: 4, operateCode: '4072', tip: 'Left click [confirm]' }, + { deviceType: '03', orderNum: 5, operateCode: '4073', tip: 'Left click [confirm1]' }, + { deviceType: '03', orderNum: 6, operateCode: '4074', tip: 'Left click [confirm2]', val: '5' }, + { deviceType: '03', orderNum: 7, operateCode: '001', tip: 'Left click [close]' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0408', + skinCode: '05', + trainingName: 'Cancel speed limit on the section({8}{9})', + trainingRemark: 'Cancel speed limit on the section', + trainingType: '04', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '03', orderNum: 1, operateCode: '408', tip: 'Right click to select [Cancel speed limit on the section]' }, + { deviceType: '03', orderNum: 2, operateCode: '4081', tip: 'Left click [Execute]' }, + { deviceType: '03', orderNum: 3, operateCode: '4082', tip: 'Left click [confirm] ' }, + { deviceType: '03', orderNum: 4, operateCode: '4083', tip: 'Left click [confirm1]' }, + { deviceType: '03', orderNum: 5, operateCode: '4084', tip: 'Left click [confirm2]', val: '5' }, + { deviceType: '03', orderNum: 6, operateCode: '001', tip: 'Left click [close]' } + ] + }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0301', - skinCode: '05', - trainingName: 'Switch monolock({7})', - trainingRemark: 'Switch single lock function', - trainingType: '03', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '02', orderNum: 1, operateCode: '103', tip: 'Right mouse button menu select 【 switch single lock 】' }, - { deviceType: '02', orderNum: 2, operateCode: '103', tip: 'Click the [ok] button with the left mouse button' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0302', - skinCode: '05', - trainingName: 'Switch single solution({7})', - trainingRemark: 'Switch single solution function', - trainingType: '03', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '02', orderNum: 1, operateCode: '104', tip: 'Right mouse button menu selection 【 switch single solution 】' }, - { deviceType: '02', orderNum: 2, operateCode: '1041', tip: 'Click the [down] button with the left mouse button' }, - { deviceType: '02', orderNum: 3, operateCode: '1043', tip: 'Click the [confirm 1] button with the left mouse button' }, - { deviceType: '02', orderNum: 4, operateCode: '1044', tip: 'Click the [confirm 2] button with the left mouse button' }, - { deviceType: '02', orderNum: 5, operateCode: '001', tip: 'Click the [close] button with the left mouse button' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0303', - skinCode: '05', - trainingName: 'The turnout section is closed({7})', - trainingRemark: 'Switch section closure function', - trainingType: '03', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '02', orderNum: 1, operateCode: '105', tip: 'Right mouse button menu selection [switch section closed]' }, - { deviceType: '02', orderNum: 2, operateCode: '105', tip: 'Click the [ok] button with the left mouse button' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0304', - skinCode: '05', - trainingName: 'Switch section unsealed({7})', - trainingRemark: 'Switch section unsealing function', - trainingType: '03', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '02', orderNum: 1, operateCode: '106', tip: 'Right mouse button menu select 【 switch section unseal 】' }, - { deviceType: '02', orderNum: 2, operateCode: '1061', tip: 'Click the [down] button with the left mouse button' }, - { deviceType: '02', orderNum: 3, operateCode: '1063', tip: 'Click the [confirm 1] button with the left mouse button' }, - { deviceType: '02', orderNum: 4, operateCode: '1064', tip: 'Click the [confirm 2] button with the left mouse button' }, - { deviceType: '02', orderNum: 5, operateCode: '001', tip: 'Click the [close] button with the left mouse button' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0305', - skinCode: '05', - trainingName: 'Switch the rotation({7})', - trainingRemark: 'Switch rotation function({15}turn{16})', - trainingType: '03', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '02', orderNum: 1, operateCode: '107', tip: 'Right mouse button menu selection [switch rotation]' }, - { deviceType: '02', orderNum: 2, operateCode: '107', tip: 'Click the [ok] button with the left mouse button' } - ] - }, - { - maxDuration: 20, - minDuration: 10, - operateType: '0306', - skinCode: '05', - trainingName: 'Fault unlocking of switch section({7})', - trainingRemark: 'Switch section fault unlocking function', - trainingType: '03', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '02', orderNum: 1, operateCode: '109', tip: 'Right mouse button menu to select "switch section fault unlock"' }, - { deviceType: '02', orderNum: 2, operateCode: '1091', tip: 'Click the [down] button with the left mouse button' }, - { deviceType: '02', orderNum: 3, operateCode: '1093', tip: 'Click the [confirm 1] button with the left mouse button' }, - { deviceType: '02', orderNum: 4, operateCode: '1094', tip: 'Click the [confirm 2] button with the left mouse button' }, - { deviceType: '02', orderNum: 5, operateCode: '001', tip: 'Click the [close] button with the left mouse button' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0307', - skinCode: '05', - trainingName: 'The turnout section is pre-reset by axle counting({7})', - trainingRemark: 'Switch section axis pre-reset function', - trainingType: '03', - productTypes: ['01'], - stepVOList: [ - { deviceType: '02', orderNum: 1, operateCode: '110', tip: 'Select from the right mouse button menu [switch section axis count pre-reset]' }, - { deviceType: '02', orderNum: 2, operateCode: '1101', tip: 'Click the [down] button with the left mouse button' }, - { deviceType: '02', orderNum: 3, operateCode: '1103', tip: 'Click the [confirm 1] button with the left mouse button' }, - { deviceType: '02', orderNum: 4, operateCode: '1104', tip: 'Click the [confirm 2] button with the left mouse button' }, - { deviceType: '02', orderNum: 5, operateCode: '001', tip: 'Click the [close] button with the left mouse button' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0308', - skinCode: '05', - trainingName: 'Segment resection({7})', - trainingRemark: 'Segment resection', - trainingType: '03', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '02', orderNum: 1, operateCode: '111', tip: 'Right mouse button menu select [segment cut]' }, - { deviceType: '02', orderNum: 2, operateCode: '111', tip: 'Click the [ok] button with the left mouse button' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0309', - skinCode: '05', - trainingName: 'Section to activate({7})', - trainingRemark: 'Section activation function', - trainingType: '03', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '02', orderNum: 1, operateCode: '112', tip: 'Right mouse button menu selection [section activation]' }, - { deviceType: '02', orderNum: 2, operateCode: '112', tip: 'Click the [ok] button with the left mouse button' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0310', - skinCode: '05', - trainingName: 'Speed limit is set at switch section({7})', - trainingRemark: 'Switch section setting speed limit function (speed limit value: 5)', - trainingType: '03', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '02', orderNum: 1, operateCode: '113', tip: 'Right mouse button menu selection 【 turnout section setting speed limit 】' }, - { deviceType: '02', orderNum: 2, operateCode: '1136', tip: 'Select [speed limit value 5] with the left mouse button', val: '5' }, - { deviceType: '02', orderNum: 3, operateCode: '1131', tip: 'Click the [down] button with the left mouse button' }, - { deviceType: '02', orderNum: 4, operateCode: '1132', tip: 'Click the [ok] button with the left mouse button' }, - { deviceType: '02', orderNum: 5, operateCode: '1133', tip: 'Click the [confirm 1] button with the left mouse button' }, - { deviceType: '02', orderNum: 6, operateCode: '1134', tip: 'Click the [confirm 2] button with the left mouse button', val: '5' }, - { deviceType: '02', orderNum: 7, operateCode: '001', tip: 'Click the [close] button with the left mouse button' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0311', - skinCode: '05', - trainingName: 'Remove speed limit in switch section({7})', - trainingRemark: 'Switch section cancel speed limit function', - trainingType: '03', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '02', orderNum: 1, operateCode: '114', tip: 'Right mouse button menu select 【 switch section cancel speed limit 】' }, - { deviceType: '02', orderNum: 2, operateCode: '1141', tip: 'Click the [down] button with the left mouse button' }, - { deviceType: '02', orderNum: 3, operateCode: '1142', tip: 'Click the [ok] button with the left mouse button' }, - { deviceType: '02', orderNum: 4, operateCode: '1143', tip: 'Click the [confirm 1] button with the left mouse button' }, - { deviceType: '02', orderNum: 5, operateCode: '1144', tip: 'Click the [confirm 2] button with the left mouse button', val: '5' }, - { deviceType: '02', orderNum: 6, operateCode: '001', tip: 'Click the [close] button with the left mouse button' } - ] - }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0301', + skinCode: '05', + trainingName: 'Single lock of turnout({7})', + trainingRemark: 'Single lock of turnout', + trainingType: '03', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '02', orderNum: 1, operateCode: '103', tip: 'Right click to select [Single lock of turnout]' }, + { deviceType: '02', orderNum: 2, operateCode: '103', tip: 'Left click [confirm] ' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0302', + skinCode: '05', + trainingName: 'Single release of turnout({7})', + trainingRemark: 'Single release of turnout', + trainingType: '03', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '02', orderNum: 1, operateCode: '104', tip: 'Right click to select [Single release of turnout]' }, + { deviceType: '02', orderNum: 2, operateCode: '1041', tip: 'Left click [Execute]' }, + { deviceType: '02', orderNum: 3, operateCode: '1043', tip: 'Left click [confirm1] ' }, + { deviceType: '02', orderNum: 4, operateCode: '1044', tip: 'Left click [confirm2] ' }, + { deviceType: '02', orderNum: 5, operateCode: '001', tip: 'Left click [close] '} + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0303', + skinCode: '05', + trainingName: 'Turnout section closure({7})', + trainingRemark: 'Turnout section closure ', + trainingType: '03', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '02', orderNum: 1, operateCode: '105', tip: 'Right click to select [Turnout section closure]' }, + { deviceType: '02', orderNum: 2, operateCode: '105', tip: 'Left click [confirm] ' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0304', + skinCode: '05', + trainingName: 'Turnout section unsealing({7})', + trainingRemark: 'Turnout section unsealing function', + trainingType: '03', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '02', orderNum: 1, operateCode: '106', tip: 'Right click to select [Turnout section unsealing]' }, + { deviceType: '02', orderNum: 2, operateCode: '1061', tip: 'Left click [Execute]' }, + { deviceType: '02', orderNum: 3, operateCode: '1063', tip: 'Left click [confirm1]' }, + { deviceType: '02', orderNum: 4, operateCode: '1064', tip: 'Left click [confirm2]' }, + { deviceType: '02', orderNum: 5, operateCode: '001', tip: 'Left click [close]' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0305', + skinCode: '05', + trainingName: 'Turnout rotation({7})', + trainingRemark: 'Turnout rotation({15}turn{16})', + trainingType: '03', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '02', orderNum: 1, operateCode: '107', tip: 'Right click to select [Turnout rotation]' }, + { deviceType: '02', orderNum: 2, operateCode: '107', tip: 'Left click [confirm] ' } + ] + }, + { + maxDuration: 20, + minDuration: 10, + operateType: '0306', + skinCode: '05', + trainingName: 'Turnout section fault unlocking({7})', + trainingRemark: 'Turnout section fault unlocking function', + trainingType: '03', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '02', orderNum: 1, operateCode: '109', tip: 'Right click to select [Turnout section fault unlocking]' }, + { deviceType: '02', orderNum: 2, operateCode: '1091', tip: 'Left click [Execute]' }, + { deviceType: '02', orderNum: 3, operateCode: '1093', tip: 'Left click [confirm1]' }, + { deviceType: '02', orderNum: 4, operateCode: '1094', tip: 'Left click [confirm2]' }, + { deviceType: '02', orderNum: 5, operateCode: '001', tip: 'Left click [close]' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0307', + skinCode: '05', + trainingName: 'Turnout section axile pre reset({7})', + trainingRemark: 'Turnout section axile pre reset function', + trainingType: '03', + productTypes: ['01'], + stepVOList: [ + { deviceType: '02', orderNum: 1, operateCode: '110', tip: 'Right click to select [Turnout section axile pre reset]' }, + { deviceType: '02', orderNum: 2, operateCode: '1101', tip: 'Left click [Execute]' }, + { deviceType: '02', orderNum: 3, operateCode: '1103', tip: 'Left click [confirm1]' }, + { deviceType: '02', orderNum: 4, operateCode: '1104', tip: 'Left click [confirm2]' }, + { deviceType: '02', orderNum: 5, operateCode: '001', tip: 'Left click [close]' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0308', + skinCode: '05', + trainingName: 'Section resection({7})', + trainingRemark: 'Section resection', + trainingType: '03', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '02', orderNum: 1, operateCode: '111', tip: 'Right click to select [Section resection]' }, + { deviceType: '02', orderNum: 2, operateCode: '111', tip: 'Left click [confirm]' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0309', + skinCode: '05', + trainingName: 'Section activation({7})', + trainingRemark: 'Section activation function', + trainingType: '03', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '02', orderNum: 1, operateCode: '112', tip: 'Right click to select [Section activation]' }, + { deviceType: '02', orderNum: 2, operateCode: '112', tip: 'Left click [confirm] ' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0310', + skinCode: '05', + trainingName: 'Set speed limit on the turnout section({7})', + trainingRemark: 'Set speed limit on the section (speed limit value: 5)', + trainingType: '03', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '02', orderNum: 1, operateCode: '113', tip: 'Right click to select [Set speed limit on the turnout section]' }, + { deviceType: '02', orderNum: 2, operateCode: '1136', tip: 'Left click to select [speed limit 5] ', val: '5' }, + { deviceType: '02', orderNum: 3, operateCode: '1131', tip: 'Left click [Execute]' }, + { deviceType: '02', orderNum: 4, operateCode: '1132', tip: 'Left click [confirm]' }, + { deviceType: '02', orderNum: 5, operateCode: '1133', tip: 'Left click [confirm1]' }, + { deviceType: '02', orderNum: 6, operateCode: '1134', tip: 'Left click [confirm2]', val: '5' }, + { deviceType: '02', orderNum: 7, operateCode: '001', tip: 'Left click [close]' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0311', + skinCode: '05', + trainingName: 'Cancel speed limit on the turnout section({7})', + trainingRemark: 'Cancel speed limit on the turnout section', + trainingType: '03', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '02', orderNum: 1, operateCode: '114', tip: 'Right click to select [Cancel speed limit on the turnout section]' }, + { deviceType: '02', orderNum: 2, operateCode: '1141', tip: 'Left click [Execute]' }, + { deviceType: '02', orderNum: 3, operateCode: '1142', tip: 'Left click [confirm] ' }, + { deviceType: '02', orderNum: 4, operateCode: '1143', tip: 'Left click [confirm1]' }, + { deviceType: '02', orderNum: 5, operateCode: '1144', tip: 'Left click [confirm2]', val: '5' }, + { deviceType: '02', orderNum: 6, operateCode: '001', tip: 'Left click [close]' } + ] + }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0201', - skinCode: '05', - trainingName: 'Route selected row({3})', - trainingRemark: 'Select alignment approach', - trainingType: '02', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '04', orderNum: 1, operateCode: '301', tip: 'Right mouse button menu selection [enter road select row]' }, - { deviceType: '04', orderNum: 2, operateCode: '3011', tip: 'The left mouse button selects the path name【{3}】', val: '{4}' }, - { deviceType: '04', orderNum: 3, operateCode: '301', tip: 'Click the [ok] button with the left mouse button' }, - { deviceType: '04', orderNum: 4, operateCode: '3012', tip: 'Click the [ok] button with the left mouse button' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0202', - skinCode: '05', - trainingName: 'Approach to cancel({3})', - trainingRemark: 'Approach to cancel', - trainingType: '02', - productTypes: ['02'], - stepVOList: [ - { deviceType: '04', orderNum: 1, operateCode: '303', tip: 'Right mouse button menu select [enter path cancel]' }, - { deviceType: '04', orderNum: 2, operateCode: '303', tip: 'Click the [ok] button with the left mouse button' }, - { deviceType: '04', orderNum: 3, operateCode: '3031', tip: 'Click the [ok] button with the left mouse button' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0202', - skinCode: '05', - trainingName: 'Approach to cancel({3})', - trainingRemark: 'Approach to cancel', - trainingType: '02', - productTypes: ['01'], - stepVOList: [ - { deviceType: '04', orderNum: 1, operateCode: '303', tip: 'Right mouse button menu select [enter path cancel]' }, - { deviceType: '04', orderNum: 2, operateCode: '303', tip: 'Click the [ok] button with the left mouse button' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0203', - skinCode: '05', - trainingName: 'Signal is closed({5})', - trainingRemark: 'Signal is closed', - trainingType: '02', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '04', orderNum: 1, operateCode: '306', tip: 'Right mouse button menu select [signal closed]' }, - { deviceType: '04', orderNum: 2, operateCode: '306', tip: 'Click the [ok] button with the left mouse button' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0204', - skinCode: '05', - trainingName: 'Signal to unlock({5})', - trainingRemark: 'Signal to unlock', - trainingType: '02', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '04', orderNum: 1, operateCode: '307', tip: 'Right mouse button menu selection [signal unsealing]' }, - { deviceType: '04', orderNum: 2, operateCode: '3071', tip: 'Click the [down] button with the left mouse button' }, - { deviceType: '04', orderNum: 3, operateCode: '3072', tip: 'Click the [ok] button with the left mouse button' }, - { deviceType: '04', orderNum: 4, operateCode: '3073', tip: 'Click the [confirm 1] button with the left mouse button' }, - { deviceType: '04', orderNum: 5, operateCode: '3074', tip: 'Click the [confirm 2] button with the left mouse button' }, - { deviceType: '04', orderNum: 6, operateCode: '001', tip: 'Click the [close] button with the left mouse button' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0205', - skinCode: '05', - trainingName: 'Signal to turn off the lights({3})', - trainingRemark: 'Signal to turn off the lights', - trainingType: '02', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '04', orderNum: 1, operateCode: '313', tip: 'Right mouse button menu select [signal off light]' }, - { deviceType: '04', orderNum: 2, operateCode: '313', tip: 'Click the [ok] button with the left mouse button' }, - { deviceType: '04', orderNum: 3, operateCode: '3131', tip: 'Click the [ok] button with the left mouse button' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0206', - skinCode: '05', - trainingName: 'Signal to restart({3})', - trainingRemark: 'Signal to restart', - trainingType: '02', - productTypes: ['01,02'], - stepVOList: [ - { deviceType: '04', orderNum: 1, operateCode: '304', tip: 'Right mouse button menu selection [signal reopen]' }, - { deviceType: '04', orderNum: 2, operateCode: '304', tip: 'Click the [ok] button with the left mouse button' }, - { deviceType: '04', orderNum: 3, operateCode: '3041', tip: 'Click the [ok] button with the left mouse button' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0207', - skinCode: '05', - trainingName: 'Guide the road handling({3})', - trainingRemark: 'Incoming road handling signal guidance', - trainingType: '02', - productTypes: ['01'], - stepVOList: [ - { deviceType: '04', orderNum: 1, operateCode: '308', tip: 'Right mouse button menu [Guide the road handling]' }, - { deviceType: '04', orderNum: 2, operateCode: '3081', tip: 'Click the [down] button with the left mouse button' }, - { deviceType: '04', orderNum: 3, operateCode: '3083', tip: 'Click the [confirm 1] button with the left mouse button' }, - { deviceType: '04', orderNum: 4, operateCode: '3084', tip: 'Click the [confirm 2] button with the left mouse button' }, - { deviceType: '04', orderNum: 5, operateCode: '001', tip: 'Click the [close] button with the left mouse button' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0208', - skinCode: '05', - trainingName: 'Since the lined({5})', - trainingRemark: 'Automatic alignment access open', - trainingType: '02', - productTypes: ['02'], - stepVOList: [ - { deviceType: '04', orderNum: 1, operateCode: '315', tip: 'Right mouse button menu [Since the lined]' }, - { deviceType: '04', orderNum: 2, operateCode: '3151', tip: 'The left mouse button selects the control state as "artificial" path', val: '{6}' }, - { deviceType: '04', orderNum: 3, operateCode: '315', tip: 'Click the [ok] button with the left mouse button' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0209', - skinCode: '05', - trainingName: 'Since the row off({5})', - trainingRemark: 'Automatic alignment approach closed', - trainingType: '02', - productTypes: ['02'], - stepVOList: [ - { deviceType: '04', orderNum: 1, operateCode: '314', tip: 'Right mouse button menu [Since the row off]' }, - { deviceType: '04', orderNum: 2, operateCode: '3141', tip: 'The left mouse button selects the first approach', val: '{6}' }, - { deviceType: '04', orderNum: 3, operateCode: '314', tip: 'Click the [ok] button with the left mouse button' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0210', - skinCode: '05', - trainingName: 'Query the incoming control status({5})', - trainingRemark: 'Query the incoming control status', - trainingType: '02', - productTypes: ['02'], - stepVOList: [ - { deviceType: '04', orderNum: 1, operateCode: '316', tip: 'Right mouse button menu [Query the incoming control status]' }, - { deviceType: '04', orderNum: 2, operateCode: '316', tip: 'Click the [ok] button with the left mouse button' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0211', - skinCode: '05', - trainingName: 'Set interlock automatic access({5})', - trainingRemark: 'Set interlock automatic access', - trainingType: '02', - productTypes: ['01'], - stepVOList: [ - { deviceType: '04', orderNum: 1, operateCode: '309', tip: 'Select from the right mouse button menu [set the automatic interlocking approach]' }, - { deviceType: '04', orderNum: 2, operateCode: '309', tip: 'Click the [ok] button with the left mouse button' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0212', - skinCode: '05', - trainingName: 'Cancel the interlock automatic access({5})', - trainingRemark: 'Cancel the interlock automatic access', - trainingType: '02', - productTypes: ['01'], - stepVOList: [ - { deviceType: '04', orderNum: 1, operateCode: '310', tip: 'Select from the right mouse button menu [cancel interlocking automatic access]' }, - { deviceType: '04', orderNum: 2, operateCode: '310', tip: 'Click the [ok] button with the left mouse button' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0213', - skinCode: '05', - trainingName: 'Set the interlock to trigger automatically({5})', - trainingRemark: 'Set the interlock to trigger automatically', - trainingType: '02', - productTypes: ['01'], - stepVOList: [ - { deviceType: '04', orderNum: 1, operateCode: '311', tip: 'Select from the menu of right mouse button [set automatic interlocking trigger]' }, - { deviceType: '04', orderNum: 2, operateCode: '311', tip: 'Click the [ok] button with the left mouse button' } - ] - }, - { - maxDuration: 15, - minDuration: 8, - operateType: '0214', - skinCode: '05', - trainingName: 'Cancel interlock automatic trigger({5})', - trainingRemark: 'Cancel interlock automatic trigger', - trainingType: '02', - productTypes: ['01'], - stepVOList: [ - { deviceType: '04', orderNum: 1, operateCode: '312', tip: 'Select from the right mouse button menu [cancel interlock automatic trigger]' }, - { deviceType: '04', orderNum: 2, operateCode: '312', tip: 'Click the [ok] button with the left mouse button' } - ] - } - ] - } + { + maxDuration: 15, + minDuration: 8, + operateType: '0201', + skinCode: '05', + trainingName: 'Route selection({3})', + trainingRemark: 'Route selection', + trainingType: '02', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '04', orderNum: 1, operateCode: '301', tip: 'Right click to select [Route selection]' }, + { deviceType: '04', orderNum: 2, operateCode: '3011', tip: 'Left click to select the route name【{3}】', val: '{4}' }, + { deviceType: '04', orderNum: 3, operateCode: '301', tip: 'Left click [confirm] ' }, + { deviceType: '04', orderNum: 4, operateCode: '3012', tip: 'Left click [confirm] ' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0202', + skinCode: '05', + trainingName: 'Cancel the route({3})', + trainingRemark: 'Cancel the route', + trainingType: '02', + productTypes: ['02'], + stepVOList: [ + { deviceType: '04', orderNum: 1, operateCode: '303', tip: 'Right click to select [Cancel the route]' }, + { deviceType: '04', orderNum: 2, operateCode: '303', tip: 'Left click [confirm] ' }, + { deviceType: '04', orderNum: 3, operateCode: '3031', tip: 'Left click [confirm]' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0202', + skinCode: '05', + trainingName: 'Cancel the route({3})', + trainingRemark: 'Cancel the route', + trainingType: '02', + productTypes: ['01'], + stepVOList: [ + { deviceType: '04', orderNum: 1, operateCode: '303', tip: 'Right click to select [Cancel the route]' }, + { deviceType: '04', orderNum: 2, operateCode: '303', tip: 'Left click [confirm]' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0203', + skinCode: '05', + trainingName: 'Signal closure({5})', + trainingRemark: 'Signal closure', + trainingType: '02', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '04', orderNum: 1, operateCode: '306', tip: 'Right click to select [Signal closure]' }, + { deviceType: '04', orderNum: 2, operateCode: '306', tip: 'Left click [confirm] ' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0204', + skinCode: '05', + trainingName: 'Signal unsealing({5})', + trainingRemark: 'Signal unsealing', + trainingType: '02', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '04', orderNum: 1, operateCode: '307', tip: 'Right click to select [Signal unsealing]' }, + { deviceType: '04', orderNum: 2, operateCode: '3071', tip: 'Left click [Execute]' }, + { deviceType: '04', orderNum: 3, operateCode: '3072', tip: 'Left click [confirm]' }, + { deviceType: '04', orderNum: 4, operateCode: '3073', tip: 'Left click [confirm1]' }, + { deviceType: '04', orderNum: 5, operateCode: '3074', tip: 'Left click [confirm2]' }, + { deviceType: '04', orderNum: 6, operateCode: '001', tip: 'Left click [close]' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0205', + skinCode: '05', + trainingName: 'Signal Off({3})', + trainingRemark: 'Signal Off', + trainingType: '02', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '04', orderNum: 1, operateCode: '313', tip: 'Right click to select [Signal Off]' }, + { deviceType: '04', orderNum: 2, operateCode: '313', tip: 'Left click [confirm]' }, + { deviceType: '04', orderNum: 3, operateCode: '3131', tip: 'Left click [confirm]' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0206', + skinCode: '05', + trainingName: 'Signal reopen({3})', + trainingRemark: 'Signal reopen', + trainingType: '02', + productTypes: ['01', '02'], + stepVOList: [ + { deviceType: '04', orderNum: 1, operateCode: '304', tip: 'Right click to select [Signal reopen]' }, + { deviceType: '04', orderNum: 2, operateCode: '304', tip: 'Left click [confirm]' }, + { deviceType: '04', orderNum: 3, operateCode: '3041', tip: 'Left click [confirm]' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0207', + skinCode: '05', + trainingName: 'Guide route handling({3})', + trainingRemark: 'Guide route handling', + trainingType: '02', + productTypes: ['01'], + stepVOList: [ + { deviceType: '04', orderNum: 1, operateCode: '308', tip: 'Right click to select [Guide route handling]' }, + { deviceType: '04', orderNum: 2, operateCode: '3081', tip: 'Left click [Execute]' }, + { deviceType: '04', orderNum: 3, operateCode: '3083', tip: 'Left click [confirm1]' }, + { deviceType: '04', orderNum: 4, operateCode: '3084', tip: 'Left click [confirm2]' }, + { deviceType: '04', orderNum: 5, operateCode: '001', tip: 'Left click [close]' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0208', + skinCode: '05', + trainingName: 'Start automatic routing({5})', + trainingRemark: 'Start automatic routing', + trainingType: '02', + productTypes: ['02'], + stepVOList: [ + { deviceType: '04', orderNum: 1, operateCode: '315', tip: 'Right click to select [Start automatic routing]' }, + { deviceType: '04', orderNum: 2, operateCode: '3151', tip: 'Left click to select the route based on the manual control state', val: '{6}' }, + { deviceType: '04', orderNum: 3, operateCode: '315', tip: 'Left click [confirm] ' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0209', + skinCode: '05', + trainingName: 'Close automatic routing({5})', + trainingRemark: 'Close automatic routing', + trainingType: '02', + productTypes: ['02'], + stepVOList: [ + { deviceType: '04', orderNum: 1, operateCode: '314', tip: 'Right click to select [Close automatic routing]' }, + { deviceType: '04', orderNum: 2, operateCode: '3141', tip: 'Left click to select the first route', val: '{6}' }, + { deviceType: '04', orderNum: 3, operateCode: '314', tip: 'Left click [confirm]' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0210', + skinCode: '05', + trainingName: 'Route control status query({5})', + trainingRemark: 'Query the route control status ', + trainingType: '02', + productTypes: ['02'], + stepVOList: [ + { deviceType: '04', orderNum: 1, operateCode: '316', tip: 'Right click to select [Route control status query]' }, + { deviceType: '04', orderNum: 2, operateCode: '316', tip: 'Left click [confirm] ' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0211', + skinCode: '05', + trainingName: 'Set Interlock for Auto Routing({5})', + trainingRemark: 'Set Interlock for Auto Routing', + trainingType: '02', + productTypes: ['01'], + stepVOList: [ + { deviceType: '04', orderNum: 1, operateCode: '309', tip: 'Right click to select [Set Interlock for Auto Routing]' }, + { deviceType: '04', orderNum: 2, operateCode: '309', tip: 'Left click [confirm]' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0212', + skinCode: '05', + trainingName: 'Cancel Interlock setting for Auto Routing({5})', + trainingRemark: 'Cancel Interlock setting for Auto Routing', + trainingType: '02', + productTypes: ['01'], + stepVOList: [ + { deviceType: '04', orderNum: 1, operateCode: '310', tip: 'Right click to select [Cancel Interlock setting for Auto Routing]' }, + { deviceType: '04', orderNum: 2, operateCode: '310', tip: 'Left click [confirm]' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0213', + skinCode: '05', + trainingName: 'Set Interlock for Auto Trigger({5})', + trainingRemark: 'Set Interlock for Auto Trigger', + trainingType: '02', + productTypes: ['01'], + stepVOList: [ + { deviceType: '04', orderNum: 1, operateCode: '311', tip: 'Right click to select [Set Interlock for Auto Trigger]' }, + { deviceType: '04', orderNum: 2, operateCode: '311', tip: 'Left click [confirm]' } + ] + }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0214', + skinCode: '05', + trainingName: 'Cancel Interlock setting for Auto Trigger({5})', + trainingRemark: 'Cancel Interlock setting for Auto Trigger', + trainingType: '02', + productTypes: ['01'], + stepVOList: [ + { deviceType: '04', orderNum: 1, operateCode: '312', tip: 'Right click to select[Cancel Interlock setting for Auto Trigger]' }, + { deviceType: '04', orderNum: 2, operateCode: '312', tip: 'Left click [confirm]' } + ] + } + ] + } }; diff --git a/src/scripts/plugin/converter/SectionOperationConverter.js b/src/scripts/plugin/converter/SectionOperationConverter.js index afe0f63ba..7c1f8bcbd 100644 --- a/src/scripts/plugin/converter/SectionOperationConverter.js +++ b/src/scripts/plugin/converter/SectionOperationConverter.js @@ -407,7 +407,7 @@ function handleButtonFault(operates) { return { type: operate.type, code: operate.code, - over: true, + // over: true, operation: SectionOperation.fault.event }; } diff --git a/src/scripts/plugin/converter/SignalRouteOperationConverter.js b/src/scripts/plugin/converter/SignalRouteOperationConverter.js index 4c29b472a..3baa1c8ae 100644 --- a/src/scripts/plugin/converter/SignalRouteOperationConverter.js +++ b/src/scripts/plugin/converter/SignalRouteOperationConverter.js @@ -7,95 +7,95 @@ const SignalOperation = OperationEvent.Signal; const SignalType = MapDeviceType.Signal.type; export default { - test: function (operates) { - const operateType = getOperateTypeBy('Signal', operates[0].operation); - if (operateType) { - return true; - } else { - return false; - } - }, - /** + test: function (operates) { + const operateType = getOperateTypeBy('Signal', operates[0].operation); + if (operateType) { + return true; + } else { + return false; + } + }, + /** * 验证前预处理 */ - preHandle: function (operates) { - if (operates && operates.length) { - const curOperate = operates[operates.length - 1]; - switch (operates[0].operation) { - case SignalOperation.arrangementRoute.button: { - if (curOperate.model) { - curOperate.val = curOperate.model._viewVal; - } - return curOperate; - } - case SignalOperation.cancelTrainRoute.button: { - if (curOperate.model) { - curOperate.val = curOperate.model._viewVal; - } - return curOperate; - } - case SignalOperation.reopenSignal.button: { - return curOperate; - } - case SignalOperation.humanTrainRoute.button: { - if (curOperate.model) { - curOperate.val = curOperate.model._viewVal; - } - return curOperate; - } - default: { - return curOperate; - } - } - } - }, - convert: function (operates) { - if (operates && operates.length) { - switch (operates[0].operation) { - case SignalOperation.cancelStoppage.menu.operation: return handleMenuCancelStopPage(operates); + preHandle: function (operates) { + if (operates && operates.length) { + const curOperate = operates[operates.length - 1]; + switch (operates[0].operation) { + case SignalOperation.arrangementRoute.button: { + if (curOperate.model) { + curOperate.val = curOperate.model._viewVal; + } + return curOperate; + } + case SignalOperation.cancelTrainRoute.button: { + if (curOperate.model) { + curOperate.val = curOperate.model._viewVal; + } + return curOperate; + } + case SignalOperation.reopenSignal.button: { + return curOperate; + } + case SignalOperation.humanTrainRoute.button: { + if (curOperate.model) { + curOperate.val = curOperate.model._viewVal; + } + return curOperate; + } + default: { + return curOperate; + } + } + } + }, + convert: function (operates) { + if (operates && operates.length) { + switch (operates[0].operation) { + case SignalOperation.cancelStoppage.menu.operation: return handleMenuCancelStopPage(operates); - case SignalOperation.stoppage.menu.operation: return handleMenuStoppage(operates); + case SignalOperation.stoppage.menu.operation: return handleMenuStoppage(operates); - case SignalOperation.arrangementRoute.button.operation: return handleButtonArrangementRoute(operates); // 排列进路按钮操作 - case SignalOperation.arrangementRoute.menu.operation: return handleMenuArrangementRoute(operates); + case SignalOperation.arrangementRoute.button.operation: return handleButtonArrangementRoute(operates); // 排列进路按钮操作 + case SignalOperation.arrangementRoute.menu.operation: return handleMenuArrangementRoute(operates); - case SignalOperation.cancelTrainRoute.button.operation: return handleButtonCancelTrainRoute(operates); // 取消进路按钮操作 - case SignalOperation.cancelTrainRoute.menu.operation: return handleMenuCancelTrainRoute(operates); + case SignalOperation.cancelTrainRoute.button.operation: return handleButtonCancelTrainRoute(operates); // 取消进路按钮操作 + case SignalOperation.cancelTrainRoute.menu.operation: return handleMenuCancelTrainRoute(operates); - case SignalOperation.reopenSignal.button.operation: return handleButtonReopenSignal(operates); // 信号重开按钮操作 - case SignalOperation.reopenSignal.menu.operation: return handleMenuReopenSignal(operates); + case SignalOperation.reopenSignal.button.operation: return handleButtonReopenSignal(operates); // 信号重开按钮操作 + case SignalOperation.reopenSignal.menu.operation: return handleMenuReopenSignal(operates); - case SignalOperation.humanTrainRoute.button.operation: return handleButtonHumanTrainRoute(operates); // 人解列车进路按钮操作 - case SignalOperation.humanTrainRoute.menu.operation: return handleMenuHumanTrainRoute(operates); + case SignalOperation.humanTrainRoute.button.operation: return handleButtonHumanTrainRoute(operates); // 人解列车进路按钮操作 + case SignalOperation.humanTrainRoute.menu.operation: return handleMenuHumanTrainRoute(operates); - case SignalOperation.lock.menu.operation: return handleMenuLock(operates); + case SignalOperation.lock.menu.operation: return handleMenuLock(operates); - case SignalOperation.unlock.menu.operation: return handleMenuUnlock(operates); + case SignalOperation.unlock.menu.operation: return handleMenuUnlock(operates); - case SignalOperation.guide.menu.operation: return handleMenuGuideRoute(operates); - case SignalOperation.guide.button.operation: return handleButtonGuideRoute(operates); // 引导进路按钮操作 + case SignalOperation.guide.menu.operation: return handleMenuGuideRoute(operates); + case SignalOperation.guide.button.operation: return handleButtonGuideRoute(operates); // 引导进路按钮操作 - case SignalOperation.signalClose.menu.operation: return handleMenuSignalClose(operates); + case SignalOperation.signalClose.menu.operation: return handleMenuSignalClose(operates); - case SignalOperation.setAutoInterlock.menu.operation: return handleMenuSetAutoInterlock(operates); - case SignalOperation.setAutoInterlock.button.operation: return handleButtonSetAutoInterlock(operates); // 设置联锁自动进路按钮 + case SignalOperation.setAutoInterlock.menu.operation: return handleMenuSetAutoInterlock(operates); + case SignalOperation.setAutoInterlock.button.operation: return handleButtonSetAutoInterlock(operates); // 设置联锁自动进路按钮 - case SignalOperation.cancelAutoInterlock.menu.operation: return handleMenuCancelAutoInterlock(operates); + case SignalOperation.cancelAutoInterlock.menu.operation: return handleMenuCancelAutoInterlock(operates); - case SignalOperation.setAutoTrigger.menu.operation: return handleMenuSetAutoTrigger(operates); + case SignalOperation.setAutoTrigger.menu.operation: return handleMenuSetAutoTrigger(operates); - case SignalOperation.cancelAutoTrigger.menu.operation: return handleMenuCancelAutoTrigger(operates); + case SignalOperation.cancelAutoTrigger.menu.operation: return handleMenuCancelAutoTrigger(operates); - case SignalOperation.humanControl.menu.operation: return handleMenuHumanControl(operates); - case SignalOperation.humanControl.button.operation: return handleButtonHumanControl(operates); // 人工控按钮操作 + case SignalOperation.humanControl.menu.operation: return handleMenuHumanControl(operates); + case SignalOperation.humanControl.button.operation: return handleButtonHumanControl(operates); // 人工控按钮操作 - case SignalOperation.atsAutoControl.menu.operation: return handleMenuAtsAutoControl(operates); - case SignalOperation.atsAutoControl.button.operation: return handleButtonAtsAutoControl(operates); // 自动控按钮操作 + case SignalOperation.atsAutoControl.menu.operation: return handleMenuAtsAutoControl(operates); + case SignalOperation.atsAutoControl.button.operation: return handleButtonAtsAutoControl(operates); // 自动控按钮操作 - case SignalOperation.detail.menu.operation: return handleMenuDetail(operates); - } - } - } + case SignalOperation.detail.menu.operation: return handleMenuDetail(operates); + } + } + } }; /** @@ -103,146 +103,37 @@ export default { * @param {*} operates */ function handleButtonArrangementRoute(operates) { - if (operates.length === 2) { - const operate = operates[1]; - if (operate.type === SignalType && operate.code && - operate.model && operate.model._viewVal) { - return { - type: operate.type, - code: operate.code, - operation: SignalOperation.arrangementRoute.event.query, - val: operate.model._viewVal - }; - } - return { error: true }; - } else if (operates.length >= 3) { - const operateBeg = operates[1]; - const operateEnd = operates[operates.length - 1]; - if (operateEnd.type === SignalType && operateEnd.code && - operateEnd.model && operateBeg.val === operateEnd.model._viewVal && - operateEnd.tempData && operateEnd.tempData.length) { - for (let i = 0; i < operateEnd.tempData.length; i++) { - const elem = operateEnd.tempData[i]; - if (elem.startSignalCode === operateBeg.code && elem.endSignalCode == operateEnd.code) { - return { - type: operateEnd.type, - code: operateEnd.code, - over: true, - operation: SignalOperation.arrangementRoute.event.confirm, - val: elem.code - }; - } - } - } - return { error: true }; - } - return null; -} - -/** - * 处理点击按钮 取消进路 操作 - * @param {*} operates - */ -function handleButtonCancelTrainRoute(operates) { - if (operates.length >= 2) { - const operate = operates[operates.length - 1]; - if (operate.type === SignalType && operate.code) { - return { - type: operate.type, - code: operate.code, - over: true, - operation: SignalOperation.cancelTrainRoute.event - }; - } - return { error: true }; - } - return null; -} - -/** - * 处理点击按钮 信号重开 操作 - * @param {*} operates - */ -function handleButtonReopenSignal(operates) { - if (operates.length >= 2) { - const operate = operates[operates.length - 1]; - if (operate.type === SignalType && operate.code) { - return { - type: operate.type, - code: operate.code, - over: true, - operation: SignalOperation.reopenSignal.event - }; - } - return { error: true }; - } - return null; -} - -/** - * 处理点击按钮 总人解 操作 - * @param {*} operates - */ -function handleButtonHumanTrainRoute(operates) { - if (operates.length >= 2) { - const operate = operates[operates.length - 1]; - if (operate.type === SignalType && operate.code) { - if (operate.code) { - // const counter = store.getters['map/getCounterBySingalCode'](operate.code, '02'); - // if (counter) { - // const val = localStore.get(counter.code) || ''; - return { - type: operate.type, - code: operate.code, - over: true, - operation: SignalOperation.humanTrainRoute.event - }; - // } - } - } - return { error: true }; - } - return null; -} - -/** - * 处理右键菜单 取消故障 操作 - * @param {*} operates - */ -function handleMenuCancelStopPage(operates) { - if (operates.length >= 1) { - const operate = operates[0]; - if (operate.type === SignalType && operate.code) { - return { - type: operate.type, - code: operate.code, - over: true, - operation: SignalOperation.cancelStoppage.event - }; - } - return { error: true }; - } - return null; -} - -/** - * 处理右键菜单 设置故障 操作 - * @param {*} operates - */ -function handleMenuStoppage(operates) { - if (operates.length >= 1) { - const operate = operates[0]; - if (operate.type === SignalType && operate.code) { - return { - type: operate.type, - code: operate.code, - over: true, - operation: SignalOperation.stoppage.event - }; - } - return { error: true }; - } - return null; + if (operates.length === 2) { + const operate = operates[1]; + if (operate.type == SignalType && operate.code) { + return { + type: operate.type, + code: operate.code, + operation: SignalOperation.arrangementRoute.event.query + // val: operate.model._viewVal + }; + } + return { error: true }; + } else if (operates.length >= 3) { + const operateBeg = operates[1]; // 起始信号灯 + const operateEnd = operates[operates.length - 1]; // 终端信号灯 + if (operateEnd.type == SignalType && operateEnd.code && operateEnd.tempData && operateEnd.tempData.length) { + for (let i = 0; i < operateEnd.tempData.length; i++) { + const elem = operateEnd.tempData[i]; + if (elem.startSignalCode === operateBeg.code && elem.endSignalCode == operateEnd.code) { + return { + type: operateEnd.type, + code: operateEnd.code, + over: true, + operation: SignalOperation.arrangementRoute.event.confirm + // val: elem.code + }; + } + } + } + return { error: true }; + } + return null; } /** @@ -250,31 +141,137 @@ function handleMenuStoppage(operates) { * @param {*} operates */ function handleMenuArrangementRoute(operates) { - if (operates.length == 1) { - const operate = operates[0]; - if (operate.type === SignalType && operate.code) { - return { - type: operate.type, - code: operate.code, - operation: SignalOperation.arrangementRoute.event.query - }; - } - return { error: true }; - } else if (operates.length >= 3) { - const operate = operates[operates.length - 1]; - if (operate.type === SignalType && operates[0].code && (operates[operates.length - 2].val || operates[operates.length - 3].val)) { - return { - over: true, - type: operate.type, - code: operates[0].code, - operation: SignalOperation.arrangementRoute.event.confirm, - val: operates[operates.length - 2].val || operates[operates.length - 3].val - }; - } - return { error: true }; - } + if (operates.length == 1) { + const operate = operates[0]; + if (operate.type === SignalType && operate.code) { + return { + type: operate.type, + code: operate.code, + operation: SignalOperation.arrangementRoute.event.query + }; + } + return { error: true }; + } else if (operates.length >= 3) { + const operate = operates[operates.length - 1]; + if (operate.type === SignalType && operates[0].code && (operates[operates.length - 2].val || operates[operates.length - 3].val)) { + return { + over: true, + type: operate.type, + code: operates[0].code, + operation: SignalOperation.arrangementRoute.event.confirm, + val: operates[operates.length - 2].val || operates[operates.length - 3].val + }; + } + return { error: true }; + } - return null; + return null; +} + +/** + * 处理点击按钮 取消进路 操作 + * @param {*} operates + */ +function handleButtonCancelTrainRoute(operates) { + if (operates.length >= 2) { + const operate = operates[operates.length - 1]; + if (operate.type === SignalType && operate.code) { + return { + type: operate.type, + code: operate.code, + over: true, + operation: SignalOperation.cancelTrainRoute.event + }; + } + return { error: true }; + } + return null; +} + +/** + * 处理点击按钮 信号重开 操作 + * @param {*} operates + */ +function handleButtonReopenSignal(operates) { + if (operates.length >= 2) { + const operate = operates[operates.length - 1]; + if (operate.type === SignalType && operate.code) { + return { + type: operate.type, + code: operate.code, + over: true, + operation: SignalOperation.reopenSignal.event + }; + } + return { error: true }; + } + return null; +} + +/** + * 处理点击按钮 总人解 操作 + * @param {*} operates + */ +function handleButtonHumanTrainRoute(operates) { + if (operates.length >= 2) { + const operate = operates[operates.length - 1]; + if (operate.type === SignalType && operate.code) { + if (operate.code) { + // const counter = store.getters['map/getCounterBySingalCode'](operate.code, '02'); + // if (counter) { + // const val = localStore.get(counter.code) || ''; + return { + type: operate.type, + code: operate.code, + over: true, + operation: SignalOperation.humanTrainRoute.event + }; + // } + } + } + return { error: true }; + } + return null; +} + +/** + * 处理右键菜单 取消故障 操作 + * @param {*} operates + */ +function handleMenuCancelStopPage(operates) { + if (operates.length >= 1) { + const operate = operates[0]; + if (operate.type === SignalType && operate.code) { + return { + type: operate.type, + code: operate.code, + over: true, + operation: SignalOperation.cancelStoppage.event + }; + } + return { error: true }; + } + return null; +} + +/** + * 处理右键菜单 设置故障 操作 + * @param {*} operates + */ +function handleMenuStoppage(operates) { + if (operates.length >= 1) { + const operate = operates[0]; + if (operate.type === SignalType && operate.code) { + return { + type: operate.type, + code: operate.code, + over: true, + operation: SignalOperation.stoppage.event + }; + } + return { error: true }; + } + return null; } /** @@ -282,19 +279,19 @@ function handleMenuArrangementRoute(operates) { * @param {*} operates */ function handleMenuCancelTrainRoute(operates) { - if (operates.length >= 2) { - const operate = operates[0]; - if (operate.type === SignalType && operate.code) { - return { - type: operate.type, - code: operate.code, - over: true, - operation: SignalOperation.cancelTrainRoute.event - }; - } - return { error: true }; - } - return null; + if (operates.length >= 2) { + const operate = operates[0]; + if (operate.type === SignalType && operate.code) { + return { + type: operate.type, + code: operate.code, + over: true, + operation: SignalOperation.cancelTrainRoute.event + }; + } + return { error: true }; + } + return null; } /** @@ -302,19 +299,19 @@ function handleMenuCancelTrainRoute(operates) { * @param {*} operates */ function handleMenuReopenSignal(operates) { - if (operates.length >= 2) { - const operate = operates[0]; - if (operate.type === SignalType && operate.code) { - return { - type: operate.type, - code: operate.code, - over: true, - operation: SignalOperation.reopenSignal.event - }; - } - return { error: true }; - } - return null; + if (operates.length >= 2) { + const operate = operates[0]; + if (operate.type === SignalType && operate.code) { + return { + type: operate.type, + code: operate.code, + over: true, + operation: SignalOperation.reopenSignal.event + }; + } + return { error: true }; + } + return null; } /** @@ -322,26 +319,26 @@ function handleMenuReopenSignal(operates) { * @param {*} operates */ function handleMenuHumanTrainRoute(operates) { - if (operates.length >= 2) { - const operate = operates[0]; - if (operate.type === SignalType && operate.code) { - if (operate.code) { - // const counter = store.getters['map/getCounterBySingalCode'](operate.code, '02'); - // if (counter) { - // const val = localStore.get(counter.code) || ''; - return { - type: operate.type, - code: operate.code, - over: true, - operation: SignalOperation.humanTrainRoute.event - // val: val - }; - // } - } - } - return { error: true }; - } - return null; + if (operates.length >= 2) { + const operate = operates[0]; + if (operate.type === SignalType && operate.code) { + if (operate.code) { + // const counter = store.getters['map/getCounterBySingalCode'](operate.code, '02'); + // if (counter) { + // const val = localStore.get(counter.code) || ''; + return { + type: operate.type, + code: operate.code, + over: true, + operation: SignalOperation.humanTrainRoute.event + // val: val + }; + // } + } + } + return { error: true }; + } + return null; } /** @@ -349,18 +346,18 @@ function handleMenuHumanTrainRoute(operates) { * @param {*} operates */ function handleMenuLock(operates) { - if (operates.length >= 2) { - const operate = operates[0]; - if (operate.type === SignalType && operate.code) { - return { - type: operate.type, - code: operate.code, - over: true, - operation: SignalOperation.lock.event - }; - } - return { error: true }; - } + if (operates.length >= 2) { + const operate = operates[0]; + if (operate.type === SignalType && operate.code) { + return { + type: operate.type, + code: operate.code, + over: true, + operation: SignalOperation.lock.event + }; + } + return { error: true }; + } } /** @@ -368,18 +365,18 @@ function handleMenuLock(operates) { * @param {*} operates */ function handleMenuUnlock(operates) { - if (operates.length >= 2) { - const operate = operates[0]; - if (operate.type === SignalType && operate.code) { - return { - type: operate.type, - code: operate.code, - over: true, - operation: SignalOperation.unlock.event - }; - } - return { error: true }; - } + if (operates.length >= 2) { + const operate = operates[0]; + if (operate.type === SignalType && operate.code) { + return { + type: operate.type, + code: operate.code, + over: true, + operation: SignalOperation.unlock.event + }; + } + return { error: true }; + } } /** @@ -387,28 +384,28 @@ function handleMenuUnlock(operates) { * @param {*} operates */ function handleMenuGuideRoute(operates) { - if (operates.length == 1) { - const operate = operates[0]; - if (operate.type === SignalType && operate.code) { - return { - type: operate.type, - code: operate.code, - operation: SignalOperation.guide.event.query - }; - } - return { error: true }; - } else if (operates.length >= 2) { - const operate = operates[0]; - if (operate.type === SignalType && operate.code) { - return { - type: operate.type, - code: operate.code, - over: true, - operation: SignalOperation.guide.event.confirm - }; - } - return { error: true }; - } + if (operates.length == 1) { + const operate = operates[0]; + if (operate.type === SignalType && operate.code) { + return { + type: operate.type, + code: operate.code, + operation: SignalOperation.guide.event.query + }; + } + return { error: true }; + } else if (operates.length >= 2) { + const operate = operates[0]; + if (operate.type === SignalType && operate.code) { + return { + type: operate.type, + code: operate.code, + over: true, + operation: SignalOperation.guide.event.confirm + }; + } + return { error: true }; + } } /** @@ -416,19 +413,19 @@ function handleMenuGuideRoute(operates) { * @param {*} operates */ function handleMenuSignalClose(operates) { - if (operates.length >= 2) { - const operate = operates[0]; - if (operate.type === SignalType && operate.code) { - return { - type: operate.type, - code: operate.code, - over: true, - operation: SignalOperation.signalClose.event - }; - } - return { error: true }; - } - return null; + if (operates.length >= 2) { + const operate = operates[0]; + if (operate.type === SignalType && operate.code) { + return { + type: operate.type, + code: operate.code, + over: true, + operation: SignalOperation.signalClose.event + }; + } + return { error: true }; + } + return null; } /** @@ -436,19 +433,19 @@ function handleMenuSignalClose(operates) { * @param {*} operates */ function handleMenuSetAutoInterlock(operates) { - if (operates.length >= 2) { - const operate = operates[0]; - if (operate.type === SignalType && operate.code) { - return { - type: operate.type, - code: operate.code, - over: true, - operation: SignalOperation.setAutoInterlock.event - }; - } - return { error: true }; - } - return null; + if (operates.length >= 2) { + const operate = operates[0]; + if (operate.type === SignalType && operate.code) { + return { + type: operate.type, + code: operate.code, + over: true, + operation: SignalOperation.setAutoInterlock.event + }; + } + return { error: true }; + } + return null; } /** @@ -456,19 +453,19 @@ function handleMenuSetAutoInterlock(operates) { * @param {*} operates */ function handleMenuCancelAutoInterlock(operates) { - if (operates.length >= 2) { - const operate = operates[0]; - if (operate.type === SignalType && operate.code) { - return { - type: operate.type, - code: operate.code, - over: true, - operation: SignalOperation.cancelAutoInterlock.event - }; - } - return { error: true }; - } - return null; + if (operates.length >= 2) { + const operate = operates[0]; + if (operate.type === SignalType && operate.code) { + return { + type: operate.type, + code: operate.code, + over: true, + operation: SignalOperation.cancelAutoInterlock.event + }; + } + return { error: true }; + } + return null; } /** @@ -476,19 +473,19 @@ function handleMenuCancelAutoInterlock(operates) { * @param {*} operates */ function handleMenuSetAutoTrigger(operates) { - if (operates.length >= 2) { - const operate = operates[0]; - if (operate.type === SignalType && operate.code) { - return { - type: operate.type, - code: operate.code, - over: true, - operation: SignalOperation.setAutoTrigger.event - }; - } - return { error: true }; - } - return null; + if (operates.length >= 2) { + const operate = operates[0]; + if (operate.type === SignalType && operate.code) { + return { + type: operate.type, + code: operate.code, + over: true, + operation: SignalOperation.setAutoTrigger.event + }; + } + return { error: true }; + } + return null; } /** @@ -496,19 +493,19 @@ function handleMenuSetAutoTrigger(operates) { * @param {*} operates */ function handleMenuCancelAutoTrigger(operates) { - if (operates.length >= 2) { - const operate = operates[0]; - if (operate.type === SignalType && operate.code) { - return { - type: operate.type, - code: operate.code, - over: true, - operation: SignalOperation.cancelAutoTrigger.event - }; - } - return { error: true }; - } - return null; + if (operates.length >= 2) { + const operate = operates[0]; + if (operate.type === SignalType && operate.code) { + return { + type: operate.type, + code: operate.code, + over: true, + operation: SignalOperation.cancelAutoTrigger.event + }; + } + return { error: true }; + } + return null; } /** @@ -516,52 +513,52 @@ function handleMenuCancelAutoTrigger(operates) { * @param {*} operates */ function handleMenuHumanControl(operates) { - if (operates.length == 1) { - const operate = operates[0]; - if (operate.type === SignalType && operate.code) { - return { - type: operate.type, - code: operate.code, - operation: SignalOperation.humanControl.event.query - }; - } - return { error: true }; - } else if (operates.length >= 2) { - const operate = operates[operates.length - 1]; - let val = null; - val = operates[operates.length - 3] && operates[operates.length - 3].val ? operates[operates.length - 3].val : val; - val = operates[operates.length - 2] && operates[operates.length - 2].val ? operates[operates.length - 2].val : val; - val = operates[operates.length - 1] && operates[operates.length - 1].val ? operates[operates.length - 1].val : val; + if (operates.length == 1) { + const operate = operates[0]; + if (operate.type === SignalType && operate.code) { + return { + type: operate.type, + code: operate.code, + operation: SignalOperation.humanControl.event.query + }; + } + return { error: true }; + } else if (operates.length >= 2) { + const operate = operates[operates.length - 1]; + let val = null; + val = operates[operates.length - 3] && operates[operates.length - 3].val ? operates[operates.length - 3].val : val; + val = operates[operates.length - 2] && operates[operates.length - 2].val ? operates[operates.length - 2].val : val; + val = operates[operates.length - 1] && operates[operates.length - 1].val ? operates[operates.length - 1].val : val; - if (operate.type === SignalType && operates[0].code && val) { - return { - over: true, - type: operate.type, - code: operates[0].code, - operation: SignalOperation.humanControl.event.confirm, - val: val - }; - } - return { error: true }; - } - return null; + if (operate.type === SignalType && operates[0].code && val) { + return { + over: true, + type: operate.type, + code: operates[0].code, + operation: SignalOperation.humanControl.event.confirm, + val: val + }; + } + return { error: true }; + } + return null; } // 人工控按钮 操作 function handleButtonHumanControl(operates) { - if (operates.length >= 2) { - const operate = operates[operates.length - 1]; - if (operate.type === SignalType && operate.code) { - return { - type: operate.type, - code: operate.code, - over: true, - operation: SignalOperation.humanControl.event.confirm - }; - } - return { error: true }; - } - return null; + if (operates.length >= 2) { + const operate = operates[operates.length - 1]; + if (operate.type === SignalType && operate.code) { + return { + type: operate.type, + code: operate.code, + over: true, + operation: SignalOperation.humanControl.event.confirm + }; + } + return { error: true }; + } + return null; } /** @@ -569,52 +566,52 @@ function handleButtonHumanControl(operates) { * @param {*} operates */ function handleMenuAtsAutoControl(operates) { - if (operates.length == 1) { - const operate = operates[0]; - if (operate.type === SignalType && operate.code) { - return { - type: operate.type, - code: operate.code, - operation: SignalOperation.atsAutoControl.event.query - }; - } - return { error: true }; - } else if (operates.length >= 2) { - const operate = operates[operates.length - 1]; - let val = null; - val = operates[operates.length - 3] && operates[operates.length - 3].val ? operates[operates.length - 3].val : val; - val = operates[operates.length - 2] && operates[operates.length - 2].val ? operates[operates.length - 2].val : val; - val = operates[operates.length - 1] && operates[operates.length - 1].val ? operates[operates.length - 1].val : val; + if (operates.length == 1) { + const operate = operates[0]; + if (operate.type === SignalType && operate.code) { + return { + type: operate.type, + code: operate.code, + operation: SignalOperation.atsAutoControl.event.query + }; + } + return { error: true }; + } else if (operates.length >= 2) { + const operate = operates[operates.length - 1]; + let val = null; + val = operates[operates.length - 3] && operates[operates.length - 3].val ? operates[operates.length - 3].val : val; + val = operates[operates.length - 2] && operates[operates.length - 2].val ? operates[operates.length - 2].val : val; + val = operates[operates.length - 1] && operates[operates.length - 1].val ? operates[operates.length - 1].val : val; - if (operate.type === SignalType && operates[0].code && val) { - return { - over: true, - type: operate.type, - code: operates[0].code, - operation: SignalOperation.atsAutoControl.event.confirm, - val: val - }; - } - return { error: true }; - } - return null; + if (operate.type === SignalType && operates[0].code && val) { + return { + over: true, + type: operate.type, + code: operates[0].code, + operation: SignalOperation.atsAutoControl.event.confirm, + val: val + }; + } + return { error: true }; + } + return null; } // 自动控 按钮操作 function handleButtonAtsAutoControl(operates) { - if (operates.length >= 2) { - const operate = operates[operates.length - 1]; - if (operate.type === SignalType && operate.code) { - return { - type: operate.type, - code: operate.code, - over: true, - operation: SignalOperation.atsAutoControl.event.confirm - }; - } - return { error: true }; - } - return null; + if (operates.length >= 2) { + const operate = operates[operates.length - 1]; + if (operate.type === SignalType && operate.code) { + return { + type: operate.type, + code: operate.code, + over: true, + operation: SignalOperation.atsAutoControl.event.confirm + }; + } + return { error: true }; + } + return null; } /** @@ -622,18 +619,18 @@ function handleButtonAtsAutoControl(operates) { * @param {*} operates */ function handleMenuDetail(operates) { - if (operates.length == 1) { - const operate = operates[0]; - if (operate.type === SignalType && operate.code) { - return { - type: operate.type, - code: operate.code, - operation: SignalOperation.detail.event.query - }; - } - return { error: true }; - } - return null; + if (operates.length == 1) { + const operate = operates[0]; + if (operate.type === SignalType && operate.code) { + return { + type: operate.type, + code: operate.code, + operation: SignalOperation.detail.event.query + }; + } + return { error: true }; + } + return null; } /** @@ -641,19 +638,19 @@ function handleMenuDetail(operates) { * @param {*} operates */ function handleButtonSetAutoInterlock(operates) { - if (operates.length >= 2) { - const operate = operates[operates.length - 1]; - if (operate.type === SignalType && operate.code) { - return { - type: operate.type, - code: operate.code, - over: true, - operation: SignalOperation.setAutoInterlock.event - }; - } - return { error: true }; - } - return null; + if (operates.length >= 2) { + const operate = operates[operates.length - 1]; + if (operate.type === SignalType && operate.code) { + return { + type: operate.type, + code: operate.code, + over: true, + operation: SignalOperation.setAutoInterlock.event + }; + } + return { error: true }; + } + return null; } /** @@ -661,18 +658,34 @@ function handleButtonSetAutoInterlock(operates) { * @param {*} operates */ function handleButtonGuideRoute(operates) { - if (operates.length >= 2) { - const operate = operates[operates.length - 1]; - if (operate.type === SignalType && operate.code) { - return { - type: operate.type, - code: operate.code, - over: true, - operation: SignalOperation.guide.event.confirm - }; - } - return { error: true }; - } - return null; + if (operates.length == 2) { + const operate = operates[operates.length - 1]; + if (operate.type === SignalType && operate.code) { + return { + type: operate.type, + code: operate.code, + operation: SignalOperation.guide.event.confirm + }; + } + return { error: true }; + } else if (operates.length >= 3) { + const operateBeg = operates[1]; + const operateEnd = operates[operates.length - 1]; + if (operateEnd.type === SignalType && operateEnd.code && operateEnd.tempData && operateEnd.tempData.length) { + for (let i = 0; i < operateEnd.tempData.length; i++) { + const elem = operateEnd.tempData[i]; + if (elem.startSignalCode === operateBeg.code && elem.endSignalCode == operateEnd.code) { + return { + type: operateEnd.type, + code: operateEnd.code, + over: true, + operation: SignalOperation.guide.event.confirm + }; + } + } + } + return { error: true }; + } + return null; } diff --git a/src/scripts/plugin/converter/TrainOperationConverter.js b/src/scripts/plugin/converter/TrainOperationConverter.js index 64dceefa8..f16069f7a 100644 --- a/src/scripts/plugin/converter/TrainOperationConverter.js +++ b/src/scripts/plugin/converter/TrainOperationConverter.js @@ -5,214 +5,224 @@ const TrainOperation = OperationEvent.Train; const TrainType = MapDeviceType.Train.type; export default { - test: function (operates) { - let operateType = getOperateTypeBy('Train', operates[0].operation); - if (operateType) { - return true; - } else { - return false; - } - }, - convert: function (operates) { - if (operates && operates.length) { - let operation = operates[0].operation; - switch (operation) { - case TrainOperation.cancelStoppage.menu.operation: return handleMenuCancelStopPage(operates); + test: function (operates) { + const operateType = getOperateTypeBy('Train', operates[0].operation); + if (operateType) { + return true; + } else { + return false; + } + }, + convert: function (operates) { + if (operates && operates.length) { + const operation = operates[0].operation; + switch (operation) { + case TrainOperation.cancelStoppage.menu.operation: return handleMenuCancelStopPage(operates); - case TrainOperation.stoppage.menu.operation: return handleMenuStoppage(operates); + case TrainOperation.stoppage.menu.operation: return handleMenuStoppage(operates); - case TrainOperation.addTrainId.menu.operation: return handleMenuAddTrainId(operates); + case TrainOperation.addTrainId.menu.operation: return handleMenuAddTrainId(operates); - case TrainOperation.editTrainId.menu.operation: return handleMenuEditTrainId(operates); + case TrainOperation.editTrainId.menu.operation: return handleMenuEditTrainId(operates); - case TrainOperation.delTrainId.menu.operation: return handleMenuDelTrainId(operates); + case TrainOperation.delTrainId.menu.operation: return handleMenuDelTrainId(operates); - case TrainOperation.moveTrainId.menu.operation: return handleMenuMoveTrainId(operates); + case TrainOperation.moveTrainId.menu.operation: return handleMenuMoveTrainId(operates); - case TrainOperation.switchTrainId.menu.operation: return handleMenuSwitchTrainId(operates); + case TrainOperation.switchTrainId.menu.operation: return handleMenuSwitchTrainId(operates); - case TrainOperation.editTrainNo.menu.operation: return handleMenuEditTrainNo(operates); + case TrainOperation.editTrainNo.menu.operation: return handleMenuEditTrainNo(operates); - case TrainOperation.limitSpeed.menu.operation: return handleMenuLimitSpeed(operates); + case TrainOperation.limitSpeed.menu.operation: return handleMenuLimitSpeed(operates); - case TrainOperation.setPlanTrainId.menu.operation: return handleMenuSetPlanTrainId(operates); + case TrainOperation.setPlanTrainId.menu.operation: return handleMenuSetPlanTrainId(operates); - case TrainOperation.addPlanTrainId.menu.operation: return handleMenuAddPlanTrainId(operates); + case TrainOperation.addPlanTrainId.menu.operation: return handleMenuAddPlanTrainId(operates); - case TrainOperation.moveEventlyTrainId.menu.operation: return handleMenuMoveEventlyTrainId(operates); + case TrainOperation.moveEventlyTrainId.menu.operation: return handleMenuMoveEventlyTrainId(operates); - case TrainOperation.deletePlanTrainId.menu.operation: return handleMenuDeletePlanTrainId(operates); + case TrainOperation.deletePlanTrainId.menu.operation: return handleMenuDeletePlanTrainId(operates); - } - } - } + } + } + } }; /** * 处理右键菜单 取消故障 操作 - * @param {*} operates + * @param {*} operates */ function handleMenuCancelStopPage(operates) { - if (operates.length >= 1) { - let operate = operates[0]; - if (operate.type === TrainType && operate.code) { - return { - type: operate.type, - code: operate.code, - over: true, - operation: TrainOperation.cancelStoppage.event - }; - } - return { error: true }; - } - return null; + if (operates.length >= 1) { + const operate = operates[0]; + if (operate.type === TrainType && operate.code) { + return { + type: operate.type, + code: operate.code, + over: true, + operation: TrainOperation.cancelStoppage.event + }; + } + return { error: true }; + } + return null; } /** * 处理右键菜单 设置故障 操作 - * @param {*} operates + * @param {*} operates */ function handleMenuStoppage(operates) { - if (operates.length >= 1) { - let operate = operates[0]; - if (operate.type === TrainType && operate.code) { - return { - type: operate.type, - code: operate.code, - over: true, - operation: TrainOperation.stoppage.event - }; - } - return { error: true }; - } - return null; + if (operates.length >= 1) { + const operate = operates[0]; + if (operate.type === TrainType && operate.code) { + return { + type: operate.type, + code: operate.code, + over: true, + operation: TrainOperation.stoppage.event + }; + } + return { error: true }; + } + return null; } - /** * 处理右键菜单 添加列车识别号 操作 - * @param {*} operates + * @param {*} operates */ function handleMenuAddTrainId(operates) { - if (operates.length >= 1) { - let operate = operates[operates.length - 1]; - if (operate.type === TrainType && operate.val) { - return { - type: operate.type, - code: operates[0].code, - over: true, - operation: TrainOperation.addTrainId.event, - val: operate.val, - }; - } - return { error: true }; - } - return null; + if (operates.length >= 1) { + const operate = operates[operates.length - 1]; + if (operate.type === TrainType && operate.val) { + return { + type: operate.type, + code: operates[0].code, + over: true, + operation: TrainOperation.addTrainId.event, + val: operate.val + }; + } + return { error: true }; + } + return null; } /** * 处理右键菜单 修改列车识别号 操作 - * @param {*} operates + * @param {*} operates */ function handleMenuEditTrainId(operates) { - if (operates.length >= 1) { - let operate = operates[operates.length - 1]; - if (operate.type === TrainType && operate.val) { - return { - type: operate.type, - code: operates[0].code, - over: true, - operation: TrainOperation.editTrainId.event, - val: operate.val - }; - } - return { error: true }; - } - return null; + if (operates.length == 2) { + const operate = operates[operates.length - 1]; + if (operate.type === TrainType && operate.val) { + return { + type: operate.type, + code: operates[0].code, + operation: TrainOperation.editTrainId.event.query, + val: operate.val + }; + } + return { error: true }; + } else if (operates.length > 2) { + const operate = operates[operates.length - 1]; + if (operate.type === TrainType && operate.val) { + return { + type: operate.type, + code: operates[0].code, + over: true, + operation: TrainOperation.editTrainId.event.confirm, + val: operate.val + }; + } + return { error: true }; + } + return null; } /** * 处理右键菜单 删除列车识别号 操作 - * @param {*} operates + * @param {*} operates */ function handleMenuDelTrainId(operates) { - if (operates.length >= 1) { - let operate = operates[operates.length - 1]; - if (operate.type === TrainType && operate.val) { - return { - type: operate.type, - code: operates[0].code, - over: true, - operation: TrainOperation.delTrainId.event, - val: operate.val - }; - } - return { error: true }; - } - return null; + if (operates.length >= 1) { + const operate = operates[operates.length - 1]; + if (operate.type === TrainType && operate.val) { + return { + type: operate.type, + code: operates[0].code, + over: true, + operation: TrainOperation.delTrainId.event, + val: operate.val + }; + } + return { error: true }; + } + return null; } /** * 处理右键菜单 移动列车识别号 操作 - * @param {*} operates + * @param {*} operates */ function handleMenuMoveTrainId(operates) { - if (operates.length >= 1) { - let operate = operates[operates.length - 1]; - if (operate.type === TrainType && operate.val) { - return { - type: operate.type, - code: operates[0].code, - over: true, - operation: TrainOperation.moveTrainId.event, - val: operate.val - }; - } - return { error: true }; - } - return null; + if (operates.length >= 1) { + const operate = operates[operates.length - 1]; + if (operate.type === TrainType && operate.val) { + return { + type: operate.type, + code: operates[0].code, + over: true, + operation: TrainOperation.moveTrainId.event, + val: operate.val + }; + } + return { error: true }; + } + return null; } /** * 处理右键菜单 交换列车识别号 操作 - * @param {*} operates + * @param {*} operates */ function handleMenuSwitchTrainId(operates) { - if (operates.length >= 1) { - let operate = operates[operates.length - 1]; - if (operate.type === TrainType && operate.val) { - return { - type: operate.type, - code: operates[0].code, - over: true, - operation: TrainOperation.switchTrainId.event, - val: operate.val - }; - } - return { error: true }; - } - return null; + if (operates.length >= 1) { + const operate = operates[operates.length - 1]; + if (operate.type === TrainType && operate.val) { + return { + type: operate.type, + code: operates[0].code, + over: true, + operation: TrainOperation.switchTrainId.event, + val: operate.val + }; + } + return { error: true }; + } + return null; } /** * 处理右键菜单 修改车组号 操作 - * @param {*} operates + * @param {*} operates */ function handleMenuEditTrainNo(operates) { - if (operates.length >= 1) { - let operate = operates[operates.length - 1]; - if (operate.type === TrainType && operate.val) { - return { - type: operate.type, - code: operate[0].code, - over: true, - operation: TrainOperation.editTrainNo.event, - val: operate.val - }; - } - return { error: true }; - } - return null; + if (operates.length >= 1) { + const operate = operates[operates.length - 1]; + if (operate.type === TrainType && operate.val) { + return { + type: operate.type, + code: operate[0].code, + over: true, + operation: TrainOperation.editTrainNo.event, + val: operate.val + }; + } + return { error: true }; + } + return null; } /** @@ -221,86 +231,85 @@ function handleMenuEditTrainNo(operates) { */ function handleMenuLimitSpeed(operates) { - if (operates.length > 0) { - let operate = operates[0]; - if (operate.type === TrainType && operate.code) { - return { - type: operate.type, - code: operate.code, - over: true, - operation: TrainOperation.limitSpeed.event, - }; - } - return { error: true }; - } - return null; + if (operates.length > 0) { + const operate = operates[0]; + if (operate.type === TrainType && operate.code) { + return { + type: operate.type, + code: operate.code, + over: true, + operation: TrainOperation.limitSpeed.event + }; + } + return { error: true }; + } + return null; } - /** * 处理右键菜单 设置计划车 * @param {*} operates */ function handleMenuSetPlanTrainId(operates) { - if (operates.length > 0) { - let operate = operates[0]; - if (operate.type === TrainType && operate.code) { - return { - type: operate.type, - code: operate.code, - over: true, - operation: TrainOperation.setPlanTrainId.event, - }; - } - return { error: true }; - } - return null; + if (operates.length > 0) { + const operate = operates[0]; + if (operate.type === TrainType && operate.code) { + return { + type: operate.type, + code: operate.code, + over: true, + operation: TrainOperation.setPlanTrainId.event + }; + } + return { error: true }; + } + return null; } function handleMenuAddPlanTrainId(operates) { - if (operates.length > 0) { - let operate = operates[0]; - if (operate.type === TrainType && operate.code) { - return { - type: operate.type, - code: operate.code, - over: true, - operation: TrainOperation.addPlanTrainId.event, - }; - } - return { error: true }; - } - return null; + if (operates.length > 0) { + const operate = operates[0]; + if (operate.type === TrainType && operate.code) { + return { + type: operate.type, + code: operate.code, + over: true, + operation: TrainOperation.addPlanTrainId.event + }; + } + return { error: true }; + } + return null; } function handleMenuMoveEventlyTrainId(operates) { - if (operates.length > 0) { - let operate = operates[0]; - if (operate.type === TrainType && operate.code) { - return { - type: operate.type, - code: operate.code, - over: true, - operation: TrainOperation.moveEventlyTrainId.event, - }; - } - return { error: true }; - } - return null; + if (operates.length > 0) { + const operate = operates[0]; + if (operate.type === TrainType && operate.code) { + return { + type: operate.type, + code: operate.code, + over: true, + operation: TrainOperation.moveEventlyTrainId.event + }; + } + return { error: true }; + } + return null; } function handleMenuDeletePlanTrainId(operates) { - if (operates.length > 0) { - let operate = operates[0]; - if (operate.type === TrainType && operate.code) { - return { - type: operate.type, - code: operate.code, - over: true, - operation: TrainOperation.deletePlanTrainId.event, - }; - } - return { error: true }; - } - return null; -} \ No newline at end of file + if (operates.length > 0) { + const operate = operates[0]; + if (operate.type === TrainType && operate.code) { + return { + type: operate.type, + code: operate.code, + over: true, + operation: TrainOperation.deletePlanTrainId.event + }; + } + return { error: true }; + } + return null; +} diff --git a/src/scripts/plugin/operateConvert2Command.js b/src/scripts/plugin/operateConvert2Command.js index 385d578aa..ffc733e34 100644 --- a/src/scripts/plugin/operateConvert2Command.js +++ b/src/scripts/plugin/operateConvert2Command.js @@ -8,60 +8,60 @@ import { getConverter } from '@/scripts/plugin/converter/manager'; var OperateConverter = function () { }; OperateConverter.prototype = { - /** 转换 操作 为 指令 */ - convert: function (operate) { - if (operate.send) { - let command = null; - const converter = getConverter(OperateHandler.operates); - if (converter) { - command = converter.convert(OperateHandler.operates); - } + /** 转换 操作 为 指令 */ + convert: function (operate) { + if (operate.send) { + let command = null; + const converter = getConverter(OperateHandler.operates); + if (converter) { + command = converter.convert(OperateHandler.operates); + } - if (command && command.error) { - // 命令错误,可以回退或清空(暂用回退) - OperateHandler.operates.pop(); - store.dispatch('training/setTempStep', null); - command = null; - } else if (command && command.over) { - // 清空操作组 - OperateHandler.cleanOperates(); - store.dispatch('menuOperation/setButtonOperation', null); - } + if (command && command.error) { + // 命令错误,可以回退或清空(暂用回退) + OperateHandler.operates.pop(); + store.dispatch('training/setTempStep', null); + command = null; + } else if (command && command.over) { + // 清空操作组 + OperateHandler.cleanOperates(); + store.dispatch('menuOperation/setButtonOperation', null); + } - return command; - } else if (operate.operation === OperationEvent.Command.cancel.menu.operation || operate.over) { - // 取消操作,清空操作组 - OperateHandler.cleanOperates(); - } - return null; - }, + return command; + } else if (operate.operation === OperationEvent.Command.cancel.menu.operation || operate.over) { + // 取消操作,清空操作组 + OperateHandler.cleanOperates(); + } + return null; + }, - sendToServer: function (command) { - const group = router.currentRoute.query.group; - return new Promise((resolve, reject) => { - sendCommand(group, command).then((response) => { - resolve(response); - }).catch(error => { - reject(error); - }); - }); - }, + sendToServer: function (command) { + const group = router.currentRoute.query.group; + return new Promise((resolve, reject) => { + sendCommand(group, command).then((response) => { + resolve(response); + }).catch(error => { + reject(error); + }); + }); + }, - /** 转换操作 为 指令并发送 */ - convertAndSend: function (operate) { - return new Promise((resolve, reject) => { - const command = this.convert(operate); - if (command) { - this.sendToServer(command).then(response => { - resolve(response); - }).catch(error => { - reject(error); - }); - } else { - resolve(); - } - }); - } + /** 转换操作 为 指令并发送 */ + convertAndSend: function (operate) { + return new Promise((resolve, reject) => { + const command = this.convert(operate); + if (command) { + this.sendToServer(command).then(response => { + resolve(response); + }).catch(error => { + reject(error); + }); + } else { + resolve(); + } + }); + } }; export default new OperateConverter(); diff --git a/src/scripts/plugin/trainingOperateHandler.js b/src/scripts/plugin/trainingOperateHandler.js index fca6fbdbe..8217086b9 100644 --- a/src/scripts/plugin/trainingOperateHandler.js +++ b/src/scripts/plugin/trainingOperateHandler.js @@ -11,134 +11,137 @@ var OperateHandler = function () { }; OperateHandler.prototype = { - /** 操作组 */ - operates: [], + /** 操作组 */ + operates: [], - /** 清空操作组 */ - cleanOperates: function () { - this.operates.splice(0, this.operates.length); - }, + backStep: function(num) { + this.operates = this.operates.slice(0, num); + }, - /** + /** 清空操作组 */ + cleanOperates: function () { + this.operates.splice(0, this.operates.length); + }, + + /** * 判断操作步骤是否正确 */ - judge: function (operate) { - let valid = false; - const steps = this.getSteps(); - const order = this.getOrder(); - if (order >= steps) { - return valid; - } - - const standard = steps[order]; - if (operate && standard && operate.code == standard.code && operate.type == standard.type && + judge: function (operate) { + let valid = false; + const steps = this.getSteps(); + const order = this.getOrder(); + if (order >= steps) { + return valid; + } + // debugger; + const standard = steps[order]; + if (operate && standard && operate.code == standard.code && operate.type == standard.type && operate.operation == standard.operation && operate.val == standard.val) { - valid = true; - } - return valid; - }, + valid = true; + } + return valid; + }, - /** + /** * 根据模式验证操作步骤 */ - validate: function (operate) { - // 按钮操作之后,第二步错误操作菜单的情况,需要直接返回 - if ((this.operates.length && operate.start === true) && - (this.operates[0].type === 'mbm')) { - return false; - } + validate: function (operate) { + // 按钮操作之后,第二步错误操作菜单的情况,需要直接返回 + if ((this.operates.length && operate.start === true) && (this.operates[0].type === 'mbm')) { + return false; + } - // 如果是正常的第一步操作,需要清空operates数组 - if (operate.type === 'mbm' || operate.type === 'bar' || operate.start === true) { - this.cleanOperates(); - } + // 如果是正常的第一步操作,需要清空operates数组 + if (operate.type === 'mbm' || operate.type === 'bar' || operate.start === true) { + this.cleanOperates(); + } - this.operates.push(operate); + this.operates.push(operate); - // 预处理 - const converter = getConverter(this.operates); - if (converter && converter.preHandle instanceof Function) { - operate = converter.preHandle(this.operates); - } + // 预处理 + const converter = getConverter(this.operates); + if (converter && converter.preHandle instanceof Function) { + operate = converter.preHandle(this.operates); + } - let valid = true; - const mode = this.getTrainingMode(); - if (TrainingMode.EDIT === mode) { - // 编辑制作模式 - if (this.getOperateBreakStatus()) { - valid = false; - const tip = LangStorage.getLang() == 'en' ? 'Please enter a hint and click next' : '请输入提示并点击下一步'; - Message.error(tip); - this.operates.pop(); - return valid; - } - if (this.getTrainingStart()) { - store.dispatch('training/setTempStep', operate); - } - } else if (TrainingMode.TEACH === mode || TrainingMode.PRACTICE === mode) { - // 教学模式/练习模式 - if (this.getTrainingStart()) { - valid = this.judge(operate); - } else { - this.cleanOperates(); - valid = false; - } - } + let valid = true; + const mode = this.getTrainingMode(); + if (TrainingMode.EDIT === mode) { + // 编辑制作模式 + if (this.getOperateBreakStatus()) { + valid = false; + const tip = LangStorage.getLang() == 'en' ? 'Please enter a hint and click next' : '请输入提示并点击下一步'; + Message.error(tip); + this.operates.pop(); + return valid; + } + if (this.getTrainingStart()) { + store.dispatch('training/setTempStep', operate); + } + } else if (TrainingMode.TEACH === mode || TrainingMode.PRACTICE === mode) { + // 教学模式/练习模式 + if (this.getTrainingStart()) { + valid = this.judge(operate); + } else { + this.cleanOperates(); + valid = false; + } + } - // 发送每一步的步骤数据; - const basicInfo = store.getters['training/basicInfo']; - if (basicInfo.id && valid) { - const group = router.currentRoute.query.group; - sendTrainingNextStep({ trainingId: basicInfo.id, operate: operate }, group); - } + // 发送每一步的步骤数据; + const basicInfo = store.getters['training/basicInfo']; + if (basicInfo.id && valid) { + const group = router.currentRoute.query.group; + sendTrainingNextStep({ trainingId: basicInfo.id, operate: operate }, group); + } - if (!valid) { - // 如果操作校验不正确,回退 - this.operates.pop(); - } else { - if (operate.cancel === true) { - this.cleanOperates(); - } - } + if (!valid) { + // 如果操作校验不正确,回退 + this.operates.pop(); + } else { + if (operate.cancel === true) { + this.cleanOperates(); + } + } - return valid; - }, - handle: function (operate) { - return new Promise((resolve, reject) => { - const rtn = { valid: false, response: null }; - const valid = this.validate(operate); + return valid; + }, + handle: function (operate) { + return new Promise((resolve, reject) => { + const rtn = { valid: false, response: null }; + const valid = this.validate(operate); - rtn.valid = valid; + rtn.valid = valid; - if (valid) { - // 改变状态开始请求 - OperateConverter.convertAndSend(operate).then(response => { - rtn.response = response; - resolve(rtn); - }).catch(error => { - reject(error); - }); - } else { - resolve(rtn); - } - }); - }, - getTrainingMode: function () { - return store.state.training.mode; - }, - getSteps: function () { - return store.state.training.steps; - }, - getOrder: function () { - return store.state.training.order; - }, - getTrainingStart: function () { - return store.state.training.started; - }, - getOperateBreakStatus: function () { - return store.state.menuOperation.break; - } + if (valid) { + // 改变状态开始请求 + OperateConverter.convertAndSend(operate).then(response => { + rtn.response = response; + resolve(rtn); + }).catch(error => { + reject(error); + }); + } else { + resolve(rtn); + } + }); + }, + getTrainingMode: function () { + return store.state.training.mode; + }, + getSteps: function () { + return store.state.training.steps; + }, + getOrder: function () { + return store.state.training.order; + }, + getTrainingStart: function () { + return store.state.training.started; + }, + getOperateBreakStatus: function () { + return store.state.menuOperation.break; + } }; export default new OperateHandler(); diff --git a/src/settings.js b/src/settings.js index 594b90e4a..a7ee1e069 100644 --- a/src/settings.js +++ b/src/settings.js @@ -1,6 +1,6 @@ module.exports = { - title: '琏课堂', + title: '', /** * @type {boolean} true | false diff --git a/src/store/getters.js b/src/store/getters.js index 843d1289b..4c10dae1a 100644 --- a/src/store/getters.js +++ b/src/store/getters.js @@ -1,16 +1,17 @@ const getters = { - routers: state => state.permission.routes, - addRouters: state => state.permission.addRouters, - sidebar: state => state.app.sidebar, - lessonbar: state => state.app.lessonBar, - device: state => state.app.device, - token: state => state.user.token, - avatar: state => state.user.avatar, - name: state => state.user.name, - nickname: state => state.user.nickname, - roles: state => state.user.roles, - canvasWidth: state => state.config.width, - canvasHeight: state => state.config.height, - permission_routes: state => state.permission.routes + routers: state => state.permission.routes, + addRouters: state => state.permission.addRouters, + sidebar: state => state.app.sidebar, + lessonbar: state => state.app.lessonBar, + device: state => state.app.device, + token: state => state.user.token, + avatar: state => state.user.avatar, + name: state => state.user.name, + nickname: state => state.user.nickname, + roles: state => state.user.roles, + canvasWidth: state => state.config.width, + canvasHeight: state => state.config.height, + id: state => state.user.id, + permission_routes: state => state.permission.routes }; export default getters; diff --git a/src/store/index.js b/src/store/index.js index f3e7d27f3..725ff1300 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -20,23 +20,23 @@ import getters from './getters'; Vue.use(Vuex); const store = new Vuex.Store({ - modules: { - app, - settings, - user, - permission, - config, - map, - menuOperation, - training, - trainingList, - exam, - runPlan, - socket, - scriptRecord, - ibp - }, - getters + modules: { + app, + settings, + user, + permission, + config, + map, + menuOperation, + training, + trainingList, + exam, + runPlan, + socket, + scriptRecord, + ibp + }, + getters }); export default store; diff --git a/src/store/modules/config.js b/src/store/modules/config.js index 059e32138..f2b4a2625 100644 --- a/src/store/modules/config.js +++ b/src/store/modules/config.js @@ -1,76 +1,76 @@ import { getDomOffset } from '@/utils/index'; const config = { - namespaced: true, + namespaced: true, - state: { - width: document.documentElement.clientWidth, // 地图canvas 容器 宽度 - height: document.documentElement.clientHeight, // 地图canvas 容器 高度 - menuBarLoadedCount: 0, // menuBar加载完成 - canvasSizeCount: 0, // 地图canvas 大小变更标识 - canvasId: '', // 地图canvas容器dom id - canvasOffset: {}, // canvas dom 偏移 - canvasOffsetCount: 0 // 地图canvas 偏移变更标识 - }, + state: { + width: document.documentElement.clientWidth, // 地图canvas 容器 宽度 + height: document.documentElement.clientHeight, // 地图canvas 容器 高度 + menuBarLoadedCount: 0, // menuBar加载完成 + canvasSizeCount: 0, // 地图canvas 大小变更标识 + canvasId: '', // 地图canvas容器dom id + canvasOffset: {}, // canvas dom 偏移 + canvasOffsetCount: 0 // 地图canvas 偏移变更标识 + }, - getters: { - width: (state) => { - return state.width; - }, - height: (state) => { - return state.height; - }, - canvasId: (state) => { - return state.canvasId; - } - }, + getters: { + width: (state) => { + return state.width; + }, + height: (state) => { + return state.height; + }, + canvasId: (state) => { + return state.canvasId; + } + }, - mutations: { - SET_WIDTH: (state, width) => { - state.width = width; - }, - SET_HEIGHT: (state, height) => { - state.height = height; - }, - setCanvasId: (state, id) => { - state.canvasId = id; - }, - updateMenuBar: (state) => { - state.menuBarLoadedCount += 1; - }, - setCanvasOffset: (state, offset) => { - state.canvasOffset = offset; - } - }, - actions: { - resize({ state, commit }, opt) { - if (opt.width) { - commit('SET_WIDTH', opt.width); - } - if (opt.height) { - commit('SET_HEIGHT', opt.height); - } - state.canvasSizeCount += 1; - }, + mutations: { + SET_WIDTH: (state, width) => { + state.width = width; + }, + SET_HEIGHT: (state, height) => { + state.height = height; + }, + setCanvasId: (state, id) => { + state.canvasId = id; + }, + updateMenuBar: (state) => { + state.menuBarLoadedCount += 1; + }, + setCanvasOffset: (state, offset) => { + state.canvasOffset = offset; + } + }, + actions: { + resize({ state, commit }, opt) { + if (opt.width) { + commit('SET_WIDTH', opt.width); + } + if (opt.height) { + commit('SET_HEIGHT', opt.height); + } + state.canvasSizeCount += 1; + }, - updateMenuBar({ commit }) { - commit('updateMenuBar'); - }, + updateMenuBar({ commit }) { + commit('updateMenuBar'); + }, - setCurrentCancasId: ({state, dispatch, commit }, payLoad) => { - commit('setCanvasId', payLoad.id); - dispatch('resetCanvasOffset'); - }, + setCurrentCancasId: ({state, dispatch, commit }, payLoad) => { + commit('setCanvasId', payLoad.id); + dispatch('resetCanvasOffset'); + }, - resetCanvasOffset: ({ commit, state }) => { - const mapCanvas = document.getElementById(state.canvasId); - if (mapCanvas) { - const offset = getDomOffset(mapCanvas); - commit('setCanvasOffset', offset); - state.canvasOffsetCount += 1; - } - } - } + resetCanvasOffset: ({ commit, state }) => { + const mapCanvas = document.getElementById(state.canvasId); + if (mapCanvas) { + const offset = getDomOffset(mapCanvas); + commit('setCanvasOffset', offset); + state.canvasOffsetCount += 1; + } + } + } }; export default config; diff --git a/src/store/modules/map.js b/src/store/modules/map.js index e1b7d9d75..0e9300833 100644 --- a/src/store/modules/map.js +++ b/src/store/modules/map.js @@ -1,6 +1,8 @@ import deviceType from '@/jmap/constant/deviceType'; import { parser, updateMapData } from '@/jmap/utils/parser'; import Vue from 'vue'; +import { deepAssign } from '@/utils/index'; + /** * 查询向上受影响的Devices * @param {Object} map @@ -8,590 +10,701 @@ import Vue from 'vue'; * @param {Array} effectedDeviceList */ function queryEffectedModels(map, device, effectedDeviceList) { - if (device && map) { - effectedDeviceList.push(device); - switch (device._type) { - // 查询ink关联项 - case deviceType.Link: - // 查询Link关联的区段 - if (map.sectionList && map.sectionList.length) { - map.sectionList.forEach(elem => { - if (elem.linkCode === device.code) { - queryEffectedModels(map, elem, effectedDeviceList); - } - }); - } + if (device && map) { + effectedDeviceList.push(device); + switch (device._type) { + // 查询ink关联项 + case deviceType.Link: + // 查询Link关联的区段 + if (map.sectionList && map.sectionList.length) { + map.sectionList.forEach(elem => { + if (elem.linkCode === device.code) { + queryEffectedModels(map, elem, effectedDeviceList); + } + }); + } - // 查询Link关联的信号机 - if (map.signalList && map.signalList.length) { - map.signalList.forEach(elem => { - if (elem.linkCode === device.code) { - effectedDeviceList.push(elem); - } - }); - } - break; - // 移除区段关联项 - case deviceType.Section: - // 查询物理区段关联的逻辑区段 - if (map.sectionList && map.sectionList.length && device.type === '01') { - map.sectionList.forEach(elem => { - if (elem.type !== '01' && elem.parentCode === device.code) { - effectedDeviceList.push(elem); - } - }); - } + // 查询Link关联的信号机 + if (map.signalList && map.signalList.length) { + map.signalList.forEach(elem => { + if (elem.linkCode === device.code) { + effectedDeviceList.push(elem); + } + }); + } + break; + // 移除区段关联项 + case deviceType.Section: + // 查询物理区段关联的逻辑区段 + if (map.sectionList && map.sectionList.length && device.type === '01') { + map.sectionList.forEach(elem => { + if (elem.type !== '01' && elem.parentCode === device.code) { + effectedDeviceList.push(elem); + } + }); + } - // 查询区段关联车次窗 - if (map.trainWindowList && map.trainWindowList.length) { - map.trainModelList.forEach(elem => { - if (elem.sectionCode == device.code) { - effectedDeviceList.push(elem); - } - }); - } + // 查询区段关联车次窗 + if (map.trainWindowList && map.trainWindowList.length) { + map.trainModelList.forEach(elem => { + if (elem.sectionCode == device.code) { + effectedDeviceList.push(elem); + } + }); + } - // 查询区段关联的道岔 - if (map.switchList && map.switchList.length) { - map.switchList.forEach(elem => { - if (elem.sectionACode === device.code || + // 查询区段关联的道岔 + if (map.switchList && map.switchList.length) { + map.switchList.forEach(elem => { + if (elem.sectionACode === device.code || elem.sectionBCode === device.code || elem.sectionCCode === device.code) { - effectedDeviceList.push(elem); - } - }); - } + effectedDeviceList.push(elem); + } + }); + } - // 查询区段关联的车站 - if (map.stationList && map.stationList.length) { - map.stationList.forEach(elem => { - if (elem.sectionCode === device.code) { - effectedDeviceList.push(elem); - } - }); - } - break; - } - } + // 查询区段关联的车站 + if (map.stationList && map.stationList.length) { + map.stationList.forEach(elem => { + if (elem.sectionCode === device.code) { + effectedDeviceList.push(elem); + } + }); + } + break; + } + } } +// 保存草稿地图绘制关系检测 function saveMapDeviceDefaultRelations(state) { - if (state && state.map) { - const map = state.map; - const deviceMap = Vue.prototype.$jlmap.mapDevice; - // 是否集中站 - if (map.stationControlList && map.stationControlList.length) { - map.stationControlList.forEach(elem => { - const station = deviceMap[elem.stationCode]; - if (station) { - station.centralized = true; - } - }); - } + if (state && state.map) { + const map = state.map; + const deviceMap = Vue.prototype.$jlmap.mapDevice; + // 是否集中站 + if (map.stationControlList && map.stationControlList.length) { + map.stationControlList.forEach(elem => { + const station = deviceMap[elem.stationCode]; + if (station) { + station.centralized = true; + } + }); + } - // 设置区段关联 - if (map.sectionList && map.sectionList.length) { - map.sectionList.forEach(elem => { - if (elem.type !== '03') { - const station = deviceMap[elem.parentCode]; - if (station) { - elem.stationCode = station.stationCode; - } - } else { - elem.parentCode = ''; - } + // 设置区段关联 + if (map.sectionList && map.sectionList.length) { + map.sectionList.forEach(elem => { + if (elem.type !== '03') { + const station = deviceMap[elem.parentCode]; + if (station) { + elem.stationCode = station.stationCode; + } + } else { + elem.parentCode = ''; + } - if (elem.type === '01') { - elem.nameShow == true; - } - }); - } + if (elem.type === '01') { + elem.nameShow == true; + } + }); + } - // 站台轨设置 - if (map.stationStandList && map.stationStandList.length && map.sectionList && map.sectionList.length) { - map.stationStandList.forEach((stand) => { - const stopPoint = deviceMap[stand.stopPointCode]; - if (stopPoint) { - map.sectionList.forEach(section => { - if (section.type === '01' && + // 站台轨设置 + if (map.stationStandList && map.stationStandList.length && map.sectionList && map.sectionList.length) { + map.stationStandList.forEach((stand) => { + const stopPoint = deviceMap[stand.stopPointCode]; + if (stopPoint) { + map.sectionList.forEach(section => { + if (section.type === '01' && stopPoint.linkCode === section.linkCode && stopPoint.offset >= section.offsetLeft && stopPoint.offset <= section.offsetRight) { - section.isStandTrack = true; - if (!section.standTrackName) { - section.standTrackName = section.name.replace(section.name.slice(0, 2), 'ZT'); - } - if (!section.standTrackNamePosition) { - section.standTrackNamePosition = { x: 0, y: 0 }; - } - } - }); - } - }); - } + section.isStandTrack = true; + if (!section.standTrackName) { + section.standTrackName = section.name.replace(section.name.slice(0, 2), 'ZT'); + } + if (!section.standTrackNamePosition) { + section.standTrackNamePosition = { x: 0, y: 0 }; + } + } + }); + } + }); + } - // 折返轨设置 - if (map.stopPointList && map.stopPointList.length && map.sectionList && map.sectionList.length) { - map.stopPointList.forEach(stopPoint => { - if (stopPoint.isTurningPoint) { - map.sectionList.forEach(section => { - if (section.type === '01' && + // 折返轨设置 + if (map.stopPointList && map.stopPointList.length && map.sectionList && map.sectionList.length) { + map.stopPointList.forEach(stopPoint => { + if (stopPoint.isTurningPoint) { + map.sectionList.forEach(section => { + if (section.type === '01' && stopPoint.linkCode === section.linkCode && stopPoint.offset >= section.offsetLeft && stopPoint.offset <= section.offsetRight) { - section.isReentryTrack = true; - if (!section.reentryTrackName) { - section.reentryTrackName = section.name.replace(section.name.slice(0, 2), 'ZF'); - } - if (!section.reentryTrackNamePosition) { - section.reentryTrackNamePosition = { x: 0, y: 0 }; - } - } - }); - } - }); - } + section.isReentryTrack = true; + if (!section.reentryTrackName) { + section.reentryTrackName = section.name.replace(section.name.slice(0, 2), 'ZF'); + } + if (!section.reentryTrackNamePosition) { + section.reentryTrackNamePosition = { x: 0, y: 0 }; + } + } + }); + } + }); + } - // 设置道岔区段 - if (map.switchList && map.switchList.length && map.sectionList && map.sectionList.length) { - map.switchList.forEach(elem => { - const sectiona = deviceMap[elem.sectionACode]; - if (sectiona && sectiona.type !== '03') { - sectiona.nameShow = false; - sectiona.isSwitchSection = true; - sectiona.relSwitchCode = elem.code; - } - const sectionb = deviceMap[elem.sectionBCode]; - if (sectionb && sectiona.type !== '03') { - sectionb.nameShow = false; - sectionb.isSwitchSection = true; - sectionb.relSwitchCode = elem.code; - } - const sectionc = deviceMap[elem.sectionCCode]; - if (sectionc && sectiona.type !== '03') { - sectionc.nameShow = false; - sectionc.isSwitchSection = true; - sectionc.relSwitchCode = elem.code; - } - const sectionp = deviceMap[sectiona.parentCode || sectionb.parentCode || sectionc.parentCode]; - if (sectionp) { - sectionp.relSwitchCode = elem.code; - } - }); - } + // 设置道岔区段 + if (map.switchList && map.switchList.length && map.sectionList && map.sectionList.length) { + map.switchList.forEach(elem => { + const sectiona = deviceMap[elem.sectionACode]; + if (sectiona && sectiona.type !== '03') { + sectiona.nameShow = false; + sectiona.isSwitchSection = true; + sectiona.relSwitchCode = elem.code; + } + const sectionb = deviceMap[elem.sectionBCode]; + if (sectionb && sectionb.type !== '03') { + sectionb.nameShow = false; + sectionb.isSwitchSection = true; + sectionb.relSwitchCode = elem.code; + } + const sectionc = deviceMap[elem.sectionCCode]; + if (sectionc && sectionc.type !== '03') { + sectionc.nameShow = false; + sectionc.isSwitchSection = true; + sectionc.relSwitchCode = elem.code; + } + let sectionp = ''; + if (sectiona && sectiona.parentCode) { + sectionp = deviceMap[sectiona.parentCode]; + } else if (sectionb && sectionb.parentCode) { + sectionp = deviceMap[sectionb.parentCode]; + } else if (sectionc && sectionc.parentCode) { + sectionp = deviceMap[sectionc.parentCode]; + } + if (sectionp) { + sectionp.relSwitchCode = elem.code; + } + }); + } - // 设置图片图层 - if (map.resourceList && map.resourceList.length) { - map.resourceList.forEach(elem => { - if (!elem.zIndex) { - elem.zIndex = 1; - } - }); - } - } + // 设置图片图层 + if (map.resourceList && map.resourceList.length) { + map.resourceList.forEach(elem => { + if (!elem.zIndex) { + elem.zIndex = 1; + } + }); + } + } +} + +function handleOperation(state, models) { + const list = []; + models.forEach(item => { + if (item._dispose) { + list.push({ operation: 'del', data: deepAssign({}, state.mapDevice[item.code]) }); + } else if (state.mapDevice[item.code]) { + list.push({ operation: 'edit', data: deepAssign({}, state.mapDevice[item.code]) }); + } else { + list.push({ operation: 'add', data: deepAssign({}, item) }); + } + }); + // console.log(list, '步骤数据'); + if (list.length) { + if (state.stepData.length >= 15) { // 步骤数据最多储存15步 + state.stepData.pop(); + } + state.stepData.unshift(list); + state.recoverStepData = []; + } +} + +// 撤销 +function revocation(state, models) { + if (models && models.length) { + const list = []; + const stepList = []; + models.forEach(item => { + switch (item.operation) { + case 'add': { + list.push({ operation: 'del', data: deepAssign({}, state.mapDevice[item.data.code])}); + stepList.push({...item.data, _dispose: true}); + break; + } + case 'del': { + list.push({ operation: 'add', data: deepAssign({}, item.data)}); + stepList.push({...item.data, _dispose: false}); + break; + } + case 'edit': { + list.push({ operation: 'edit', data: deepAssign({}, state.mapDevice[item.data.code] || item.data)}); + stepList.push({...item.data, _dispose: false}); + break; + } + } + }); + state.recoverStepData.unshift(list); + return stepList; + } +} +// 恢复 +function recover(state, models) { + if (models && models.length) { + const list = []; + const stepList = []; + models.forEach(item => { + switch (item.operation) { + case 'add': { + list.push({ operation: 'del', data: deepAssign({}, state.mapDevice[item.data.code])}); + stepList.push({...item.data, _dispose: true}); + break; + } + case 'del': { + list.push({ operation: 'add', data: deepAssign({}, item.data)}); + stepList.push({...item.data, _dispose: false}); + break; + } + case 'edit': { + list.push({ operation: 'edit', data: deepAssign({}, state.mapDevice[item.data.code] || item.data)}); + stepList.push({...item.data, _dispose: false}); + break; + } + } + }); + state.stepData.unshift(list); + return stepList; + } } /** * 实训状态数据 */ const map = { - namespaced: true, + namespaced: true, - state: { - map: null, // 地图数据 - dataZoom: {}, // 缩放位置 - mapDevice: {}, // 解析后的地图数据 - mapList: {}, // 地图数据列表 - mapIdList: {}, // 地图数据列表(以id为标识) - mapViewLoadedCount: 0, // 地图视图加载完成标识 - mapDataLoadedCount: 0, // 地图数据加载完成标识 - trainDetails: null // 地图'列车详情'显示 - }, + state: { + stepData: [], // 缓存数据 + recoverStepData: [], // 缓存恢复数据 + seclectDeviceList: [], // 包围框选中元素列表 + map: null, // 地图数据 + dataZoom: {}, // 缩放位置 + mapDevice: {}, // 解析后的地图数据 + mapList: {}, // 地图数据列表 + mapIdList: {}, // 地图数据列表(以id为标识) + mapViewLoadedCount: 0, // 地图视图加载完成标识 + mapDataLoadedCount: 0, // 地图数据加载完成标识 + trainDetails: null // 地图'列车详情'显示 + }, - getters: { - mapList: (state) => { - return state.mapList; - }, - map: (state) => { - return state.map; - }, - skinCode: (state) => { - if (state.map && state.map.skinVO) { - return state.map.skinVO.code; - } - }, - name: (state) => { - if (state.map) { - return state.map.name; - } else { - return null; - } - }, - version: (state) => { - if (state.map) { - return state.map.version; - } else { - return null; - } - }, - linkList: (state) => { - if (state.map) { - return state.map.linkList; - } else { - return []; - } - }, - switchList: (state) => { - if (state.map) { - return state.map.switchList; - } else { - return []; - } - }, - buttonList: (state) => { - if (state.map) { - return state.map.buttonList; - } else { - return []; - } - }, - signalList: (state) => { - if (state.map) { - return state.map.signalList; - } else { - return []; - } - }, - sectionList: (state) => { - if (state.map) { - return state.map.sectionList; - } else { - return []; - } - }, - zcList: (state) => { - if (state.map) { - return state.map.zcList; - } else { - return []; - } - }, - tempSpeedLimitList: (state) => { - if (state.map) { - return state.map.tempSpeedLimitList; - } else { - return []; - } - }, - lcList: (state) => { - if (state.map) { - return state.map.lcList; - } else { - return []; - } - }, - resourceList: (state) => { - if (state.map) { - return state.map.resourceList; - } else { - return []; - } - }, - stationList: (state) => { - if (state.map) { - return state.map.stationList; - } else { - return []; - } - }, - stationStandList: (state) => { - if (state.map) { - return state.map.stationStandList; - } else { - return []; - } - }, - stationControlList: (state) => { - if (state.map) { - return state.map.stationControlList; - } else { - return []; - } - }, - counterList: (state) => { - if (state.map) { - return state.map.counterList; - } else { - return []; - } - }, - delayShowList: (state) => { - if (state.map) { - return state.map.delayShowList; - } else { - return []; - } - }, - lineList: (state) => { - if (state.map) { - return state.map.lineList; - } else { - return []; - } - }, - textList: (state) => { - if (state.map) { - return state.map.textList; - } else { - return []; - } - }, - trainWindowList: (state) => { - if (state.map) { - return state.map.trainWindowList; - } else { - return []; - } - }, - trainList: (state) => { - if (state.map) { - return state.map.trainList; - } else { - return []; - } - }, - trainModelList: (state) => { - if (state.map) { - return state.map.trainModelList; - } else { - return []; - } - }, - trainDetails: (state) => { - return state.trainDetails; - }, - getDeviceByCode: (state) => (code) => { - return state.mapDevice[code]; - }, + getters: { + mapList: (state) => { + return state.mapList; + }, + seclectDeviceList: (state) => { + return state.seclectDeviceList; + }, + stepData: (state) => { + return state.stepData; + }, + recoverStepData: (state) => { + return state.recoverStepData; + }, + map: (state) => { + return state.map; + }, + lineCode: (state) => { + if (state.map && state.map.skinVO) { + return state.map.skinVO.code; + } + }, + name: (state) => { + if (state.map) { + return state.map.name; + } else { + return null; + } + }, + version: (state) => { + if (state.map) { + return state.map.version; + } else { + return null; + } + }, + linkList: (state) => { + if (state.map) { + return state.map.linkList; + } else { + return []; + } + }, + switchList: (state) => { + if (state.map) { + return state.map.switchList; + } else { + return []; + } + }, + buttonList: (state) => { + if (state.map) { + return state.map.buttonList; + } else { + return []; + } + }, + signalList: (state) => { + if (state.map) { + return state.map.signalList; + } else { + return []; + } + }, + sectionList: (state) => { + if (state.map) { + return state.map.sectionList; + } else { + return []; + } + }, + zcList: (state) => { + if (state.map) { + return state.map.zcList; + } else { + return []; + } + }, + tempSpeedLimitList: (state) => { + if (state.map) { + return state.map.tempSpeedLimitList; + } else { + return []; + } + }, + lcList: (state) => { + if (state.map) { + return state.map.lcList; + } else { + return []; + } + }, + resourceList: (state) => { + if (state.map) { + return state.map.resourceList; + } else { + return []; + } + }, + stationList: (state) => { + if (state.map) { + return state.map.stationList; + } else { + return []; + } + }, + stationStandList: (state) => { + if (state.map) { + return state.map.stationStandList; + } else { + return []; + } + }, + stationControlList: (state) => { + if (state.map) { + return state.map.stationControlList; + } else { + return []; + } + }, + counterList: (state) => { + if (state.map) { + return state.map.counterList; + } else { + return []; + } + }, + delayShowList: (state) => { + if (state.map) { + return state.map.delayShowList; + } else { + return []; + } + }, + lineList: (state) => { + if (state.map) { + return state.map.lineList; + } else { + return []; + } + }, + textList: (state) => { + if (state.map) { + return state.map.textList; + } else { + return []; + } + }, + trainWindowList: (state) => { + if (state.map) { + return state.map.trainWindowList; + } else { + return []; + } + }, + trainList: (state) => { + if (state.map) { + return state.map.trainList; + } else { + return []; + } + }, + trainModelList: (state) => { + if (state.map) { + return state.map.trainModelList; + } else { + return []; + } + }, + trainDetails: (state) => { + return state.trainDetails; + }, + mapDevice: (state) => { + return state.mapDevice; + }, + getDeviceByCode: (state) => (code) => { + return state.mapDevice[code]; + }, - // 查询区段关联的计数器 - getCounterBySectionCode: (state) => (code, type) => { - let device = null; - var section = state.mapDevice[code]; - if (section) { - state.map.counterList.forEach(counter => { - if (counter.stationCode === section.model.stationCode && type == counter.type) { - device = state.mapDevice[counter.code]; - return; - } - }); - } + // 查询区段关联的计数器 + getCounterBySectionCode: (state) => (code, type) => { + let device = null; + var section = state.mapDevice[code]; + if (section) { + state.map.counterList.forEach(counter => { + if (counter.stationCode === section.model.stationCode && type == counter.type) { + device = state.mapDevice[counter.code]; + return; + } + }); + } - return device; - }, + return device; + }, - // 查询信号机关联的计数器 - getCounterBySingalCode: (state) => (code, type) => { - let device = null; - var signal = state.mapDevice[code]; - if (signal) { - state.map.counterList.forEach(counter => { - if (counter.stationCode === signal.model.stationCode && type == counter.type) { - device = state.mapDevice[counter.code]; - return; - } - }); - } - return device; - }, + // 查询信号机关联的计数器 + getCounterBySingalCode: (state) => (code, type) => { + let device = null; + var signal = state.mapDevice[code]; + if (signal) { + state.map.counterList.forEach(counter => { + if (counter.stationCode === signal.model.stationCode && type == counter.type) { + device = state.mapDevice[counter.code]; + return; + } + }); + } + return device; + }, - // 查询所属车站关联的控制模式 - getStationControlByStationCode: (state) => (code) => { - let device = null; - if (code && + // 查询所属车站关联的控制模式 + getStationControlByStationCode: (state) => (code) => { + let device = null; + if (code && state.map && state.map.stationControlList && state.map.stationControlList.length) { - state.map.stationControlList.forEach(elem => { - if (elem.stationCode == code) { - device = state.mapDevice[elem.code]; - } - }); - } + state.map.stationControlList.forEach(elem => { + if (elem.stationCode == code) { + device = state.mapDevice[elem.code]; + } + }); + } - return device; - } - }, + return device; + } + }, - mutations: { - setMapData: (state, map) => { - if (map && map.skinVO) { - state.map = map; - state.mapDevice = parser(map, map.skinVO.code); - } else { - state.mapDevice = {}; - } - }, - setDataZoom: (state, dataZoom) => { - state.dataZoom = dataZoom; - }, - mapRender: (state, devices) => { - if (state.map) { - devices.forEach(elem => { updateMapData(state, elem); }); - } - if (Vue.prototype.$jlmap) { - Vue.prototype.$jlmap.render(devices); - } - }, - setTrainDetails: (state, details) => { - state.trainDetails = details; - }, - mapViewLoadedCountIncrement: (state) => { - state.mapViewLoadedCount += 1; - }, - mapDataLoadedCountIncrement: (state) => { - state.mapDataLoadedCount += 1; - }, - operateTrainModel: (state, { model, type }) => { - if (state.map && model) { - const list = state.map.trainModelList || []; - if (type === 'ADD') { - const index = list.indexOf(list.find(elem => { return elem.code === model.code; })); - if (index < 0) { - list.push(Object.assign({}, model)); - } - } else if (type === 'UPT') { - const index = list.indexOf(list.find(elem => { return elem.code === model.code; })); - if (index >= 0) { - for (var prop in model) { - list[index][prop] = model[prop]; - } - } - } else if (type === 'DEL') { - const index = list.indexOf(list.find(elem => { return elem.code === model.code; })); - if (index >= 0) { - list.splice(index, 1); - } + mutations: { + setMapData: (state, map) => { + if (map && map.skinVO) { + state.map = map; + state.mapDevice = parser(map, map.skinVO.code); + } else { + state.mapDevice = {}; + } + }, + setSeclectDeviceList: (state, list) => { + state.seclectDeviceList = list; + }, + setDataZoom: (state, dataZoom) => { + state.dataZoom = dataZoom; + }, + mapRender: (state, devices) => { + if (devices && devices.length) { + if (state.map) { + devices.forEach(elem => { updateMapData(state, elem); }); + } + if (Vue.prototype.$jlmap) { + Vue.prototype.$jlmap.render(devices); + } + } + }, + setTrainDetails: (state, details) => { + state.trainDetails = details; + }, + mapViewLoadedCountIncrement: (state) => { + state.mapViewLoadedCount += 1; + }, + mapDataLoadedCountIncrement: (state) => { + state.mapDataLoadedCount += 1; + }, + operateTrainModel: (state, { model, type }) => { + if (state.map && model) { + const list = state.map.trainModelList || []; + if (type === 'ADD') { + const index = list.indexOf(list.find(elem => { return elem.code === model.code; })); + if (index < 0) { + list.push(Object.assign({}, model)); + } + } else if (type === 'UPT') { + const index = list.indexOf(list.find(elem => { return elem.code === model.code; })); + if (index >= 0) { + for (var prop in model) { + list[index][prop] = model[prop]; + } + } + } else if (type === 'DEL') { + const index = list.indexOf(list.find(elem => { return elem.code === model.code; })); + if (index >= 0) { + list.splice(index, 1); + } - const trainList = state.map.trainList; - trainList.forEach(elem => { - if (elem.modelCode == model.code) { - elem['_dispose'] = true; - } - }); + const trainList = state.map.trainList; + trainList.forEach(elem => { + if (elem.modelCode == model.code) { + elem['_dispose'] = true; + } + }); - if (Vue.prototype.$jlmap) { - Vue.prototype.$jlmap.render(trainList); - } - } - } - }, - mapClear: (state) => { - state.map = null; - state.mapDevice = {}; - if (Vue.prototype.$jlmap) { - Vue.prototype.$jlmap.clear(); - } - } - }, + if (Vue.prototype.$jlmap) { + Vue.prototype.$jlmap.render(trainList); + } + } + } + }, + mapClear: (state) => { + state.map = null; + state.mapDevice = {}; + if (Vue.prototype.$jlmap) { + Vue.prototype.$jlmap.clear(); + } + } + }, - actions: { - mapClear: ({ commit }) => { - commit('mapClear'); - }, + actions: { + mapClear: ({ commit }) => { + commit('mapClear'); + }, + // 获取包围框选中元素列表 + setSeclectDeviceList: ({ commit }, list) => { + commit('setSeclectDeviceList', list); + }, - // 设置缩放位置 - updateZoom: ({ commit }, dataZoom) => { - commit('setDataZoom', dataZoom); - }, + // 设置缩放位置 + updateZoom: ({ commit }, dataZoom) => { + commit('setDataZoom', dataZoom); + }, - setMapData: ({ commit }, map) => { - commit('setMapData', map); - }, + setMapData: ({ commit }, map) => { + commit('setMapData', map); + }, - setTrainDetails: ({ commit }, message) => { - commit('setTrainDetails', message); - }, + setTrainDetails: ({ commit }, message) => { + commit('setTrainDetails', message); + }, - setMapDataList: ({ state }, map) => { - const skinVO = map.skinVO; - if (skinVO && skinVO.code) { - state.mapList[`mapDate_${skinVO.code}`] = map; - } - }, + setMapDataList: ({ state }, map) => { + const skinVO = map.skinVO; + if (skinVO && skinVO.code) { + state.mapList[`mapDate_${skinVO.code}`] = map; + } + }, - setMapDataIdList: ({ state }, data) => { - state.mapIdList[`mapDate_${data.mapId}`] = data.mapData; - }, + setMapDataIdList: ({ state }, data) => { + state.mapIdList[`mapDate_${data.mapId}`] = data.mapData; + }, + updateMapDevices: ({ commit, state }, models) => { + return new Promise((resolve) => { + if (!(models instanceof Array)) { + models = [models]; + } - updateMapDevices: ({ commit }, models) => { - return new Promise((resolve) => { - if (!(models instanceof Array)) { - models = [models]; - } + // 查找向上关联需要一起删除的设备 + const effectedModelList = []; + models.forEach((model) => { + if (model['_dispose']) { + queryEffectedModels(state.map, model, effectedModelList); + } else { + effectedModelList.push(model); + } + }); - commit('mapRender', models); - resolve(models); - }); - }, + handleOperation(state, effectedModelList); - deleteMapDevices: ({ commit, state }, models) => { - return new Promise((resolve) => { - if (!(models instanceof Array)) { - models = [models]; - } + commit('mapRender', effectedModelList); + resolve(effectedModelList); + }); + }, - // 查找向上关联需要一起删除的设备 - const effectedModelList = []; - models.forEach((device) => { - queryEffectedModels(state.map, device, effectedModelList); - }); + setRevocation({ state, commit }) { + commit('mapRender', revocation(state, state.stepData.shift() || [])); // 撤销 + }, - effectedModelList.forEach(elem => { elem['_dispose'] = true; }); - commit('mapRender', effectedModelList); - resolve(effectedModelList); - }); - }, + setRecover({ state, commit }) { + commit('mapRender', recover(state, state.recoverStepData.shift() || [])); // 恢复 + }, - saveMapDeviceDefaultRelations({ state }) { - saveMapDeviceDefaultRelations(state); - }, + saveMapDeviceDefaultRelations({ state }) { + saveMapDeviceDefaultRelations(state); + }, - mapViewLoaded: ({ commit }) => { - commit('mapViewLoadedCountIncrement'); - }, + mapViewLoaded: ({ commit }) => { + commit('mapViewLoadedCountIncrement'); + }, - mapDataLoaded: ({ commit }) => { - commit('mapDataLoadedCountIncrement'); - }, + mapDataLoaded: ({ commit }) => { + commit('mapDataLoadedCountIncrement'); + }, - clearJlmapTrainView: () => { - if (Vue.prototype.$jlmap) { - Vue.prototype.$jlmap.clearTrainView(); - } - }, + clearJlmapTrainView: () => { + if (Vue.prototype.$jlmap) { + Vue.prototype.$jlmap.clearTrainView(); + } + }, - setTrainWindowShow: ({commit, state}, show) => { - if (state.map) { - var deviceList = []; - var trainWindowList = state.map.trainWindowList; + setTrainWindowShow: ({commit, state}, show) => { + if (state.map) { + var deviceList = []; + var trainWindowList = state.map.trainWindowList; - if (trainWindowList && trainWindowList.length) { - trainWindowList.forEach(elem => { - elem._type = deviceType.TrainWindow; - elem.trainWindowShow = show; - deviceList.push(elem); - }); - } + if (trainWindowList && trainWindowList.length) { + trainWindowList.forEach(elem => { + elem._type = deviceType.TrainWindow; + elem.trainWindowShow = show; + deviceList.push(elem); + }); + } - commit('mapRender', deviceList); - } - }, + commit('mapRender', deviceList); + } + }, - operateTrainModel: ({ commit }, { model, type }) => { - commit('operateTrainModel', { model, type }); - } + operateTrainModel: ({ commit }, { model, type }) => { + commit('operateTrainModel', { model, type }); + } - } + } }; export default map; diff --git a/src/store/modules/menuoperation.js b/src/store/modules/menuoperation.js index 5c93007e7..bc12b8df9 100644 --- a/src/store/modules/menuoperation.js +++ b/src/store/modules/menuoperation.js @@ -4,165 +4,176 @@ import { TrainingMode } from '@/scripts/ConstDic'; * 菜单操作状态数据 */ const menuOperation = { - namespaced: true, + namespaced: true, - state: { - break: false, // 对话框菜单是否弹出(用于中断控制) - mbmpCount: 0, // 地图按钮菜单位置变更标识 - buttonOperation: null, // 按钮菜单是否被按下 - selected: {}, // 选中的地图对象 - selectedCount: 0, // 选中对象变更标识 - menu: null, // 弹出菜单设备 - menuPosition: {}, // 弹出菜单位置 - menuCount: 0, // 弹出菜单变更标识 - menuParam: '', // 弹出菜单参数 - magnifyCount: 0, // 地图放大比例标识 - shrinkCount: 0 // 地图缩小比例标识 - }, + state: { + break: false, // 对话框菜单是否弹出(用于中断控制) + mbmpCount: 0, // 地图按钮菜单位置变更标识 + buttonOperation: null, // 按钮菜单是否被按下 + selected: {}, // 选中的地图对象 + selectedCount: 0, // 选中对象变更标识 + menu: null, // 弹出菜单设备 + menuPosition: {}, // 弹出菜单位置 + menuCount: 0, // 弹出菜单变更标识 + menuParam: '', // 弹出菜单参数 + magnifyCount: 0, // 地图放大比例标识 + shrinkCount: 0, // 地图缩小比例标识 + mapDrawSelectCount: 0 // 地图编辑点击标识 + }, - getters: { - selected: (state) => { - return state.selected; - }, - mbmpCount: (state) => { - return state.mbmpCount; - }, - menuParam: (state) => { - return state.menuParam; - }, - buttonOperation: (state) => { - return state.buttonOperation; - }, - checkDialogIsOpen: (state) => (menu) => { - return state.menu == menu; - } - }, + getters: { + selected: (state) => { + return state.selected; + }, + mbmpCount: (state) => { + return state.mbmpCount; + }, + menuParam: (state) => { + return state.menuParam; + }, + buttonOperation: (state) => { + return state.buttonOperation; + }, + checkDialogIsOpen: (state) => (menu) => { + return state.menu == menu; + }, + selectedCount:(state)=>{ + return state.selectedCount; + } + }, - mutations: { - reset: (state) => { - state.menu = null; - state.selected = null; - state.menuPosition = {}; - state.buttonOperation = null; - }, - doBreak: (state, editStatus) => { - if (!state.break) { - state.break = true; - if (editStatus != TrainingMode.EDIT) { - state.menuCount += 1; - } - } - }, - doRoute: (state) => { - if (state.break) { - state.break = false; - state.menuCount += 1; - } - }, - setButtonOperation: (state, operation) => { - state.buttonOperation = operation; - }, - setSelected: (state, selected) => { - state.selected = selected; - state.selectedCount += 1; - }, - mbmpCountIncrement: (state) => { - state.mbmpCount += 1; - }, - setMenu: (state, menu) => { - state.menu = menu; - state.menuCount += 1; - }, - setMenuParam: (state, param) => { - state.menuParam = param; - }, - setMenuPosition: (state, position) => { - state.menuPosition = position; - }, - setMenuPositionOffset: (state, offset) => { - if (state.menuPosition) { - state.menuPosition = { - x: state.menuPosition.x + offset.x, - y: state.menuPosition.y + offset.y - }; - } - }, - setMagnifyCount: (state) => { - state.magnifyCount += 1; - }, - setShrinkCount: (state) => { - state.shrinkCount += 1; - } - }, + mutations: { + reset: (state) => { + state.menu = null; + state.selected = null; + state.menuPosition = {}; + state.buttonOperation = null; + }, + doBreak: (state, editStatus) => { + if (!state.break) { + state.break = true; + if (editStatus != TrainingMode.EDIT) { + state.menuCount += 1; + } + } + }, + doRoute: (state) => { + if (state.break) { + state.break = false; + state.menuCount += 1; + } + }, + setButtonOperation: (state, operation) => { + state.buttonOperation = operation; + }, + setSelected: (state, selected) => { + state.selected = selected; + state.selectedCount += 1; + }, + mbmpCountIncrement: (state) => { + state.mbmpCount += 1; + }, + setMenu: (state, menu) => { + state.menu = menu; + state.menuCount += 1; + }, + setMenuParam: (state, param) => { + state.menuParam = param; + }, + setMenuPosition: (state, position) => { + state.menuPosition = position; + }, + setMenuPositionOffset: (state, offset) => { + if (state.menuPosition) { + state.menuPosition = { + x: state.menuPosition.x + offset.x, + y: state.menuPosition.y + offset.y + }; + } + }, + setMagnifyCount: (state) => { + state.magnifyCount += 1; + }, + setShrinkCount: (state) => { + state.shrinkCount += 1; + }, + setMapDrawSelectCount: (state) => { + state.mapDrawSelectCount += 1; + } + }, - actions: { - /** + actions: { + /** * 放大地图 */ - handleMagnifyCount: ({ commit }) => { - commit('setMagnifyCount'); - }, + handleMagnifyCount: ({ commit }) => { + commit('setMagnifyCount'); + }, - /** + /** * 缩小地图 */ - handleShrinkCount: ({ commit }) => { - commit('setShrinkCount'); - }, + handleShrinkCount: ({ commit }) => { + commit('setShrinkCount'); + }, - /** 清除菜单操作*/ - reset: ({ commit }) => { - commit('reset'); - }, + /** 清除菜单操作*/ + reset: ({ commit }) => { + commit('reset'); + }, - /** + /** * 处理操作是否中断 */ - handleBreakFlag: ({ commit, rootState }, payLoad) => { - if (rootState.training.mode === TrainingMode.EDIT && rootState.training.started && payLoad && payLoad.break) { - commit('doBreak', rootState.training.mode); - } else { - commit('doRoute'); - } - }, + handleBreakFlag: ({ commit, rootState }, payLoad) => { + if (rootState.training.mode === TrainingMode.EDIT && rootState.training.started && payLoad && payLoad.break) { + commit('doBreak', rootState.training.mode); + } else { + commit('doRoute'); + } + }, - /** + /** * 地图按钮菜单位置改变事件 */ - mbmPositionChange: ({ commit }) => { - commit('mbmpCountIncrement'); - }, + mbmPositionChange: ({ commit }) => { + commit('mbmpCountIncrement'); + }, - /** + /** * 设置按钮菜单按钮 */ - setButtonOperation: ({ commit }, operation) => { - commit('setButtonOperation', operation); - }, + setButtonOperation: ({ commit }, operation) => { + commit('setButtonOperation', operation); + }, - /** + /** * 设置选中model */ - setSelected: ({ commit }, selected) => { - commit('setSelected', selected); - }, + setSelected: ({ commit }, selected) => { + commit('setSelected', selected); + }, - /** + /** * 设置菜单 */ - setPopMenu: ({ commit }, payLoad) => { - commit('setMenu', payLoad.menu); - commit('setMenuParam', payLoad.param); - commit('setMenuPosition', payLoad.position); - }, + setPopMenu: ({ commit }, payLoad) => { + commit('setMenu', payLoad.menu); + commit('setMenuParam', payLoad.param); + commit('setMenuPosition', payLoad.position); + }, - /** + /** * 更新坐标 */ - setMenuPositionOffset: ({ commit }, offset) => { - commit('setMenuPositionOffset', offset); - } - } + setMenuPositionOffset: ({ commit }, offset) => { + commit('setMenuPositionOffset', offset); + }, + + setMapDrawSelectCount: ({ commit }) => { + commit('setMapDrawSelectCount'); + } + } }; export default menuOperation; diff --git a/src/store/modules/permission.js b/src/store/modules/permission.js index cd75fad78..b0d59ea0a 100644 --- a/src/store/modules/permission.js +++ b/src/store/modules/permission.js @@ -1,6 +1,7 @@ -import { asyncRouter, constantRoutes, user, userLesson, userExam, userSimulation, userScreen, userPlan, superAdmin, admin } from '@/router'; +import { asyncRouter, constantRoutes, user, userLesson, userExam, userSimulation, userScreen, userPlan, superAdmin, admin, userDesign } from '@/router'; import { PermissionType } from '@/utils/PermissionType'; import { UrlConfig } from '@/router/index'; +import { getSessionStorage } from '@/utils/auth'; function setHonePagePath(route, roles) { if (roles && roles.length === 2 && roles.indexOf(user) >= 0 && (route.path === '/' || route.path === 'dashboard')) { @@ -27,7 +28,38 @@ function hasPermission(roles, route, parentsRoles) { setHonePagePath(route, roles); if (route.meta && route.meta.roles) { // 如果存在本级路由,则使用自己的roles过滤 - return roles.some(role => route.meta.roles.indexOf(role) >= 0); + // debugger; + // if (getSessionStorage('design')) { + // if (route.meta.roles.indexOf(userDesign)===-1) { + // route.hidden = true; + // } else { + // if ((route.meta.roles.indexOf(admin)>=0 && roles.indexOf(admin)>=0)) { + // route.hidden = false; + // } else if (route.meta.roles.indexOf(user)>=0 && roles.indexOf(user)>=0) { + // route.hidden = false; + // } else { + // route.hidden = true; + // } + // } + + // } else { + // if (route.meta.roles.indexOf(userDesign)>0) { + // route.hidden = true; + // } + // } + // return roles.some(role => route.meta.roles.indexOf(role) >= 0); + if (getSessionStorage('project').startsWith('design')) { + roles= roles.filter(function (role) { + return route.meta.roles.indexOf(role) >= 0; + }); + const result=roles.every(role => route.meta.roles.indexOf(role) >= 0); + return result && ((roles.indexOf(admin)>=0 && route.meta.roles.indexOf(admin)>=0) || (roles.indexOf(user)>=0 && route.meta.roles.indexOf(user)>=0 )); + } else { + roles= roles.filter(function (role) { + return route.meta.roles.indexOf(role) >= 0; + }); + return roles.some(role => route.meta.roles.indexOf(role) >= 0) && route.meta.roles.indexOf(userDesign)<0; + } } else if (parentsRoles) { // 如果没有本级路由,有父级路由,则使用父级路由过滤 return roles.some(role => parentsRoles.indexOf(role) >= 0); @@ -93,12 +125,15 @@ const permission = { return new Promise(resolve => { const { roles } = convertRouterRoles(data); let accessedRouters; - if (roles.indexOf(superAdmin) >= 0) { - accessedRouters = asyncRouter; - } else { - accessedRouters = filterAsyncRouter(asyncRouter, roles); + if (roles.indexOf(superAdmin) >= 0 && roles.indexOf(admin) < 0) { + roles.push(admin); } - + // if (roles.indexOf(superAdmin) >= 0) { + // accessedRouters = asyncRouter; + // } else { + // eslint-disable-next-line prefer-const + accessedRouters = filterAsyncRouter(asyncRouter, roles); + // } commit('SET_ROUTERS', accessedRouters); resolve(); }); diff --git a/src/store/modules/socket.js b/src/store/modules/socket.js index 5b8bdb53d..296031b2a 100644 --- a/src/store/modules/socket.js +++ b/src/store/modules/socket.js @@ -1,396 +1,340 @@ - import store from '@/store'; +import { Notification } from 'element-ui'; function handle(state, data) { - // console.log(data, 'socket订阅'); - const msg = data.body; - const path = window.location.href; - switch (data.type) { - case 'Order_Pay_Result': // 订单支付结果消息 - state.payOrder = msg; - break; - case 'JointTraining_Room': // 综合演练室-房间消息 - if (!path.includes('/plan') || !path.includes('/dp/')) { - state.jointRoomInfo = msg; // 房间信息 - } - break; - case 'JointTraining_User': // 综合演练室-用户消息 - handleUserinfo(state, msg); // 分配角色权限消息 - break; - case 'JointTraining_Chat': // 综合演练室-群聊消息 - handleRecordList(state, msg); - break; - case 'Simulation_DeviceStatus': // 仿真-设备状态消息 - state.equipmentStatus = msg; - break; - case 'Simulation_RunFact': // 仿真-列车实际到发车站消息 - state.trainStationList = msg; - break; - case 'Simulation_Error': // 仿真-异常消息 - state.simulationError = msg; - break; - case 'Simulation_RunAsPlan_Start': // 仿真-仿真开始按计划行车消息 - state.simulationStart = msg; - break; - case 'Simulation_Reset': // 仿真-仿真重置消息 退出计划行车 - state.simulationReset = msg; - break; - case 'Simulation_Conversation': // 仿真-用户交互消息(聊天/命令) - handleSimulationInfo(state, msg); - break; - case 'Simulation_PlayBack_Conversation': // 回放-用户交互消息 - handleSimulationInfo(state, msg); - break; - case 'Simulation_ApplyHandle': // 请求处理消息 - handlePushMsgQueue(state, msg); - break; - case 'JointTraining_User_Permit': // 综合演练室-用户获取权限消息 - state.userPermit = msg; - break; - case 'JointTraining_User_RoomKickOut': // 综合演练室-用户被踢出房间消息 - state.userRoomKickOut = msg; // 没有给被踢用户发送 - handleMessageInfo(state, 'userRoomKickOut', msg); - break; - case 'JointTraining_User_InRoom': // 综合演练室-用户从外部进入房间消息 - state.userInRoom = msg; - handleMessageInfo(state, 'userInRoom', msg); - break; - case 'JointTraining_User_OutRoom': // 综合演练室-用户退出房间消息 - state.userOutRoom = msg; - handleMessageInfo(state, 'userOutRoom', msg); - break; - case 'JointTraining_User_InSimulation': // 综合演练室-用户进入仿真消息 - state.userInSimulation = msg; - handleMessageInfoSimulation(state, 'userInSimulation', msg); - break; - case 'JointTraining_User_BackRoom': // 综合演练室-用户从仿真返回房间消息 - state.userBackRoom = msg; - handleMessageInfoSimulation(state, 'userBackRoom', msg); - break; - case 'JointTraining_Room_Invite': // 综合演练室-房间邀请消息 - state.roomInvite = msg; - break; - case 'Big_Screen_Simulation_DeviceStatus': // 大屏仿真状态数据 - state.equipmentStatus = msg; - break; - case 'Big_Screen_Simulation_RunFact': // 大屏仿真运行图状态 - state.trainStationList = msg; - break; - case 'Plan_Simulation_DeviceStatus': // 大屏仿真状态数据 - state.equipmentStatus = msg; - break; - case 'Plan_Simulation_RunFact': // 大屏仿真运行图状态 - state.trainStationList = msg; - break; - case 'Simulation_Permission_Over': // 权限结束 - state.permissionOver = msg; - break; - case 'Simulation_Quest_Finish': // 任务结束标志 - state.tipOperateCount++; - break; - case 'Simulation_Control_Pause': // 暂停中 - store.dispatch('scriptRecord/updateSimulationPause', msg); - } + // console.log(data, 'socket订阅'); + const msg = data.body; + const path = window.location.href; + switch (data.type) { + case 'Order_Pay_Result': // 订单支付结果消息 + state.payOrder = msg; + break; + case 'JointTraining_Room': // 综合演练室-房间消息 + if (!path.includes('/plan') || !path.includes('/dp/')) { + state.jointRoomInfo = msg; // 房间信息 + } + break; + case 'JointTraining_User': // 综合演练室-用户消息 + handleUserinfo(state, msg); // 分配角色权限消息 + break; + case 'JointTraining_Chat': // 综合演练室-群聊消息 + handleRecordList(state, msg); + break; + case 'Simulation_DeviceStatus': // 仿真-设备状态消息 + state.equipmentStatus = msg; + break; + case 'Simulation_RunFact': // 仿真-列车实际到发车站消息 + state.trainStationList = msg; + break; + case 'Simulation_Error': // 仿真-异常消息 + state.simulationError = msg; + break; + case 'Simulation_RunAsPlan_Start': // 仿真-仿真开始按计划行车消息 + state.simulationStart = msg; + break; + case 'Simulation_Reset': // 仿真-仿真重置消息 退出计划行车 + state.simulationReset = msg; + break; + case 'Simulation_Conversation': // 仿真-用户交互消息(聊天/命令) + handleSimulationInfo(state, msg); + break; + case 'Simulation_PlayBack_Conversation': // 回放-用户交互消息 + handleSimulationInfo(state, msg); + break; + case 'Simulation_ApplyHandle': // 请求处理消息 + handlePushMsgQueue(state, msg); + break; + case 'JointTraining_User_Permit': // 综合演练室-用户获取权限消息 + state.userPermit = msg; + break; + case 'JointTraining_Room_Invite': // 综合演练室-房间邀请消息 + state.roomInvite = msg; + break; + case 'Big_Screen_Simulation_DeviceStatus': // 大屏仿真状态数据 + state.equipmentStatus = msg; + break; + case 'Big_Screen_Simulation_RunFact': // 大屏仿真运行图状态 + state.trainStationList = msg; + break; + case 'Plan_Simulation_DeviceStatus': // 大屏仿真状态数据 + state.equipmentStatus = msg; + break; + case 'Plan_Simulation_RunFact': // 大屏仿真运行图状态 + state.trainStationList = msg; + break; + case 'Simulation_Permission_Over': // 权限结束 + state.permissionOver = msg; + break; + case 'Simulation_Quest_Finish': // 任务结束标志 + state.tipOperateCount++; + break; + case 'JointTraining_Device': + state.realDeviceInfo++; + break; + case 'Simulation_Control_Pause': // 暂停中 + store.dispatch('scriptRecord/updateSimulationPause', msg); + break; + case 'BROADCAST': // 升级通知消息 + Notification.warning({ + title: msg.title, + center: true, + message: msg.message, + position: 'bottom-right', + showClose: msg.showClose, + duration: 0 + }); + break; + } } // 操作聊天信息 function handleRecordList(state, data) { - const userId = store.state.user.id; - let isSelf = false; - if (data.member.id == userId) { - isSelf = true; - } - const myDate = new Date(); - const myDate1 = myDate.toLocaleDateString().replace(/\//g, '-'); - const param = { - join: false, - value: data.message, - self: isSelf, - voice: data.isAudio, - src: data.isAudio ? `${process.env.process.env.VUE_VOICE_API}/jlcloud/audio/${data.audioPath}` : '', - other: !isSelf, - userName: data.member.nickName, - chatTime: data.chatTime, - chatInfo: true, - inSimulation: false, - inRoom: true, - date: +new Date(`${myDate1} ${data.chatTime}`) - }; - state.chatContentList = param; + const userId = store.state.user.id; + let isSelf = false; + if (data.member.id == userId) { + isSelf = true; + } + const myDate = new Date(); + const myDate1 = myDate.toLocaleDateString().replace(/\//g, '-'); + const param = { + join: false, + value: data.message, + self: isSelf, + voice: data.isAudio, + src: data.isAudio ? `${process.env.process.env.VUE_VOICE_API}/jlcloud/audio/${data.audioPath}` : '', + other: !isSelf, + userName: data.member.nickName, + chatTime: data.chatTime, + chatInfo: true, + inSimulation: false, + inRoom: true, + date: +new Date(`${myDate1} ${data.chatTime}`) + }; + state.chatContent = param; } // 仿真内部聊天 function handleSimulationInfo(state, data) { - const userId = store.state.user.id; - let isSelf = false; - if (data.member.userId == userId) { - isSelf = true; - } - let role = ''; - switch (data.member.role) { - case '01': - role = '管理员'; - break; - case '02': - role = '教员'; - break; - case '03': - role = `调度员`; - break; - case '04': - store.state.map.map.stationList.forEach(nor => { - if (nor.code == data.member.deviceCode) { - role = `${nor.name}`; - } - }); - break; - } - if (!data.member.userId && data.member.deviceName) { - data.member.nickName = data.member.deviceName; - } - if (!data.targetMember.userId && data.targetMember.deviceName) { - data.targetMember.nickName = data.targetMember.deviceName; - } - const myDate = new Date(); - const myDate1 = myDate.toLocaleDateString().replace(/\//g, '-'); - const chatTime = /\d{2}:\d{2}:\d{2}/.exec(data.chatTime)[0] || data.chatTime; - const param = { - join: false, - value: data.message, - self: isSelf, - voice: data.isAudio, - src: data.isAudio ? `${process.env.process.env.VUE_VOICE_API}/jlcloud/audio/${data.audioPath}` : '', - other: !isSelf, - userName: '', - id: data.member.id, - chatTime: data.chatTime, - date: +new Date(`${myDate1} ${chatTime}`), - conversationId: data.conversationId, - changeVO: data.changeVO || {}, - targetMember: data.targetMember, - member: data.member, - group: data.group - }; - if (data.member.role) { - param.userName = `${role}【${data.member.nickName}】`; - } else { - param.userName = `${data.member.nickName}`; - } - state.simulationText = param; + const userId = store.state.user.id; + let isSelf = false; + if (data.member.userId == userId) { + isSelf = true; + } + let role = ''; + switch (data.member.role) { + case '01': + role = '管理员'; + break; + case '02': + role = '教员'; + break; + case '03': + role = `调度员`; + break; + case '04': + store.state.map.map.stationList.forEach(nor => { + if (nor.code == data.member.deviceCode) { + role = `${nor.name}`; + } + }); + break; + } + if (!data.member.userId && data.member.deviceName) { + data.member.nickName = data.member.deviceName; + } + if (!data.targetMember.userId && data.targetMember.deviceName) { + data.targetMember.nickName = data.targetMember.deviceName; + } + const myDate = new Date(); + const myDate1 = myDate.toLocaleDateString().replace(/\//g, '-'); + const chatTime = /\d{2}:\d{2}:\d{2}/.exec(data.chatTime)[0] || data.chatTime; + const param = { + join: false, + value: data.message, + self: isSelf, + voice: data.isAudio, + src: data.isAudio ? `${process.env.process.env.VUE_VOICE_API}/jlcloud/audio/${data.audioPath}` : '', + other: !isSelf, + userName: '', + id: data.member.id, + chatTime: data.chatTime, + date: +new Date(`${myDate1} ${chatTime}`), + conversationId: data.conversationId, + changeVO: data.changeVO || {}, + targetMember: data.targetMember, + member: data.member, + group: data.group + }; + if (data.member.role) { + param.userName = `${role}【${data.member.nickName}】`; + } else { + param.userName = `${data.member.nickName}`; + } + state.simulationText = param; } -function handleUserinfo(state, data) { - if (data.length) { // 分配角色信息 - state.roleInfo = data; - } -} -function handleMessageInfo(state, type, data) { - const message = { - join: true, - id: data.id, - userName: data.nickName, - userRole: data.userRole, - name: data.name, - roomTip: '', - chatInfo: true, - inSimulation: data.inSimulation, - inRoom: data.inRoom, - session: 'session', - type: type, - oneself: data.id === store.state.user.id - }; - switch (type) { - case 'userInRoom': - message.roomTip = `${data.nickName}进入房间`; - break; - case 'userRoomKickOut': - message.roomTip = `${data.nickName}被踢出房间`; - break; - case 'userOutRoom': - message.roomTip = `${data.nickName}退出房间`; - break; - } - state.chatContentList = message; -} -function handleMessageInfoSimulation(state, type, data) { - const message = { - join: true, - id: data.id, - userName: data.nickName, - userRole: data.userRole, - name: data.name, - simulationTip: '', - chatInfo: true, - inSimulation: data.inSimulation, - inRoom: data.inRoom, - session: 'session' - }; - switch (type) { - case 'userInSimulation': - message.simulationTip = `${data.nickName}进入仿真`; - break; - case 'userBackRoom': - message.simulationTip = `${data.nickName}退出仿真`; - break; - } - state.chatContentSimuList = message; -} -function handlePushMsgQueue(state, msg) { - if (msg instanceof Array) { - state.msgQueue.concat(msg); - } else { - state.msgQueue.push(msg); - } - if (!state.msgHead) { - state.msgHead = state.msgQueue[0]; - } +function handleUserinfo(state, data) { + state.roleList = (data instanceof Array) ? data : [data]; +} + +function handlePushMsgQueue(state, msg) { + if (msg instanceof Array) { + state.msgQueue.concat(msg); + } else { + state.msgQueue.push(msg); + } + + if (!state.msgHead) { + state.msgHead = state.msgQueue[0]; + } } const socket = { - namespaced: true, + namespaced: true, - state: { - payOrder: {}, // 支付消息 - jointRoomInfo: {}, // 受邀请房间信息 - chatContentList: {}, // 聊天室聊天内容 - roleInfo: [], // 设置角色信息 - jointRoomPrepare: false, // 演练房间准备状态 - equipmentStatus: [], // 仿真-设备状态消息 - trainStationList: [], // 仿真-列车实际到发车站消息 - simulationError: '', // 仿真-异常消息 - simulationStart: '', // 仿真-开始消息 - simulationReset: '', // 仿真-异常消息 - simulationText: {}, // 仿真-用户交互消息(聊天/命令) - message: {}, // 仿真聊天 - msgQueue: [], // 命令请求列表 - msgHead: null, // 消息头 + state: { + payOrder: {}, // 支付消息 + jointRoomInfo: {}, // 受邀请房间信息 + chatContent: {}, // 聊天室聊天内容 + roleList: [], // 设置角色信息 + jointRoomPrepare: false, // 演练房间准备状态 + equipmentStatus: [], // 仿真-设备状态消息 + trainStationList: [], // 仿真-列车实际到发车站消息 + simulationError: '', // 仿真-异常消息 + simulationStart: '', // 仿真-开始消息 + simulationReset: '', // 仿真-异常消息 + simulationText: {}, // 仿真-用户交互消息(聊天/命令) - userPermit: {}, // 用户获取权限消息 - userRoomKickOut: {}, // 用户被踢出房间消息 - userInRoom: {}, // 用户从外部进入房间消息 - userOutRoom: {}, // 用户退出房间消息 - userInSimulation: {}, // 用户进入仿真消息 - userBackRoom: {}, // 用户从仿真返回房间消息 - roomInvite: {}, // 用户扫码信息 - chatContentSimuList: {}, // 进入仿真,离开仿真信息 + message: {}, // 仿真聊天 + msgQueue: [], // 命令请求列表 + msgHead: null, // 消息头 - permissionOver: {}, // 权限结束 + userPermit: {}, // 用户获取权限消息 + userRoomKickOut: {}, // 用户被踢出房间消息 + userInRoom: {}, // 用户从外部进入房间消息 + userOutRoom: {}, // 用户退出房间消息 + userInSimulation: {}, // 用户进入仿真消息 + userBackRoom: {}, // 用户从仿真返回房间消息 + roomInvite: {}, // 用户扫码信息 - tipOperateCount: 0 // 任务结束提示消息 - }, + permissionOver: {}, // 权限结束 - getters: { - }, - mutations: { - setJointRoomInfo: (state, jointRoomInfo) => { - state.jointRoomInfo = jointRoomInfo; - }, + tipOperateCount: 0, // 任务结束提示消息 + realDeviceInfo: 0 // 真实设备信息 + }, - setChatContentList: (state, chatContentList) => { - state.chatContentList = chatContentList; - }, + getters: { + }, + mutations: { + setJointRoomInfo: (state, jointRoomInfo) => { + state.jointRoomInfo = jointRoomInfo; + }, - setEquipmentStatus: (state, equipmentStatus) => { - state.equipmentStatus = equipmentStatus; - }, + setChatContent: (state, chatContent) => { + state.chatContent = chatContent; + }, - setTrainStationList: (state, trainStationList) => { - state.trainStationList = trainStationList; - }, + setEquipmentStatus: (state, equipmentStatus) => { + state.equipmentStatus = equipmentStatus; + }, - setSimulationError: (state, simulationError) => { - state.simulationError = simulationError; - }, + setTrainStationList: (state, trainStationList) => { + state.trainStationList = trainStationList; + }, - setSimulationStart: (state, simulationStart) => { - state.simulationStart = simulationStart; - }, + setSimulationError: (state, simulationError) => { + state.simulationError = simulationError; + }, - setSimulationReset: (state, simulationReset) => { - state.simulationReset = simulationReset; - }, + setSimulationStart: (state, simulationStart) => { + state.simulationStart = simulationStart; + }, - setSimulationTextList: (state, simulationText) => { - state.simulationText = simulationText; - }, + setSimulationReset: (state, simulationReset) => { + state.simulationReset = simulationReset; + }, - setPayOrder: (state, payOrder) => { - state.payOrder = payOrder; - }, + setSimulationTextList: (state, simulationText) => { + state.simulationText = simulationText; + }, - shiftMsgQueue: (state) => { - state.msgHead = null; - state.msgQueue.shift(); - state.msgHead = state.msgQueue[0]; - }, - pushMsgQueue: (state, msg) => { - handlePushMsgQueue(state, msg); - }, + setPayOrder: (state, payOrder) => { + state.payOrder = payOrder; + }, - setRoomInvite: (state, roomInvite) => { - state.roomInvite = roomInvite; - } - }, + shiftMsgQueue: (state) => { + state.msgHead = null; + state.msgQueue.shift(); + state.msgHead = state.msgQueue[0]; + }, + pushMsgQueue: (state, msg) => { + handlePushMsgQueue(state, msg); + }, - actions: { - setStomp: ({ state }, res) => { - handle(state, res); - }, + setRoomInvite: (state, roomInvite) => { + state.roomInvite = roomInvite; + } + }, - setChatContentList: ({ commit }, chatContentList) => { - commit('setChatContentList', chatContentList); - }, + actions: { + setStomp: ({ state }, res) => { + handle(state, res); + }, - setJointRoomInfo: ({ commit }) => { - commit('setJointRoomInfo', {}); - }, + setChatContent: ({ commit }, chatContent) => { + commit('setChatContent', chatContent); + }, - setEquipmentStatus: ({ commit }) => { - commit('setEquipmentStatus', []); - }, + setJointRoomInfo: ({ commit }) => { + commit('setJointRoomInfo', {}); + }, - setTrainStationList: ({ commit }) => { - commit('setTrainStationList', []); - }, + setEquipmentStatus: ({ commit }) => { + commit('setEquipmentStatus', []); + }, - setSimulationError: ({ commit }) => { - commit('setSimulationError', ''); - }, + setTrainStationList: ({ commit }) => { + commit('setTrainStationList', []); + }, - setSimulationStart: ({ commit }) => { - commit('setSimulationStart', ''); - }, + setSimulationError: ({ commit }) => { + commit('setSimulationError', ''); + }, - setSimulationReset: ({ commit }) => { - commit('setSimulationReset', ''); - }, + setSimulationStart: ({ commit }) => { + commit('setSimulationStart', ''); + }, - setSimulationTextList: ({ commit }) => { - commit('setSimulationTextList', {}); - }, + setSimulationReset: ({ commit }) => { + commit('setSimulationReset', ''); + }, - setRoomInvite: ({ commit }) => { - commit('setRoomInvite', {}); - }, + setSimulationTextList: ({ commit }) => { + commit('setSimulationTextList', {}); + }, - setMessage: ({ state }, data) => { - if (!state.message[data.key]) { - state.message[data.key] = []; - } - state.message[data.key].push(data.value); - }, + setRoomInvite: ({ commit }) => { + commit('setRoomInvite', {}); + }, - setPayOrder: ({ commit }) => { - commit('setPayOrder', {}); - }, + setMessage: ({ state }, data) => { + if (!state.message[data.key]) { + state.message[data.key] = []; + } + state.message[data.key].push(data.value); + }, - shiftMsgQueue: ({ commit }) => { - commit('shiftMsgQueue'); - }, + setPayOrder: ({ commit }) => { + commit('setPayOrder', {}); + }, - pushMsgQueue: ({ commit }, msg) => { - commit('pushMsgQueue', msg); - } - } + shiftMsgQueue: ({ commit }) => { + commit('shiftMsgQueue'); + }, + + pushMsgQueue: ({ commit }, msg) => { + commit('pushMsgQueue', msg); + } + } }; export default socket; diff --git a/src/store/modules/training.js b/src/store/modules/training.js index 40bdea6fd..d5b9ebf70 100644 --- a/src/store/modules/training.js +++ b/src/store/modules/training.js @@ -8,552 +8,552 @@ import LangStorage from '@/utils/lang'; * 实训状态数据 */ const training = { - namespaced: true, + namespaced: true, - state: { - mode: null, // 模式 - operatemode: null, // 操作模式 管理员/普通 - started: false, // 是否开始 - switchcount: 0, // 开关标识 - basicInfo: {}, // 实训基本信息数据 - offsetStationCode: '', // 偏移到车站 - rezoomCount: 0, // 车站变更标识 - steps: [], // 实训步骤数据 - tempStep: {}, // 临时步骤数据(编辑模式) - order: -1, // 实训进行到第几步 - orderCount: 0, // 步骤变更标识 - operateErrMsg: '', // 操作错误提示信息 - subscribeCount: 0, // 仿真订阅完成标识 - score: 0, // 实训得分 - usedTime: 0, // 实训所需时间 - timeInterval: null, // 计时器 - tipEvent: 0, // 提示刷新检测 - operate: {}, // 操作model, - initTime: 0, // 当前系统时间 - prdType: '', // 产品类型 - roles: '', // 角色权限类型 - group: '' // 设置全局 group - }, + state: { + mode: null, // 模式 + operatemode: null, // 操作模式 管理员/普通 + started: false, // 是否开始 + switchcount: 0, // 开关标识 + basicInfo: {}, // 实训基本信息数据 + offsetStationCode: '', // 偏移到车站 + rezoomCount: 0, // 车站变更标识 + steps: [], // 实训步骤数据 + tempStep: {}, // 临时步骤数据(编辑模式) + order: -1, // 实训进行到第几步 + orderCount: 0, // 步骤变更标识 + operateErrMsg: '', // 操作错误提示信息 + subscribeCount: 0, // 仿真订阅完成标识 + score: 0, // 实训得分 + usedTime: 0, // 实训所需时间 + timeInterval: null, // 计时器 + tipEvent: 0, // 提示刷新检测 + operate: {}, // 操作model, + initTime: 0, // 当前系统时间 + prdType: '', // 产品类型 + roles: '', // 角色权限类型 + group: '' // 设置全局 group + }, - getters: { - tempStep: (state) => { - return state.tempStep; - }, - steps: (state) => { - return state.steps; - }, - order: (state) => { - return state.order; - }, - offsetStationCode: (state) => { - return state.offsetStationCode; - }, - basicInfo: (state) => { - return state.basicInfo; - }, - mode: (state) => { - return state.mode; - }, - operatemode: (state) => { - return state.operatemode; - }, - started: (state) => { - return state.started; - }, - score: (state) => { - return state.score; - }, - usedTime: (state) => { - return state.usedTime; - }, - tipEvent: (state) => { - return state.tipEvent; - }, - initTime: (state) => { - return state.initTime; - }, - prdType: (state) => { - return state.prdType; - }, - roles: (state) => { - return state.roles; - }, - // 视图中的列车列表 - viewTrainList: (state) => () =>{ - const trainList = []; - const mapDevice = Vue.prototype.$jlmap.mapDevice; - Object.values(mapDevice).forEach(device => { - if (device && device._type === deviceType.Train) { - trainList.push(device); - } - }); + getters: { + tempStep: (state) => { + return state.tempStep; + }, + steps: (state) => { + return state.steps; + }, + order: (state) => { + return state.order; + }, + offsetStationCode: (state) => { + return state.offsetStationCode; + }, + basicInfo: (state) => { + return state.basicInfo; + }, + mode: (state) => { + return state.mode; + }, + operatemode: (state) => { + return state.operatemode; + }, + started: (state) => { + return state.started; + }, + score: (state) => { + return state.score; + }, + usedTime: (state) => { + return state.usedTime; + }, + tipEvent: (state) => { + return state.tipEvent; + }, + initTime: (state) => { + return state.initTime; + }, + prdType: (state) => { + return state.prdType; + }, + roles: (state) => { + return state.roles; + }, + // 视图中的列车列表 + viewTrainList: (state) => () =>{ + const trainList = []; + const mapDevice = Vue.prototype.$jlmap.mapDevice; + Object.values(mapDevice).forEach(device => { + if (device && device._type === deviceType.Train) { + trainList.push(device); + } + }); - return trainList; - } - }, + return trainList; + } + }, - mutations: { - changeMode: (state, mode) => { - state.mode = mode; - }, - changeOperateMode: (state, mode) => { - state.operatemode = mode; - }, - start: (state) => { - state.started = true; - state.switchcount += 1; - }, - over: (state) => { - state.started = false; - state.switchcount += 1; - }, - updateMapState: (state, deviceStatus) => { - Vue.prototype.$jlmap && Vue.prototype.$jlmap.update(deviceStatus); - }, - setMapDefaultState: (state) =>{ - Vue.prototype.$jlmap && Vue.prototype.$jlmap.setDefaultState(); - }, - setBasicInfo: (state, basicInfo) => { - state.basicInfo = basicInfo; - }, - setOffsetStationCode: (state, offsetStationCode) => { - state.offsetStationCode = offsetStationCode || null; - if (state % 100 === 0) { - state.rezoomCount = 0; - } else { - state.rezoomCount += 1; - } - }, - setSteps: (state, steps) => { - state.steps = steps; - }, - addStep: (state, step) => { - state.steps.push(step); - }, - next: (state) => { - state.order += 1; - state.orderCount += 1; - }, - orderCountIncrement: (state) => { - state.orderCount += 1; - }, - resetOrder: (state) => { - state.order = -1; - }, - backOrder: (state, stepNum) => { - if (state.order > stepNum) { - state.order -= stepNum; - state.orderCount += 1; - } - }, - setTempStep: (state, step) => { - state.tempStep = step; - }, + mutations: { + changeMode: (state, mode) => { + state.mode = mode; + }, + changeOperateMode: (state, mode) => { + state.operatemode = mode; + }, + start: (state) => { + state.started = true; + state.switchcount += 1; + }, + over: (state) => { + state.started = false; + state.switchcount += 1; + }, + updateMapState: (state, deviceStatus) => { + Vue.prototype.$jlmap && Vue.prototype.$jlmap.update(deviceStatus); + }, + setMapDefaultState: (state) =>{ + Vue.prototype.$jlmap && Vue.prototype.$jlmap.setDefaultState(); + }, + setBasicInfo: (state, basicInfo) => { + state.basicInfo = basicInfo; + }, + setOffsetStationCode: (state, offsetStationCode) => { + state.offsetStationCode = offsetStationCode || null; + if (state % 100 === 0) { + state.rezoomCount = 0; + } else { + state.rezoomCount += 1; + } + }, + setSteps: (state, steps) => { + state.steps = steps; + }, + addStep: (state, step) => { + state.steps.push(step); + }, + next: (state) => { + state.order += 1; + state.orderCount += 1; + }, + orderCountIncrement: (state) => { + state.orderCount += 1; + }, + resetOrder: (state) => { + state.order = -1; + }, + backOrder: (state, stepNum) => { + if (state.order > stepNum) { + state.order -= stepNum; + state.orderCount += 1; + } + }, + setTempStep: (state, step) => { + state.tempStep = step; + }, - setOperateErrMsg: (state, errMsg) => { - state.operateErrMsg = errMsg; - }, + setOperateErrMsg: (state, errMsg) => { + state.operateErrMsg = errMsg; + }, - setHasSubscribed: (state) => { - state.subscribeCount++; - }, + setHasSubscribed: (state) => { + state.subscribeCount++; + }, - setScore: (state, score) => { - state.score = score; - }, - resetScore: (state) => { - state.score = ''; - }, - tipEventIncrement: (state) => { - state.tipEvent++; - }, - resetUsedTime: (state) => { - state.usedTime = 0; - }, - countUsedTime: (state) => { - if (state.timeInterval) { - clearInterval(state.timeInterval); - state.timeInterval = null; - } - state.timeInterval = setInterval(() => { - state.usedTime++; - state.initTime += 1000; - }, 1000); - }, - stopCountTime: (state) => { - if (state.timeInterval) { - clearInterval(state.timeInterval); - state.timeInterval = null; - } - }, - setOperate: (state, operate) => { - state.operate = operate; - }, - setInitTime: (state, operate) => { - state.initTime = operate; - }, - setPrdType: (state, prdType) => { - state.prdType = prdType; - }, - setRoles: (state, roles) => { - state.roles = roles; - }, - setGroup: (state, group) => { - state.group = group; - } - }, + setScore: (state, score) => { + state.score = score; + }, + resetScore: (state) => { + state.score = ''; + }, + tipEventIncrement: (state) => { + state.tipEvent++; + }, + resetUsedTime: (state) => { + state.usedTime = 0; + }, + countUsedTime: (state) => { + if (state.timeInterval) { + clearInterval(state.timeInterval); + state.timeInterval = null; + } + state.timeInterval = setInterval(() => { + state.usedTime++; + state.initTime += 1000; + }, 1000); + }, + stopCountTime: (state) => { + if (state.timeInterval) { + clearInterval(state.timeInterval); + state.timeInterval = null; + } + }, + setOperate: (state, operate) => { + state.operate = operate; + }, + setInitTime: (state, operate) => { + state.initTime = operate; + }, + setPrdType: (state, prdType) => { + state.prdType = prdType; + }, + setRoles: (state, roles) => { + state.roles = roles; + }, + setGroup: (state, group) => { + state.group = group; + } + }, - actions: { - /** + actions: { + /** * 清除仿真所在组 */ - clearSimulationGroup: ({ commit }, type) => { - commit('clearSimulationGroup', type); - }, - /** + clearSimulationGroup: ({ commit }, type) => { + commit('clearSimulationGroup', type); + }, + /** * 设置socke已经连接 */ - setHasSubscribed: ({ commit }) => { - commit('setHasSubscribed'); - }, - /** + setHasSubscribed: ({ commit }) => { + commit('setHasSubscribed'); + }, + /** * 模式变更 */ - changeMode: ({ commit }, opts) => { - commit('changeMode', opts.mode); - }, + changeMode: ({ commit }, opts) => { + commit('changeMode', opts.mode); + }, - /** + /** * 操作模式变更 */ - changeOperateMode: ({ commit }, opts) => { - commit('changeOperateMode', opts.mode); - }, + changeOperateMode: ({ commit }, opts) => { + commit('changeOperateMode', opts.mode); + }, - /** + /** * 重置实训状态 */ - reset: ({ commit }) => { - commit('over'); - commit('resetOrder'); - commit('stopCountTime'); + reset: ({ commit }) => { + commit('over'); + commit('resetOrder'); + commit('stopCountTime'); - // 清空计时器以及得分 - commit('resetUsedTime'); - commit('resetScore'); - // 设置其他属性状态 - commit('setOffsetStationCode', null); - }, + // 清空计时器以及得分 + commit('resetUsedTime'); + commit('resetScore'); + // 设置其他属性状态 + commit('setOffsetStationCode', null); + }, - /** + /** * 开始 */ - start: ({ commit }) => { - // 清空操作组 - OperateHandler.cleanOperates(); - // 清空计时器以及得分 - commit('stopCountTime'); - commit('resetUsedTime'); - commit('resetScore'); - commit('start'); - }, + start: ({ commit }) => { + // 清空操作组 + OperateHandler.cleanOperates(); + // 清空计时器以及得分 + commit('stopCountTime'); + commit('resetUsedTime'); + commit('resetScore'); + commit('start'); + }, - /** + /** * 结束 */ - over: ({ commit }) => { - commit('over'); - commit('resetOrder'); - commit('stopCountTime'); - }, + over: ({ commit }) => { + commit('over'); + commit('resetOrder'); + commit('stopCountTime'); + }, - /** + /** * step步骤是否结束 */ - isStepOver: ({ state }) => { - if (state.order >= state.steps.length) { - return true; - } - }, + isStepOver: ({ state }) => { + if (state.order >= state.steps.length) { + return true; + } + }, - /** + /** * 停止计时 */ - setStopCountTime: ({ commit }) => { - commit('stopCountTime'); - }, + setStopCountTime: ({ commit }) => { + commit('stopCountTime'); + }, - /** + /** * 主动判断是否结束 */ - judgeFinish: ({ dispatch, commit, state }, rtn) => { - if (state.started) { - if (state.order >= state.steps.length) { - if (rtn && rtn.valid) { - commit('next'); - commit('setOperateErrMsg', { errMsg: LangStorage.getLang() == 'en' ? 'Correct operation! Training is over!' : '操作正确!实训结束!', color: 'green' }); - } else { - commit('setOperateErrMsg', { errMsg: LangStorage.getLang() == 'en' ? 'Operation error! Training is over!' : '操作错误!实训结束!', color: 'red' }); - } - dispatch('over'); - dispatch('changeMode', { mode: null }); - if (rtn.hasOwnProperty('score')) { - commit('setScore', rtn.score || 0); - } - } else { - rtn && rtn.valid && commit('next'); - } - } - }, + judgeFinish: ({ dispatch, commit, state }, rtn) => { + if (state.started) { + if (state.order >= state.steps.length) { + if (rtn && rtn.valid) { + commit('next'); + commit('setOperateErrMsg', { errMsg: LangStorage.getLang() == 'en' ? 'Correct operation! Training is over!' : '操作正确!实训结束!', color: 'green' }); + } else { + commit('setOperateErrMsg', { errMsg: LangStorage.getLang() == 'en' ? 'Operation error! Training is over!' : '操作错误!实训结束!', color: 'red' }); + } + dispatch('over'); + dispatch('changeMode', { mode: null }); + if (rtn.hasOwnProperty('score')) { + commit('setScore', rtn.score || 0); + } + } else { + rtn && rtn.valid && commit('next'); + } + } + }, - /** + /** * 开始实训(模式变更和开始的混合操作) */ - startTraining: ({ commit }, opts) => { - commit('resetOrder'); - commit('changeMode', opts.mode); - if (opts.start) { - // 清空计时器以及得分 - commit('stopCountTime'); - commit('resetUsedTime'); - commit('resetScore'); - // 开始实训 - commit('start'); - commit('next'); - // 开始计时 - commit('countUsedTime'); - } - }, + startTraining: ({ commit }, opts) => { + commit('resetOrder'); + commit('changeMode', opts.mode); + if (opts.start) { + // 清空计时器以及得分 + commit('stopCountTime'); + commit('resetUsedTime'); + commit('resetScore'); + // 开始实训 + commit('start'); + commit('next'); + // 开始计时 + commit('countUsedTime'); + } + }, - /** + /** * 开始实训(模式变更和开始的混合操作) */ - backSteps: ({ commit }, stepNum) => { - if (Number.isInteger) { - commit('backOrder', stepNum); - } - }, + backSteps: ({ commit }, stepNum) => { + if (Number.isInteger) { + commit('backOrder', stepNum); + } + }, - /** + /** * 下一步 */ - next: ({ commit, state }, operate) => { - commit('setOperate', operate); - return new Promise((resolve, reject) => { - if (!state.started && !state.mode) { - commit('setOperateErrMsg', { errMsg: LangStorage.getLang() == 'en' ? 'Please click start, start training!' : '请点击开始,开始实训!', color: 'red' }); - return; - } + next: ({ commit, state }, operate) => { + commit('setOperate', operate); + return new Promise((resolve, reject) => { + if (!state.started && !state.mode) { + commit('setOperateErrMsg', { errMsg: LangStorage.getLang() == 'en' ? 'Please click start, start training!' : '请点击开始,开始实训!', color: 'red' }); + return; + } - // 处理operation - OperateHandler.handle(operate).then(rtn => { - if (state.started) { - // 教学和联系模式需要给出过程步骤提示 - if (TrainingMode.TEACH === state.mode || TrainingMode.PRACTICE === state.mode) { - if (rtn && rtn.valid) { - commit('next'); - commit('setOperateErrMsg', { errMsg: LangStorage.getLang() == 'en' ? "Correct operation! That's great!" : '操作正确!真棒!', color: 'green' }); - commit('tipEventIncrement'); - } else { - if (!operate.repeat) { - commit('setOperateErrMsg', { errMsg: LangStorage.getLang() == 'en' ? 'operation mistake!' : '操作错误!', color: 'red' }); - } - } - } else if (TrainingMode.EXAM === state.mode || TrainingMode.TEST === state.mode) { - // 测试和考试不给提示 - rtn && rtn.valid && commit('next'); - } - } - resolve(rtn); - }).catch(error => { - reject(error); - }); - }); - }, + // 处理operation + OperateHandler.handle(operate).then(rtn => { + if (state.started) { + // 教学和联系模式需要给出过程步骤提示 + if (TrainingMode.TEACH === state.mode || TrainingMode.PRACTICE === state.mode) { + if (rtn && rtn.valid) { + commit('next'); + commit('setOperateErrMsg', { errMsg: LangStorage.getLang() == 'en' ? "Correct operation! That's great!" : '操作正确!真棒!', color: 'green' }); + commit('tipEventIncrement'); + } else { + if (!operate.repeat) { + commit('setOperateErrMsg', { errMsg: LangStorage.getLang() == 'en' ? 'operation mistake!' : '操作错误!', color: 'red' }); + } + } + } else if (TrainingMode.EXAM === state.mode || TrainingMode.TEST === state.mode) { + // 测试和考试不给提示 + rtn && rtn.valid && commit('next'); + } + } + resolve(rtn); + }).catch(error => { + reject(error); + }); + }); + }, - /** + /** * 提示消息重新加载 */ - tipReload: ({ commit }) => { - commit('orderCountIncrement'); - }, + tipReload: ({ commit }) => { + commit('orderCountIncrement'); + }, - /** + /** * 更新偏移位置车站 */ - updateOffsetStationCode: ({ commit }, payLoad) => { - commit('setOffsetStationCode', payLoad.offsetStationCode); - }, + updateOffsetStationCode: ({ commit }, payLoad) => { + commit('setOffsetStationCode', payLoad.offsetStationCode); + }, - /** + /** * 设置实训数据 */ - setTrainingData: ({ commit }, trainingData) => { - const basicInfo = { - id: trainingData.id, - name: trainingData.name, - remarks: trainingData.remarks, - prdType: trainingData.prdType, - minDuration: trainingData.minDuration, - maxDuration: trainingData.maxDuration - }; - commit('setBasicInfo', basicInfo); - const steps = trainingData.steps; - commit('setSteps', steps); - const offsetStationCode = trainingData.locateDeviceCode; - commit('setOffsetStationCode', offsetStationCode); - commit('setMapDefaultState'); - }, + setTrainingData: ({ commit }, trainingData) => { + const basicInfo = { + id: trainingData.id, + name: trainingData.name, + remarks: trainingData.remarks, + prdType: trainingData.prdType, + minDuration: trainingData.minDuration, + maxDuration: trainingData.maxDuration + }; + commit('setBasicInfo', basicInfo); + const steps = trainingData.steps; + commit('setSteps', steps); + const offsetStationCode = trainingData.locateDeviceCode; + commit('setOffsetStationCode', offsetStationCode); + commit('setMapDefaultState'); + }, - /** + /** * 设置步骤数据 */ - setSteps: ({ commit }, steps) => { - commit('setSteps', steps); - }, + setSteps: ({ commit }, steps) => { + commit('setSteps', steps); + }, - /** + /** * 添加步骤数据 */ - addStep: ({ state, commit }, step) => { - return new Promise((resolve, reject) => { - try { - var valid = true; - const steps = state.steps; - if (steps && steps.length > 0) { - const last = steps.length - 1; - if (steps[last].type === step.type && + addStep: ({ state, commit }, step) => { + return new Promise((resolve, reject) => { + try { + var valid = true; + const steps = state.steps; + if (steps && steps.length > 0) { + const last = steps.length - 1; + if (steps[last].type === step.type && steps[last].code === step.code && steps[last].operation === step.operation) { - steps.splice(last, 1); - step.order = step.order - 1; - valid = false; - } - } - commit('addStep', step); - resolve(valid); - } catch (error) { - reject(error); - } - }); - }, - /** + steps.splice(last, 1); + step.order = step.order - 1; + valid = false; + } + } + commit('addStep', step); + resolve(valid); + } catch (error) { + reject(error); + } + }); + }, + /** * 设置地图默认状态 */ - setMapDefaultState: ({ commit }) => { - commit('setMapDefaultState'); - }, + setMapDefaultState: ({ commit }) => { + commit('setMapDefaultState'); + }, - /** + /** * 更新地图设备状态数据 */ - updateMapState: ({ commit }, deviceStatus) => { - commit('updateMapState', deviceStatus); - }, + updateMapState: ({ commit }, deviceStatus) => { + commit('updateMapState', deviceStatus); + }, - /** + /** * 设置临时步骤数据 */ - setTempStep: ({ commit }, step) => { - commit('setTempStep', step); - }, + setTempStep: ({ commit }, step) => { + commit('setTempStep', step); + }, - /** + /** * 开始教学模式 */ - teachModeStart: ({ dispatch }, mode) => { - const payLoad = { start: true, mode: mode }; - dispatch('startTraining', payLoad); - }, + teachModeStart: ({ dispatch }, mode) => { + const payLoad = { start: true, mode: mode }; + dispatch('startTraining', payLoad); + }, - /** + /** * 开始考试模式 */ - examModeStart: ({ dispatch }) => { - const payLoad = { start: true, mode: TrainingMode.EXAM }; - dispatch('startTraining', payLoad); - }, + examModeStart: ({ dispatch }) => { + const payLoad = { start: true, mode: TrainingMode.EXAM }; + dispatch('startTraining', payLoad); + }, - /** + /** * 仿真和大屏和计划模式 */ - simulationStart: ({ dispatch }) => { - const payLoad = { start: true, mode: TrainingMode.NORMAL }; - dispatch('startTraining', payLoad); - }, + simulationStart: ({ dispatch }) => { + const payLoad = { start: true, mode: TrainingMode.NORMAL }; + dispatch('startTraining', payLoad); + }, - /** + /** * 结束模式 */ - end: ({ commit }, mode) => { - commit('over'); - commit('resetOrder'); - commit('stopCountTime'); - commit('changeMode', mode); - }, + end: ({ commit }, mode) => { + commit('over'); + commit('resetOrder'); + commit('stopCountTime'); + commit('changeMode', mode); + }, - /** + /** * 是否教学模式 */ - isTeachMode: ({ state }) => { - return new Promise((resolve, reject) => { - if (state.mode === TrainingMode.TEACH) { - resolve(); - } else { - reject(new Error('not teach mode')); - } - }); - }, + isTeachMode: ({ state }) => { + return new Promise((resolve, reject) => { + if (state.mode === TrainingMode.TEACH) { + resolve(); + } else { + reject(new Error('not teach mode')); + } + }); + }, - /** + /** * 设置用户得分 */ - setScore: ({ commit }, score) => { - commit('setScore', score); - }, + setScore: ({ commit }, score) => { + commit('setScore', score); + }, - /** + /** * 设置tip变化事件 */ - emitTipFresh: ({ commit }) => { - commit('tipEventIncrement'); - }, + emitTipFresh: ({ commit }) => { + commit('tipEventIncrement'); + }, - /** + /** * 设置WebSocket链接状态 */ - setConnected: ({ commit }, isConnected) => { - commit('setConnected', isConnected); - }, + setConnected: ({ commit }, isConnected) => { + commit('setConnected', isConnected); + }, - /** + /** * 设置系统时间 */ - setInitTime: ({ commit }, initTime) => { - commit('setInitTime', initTime); - }, + setInitTime: ({ commit }, initTime) => { + commit('setInitTime', initTime); + }, - /** + /** * 设置产品类型 */ - setPrdType: ({ commit }, prdType) => { - commit('setPrdType', prdType); - }, + setPrdType: ({ commit }, prdType) => { + commit('setPrdType', prdType); + }, - /** + /** * 设置角色列表 */ - setRoles: ({ commit }, roles) => { - commit('setRoles', roles); - }, + setRoles: ({ commit }, roles) => { + commit('setRoles', roles); + }, - /** + /** * 设置仿真组 */ - setGroup: ({ commit }, group) => { - commit('setGroup', group); - } - } + setGroup: ({ commit }, group) => { + commit('setGroup', group); + } + } }; export default training; diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 3297633a9..6c1140e12 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -1,183 +1,190 @@ import { setSessionStorage } from '@/utils/auth'; import { login, logout, getInfo } from '@/api/login'; -import { getToken, setToken, removeToken, removeScreenToken, setScreenToken, getScreenToken, setPlanToken, getPlanToken, removePlanToken, handleToken, handleRemoveToken } from '@/utils/auth'; +import { getToken, setToken, removeToken, getDesignToken, setDesignToken, removeDesignToken, handleToken, handleRemoveToken } from '@/utils/auth'; import { getUserConfigInfo } from '@/api/management/user'; import { LoginParams } from '@/utils/login'; -import { creatSubscribe, perpetualTopic } from '@/utils/stomp'; +import { creatSubscribe, perpetualTopic, commonTopic } from '@/utils/stomp'; +import Cookies from 'js-cookie'; const user = { - state: { - token: getToken(), - tokenScreen: getScreenToken(), - tokenPlan: getPlanToken(), - name: '', - nickname: '', - nationcode: '', - roles: [], - id: '', - admin: false, - wxId: '', - wxUnionId: '' - }, + state: { + token: getToken(), + tokenDesign: getDesignToken(), + name: '', + nickname: '', + nationcode: '', + roles: [], + id: '', + admin: false, + wxId: '', + wxUnionId: '', + account: '' + }, - mutations: { - SET_TOKEN: (state, token) => { - state.token = token; - }, - SET_TOKENSCREEN: (state, token) => { - state.tokenScreen = token; - }, - SET_TOKENPLAN: (state, token) => { - state.tokenPlan = token; - }, - SET_NAME: (state, name) => { - state.name = name; - }, - SET_NICKNAME: (state, nickname) => { - state.nickname = nickname; - }, - SET_ROLES: (state, roles) => { - state.roles = roles; - }, - SET_ID: (state, id) => { - state.id = id; - }, - SET_NATIONCODE: (state, nationcode) => { - state.nationcode = nationcode; - }, - SET_WXID: (state, wxId) => { - state.wxId = wxId; - }, - SET_WXUNIONID: (state, wxUnionId) => { - state.wxUnionId = wxUnionId; - } - }, + mutations: { + SET_TOKEN: (state, token) => { + state.token = token; + }, + SET_TOKENSCREEN: (state, token) => { + state.tokenScreen = token; + }, + SET_TOKENDESIGN: (state, token) => { + state.tokenDesign = token; + }, + SET_TOKENPLAN: (state, token) => { + state.tokenPlan = token; + }, + SET_NAME: (state, name) => { + state.name = name; + }, + SET_NICKNAME: (state, nickname) => { + state.nickname = nickname; + }, + SET_ROLES: (state, roles) => { + state.roles = roles; + }, + SET_ID: (state, id) => { + state.id = id; + }, + SET_NATIONCODE: (state, nationcode) => { + state.nationcode = nationcode; + }, + SET_WXID: (state, wxId) => { + state.wxId = wxId; + }, + SET_WXUNIONID: (state, wxUnionId) => { + state.wxUnionId = wxUnionId; + }, + SET_ACCOUNT: (state, account) => { + state.account = account; + } + }, - actions: { - // 登录 - Login({ commit }, userInfo) { - const username = userInfo.username.trim(); - const password = userInfo.password.trim(); - return new Promise((resolve, reject) => { - let params = null; - let execFc = null; - if (userInfo.type == 'dp') { - params = Object.assign({ account: username, password }, LoginParams.DaPing); - execFc = (token) => { - setScreenToken(token); - commit('SET_TOKENSCREEN', token); - const header = { group: '', 'X-Token': getScreenToken() }; - creatSubscribe(perpetualTopic, header); - }; - } else if (userInfo.type == 'plan') { - params = Object.assign({ account: username, password }, LoginParams.LianJiHua); - execFc = (token) => { - setPlanToken(token); - commit('SET_TOKENPLAN', token); - const header = { group: '', 'X-Token': getPlanToken() }; - creatSubscribe(perpetualTopic, header); - }; - } else { - params = Object.assign({ account: username, password }, LoginParams.LianKeTang); - execFc = (token) => { - setToken(token); - commit('SET_TOKEN', token); - const header = { group: '', 'X-Token': getToken() }; - creatSubscribe(perpetualTopic, header); - }; - } + actions: { + // 登录 + Login({ commit }, userInfo) { + const username = userInfo.username.trim(); + const password = userInfo.password.trim(); + return new Promise((resolve, reject) => { + let params = null; + let execFc = null; + if (userInfo.type == 'design') { + params = Object.assign({ account: username, password }, LoginParams.Design); + execFc = (token) => { + setDesignToken(token); + commit('SET_TOKENDESIGN', token); + const header = { group: '', 'X-Token': getDesignToken() }; + creatSubscribe(perpetualTopic, header); + creatSubscribe(commonTopic, header); + }; + } else { + params = Object.assign({ account: username, password }, LoginParams.LianKeTang); + execFc = (token) => { + setToken(token); + commit('SET_TOKEN', token); + const header = { group: '', 'X-Token': getToken() }; + creatSubscribe(perpetualTopic, header); + creatSubscribe(commonTopic, header); + }; + } - // 登录系统 - login(params).then(resp => { - execFc(resp.data); - resolve(); - }).catch(error => { reject(error); }); - }); - }, + // 登录系统 + login(params).then(resp => { + execFc(resp.data); + resolve(); + }).catch(error => { reject(error); }); + }); + }, - // 扫码登陆设置 - QrLoginSetting({ dispatch, commit }, token) { - return new Promise((resolve, reject) => { - // 设置user域token值 - commit(token.key, token.value); - const header = { group: '', 'X-Token': token.value }; - creatSubscribe(perpetualTopic, header); - // 获取用户参数 - dispatch('GetUserConfigInfo').then(response => { - resolve(response); - }).catch(error => { - reject(error); - }); - }); - }, + // 扫码登陆设置 + QrLoginSetting({ dispatch, commit }, token) { + return new Promise((resolve, reject) => { + // 设置user域token值 + commit(token.key, token.value); + const header = { group: '', 'X-Token': token.value }; + creatSubscribe(perpetualTopic, header); + creatSubscribe(commonTopic, header); + // 获取用户参数 + dispatch('GetUserConfigInfo').then(response => { + resolve(response); + }).catch(error => { + reject(error); + }); + }); + }, - // 获取用户信息 - GetInfo({ commit }, getTokenInfo) { - return new Promise((resolve, reject) => { - getInfo(getTokenInfo()).then(response => { - const user = response.data; - if (user.roles && user.roles.length > 0) { // 验证返回的roles是否是一个非空数组 - commit('SET_ROLES', user.roles); - } else { - reject('getInfo: roles must be a non-null array !'); - } - commit('SET_NAME', user.name); - commit('SET_NICKNAME', user.nickname); - commit('SET_ID', user.id); - commit('SET_NATIONCODE', user.nationcode); - commit('SET_WXID', user.wxId); - commit('SET_WXUNIONID', user.wxUnionId); - resolve(user); - }).catch(error => { - reject(error); - }); - }); - }, + // 获取用户信息 + GetInfo({ commit }, getTokenInfo) { + return new Promise((resolve, reject) => { + getInfo(getTokenInfo()).then(response => { + const user = response.data; + if (user.roles && user.roles.length > 0) { // 验证返回的roles是否是一个非空数组 + commit('SET_ROLES', user.roles); + } else { + reject('getInfo: roles must be a non-null array !'); + } + commit('SET_NAME', user.name); + commit('SET_NICKNAME', user.nickname); + commit('SET_ID', user.id); + commit('SET_NATIONCODE', user.nationcode); + commit('SET_WXID', user.wxId); + commit('SET_WXUNIONID', user.wxUnionId); + resolve(user); + }).catch(error => { + reject(error); + }); + }); + }, - // 获取用户参数 - GetUserConfigInfo() { - getUserConfigInfo().then(resp => { - if (resp.data) { - resp.data.forEach(elem => { - setSessionStorage(elem.code, elem.val); - }); - } - }); - }, + // 获取用户参数 + GetUserConfigInfo() { + getUserConfigInfo().then(resp => { + if (resp.data) { + resp.data.forEach(elem => { + setSessionStorage(elem.code, elem.val); + }); + } + }); + }, - // 前端登出 - FedLogOut({ commit }, clientId) { - return new Promise(resolve => { - if (clientId == LoginParams.DaPing.clientId) { - commit('SET_TOKENSCREEN', ''); - removeScreenToken(); - } else if (clientId == LoginParams.LianJiHua.clientId) { - commit('SET_TOKENPLAN', ''); - removePlanToken(); - } else { - commit('SET_TOKEN', ''); - removeToken(); - } + // 前端登出 + FedLogOut({ commit }, clientId) { + return new Promise(resolve => { + if (clientId == LoginParams.Design.clientId) { + commit('SET_TOKENDESIGN', ''); + removeDesignToken(); + } else { + commit('SET_TOKEN', ''); + removeToken(); + } - resolve(); - }); - }, + resolve(); + }); + }, - // 登出系统 - LogOut({ commit }) { - return new Promise((resolve, reject) => { - logout(handleToken()).then(() => { - commit('SET_TOKEN', ''); - commit('SET_ROLES', []); - commit('SET_ID', ''); - handleRemoveToken(); - resolve(); - }).catch(error => { - reject(error); - }); - }); - } - } + // 登出系统 + LogOut({ commit }) { + return new Promise((resolve, reject) => { + logout(handleToken()).then(() => { + commit('SET_TOKEN', ''); + commit('SET_ROLES', []); + commit('SET_ID', ''); + Cookies.remove('UserDesignName'); + Cookies.remove('UserDesignToken'); + Cookies.remove('UserName'); + Cookies.remove('UserToken'); + handleRemoveToken(); + resolve(); + }).catch(error => { + reject(error); + }); + }); + }, + + SetAccount({ commit }, account) { + commit('SET_ACCOUNT', account); + } + } }; export default user; diff --git a/src/styles/element-ui.scss b/src/styles/element-ui.scss index 6da125469..b477f34de 100644 --- a/src/styles/element-ui.scss +++ b/src/styles/element-ui.scss @@ -60,3 +60,13 @@ .el-radio{ margin-right: 20px; } + +.el-tooltip__popper{max-width:40%;line-height:160%;} + +.el-notification { + white-space:pre-wrap; + width: 505.5px; +} +.el-notification__group{ + width: 90%; +} diff --git a/src/styles/index.scss b/src/styles/index.scss index 2263d21d4..d06626a47 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -59,10 +59,6 @@ div:focus { } } -//main-container全局样式 -.app-main{ - min-height: 100% -} // main-container global css .app-container { padding: 20px; diff --git a/src/utils/auth.js b/src/utils/auth.js index 0e120f462..9b5a9863d 100644 --- a/src/utils/auth.js +++ b/src/utils/auth.js @@ -2,86 +2,76 @@ import SessionStorage from 'sessionstorage'; import { LoginParams } from '@/utils/login'; const TokenKey = 'Admin-Token'; - -const TokenScreenKey = 'Screen-Token'; - -const TokenPlanKey = 'Plan-Token'; +const TokenDesignKey = 'Design-Token'; // 设置教学,实训,仿真系统token export function getToken() { - return SessionStorage.getItem(TokenKey); + return SessionStorage.getItem(TokenKey); } export function setToken(token) { - return SessionStorage.setItem(TokenKey, token); + return SessionStorage.setItem(TokenKey, token); } export function removeToken() { - return SessionStorage.removeItem(TokenKey); -} -// 设置大屏token -export function getScreenToken() { - return SessionStorage.getItem(TokenScreenKey); -} -export function setScreenToken(token) { - return SessionStorage.setItem(TokenScreenKey, token); -} -export function removeScreenToken() { - return SessionStorage.removeItem(TokenScreenKey); + return SessionStorage.removeItem(TokenKey); } -// 设置琏计划token -export function getPlanToken() { - return SessionStorage.getItem(TokenPlanKey); +// 设置城市轨道交通设计平台token +export function getDesignToken() { + return SessionStorage.getItem(TokenDesignKey); } -export function setPlanToken(token) { - return SessionStorage.setItem(TokenPlanKey, token); +export function setDesignToken(token) { + return SessionStorage.setItem(TokenDesignKey, token); } -export function removePlanToken() { - return SessionStorage.removeItem(TokenPlanKey); +export function removeDesignToken() { + return SessionStorage.removeItem(TokenDesignKey); } + // 操作sessionStorage export function getSessionStorage(key) { - return SessionStorage.getItem(key); + return SessionStorage.getItem(key); } export function setSessionStorage(key, value) { - return SessionStorage.setItem(key, value); + return SessionStorage.setItem(key, value); } export function removeSessionStorage(key) { - return SessionStorage.removeItem(key); + return SessionStorage.removeItem(key); } // 根据路径判断获取token export function handleToken() { - const path = window.location.href; - if (path.includes('/dp/') || path.includes('/display/dp')) { - return getScreenToken(); - } else if (path.includes('/plan') || path.includes('/display/plan')) { - return getPlanToken(); - } else { - return getToken(); - } + const path = window.location.href; + if (path.includes('/design') || path.includes('/scriptDisplay') || path.includes('/publish') || path.includes('/orderauthor') || path.includes('/system') || path.includes('/display/manage') || path.includes('/apply/')) { + return getDesignToken(); + } else if (path.includes('/plan') || path.includes('/display/plan')) { + return getDesignToken() || getToken(); + } else { + return getToken(); + } } // 根据路径清除token export function handleRemoveToken() { - const path = window.location.href; - if (path.includes('/dp/') || path.includes('/display/dp')) { - return removeScreenToken(); - } else if (path.includes('/plan') || path.includes('/display/plan')) { - return removePlanToken(); - } else { - return removeToken(); - } + const path = window.location.href; + if (path.includes('/design') || path.includes('/scriptDisplay') || path.includes('/plan') || path.includes('/publish') || path.includes('/orderauthor') || path.includes('/system') || path.includes('/display/plan') || path.includes('/display/manage') || path.includes('/apply/')) { + return removeDesignToken(); + } else { + return removeToken(); + } } // 根据route路径判断系统类型 export function gainClientId() { - const path = window.location.href; - let clientId = null; - if (path.includes('/dp/') || path.includes('/display/dp')) { - clientId = LoginParams.DaPing.clientId; - } else if (path.includes('/plan') || path.includes('/display/plan')) { - clientId = LoginParams.LianJiHua.clientId; - } + const path = window.location.href; + let clientId = null; + if (path.includes('/dp/') || path.includes('/display/dp')) { + clientId = LoginParams.DaPing.clientId; + } + // else if (path.includes('/plan') || path.includes('/display/plan')) { + // clientId = LoginParams.LianJiHua.clientId; + // } + else if (path.includes('/design') || path.includes('/scriptDisplay') || path.includes('/plan') || path.includes('/publish') || path.includes('/orderauthor') || path.includes('/system') || path.includes('/display/plan') || path.includes('/display/manage') || path.includes('/apply/')) { + clientId = LoginParams.Design.clientId; + } - return clientId; + return clientId; } diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index f997f31f4..55be58dc3 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -1,14 +1,15 @@ export function getBaseUrl() { - let BASE_API; - if (process.env.NODE_ENV === 'development') { - // BASE_API = 'https://joylink.club/jlcloud'; - // BASE_API = 'https://test.joylink.club/jlcloud'; - BASE_API = 'http://192.168.3.5:9000'; // 袁琪 - // BASE_API = 'http://192.168.3.6:9000'; // 旭强 - // BASE_API = 'http://192.168.3.41:9000'; // 王兴杰 - } else { - BASE_API = process.env.VUE_APP_BASE_API; - } - return BASE_API; + let BASE_API; + if (process.env.NODE_ENV === 'development') { + // BASE_API = 'https://joylink.club/jlcloud'; + BASE_API = 'https://test.joylink.club/jlcloud'; + // BASE_API = 'http://192.168.3.5:9000'; // 袁琪 + // BASE_API = 'http://192.168.3.6:9000'; // 旭强 + // BASE_API = 'http://192.168.3.41:9000'; // 杜闪 + // BASE_API = 'http://192.168.3.82:9000'; // 杜康 + } else { + BASE_API = process.env.VUE_APP_BASE_API; + } + return BASE_API; } diff --git a/src/utils/date.js b/src/utils/date.js index 6d1b82592..5be0211e3 100644 --- a/src/utils/date.js +++ b/src/utils/date.js @@ -1,40 +1,40 @@ export function now() { - var d = new Date(); - var year = d.getFullYear(); - var month = change(d.getMonth() + 1); - var day = change(d.getDate()); - var hour = change(d.getHours()); - var minute = change(d.getMinutes()); - var second = change(d.getSeconds()); - function change(t) { - if (t < 10) { - return '0' + t; - } else { - return t; - } - } - return year + '-' + month + '-' + day + ' ' + hour + ':' + minute + ':' + second; + var d = new Date(); + var year = d.getFullYear(); + var month = change(d.getMonth() + 1); + var day = change(d.getDate()); + var hour = change(d.getHours()); + var minute = change(d.getMinutes()); + var second = change(d.getSeconds()); + function change(t) { + if (t < 10) { + return '0' + t; + } else { + return t; + } + } + return year + '-' + month + '-' + day + ' ' + hour + ':' + minute + ':' + second; } export function timeFormat(usedTime) { - let hour = 0; let minute = 0; let second = 0; let sumTime = usedTime; - if (sumTime) { - if (sumTime >= 3600) { - hour = Math.floor(sumTime / 3600) % 24; - sumTime = (sumTime % 3600); - } - if (sumTime >= 60) { - minute = Math.floor(sumTime / 60); - sumTime = sumTime % 60; - } - second = Math.floor(sumTime); - } - function getTimeStr(val) { - return val < 10 ? '0' + val : val; - } - return getTimeStr(hour) + ':' + getTimeStr(minute) + ':' + getTimeStr(second); + let hour = 0; let minute = 0; let second = 0; let sumTime = usedTime; + if (sumTime) { + if (sumTime >= 3600) { + hour = Math.floor(sumTime / 3600) % 24; + sumTime = (sumTime % 3600); + } + if (sumTime >= 60) { + minute = Math.floor(sumTime / 60); + sumTime = sumTime % 60; + } + second = Math.floor(sumTime); + } + function getTimeStr(val) { + return val < 10 ? '0' + val : val; + } + return getTimeStr(hour) + ':' + getTimeStr(minute) + ':' + getTimeStr(second); } export function prefixIntrger(num, length) { - return (Array(length).join('0') + num).slice(-length); + return (Array(length).join('0') + num).slice(-length); } diff --git a/src/utils/loaddata.js b/src/utils/loaddata.js index 81ce9aad7..cfa2f3d98 100644 --- a/src/utils/loaddata.js +++ b/src/utils/loaddata.js @@ -1,66 +1,36 @@ import store from '@/store'; -import { getPublishMapVersion, getPublishMapDetail, getPublishMapVersionById, getPublishMapDetailById} from '@/api/jmap/map'; +import { getPublishMapVersionById, getPublishMapDetailById} from '@/api/jmap/map'; // 获取地图版本数据,和store里面的map版本做比较,如果不同 // 获取发布的地图数据 // 先设置地图数据 // 清除列车数据 -export function loadMapData(skinCode) { - return new Promise((resolve, reject) => { - getPublishMapVersion(skinCode).then(resp => { - var version = resp.data; - var mapData = store.state.map.mapList[`mapDate_${skinCode}`]; - if (mapData && mapData.version == version) { - store.dispatch('map/setMapData', mapData).then(() => { - store.dispatch('map/clearJlmapTrainView').then(() => { - resolve(); - }); - }); - } else { - getPublishMapDetail(skinCode).then(res => { - mapData = res.data; - store.dispatch('map/setMapDataList', mapData); - store.dispatch('map/setMapData', mapData).then(() => { - store.dispatch('map/clearJlmapTrainView').then(() => { - resolve(); - }); - }); - }).catch(error => { - reject(error); - }); - } - }).catch(error => { - reject(error); - }); - }); -} - export function loadMapDataById(mapId) { - return new Promise((resolve, reject) => { - getPublishMapVersionById(mapId).then(resp => { - var version = resp.data; - var mapData = store.state.map.mapIdList[`mapDate_${mapId}`]; - if (mapData && mapData.version == version) { - store.dispatch('map/setMapData', mapData).then(() => { - store.dispatch('map/clearJlmapTrainView').then(() => { - resolve(); - }); - }); - } else { - getPublishMapDetailById(mapId).then(res => { - mapData = res.data; - store.dispatch('map/setMapDataIdList', {mapData, mapId}); - store.dispatch('map/setMapData', mapData).then(() => { - store.dispatch('map/clearJlmapTrainView').then(() => { - resolve(); - }); - }); - }).catch(error => { - reject(error); - }); - } - }).catch(error => { - reject(error); - }); - }); + return new Promise((resolve, reject) => { + getPublishMapVersionById(mapId).then(resp => { + var version = resp.data; + var mapData = store.state.map.mapIdList[`mapDate_${mapId}`]; + if (mapData && mapData.version == version) { + store.dispatch('map/setMapData', mapData).then(() => { + store.dispatch('map/clearJlmapTrainView').then(() => { + resolve(); + }); + }); + } else { + getPublishMapDetailById(mapId).then(res => { + mapData = res.data; + store.dispatch('map/setMapDataIdList', {mapData, mapId}); + store.dispatch('map/setMapData', mapData).then(() => { + store.dispatch('map/clearJlmapTrainView').then(() => { + resolve(); + }); + }); + }).catch(error => { + reject(error); + }); + } + }).catch(error => { + reject(error); + }); + }); } diff --git a/src/utils/login.js b/src/utils/login.js index cbb2a2270..ed8b3f9f5 100644 --- a/src/utils/login.js +++ b/src/utils/login.js @@ -1,8 +1,9 @@ // 登陆配置参数 export const LoginParams = { - LianKeTang: { clientId: '1', secret: 'joylink' }, // "琏课堂" - DaPing: { clientId: '2', secret: 'bigscreen' }, // "大屏系统" - LianJiHua: { clientId: '3', secret: 'linkplan' }, // "琏计划" - Assistant: { clientId: '4', secret: 'linkassistant' } // "琏课堂助手" + LianKeTang: { clientId: '1', secret: 'joylink' }, // "城市轨道交通实训平台" + // DaPing: { clientId: '2', secret: 'bigscreen' }, // "大屏系统" + // LianJiHua: { clientId: '3', secret: 'linkplan' }, // "琏计划" + Assistant: { clientId: '4', secret: 'linkassistant' }, // "琏课堂助手" + Design: { clientId: '2', secret: 'design' } // "城市轨道交通设计平台" }; diff --git a/src/utils/mapList.js b/src/utils/mapList.js new file mode 100644 index 000000000..8f51c9758 --- /dev/null +++ b/src/utils/mapList.js @@ -0,0 +1,14 @@ +import { getSessionStorage } from '@/utils/auth'; +import { listPublishMap, getMapListByProjectCode } from '@/api/jmap/map'; +import { ProjectCode } from '@/scripts/ConstDic'; + +export async function getMapListByProject() { + const project = getSessionStorage('project'); + let mapList = []; + if (project.endsWith('xty')) { + mapList = await getMapListByProjectCode(ProjectCode[project]); + } else { + mapList = await listPublishMap(); + } + return mapList; +} diff --git a/src/utils/sock.js b/src/utils/sock.js index f7654975c..f76f0548c 100644 --- a/src/utils/sock.js +++ b/src/utils/sock.js @@ -13,233 +13,236 @@ const websocketUrl = `${getBaseUrl()}/joylink-websocket?token=`; // const websocketUrl = `http://192.168.3.6:9000/joylink-websocket?token=`; var StompClient = function (headers) { - this.url = websocketUrl + handleToken(); - this.headers = headers || {}; - this.connect(); + this.url = websocketUrl + handleToken(); + this.headers = headers || {}; + this.connect(); }; StompClient.prototype = { - socket: null, + socket: null, - clientIns: null, + clientIns: null, - subscribeMap: null, + subscribeMap: null, - url: '', + url: '', - status: false, + status: false, - sockStatus: 0, + sockStatus: 0, - headers: { - // 'X-Token': handleToken() - }, + headers: { + // 'X-Token': handleToken() + }, - count: 0, + count: 0, - topic: '', + topic: '', - onmessage: null, + onmessage: null, - checkTimer: null, + checkTimer: null, - // 连接服务端 - connect() { - return new Promise((resolve, reject) => { - try { - // 断开已有连接 - if (this.clientIns && this.clientIns.connected) { - this.clientIns.disconnect(); - this.clientIns = null; - } + // 连接服务端 + connect() { + return new Promise((resolve, reject) => { + try { + // 断开已有连接 + if (this.clientIns && this.clientIns.connected) { + this.clientIns.disconnect(); + this.clientIns = null; + } - // 建立连接对象(还未发起连接) - this.socket = new SockJS(websocketUrl + handleToken()); + // 建立连接对象(还未发起连接) + this.socket = new SockJS(websocketUrl + handleToken()); - // 获取 STOMP 子协议的客户端对象 - this.clientIns = Stomp.over(this.socket); + // 获取 STOMP 子协议的客户端对象 + this.clientIns = Stomp.over(this.socket); - this.closeStompDebug(); + this.closeStompDebug(); - // 向服务器发起websocket连接并发送CONNECT帧 - this.clientIns.connect({ 'X-Token': handleToken() }, () => { - console.info('连接成功.'); - this.count = 0; - this.status = true; + // 向服务器发起websocket连接并发送CONNECT帧 + this.clientIns.connect({ 'X-Token': handleToken() }, () => { + console.info('连接成功.'); + this.count = 0; + this.status = true; - // 恢复订阅 - if (this.topic && this.onmessage) { - this.unsubscribe(this.topic); - this.subscribe(this.topic, this.onmessage, this.headers); - } + // 恢复订阅 + if (this.topic && this.onmessage) { + this.unsubscribe(this.topic); + this.subscribe(this.topic, this.onmessage, this.headers); + } - // 检测sock是否断开 - if (!this.clientIns.ws.onclose) { - this.clientIns.ws.onclose = () => { - checkLoginLine().then(() => { - this.status = false; - this.count++; - this.reconnect(this.count); - }).catch((err) => { - this.logOut(err); - }); - }; - } + // 检测sock是否断开 + if (!this.clientIns.ws.onclose) { + this.clientIns.ws.onclose = () => { + checkLoginLine().then(() => { + this.status = false; + this.count++; + this.reconnect(this.count); + }).catch((err) => { + this.logOut(err); + }); + }; + } - // 定时器检测网络 - if (!this.checkTimer) { - this.checkTimer = setInterval(() => { - if (!this.status || !this.clientIns.ws.onclose) { - // 发送检测心跳,如果失败则在如下情况时需要断开WebSocket; - // 40003/40004/40005: 登陆过期; - // 50008: 非法的token; - // 50012: 其他客户端登录了; - // 50014: Token 过期了; - checkLoginLine().then(() => { - // 会有连接延时,需要多次判断 - // 如果socket或着clientIns断开,则重新连接 - if (!this.status || !this.clientIns.ws.onclose) { - this.count++; - this.reconnect(this.count); - } - }).catch((err) => { - this.logOut(err); - }); - } - }, 30000); - } - resolve(this); - }, () => { - if (this.checkTimer) { - clearInterval(this.checkTimer); - this.checkTimer = null; - } - checkLoginLine().then(() => { - this.connect(); - }).catch((err) => { - if (err.code == 40003 || err.code == 40004 || err.code == 40005 || err.code == 50012) { - this.logOut(); - } - if (err.code == 50008 || err.code == 50014) { - this.url = websocketUrl + handleToken(); - this.connect(); - } - }); - }); - } catch (err) { - reject(err); - } - }); + // 定时器检测网络 + if (!this.checkTimer) { + this.checkTimer = setInterval(() => { + if (!this.status || !this.clientIns.ws.onclose) { + // 发送检测心跳,如果失败则在如下情况时需要断开WebSocket; + // 40003/40004/40005: 登陆过期; + // 50008: 非法的token; + // 50012: 其他客户端登录了; + // 50014: Token 过期了; + checkLoginLine().then(() => { + // 会有连接延时,需要多次判断 + // 如果socket或着clientIns断开,则重新连接 + if (!this.status || !this.clientIns.ws.onclose) { + this.count++; + this.reconnect(this.count); + } + }).catch((err) => { + this.logOut(err); + }); + } + }, 30000); + } + resolve(this); + }, () => { + if (this.checkTimer) { + clearInterval(this.checkTimer); + this.checkTimer = null; + } + checkLoginLine().then(() => { + this.connect(); + }).catch((err) => { + if (err.code == 40003 || err.code == 40004 || err.code == 40005 || err.code == 50012) { + this.logOut(); + } + if (err.code == 50008 || err.code == 50014) { + this.url = websocketUrl + handleToken(); + this.connect(); + } + }); + }); + } catch (err) { + reject(err); + } + }); - }, - logOut(err) { - if (err.code == 40003 || err.code == 40004 || err.code == 40005 || err.code == 50012) { - MessageBox.confirm('你已被登出,请重新登录', '确定登出', { - confirmButtonText: '重新登录', - showCancelButton: false, - type: 'warning' - }).then(() => { - store.dispatch('FedLogOut', gainClientId()).then(() => { - location.reload();// 为了重新实例化vue-router对象 避免bug - }); - }); - } - if (err.code == 50008 || err.code == 50014) { - this.url = websocketUrl + handleToken(); - this.status = false; - this.count++; - this.reconnect(this.count); - } - }, - // 恢复链接 - reconnect(count) { - console.info(`尝试第${count || 1}次连接.`); - this.connect().then(() => { }).catch(() => { - this.count++; - this.reconnect(this.count); - }); - }, + }, + logOut(err) { + if (err.code == 40003 || err.code == 40004 || err.code == 40005 || err.code == 50012) { + MessageBox.confirm('你已被登出,请重新登录', '确定登出', { + confirmButtonText: '重新登录', + showCancelButton: false, + type: 'warning' + }).then(() => { + store.dispatch('FedLogOut', gainClientId()).then(() => { + location.reload();// 为了重新实例化vue-router对象 避免bug + }); + }); + } + if (err.code == 50008 || err.code == 50014) { + this.url = websocketUrl + handleToken(); + this.status = false; + this.count++; + this.reconnect(this.count); + } + }, + // 恢复链接 + reconnect(count) { + console.info(`尝试第${count || 1}次连接.`); + this.connect().then(() => { }).catch(() => { + this.count++; + this.reconnect(this.count); + }); + }, - closeStompDebug() { - if (this.clientIns) { - this.clientIns.debug = undefined; - if (isDev) { - this.clientIns.debug = function (message) { - console.debug(message); - }; - } - } - }, + closeStompDebug() { + if (this.clientIns) { + this.clientIns.debug = undefined; + if (isDev) { + this.clientIns.debug = function (message) { + console.debug(message); + }; + } + } + }, - // 订阅指定的topic - subscribe(topic, onmessage, headers) { - this.topic = topic; - this.onmessage = onmessage; - this.headers = headers; - if (this.status) { - if (!this.subscribeMap) { - this.subscribeMap = new Map(); - } + // 订阅指定的topic + subscribe(topic, onmessage, headers) { + this.topic = topic; + this.onmessage = onmessage; + this.headers = headers; + if (this.status) { + if (!this.subscribeMap) { + this.subscribeMap = new Map(); + } - try { - var subscription = this.subscribeMap.get(topic); - if (!subscription) { - subscription = this.clientIns.subscribe(topic, onmessage, headers); // 接收消息通过 subscribe() 方法实现 - this.subscribeMap.set(topic, subscription); - } - } catch (err) { - setTimeout(() => { - this.subscribe(topic, onmessage, headers); - }, 300); - } + try { + var subscription = this.subscribeMap.get(topic); + if (!subscription) { + subscription = this.clientIns.subscribe(topic, onmessage, headers); // 接收消息通过 subscribe() 方法实现 + this.subscribeMap.set(topic, subscription); + } + } catch (err) { + setTimeout(() => { + this.subscribe(topic, onmessage, headers); + }, 300); + } - } else { - setTimeout(() => { - this.subscribe(topic, onmessage, headers); - }, 300); - } - }, + } else { + setTimeout(() => { + this.subscribe(topic, onmessage, headers); + }, 300); + } + }, - unsubscribe(topic) { - if (this.subscribeMap) { - const subscription = this.subscribeMap.get(topic); - if (subscription) { - subscription.unsubscribe(); - this.subscribeMap.delete(topic); - console.log('取消订阅'); - } - } - }, + unsubscribe(topic) { + if (this.subscribeMap) { + const subscription = this.subscribeMap.get(topic); + if (subscription) { + subscription.unsubscribe(); + this.subscribeMap.delete(topic); + console.log('取消订阅'); + } + } + }, - // 发送消息 - send(url, msg) { - if (this.status) { - try { - this.clientIns.send(url, {}, msg); - } catch (err) { - this.status = false; - this.send(url, msg); - } - } else { - setTimeout(() => { - this.send(url, msg); - }, 300); - } - }, + // 发送消息 + send(url, msg) { + if (this.status) { + if (msg) { + msg = JSON.stringify(msg); + } + try { + this.clientIns.send(url, {}, msg); + } catch (err) { + this.status = false; + this.send(url, msg); + } + } else { + setTimeout(() => { + this.send(url, msg); + }, 300); + } + }, - disconnect() { - if (this.checkTimer) { - clearInterval(this.checkTimer); - this.checkTimer = null; - } + disconnect() { + if (this.checkTimer) { + clearInterval(this.checkTimer); + this.checkTimer = null; + } - if (this.clientIns && this.clientIns.connected) { - this.clientIns.disconnect(); - this.clientIns = null; - } - this.status = false; - console.log('断开连接'); - } + if (this.clientIns && this.clientIns.connected) { + this.clientIns.disconnect(); + this.clientIns = null; + } + this.status = false; + console.log('断开连接'); + } }; diff --git a/src/utils/stomp.js b/src/utils/stomp.js index ee331ff9f..cd6fd5cef 100644 --- a/src/utils/stomp.js +++ b/src/utils/stomp.js @@ -6,32 +6,34 @@ export const perpetualTopic = '/user/topic/message'; // 公用topic export const displayTopic = '/user/queue/simulation'; // 其他仿真topic export const screenTopic = '/user/queue/simulation/bigScreen'; // 大屏仿真 export const planTopic = '/user/queue/simulation/plan'; // 测试运行仿真 +export const commonTopic = '/topic/message'; // 公共topic(不区分用户) +export const designDisplayTopic = '/user/queue/simulation/design'; // 设计平台仿真订阅路径 // 建立连接并订阅地址 export function creatSubscribe(topic, header) { - try { - if (!Vue.prototype.$stomp) { - Vue.prototype.$stomp = new StompClient(); - } - Vue.prototype.$stomp.subscribe(topic, callback, header); - } catch (error) { - console.error('websocket订阅失败'); - } + try { + if (!Vue.prototype.$stomp) { + Vue.prototype.$stomp = new StompClient(); + } + Vue.prototype.$stomp.subscribe(topic, callback, header); + } catch (error) { + console.error('websocket订阅失败'); + } } // 回调函数 function callback(Response) { - if (store) { - var data = JSON.parse(Response.body); - store.dispatch('socket/setStomp', data); - } else { - callback(Response); - } + if (store) { + var data = JSON.parse(Response.body); + store.dispatch('socket/setStomp', data); + } else { + callback(Response); + } } // 删除订阅路径 export function clearSubscribe(topic) { - if (Vue.prototype.$stomp) { - Vue.prototype.$stomp.unsubscribe(topic); - } + if (Vue.prototype.$stomp) { + Vue.prototype.$stomp.unsubscribe(topic); + } } diff --git a/src/views/approval/lesson/detail.vue b/src/views/approval/lesson/detail.vue new file mode 100644 index 000000000..3ffc7c72c --- /dev/null +++ b/src/views/approval/lesson/detail.vue @@ -0,0 +1,90 @@ + + + diff --git a/src/views/approval/lesson/index.vue b/src/views/approval/lesson/index.vue new file mode 100644 index 000000000..6e4c7638a --- /dev/null +++ b/src/views/approval/lesson/index.vue @@ -0,0 +1,197 @@ + + + + diff --git a/src/views/approval/runPlan/index.vue b/src/views/approval/runPlan/index.vue new file mode 100644 index 000000000..352a185ab --- /dev/null +++ b/src/views/approval/runPlan/index.vue @@ -0,0 +1,169 @@ + + diff --git a/src/views/approval/runPlan/operate.vue b/src/views/approval/runPlan/operate.vue new file mode 100644 index 000000000..6f92f43e9 --- /dev/null +++ b/src/views/approval/runPlan/operate.vue @@ -0,0 +1,96 @@ + + + diff --git a/src/views/approval/script/index.vue b/src/views/approval/script/index.vue new file mode 100644 index 000000000..51148ab0a --- /dev/null +++ b/src/views/approval/script/index.vue @@ -0,0 +1,171 @@ + + + diff --git a/src/views/approval/script/operate.vue b/src/views/approval/script/operate.vue new file mode 100644 index 000000000..ec4398641 --- /dev/null +++ b/src/views/approval/script/operate.vue @@ -0,0 +1,70 @@ + + + diff --git a/src/views/components/filterCity/index.vue b/src/views/components/filterCity/index.vue index 7272b10f5..9ec73b8bc 100644 --- a/src/views/components/filterCity/index.vue +++ b/src/views/components/filterCity/index.vue @@ -1,16 +1,6 @@