From 96ad7becf293953be422417e9181b5f6fe2c3771 Mon Sep 17 00:00:00 2001 From: ival <610568032@qq.com> Date: Fri, 5 Mar 2021 15:39:08 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../planMonitor/editTool/menus/addTask.vue | 182 ++++++------------ 1 file changed, 60 insertions(+), 122 deletions(-) diff --git a/src/views/planMonitor/editTool/menus/addTask.vue b/src/views/planMonitor/editTool/menus/addTask.vue index a5be4561a..503bd63ee 100644 --- a/src/views/planMonitor/editTool/menus/addTask.vue +++ b/src/views/planMonitor/editTool/menus/addTask.vue @@ -171,6 +171,7 @@ diff --git a/src/views/planMonitor/newEditTool/index.vue b/src/views/planMonitor/newEditTool/index.vue index d89113a81..9ef1bf2d0 100644 --- a/src/views/planMonitor/newEditTool/index.vue +++ b/src/views/planMonitor/newEditTool/index.vue @@ -3,22 +3,20 @@ @@ -26,31 +24,27 @@ - - - + - - + + + - - @@ -64,7 +58,6 @@ import AddPlanningTrain from './menus/addPlanningTrain'; import EditPlanningTrain from './menus/editPlanningTrain'; import EditPlanName from './menus/editPlanName'; import DuplicateTrain from './menus/duplicateTrain'; -import MovePlaningTrain from './menus/movePlaningTrain'; import SystermOut from './menus/systermOut'; import AddTask from './menus/addTask'; import DeleteTask from './menus/deleteTask'; @@ -72,18 +65,13 @@ import ModifyingTask from './menus/modifyingTask'; import ModifyingRouting from './menus/modifyingRouting'; import ModifyingBeginTime from './menus/modifyingBeginTime'; import EditStationBetweenTime from './menus/editStationBetweenTime'; -import AddSmoothRunTime from './menus/addSmoothRunTime'; -import EditSmoothRunTime from './menus/editSmoothRunTime'; -// import ModifyingStationIntervalTime from './menus/modifyingStationIntervalTime'; -// import PopulatingGenericData from './menus/populatingGenericData'; -import PopulatingGenericData from '../editTool/menus/populatingGenericData'; -import CreateEmptyPlan from './menus/createEmptyPlan'; -import GernaratePlan from '../editTool/menus/gernaratePlanTrain'; -import ModifyingStationStopTime from '../editTool/menus/modifyingStationStopTime'; -import ModifyingStationIntervalTime from '../editTool/menus/modifyingStationIntervalTime'; +import GernaratePlan from './menus/gernaratePlanTrain'; +import MovePlaningTrain from './menus/movePlaningTrain'; +import ModifyingStationIntervalTime from './menus/modifyingStationIntervalTime'; +import ModifyingStationStopTime from './menus/modifyingStationStopTime'; +import PopulatingGenericData from './menus/populatingGenericData'; import { deletePlanService } from '@/api/runplan'; import { checkLoginLine } from '@/api/login'; -import { getRpListByMapId } from '@/api/runplan'; import { loadMapDataById } from '@/utils/loaddata'; export default { @@ -105,13 +93,12 @@ export default { ModifyingRouting, ModifyingBeginTime, EditStationBetweenTime, - AddSmoothRunTime, - EditSmoothRunTime, + // AddSmoothRunTime, + // EditSmoothRunTime, ModifyingStationIntervalTime, - CreateEmptyPlan, + ModifyingStationStopTime, EditPlanName, GernaratePlan, - ModifyingStationStopTime, MovePlaningTrain }, data() { @@ -120,18 +107,19 @@ export default { timeDemon: null, runPlanList: [], loadRunPlanId: '', - loadRunPlanName: '' + loadRunPlanName: '', + runplanLoading:false }; }, computed: { lineCode() { - return this.$route.query.lineCode; - }, - width() { - return this.$store.state.app.width; - }, - height() { - return this.$store.state.app.height; + return this.$route.query.lineCode || '02'; + } + }, + watch: { + '$store.state.map.mapDataLoadedCount': function (val) { + this.loadRunPlanId = this.$route.query.planId; + this.runplanLoading = false; } }, created() { @@ -141,6 +129,7 @@ export default { this.timeDemon = setInterval(() => { checkLoginLine(); }, 5000 * 60); + this.loadRunPlanName = this.$route.query.planName; if (this.$route.query.mapId) { this.refreshRunPlanList(true); await this.loadMap(); @@ -166,6 +155,11 @@ export default { } }); }, + async loadMap() { + this.runplanLoading = true; + // 加载地图数据 + loadMapDataById(this.$route.query.mapId, 'parse'); + }, handleConfirm(params) { if (params.operate == 'AddPlanningTrain') { // 添加计划 @@ -173,13 +167,14 @@ export default { } else if (params.operate == 'DeletePlanningTrain') { // 删除计划 const model = { - planId: this.loadRunPlanId, + planId: this.$route.query.planId, serviceNumber: params.serviceNumber }; deletePlanService(model).then(resp => { this.$message.success(this.$t('tip.deletePlanSuccessfully')); - this.$store.dispatch('runPlan/setDraftSelected', {}); + this.$store.dispatch('runPlan/setSelected', {}); this.$store.dispatch('runPlan/refresh'); + // this.$refs.openRunPlan.loadRunPlanData(Object.assign({refresh: true}, this.$route.query)); }).catch(() => { this.$messageBox(this.$t('tip.deletePlanFailed')); }); @@ -193,37 +188,19 @@ export default { refresh() { this.$store.dispatch('runPlan/refresh'); }, - async loadMap() { - this.runplanLoading = true; - // 加载地图数据 - loadMapDataById(this.$route.query.mapId, 'parse'); - }, - refreshRunPlanList(planId) { - getRpListByMapId(this.$route.query.mapId).then(resp => { - this.runPlanList = resp.data || []; - if (planId && this.runPlanList.length) { - this.runPlanList.forEach(item => { - if (item.id === planId) { - this.loadRunPlanId = item.id; - this.loadRunPlanName = item.name; - } - }); - } else { - this.loadRunPlanId = ''; - this.loadRunPlanName = ''; - } - }).catch(() => { - this.$message.error('获取草稿运行图列表失败'); - }); + refreshRunPlanList(firstLoad) { + }, doClose() { - // this.$emit('doClose'); - window.close(); + this.$emit('doClose'); }, loadingRunPlan(param) { this.loadRunPlanId = param.planId; this.loadRunPlanName = param.planName; }, + checkIsLoadRunPlan(planId) { + this.refreshRunPlanList(planId === this.loadRunPlanId); + }, modifyRunPlanName() { if (this.loadRunPlanId && this.loadRunPlanName) { this.$refs.editPlan.doShow({id: this.loadRunPlanId, name: this.loadRunPlanName}); @@ -233,7 +210,7 @@ export default { }, refreshRunPlanName(name) { this.$refs.schedule.refreshRunPlanName(name); - this.refreshRunPlanList(); + this.$router.replace({ path: this.$route.path, query: { ...this.$route.query, planName: name }}); } } }; @@ -274,298 +251,4 @@ export default { .planEdit__tool { overflow: hidden !important; } - - /* .planEdit__tool .el-dialog { - overflow: hidden !important; - background: rgba(202, 221, 253, 0.88);; - box-shadow: 1px hsla(240, 0%, 100%, 0.5) inset; - border: 2px solid #727375; - border-radius: 4px; - color: #000; - font-size: 14px; - } - - .planEdit__tool .el-dialog .el-dialog__header { - height: 30px; - padding: 5px; - } - - .planEdit__tool .el-dialog .el-dialog__footer { - background: #ECE9D8; - opacity: 1; - } - - .planEdit__tool .el-dialog .el-dialog__body { - padding-top: 10px; - padding-bottom: 10px; - padding-left: 5px; - padding-right: 5px; - margin: 0px 3px 3px 3px; - border: 2px solid rgba(120, 121, 123, 0.5); - box-shadow: 1px hsla(240, 0%, 100%, 0.5) inset; - color: #000; - background: #ECE9D8; - opacity: 1; - } - - .planEdit__tool .el-dialog .el-dialog__title { - font-size: 16px; - } - - .planEdit__tool .el-dialog .el-dialog__headerbtn { - background: -webkit-linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770); - background: -o-linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770); - background: -moz-linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770); - background: linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770); - border: 1px solid white; - border-radius: 4px; - top: 0px; - right: 3px; - line-height: 26px; - width: 26px; - } - - .planEdit__tool .el-dialog .el-dialog__headerbtn .el-icon-close:before { - font-size: 16px; - } - - .planEdit__tool .el-dialog .el-dialog__headerbtn .el-dialog__close { - color: #fff; - } - - .planEdit__tool .el-dialog .el-tabs--top { - border: 2px outset #FEFEFD; - border-radius: 4px; - } - - .planEdit__tool .el-dialog .el-tabs__item { - height: 30px; - line-height: 30px; - text-align: center; - color: #000 !important; - border-right: 2px outset #fff; - padding-left: 10px !important; - padding-right: 10px !important; - } - - .planEdit__tool .el-dialog .el-tab-pane { - margin: 10px !important; - } - - .planEdit__tool .el-dialog .el-tabs--card>.el-tabs__header .el-tabs__item.is-active { - border-bottom: none - } - - .planEdit__tool .el-dialog .el-tabs--card>.el-tabs__header .el-tabs__item:not(.is-active) { - border-bottom: 2px inset #fff - } - - .planEdit__tool .el-dialog .el-form { - background: #ECE9D8 !important; - } - - .planEdit__tool .el-dialog .el-card { - background: #ECE9D8 !important; - } - - .planEdit__tool .el-dialog .el-button { - height: 32px; - line-height: 32px; - padding: 0px; - width: 80px; - border: 2px outset #E2E2E2; - border-radius: 0px !important; - color: #000; - background: #ECE9D8; - } - - .planEdit__tool .el-dialog .expand { - width: 120px; - } - - .planEdit__tool .el-dialog .el-button:focus span { - border: 1px dashed gray; - } - - .planEdit__tool .el-dialog .el-button:active { - border: 2px inset #E2E2E2; - } - - .planEdit__tool .el-dialog .el-button:disabled { - border: 2px inset #E2E2E2; - } - - .planEdit__tool .el-dialog .el-button:disabled span { - border: 0px; - } - - .planEdit__tool .el-dialog .button-group { - margin-top: 10px; - } - - .planEdit__tool .el-dialog .el-input { - border: 2px inset #E9E9E9; - } - - .planEdit__tool .el-dialog .el-input .el-input__inner { - color: #000; - background: #fff !important; - border: 0px; - border-radius: 0px !important; - box-sizing: border-box; - } - - .planEdit__tool .el-dialog .el-input.is-disabled .el-input__inner { - background: #F0F0F0 !important; - } - - .planEdit__tool .el-dialog .el-textarea { - border: 2px inset #E9E9E9; - border-radius: 0px; - } - - .planEdit__tool .el-dialog .el-textarea .el-textarea__inner { - color: #000; - background: #fff !important; - border: 0px; - border-radius: 0px !important; - box-sizing: border-box; - } - - .planEdit__tool .el-dialog .el-textarea.is-disabled .el-textarea__inner { - background: #F0F0F0 !important; - } - - .planEdit__tool .el-dialog .el-table { - border: 2px inset #E9E9E9; - color: #000 !important; - } - - .planEdit__tool .el-dialog .el-table .cell { - line-height: unset !important; - } - - .planEdit__tool .el-dialog .el-table th.is-leaf { - background: #ECE9D8 !important; - border-right: 1px solid #BDBDBD !important; - border-bottom: 1px solid #BDBDBD !important; - color: #000 !important; - height: 20px !important; - padding: 0px; - } - - .planEdit__tool .el-dialog .el-table tr td { - height: 20px !important; - padding: 0px; - } - - .planEdit__tool .el-dialog .el-table .el-table__empty-text { - top: 15px !important; - } - - .planEdit__tool .el-dialog .current-row>td { - background: #316AC5 !important; - color: #fff !important; - } - - .planEdit__tool .el-dialog .el-checkbox__inner { - border: 1px inset #dcdfe6 !important; - } - - .planEdit__tool .el-dialog .el-checkbox__label { - color: #000 !important; - } - - .planEdit__tool .el-dialog .el-checkbox.is-disabled .el-checkbox__inner { - background: #E6E6E6 !important; - } - - .planEdit__tool .el-dialog .el-checkbox.is-disabled .el-checkbox__label { - color: #C5C9CC !important; - } - - .planEdit__tool .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner { - background: #fff !important; - border: 1px inset #dcdfe6 !important; - } - - .planEdit__tool .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner::after { - position: absolute; - -webkit-box-sizing: content-box; - box-sizing: content-box; - content: ""; - border: 1px solid #000; - border-left: 0; - border-top: 0; - height: 7px; - left: 4px; - top: 1px; - } - - .planEdit__tool .el-dialog .el-radio__inner { - border: 1px inset #dcdfe6 !important; - } - - .planEdit__tool .el-dialog .el-radio__label { - color: #000 !important; - } - - .planEdit__tool .el-dialog .el-radio__input.is-checked .el-radio__inner { - background: #fff !important; - border: 1px inset #dcdfe6 !important; - } - - .planEdit__tool .el-dialog .el-radio__input.is-checked .el-radio__inner::after { - width: 4px; - height: 4px; - border-radius: 100%; - background-color: #000 !important; - position: absolute; - left: 50%; - top: 50%; - } - - .planEdit__tool .el-dialog .el-radio.is-disabled .el-radio__inner { - background: #E6E6E6 !important; - } - - .planEdit__tool .el-dialog .el-radio.is-disabled .el-radio__label { - color: #C5C9CC !important; - } - - .planEdit__tool .el-dialog .base-label { - background: rgba(0, 0, 0, x); - position: relative; - left: -15px; - top: -18px; - } - - .planEdit__tool .el-dialog .el-form-item label { - font-weight: normal !important; - color: #000 !important; - } - - .planEdit__tool .el-dialog .context { - height: 100px; - border: 2px inset #E2E2E2; - overflow-y: scroll; - } - - .planEdit__tool .el-dialog .table { - margin-top: 10px; - } - - .planEdit__tool .el-dialog .notice { - margin-left: 62px; - line-height: 30px; - } - - .planEdit__tool .el-dialog .button-group { - margin-top: 10px; - } - - .planEdit__tool .el-dialog .el-tree__empty-block { - background: #E9E9E9 !important; - color: #000 !important; - } */ diff --git a/src/views/planMonitor/newEditTool/menuBar.vue b/src/views/planMonitor/newEditTool/menuBar.vue index 438ef1d3e..d2b438fa9 100644 --- a/src/views/planMonitor/newEditTool/menuBar.vue +++ b/src/views/planMonitor/newEditTool/menuBar.vue @@ -37,11 +37,9 @@ -