This commit is contained in:
fan 2020-09-07 13:22:03 +08:00
commit b9747d1fa7
10 changed files with 109 additions and 155 deletions

View File

@ -646,7 +646,7 @@ export function generateCI (mapId) {
/** 创建目的码 */
export function createStationDestination(data) {
return request({
url: `/api/mapBuild/${data.mapId}/operationDefinition`,
url: `/api/mapBuild/${data.mapId}/destinationCodeDefinition`,
method: 'post',
data
});
@ -655,7 +655,7 @@ export function createStationDestination(data) {
/** 更新目的码 */
export function updateStationDestination(data) {
return request({
url: `/api/mapBuild/${data.mapId}/operationDefinition`,
url: `/api/mapBuild/${data.mapId}/destinationCodeDefinition`,
method: 'put',
data
});
@ -664,7 +664,7 @@ export function updateStationDestination(data) {
/** 目的码列表分页查询 */
export function getStationDestinationList(mapId, params) {
return request({
url: `/api/mapBuild/${mapId}/operationDefinition`,
url: `/api/mapBuild/${mapId}/destinationCodeDefinition`,
method: 'get',
params
});
@ -673,7 +673,7 @@ export function getStationDestinationList(mapId, params) {
/** 目的码查询 */
export function getStationDestinationDetail(mapId, code) {
return request({
url: `/api/mapBuild/${mapId}/${code}/operationDefinition`,
url: `/api/mapBuild/${mapId}/${code}/destinationCodeDefinition`,
method: 'get'
});
}
@ -681,7 +681,15 @@ export function getStationDestinationDetail(mapId, code) {
/** 目的码查询 */
export function deleteStationDestination(mapId, code) {
return request({
url: `/api/mapBuild/${mapId}/${code}/operationDefinition`,
url: `/api/mapBuild/${mapId}/${code}/destinationCodeDefinition`,
method: 'delete'
});
}
/** 根据group查询目的码 */
export function getSimulationDestinationList(group) {
return request({
url: `/simulation/${group}/destinationCode/list`,
method: 'get'
});
}

View File

@ -499,7 +499,6 @@ export default class Switch extends Group {
setSectionState(section, style, state) {
// && !section.animators.length
if (section && section.ignore) {
console.log(22222222222);
const sectionA = store.getters['map/getDeviceByCode'](state.sectionACode);
/** 空闲 */
// section.setStyle(style, this.style.Section.line.spareColor);
@ -552,7 +551,6 @@ export default class Switch extends Group {
this.setInversionAction(model); /** 反位*/
} else {
this.setLossAction(); // 失去
console.log(333333333333333);
}
model.isCiConfirm && this.setCiConfirm(); // 道岔使能显示
this.setSwitchFault(model.split);

View File

@ -416,6 +416,16 @@ export const menuOperate = {
routeBlockRun:{
operation: OperationEvent.Train.routeBlockRun.menu.operation,
cmdType: CMD.Driver.CMD_DRIVER_BLOCK_ROUTE
},
// 更改目的地码
destinationTrain: {
operation: OperationEvent.Train.destinationTrainId.menu.operation,
cmdType: CMD.TrainWindow.CMD_TRAIN_SET_HEAD
},
// 删除目的地码
deletDestionation: {
operation: OperationEvent.Train.deleteDestinationTrainId.menu.operation,
cmdType: CMD.TrainWindow.CMD_TRAIN_SET_MANUAL
}
}

View File

@ -116,7 +116,7 @@ export default {
doShow(step, selected ) {
this.dialogShow = true;
this.selected = selected;
this.groupNumber = selected.code;
this.groupNumber = selected.groupNumber;
this.tid = selected.serviceNumber;
this.operate = step;
},

View File

@ -19,7 +19,7 @@
<el-input v-model="addModel.groupNumber" style="width: 80px;" disabled />
</el-col>
<el-col :span="10" :offset="2">
<el-input v-model="addModel.groupNumber" style="width: 80px;" disabled />
<el-input v-model="addModel.serviceNumber" style="width: 80px;" disabled />
</el-col>
</el-row>
<el-row class="option_result_box" />
@ -31,13 +31,14 @@
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" pop-class="xian-02__systerm" />
<notice-info ref="noticeInfo" pop-class="xian-02__system" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'TrainMove',
@ -49,9 +50,8 @@ export default {
trainNoList: [],
selected: null,
addModel: {
stationName: '',
trainWindowCode: '',
groupNumber: ''
groupNumber: '',
serviceNumber: ''
},
dialogShow: false,
loading: false
@ -79,16 +79,9 @@ export default {
methods: {
doShow(operate, selected) {
this.selected = selected;
//
if (!this.dialogShow) {
const section = this.$store.getters['map/getDeviceByCode'](selected.sectionCode);
if (section) {
const station = this.$store.getters['map/getDeviceByCode'](section.stationCode);
if (station) {
this.addModel.stationName = station.name;
}
}
this.addModel.trainWindowCode = selected.code;
this.addModel.groupNumber = selected.groupNumber;
this.addModel.serviceNumber = selected.serviceNumber;
}
this.dialogShow = true;
this.$nextTick(function () {
@ -105,8 +98,7 @@ export default {
const operate = {
send: true,
operation: OperationEvent.Train.deleteDestinationTrainId.menu.operation,
cmdType: '',
val: this.addModel.groupNumber
cmdType: CMD.TrainWindow.CMD_TRAIN_SET_MANUAL
};
this.loading = true;

View File

@ -16,32 +16,32 @@
</el-row>
<el-row>
<el-col :span="3" :offset="9">
<el-input :id="domIdInput" v-model="addModel.groupNumber" style="width: 80px;" @change="inputGroupNumber" />
<el-input :id="domIdInput" v-model="addModel.groupNumber" style="width: 80px;" disabled />
</el-col>
<el-col :span="10" :offset="2">
<el-input :id="domIdInput" v-model="addModel.groupNumber" style="width: 80px;" @change="inputGroupNumber" />
<el-input :id="domIdInput" v-model="addModel.serviceNumber" style="width: 80px;" disabled />
</el-col>
</el-row>
<el-row style="border-top: 1px solid #3C6C68; border-bottom: 1px solid #3C6C68">
<el-row>
<el-col :span="12" style="text-align: right;padding-right: 20px;">实际的DID</el-col>
<el-col :span="12">
<el-input :id="domIdInput" v-model="addModel.groupNumber" style="width: 100px;" @change="inputGroupNumber" />
<el-input :id="domIdInput" v-model="addModel.destinationCode" style="width: 100px;" disabled />
</el-col>
</el-row>
<el-row>
<el-col :span="12" style="text-align: right;padding-right: 20px;">被请求的DID</el-col>
<el-col :span="12">
<el-input :id="domIdInput" v-model="addModel.groupNumber" style="width: 100px;" @change="inputGroupNumber" />
<el-input :id="domIdInput" v-model="addModel.trainDestinationCode" style="width: 100px;" />
</el-col>
</el-row>
</el-row>
<el-row>
<el-col :span="12" style="text-align: right;padding-right: 20px;">DID浏览选项</el-col>
<el-col :span="12">
<el-select v-model="addModel.operation" placeholder="请选择" @change="inputGroupNumber">
<el-select v-model="addModel.operation" placeholder="请选择">
<el-option
v-for="item in options"
v-for="item in typeList"
:key="item.value"
:label="item.label"
:value="item.value"
@ -50,7 +50,7 @@
</el-col>
</el-row>
<el-row class="option_box">
<div v-for="(item, index) in optionObject[addModel.operation]" :key="index" class="content_list">{{ item.name }}</div>
<div v-for="(item, index) in optionObject[addModel.operation]" :key="index" class="content_list" :class="{'active': item.active}" @click="handleOption(item)">{{ item.name }}-- {{ item.active }}</div>
</el-row>
<el-row class="option_result_box" />
<el-row justify="center" class="button-group">
@ -61,14 +61,16 @@
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" pop-class="xian-02__systerm" />
<notice-info ref="noticeInfo" pop-class="xian-02__system" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { OperationEvent } from '@/scripts/ConstDic';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { getSimulationDestinationList } from '@/api/jmap/mapdraft';
export default {
name: 'TrainMove',
@ -79,65 +81,19 @@ export default {
return {
trainNoList: [],
selected: null,
optionObject: {
normal: [
{ name: '0001 北客站一韦曲南站 往返运营', id: 1 },
{ name: '0002 北客站一韦曲南站 北客站站前折返 往返运营', id: 2 },
{ name: '0003 北客站一韦曲南站 韦曲南站站前折返 往返运营', id: 3 },
{ name: '0004 北客站一韦曲南站 北客站和韦曲南站均站前折返 往返运营', id: 4 },
{ name: '0005 北客站一会展中心 往返运营', id: 5 },
{ name: '0006 北客站一会展中心 北客站站前折返 往返运营', id: 6 },
{ name: '0007 北客站一南稍门站 往返运营', id: 7 },
{ name: '0008 北客站一南稍门站 北客站站前折返 往返运营', id: 8 },
{ name: '0009 韦曲南一市图书馆 往返运营', id: 9 },
{ name: '0010 韦曲南一市图书馆 韦曲南站前折返 往返运营', id: 10 },
{ name: '0011 市图书馆站一会展中心站 往返运营', id: 11 },
{ name: '0030 运行至韦曲南站 末班运营', id: 30 },
{ name: '0031 下行方向运行至韦曲南站转上行方向 末班运营', id: 31 },
{ name: '0032 运行至北客站 末班运营', id: 32 },
{ name: '0033 下行方向运行至北客站站转上行方向 末班运营', id: 33 },
{ name: '0034 北客站一凤城五路站 末班运营', id: 34 },
{ name: '0035 韦曲南一市图书馆 末班运营', id: 35 },
{ name: '0036 北客站一南稍门站 末班运营', id: 36 },
{ name: '0037 韦曲南一体育场站 末班运营', id: 37 },
{ name: '0038 北客站一会展中心站 末班运营', id: 38 },
{ name: '0039 韦曲南一三爻站 末班运营', id: 39 }
],
improper: [
{ name: '0050 北客站下行折1收车 非运营', id: 50 },
{ name: '0051 北客站下行折2收车 非运营', id: 51 },
{ name: '0052 北客站上行折2收车 非运营', id: 52 },
{ name: '0053 北客站上行折1收车 非运营', id: 53 },
{ name: '0054 韦曲南上行折2收车 非运营', id: 54 },
{ name: '0055 韦曲南上行折1收车 非运营', id: 55 },
{ name: '0056 韦曲南下行折1收车 非运营', id: 56 },
{ name: '0057 韦曲南下行折2收车 非运营', id: 57 },
{ name: '0058 凤城五路一市图书馆站 非运营', id: 58 },
{ name: '0059 运行至市图书馆站存车线 非运营', id: 59 },
{ name: '0060 运行至南稍门站存车线 非运营', id: 60 },
{ name: '0061 体育场一南稍门站 非运营', id: 61 },
{ name: '0062 运行至会展中心站存车线 非运营', id: 62 },
{ name: '0063 三爻一会展中心站 非运营', id: 63 },
{ name: '0064 运行至市图书馆存车线 非运营', id: 64 },
{ name: '0065 运行至南稍门站存车线 非运营', id: 65 },
{ name: '0070 运行至韦曲南站 非运营', id: 70 },
{ name: '0071 运行至北客站 非运营', id: 71 },
{ name: '0072 运行至会展中心站 非运营', id: 72 },
{ name: '0073 运行至橘河停车场入段线 非运营', id: 73 },
{ name: '0074 运行至橘河停车场出段线 非运营', id: 74 },
{ name: '0075 运行至渭河停车场入段线 非运营', id: 75 },
{ name: '0076 运行至渭河停车场出段线 非运营', id: 76 }
]
},
options: [
{ label: '日常运营', value: 'normal' },
{ label: '非运营', value: 'improper' }
optionObject: {},
typeList: [
{ label: '往返运营(环路)', value: 'NORMAL_OPERATION' },
{ label: '末班运营(交路)', value: 'LAST_OPERATION' },
{ label: '非运营(交路)', value: 'NON_OPERATION' },
{ label: '末班非运营(交路)', value: 'LAST_NON_OPERATION' }
],
addModel: {
stationName: '',
trainWindowCode: '',
groupNumber: '',
operation: 'normal'
serviceNumber: '',
destinationCode: '',
trainDestinationCode: '',
operation: 'NORMAL_OPERATION'
},
dialogShow: false,
loading: false
@ -166,6 +122,7 @@ export default {
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
this.getParamList();
});
},
methods: {
@ -173,14 +130,10 @@ export default {
this.selected = selected;
//
if (!this.dialogShow) {
const section = this.$store.getters['map/getDeviceByCode'](selected.sectionCode);
if (section) {
const station = this.$store.getters['map/getDeviceByCode'](section.stationCode);
if (station) {
this.addModel.stationName = station.name;
}
}
this.addModel.trainWindowCode = selected.code;
this.addModel.groupNumber = selected.groupNumber;
this.addModel.serviceNumber = selected.serviceNumber;
this.addModel.destinationCode = selected.destinationCode;
this.addModel.trainDestinationCode = '';
}
this.dialogShow = true;
this.$nextTick(function () {
@ -193,29 +146,41 @@ export default {
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
},
inputGroupNumber() {
const operate = {
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.addTrainId.input.operation,
val: this.addModel.groupNumber
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
async getParamList() {
const res = await getSimulationDestinationList(this.$route.query.group);
res.data.forEach(item => {
const lable = this.typeList.find(ele => ele.value == item.type);
item['active'] = false;
item['name'] = `${item.code} ${item.description} ${lable.label}`;
if (this.optionObject[item.type]) {
this.optionObject[item.type].push(item);
} else {
this.optionObject[item.type] = [item];
}
});
},
handleOption(item) {
this.addModel.trainDestinationCode = `${parseInt(item.code)}`;
for (const key in this.optionObject) {
this.optionObject[key].forEach(item => {
item.active = false;
});
}
item.active = true;
},
commit() {
const operate = {
send: true,
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.addTrainId.menu.operation,
val: this.addModel.groupNumber
operation: OperationEvent.Train.destinationTrainId.menu.operation,
cmdType: CMD.TrainWindow.CMD_TRAIN_SET_HEAD,
param: {
destinationCode: this.addModel.trainDestinationCode,
serviceNumber: this.addModel.serviceNumber
}
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
@ -228,11 +193,10 @@ export default {
},
cancel() {
const operate = {
type: MapDeviceType.Train.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
@ -274,6 +238,10 @@ export default {
background: #000004;
color: #73877E;
}
&.active{
background: #000004;
color: #73877E;
}
}
}
.option_result_box{

View File

@ -402,16 +402,9 @@ export default {
}
});
},
//
updateDestination() {
const operate = {
start: true,
code: this.selected.code,
operation: OperationEvent.Train.destinationTrainId.menu.operation,
param: {
trainCode: this.selected.code
}
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) =>{
commitOperate(menuOperate.Train.destinationTrain, {groupNumber: this.selected.groupNumber}, 0).then(({valid, operate})=>{
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', {break: true});
this.$refs.trainDestination.doShow(operate, this.selected);
@ -479,16 +472,9 @@ export default {
this.$refs.noticeInfo.doShow(step);
});
},
//
deletDestionation() {
const operate = {
start: true,
code: this.selected.code,
operation: OperationEvent.Train.deleteDestinationTrainId.menu.operation,
param: {
trainCode: this.selected.code
}
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) =>{
commitOperate(menuOperate.Train.deletDestionation, {groupNumber: this.selected.groupNumber}, 0).then(({valid, operate})=>{
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', {break: true});
this.$refs.trainDelDestination.doShow(operate, this.selected);

View File

@ -223,7 +223,9 @@ export default {
CMD_TRAIN_DRIVE_BY_GUIDE_SIGNAL: {value:'Train_Drive_By_Guide_Signal', label: '引导信号行车'},
CMD_TRAIN_HOLD: {value:'Train_Hold', label: '列车扣车'},
CMD_TRAIN_CANCEL_HOLD: {value:'Train_Cancel_Hold', label: '列车发车'},
CMD_TRAIN_CHANGE_TRIP_NUMBER: {value:'Train_Change_Trip_Number', label: '更改列车车次'}
CMD_TRAIN_CHANGE_TRIP_NUMBER: {value:'Train_Change_Trip_Number', label: '更改列车车次'},
CMD_TRAIN_DELETE_SERVICE_NUMBER: {value:'Train_Delete_Service_Number', label: '删除车次号'},
CMD_TRAIN_CHANGE_DESTINATION_CODE: {value:'Train_Change_Destination_Code', label: '更改目的地码'}
},
TrainWindow: {
/** 修改列车识别号 */

View File

@ -191,7 +191,6 @@ export default {
},
//
endViewLoading(isSuccess) {
console.log(isSuccess, '****');
if (!isSuccess) {
this.$store.dispatch('map/mapClear');
}

View File

@ -1,5 +1,5 @@
<template>
<el-dialog v-dialogDrag class="autoSignal" title="停站时间列表" :visible.sync="show" width="85%" :before-do-close="doClose" append-to-body>
<el-dialog v-dialogDrag class="autoSignal" title="目的地码列表" :visible.sync="show" width="85%" :before-do-close="doClose" append-to-body>
<div>
<QueryListPage
ref="queryListPage"
@ -35,17 +35,15 @@ export default {
typeList: [
{ name: '正常运营(环路)', value: 'NORMAL_OPERATION' },
{ name: '末班运营(交路)', value: 'LAST_OPERATION' },
{ name: '非运营(交路)', value: 'NON_OPERATION' }
{ name: '非运营(交路)', value: 'NON_OPERATION' },
{ name: '末班非运营(交路)', value: 'LAST_NON_OPERATION' }
],
queryForm: {
labelWidth: '120px',
queryObject: {
stationCode: {
type: 'select',
label: '经停车站',
config: {
data: []
}
code: {
type: 'text',
label: '编码'
}
}
},
@ -105,13 +103,6 @@ export default {
columnValue: (row) => { return this.translateTurn(row.stationBFrontTurnBack); },
tagType: (row) => { return 'success'; }
},
// {
// title: '',
// prop: 'sectionCode',
// type: 'tagMore',
// columnValue: (row) => { return this.handelParkingTime(row.parkingTimeVOList); },
// tagType: (row) => { return ''; }
// },
{
type: 'button',
title: this.$t('map.operation'),
@ -139,13 +130,13 @@ export default {
])
},
mounted() {
const list = [];
if (this.stationList && this.stationList.length) {
for (let i = 0; i < this.stationList.length; i++) {
list.push({ label: this.stationList[i].name, value: this.stationList[i].code });
}
this.queryForm.queryObject.stationCode.config.data = list;
}
// const list = [];
// if (this.stationList && this.stationList.length) {
// for (let i = 0; i < this.stationList.length; i++) {
// list.push({ label: this.stationList[i].name, value: this.stationList[i].code });
// }
// this.queryForm.queryObject.stationCode.config.data = list;
// }
},
methods: {
doShow() {