运行图编制 修改任务 代码调整

This commit is contained in:
joylink_cuiweidong 2021-12-10 14:16:25 +08:00
parent bc89210894
commit cc431582e7
9 changed files with 32 additions and 43 deletions

View File

@ -224,8 +224,9 @@ export default {
handleEditTask() { handleEditTask() {
if (this.currentRow.id) { if (this.currentRow.id) {
this.$emit('dispatchDialog', { this.$emit('dispatchDialog', {
name: 'modifyingTask', params: { name: 'showDialog', params: {
isPlan: true, isPlan: true,
dialogType:'modifyingTask',
serviceNumber: this.model.serviceNumber, serviceNumber: this.model.serviceNumber,
tripNumber: this.currentRow.tripNumber, tripNumber: this.currentRow.tripNumber,
rowData:this.currentRow rowData:this.currentRow

View File

@ -1,16 +1,5 @@
<template> <template>
<el-dialog <div>
v-dialogDrag
class="planEdit__tool add-task"
:title="title"
:visible.sync="dialogShow"
width="1000px"
:before-close="doClose"
:z-index="2000"
top="50px"
:modal="false"
:close-on-click-modal="false"
>
<el-row> <el-row>
<el-col :span="6"> <el-col :span="6">
<el-row> <el-row>
@ -119,11 +108,11 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-row> </el-row>
<span slot="footer" class="dialog-footer"> <div style="text-align:center;margin-top:15px;">
<el-button size="medium" @click="doClose">{{ $t('global.cancel') }}</el-button> <el-button size="medium" @click="doClose">{{ $t('global.cancel') }}</el-button>
<el-button type="primary" size="medium" @click="handleCommit">{{ $t('global.confirm') }}</el-button> <el-button type="primary" size="medium" @click="handleCommit">{{ $t('global.confirm') }}</el-button>
</span> </div>
</el-dialog> </div>
</template> </template>
<script> <script>
import { updatePlanTrip, getMapStationRunUser, getStationStopTime } from '@/api/runplan'; import { updatePlanTrip, getMapStationRunUser, getStationStopTime } from '@/api/runplan';
@ -144,8 +133,6 @@ export default {
}, },
data() { data() {
return { return {
dialogShow: false,
loading: false,
isPlan: false, isPlan: false,
PlanParser: {}, PlanParser: {},
parkSectionCodeList:[], parkSectionCodeList:[],
@ -184,11 +171,6 @@ export default {
} }
}; };
}, },
computed: {
title() {
return this.$t('planMonitor.modifying.modifyTask');
}
},
watch: { watch: {
'editModel.startTime': function () { 'editModel.startTime': function () {
this.computedDetailList(); this.computedDetailList();
@ -309,7 +291,7 @@ export default {
this.stopTimeMap[element.stationCode] = {parkingTime:element.parkingTime}; this.stopTimeMap[element.stationCode] = {parkingTime:element.parkingTime};
}); });
this.initTaskData(params); this.initTaskData(params);
this.dialogShow = true; // this.dialogShow = true;
}); });
}); });
} }
@ -411,7 +393,7 @@ export default {
} }
this.initRunlevel(this.editModel); this.initRunlevel(this.editModel);
this.dialogShow = true; // this.dialogShow = true;
this.computedDetailList(); this.computedDetailList();
} }
} }
@ -451,8 +433,7 @@ export default {
this.loadInitData(params); this.loadInitData(params);
}, },
doClose() { doClose() {
this.loading = false; this.$emit('doClose');
this.dialogShow = false;
}, },
buildModel() { buildModel() {
return { return {

View File

@ -13,17 +13,21 @@
> >
<add-task v-if="dialogType =='addTask'" ref="addTask" @dispatchOperate="dispatchOperate" @refresh="refresh" @doClose="doClose" /> <add-task v-if="dialogType =='addTask'" ref="addTask" @dispatchOperate="dispatchOperate" @refresh="refresh" @doClose="doClose" />
<delete-task v-if="dialogType =='deleteTask'" ref="deleteTask" @dispatchOperate="dispatchOperate" @refresh="refresh" @doClose="doClose" /> <delete-task v-if="dialogType =='deleteTask'" ref="deleteTask" @dispatchOperate="dispatchOperate" @refresh="refresh" @doClose="doClose" />
<modifying-task v-if="dialogType =='modifyingTask'" ref="modifyingTask" @dispatchOperate="dispatchOperate" @refresh="refresh" @doClose="doClose" />
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import AddTask from './addTask'; import AddTask from './addTask';
import DeleteTask from './deleteTask'; import DeleteTask from './deleteTask';
import ModifyingTask from './modifyingTask';
export default { export default {
name: 'TaskDialog', name: 'TaskDialog',
components: { components: {
AddTask, AddTask,
DeleteTask DeleteTask,
ModifyingTask
}, },
props: { props: {
loadRunPlanId: { loadRunPlanId: {
@ -51,6 +55,10 @@ export default {
'deleteTask':{ 'deleteTask':{
title:this.$t('planMonitor.deleteTask'), title:this.$t('planMonitor.deleteTask'),
width:'400px' width:'400px'
},
'modifyingTask':{
title:this.$t('planMonitor.modifying.modifyTask'),
width:'1000px'
} }
}; };
const dialog = dialogMap[params.dialogType]; const dialog = dialogMap[params.dialogType];
@ -65,6 +73,7 @@ export default {
}, },
doClose() { doClose() {
this.dialogShow = false; this.dialogShow = false;
this.dialogType = '';
}, },
dispatchOperate(data) { dispatchOperate(data) {
this.$emit('dispatchOperate', data); this.$emit('dispatchOperate', data);

View File

@ -41,13 +41,9 @@
<systerm-out ref="systermOut" /> <systerm-out ref="systermOut" />
<!-- <add-task ref="addTask" @dispatchOperate="dispatchOperate" @refresh="refresh" /> --> <!-- <add-task ref="addTask" @dispatchOperate="dispatchOperate" @refresh="refresh" /> -->
<!-- <delete-task ref="deleteTask" @dispatchOperate="dispatchOperate" @refresh="refresh" /> --> <!-- <delete-task ref="deleteTask" @dispatchOperate="dispatchOperate" @refresh="refresh" /> -->
<!-- <modifying-task ref="modifyingTask" :load-run-plan-id="loadRunPlanId" @dispatchOperate="dispatchOperate" @refresh="refresh" /> -->
<task-dialog ref="showDialog" @dispatchOperate="dispatchOperate" @refresh="refresh" /> <task-dialog ref="showDialog" @dispatchOperate="dispatchOperate" @refresh="refresh" />
<modifying-task ref="modifyingTask" :load-run-plan-id="loadRunPlanId" @dispatchOperate="dispatchOperate" @refresh="refresh" />
<modifying-station-interval-time ref="modifyingStationIntervalTime" />
<modifying-station-stop-time ref="modifyingStationStopTime" />
<edit-plan-name ref="editPlan" @renewal="refreshRunPlanName" /> <edit-plan-name ref="editPlan" @renewal="refreshRunPlanName" />
</div> </div>
</template> </template>
@ -64,7 +60,6 @@ import EditPlanName from '../components/menus/editPlanName';
import DuplicateTrain from '../components/menus/duplicateTrain'; import DuplicateTrain from '../components/menus/duplicateTrain';
import SystermOut from '../components/menus/systermOut'; import SystermOut from '../components/menus/systermOut';
import TaskDialog from '../components/menus/taskDialog'; import TaskDialog from '../components/menus/taskDialog';
import ModifyingTask from '../components/menus/modifyingTask';
import MovePlaningTrain from '../components/menus/movePlaningTrain'; import MovePlaningTrain from '../components/menus/movePlaningTrain';
import ModifyingStationIntervalTime from '../components/menus/modifyingStationIntervalTime'; import ModifyingStationIntervalTime from '../components/menus/modifyingStationIntervalTime';
import ModifyingStationStopTime from '../components/menus/modifyingStationStopTime'; import ModifyingStationStopTime from '../components/menus/modifyingStationStopTime';
@ -84,7 +79,6 @@ export default {
DuplicateTrain, DuplicateTrain,
SystermOut, SystermOut,
TaskDialog, TaskDialog,
ModifyingTask,
// AddSmoothRunTime, // AddSmoothRunTime,
// EditSmoothRunTime, // EditSmoothRunTime,
ModifyingStationIntervalTime, ModifyingStationIntervalTime,

View File

@ -593,7 +593,9 @@ export default {
handleModifyingTask() { handleModifyingTask() {
const params = this.$store.state.runPlan.selected; const params = this.$store.state.runPlan.selected;
if (params.serviceNumber && params.tripNumber) { if (params.serviceNumber && params.tripNumber) {
this.$emit('dispatchDialog', { name: 'modifyingTask', params }); // this.$emit('dispatchDialog', { name: 'modifyingTask', params });
params.dialogType = 'modifyingTask';
this.$emit('dispatchDialog', { name: 'showDialog', params });
} else { } else {
this.$messageBox(this.$t('tip.selectATrain')); this.$messageBox(this.$t('tip.selectATrain'));
} }

View File

@ -125,7 +125,9 @@ export default {
handleModifyingTask() { handleModifyingTask() {
const params = this.$store.state.runPlan.selected; const params = this.$store.state.runPlan.selected;
if (params.serviceNumber && params.tripNumber) { if (params.serviceNumber && params.tripNumber) {
this.$emit('dispatchDialog', { name: 'modifyingTask', params }); // this.$emit('dispatchDialog', { name: 'modifyingTask', params });
params.dialogType = 'modifyingTask';
this.$emit('dispatchDialog', { name: 'showDialog', params });
} else { } else {
this.$messageBox(this.$t('tip.selectATrain')); this.$messageBox(this.$t('tip.selectATrain'));
} }

View File

@ -40,8 +40,6 @@
<task-dialog ref="showDialog" :load-run-plan-id="loadRunPlanId" @dispatchOperate="dispatchOperate" @refresh="refresh" /> <task-dialog ref="showDialog" :load-run-plan-id="loadRunPlanId" @dispatchOperate="dispatchOperate" @refresh="refresh" />
<modifying-task ref="modifyingTask" :load-run-plan-id="loadRunPlanId" @dispatchOperate="dispatchOperate" @refresh="refresh" />
<modifying-station-interval-time ref="modifyingStationIntervalTime" /> <modifying-station-interval-time ref="modifyingStationIntervalTime" />
<modifying-station-stop-time ref="modifyingStationStopTime" /> <modifying-station-stop-time ref="modifyingStationStopTime" />
<edit-plan-name ref="editPlan" @renewal="refreshRunPlanName" /> <edit-plan-name ref="editPlan" @renewal="refreshRunPlanName" />
@ -62,7 +60,6 @@ import EditPlanName from '../components/menus/editPlanName';
import DuplicateTrain from '../components/menus/duplicateTrain'; import DuplicateTrain from '../components/menus/duplicateTrain';
import SystermOut from '../components/menus/systermOut'; import SystermOut from '../components/menus/systermOut';
import TaskDialog from '../components/menus/taskDialog'; import TaskDialog from '../components/menus/taskDialog';
import ModifyingTask from '../components/menus/modifyingTask';
import MovePlaningTrain from '../components/menus/movePlaningTrain'; import MovePlaningTrain from '../components/menus/movePlaningTrain';
import ModifyingStationIntervalTime from '../components/menus/modifyingStationIntervalTime'; import ModifyingStationIntervalTime from '../components/menus/modifyingStationIntervalTime';
import ModifyingStationStopTime from '../components/menus/modifyingStationStopTime'; import ModifyingStationStopTime from '../components/menus/modifyingStationStopTime';
@ -84,7 +81,6 @@ export default {
DuplicateTrain, DuplicateTrain,
SystermOut, SystermOut,
TaskDialog, TaskDialog,
ModifyingTask,
// AddSmoothRunTime, // AddSmoothRunTime,
// EditSmoothRunTime, // EditSmoothRunTime,
ModifyingStationIntervalTime, ModifyingStationIntervalTime,

View File

@ -662,7 +662,9 @@ export default {
handleModifyingTask() { handleModifyingTask() {
const params = this.$store.state.runPlan.draftSelected; const params = this.$store.state.runPlan.draftSelected;
if (params.serviceNumber && params.tripNumber) { if (params.serviceNumber && params.tripNumber) {
this.$emit('dispatchDialog', { name: 'modifyingTask', params }); // this.$emit('dispatchDialog', { name: 'modifyingTask', params });
params.dialogType = 'modifyingTask';
this.$emit('dispatchDialog', { name: 'showDialog', params });
} else { } else {
this.$messageBox(this.$t('tip.selectATrain')); this.$messageBox(this.$t('tip.selectATrain'));
} }

View File

@ -132,7 +132,9 @@ export default {
handleModifyingTask() { handleModifyingTask() {
const params = this.$store.state.runPlan.draftSelected; const params = this.$store.state.runPlan.draftSelected;
if (params.serviceNumber && params.tripNumber) { if (params.serviceNumber && params.tripNumber) {
this.$emit('dispatchDialog', { name: 'modifyingTask', params }); // this.$emit('dispatchDialog', { name: 'modifyingTask', params });
params.dialogType = 'modifyingTask';
this.$emit('dispatchDialog', { name: 'showDialog', params });
} else { } else {
this.$messageBox(this.$t('tip.selectATrain')); this.$messageBox(this.$t('tip.selectATrain'));
} }