diff --git a/src/api/jmap/mapdraft.js b/src/api/jmap/mapdraft.js index 63c48f6de..5f6529e7e 100644 --- a/src/api/jmap/mapdraft.js +++ b/src/api/jmap/mapdraft.js @@ -187,6 +187,15 @@ export function gernateRoutingSection(data) { }); } +/** 生成交路区段数据(运行图中)(新版)*/ +export function gernateRoutingSectionInRunplan(data) { + return request({ + url: `/api/runPlan/userData/routing/path/generate`, + method: 'post', + data: data + }); +} + /** 更新交路(新版)*/ export function updateRoutingData(data) { return request({ diff --git a/src/jlmap3d/edit/connect/specilDataSave.js b/src/jlmap3d/edit/connect/specilDataSave.js new file mode 100644 index 000000000..04f4cddf4 --- /dev/null +++ b/src/jlmap3d/edit/connect/specilDataSave.js @@ -0,0 +1,191 @@ +//import request from '@/utils/request'; +export function specilDataSave(data) { + console.log(data); + let postmap = { + id:data.mapdata.id, + mapId:data.mapdata.mapId, + assets:"null", + sections:"null", + signals:"null", + trains:"null", + stands:"null", + switchs:"null", + others:"null", + }; + + if(data.mapdata.sectionlist.sections== undefined){ + return postmap; + } + + + if(data == undefined){ + + return postmap; + }else{ + + let specilModel = [ + { + id:"1", + name:"天府广场站", + code:"Station72223", + deviceType:"SimulationStation", + type:"Station72223", + url:"/MODEL/2020-12-23/119-45721.FBX" + }, + { + id:"2", + name:"孵化园站", + code:"Station95125", + deviceType:"SimulationStation", + type:"Station95125", + url:"/MODEL/2020-12-23/117-12889.FBX" + }, + { + id:"3", + name:"四河站", + code:"Station62009", + deviceType:"SimulationStation", + type:"Station62009", + url:"/MODEL/2020-12-23/118-99249.FBX" + }, + ]; + + + data.assetManager.others = specilModel; + + + let models = data.assetManager; + console.log(data.assetManager); + postmap.assets = JSON.stringify(models); + + + //section隧道 + let sections = []; + for(let i in data.mapdata.sectionlist.sections.datalist){ + + let section = { + // uuid:data.mapdata.sectionlist.sections.modellist[i].uuid, + code:data.mapdata.sectionlist.sections.datalist[i].code, + name:data.mapdata.sectionlist.sections.datalist[i].name, + lengthFact:null, + standTrack:data.mapdata.sectionlist.sections.datalist[i].standTrack, + rp:data.mapdata.sectionlist.sections.datalist[i].rp, + lp:data.mapdata.sectionlist.sections.datalist[i].lp, + railpoint:null, + rail:data.mapdata.sectionlist.sections.datalist[i].rail, + position:null, + rotation:null, + scale:null, + } + if(data.mapdata.sectionlist.sections.datalist[i].mesh){ + let nowmesh = data.mapdata.sectionlist.sectiongroup.getObjectByProperty("code",section.code); + section.railpoint = nowmesh.railpoint; + section.lengthFact = data.mapdata.sectionlist.sections.datalist[i].mesh.lengthFact; + section.position = data.mapdata.sectionlist.sections.datalist[i].mesh.position; + section.rotation = data.mapdata.sectionlist.sections.datalist[i].mesh.rotation; + section.scale = data.mapdata.sectionlist.sections.datalist[i].mesh.scale; + sections.push(section); + } + + // if(data.mapdata.sectionlist.sections.datalist[i].rsection){ + // section.rsection = data.mapdata.sectionlist.sections.datalist[i].rsection; + // } + // if(data.mapdata.sectionlist.sections.datalist[i].lsection){ + // section.lsection = data.mapdata.sectionlist.sections.datalist[i].lsection; + // } + // if(data.mapdata.sectionlist.sections.datalist[i].csection){ + // section.csection = data.mapdata.sectionlist.sections.datalist[i].csection; + // } + + // testmesh1.position.z = link.position.z; + + + } + let arrray = { + section:sections, + }; + postmap.sections = JSON.stringify(arrray); + //道岔 + let switchs = []; + + for(let i=0;i0;j--){ - let name = "C"+j; - for(let i=0;i0;j--){ + let name = "C"+j; + for(let i=0;i{ + commitOperate({operation:OperationEvent.Signal.arrangementRoute.confirm.operation}, {routeCode: this.row.code}, 1).then(({valid, operate})=>{ this.loading = false; if (valid) { - this.$refs.passwordBox.doShow(operate); + this.$refs.passwordBox.doShow({operation:OperationEvent.Signal.arrangementRoute.menu.operation}); this.doClose(); } }).catch((error) => { diff --git a/src/jmapNew/theme/chengdu_03/operationConfig.js b/src/jmapNew/theme/chengdu_03/operationConfig.js index 347ee8804..bb58320ef 100644 --- a/src/jmapNew/theme/chengdu_03/operationConfig.js +++ b/src/jmapNew/theme/chengdu_03/operationConfig.js @@ -24,7 +24,7 @@ export default { 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: 3, operateCode: '3012', tip: '鼠标左键点击【执行】按钮' }, { deviceType: '04', orderNum: 4, operateCode: '301', tip: '输入密码123,点击【确定】按钮' } ] }, @@ -101,7 +101,7 @@ export default { stepVOList: [ { deviceType: '04', orderNum: 1, operateCode: '2994', tip: '鼠标左键点击【总取消】' }, { deviceType: '04', orderNum: 2, operateCode: '0011', tip: '输入密码123,点击【确定】按钮' }, - { deviceType: '04', orderNum: 3, operateCode: '2994', tip: '鼠标左键点击【{5}】按钮', codeType:'SIGNAL' } + { deviceType: '04', orderNum: 3, operateCode: '2994', tip: '鼠标左键点击【{5}】', codeType:'SIGNAL' } ] }, { // 不生成实训 @@ -173,8 +173,7 @@ export default { productTypes: ['02'], stepVOList: [ { deviceType: '04', orderNum: 1, operateCode: '306', tip: '鼠标右键菜单选择【信号封锁】' }, - { deviceType: '04', orderNum: 2, operateCode: '306', tip: '鼠标左键点击【确定】按钮' }, - { deviceType: '04', orderNum: 3, operateCode: '306', tip: '输入密码123,点击【确定】按钮' } + { deviceType: '04', orderNum: 2, operateCode: '306', tip: '鼠标左键点击【确定】按钮' } ] }, { @@ -187,7 +186,7 @@ export default { trainingType: 'Signal', productTypes: ['01'], stepVOList: [ - { deviceType: '04', orderNum: 1, operateCode: '2991', tip: '鼠标左键菜单选择【封锁】' }, + { deviceType: '04', orderNum: 1, operateCode: '2991', tip: '鼠标左键点击【封锁】' }, { deviceType: '04', orderNum: 1, operateCode: '2991', tip: '鼠标左键点击【{5}】', codeType:'SIGNAL' } ] }, @@ -202,8 +201,8 @@ export default { productTypes: ['02'], stepVOList: [ { deviceType: '04', orderNum: 1, operateCode: '307', tip: '鼠标右键菜单选择【信号解封】' }, - { deviceType: '04', orderNum: 2, operateCode: '307', tip: '鼠标左键点击【确认】按钮' }, - { deviceType: '04', orderNum: 3, operateCode: '307', tip: '输入密码123,点击【确认】按钮' } + { deviceType: '04', orderNum: 2, operateCode: '3072', tip: '鼠标左键点击【确认】按钮' }, + { deviceType: '04', orderNum: 3, operateCode: '307', tip: '输入密码123,点击【确定】按钮' } ] }, { @@ -216,8 +215,8 @@ export default { trainingType: 'Signal', productTypes: ['01'], stepVOList: [ - { deviceType: '04', orderNum: 1, operateCode: '2992', tip: '鼠标左键菜单选择【解封】' }, - { deviceType: '04', orderNum: 2, operateCode: '0011', tip: '输入密码123,点击【确认】按钮' }, + { deviceType: '04', orderNum: 1, operateCode: '2992', tip: '鼠标左键点击【解封】' }, + { deviceType: '04', orderNum: 2, operateCode: '0011', tip: '输入密码123,点击【确定】按钮' }, { deviceType: '04', orderNum: 3, operateCode: '2992', tip: '鼠标左键点击【{5}】', codeType:'SIGNAL' } ] }, @@ -318,7 +317,7 @@ export default { trainingType: 'Switch', productTypes: ['01'], stepVOList: [ - { deviceType: '02', orderNum: 1, operateCode: '1010', tip: '鼠标左键菜单选择【道岔定操】' }, + { deviceType: '02', orderNum: 1, operateCode: '1010', tip: '鼠标左键点击【道岔定操】' }, { deviceType: '02', orderNum: 2, operateCode: '1010', tip: '鼠标左键点击【{7}】', codeType:'SWITCH' } ] }, @@ -346,8 +345,8 @@ export default { trainingType: 'Switch', productTypes: ['01'], stepVOList: [ - { deviceType: '02', orderNum: 1, operateCode: '1020', tip: '鼠标左键菜单选择【道岔反操】' }, - { deviceType: '02', orderNum: 2, operateCode: '1020', tip: '鼠标左键点击【{7}】按钮', codeType:'SWITCH' } + { deviceType: '02', orderNum: 1, operateCode: '1020', tip: '鼠标左键点击【道岔反操】' }, + { deviceType: '02', orderNum: 2, operateCode: '1020', tip: '鼠标左键点击【{7}】', codeType:'SWITCH' } ] }, { @@ -374,8 +373,8 @@ export default { trainingType: 'Switch', productTypes: ['01'], // 现地操作 stepVOList: [ - { deviceType: '02', orderNum: 1, operateCode: '1030', tip: '鼠标左键菜单选择【道岔单锁】' }, - { deviceType: '02', orderNum: 2, operateCode: '1030', tip: '鼠标左键点击【{{7}}】', codeType:'SWITCH' } + { deviceType: '02', orderNum: 1, operateCode: '1030', tip: '鼠标左键点击【道岔单锁】' }, + { deviceType: '02', orderNum: 2, operateCode: '1030', tip: '鼠标左键点击【{7}】', codeType:'SWITCH' } ] }, { @@ -402,9 +401,9 @@ export default { trainingType: 'Switch', productTypes: ['01'], stepVOList: [ - { deviceType: '02', orderNum: 1, operateCode: '1040', tip: '鼠标左键菜单选择【道岔解锁】' }, - { deviceType: '02', orderNum: 2, operateCode: '0011', tip: '输入密码123,点击【确认】按钮' }, - { deviceType: '02', orderNum: 3, operateCode: '1040', tip: '鼠标左键点击【{7}】按钮', codeType:'SWITCH' } + { deviceType: '02', orderNum: 1, operateCode: '1040', tip: '鼠标左键点击【道岔解锁】' }, + { deviceType: '02', orderNum: 2, operateCode: '0011', tip: '输入密码123,点击【确定】按钮' }, + { deviceType: '02', orderNum: 3, operateCode: '1040', tip: '鼠标左键点击【{7}】', codeType:'SWITCH' } ] }, { @@ -418,7 +417,7 @@ export default { productTypes: ['02'], stepVOList: [ { deviceType: '02', orderNum: 1, operateCode: '105', tip: '鼠标右键菜单选择【道岔封锁】' }, - { deviceType: '02', orderNum: 2, operateCode: '105', tip: '鼠标左键点击【确定】按钮' }, + { deviceType: '02', orderNum: 2, operateCode: '1051', tip: '鼠标左键点击【确定】按钮' }, { deviceType: '02', orderNum: 3, operateCode: '105', tip: '输入密码123,点击【确定】按钮' } ] }, @@ -432,8 +431,8 @@ export default { trainingType: 'Switch', productTypes: ['01'], stepVOList: [ - { deviceType: '02', orderNum: 1, operateCode: '2991', tip: '鼠标左键菜单选择【封锁】' }, - { deviceType: '02', orderNum: 2, operateCode: '2991', tip: '鼠标左键点击【{7}】按钮', codeType:'SWITCH' } + { deviceType: '02', orderNum: 1, operateCode: '2991', tip: '鼠标左键点击【封锁】' }, + { deviceType: '02', orderNum: 2, operateCode: '2991', tip: '鼠标左键点击【{7}】', codeType:'SWITCH' } ] }, { @@ -447,8 +446,8 @@ export default { productTypes: ['02'], stepVOList: [ { deviceType: '02', orderNum: 1, operateCode: '106', tip: '鼠标右键菜单选择【道岔解封】' }, - { deviceType: '02', orderNum: 2, operateCode: '106', tip: '鼠标左键点击【确认】按钮' }, - { deviceType: '02', orderNum: 3, operateCode: '106', tip: '输入密码123,点击【确认】按钮' } + { deviceType: '02', orderNum: 2, operateCode: '1062', tip: '鼠标左键点击【确定】按钮' }, + { deviceType: '02', orderNum: 3, operateCode: '106', tip: '输入密码123,点击【确定】按钮' } ] }, { @@ -461,9 +460,9 @@ export default { trainingType: 'Switch', productTypes: ['01'], stepVOList: [ - { deviceType: '02', orderNum: 1, operateCode: '2992', tip: '鼠标左键菜单选择【解封】' }, - { deviceType: '02', orderNum: 2, operateCode: '0011', tip: '输入密码123,点击【确认】按钮' }, - { deviceType: '02', orderNum: 3, operateCode: '2992', tip: '鼠标左键点击【{7}】按钮', codeType:'SWITCH' } + { deviceType: '02', orderNum: 1, operateCode: '2992', tip: '鼠标左键点击【解封】' }, + { deviceType: '02', orderNum: 2, operateCode: '0011', tip: '输入密码123,点击【确定】按钮' }, + { deviceType: '02', orderNum: 3, operateCode: '2992', tip: '鼠标左键点击【{7}】', codeType:'SWITCH' } ] }, { @@ -477,8 +476,8 @@ export default { productTypes: ['02'], stepVOList: [ { deviceType: '02', orderNum: 1, operateCode: '109', tip: '鼠标右键菜单选择【区故解】' }, - { deviceType: '02', orderNum: 2, operateCode: '109', tip: '鼠标左键点击【确认】按钮' }, - { deviceType: '02', orderNum: 3, operateCode: '109', tip: '输入密码123,点击【确认】按钮' } + { deviceType: '02', orderNum: 2, operateCode: '1092', tip: '鼠标左键点击【确定】按钮' }, + { deviceType: '02', orderNum: 3, operateCode: '109', tip: '输入密码123,点击【确定】按钮' } ] }, // 区段列表 @@ -493,8 +492,8 @@ export default { productTypes: ['02'], stepVOList: [ { deviceType: '03', orderNum: 1, operateCode: '402', tip: '鼠标右键菜单选择【区故解】' }, - { deviceType: '03', orderNum: 2, operateCode: '402', tip: '鼠标左键点击【确认】按钮' }, - { deviceType: '03', orderNum: 3, operateCode: '402', tip: '输入密码123,点击【确认】按钮' } + { deviceType: '03', orderNum: 2, operateCode: '4023', tip: '鼠标左键点击【确定】按钮' }, + { deviceType: '03', orderNum: 3, operateCode: '402', tip: '输入密码123,点击【确定】按钮' } ] }, { @@ -502,14 +501,14 @@ export default { minDuration: 8, operateType: CMD.Section.CMD_SECTION_FAULT_UNLOCK.value, skinCode: '04', - trainingName: '区故解({9})', + trainingName: '区故解({8}{9})', trainingRemark: '故障解锁功能', trainingType: 'Section', productTypes: ['01'], stepVOList: [ - { deviceType: '03', orderNum: 1, operateCode: '4020', tip: '鼠标右键菜单选择【区故解】' }, - { deviceType: '03', orderNum: 2, operateCode: '0011', tip: '输入密码123,点击【确认】按钮' }, - { deviceType: '03', orderNum: 3, operateCode: '4020', tip: '鼠标左键点击【{9}】', codeType:'SECTION' } + { deviceType: '03', orderNum: 1, operateCode: '4020', tip: '鼠标左键点击【区故解】'}, + { deviceType: '03', orderNum: 2, operateCode: '0011', tip: '输入密码123,点击【确定】按钮' }, + { deviceType: '03', orderNum: 3, operateCode: '4020', tip: '鼠标左键点击【{8}{9}】', codeType:'SECTION' } ] }, { @@ -523,7 +522,7 @@ export default { productTypes: ['02'], stepVOList: [ { deviceType: '03', orderNum: 1, operateCode: '410', tip: '鼠标右键菜单选择【属性】' }, - { deviceType: '03', orderNum: 2, operateCode: '410', tip: '鼠标左键点击【确认】按钮' } + { deviceType: '03', orderNum: 2, operateCode: '410', tip: '鼠标左键点击【确定】按钮' } ] }, // 站台列表 diff --git a/src/jmapNew/theme/components/menus/dialog/routeControl.vue b/src/jmapNew/theme/components/menus/dialog/routeControl.vue index 4a9b5d40e..050c532cd 100644 --- a/src/jmapNew/theme/components/menus/dialog/routeControl.vue +++ b/src/jmapNew/theme/components/menus/dialog/routeControl.vue @@ -83,6 +83,9 @@ export default { return this.dialogShow ? OperationEvent.Command.close.menu.domId : ''; }, domIdConfirm() { + if (this.operation == OperationEvent.Signal.unlock.menu.operation) { + return OperationEvent.Signal.unlock.confirm.domId; + } return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : ''; }, title() { @@ -276,8 +279,8 @@ export default { unlock() { switch (this.popClass) { case 'chengdou-03__systerm': - this.sendCommandNext(menuOperate.Signal.unlock).then(operate => { - this.$refs.password.doShow(operate); + this.sendCommandNext({operation:OperationEvent.Signal.unlock.confirm.operation}).then(operate => { + this.$refs.password.doShow({operation:OperationEvent.Signal.unlock.menu.operation}); }); break; default: this.sendCommand(menuOperate.Signal.unlock); diff --git a/src/jmapNew/theme/components/menus/dialog/sectionControl.vue b/src/jmapNew/theme/components/menus/dialog/sectionControl.vue index 6d2bc097e..4de896c45 100644 --- a/src/jmapNew/theme/components/menus/dialog/sectionControl.vue +++ b/src/jmapNew/theme/components/menus/dialog/sectionControl.vue @@ -85,6 +85,9 @@ export default { return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : ''; }, domIdConfirm() { + if (this.operation == OperationEvent.Section.fault.menu.operation) { + return OperationEvent.Section.fault.confirm.domId; + } return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : ''; }, title() { @@ -187,7 +190,7 @@ export default { // 区故解 fault() { const operate = { - operation: OperationEvent.Section.fault.menu.operation + operation: OperationEvent.Section.fault.confirm.operation }; this.loading = true; this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { @@ -195,7 +198,7 @@ export default { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.doClose(); - this.$refs.passwordBox.doShow(operate); + this.$refs.passwordBox.doShow({operation: OperationEvent.Section.fault.menu.operation}); } }).catch(() => { this.loading = false; diff --git a/src/jmapNew/theme/components/menus/dialog/switchControl.vue b/src/jmapNew/theme/components/menus/dialog/switchControl.vue index 4010a5333..303952c07 100644 --- a/src/jmapNew/theme/components/menus/dialog/switchControl.vue +++ b/src/jmapNew/theme/components/menus/dialog/switchControl.vue @@ -110,6 +110,13 @@ export default { return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : ''; }, domIdConfirm() { + if (this.operation == OperationEvent.Switch.fault.menu.operation) { + return OperationEvent.Switch.fault.confirm.domId; + } else if (this.operation == OperationEvent.Switch.unblock.menu.operation) { + return OperationEvent.Switch.unblock.confirm.domId; + } else if (this.operation == OperationEvent.Switch.block.menu.operation) { + return OperationEvent.Switch.block.confirm.domId; + } return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : ''; }, title() { @@ -226,11 +233,10 @@ export default { block() { switch (this.popClass) { case 'chengdou-03__systerm': - this.openPasswordBox(this.operation); + this.openPasswordBox(OperationEvent.Switch.block); break; default: this.sendCommand(menuOperate.Switch.block); } - }, // 道岔定位 locate() { @@ -260,7 +266,7 @@ export default { unblock() { switch (this.popClass) { case 'chengdou-03__systerm': - this.openPasswordBox(this.operation); + this.openPasswordBox(OperationEvent.Switch.unblock); break; default: this.sendCommand(menuOperate.Switch.unblock); } @@ -269,7 +275,7 @@ export default { fault() { switch (this.popClass) { case 'chengdou-03__systerm': - this.openPasswordBox(this.operation); + this.openPasswordBox(OperationEvent.Switch.fault); break; default: this.sendCommand(menuOperate.Switch.fault); } @@ -280,9 +286,9 @@ export default { }, // 打开密码输入框 - openPasswordBox(operation) { + openPasswordBox(operator) { const operate = { - operation: operation + operation: operator.confirm.operation }; this.loading = true; this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { @@ -290,7 +296,7 @@ export default { if (valid) { this.doClose(); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.passwordBox.doShow(operate); + this.$refs.passwordBox.doShow({operation:operator.menu.operation}); } }).catch(() => { this.doClose(); diff --git a/src/views/jlmap3d/edit/jlmap3dedit.vue b/src/views/jlmap3d/edit/jlmap3dedit.vue index d12d98b82..677b0f0c2 100644 --- a/src/views/jlmap3d/edit/jlmap3dedit.vue +++ b/src/views/jlmap3d/edit/jlmap3dedit.vue @@ -38,7 +38,7 @@ import axios from 'axios'; import { update3dMapData } from '@/api/jlmap3d/load3ddata' import { initDataSave } from '@/jlmap3d/edit/connect/initDataSave'; - import { testgetmodels } from '@/jlmap3d/edit/connect/testgetmodels'; + import { specilDataSave } from '@/jlmap3d/edit/connect/specilDataSave'; //components import EditProperty from '@/views/jlmap3d/edit/component/property'; import EditAction from '@/views/jlmap3d/edit/component/action'; @@ -220,7 +220,7 @@ savetest(){ console.log(this.jlmap3dedit.assetManager); - let param = testgetmodels(this.jlmap3dedit); + let param = specilDataSave(this.jlmap3dedit); console.log(param); update3dMapData(param).then(data => { //console.log(data); diff --git a/src/views/lesson/trainingRule/addBatch.vue b/src/views/lesson/trainingRule/addBatch.vue index 591c4074f..dbabf749c 100644 --- a/src/views/lesson/trainingRule/addBatch.vue +++ b/src/views/lesson/trainingRule/addBatch.vue @@ -19,7 +19,6 @@