diff --git a/src/jmapNew/theme/xian_02/planConvert.js b/src/jmapNew/theme/xian_02/planConvert.js index 94dbb9b00..bdac22671 100644 --- a/src/jmapNew/theme/xian_02/planConvert.js +++ b/src/jmapNew/theme/xian_02/planConvert.js @@ -1,7 +1,7 @@ import { createMartPoint, createSeriesModel, createMarkLineModels, hexColor, convertSheetToList } from '@/utils/runPlan'; const StationMap = { - YARD1: '潏河转换轨', - YARD2: '潏河转换轨', + YARD1: '潏河停车场', + YARD2: '潏河停车场', WQN: '韦曲南站', HTC: '航天城站', FQY: '凤栖原站', @@ -84,7 +84,6 @@ export default { } if (valueStr.includes('FT') || valueStr.includes('LT')) { valueStr = valueStr.replace('FT', '').replace('LT', ''); - console.log(valueStr); } valueStr = tripObj.trainId + valueStr; delete tripObj.trainId; @@ -133,6 +132,23 @@ export default { } } } + const deleteIndexList = []; + const secondStation = ['北客站', '韦曲南站']; + const firstStation = ['潏河停车场', '渭河转换轨']; + JsonData.forEach((item, i) => { + if (item.arrivalList.length === 2 && firstStation.includes(item.arrivalList[0].stationName) && secondStation.includes(item.arrivalList[1].stationName)) { + JsonData[i + 1].arrivalList[0].arriveTime = item.arrivalList[1].arriveTime; + JsonData[i + 1].arrivalList.unshift(item.arrivalList[0]); + deleteIndexList.unshift(i); + } else if (item.arrivalList.length === 2 && firstStation.includes(item.arrivalList[1].stationName) && secondStation.includes(item.arrivalList[0].stationName)) { + JsonData[i - 1].arrivalList[JsonData[i - 1].arrivalList.length - 1].departureTime = item.arrivalList[0].departureTime; + JsonData[i - 1].arrivalList.push(item.arrivalList[1]); + deleteIndexList.unshift(i); + } + }); + deleteIndexList.forEach(item => { + JsonData.splice(item, 1); + }); return JsonData; }, diff --git a/src/views/approval/lesson/detail.vue b/src/views/approval/lesson/detail.vue index 3ffc7c72c..5c6fb5611 100644 --- a/src/views/approval/lesson/detail.vue +++ b/src/views/approval/lesson/detail.vue @@ -79,8 +79,8 @@ export default { this.lessonName = response.data[0].name; this.lessonRemark = response.data[0].remarks; this.loading = false; - }).catch(()=>{ - this.$messageBox(this.$t('approval.failedToGetCourseData')); + // }).catch(()=>{ + // this.$messageBox(this.$t('approval.failedToGetCourseData')); }); }, doClose() { diff --git a/src/views/approval/lesson/index.vue b/src/views/approval/lesson/index.vue index c4a9d334a..c0adff498 100644 --- a/src/views/approval/lesson/index.vue +++ b/src/views/approval/lesson/index.vue @@ -148,8 +148,8 @@ export default { adminPublishLesson(params, row.id).then(response => { this.$message.success(this.$t('tip.coursePublishSuccessful')); this.doClose(); - }).catch(() => { - this.$messageBox(this.$t('tip.coursePublishFailed')); + // }).catch(() => { + // this.$messageBox(this.$t('tip.coursePublishFailed')); }); }); }, @@ -169,7 +169,7 @@ export default { this.rejectId = ''; this.doClose(); }).catch(() => { - this.$messageBox(this.$t('tip.rejectedCourseReleaseApplicationSuccessful')); + // this.$messageBox(this.$t('tip.rejectedCourseReleaseApplicationSuccessful')); this.dialogFormVisible = false; this.rejectId = ''; this.doClose(); diff --git a/src/views/approval/runPlan/index.vue b/src/views/approval/runPlan/index.vue index ca7964db5..7fee995f8 100644 --- a/src/views/approval/runPlan/index.vue +++ b/src/views/approval/runPlan/index.vue @@ -137,8 +137,8 @@ export default { }; this.$router.push({ path: `${UrlConfig.display}/plan`, query: query }); launchFullscreen(); - }).catch(error => { - this.$messageBox(this.$t('tip.createSimulationFaild') + this.$t('global.colon') + error.message); + // }).catch(error => { + // this.$messageBox(this.$t('tip.createSimulationFaild') + this.$t('global.colon') + error.message); }); }, handleConfirmPass(data) { @@ -149,16 +149,16 @@ export default { this.$messageBox(`${this.$t('approval.passedRunPlanFailed')}: ${resp.data[0]}`); } this.reloadTable(); - }).catch(error => { - this.$messageBox(`${this.$t('approval.passedRunPlanFailed')}: ${error.message}`); + // }).catch(error => { + // this.$messageBox(`${this.$t('approval.passedRunPlanFailed')}: ${error.message}`); }); }, handleConfirmReject(data) { rejectRunPlan(data.id, data).then(resp => { this.reloadTable(); this.$message.success(this.$t('approval.rejectRunPlanSuccess')); - }).catch(error => { - this.$messageBox(`${this.$t('approval.rejectRunPlanFailed')}: ${error.message}`); + // }).catch(error => { + // this.$messageBox(`${this.$t('approval.rejectRunPlanFailed')}: ${error.message}`); }); } } diff --git a/src/views/approval/script/index.vue b/src/views/approval/script/index.vue index 412305d2b..ca90ab6c4 100644 --- a/src/views/approval/script/index.vue +++ b/src/views/approval/script/index.vue @@ -140,24 +140,24 @@ export default { const query = { mapId: row.mapId, group: resp.data, scriptId: row.id, try:0, lineCode:mapInfo.lineCode}; this.$router.push({ path: `${UrlConfig.design.display}/demon`, query }); launchFullscreen(); - }).catch(error => { - this.$messageBox(`${this.$t('scriptRecord.createSimulationFail')}: ${error.message}`); + // }).catch(error => { + // this.$messageBox(`${this.$t('scriptRecord.createSimulationFail')}: ${error.message}`); }); }, handleConfirmReject(data) { rejectScript(data.id, data).then(resp => { this.reloadTable(); this.$message.success(this.$t('approval.rejectScriptSuccess')); - }).catch(error => { - this.$messageBox(`${this.$t('approval.rejectScriptFailed')}: ${error.message}`); + // }).catch(error => { + // this.$messageBox(`${this.$t('approval.rejectScriptFailed')}: ${error.message}`); }); }, handleConfirmPass(data) { publishScript(data.id).then(resp => { this.reloadTable(); this.$message.success(this.$t('approval.passedScriptSuccess')); - }).catch(error => { - this.$messageBox(`${this.$t('approval.passedScriptFailed')}: ${error.message}`); + // }).catch(error => { + // this.$messageBox(`${this.$t('approval.passedScriptFailed')}: ${error.message}`); }); } }