运行图代码调整

This commit is contained in:
joylink_cuiweidong 2021-12-09 17:56:54 +08:00
parent 8b86a8ddeb
commit a97f83ef45
10 changed files with 151 additions and 94 deletions

View File

@ -1,16 +1,5 @@
<template>
<el-dialog
v-dialogDrag
class="planEdit__tool add-task"
:title="title"
:visible.sync="dialogShow"
width="880px"
:before-close="doClose"
:z-index="2000"
top="50px"
:modal="false"
:close-on-click-modal="false"
>
<div>
<el-row>
<!-- <el-col :span="3" style="height: 28px;line-height: 28px;">
<el-radio v-model="addModel.forward" :label="true">{{ $t('planMonitor.addToTheFront') }}</el-radio>
@ -173,11 +162,11 @@
<el-checkbox v-model="showDefault">{{ $t('planMonitor.showDefaultStopTimeAndRunLevel') }}</el-checkbox>
</el-col>
</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>
@ -189,21 +178,20 @@ export default {
name: 'AddTask',
components: {
},
props: {
loadRunPlanId: {
type: String,
default() {
return '';
}
}
},
// props: {
// loadRunPlanId: {
// type: String,
// default() {
// return '';
// }
// }
// },
data() {
return {
dialogShow: false,
loading: false,
tableLoading:false,
routeLoading:false,
isPlan: false,
loadRunPlanId:'',
// showDefault: true,
stopStationMap: {},
stopTimeMap:{},
@ -248,11 +236,6 @@ export default {
}
};
},
computed: {
title() {
return this.$t('planMonitor.addTask');
}
},
watch: {
'addModel.routingCode': function (val) {
if (val) {
@ -268,6 +251,7 @@ export default {
},
methods: {
loadInitData(params) {
this.loadRunPlanId = params.loadRunPlanId;
this.isPlan = params.isPlan;
this.addModel.serviceNumber = params.serviceNumber;
this.addModel.planId = this.$route.query.planId || this.loadRunPlanId;
@ -320,10 +304,6 @@ export default {
});
}
},
doShow(params) {
this.loadInitData(params);
this.dialogShow = true;
},
filterStartStation(value, row) {
return row.startStationCode == value;
},
@ -331,8 +311,7 @@ export default {
return row.endStationCode == value;
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$emit('doClose');
},
formatName(code) {
return formatName(code);

View File

@ -1,26 +1,16 @@
<template>
<el-dialog
v-dialogDrag
class="planEdit__tool delete-task"
:title="title"
:visible.sync="dialogShow"
width="400px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div>
<el-row>
<el-radio v-model="model.deleteBefore" :label="true">{{ $t('planMonitor.deleteAllPreviousTasks') }}</el-radio>
</el-row>
<el-row>
<el-radio v-model="model.deleteBefore" :label="false">{{ $t('planMonitor.deleteAllSubsequentTasks') }}</el-radio>
</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>
@ -30,19 +20,18 @@ export default {
name: 'DeleteTask',
components: {
},
props: {
loadRunPlanId: {
type: String,
default() {
return '';
}
}
},
// props: {
// loadRunPlanId: {
// type: String,
// default() {
// return '';
// }
// }
// },
data() {
return {
dialogShow: false,
loading: false,
isPlan: false,
loadRunPlanId:'',
model: {
routingCode: '',
deleteBefore: false,
@ -51,25 +40,19 @@ export default {
}
};
},
computed: {
title() {
return this.$t('planMonitor.deleteTask');
}
},
mounted() {
},
methods: {
doShow(params) {
loadInitData(params) {
this.loadRunPlanId = params.loadRunPlanId;
this.isPlan = params.isPlan;
this.model.taskIndex = params.taskIndex;
this.model.tripNumber = params.tripNumber;
this.model.serviceNumber = params.serviceNumber;
this.model.routingCode = params.routingCode;
this.dialogShow = true;
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$emit('doClose');
},
handleCommit() {
if (this.isPlan) {

View File

@ -212,8 +212,9 @@ export default {
},
handleAddTask() {
this.$emit('dispatchDialog', {
name: 'addTask', params: {
name: 'showDialog', params: {
isPlan: true,
dialogType:'addTask',
taskIndex: this.currentRow.taskIndex,
serviceNumber: this.model.serviceNumber,
tripNumber: this.currentRow.tripNumber

View File

@ -0,0 +1,77 @@
<template>
<el-dialog
v-dialogDrag
class="planEdit__tool task-dialog"
:title="title"
:visible.sync="dialogShow"
:width="width"
:before-close="doClose"
:z-index="2000"
top="50px"
:modal="false"
:close-on-click-modal="false"
>
<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" />
</el-dialog>
</template>
<script>
import AddTask from './addTask';
import DeleteTask from './deleteTask';
export default {
name: 'TaskDialog',
components: {
AddTask,
DeleteTask
},
props: {
loadRunPlanId: {
type: String,
default() {
return '';
}
}
},
data() {
return {
dialogShow: false,
title:'',
dialogType:'',
width:'400px'
};
},
methods: {
doShow(params) {
const dialogMap = {
'addTask':{
title:this.$t('planMonitor.addTask'),
width:'880px'
},
'deleteTask':{
title:this.$t('planMonitor.deleteTask'),
width:'400px'
}
};
const dialog = dialogMap[params.dialogType];
this.title = dialog.title;
this.width = dialog.width;
this.dialogType = params.dialogType;
this.dialogShow = true;
params.loadRunPlanId = this.loadRunPlanId;
this.$nextTick(()=>{
this.$refs[this.dialogType].loadInitData(params);
});
},
doClose() {
this.dialogShow = false;
},
dispatchOperate(data) {
this.$emit('dispatchOperate', data);
},
refresh() {
this.$emit('refresh');
}
}
};
</script>

View File

@ -39,8 +39,11 @@
<move-planing-train ref="movePlaningTrain" :load-run-plan-id="loadRunPlanId" @dispatchDialog="dispatchDialog" @dispatchOperate="dispatchOperate" @refresh="refresh" />
<!-- 检查运行图-->
<systerm-out ref="systermOut" />
<add-task ref="addTask" @dispatchOperate="dispatchOperate" @refresh="refresh" />
<delete-task ref="deleteTask" @dispatchOperate="dispatchOperate" @refresh="refresh" />
<!-- <add-task ref="addTask" @dispatchOperate="dispatchOperate" @refresh="refresh" /> -->
<!-- <delete-task ref="deleteTask" @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" />
@ -60,8 +63,7 @@ import EditPlanningTrain from '../components/menus/editPlanningTrain';
import EditPlanName from '../components/menus/editPlanName';
import DuplicateTrain from '../components/menus/duplicateTrain';
import SystermOut from '../components/menus/systermOut';
import AddTask from '../components/menus/addTask';
import DeleteTask from '../components/menus/deleteTask';
import TaskDialog from '../components/menus/taskDialog';
import ModifyingTask from '../components/menus/modifyingTask';
import MovePlaningTrain from '../components/menus/movePlaningTrain';
import ModifyingStationIntervalTime from '../components/menus/modifyingStationIntervalTime';
@ -81,8 +83,7 @@ export default {
EditPlanningTrain,
DuplicateTrain,
SystermOut,
AddTask,
DeleteTask,
TaskDialog,
ModifyingTask,
// AddSmoothRunTime,
// EditSmoothRunTime,
@ -208,7 +209,7 @@ export default {
.plan-tool {
position: absolute;
overflow: hidden;
&::before {
// &::before {
// content: '';
// position: absolute;
// width: 100%;
@ -217,7 +218,7 @@ export default {
// top: 0;
// background-image: url(https://www.cnblogs.com/skins/imetro/images/background.jpg);
// filter: blur(30px);
}
// }
}
.scheduleIn{
width:100%;

View File

@ -122,7 +122,8 @@ import { planEffectiveCheck, runPlanNotify, clearPlaningData } from '@/api/runpl
import { launchFullscreen } from '@/utils/screen';
import { UrlConfig } from '@/scripts/ConstDic';
import { EventBus } from '@/scripts/event-bus';
import { publishRunPlan, deleteRunPlan } from '@/api/designPlatform';
// deleteRunPlan
import { publishRunPlan } from '@/api/designPlatform';
export default {
name: 'PlanMenuBar',
@ -570,7 +571,9 @@ export default {
handleAddTask() {
const params = this.$store.state.runPlan.selected;
if (params.serviceNumber && params.tripNumber) {
this.$emit('dispatchDialog', { name: 'addTask', params });
// this.$emit('dispatchDialog', { name: 'addTask', params });
params.dialogType = 'addTask';
this.$emit('dispatchDialog', { name: 'showDialog', params });
} else {
this.$messageBox(this.$t('tip.selectATrain'));
}
@ -579,7 +582,9 @@ export default {
handleDeleteTask() {
const params = this.$store.state.runPlan.selected;
if (params.serviceNumber && params.tripNumber) {
this.$emit('dispatchDialog', { name: 'deleteTask', params });
// this.$emit('dispatchDialog', { name: 'deleteTask', params });
params.dialogType = 'deleteTask';
this.$emit('dispatchDialog', { name: 'showDialog', params });
} else {
this.$messageBox(this.$t('tip.selectATrain'));
}

View File

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

View File

@ -37,8 +37,9 @@
<move-planing-train ref="movePlaningTrain" :load-run-plan-id="loadRunPlanId" @dispatchDialog="dispatchDialog" @dispatchOperate="dispatchOperate" @refresh="refresh" />
<systerm-out ref="systermOut" />
<add-task ref="addTask" :load-run-plan-id="loadRunPlanId" @dispatchOperate="dispatchOperate" @refresh="refresh" />
<delete-task ref="deleteTask" :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" />
@ -60,8 +61,7 @@ import EditPlanningTrain from '../components/menus/editPlanningTrain';
import EditPlanName from '../components/menus/editPlanName';
import DuplicateTrain from '../components/menus/duplicateTrain';
import SystermOut from '../components/menus/systermOut';
import AddTask from '../components/menus/addTask';
import DeleteTask from '../components/menus/deleteTask';
import TaskDialog from '../components/menus/taskDialog';
import ModifyingTask from '../components/menus/modifyingTask';
import MovePlaningTrain from '../components/menus/movePlaningTrain';
import ModifyingStationIntervalTime from '../components/menus/modifyingStationIntervalTime';
@ -83,8 +83,7 @@ export default {
EditPlanningTrain,
DuplicateTrain,
SystermOut,
AddTask,
DeleteTask,
TaskDialog,
ModifyingTask,
// AddSmoothRunTime,
// EditSmoothRunTime,

View File

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

View File

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