宁波三列车操作调整
This commit is contained in:
parent
2d5b863231
commit
f5e00dd717
@ -233,12 +233,12 @@ export default {
|
||||
children: [
|
||||
{
|
||||
title: '站台',
|
||||
operate:'',
|
||||
operate: OperationEvent.Signal.arrangementRoute.toStand,
|
||||
click: this.handleArrangeRoute
|
||||
},
|
||||
{
|
||||
title: '信号机',
|
||||
operate:'',
|
||||
operate: OperationEvent.Signal.arrangementRoute.toSignal,
|
||||
click: this.handleArrangeRoute
|
||||
}
|
||||
]
|
||||
@ -249,12 +249,12 @@ export default {
|
||||
children: [
|
||||
{
|
||||
title: '运行线',
|
||||
operate:'',
|
||||
operate: OperationEvent.Train.destinationTrainId.menu,
|
||||
click: this.handleTrainDistributionRunLine
|
||||
},
|
||||
{
|
||||
title: '班次',
|
||||
operate:'',
|
||||
operate: OperationEvent.Train.trainDistribute.menu,
|
||||
click: this.handleTrainDistributionClass
|
||||
},
|
||||
{
|
||||
@ -270,7 +270,7 @@ export default {
|
||||
children: [
|
||||
{
|
||||
title: '发车',
|
||||
operate:'',
|
||||
operate: OperationEvent.Train.setTrainDeparture.menu,
|
||||
click: this.setTrainDepart
|
||||
},
|
||||
{
|
||||
@ -1013,12 +1013,12 @@ export default {
|
||||
children: [
|
||||
{
|
||||
title: '站台',
|
||||
operate:'',
|
||||
operate: OperationEvent.Signal.arrangementRoute.toStand,
|
||||
click: this.handleArrangeRoute
|
||||
},
|
||||
{
|
||||
title: '信号机',
|
||||
operate:'',
|
||||
operate: OperationEvent.Signal.arrangementRoute.toSignal,
|
||||
click: this.handleArrangeRoute
|
||||
}
|
||||
]
|
||||
@ -1029,12 +1029,12 @@ export default {
|
||||
children: [
|
||||
{
|
||||
title: '运行线',
|
||||
operate:'',
|
||||
operate: OperationEvent.Train.destinationTrainId.menu,
|
||||
click: this.handleTrainDistributionRunLine
|
||||
},
|
||||
{
|
||||
title: '班次',
|
||||
operate:'',
|
||||
operate: OperationEvent.Train.trainDistribute.menu,
|
||||
click: this.handleTrainDistributionClass
|
||||
},
|
||||
{
|
||||
@ -1050,7 +1050,7 @@ export default {
|
||||
children: [
|
||||
{
|
||||
title: '发车',
|
||||
operate:'',
|
||||
operate:OperationEvent.Train.setTrainDeparture.menu,
|
||||
click: this.setTrainDepart
|
||||
},
|
||||
{
|
||||
@ -1905,7 +1905,7 @@ export default {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.arrangeRoute.doShow();
|
||||
this.$refs.arrangeRoute.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -1929,7 +1929,7 @@ export default {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainDistribution.doShow(operate, 'second');
|
||||
this.$refs.trainDistribution.doShow(operate, 'third');
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -1941,7 +1941,7 @@ export default {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainDistribution.doShow(operate, 'third');
|
||||
this.$refs.trainDistribution.doShow(operate, 'second');
|
||||
}
|
||||
});
|
||||
},
|
||||
|
@ -2,13 +2,17 @@
|
||||
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="1000px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-table :data="tableData" height="397px" style="margin-top: 57px" highlight-current-row @current-change="handleTrainChange">
|
||||
<el-table ref="trainTable" :data="tableData" height="397px" style="margin-top: 57px" highlight-current-row @current-change="handleTrainChange">
|
||||
<el-table-column label="列车">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="groupNumber" label="班次" />
|
||||
<el-table-column prop="groupNumber" label="班次">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ getServiceNum(scope.row) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="运行线">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ getTrainDestinationCode(scope.row) }}</span>
|
||||
@ -32,7 +36,7 @@
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12" :offset="1">
|
||||
<el-table :data="tempData" height="340px" highlight-current-row @current-change="handlePathChange">
|
||||
<el-table ref="pathTable" :data="tempData" height="340px" highlight-current-row @current-change="handlePathChange">
|
||||
<el-table-column prop="groupNumber" label="路径" />
|
||||
<el-table-column prop="groupNumber" label="运行方向">
|
||||
<template slot-scope="scope">
|
||||
@ -47,7 +51,7 @@
|
||||
<el-tab-pane label="信号机" name="second">
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-table :data="signalList" height="380px" highlight-current-row @current-change="handleSignalChange">
|
||||
<el-table ref="signalTable" :data="signalList" height="380px" highlight-current-row @current-change="handleSignalChange">
|
||||
<el-table-column prop="name" label="信号机" />
|
||||
<el-table-column prop="show" label="显示" />
|
||||
</el-table>
|
||||
@ -70,7 +74,7 @@
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="4" :offset="1">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定(O)</el-button>
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="commitDisabled" @click="commit">确定(O)</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="2">
|
||||
<el-button>应用(A)</el-button>
|
||||
@ -138,6 +142,9 @@ export default {
|
||||
},
|
||||
title() {
|
||||
return '列车排进路';
|
||||
},
|
||||
commitDisabled() {
|
||||
return !(this.routeCodeList && this.routeCodeList.length);
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -158,8 +165,17 @@ export default {
|
||||
this.selectTrainCode = '';
|
||||
this.selectStandCode = '';
|
||||
this.selectSignalCode = '';
|
||||
this.tempData = [];
|
||||
this.tableData = this.$store.state.map.activeTrainList;
|
||||
if (operate.operation === OperationEvent.Signal.arrangementRoute.toStand) {
|
||||
this.activeName = 'first';
|
||||
} else if (operate.operation === OperationEvent.Signal.arrangementRoute.toSignal) {
|
||||
this.activeName = 'second';
|
||||
}
|
||||
this.$nextTick(function () {
|
||||
this.$refs.trainTable && this.$refs.trainTable.setCurrentRow();
|
||||
this.$refs.pathTable && this.$refs.pathTable.setCurrentRow();
|
||||
this.$refs.signalTable && this.$refs.signalTable.setCurrentRow();
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
@ -169,6 +185,10 @@ export default {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
getServiceNum(code) {
|
||||
const train = this.$store.getters['map/getDeviceByCode'](code);
|
||||
return (train || {}).serviceNumber;
|
||||
},
|
||||
getTrainDestinationCode(trainCode) {
|
||||
const train = this.$store.getters['map/getDeviceByCode'](trainCode);
|
||||
return train.destinationCode;
|
||||
@ -233,7 +253,7 @@ export default {
|
||||
over: true,
|
||||
operation: OperationEvent.Train.trainSetRoute.confirm.operation,
|
||||
cmdType: CMD.Train.CMD_TRAIN_SET_ROUTE,
|
||||
param: { routes: this.routeCodeList }
|
||||
param: { routeCodes: this.routeCodeList, groupNumber: this.selectTrainCode }
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({valid}) => {
|
||||
if (valid) {
|
||||
|
@ -1,17 +1,29 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="600px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<el-row>
|
||||
<el-table :data="trainList" height="300px">
|
||||
<el-table-column prop="code" label="列车" />
|
||||
<el-table-column prop="interval" label="班次" />
|
||||
<el-table ref="trainTable" :data="tableData" height="300px" highlight-current-row @current-change="handleCurrentChange">
|
||||
<el-table-column prop="code" label="列车">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="interval" label="班次">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ getServiceNum(scope.row) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="isDepart" prop="interval" label="模式" />
|
||||
<el-table-column v-if="isDepart" prop="interval" label="状态" />
|
||||
<el-table-column v-if="isDepart||isBreakAway" prop="interval" label="运行线" />
|
||||
<el-table-column v-if="isDepart||isBreakAway" prop="interval" label="运行线">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ getTrainDestinationCode(scope.row) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="4" :offset="1">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定(O)</el-button>
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selectTrainCode" @click="commit">确定(O)</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="2">
|
||||
<el-button>应用(A)</el-button>
|
||||
@ -30,7 +42,7 @@
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
// import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { mapGetters } from 'vuex';
|
||||
|
||||
export default {
|
||||
@ -46,13 +58,12 @@ export default {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
activeName: 'first',
|
||||
operate: {}
|
||||
operate: {},
|
||||
tableData: [],
|
||||
selectTrainCode: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'trainList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
@ -101,7 +112,10 @@ export default {
|
||||
this.operate = operate;
|
||||
// 如果不是断点激活,而是第一次显示,则需要设置初始值
|
||||
this.dialogShow = true;
|
||||
this.selectTrainCode = '';
|
||||
this.tableData = this.$store.state.map.activeTrainList;
|
||||
this.$nextTick(function () {
|
||||
this.$refs.trainTable && this.$refs.trainTable.setCurrentRow();
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
@ -110,10 +124,35 @@ export default {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
getServiceNum(code) {
|
||||
const train = this.$store.getters['map/getDeviceByCode'](code);
|
||||
return (train || {}).serviceNumber;
|
||||
},
|
||||
getTrainDestinationCode(trainCode) {
|
||||
const train = this.$store.getters['map/getDeviceByCode'](trainCode);
|
||||
return train.destinationCode;
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Train.trainSetRoute.confirm.operation,
|
||||
cmdType: CMD.Train.CMD_TRAIN_DEPARTURE,
|
||||
param: { groupNumber: this.selectTrainCode }
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({valid}) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
handleClick() {
|
||||
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.selectTrainCode = val;
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
|
@ -2,8 +2,8 @@
|
||||
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="1000px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-table :id="domIdChoose" ref="trainTable" :data="tableData" height="397px" style="margin-top: 57px" :highlight-current-row="true" @current-change="handleChangeTrain">
|
||||
<el-table-column prop="trainName" label="列车" />
|
||||
<el-table :id="domIdChoose" ref="trainTable" :cell-style="getCellStyle" :data="tableData" height="397px" style="margin-top: 57px" :highlight-current-row="true" @current-change="handleChangeTrain">
|
||||
<el-table-column prop="code" label="列车" />
|
||||
<!-- <el-table-column prop="groupNumber" label="班次" /> -->
|
||||
<el-table-column prop="runPathName" label="运行线" />
|
||||
<!-- <el-table-column prop="length" label="长度" />
|
||||
@ -35,7 +35,7 @@
|
||||
</el-row>
|
||||
<el-row style="margin-top: 20px;">
|
||||
<el-col :span="12" style="padding-right: 10px;">
|
||||
<el-table height="160px">
|
||||
<el-table ref="pathTable" height="160px">
|
||||
<el-table-column prop="path" label="路径" />
|
||||
<el-table-column prop="direction" label="运行方向" />
|
||||
</el-table>
|
||||
@ -46,10 +46,14 @@
|
||||
</el-row>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="班次" name="third">
|
||||
<el-table :data="trainList" height="382px">
|
||||
<el-table-column prop="class" label="班次" />
|
||||
<el-table ref="serviceTable" :data="serviceNumberDataList" height="382px" highlight-current-row @current-change="handleServiceChange">
|
||||
<el-table-column prop="serviceNumber" label="班次" />
|
||||
<el-table-column prop="length" label="长度" />
|
||||
<el-table-column prop="code" label="列车" />
|
||||
<el-table-column prop="code" label="列车">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ getTrainName(scope.row) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
@ -98,7 +102,10 @@ export default {
|
||||
selectStandCode: '',
|
||||
showPath: false,
|
||||
selectedTrain:'',
|
||||
selectedRunPath:''
|
||||
selectedRunPath:'',
|
||||
selectedService: '',
|
||||
serviceNumberDataList: [],
|
||||
operate: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -109,9 +116,6 @@ export default {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
// selected() {
|
||||
// return this.$store.state.menuOperation.selected;
|
||||
// },
|
||||
domIdClose() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
@ -130,16 +134,15 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
'$store.state.map.runLineTrainUpdate': function (val) {
|
||||
if (val) {
|
||||
this.getTrainList();
|
||||
this.status = true;
|
||||
} else {
|
||||
this.tableData = [];
|
||||
}
|
||||
}
|
||||
// '$store.state.training.runPathList':function(val) {
|
||||
// console.log(val);
|
||||
// if (val) {
|
||||
// // this.getTrainList();
|
||||
// this.status = true;
|
||||
// } else {
|
||||
// // this.tableData = [];
|
||||
// }
|
||||
// this.$refs.trainTable && this.$refs.trainTable.doLayout();
|
||||
this.tableData = [...this.trainList];
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
getSimulationDestinationList(this.$route.query.group).then(res=>{
|
||||
@ -154,13 +157,18 @@ export default {
|
||||
console.log('展开进路预览');
|
||||
},
|
||||
doShow(operate, activeName) {
|
||||
this.getTrainList();
|
||||
// this.$store.dispatch('menuOperation/setSelected', {device: selected});
|
||||
// this.getTrainList();
|
||||
this.tableData = [];
|
||||
this.tableData = [...this.trainList];
|
||||
this.operate = operate;
|
||||
this.activeName = activeName;
|
||||
this.serviceNumberDataList = this.$store.state.runPlan.serviceNumberDataList;
|
||||
// 如果不是断点激活,而是第一次显示,则需要设置初始值
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$refs.runLineTable && this.$refs.runLineTable.setCurrentRow();
|
||||
this.$refs.serviceTable && this.$refs.serviceTable.setCurrentRow();
|
||||
});
|
||||
},
|
||||
getTrainList() {
|
||||
@ -177,6 +185,13 @@ export default {
|
||||
this.tableData.push({code:train.groupNumber + ':' + train.serviceNumber, trainName:trainName, runPathName:destinationCode});
|
||||
});
|
||||
},
|
||||
getCellStyle(data) {
|
||||
if (this.$store.state.map.activeTrainList.includes(data.row.code)) {
|
||||
return { color: '#000' };
|
||||
} else {
|
||||
return { color: '#808080' };
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
@ -197,7 +212,6 @@ export default {
|
||||
const trainInfo = this.selectedTrain.split(':');
|
||||
const params = {
|
||||
groupNumber: trainInfo[0],
|
||||
destinationCode: this.selectedRunPath,
|
||||
serviceNumber: trainInfo[1]
|
||||
};
|
||||
const steps = {
|
||||
@ -205,7 +219,14 @@ export default {
|
||||
over: true,
|
||||
param:params
|
||||
};
|
||||
if (this.activeName === 'third') {
|
||||
steps.cmdType = CMD.Train.CMD_TRAIN_DISTRIBUTE;
|
||||
steps.operation = isClose ? OperationEvent.Train.trainDistribute.confirm.operation : OperationEvent.Command.common.apply.operation;
|
||||
steps.param.serviceNumber = this.selectedService;
|
||||
} else if (this.activeName === 'first') {
|
||||
steps.cmdType = CMD.TrainWindow.CMD_TRAIN_SET_HEAD;
|
||||
steps.param.destinationCode = this.selectedRunPath;
|
||||
}
|
||||
this.$store.dispatch('training/nextNew', steps).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.loading = false;
|
||||
@ -213,7 +234,7 @@ export default {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
}).catch(() => {
|
||||
}).catch((e) => {
|
||||
isClose && this.doClose();
|
||||
this.loading = false;
|
||||
this.$refs.noticeInfo.doShow();
|
||||
@ -221,14 +242,32 @@ export default {
|
||||
|
||||
},
|
||||
handleClick() {
|
||||
this.selectedRunPath = '';
|
||||
this.selectedService = '';
|
||||
this.$refs.runLineTable && this.$refs.runLineTable.setCurrentRow();
|
||||
this.$refs.serviceTable && this.$refs.serviceTable.setCurrentRow();
|
||||
},
|
||||
judgeCanCommit() {
|
||||
if (this.selectedTrain && this.selectedRunPath) {
|
||||
if (this.selectedTrain && (this.selectedRunPath || this.selectedService)) {
|
||||
this.status = false;
|
||||
} else {
|
||||
this.status = true;
|
||||
}
|
||||
},
|
||||
handleServiceChange(row) {
|
||||
if (!row) { return; }
|
||||
const step = {
|
||||
operation: OperationEvent.Train.trainDistribute.selected2.operation,
|
||||
params: { serviceNumber: row.serviceNumber }
|
||||
};
|
||||
const _that = this;
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
_that.selectedService = row.serviceNumber;
|
||||
_that.judgeCanCommit();
|
||||
}
|
||||
});
|
||||
},
|
||||
handleChange(row) {
|
||||
if (row) {
|
||||
const runPath = row.runPath;
|
||||
@ -286,6 +325,10 @@ export default {
|
||||
},
|
||||
handleChangeTrain(row) {
|
||||
if (row) {
|
||||
if (!this.$store.state.map.activeTrainList.includes(row.code)) {
|
||||
this.$refs.trainTable && this.$refs.trainTable.setCurrentRow();
|
||||
return;
|
||||
}
|
||||
const step = {
|
||||
code: row.code,
|
||||
operation: OperationEvent.Command.common.choose.operation,
|
||||
@ -304,8 +347,17 @@ export default {
|
||||
|
||||
}
|
||||
},
|
||||
getTrainName(data) {
|
||||
const nowDate = new Date();
|
||||
const time = nowDate.getHours() * 3600 + nowDate.getMinutes() * 60 + nowDate.getSeconds();
|
||||
const trip = data.tripNumberDataList.find((item) => {
|
||||
return item.startSecondTime <= time && item.endSecondTime >= time;
|
||||
});
|
||||
if (trip) {
|
||||
return data.serviceNumber + trip.tripNumber;
|
||||
}
|
||||
},
|
||||
setRunPath(runPath, isShow) {
|
||||
// console.log(isShow, runPath);
|
||||
runPath.forEach(sectionCode=>{
|
||||
const section = this.$store.getters['map/getDeviceByCode'](sectionCode);
|
||||
if (section && section.instance) {
|
||||
|
@ -2,25 +2,33 @@
|
||||
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="500px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<el-row>
|
||||
<el-col :span="14">
|
||||
<el-table :data="trainList" height="300px">
|
||||
<el-table-column prop="code" label="列车" />
|
||||
<el-table ref="trainTable" :data="tableData" height="300px" :highlight-current-row="true" @current-change="handleChangeTrain">
|
||||
<el-table-column prop="code" label="列车">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="area" label="模式" />
|
||||
<el-table-column prop="status" label="运行类型" />
|
||||
<el-table-column prop="status" label="运行类型">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ getRunType(scope.row) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-col>
|
||||
<el-col :span="10" style="padding-left: 5px;color: #000;">
|
||||
<el-table :data="runTypeList" height="250px">
|
||||
<el-table ref="runTypeTable" :data="runTypeList" height="250px" :highlight-current-row="true" @current-change="handleChangeRunType">
|
||||
<el-table-column prop="label" label="运行类型" />
|
||||
</el-table>
|
||||
<div style="margin-top: 10px;">
|
||||
<el-checkbox v-model="allCheck" style="display: inline-block;">所有列车(I)</el-checkbox>
|
||||
<el-checkbox v-model="allCheck" :disabled="true" style="display: inline-block;">所有列车(I)</el-checkbox>
|
||||
<el-button style="display: inline-block;">复位(R)</el-button>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="4" :offset="1">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定(O)</el-button>
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="commitDisabled" @click="commit">确定(O)</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="2">
|
||||
<el-button>应用(A)</el-button>
|
||||
@ -39,7 +47,7 @@
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { mapGetters } from 'vuex';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'ModifyTrainNumber',
|
||||
@ -57,22 +65,28 @@ export default {
|
||||
operate: {},
|
||||
allCheck: false,
|
||||
slidingTime: 0,
|
||||
data: [],
|
||||
tableData: [],
|
||||
trainId: '',
|
||||
groupNumber: '',
|
||||
selectTrainCode: '',
|
||||
selectRunType: '',
|
||||
runTypeList: [
|
||||
{label: '节能', value: 1},
|
||||
{label: '中间的2', value: 2},
|
||||
{label: '中间的1', value: 3},
|
||||
{label: '正常', value: 4},
|
||||
{label: '加速', value: 5}
|
||||
]
|
||||
{label: '节能', value: 'ENERGY_CONSERVATION'},
|
||||
{label: '中间的2', value: 'MIDDLE_TWO'},
|
||||
{label: '中间的1', value: 'MIDDLE_ONE'},
|
||||
{label: '正常', value: 'NORMAL'},
|
||||
{label: '加速', value: 'ACCELERATE'}
|
||||
],
|
||||
runTypeMap: {
|
||||
ENERGY_CONSERVATION: '节能',
|
||||
MIDDLE_TWO: '中间的2',
|
||||
MIDDLE_ONE: '中间的1',
|
||||
NORMAL: '正常',
|
||||
ACCELERATE: '加速'
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'trainList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
@ -88,8 +102,11 @@ export default {
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : '';
|
||||
},
|
||||
commitDisabled() {
|
||||
return !(this.selectTrainCode && this.selectRunType);
|
||||
},
|
||||
title() {
|
||||
return '修改列车描述号';
|
||||
return '设置列车运行类型';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -97,13 +114,21 @@ export default {
|
||||
if (this.show) {
|
||||
this.commit();
|
||||
}
|
||||
},
|
||||
'$store.state.map.runLineTrainUpdate': function (val) {
|
||||
this.tableData = [...this.$store.state.map.activeTrainList];
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
// 如果不是断点激活,而是第一次显示,则需要设置初始值
|
||||
this.dialogShow = true;
|
||||
this.selectRunType = '';
|
||||
this.selectTrainCode = '';
|
||||
this.tableData = [...this.$store.state.map.activeTrainList];
|
||||
this.$nextTick(function () {
|
||||
this.$refs.trainTable && this.$refs.trainTable.setCurrentRow();
|
||||
this.$refs.runTypeTable && this.$refs.runTypeTable.setCurrentRow();
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
@ -112,10 +137,56 @@ export default {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
getRunType(code) {
|
||||
const train = this.$store.getters['map/getDeviceByCode'](code);
|
||||
if (train) {
|
||||
return this.runTypeMap[train.runType];
|
||||
}
|
||||
},
|
||||
handleClick() {
|
||||
|
||||
commit() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Train.trainSetRunType.confirm.operation,
|
||||
cmdType: CMD.Train.CMD_TRAIN_SET_RUN_TYPE,
|
||||
param: { runType: this.selectRunType, groupNumber: this.selectTrainCode }
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({valid}) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
handleChangeRunType(row) {
|
||||
if (row) {
|
||||
this.selectRunType = row.value;
|
||||
}
|
||||
},
|
||||
handleChangeTrain(code) {
|
||||
this.selectTrainCode = code;
|
||||
const train = this.$store.getters['map/getDeviceByCode'](code);
|
||||
if (train) {
|
||||
this.selectRunType = train.runType;
|
||||
switch (train.runType) {
|
||||
case 'ENERGY_CONSERVATION':
|
||||
this.$refs.runTypeTable && this.$refs.runTypeTable.setCurrentRow(this.runTypeList[0]);
|
||||
break;
|
||||
case 'MIDDLE_TWO':
|
||||
this.$refs.runTypeTable && this.$refs.runTypeTable.setCurrentRow(this.runTypeList[1]);
|
||||
break;
|
||||
case 'MIDDLE_ONE':
|
||||
this.$refs.runTypeTable && this.$refs.runTypeTable.setCurrentRow(this.runTypeList([2]));
|
||||
break;
|
||||
case 'NORMAL':
|
||||
this.$refs.runTypeTable && this.$refs.runTypeTable.setCurrentRow(this.runTypeList[3]);
|
||||
break;
|
||||
case 'ACCELERATE':
|
||||
this.$refs.runTypeTable && this.$refs.runTypeTable.setCurrentRow(this.runTypeList[4]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
|
@ -269,7 +269,13 @@ export default {
|
||||
CMD_TRAIN_ORDER_STOP: {value: 'Train_Order_Stop', label:'下令停车'},
|
||||
/** 取消停车命令 */
|
||||
CMD_TRAIN_CANCEL_ORDER_STOP: {value: 'Train_Cancel_Order_Stop', label:'取消停车命令'},
|
||||
CMD_TRAIN_SET_ROUTE: {value: 'Train_Set_Route', label: '列车排列进路'}
|
||||
CMD_TRAIN_SET_ROUTE: {value: 'Train_Set_Route', label: '列车排列进路'},
|
||||
/** 列车发车(泰雷兹) */
|
||||
CMD_TRAIN_DEPARTURE: {value: 'Train_Departure', label: '列车发车'},
|
||||
/** 分配班次 */
|
||||
CMD_TRAIN_DISTRIBUTE: {value: 'Train_Distribute', label: '分配班次'},
|
||||
/** 设置运行类型 */
|
||||
CMD_TRAIN_SET_RUN_TYPE : {value: 'Train_Set_Run_Type', label: '设置运行类型' }
|
||||
},
|
||||
TrainWindow: {
|
||||
/** 修改列车识别号 */
|
||||
|
@ -58,7 +58,6 @@ class CommandHandle {
|
||||
getDefinition(cmdType) {
|
||||
if (cmdType) {
|
||||
const simulationRole = Handler.getSimulationRole();
|
||||
|
||||
if (simulationRole) {
|
||||
return this.definitionMap[simulationRole][cmdType.value] || this.definitionMap.Common[cmdType.value] || null;
|
||||
} else {
|
||||
|
@ -627,7 +627,7 @@ export const OperationEvent = {
|
||||
// 锁闭区段
|
||||
line_sectionLock: {
|
||||
operation: '00c',
|
||||
domId: '_Tips-ningBo-line_sectionLock{TOP}',
|
||||
domId: '_Tips-ningBo-line_sectionLock{TOP}'
|
||||
},
|
||||
// 取消转换锁闭
|
||||
line_sectionLock_cancelTransferLock: {
|
||||
@ -1294,6 +1294,14 @@ export const OperationEvent = {
|
||||
secondaryConfirm: {
|
||||
operation: '3014',
|
||||
domId: '_Tips-Signal-ArrangementRoute-SecondaryConfirm'
|
||||
},
|
||||
toStand: {
|
||||
operation: '3015',
|
||||
domId: '_Tips-Signal-ArrangementRoute-ToStand'
|
||||
},
|
||||
toSignal: {
|
||||
operation: '3016',
|
||||
domId: '_Tips-Signal-ArrangementRoute-ToSignal'
|
||||
}
|
||||
},
|
||||
// 取消进路
|
||||
@ -3076,6 +3084,42 @@ export const OperationEvent = {
|
||||
operation: '70r1',
|
||||
domId: '_Tips-Train-trainSetRoute-Confirm'
|
||||
}
|
||||
},
|
||||
trainDistribute: {
|
||||
menu: {
|
||||
operation: '70s',
|
||||
domId: '_Tips-Train-trainDistribute-Menu'
|
||||
},
|
||||
selected1: {
|
||||
operation: '70s1',
|
||||
domId: '_Tips-Train-trainDistribute-Selected1'
|
||||
},
|
||||
selected2: {
|
||||
operation: '70s2',
|
||||
domId: '_Tips-Train-trainDistribute-Selected2'
|
||||
},
|
||||
confirm: {
|
||||
operation: '70s3',
|
||||
domId: '_Tips-Train-trainDistribute-Confirm'
|
||||
}
|
||||
},
|
||||
trainSetRunType: {
|
||||
menu: {
|
||||
operation: '70t',
|
||||
domId: '_Tips-Train-trainSetRunType-Menu'
|
||||
},
|
||||
selected1: {
|
||||
operation: '70t1',
|
||||
domId: '_Tips-Train-trainSetRunType-Selected1'
|
||||
},
|
||||
selected2: {
|
||||
operation: '70t2',
|
||||
domId: '_Tips-Train-trainSetRunType-Selected2'
|
||||
},
|
||||
confirm: {
|
||||
operation: '70t3',
|
||||
domId: '_Tips-Train-trainSetRunType-Confirm'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -17,7 +17,8 @@ const runPlan = {
|
||||
draftStations: [], // 草稿运行图车站列表
|
||||
runPlanMap: {}, // 运行图数据map(以id和version 为标识)
|
||||
runPlanInfo: {}, // 运行图信息
|
||||
loadRunPlanCount: 0 // 运行图加载数据完成
|
||||
loadRunPlanCount: 0, // 运行图加载数据完成
|
||||
serviceNumberDataList: [] // 运行图数据
|
||||
},
|
||||
getters: {
|
||||
stations: (state) => {
|
||||
@ -68,6 +69,7 @@ const runPlan = {
|
||||
state.planData = data;
|
||||
state.editData = {};
|
||||
if (data && data.serviceNumberDataList && data.serviceNumberDataList.length) {
|
||||
state.serviceNumberDataList = data.serviceNumberDataList;
|
||||
const serviceList = data.serviceNumberDataList;
|
||||
serviceList.forEach((service, i) => {
|
||||
const trainList = service.tripNumberDataList;
|
||||
@ -117,6 +119,7 @@ const runPlan = {
|
||||
state.planData = {};
|
||||
state.editData = {};
|
||||
state.selected = {};
|
||||
state.serviceNumberDataList = [];
|
||||
},
|
||||
draftClear: (state) => {
|
||||
state.draftPlanData = {};
|
||||
|
@ -2,10 +2,10 @@ export function getBaseUrl() {
|
||||
let BASE_API;
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
// BASE_API = 'https://joylink.club/jlcloud';
|
||||
BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
// BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
// BASE_API = 'http://192.168.8.107:9000'; // 袁琪
|
||||
// BASE_API = 'http://192.168.8.169:9000'; // 旭强
|
||||
// BASE_API = 'http://192.168.8.119:9000'; // 张赛
|
||||
BASE_API = 'http://192.168.8.119:9000'; // 张赛
|
||||
// BASE_API = 'http://192.168.8.140:9000'; // 杜康
|
||||
// BASE_API = 'http://b29z135112.zicp.vip';
|
||||
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
|
||||
|
Loading…
Reference in New Issue
Block a user