diff --git a/src/api/trainingManage.js b/src/api/trainingManage.js index 3d03fe652..9af992810 100644 --- a/src/api/trainingManage.js +++ b/src/api/trainingManage.js @@ -27,15 +27,22 @@ export function createTraining(data) { /** 更新当前用户的某个实训草稿 */ export function updateTraining(data) { return request({ - url: `/api/v2/draft/training`, + url: `/api/v2/draft/training/update/info`, method: 'post', data }); } +/** 查询步骤列表 */ +export function getTrainingStepList(trainingId) { + return request({ + url: `/api/v2/draft/training/${trainingId}/step/list`, + method: 'get' + }); +} /** 修改实训所有步骤 */ export function updateTrainingStep(id, data) { return request({ - url: ` /api/v2/draft/training/${id}/step/update`, + url: `/api/v2/draft/training/${id}/step/update`, method: 'put', data: data }); @@ -71,3 +78,19 @@ export function getTrainingAll(trainingId) { method: 'get' }); } +/** 单独更新当前用户的某个实训草稿的初始背景 */ +export function updateTrainingBackgroud(data) { + return request({ + url: `/api/v2/draft/training/update/content/backgroud`, + method: 'post', + data + }); +} +/** 更新当前用户实训草稿定位 */ +export function updateTrainingMaplocation(data) { + return request({ + url: `/api/v2/draft/training/update/content/maplocation`, + method: 'post', + data + }); +} diff --git a/src/components/QueryListPage/QueryListPage.vue b/src/components/QueryListPage/QueryListPage.vue index ffc413e88..43b60a9e0 100644 --- a/src/components/QueryListPage/QueryListPage.vue +++ b/src/components/QueryListPage/QueryListPage.vue @@ -657,4 +657,7 @@ export default { margin-left: 8px; } .pageContainerView{text-align: center; margin: 10px 0; height: 40px;} +.hideOutContent { + min-height: 12px; +} diff --git a/src/i18n/langs/en/trainingManage.js b/src/i18n/langs/en/trainingManage.js index b354b8476..4c414f914 100644 --- a/src/i18n/langs/en/trainingManage.js +++ b/src/i18n/langs/en/trainingManage.js @@ -10,5 +10,16 @@ export default { modify: 'modify', delete: 'delete', publish: 'publish', - preview: 'preview' + preview: 'preview', + mapLocation: 'Save map positioning', + saveBackground: 'Save Background', + saveData: 'Save Data', + stepNum: 'Step number', + stepDescription: 'Steps describe', + rulesId: 'Please enter the step number', + rulesDescription: 'Enter the prompt information', + createStepInfo: 'Creating Procedure Information', + editStepInfo: 'Modifying Step Information', + saveStepData: 'Save Step Information', + roleSelect: 'role choices' }; diff --git a/src/i18n/langs/zh/trainingManage.js b/src/i18n/langs/zh/trainingManage.js index 17c66bf3b..b84cbb897 100644 --- a/src/i18n/langs/zh/trainingManage.js +++ b/src/i18n/langs/zh/trainingManage.js @@ -10,5 +10,16 @@ export default { modify: '修改', delete: '删除', publish: '发布', - preview: '预览' + preview: '预览', + mapLocation: '保存地图定位', + saveBackground: '保存背景', + saveData: '保存数据', + stepNum: '步骤序号', + stepDescription: '步骤描述', + rulesId: '请输入步骤序号', + rulesDescription: '请输入步骤提示信息', + createStepInfo: '创建步骤信息', + editStepInfo: '修改步骤信息', + saveStepData: '保存步骤', + roleSelect: '角色选择' }; diff --git a/src/jmapNew/theme/components/utils/menuOperate.js b/src/jmapNew/theme/components/utils/menuOperate.js index 2a91b5e1e..d35626233 100644 --- a/src/jmapNew/theme/components/utils/menuOperate.js +++ b/src/jmapNew/theme/components/utils/menuOperate.js @@ -754,8 +754,14 @@ export const menuOperate = { // 增加列车固定径路 addTrainFixedPath:{ operation: OperationEvent.CTCCommand.addTrainFixedPath.menu.operation, - cmdType: CMD.CTC.CTC_ADD_RUN_PLAN_LIST_TO_EDIT_AREA + cmdType: CMD.CTC.CTC_REGULAR_TRAIN_LINE_EDIT }, + // 批量增加列车固定径路 + batchTrainFixedPath:{ + operation: OperationEvent.CTCCommand.batchTrainFixedPath.menu.operation, + cmdType: CMD.CTC.CTC_REGULAR_TRAIN_LINE_BATCH + }, + // 导入列车固定径路 importTrainFixedPath:{ operation: OperationEvent.CTCCommand.importTrainFixedPath.menu.operation, @@ -796,6 +802,16 @@ export const menuOperate = { operation: OperationEvent.CTCCommand.getTrainFixedPath.menu.operation, cmdType: CMD.CTC.CTC_REGULAR_TRAIN_LINE_LIST }, + // 获取出入口列表 + getStationDirection:{ + operation: OperationEvent.CTCCommand.getStationDirection.menu.operation, + cmdType: CMD.CTC.CTC_STATION_IO_GATE_LIST + }, + // 修改出入口 + modifyStationDirection:{ + operation: OperationEvent.CTCCommand.modifyStationDirection.menu.operation, + cmdType: CMD.CTC.CTC_STATION_IO_GATE_EDIT + }, // 出入口发布生效区 releaseStationDirection:{ operation: OperationEvent.CTCCommand.releaseStationDirection.menu.operation, diff --git a/src/scripts/ConstConfig.js b/src/scripts/ConstConfig.js index d0c665bf2..373696a28 100644 --- a/src/scripts/ConstConfig.js +++ b/src/scripts/ConstConfig.js @@ -255,8 +255,8 @@ export default { { label: 'SD', value: 'SD' } ], trainingType: [ // 实训类型 - { enlabel: 'single operation', label: '单操', value: 'single'}, - { enlabel: 'scene operation', label: '场景', value: 'scene'} + { enlabel: 'single operation', label: '单操', value: 'SINGLE'}, + { enlabel: 'scene operation', label: '场景', value: 'SCENE'} ], ioDirectionList:[ // 出入口类型 {value:'DOWN_IN_STATION', label:'下行进站'}, diff --git a/src/scripts/cmdPlugin/CommandEnum.js b/src/scripts/cmdPlugin/CommandEnum.js index 2e7506999..41216365f 100644 --- a/src/scripts/cmdPlugin/CommandEnum.js +++ b/src/scripts/cmdPlugin/CommandEnum.js @@ -442,7 +442,7 @@ export default { CTC_LOG_SET_TRANSFINITE:{value: 'CTC_LOG_SET_TRANSFINITE', label: '设置超限'}, CTC_LOG_SAVE_RUN_PLAN:{value: 'CTC_LOG_SAVE_RUN_PLAN', label: '保存运行计划'}, - CTC_ADD_RUN_PLAN_LIST_TO_EDIT_AREA:{value: 'CTC_ADD_RUN_PLAN_LIST_TO_EDIT_AREA', label: '增加列车固定径路'}, + // CTC_ADD_RUN_PLAN_LIST_TO_EDIT_AREA:{value: 'CTC_ADD_RUN_PLAN_LIST_TO_EDIT_AREA', label: '增加列车固定径路'}, CTC_COVER_RUN_PLAN_LIST_TO_EDIT_AREA:{value: 'CTC_COVER_RUN_PLAN_LIST_TO_EDIT_AREA', label: '导入列车固定径路'}, CTC_REGULAR_TRAIN_LINE_CLEAR:{value: 'REGULAR_TRAIN_LINE_CLEAR', label: '清空列车固定径路'}, CTC_REGULAR_TRAIN_LINE_DELETE:{value: 'REGULAR_TRAIN_LINE_DELETE', label: '删除列车固定径路'}, @@ -453,6 +453,10 @@ export default { CTC_REGULAR_TRAIN_LINE_LIST:{value: 'REGULAR_TRAIN_LINE_LIST', label: ' 获取固定列车径路'}, CTC_STATION_DETAIL_EDIT:{value: 'STATION_DETAIL_EDIT', label: '修改股道信息'}, CTC_STATION_IO_GATE_PUBLISH:{value: 'STATION_IO_GATE_PUBLISH', label: '出入口发布生效区'}, + CTC_STATION_IO_GATE_LIST:{value: 'STATION_IO_GATE_LIST', label: '获取出入口列表'}, + CTC_STATION_IO_GATE_EDIT:{value: 'STATION_IO_GATE_EDIT', label: '修改出入口'}, + CTC_REGULAR_TRAIN_LINE_EDIT:{value: 'REGULAR_TRAIN_LINE_EDIT', label: '增加列车固定径路'}, + CTC_REGULAR_TRAIN_LINE_BATCH:{value: 'REGULAR_TRAIN_LINE_BATCH', label: '批量增加列车固定径路'}, CTC_SET_ROUTE:{value: 'CTC_SET_ROUTE', label: 'CTC办理进路'}, diff --git a/src/scripts/cmdPlugin/OperationHandler.js b/src/scripts/cmdPlugin/OperationHandler.js index 9ad1c1bf6..4d750df27 100644 --- a/src/scripts/cmdPlugin/OperationHandler.js +++ b/src/scripts/cmdPlugin/OperationHandler.js @@ -4000,6 +4000,27 @@ export const OperationEvent = { operation: '1155', domId: '_Tips-CTC-releaseStationDirection-Menu{TOP}' } + }, + // 获取出入口列表 + getStationDirection:{ + menu: { + operation: '1156', + domId: '_Tips-CTC-getStationDirection-Menu{TOP}' + } + }, + // 修改出入口 + modifyStationDirection:{ + menu: { + operation: '1157', + domId: '_Tips-CTC-modifyStationDirection-Menu{TOP}' + } + }, + // 批量增加列车固定径路 + batchTrainFixedPath:{ + menu: { + operation: '1158', + domId: '_Tips-CTC-batchTrainFixedPath-Menu{TOP}' + } } // CTC_ZONE_SAVE_TRIP_NUMBER // CTC_ZONE_SAVE_STATION diff --git a/src/views/bigTrainRunplanManage/addRunplan.vue b/src/views/bigTrainRunplanManage/addRunplan.vue index 6ee0a68df..dba9dcc5f 100644 --- a/src/views/bigTrainRunplanManage/addRunplan.vue +++ b/src/views/bigTrainRunplanManage/addRunplan.vue @@ -22,8 +22,8 @@ /> - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + { + return stationDirection.runStatus == 'R'; + }); + this.outDirList = mapStationDirectionList.filter(stationDirection=>{ + return stationDirection.runStatus == 'D'; + }); + if (row) { + this.addModel = Object.assign({}, row); + this.title = '修改列车固定径路'; + } else { + this.title = '增加列车固定径路'; + this.addModel.stationCode = stationCode; + } this.filterSectionList = Object.values(filterSectionMap); this.dialogShow = true; - this.addModel.stationCode = stationCode; this.$nextTick(function () { this.$store.dispatch('training/emitTipFresh'); }); }, + changeEnterDirCode(code) { + const mapStationDirection = this.mapStationDirectionMap[code]; + this.addModel.backStationCode = mapStationDirection.relativeStationCode; + }, + changeOutDirCode(code) { + const mapStationDirection = this.mapStationDirectionMap[code]; + this.addModel.fontStationCode = mapStationDirection.relativeStationCode; + }, doClose() { this.loading = false; this.dialogShow = false; this.addModel = { - stationCode:'', // 车站编码 - trackSectionCode:'', // 运行计划的默认股道 - arriveTripNumber:'', // 到达车次 - departTripNumber:'', // 出发车次 + code:'', // 只有修改的时候需要添加此参数 + stationCode:'', // 车站编码code + masterCode:'', // 股道code + arriveTipNum:'', // 到达车次 + leaveTipNum:'', // 出发车次 arriveTime:'', // 到达时间 - departTime:'', // 出发时间 - arriveDirectionCode:'', // 入口 - departDirectionCode:'', // 出口 - arriveStationCode:'', // 到达车站 - departStationCode:'', // 出发车站 + leaveTime:'', // 出发时间 + enterDirCode:'', // 车站入口 + outDirCode:'', // 出口 + fontStationCode:'', // 前方车站 + backStationCode:'', // 后方车站 + // 以下参数使用前端自己的缓存数据,取logicDataNew下面的DraftMapStationDirectionList的参数: + // 1.runStatus接发口类型 R=接车,D=发车,NO=无2.relativeStationCode + // 相对车站code接车时此code指的是后方车站发车时此code指的是前方车站 appendData:{ // 附加数据 ZHUANGXIE:false, // 装卸 LIEJIAN:false, // 列检 @@ -283,10 +310,12 @@ export default { this.$refs.form.validate((valid) => { if (valid) { this.loading = true; - const param = {stationCode:this.addModel.stationCode, runPlanParamList:[this.addModel]}; + const param = Object.assign({}, this.addModel); + if (this.title == '增加列车固定径路') { delete param.code; } commitOperate(menuOperate.CTC.addTrainFixedPath, param, 3).then(({valid})=>{ if (valid) { this.doClose(); + this.$emit('refresh'); } }).catch(() => { this.doClose(); diff --git a/src/views/bigTrainRunplanManage/batchTrainFxPath.vue b/src/views/bigTrainRunplanManage/batchTrainFxPath.vue new file mode 100644 index 000000000..8a2f04acb --- /dev/null +++ b/src/views/bigTrainRunplanManage/batchTrainFxPath.vue @@ -0,0 +1,306 @@ + + + diff --git a/src/views/bigTrainRunplanManage/directionInformation.vue b/src/views/bigTrainRunplanManage/directionInformation.vue new file mode 100644 index 000000000..e6a437e8e --- /dev/null +++ b/src/views/bigTrainRunplanManage/directionInformation.vue @@ -0,0 +1,170 @@ + + + + + diff --git a/src/views/bigTrainRunplanManage/stationDirection.vue b/src/views/bigTrainRunplanManage/stationDirection.vue index b0a280052..d1537c88c 100644 --- a/src/views/bigTrainRunplanManage/stationDirection.vue +++ b/src/views/bigTrainRunplanManage/stationDirection.vue @@ -19,24 +19,99 @@
- {{ '' }} + + + + + + + + + + + + + + +
+ - diff --git a/src/views/trainingManage/create.vue b/src/views/trainingManage/create.vue index 2d2cdebc6..0bc6295c9 100644 --- a/src/views/trainingManage/create.vue +++ b/src/views/trainingManage/create.vue @@ -1,6 +1,30 @@ diff --git a/src/views/trainingManage/trainingList.vue b/src/views/trainingManage/trainingList.vue index a801e78a2..d601bddfa 100644 --- a/src/views/trainingManage/trainingList.vue +++ b/src/views/trainingManage/trainingList.vue @@ -8,7 +8,6 @@ - @@ -54,6 +53,7 @@ export default { }, { title: this.$t('trainingManage.type'), + width: '70', prop: 'type', type: 'tag', columnValue: (row) => { return this.covertData(row); }, @@ -61,12 +61,16 @@ export default { }, { title: this.$t('trainingManage.labelJson'), - prop: 'labelJson' + width: '200', + prop: 'labelJson', + type: 'tagMore', + columnValue: (row) => { return this.labelJsonData(row); }, + tagType: (row) => { return ''; } }, { type: 'button', title: this.$t('trainingManage.operate'), - width: '450', + width: '360', buttons: [ { name: this.$t('trainingManage.record'), @@ -140,9 +144,14 @@ export default { } return lastData.type; }, + labelJsonData(row) { + const sList = row.labelJson ? JSON.parse(row.labelJson) : []; + const list = Object.prototype.toString.call(sList) === '[object Array]' ? sList : [sList]; + return list; + }, drawUp(index, row) { console.log('编辑', index, row); - this.$emit('editBlob', row); + this.$emit('updateDetails', row); this.doClose(); }, handleModify(index, row) { @@ -152,22 +161,30 @@ export default { }, deleteScript(index, row) { console.log('删除', index, row); - if (!row.id) { return; } - deleteTraining([row.id]).then(res => { - console.log('删除实训成功', res); - this.getListData(); - }).catch(err => { - console.log('删除实训失败', err); - this.getListData(); - }); + this.$confirm('确定删除该条实训数据?', '警告', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + if (!row.id) { return; } + deleteTraining([row.id]).then(res => { + console.log('删除实训成功', res); + this.getListData(); + }).catch(err => { + console.log('删除实训失败', err); + this.getListData(); + }); + }).catch(e => {}); }, publishScript(index, row) { console.log('发布', index, row); if (!row.id) { return; } publishTraining({draftId: row.id}).then(res => { console.log('发布实训成功', res); + this.$message.success('发布实训成功!'); }).catch(err => { console.log('发布实训失败', err); + this.$message.error('发布实训失败'); }); }, previewScript(index, row) {