This commit is contained in:
fan 2021-12-10 17:20:40 +08:00
commit fe5450fb08
11 changed files with 34 additions and 67 deletions

View File

@ -178,14 +178,6 @@ export default {
name: 'AddTask',
components: {
},
// props: {
// loadRunPlanId: {
// type: String,
// default() {
// return '';
// }
// }
// },
data() {
return {
tableLoading:false,

View File

@ -20,14 +20,6 @@ export default {
name: 'DeleteTask',
components: {
},
// props: {
// loadRunPlanId: {
// type: String,
// default() {
// return '';
// }
// }
// },
data() {
return {
isPlan: false,

View File

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

View File

@ -1,16 +1,5 @@
<template>
<el-dialog
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"
>
<div>
<el-row>
<el-col :span="6">
<el-row>
@ -119,11 +108,11 @@
</el-table-column>
</el-table>
</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 type="primary" size="medium" @click="handleCommit">{{ $t('global.confirm') }}</el-button>
</span>
</el-dialog>
</div>
</div>
</template>
<script>
import { updatePlanTrip, getMapStationRunUser, getStationStopTime } from '@/api/runplan';
@ -134,19 +123,10 @@ export default {
name: 'ModifyingTask',
components: {
},
props: {
loadRunPlanId: {
type: String,
default() {
return '';
}
}
},
data() {
return {
dialogShow: false,
loading: false,
isPlan: false,
loadRunPlanId:'',
PlanParser: {},
parkSectionCodeList:[],
stopStationMap: {},
@ -184,11 +164,6 @@ export default {
}
};
},
computed: {
title() {
return this.$t('planMonitor.modifying.modifyTask');
}
},
watch: {
'editModel.startTime': function () {
this.computedDetailList();
@ -290,6 +265,7 @@ export default {
this.tripNumber = params.tripNumber;
this.serviceNumber = params.serviceNumber;
this.planId = this.$route.query.planId;
this.loadRunPlanId = params.loadRunPlanId;
this.PlanParser = this.$theme.loadPlanParser(lineCode);
if (mapId) {
@ -309,7 +285,7 @@ export default {
this.stopTimeMap[element.stationCode] = {parkingTime:element.parkingTime};
});
this.initTaskData(params);
this.dialogShow = true;
// this.dialogShow = true;
});
});
}
@ -411,7 +387,7 @@ export default {
}
this.initRunlevel(this.editModel);
this.dialogShow = true;
// this.dialogShow = true;
this.computedDetailList();
}
}
@ -451,8 +427,7 @@ export default {
this.loadInitData(params);
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$emit('doClose');
},
buildModel() {
return {

View File

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

View File

@ -41,13 +41,9 @@
<systerm-out ref="systermOut" />
<!-- <add-task ref="addTask" @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" />
<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" />
</div>
</template>
@ -64,7 +60,6 @@ import EditPlanName from '../components/menus/editPlanName';
import DuplicateTrain from '../components/menus/duplicateTrain';
import SystermOut from '../components/menus/systermOut';
import TaskDialog from '../components/menus/taskDialog';
import ModifyingTask from '../components/menus/modifyingTask';
import MovePlaningTrain from '../components/menus/movePlaningTrain';
import ModifyingStationIntervalTime from '../components/menus/modifyingStationIntervalTime';
import ModifyingStationStopTime from '../components/menus/modifyingStationStopTime';
@ -84,7 +79,6 @@ export default {
DuplicateTrain,
SystermOut,
TaskDialog,
ModifyingTask,
// AddSmoothRunTime,
// EditSmoothRunTime,
ModifyingStationIntervalTime,

View File

@ -593,7 +593,9 @@ export default {
handleModifyingTask() {
const params = this.$store.state.runPlan.selected;
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 {
this.$messageBox(this.$t('tip.selectATrain'));
}

View File

@ -125,7 +125,9 @@ export default {
handleModifyingTask() {
const params = this.$store.state.runPlan.selected;
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 {
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" />
<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" />
@ -62,7 +60,6 @@ import EditPlanName from '../components/menus/editPlanName';
import DuplicateTrain from '../components/menus/duplicateTrain';
import SystermOut from '../components/menus/systermOut';
import TaskDialog from '../components/menus/taskDialog';
import ModifyingTask from '../components/menus/modifyingTask';
import MovePlaningTrain from '../components/menus/movePlaningTrain';
import ModifyingStationIntervalTime from '../components/menus/modifyingStationIntervalTime';
import ModifyingStationStopTime from '../components/menus/modifyingStationStopTime';
@ -84,7 +81,6 @@ export default {
DuplicateTrain,
SystermOut,
TaskDialog,
ModifyingTask,
// AddSmoothRunTime,
// EditSmoothRunTime,
ModifyingStationIntervalTime,

View File

@ -662,7 +662,9 @@ export default {
handleModifyingTask() {
const params = this.$store.state.runPlan.draftSelected;
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 {
this.$messageBox(this.$t('tip.selectATrain'));
}

View File

@ -132,7 +132,9 @@ export default {
handleModifyingTask() {
const params = this.$store.state.runPlan.draftSelected;
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 {
this.$messageBox(this.$t('tip.selectATrain'));
}