diff --git a/src/api/management/exam.js b/src/api/management/exam.js index b22839e9d..beca0ffee 100644 --- a/src/api/management/exam.js +++ b/src/api/management/exam.js @@ -2,86 +2,86 @@ import request from '@/utils/request'; /** 创建对应课程考题 */ 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/i18n/langs/en/publish.js b/src/i18n/langs/en/publish.js index b5772882e..3a40da98d 100644 --- a/src/i18n/langs/en/publish.js +++ b/src/i18n/langs/en/publish.js @@ -113,5 +113,7 @@ export default { selectTestType: 'Please select test type', modifyRules: 'Modify Rules', enterRunPlanName: 'Please enter the name of the diagram', - setTheProject: 'Set the project' + setTheProject: 'Set the project', + whetherItBelongsToTheProject: 'Whether it belongs to the project', + belongsProject: 'Belongs project' }; diff --git a/src/i18n/langs/zh/publish.js b/src/i18n/langs/zh/publish.js index 3b06ed541..57e213ee0 100644 --- a/src/i18n/langs/zh/publish.js +++ b/src/i18n/langs/zh/publish.js @@ -117,5 +117,7 @@ export default { modifyRules: '修改规则', enterRunPlanName: '请输入运行图名称', // refreshFailed 刷新失败 - setTheProject: '设置归属项目' + setTheProject: '设置归属项目', + whetherItBelongsToTheProject: '是否归属项目', + belongsProject: '归属项目' }; diff --git a/src/jlmap3d/jl3ddrive/moveupdate/DrivingConnect.js b/src/jlmap3d/jl3ddrive/moveupdate/DrivingConnect.js index c7412d4b9..c0e607333 100644 --- a/src/jlmap3d/jl3ddrive/moveupdate/DrivingConnect.js +++ b/src/jlmap3d/jl3ddrive/moveupdate/DrivingConnect.js @@ -309,7 +309,7 @@ export function Jl3dDriving(updatemmi,sound,translation) { if (trainlisttest.list[code].dispose != data.body[i].dispose && data.body[i].dispose == false) { if (rails.linkrail[data.body[i].linkCode]) { - // console.log(trainlisttest.group); + console.log(trainlisttest.group); if(trainlisttest.group.children.length<1){ trainlisttest.group.add(trainlisttest.list[code]); } @@ -421,41 +421,7 @@ export function Jl3dDriving(updatemmi,sound,translation) { } } if (trainlisttest.list[code].status != data.body[i].directionType) { - if (data.body[i].directionType == '02') { // 向右 - trainlisttest.list[code].progress = 0; - const rotaposx = trainlisttest.list[code].children[5].matrixWorld.elements[12]; - const rotaposz = trainlisttest.list[code].children[0].matrixWorld.elements[14]; - trainlisttest.list[code].rotation.y = 0; - trainlisttest.list[code].position.x = rotaposx; - for (let tl=0; tl<6; tl++) { - trainlisttest.list[code].children[tl].position.z = rotaposz; - } - - trainlisttest.list[code].progress = (rotaposx-rails.linkrail[data.body[i].linkCode].lp.x)/rails.linkrail[data.body[i].linkCode].lengthfact; - trainlisttest.list[code].status = '02'; - trainlisttest.list[code].curve = rails.linkrail[data.body[i].linkCode].lineleft; - trainlisttest.list[code].nextcurve = null; - - trainlisttest.list[code].len = rails.linkrail[data.body[i].linkCode].lengthfact; - - } else if (data.body[i].directionType == '03') { // 向左 - trainlisttest.list[code].progress = 0; - const rotaposx = trainlisttest.list[code].children[5].matrixWorld.elements[12]; - const rotaposz = Math.abs(trainlisttest.list[code].children[0].matrixWorld.elements[14]); - trainlisttest.list[code].rotation.y = Math.PI; - trainlisttest.list[code].position.x = rotaposx; - for (let tl=0; tl<6; tl++) { - trainlisttest.list[code].children[tl].position.z = -rotaposz; - } - trainlisttest.list[code].progress = 1-(rotaposx-rails.linkrail[data.body[i].linkCode].lp.x)/rails.linkrail[data.body[i].linkCode].lengthfact; - trainlisttest.list[code].status = '03'; - trainlisttest.list[code].curve = rails.linkrail[data.body[i].linkCode].lineright; - trainlisttest.list[code].nextcurve = null; - - trainlisttest.list[code].len = rails.linkrail[data.body[i].linkCode].lengthfact; - - } } diff --git a/src/jlmap3d/jl3dsimulation/jlmap3d.js b/src/jlmap3d/jl3dsimulation/jlmap3d.js index b9a419e2a..dc3d834a7 100644 --- a/src/jlmap3d/jl3dsimulation/jlmap3d.js +++ b/src/jlmap3d/jl3dsimulation/jlmap3d.js @@ -90,8 +90,8 @@ export function JLmap3d(dom, data,skinCode,storemod) { ModelLoad(data,scope,netdata.data,mapdata,camera,controls,scene,storemod); }); // - let stats = new Stats(); - dom.appendChild( stats.dom ); + // let stats = new Stats(); + // dom.appendChild( stats.dom ); //开启渲染 animate(); startWorker(); @@ -108,7 +108,7 @@ export function JLmap3d(dom, data,skinCode,storemod) { //根据相机渲染场景 renderer.render(scene,camera); //检测动画构造器播放动画 - stats.update(); + // stats.update(); } } diff --git a/src/router/index.js b/src/router/index.js index 0ed5dfb9e..2d88cf724 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -53,9 +53,6 @@ import ExamHome from '@/views/exam/index'; import ExamCourseDetail from '@/views/exam/detail/courseDetail'; import ExamResult from '@/views/exam/result'; -import PublishExamRule from '@/views/publish/examRule/index'; -import PublishExamRuleDraft from '@/views/publish/examRule/draft/index'; - import DemonstrationDetail from '@/views/demonstration/detail/index'; import PlanMonitorEditTool from '@/views/planMonitor/editTool/index'; @@ -79,12 +76,13 @@ import PublishMap from '@/views/publish/publishMap/index'; import PublishMapDetail from '@/views/publish/publishMap/list'; // 发布历史 import ProductStatus from '@/views/publish/productStatus/index'; import PublishLesson from '@/views/publish/publishLesson/index'; - +import RunPlanTemplate from '@/views/publish/runPlanTemplate/index'; 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 RunplanView from '@/views/publish/runPlanView/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'; @@ -334,7 +332,8 @@ export const asyncRouter = [ hidden: true }, { - path: 'lesson/home/:mapId/:skinCode', + path: 'lesson/home/:mapId', + // /:skinCode component: LessonHome, hidden: true }, @@ -647,6 +646,11 @@ export const asyncRouter = [ i18n: 'router.runPlanEveryDayManage' } }, + { + path: 'runPlan/view/:mode', + component: RunplanView, + hidden: true + }, { path: 'examRule/manage', component: PublishExamRule, @@ -663,11 +667,6 @@ export const asyncRouter = [ path: 'runPlan/common/:mode', component: RunPlanCommonDraft, hidden: true - }, - { - path: 'runPlan/view/:mode', - component: RunplanView, - hidden: true } ] }, diff --git a/src/scripts/OperationConfig.js b/src/scripts/OperationConfig.js index 670f48d22..d72385bbf 100644 --- a/src/scripts/OperationConfig.js +++ b/src/scripts/OperationConfig.js @@ -89,7 +89,7 @@ export const OperationList = { trainingName: '站台扣车({10}-{12}站台)', trainingRemark: '设置扣车功能', trainingType: '05', - productTypes: ['01,02'], + productTypes: ['01', '02'], stepVOList: [ { deviceType: '06', orderNum: 1, operateCode: '504', tip: '鼠标右键菜单选择【扣车】' }, { deviceType: '06', orderNum: 2, operateCode: '504', tip: '鼠标左键点击【确定】按钮' } @@ -103,7 +103,7 @@ export const OperationList = { trainingName: '站台取消扣车({10}-{12}站台)', trainingRemark: '设置取消扣车功能', trainingType: '05', - productTypes: ['01,02'], + productTypes: ['01', '02'], stepVOList: [ { deviceType: '06', orderNum: 1, operateCode: '505', tip: '鼠标右键菜单选择【取消扣车】' }, { deviceType: '06', orderNum: 2, operateCode: '505', tip: '鼠标左键点击【确定】按钮' } @@ -160,7 +160,7 @@ export const OperationList = { trainingName: '站台跳停({10}-{12}站台)', trainingRemark: '设置跳停功能', trainingType: '05', - productTypes: ['01,02'], + productTypes: ['01', '02'], stepVOList: [ { deviceType: '06', orderNum: 1, operateCode: '502', tip: '鼠标右键菜单选择【跳停】' }, { deviceType: '06', orderNum: 2, operateCode: '502', tip: '鼠标左键点击【确定】按钮', val: '{11}' } @@ -174,7 +174,7 @@ export const OperationList = { trainingName: '取消跳停({10}-{12}站台)', trainingRemark: '设置取消跳停功能', trainingType: '05', - productTypes: ['01,02'], + productTypes: ['01', '02'], stepVOList: [ { deviceType: '06', orderNum: 1, operateCode: '503', tip: '鼠标右键菜单选择【取消跳停】' }, { deviceType: '06', orderNum: 2, operateCode: '503', tip: '鼠标左键点击【确定】按钮', val: '{11}' } @@ -188,7 +188,7 @@ export const OperationList = { trainingName: '查询站台状态({10}-{12}站台)', trainingRemark: '查询站台状态功能', trainingType: '05', - productTypes: ['01,02'], + productTypes: ['01', '02'], stepVOList: [ { deviceType: '06', orderNum: 1, operateCode: '507', tip: '鼠标右键菜单选择【查询站台状态】' }, { deviceType: '06', orderNum: 2, operateCode: '0012', tip: '鼠标左键点击【确定】按钮' } @@ -316,7 +316,7 @@ export const OperationList = { trainingName: '区段故障解锁({8}{9})', trainingRemark: '故障解锁功能', trainingType: '04', - productTypes: ['01,02'], + productTypes: ['01', '02'], stepVOList: [ { deviceType: '03', orderNum: 1, operateCode: '402', tip: '鼠标右键菜单选择【区段故障解锁】' }, { deviceType: '03', orderNum: 2, operateCode: '4026', tip: '鼠标左键点击【下达】按钮' }, @@ -333,7 +333,7 @@ export const OperationList = { trainingName: '区段切除({8}{9})', trainingRemark: '区段切除', trainingType: '04', - productTypes: ['01,02'], + productTypes: ['01', '02'], stepVOList: [ { deviceType: '03', orderNum: 1, operateCode: '405', tip: '鼠标右键菜单选择【区段切除】' }, { deviceType: '03', orderNum: 2, operateCode: '405', tip: '鼠标左键点击【确定】按钮' } @@ -347,7 +347,7 @@ export const OperationList = { trainingName: '区段激活({8}{9})', trainingRemark: '区段激活功能', trainingType: '04', - productTypes: ['01,02'], + productTypes: ['01', '02'], stepVOList: [ { deviceType: '03', orderNum: 1, operateCode: '406', tip: '鼠标右键菜单选择【区段激活】' }, { deviceType: '03', orderNum: 2, operateCode: '406', tip: '鼠标左键点击【确定】按钮' } @@ -378,7 +378,7 @@ export const OperationList = { trainingName: '区段封锁({8}{9})', trainingRemark: '区段封锁功能', trainingType: '04', - productTypes: ['01,02'], + productTypes: ['01', '02'], stepVOList: [ { deviceType: '03', orderNum: 1, operateCode: '403', tip: '鼠标右键菜单选择【区段封锁】' }, { deviceType: '03', orderNum: 2, operateCode: '403', tip: '鼠标左键点击【确定】按钮' } @@ -392,7 +392,7 @@ export const OperationList = { trainingName: '区段解封({8}{9})', trainingRemark: '区段解封功能', trainingType: '04', - productTypes: ['01,02'], + productTypes: ['01', '02'], stepVOList: [ { deviceType: '03', orderNum: 1, operateCode: '404', tip: '鼠标右键菜单选择【区段解封】' }, { deviceType: '03', orderNum: 2, operateCode: '4041', tip: '鼠标左键点击【下达】按钮' }, @@ -409,7 +409,7 @@ export const OperationList = { trainingName: '区段设置限速({8}{9})', trainingRemark: '区段设置限速功能(限速值:5)', trainingType: '04', - productTypes: ['01,02'], + productTypes: ['01', '02'], stepVOList: [ { deviceType: '03', orderNum: 1, operateCode: '407', tip: '鼠标右键菜单选择【区段设置限速】' }, { deviceType: '03', orderNum: 2, operateCode: '4076', tip: '鼠标左键选择【限速值5】', val: '5' }, @@ -428,7 +428,7 @@ export const OperationList = { trainingName: '区段取消限速({8}{9})', trainingRemark: '区段取消限速功能', trainingType: '04', - productTypes: ['01,02'], + productTypes: ['01', '02'], stepVOList: [ { deviceType: '03', orderNum: 1, operateCode: '408', tip: '鼠标右键菜单选择【区段取消限速】' }, { deviceType: '03', orderNum: 2, operateCode: '4081', tip: '鼠标左键点击【下达】按钮' }, @@ -447,7 +447,7 @@ export const OperationList = { trainingName: '道岔单锁({7})', trainingRemark: '道岔单锁功能', trainingType: '03', - productTypes: ['01,02'], + productTypes: ['01', '02'], stepVOList: [ { deviceType: '02', orderNum: 1, operateCode: '103', tip: '鼠标右键菜单选择【道岔单锁】' }, { deviceType: '02', orderNum: 2, operateCode: '103', tip: '鼠标左键点击【确定】按钮' } @@ -461,7 +461,7 @@ export const OperationList = { trainingName: '道岔单解({7})', trainingRemark: '道岔单解功能', trainingType: '03', - productTypes: ['01,02'], + productTypes: ['01', '02'], stepVOList: [ { deviceType: '02', orderNum: 1, operateCode: '104', tip: '鼠标右键菜单选择【道岔单解】' }, { deviceType: '02', orderNum: 2, operateCode: '1041', tip: '鼠标左键点击【下达】按钮' }, @@ -478,7 +478,7 @@ export const OperationList = { trainingName: '道岔区段封闭({7})', trainingRemark: '道岔区段封闭功能', trainingType: '03', - productTypes: ['01,02'], + productTypes: ['01', '02'], stepVOList: [ { deviceType: '02', orderNum: 1, operateCode: '105', tip: '鼠标右键菜单选择【道岔区段封闭】' }, { deviceType: '02', orderNum: 2, operateCode: '105', tip: '鼠标左键点击【确定】按钮' } @@ -492,7 +492,7 @@ export const OperationList = { trainingName: '道岔区段解封({7})', trainingRemark: '道岔区段解封功能', trainingType: '03', - productTypes: ['01,02'], + productTypes: ['01', '02'], stepVOList: [ { deviceType: '02', orderNum: 1, operateCode: '106', tip: '鼠标右键菜单选择【道岔区段解封】' }, { deviceType: '02', orderNum: 2, operateCode: '1061', tip: '鼠标左键点击【下达】按钮' }, @@ -509,7 +509,7 @@ export const OperationList = { trainingName: '道岔转动({7})', trainingRemark: '道岔转动功能({15}转{16})', trainingType: '03', - productTypes: ['01,02'], + productTypes: ['01', '02'], stepVOList: [ { deviceType: '02', orderNum: 1, operateCode: '107', tip: '鼠标右键菜单选择【道岔转动】' }, { deviceType: '02', orderNum: 2, operateCode: '107', tip: '鼠标左键点击【确定】按钮' } @@ -523,7 +523,7 @@ export const OperationList = { trainingName: '道岔区段故障解锁({7})', trainingRemark: '道岔区段故障解锁功能', trainingType: '03', - productTypes: ['01,02'], + productTypes: ['01', '02'], stepVOList: [ { deviceType: '02', orderNum: 1, operateCode: '109', tip: '鼠标右键菜单选择【道岔区段故障解锁】' }, { deviceType: '02', orderNum: 2, operateCode: '1091', tip: '鼠标左键点击【下达】按钮' }, @@ -557,7 +557,7 @@ export const OperationList = { trainingName: '区段切除({7})', trainingRemark: '区段切除', trainingType: '03', - productTypes: ['01,02'], + productTypes: ['01', '02'], stepVOList: [ { deviceType: '02', orderNum: 1, operateCode: '111', tip: '鼠标右键菜单选择【区段切除】' }, { deviceType: '02', orderNum: 2, operateCode: '111', tip: '鼠标左键点击【确定】按钮' } @@ -571,7 +571,7 @@ export const OperationList = { trainingName: '区段激活({7})', trainingRemark: '区段激活功能', trainingType: '03', - productTypes: ['01,02'], + productTypes: ['01', '02'], stepVOList: [ { deviceType: '02', orderNum: 1, operateCode: '112', tip: '鼠标右键菜单选择【区段激活】' }, { deviceType: '02', orderNum: 2, operateCode: '112', tip: '鼠标左键点击【确定】按钮' } @@ -585,7 +585,7 @@ export const OperationList = { trainingName: '道岔区段设置限速({7})', trainingRemark: '道岔区段设置限速功能(限速值:5)', trainingType: '03', - productTypes: ['01,02'], + productTypes: ['01', '02'], stepVOList: [ { deviceType: '02', orderNum: 1, operateCode: '113', tip: '鼠标右键菜单选择【道岔区段设置限速】' }, { deviceType: '02', orderNum: 2, operateCode: '1136', tip: '鼠标左键选择【限速值5】', val: '5' }, @@ -604,7 +604,7 @@ export const OperationList = { trainingName: '道岔区段取消限速({7})', trainingRemark: '道岔区段取消限速功能', trainingType: '03', - productTypes: ['01,02'], + productTypes: ['01', '02'], stepVOList: [ { deviceType: '02', orderNum: 1, operateCode: '114', tip: '鼠标右键菜单选择【道岔区段取消限速】' }, { deviceType: '02', orderNum: 2, operateCode: '1141', tip: '鼠标左键点击【下达】按钮' }, @@ -623,7 +623,7 @@ export const OperationList = { trainingName: '进路选排({3})', trainingRemark: '选择排列进路', trainingType: '02', - productTypes: ['01,02'], + productTypes: ['01', '02'], stepVOList: [ { deviceType: '04', orderNum: 1, operateCode: '301', tip: '鼠标右键菜单选择【进路选排】' }, { deviceType: '04', orderNum: 2, operateCode: '3011', tip: '鼠标左键选择进路名称【{3}】', val: '{4}' }, @@ -668,7 +668,7 @@ export const OperationList = { trainingName: '信号封闭({5})', trainingRemark: '信号封闭', trainingType: '02', - productTypes: ['01,02'], + productTypes: ['01', '02'], stepVOList: [ { deviceType: '04', orderNum: 1, operateCode: '306', tip: '鼠标右键菜单选择【信号封闭】' }, { deviceType: '04', orderNum: 2, operateCode: '306', tip: '鼠标左键点击【确定】按钮' } @@ -682,7 +682,7 @@ export const OperationList = { trainingName: '信号解封({5})', trainingRemark: '信号解封', trainingType: '02', - productTypes: ['01,02'], + productTypes: ['01', '02'], stepVOList: [ { deviceType: '04', orderNum: 1, operateCode: '307', tip: '鼠标右键菜单选择【信号解封】' }, { deviceType: '04', orderNum: 2, operateCode: '3071', tip: '鼠标左键点击【下达】按钮' }, @@ -700,7 +700,7 @@ export const OperationList = { trainingName: '信号关灯({3})', trainingRemark: '信号关灯', trainingType: '02', - productTypes: ['01,02'], + productTypes: ['01', '02'], stepVOList: [ { deviceType: '04', orderNum: 1, operateCode: '313', tip: '鼠标右键菜单选择【信号关灯】' }, { deviceType: '04', orderNum: 2, operateCode: '313', tip: '鼠标左键点击【确定】按钮' }, @@ -715,7 +715,7 @@ export const OperationList = { trainingName: '信号重开({3})', trainingRemark: '信号重开', trainingType: '02', - productTypes: ['01,02'], + productTypes: ['01', '02'], stepVOList: [ { deviceType: '04', orderNum: 1, operateCode: '304', tip: '鼠标右键菜单选择【信号重开】' }, { deviceType: '04', orderNum: 2, operateCode: '304', tip: '鼠标左键点击【确定】按钮' }, @@ -851,7 +851,7 @@ export const OperationList = { trainingName: '设置扣车({10}-{12} 站台)', trainingRemark: '设置扣车功能', trainingType: '05', - productTypes: ['01,02'], // 产品类型 01 现地 02 行调 + productTypes: ['01', '02'], // 产品类型 01 现地 02 行调 stepVOList: [ { deviceType: '06', orderNum: 1, operateCode: '504', tip: '鼠标右键菜单选择【设置扣车】' }, { deviceType: '06', orderNum: 2, operateCode: '504', tip: '鼠标左键点击【确定】按钮' } @@ -865,7 +865,7 @@ export const OperationList = { trainingName: '取消扣车({10}-{12} 站台)', trainingRemark: '取消扣车功能', trainingType: '05', - productTypes: ['01,02'], // 产品类型 01 现地 02 行调 + productTypes: ['01', '02'], // 产品类型 01 现地 02 行调 stepVOList: [ { deviceType: '06', orderNum: 1, operateCode: '505', tip: '鼠标右键菜单选择【取消扣车】' }, { deviceType: '06', orderNum: 2, operateCode: '505', tip: '鼠标左键点击【确定】按钮' } @@ -879,7 +879,7 @@ export const OperationList = { trainingName: '设置跳停({10}-{12} 站台)', trainingRemark: '设置跳停功能', trainingType: '05', - productTypes: ['01,02'], // 产品类型 01 现地 02 行调 + productTypes: ['01', '02'], // 产品类型 01 现地 02 行调 stepVOList: [ { deviceType: '06', orderNum: 1, operateCode: '502', tip: '鼠标右键菜单选择【设置跳停】' }, { deviceType: '06', orderNum: 2, operateCode: '502', tip: '鼠标左键点击【确定】按钮', val: '{11}' } @@ -893,7 +893,7 @@ export const OperationList = { trainingName: '设置跳停({10}-{12} 站台)', trainingRemark: '设置指定001号列车跳停功能', trainingType: '05', - productTypes: ['01,02'], // 产品类型 01 现地 02 行调 + productTypes: ['01', '02'], // 产品类型 01 现地 02 行调 stepVOList: [ { deviceType: '06', orderNum: 1, operateCode: '502', tip: '鼠标右键菜单选择【设置跳停】' }, { deviceType: '06', orderNum: 2, operateCode: '5024', tip: '鼠标左键点击' }, @@ -909,7 +909,7 @@ export const OperationList = { trainingName: '取消跳停({10}-{12} 站台)', trainingRemark: '取消跳停功能', trainingType: '05', - productTypes: ['01,02'], // 产品类型 01 现地 02 行调 + productTypes: ['01', '02'], // 产品类型 01 现地 02 行调 stepVOList: [ { deviceType: '06', orderNum: 1, operateCode: '503', tip: '鼠标右键菜单选择【取消跳停】' }, { deviceType: '06', orderNum: 2, operateCode: '503', tip: '鼠标左键点击【确定】按钮', val: '{11}' } @@ -923,7 +923,7 @@ export const OperationList = { trainingName: '取消跳停({10}-{12} 站台)', trainingRemark: '取消指定001号列车跳停功能', trainingType: '05', - productTypes: ['01,02'], // 产品类型 01 现地 02 行调 + productTypes: ['01', '02'], // 产品类型 01 现地 02 行调 stepVOList: [ { deviceType: '06', orderNum: 1, operateCode: '503', tip: '鼠标右键菜单选择【取消跳停】' }, { deviceType: '06', orderNum: 2, operateCode: '5034', tip: '鼠标左键点击' }, @@ -939,7 +939,7 @@ export const OperationList = { trainingName: '查询站台状态({10}-{12} 站台)', trainingRemark: '查询站台状态功能', trainingType: '05', - productTypes: ['01,02'], // 产品类型 01 现地 02 行调 + productTypes: ['01', '02'], // 产品类型 01 现地 02 行调 stepVOList: [ { deviceType: '06', orderNum: 1, operateCode: '507', tip: '鼠标右键菜单选择【站台信息】' }, { deviceType: '06', orderNum: 2, operateCode: '0012', tip: '鼠标左键点击【确定】按钮' } @@ -1064,7 +1064,7 @@ export const OperationList = { trainingName: '轨道切除({8}{9} 区段)', trainingRemark: '轨道切除功能', trainingType: '04', - productTypes: ['01,02'], + productTypes: ['01', '02'], stepVOList: [ { deviceType: '03', orderNum: 1, operateCode: '405', tip: '鼠标右键菜单选择【轨道切除】' }, { deviceType: '03', orderNum: 2, operateCode: '405', tip: '鼠标左键点击【确定】按钮' } @@ -1078,7 +1078,7 @@ export const OperationList = { trainingName: '轨道激活({8}{9} 区段)', trainingRemark: '轨道激活功能', trainingType: '04', - productTypes: ['01,02'], + productTypes: ['01', '02'], stepVOList: [ { deviceType: '03', orderNum: 1, operateCode: '406', tip: '鼠标右键菜单选择【轨道激活】' }, { deviceType: '03', orderNum: 2, operateCode: '406', tip: '鼠标左键点击【确定】按钮' } @@ -1092,7 +1092,7 @@ export const OperationList = { trainingName: '设置临时限速({8}{9} 区段)', trainingRemark: '设置临时限速功能(限速值:15)', trainingType: '04', - productTypes: ['01,02'], + productTypes: ['01', '02'], stepVOList: [ { deviceType: '03', orderNum: 1, operateCode: '407', tip: '鼠标右键菜单选择【设置临时限速】' }, { deviceType: '03', orderNum: 2, operateCode: '4076', tip: '鼠标左键选择【限速值15】', val: '15' }, @@ -1112,7 +1112,7 @@ export const OperationList = { trainingName: '轨道切除({7} 道岔)', trainingRemark: '轨道切除功能', trainingType: '03', - productTypes: ['01,02'], + productTypes: ['01', '02'], stepVOList: [ { deviceType: '02', orderNum: 1, operateCode: '111', tip: '鼠标右键菜单选择【轨道切除】' }, { deviceType: '02', orderNum: 2, operateCode: '111', tip: '鼠标左键点击【确定】按钮' } @@ -1126,7 +1126,7 @@ export const OperationList = { trainingName: '轨道激活({7} 道岔)', trainingRemark: '轨道激活功能', trainingType: '03', - productTypes: ['01,02'], + productTypes: ['01', '02'], stepVOList: [ { deviceType: '02', orderNum: 1, operateCode: '112', tip: '鼠标右键菜单选择【轨道激活】' }, { deviceType: '02', orderNum: 2, operateCode: '112', tip: '鼠标左键点击【确定】按钮' } @@ -1140,7 +1140,7 @@ export const OperationList = { trainingName: '设置临时限速({7} 道岔)', trainingRemark: '设置临时限速功能(限速值 35 零点西上行公里标0 - 零点西上行公里标3000)', trainingType: '03', - productTypes: ['01,02'], + productTypes: ['01', '02'], // stepVOList: [ // { deviceType: '02', orderNum: 1, operateCode: '113', tip: '鼠标右键菜单选择【设置临时限速】' }, // { deviceType: '02', orderNum: 2, operateCode: '1131', tip: '鼠标左键选择【打开会话】' }, @@ -1180,7 +1180,7 @@ export const OperationList = { trainingName: '排列进路({3} 进路)', trainingRemark: '排列进路功能', trainingType: '02', - productTypes: ['01,02'], + productTypes: ['01', '02'], stepVOList: [ { deviceType: '04', orderNum: 1, operateCode: '301', tip: '鼠标右键菜单选择【排列进路】' }, { deviceType: '04', orderNum: 2, operateCode: '3011', tip: '鼠标左键选择进路名称【{3}】', val: '{4}' }, @@ -1253,7 +1253,7 @@ export const OperationList = { trainingName: '信号重开({3} 进路)', trainingRemark: '信号重开功能', trainingType: '02', - productTypes: ['01,02'], + productTypes: ['01', '02'], stepVOList: [ { deviceType: '04', orderNum: 1, operateCode: '304', tip: '鼠标右键菜单选择【信号重开】' }, { deviceType: '04', orderNum: 2, operateCode: '304', tip: '鼠标左键点击【确定】按钮' } @@ -1268,7 +1268,7 @@ export const OperationList = { trainingName: '全线取消临时限速', trainingRemark: '全线取消临时限速功能', trainingType: '08', - productTypes: ['01,02'], + productTypes: ['01', '02'], stepVOList: [ { deviceType: '10', orderNum: 1, operateCode: '800', tip: '鼠标右键菜单选择【取消全线临时限速】' }, { deviceType: '10', orderNum: 2, operateCode: '8001', tip: '鼠标左键点击【打开会话】按钮' }, @@ -1833,7 +1833,7 @@ export const OperationList = { trainingName: '设置跳停({10}-{12}站台)', trainingRemark: '设置跳停功能', trainingType: '05', - productTypes: ['01,02'], + productTypes: ['01', '02'], stepVOList: [ { deviceType: '06', orderNum: 1, operateCode: '502', tip: '鼠标右键菜单选择【跳停】' }, { deviceType: '06', orderNum: 2, operateCode: '502', tip: '鼠标左键点击【确定】按钮', val: '{11}' } @@ -1847,7 +1847,7 @@ export const OperationList = { trainingName: '取消跳停({10}-{12}站台)', trainingRemark: '设置取消跳停功能', trainingType: '05', - productTypes: ['01,02'], + productTypes: ['01', '02'], stepVOList: [ { deviceType: '06', orderNum: 1, operateCode: '503', tip: '鼠标右键菜单选择【取消跳停】' }, { deviceType: '06', orderNum: 2, operateCode: '503', tip: '鼠标左键点击【确定】按钮', val: '{11}' } @@ -2031,7 +2031,7 @@ export const OperationList = { trainingName: ' Train detaining({10}-{12}station)', trainingRemark: 'Set the detaining function', trainingType: '05', - productTypes: ['01,02'], + productTypes: ['01', '02'], stepVOList: [ { deviceType: '06', orderNum: 1, operateCode: '504', tip: 'Right click to select [train detaining]' }, { deviceType: '06', orderNum: 2, operateCode: '504', tip: 'Left click [ok] ' } @@ -2045,7 +2045,7 @@ export const OperationList = { trainingName: 'Cancel train detaining({10}-{12}The platform)', trainingRemark: 'Set cancelling detaining function', trainingType: '05', - productTypes: ['01,02'], + productTypes: ['01', '02'], stepVOList: [ { deviceType: '06', orderNum: 1, operateCode: '505', tip: 'Right click to select [cancel train detaining]]' }, { deviceType: '06', orderNum: 2, operateCode: '505', tip: 'Left click [ok] ' } @@ -2102,7 +2102,7 @@ export const OperationList = { trainingName: 'Skip to continue moving({10}-{12}The platform)', trainingRemark: 'Set the skip to continue moving function', trainingType: '05', - productTypes: ['01,02'], + productTypes: ['01', '02'], stepVOList: [ { deviceType: '06', orderNum: 1, operateCode: '502', tip: 'Right click to select [Skip to continue moving]' }, { deviceType: '06', orderNum: 2, operateCode: '502', tip: 'Left click [ok]', val: '{11}' } @@ -2116,7 +2116,7 @@ export const OperationList = { trainingName: 'Cancel skiping ({10}-{12}The platform)', trainingRemark: 'Set cancelling skiping function', trainingType: '05', - productTypes: ['01,02'], + 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 [ok]', val: '{11}' } @@ -2130,7 +2130,7 @@ export const OperationList = { trainingName: ' Platform status query({10}-{12}The platform)', trainingRemark: 'Query platform status function', trainingType: '05', - productTypes: ['01,02'], + productTypes: ['01', '02'], stepVOList: [ { deviceType: '06', orderNum: 1, operateCode: '507', tip: 'Right click to select [Platform status query]' }, { deviceType: '06', orderNum: 2, operateCode: '0012', tip: 'Left click [ok] ' } @@ -2258,7 +2258,7 @@ export const OperationList = { trainingName: 'Section fault unlocking({8}{9})', trainingRemark: 'Fault unlocking', trainingType: '04', - productTypes: ['01,02'], + 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] ' }, @@ -2275,7 +2275,7 @@ export const OperationList = { trainingName: 'Section resection({8}{9})', trainingRemark: 'Section resection', trainingType: '04', - productTypes: ['01,02'], + 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 [ok] ' } @@ -2289,7 +2289,7 @@ export const OperationList = { trainingName: 'Section activation({8}{9})', trainingRemark: 'Section activation function', trainingType: '04', - productTypes: ['01,02'], + 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 [ok]' } @@ -2320,7 +2320,7 @@ export const OperationList = { trainingName: 'Section blockade({8}{9})', trainingRemark: 'Section blockade function', trainingType: '04', - productTypes: ['01,02'], + 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 [ok] ' } @@ -2334,7 +2334,7 @@ export const OperationList = { trainingName: 'Section unblockade({8}{9})', trainingRemark: 'Section unblockade function', trainingType: '04', - productTypes: ['01,02'], + 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]' }, @@ -2351,7 +2351,7 @@ export const OperationList = { 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'], + 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' }, @@ -2370,7 +2370,7 @@ export const OperationList = { trainingName: 'Cancel speed limit on the section({8}{9})', trainingRemark: 'Cancel speed limit on the section', trainingType: '04', - productTypes: ['01,02'], + 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]' }, @@ -2389,7 +2389,7 @@ export const OperationList = { trainingName: 'Turnout single lock({7})', trainingRemark: 'Turnout single lock function', trainingType: '03', - productTypes: ['01,02'], + productTypes: ['01', '02'], stepVOList: [ { deviceType: '02', orderNum: 1, operateCode: '103', tip: 'Right click to select [Turnout single lock]' }, { deviceType: '02', orderNum: 2, operateCode: '103', tip: 'Left click [ok] ' } @@ -2403,7 +2403,7 @@ export const OperationList = { trainingName: 'Turnout single release({7})', trainingRemark: 'Turnout single release function', trainingType: '03', - productTypes: ['01,02'], + productTypes: ['01', '02'], stepVOList: [ { deviceType: '02', orderNum: 1, operateCode: '104', tip: 'Right click to select [Turnout single release]' }, { deviceType: '02', orderNum: 2, operateCode: '1041', tip: 'Left click [Execute]' }, @@ -2420,7 +2420,7 @@ export const OperationList = { trainingName: 'Turnout section closure({7})', trainingRemark: 'Turnout section closure ', trainingType: '03', - productTypes: ['01,02'], + 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 [ok] ' } @@ -2434,7 +2434,7 @@ export const OperationList = { trainingName: 'Turnout section unsealing({7})', trainingRemark: 'Turnout section unsealing function', trainingType: '03', - productTypes: ['01,02'], + 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]' }, @@ -2451,7 +2451,7 @@ export const OperationList = { trainingName: 'Switch rotation({7})', trainingRemark: 'Switch rotation({15}turn{16})', trainingType: '03', - productTypes: ['01,02'], + productTypes: ['01', '02'], stepVOList: [ { deviceType: '02', orderNum: 1, operateCode: '107', tip: 'Right click to select [Switch rotation]' }, { deviceType: '02', orderNum: 2, operateCode: '107', tip: 'Left click [ok] ' } @@ -2465,7 +2465,7 @@ export const OperationList = { trainingName: 'Switch section fault unlocking({7})', trainingRemark: 'Switch section fault unlocking function', trainingType: '03', - productTypes: ['01,02'], + productTypes: ['01', '02'], stepVOList: [ { deviceType: '02', orderNum: 1, operateCode: '109', tip: 'Right click to select [switch section fault unlocking]' }, { deviceType: '02', orderNum: 2, operateCode: '1091', tip: 'Left click [Execute]' }, @@ -2499,7 +2499,7 @@ export const OperationList = { trainingName: 'Section resection({7})', trainingRemark: 'Section resection', trainingType: '03', - productTypes: ['01,02'], + 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 [ok]' } @@ -2513,7 +2513,7 @@ export const OperationList = { trainingName: 'Section activation({7})', trainingRemark: 'Section activation function', trainingType: '03', - productTypes: ['01,02'], + 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 [ok] ' } @@ -2527,7 +2527,7 @@ export const OperationList = { trainingName: 'Set speed limit on the section({7})', trainingRemark: 'Set speed limit on the section (speed limit value: 5)', trainingType: '03', - productTypes: ['01,02'], + productTypes: ['01', '02'], stepVOList: [ { deviceType: '02', orderNum: 1, operateCode: '113', tip: 'Right click to select [Set speed limit on the section]' }, { deviceType: '02', orderNum: 2, operateCode: '1136', tip: 'Left click to select [speed limit 5] ', val: '5' }, @@ -2546,7 +2546,7 @@ export const OperationList = { trainingName: 'Cancel speed limit on the section({7})', trainingRemark: 'Cancel speed limit on the section', trainingType: '03', - productTypes: ['01,02'], + productTypes: ['01', '02'], stepVOList: [ { deviceType: '02', orderNum: 1, operateCode: '114', tip: 'Right click to select [Cancel speed limit on the section]' }, { deviceType: '02', orderNum: 2, operateCode: '1141', tip: 'Left click [Execute]' }, @@ -2565,7 +2565,7 @@ export const OperationList = { trainingName: 'Route selection({3})', trainingRemark: 'Route selection', trainingType: '02', - productTypes: ['01,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}' }, @@ -2610,7 +2610,7 @@ export const OperationList = { trainingName: 'Signal closure({5})', trainingRemark: 'Signal closure', trainingType: '02', - productTypes: ['01,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 [ok] ' } @@ -2624,7 +2624,7 @@ export const OperationList = { trainingName: 'Signal unsealing({5})', trainingRemark: 'Signal unsealing', trainingType: '02', - productTypes: ['01,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]' }, @@ -2642,7 +2642,7 @@ export const OperationList = { trainingName: 'The signal light turns red({3})', trainingRemark: 'The signal light turns red', trainingType: '02', - productTypes: ['01,02'], + productTypes: ['01', '02'], stepVOList: [ { deviceType: '04', orderNum: 1, operateCode: '313', tip: 'Right click to select [The signal light turns red]' }, { deviceType: '04', orderNum: 2, operateCode: '313', tip: 'Left click [ok]' }, @@ -2657,7 +2657,7 @@ export const OperationList = { trainingName: 'Signal reopen({3})', trainingRemark: 'Signal reopen', trainingType: '02', - productTypes: ['01,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 [ok]' }, diff --git a/src/scripts/plugin/converter/SignalRouteOperationConverter.js b/src/scripts/plugin/converter/SignalRouteOperationConverter.js index 33e85c4e9..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,37 +103,37 @@ export default { * @param {*} operates */ function handleButtonArrangementRoute(operates) { - 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; + 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; } /** @@ -141,31 +141,31 @@ function handleButtonArrangementRoute(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; } /** @@ -173,19 +173,19 @@ function handleMenuArrangementRoute(operates) { * @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; + 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; } /** @@ -193,19 +193,19 @@ function handleButtonCancelTrainRoute(operates) { * @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; + 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; } /** @@ -213,26 +213,25 @@ function handleButtonReopenSignal(operates) { * @param {*} operates */ function handleButtonHumanTrainRoute(operates) { - debugger; - 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; + 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; } /** @@ -240,19 +239,19 @@ function handleButtonHumanTrainRoute(operates) { * @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; + 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; } /** @@ -260,19 +259,19 @@ function handleMenuCancelStopPage(operates) { * @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 >= 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; } /** @@ -280,19 +279,19 @@ function handleMenuStoppage(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; } /** @@ -300,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; } /** @@ -320,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; } /** @@ -347,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 }; + } } /** @@ -366,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 }; + } } /** @@ -385,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 }; + } } /** @@ -414,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; } /** @@ -434,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; } /** @@ -454,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; } /** @@ -474,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; } /** @@ -494,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; } /** @@ -514,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; } /** @@ -567,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; } /** @@ -620,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; } /** @@ -639,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; } /** @@ -659,34 +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, - 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; + 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/utils/baseUrl.js b/src/utils/baseUrl.js index cbc51f6c4..16e67023d 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -3,9 +3,9 @@ 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 = '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.6:9000'; // 旭强 // BASE_API = 'http://192.168.3.41:9000'; // 王兴杰 } else { BASE_API = process.env.VUE_APP_BASE_API; diff --git a/src/views/designPlatform/demonList.vue b/src/views/designPlatform/demonList.vue index 6e1a4ece1..ec1d5dd15 100644 --- a/src/views/designPlatform/demonList.vue +++ b/src/views/designPlatform/demonList.vue @@ -95,12 +95,13 @@ export default { switch (obj.type) { case 'scriptDesign': { setSessionStorage('designType', 'scriptDesign'); - this.$router.push({ path: `${UrlConfig.design.scriptHome}/${obj.mapId}?skinCode=${obj.skinCode}` }); + this.$router.push({ path: `${UrlConfig.design.scriptHome}/${obj.mapId}` }); break; } case 'lessonDesign': { setSessionStorage('designType', 'lessonDesign'); - this.$router.push({ path: `${UrlConfig.design.lessonHome}/${obj.mapId}/${obj.skinCode}`, query: {cityCode: obj.cityCode} }); + // /${obj.skinCode} + this.$router.push({ path: `${UrlConfig.design.lessonHome}/${obj.mapId}`, query: {cityCode: obj.cityCode} }); break; } case 'runPlanDesign': { diff --git a/src/views/lesson/trainingRule/addEdit.vue b/src/views/lesson/trainingRule/addEdit.vue index 8b50d7ff3..68d9261bf 100644 --- a/src/views/lesson/trainingRule/addEdit.vue +++ b/src/views/lesson/trainingRule/addEdit.vue @@ -37,7 +37,8 @@ export default { mapIdList: [], trainingTypeList: [], trainingOperateTypeMap: {}, - placeholderList: [] + placeholderList: [], + productTypesList:[] }; }, computed: { @@ -49,12 +50,14 @@ export default { { prop: 'mapId', label: this.$t('lesson.mapName'), type: 'select', required: true, options: this.mapIdList, disabled: true }, { prop: 'trainingType', label: this.$t('lesson.trainingType'), type: 'select', required: true, options: this.trainingTypeList, disabled: !isAdd, change: true, onChange: this.changeList }, { prop: 'operateType', label: this.$t('lesson.operationType'), type: 'select', required: true, options: this.trainingOperateTypeMap[this.formModel.trainingType], disabled: !isAdd }, + { prop: 'productTypes', label: this.$t('lesson.productType'), type: 'select', multiple: true, required: true, options: this.productTypesList, disabled: !isAdd}, { label: '', type: 'button', options: this.placeholderList, style: 'margin-bottom: 0; margin-top: -10px;', typeBtn: 'info', click: this.addTrainName }, { prop: 'trainingName', label: this.$t('lesson.trainingName'), type: 'text', required: true, rightWidth: true, tooltip: true, info: this.$t('lesson.tipNamePlaceholderInfo') }, { prop: 'minDuration', label: this.$t('lesson.minDuration'), type: 'number', required: true, min:1}, { prop: 'maxDuration', label: this.$t('lesson.maxDuration'), type: 'number', required: true, min:1}, { label: '', type: 'button', options: this.placeholderList, style: 'margin-bottom: 0; margin-top: -10px;', typeBtn: 'info', click: this.addTrainRemark }, { prop: 'trainingRemark', label: this.$t('lesson.trainingRemark'), type: 'textarea', required: true, tooltip: true, info: this.$t('lesson.tipExplainPlaceholderInfo') } + ] }; return form; @@ -70,6 +73,9 @@ export default { operateType: [ { required: true, message: this.$t('rules.inputOperationType'), trigger: 'change' } ], + productTypes:[ + { required: true, message: this.$t('rules.productTypeInput'), trigger: 'change' } + ], mapId: [ { required: true, message: this.$t('rules.selectMapName'), trigger: 'change' } ], @@ -93,13 +99,18 @@ export default { } } }, - mounted() { + created() { this.init(); }, + // beforeupdate(data) { + // this.$refs.dataform.clearValidate(); + // }, methods: { init() { // 获取地图列表 + // this.$refs.dataform.resetForm(); this.mapIdList = []; + this.productTypesList = [{ value:'01', label:'现地'}, {value:'02', label:'行调'}]; listPublishMap().then(response => { this.mapIdList = response.data.map(item => { const params = {}; @@ -186,6 +197,7 @@ export default { // 获取操作占位列表 const res = await getPlaceholderList({ trainingType: data.trainingType }); this.placeholderList = res.data; + debugger; this.formModel = { id: data.id, trainingName: this.repliceName(data.trainingName, this.placeholderList), @@ -198,9 +210,10 @@ export default { trainingRemark: this.repliceName(data.trainingRemark, this.placeholderList) }; } else { - this.formModel = { - mapId: this.$route.query.mapId - }; + this.formModel.mapId = this.$route.query.mapId; + // this.formModel = { + // mapId: this.$route.query.mapId + // }; } }, repliceName(fieldValue, enumList) { @@ -237,6 +250,7 @@ export default { }, create() { const self = this; + this.loading = true; this.placeholderList.forEach(item => { if (this.formModel.trainingName.includes(`{${item.name}}`)) { const name = this.formModel.trainingName.replace(`{${item.name}}`, `{${item.id}}`); @@ -248,7 +262,6 @@ export default { } }); - this.loading = true; postTrainingRulesData(this.formModel).then(response => { self.loading = false; self.$message.success(this.$t('lesson.createOperateSuccess')); @@ -291,9 +304,11 @@ export default { mapId: '', minDuration: '', maxDuration: '', - trainingRemark: '' + trainingRemark: '', + productTypes:[] }; this.$refs.dataform.resetForm(); + // this.$refs.dataform.clearValidate(); this.dialogVisible = false; } } diff --git a/src/views/lesson/trainingmanage/draft.vue b/src/views/lesson/trainingmanage/draft.vue index 386b1d465..0f6ea7360 100644 --- a/src/views/lesson/trainingmanage/draft.vue +++ b/src/views/lesson/trainingmanage/draft.vue @@ -287,7 +287,6 @@ export default { addAutoTraining(data).then(response => { this.$message.success(this.$t('tip.automaticGenerationTrainingSuccess')); - debugger; this.$emit('refresh'); this.close(); }).catch(() => { diff --git a/src/views/publish/examRule/draft/index.vue b/src/views/publish/examRule/draft/index.vue index 5a0500a4e..6198cea43 100644 --- a/src/views/publish/examRule/draft/index.vue +++ b/src/views/publish/examRule/draft/index.vue @@ -1,34 +1,32 @@