Merge branch 'dev' of https://git.code.tencent.com/lian-cbtc/jl-client into dev
This commit is contained in:
commit
bf2b5180e3
@ -21,7 +21,7 @@ deviceState[deviceType.Switch] = {
|
||||
blockade:0, // 是否封锁
|
||||
routeLock:0, // 是否进路锁闭
|
||||
overlapLock:0, // 是否进路延续保护锁闭
|
||||
normalPosition:1, // 是否定位
|
||||
normalPosition:0, // 是否定位
|
||||
reversePosition:0, // 是否反位
|
||||
/** 定位状态*/
|
||||
// locateType: {
|
||||
|
@ -264,6 +264,10 @@ export default class Switch extends Group {
|
||||
}
|
||||
this.locShelter.hide(); // 定位
|
||||
this.rhomboid.show();
|
||||
/** 初始化颜色 */
|
||||
this.rhomboid.setStyle({
|
||||
fill: this.style.Section.line.spareColor
|
||||
});
|
||||
/** 道岔保护区段锁闭 */
|
||||
if (model.overlapLock) {
|
||||
this.rhomboid.setStyle({
|
||||
|
@ -468,11 +468,9 @@ export default {
|
||||
},
|
||||
confirm2() {
|
||||
let operate = {
|
||||
send: true,
|
||||
over:true,
|
||||
type: this.type,
|
||||
val: this.speed,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED,
|
||||
param: {
|
||||
speedLimitValue: `${this.speed}`
|
||||
}
|
||||
@ -481,12 +479,14 @@ export default {
|
||||
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
||||
/** 区段设置限速*/
|
||||
operate.operation = OperationEvent.Section.setSpeed.confirm2.operation;
|
||||
operate.cmdType = CMD.Section.CMD_SECTION_SET_LIMIT_SPEED;
|
||||
} else if (this.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
|
||||
/** 区段取消限速*/
|
||||
operate.operation = OperationEvent.Section.cancelSpeed.confirm2.operation;
|
||||
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
|
||||
/** 道岔设置限速*/
|
||||
operate.operation = OperationEvent.Switch.setSpeed.confirm2.operation;
|
||||
operate.cmdType = CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED;
|
||||
} else if (this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
|
||||
/** 道岔取消限速*/
|
||||
operate.operation = OperationEvent.Switch.cancelSpeed.confirm2.operation;
|
||||
|
@ -4,13 +4,29 @@
|
||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules">
|
||||
<div style="width: 96%;">
|
||||
<el-form-item label="车 组 号:" label-width="95px" prop="trainCode">
|
||||
<el-input v-model="addModel.trainCode" />
|
||||
</el-form-item>
|
||||
<el-form-item label="服 务 号:" label-width="95px" prop="serverNumber">
|
||||
<el-input v-model="addModel.serverNumber" />
|
||||
<!-- <el-input v-model="addModel.trainCode" /> -->
|
||||
<el-select v-model="addModel.trainCode" filterable>
|
||||
<el-option
|
||||
v-for="train in trainList"
|
||||
:key="train.groupNumber"
|
||||
:label="train.groupNumber"
|
||||
:value="train.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="车 次 号:" label-width="95px" prop="tripNumber">
|
||||
<el-input v-model="addModel.tripNumber" />
|
||||
<!-- <el-input v-model="addModel.tripNumber" /> -->
|
||||
<el-select v-model="addModel.tripNumber" @change="tripNumberChange">
|
||||
<el-option
|
||||
v-for="tripNum in tripNumberList"
|
||||
:key="tripNum"
|
||||
:label="tripNum"
|
||||
:value="tripNum"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="服 务 号:" label-width="95px" prop="serviceNumber">
|
||||
<el-input v-model="addModel.serviceNumber" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
@ -26,138 +42,158 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { getTripNumberList, getServiceNumbersByTripNum } from '@/api/simulation';
|
||||
|
||||
export default {
|
||||
// name: 'TrainMove',
|
||||
name: 'TrainAddPlan',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
export default {
|
||||
// name: 'TrainMove',
|
||||
name: 'TrainAddPlan',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
selected: null,
|
||||
tripNumberList: [],
|
||||
addModel: {
|
||||
trainCode: '', // 车组号
|
||||
serverNumber: '', // 服务号
|
||||
serviceNumber: '', // 服务号
|
||||
tripNumber: '' // 车次号
|
||||
},
|
||||
|
||||
rules: {
|
||||
trainCode: [
|
||||
{ required: true, message: '请输入车组号', trigger: 'blur' }
|
||||
{ required: true, message: '请输入车组号', trigger: 'change' }
|
||||
],
|
||||
serverNumber: [
|
||||
{ required: true, message: '请输入服务号', trigger: 'change' }
|
||||
serviceNumber: [
|
||||
{ required: true, message: '请输入服务号', trigger: 'blur' }
|
||||
],
|
||||
tripNumber: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
{ required: true, message: '请输入车次号', trigger: 'change' }
|
||||
]
|
||||
},
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'trainList',
|
||||
'stationStandList',
|
||||
'trainWindowSectionCode'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.moveTrainId.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '创建计划车'
|
||||
}
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.moveTrainId.menu.domId : '';
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
//如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
title() {
|
||||
return '创建计划车'
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
tripNumberChange(tripNumber) {
|
||||
getServiceNumbersByTripNum(this.$route.query.group, tripNumber).then(resp => {
|
||||
this.serviceNumber = resp.data;
|
||||
});
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
//如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
}
|
||||
this.addModel = {
|
||||
trainCode:'',
|
||||
tripNumber:'',
|
||||
serviceNumber:''
|
||||
};
|
||||
getTripNumberList(this.$route.query.group).then(resp => {
|
||||
this.tripNumberList = [];
|
||||
resp.data.forEach(item => {
|
||||
if (!this.tripNumberList.includes(item)) {
|
||||
this.tripNumberList.push(item);
|
||||
}
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
});
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
let operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Train.createPlanTrain.menu.operation,
|
||||
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan,
|
||||
param: {
|
||||
trainCode: this.addModel.trainCode, // 车组号
|
||||
serverNumber: this.addModel.serverNumber, // 服务号
|
||||
tripNumber: this.addModel.tripNumber // 车次号
|
||||
}
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
// mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
let operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Train.createPlanTrain.menu.operation,
|
||||
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan,
|
||||
param: {
|
||||
trainCode: this.addModel.trainCode, // 车组号
|
||||
serviceNumber: this.addModel.serviceNumber, // 服务号
|
||||
tripNumber: this.addModel.tripNumber // 车次号
|
||||
}
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
// this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); });
|
||||
},
|
||||
handerTrainSource() {
|
||||
let operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Train.trainSource.menu.operation,
|
||||
val: this.addModel.trainSource
|
||||
// this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); });
|
||||
},
|
||||
handerTrainSource() {
|
||||
let operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Train.trainSource.menu.operation,
|
||||
val: this.addModel.trainSource
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.beijing-01__systerm .el-dialog .base-label {
|
||||
|
209
src/jmapNew/theme/chengdu_01/menus/dialog/trainInitPlan.vue
Normal file
209
src/jmapNew/theme/chengdu_01/menus/dialog/trainInitPlan.vue
Normal file
@ -0,0 +1,209 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-01__system stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="480px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div class="el-dialog-div">
|
||||
<el-form ref="form" size="small" label-width="100px" :model="addModel" :rules="rules" label-position="left">
|
||||
<el-form-item prop="trainCode" label="车组号:">
|
||||
<!--<el-input v-model="addModel.trainCode"/>-->
|
||||
<el-select v-model="addModel.trainCode" filterable>
|
||||
<el-option
|
||||
v-for="train in trainList"
|
||||
:key="train.groupNumber"
|
||||
:label="train.groupNumber"
|
||||
:value="train.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="车次号:" prop="tripNumber">
|
||||
<!--<el-input v-model="addModel.tripNumber"/>-->
|
||||
<el-select v-model="addModel.tripNumber" @change="tripNumberChange">
|
||||
<el-option
|
||||
v-for="tripNum in tripNumberList"
|
||||
:key="tripNum"
|
||||
:label="tripNum"
|
||||
:value="tripNum"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="服务号:" prop="serviceNumber">
|
||||
<el-input v-model="serviceNumber" disabled="true"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { getTripNumberList, getServiceNumbersByTripNum } from '@/api/simulation';
|
||||
|
||||
export default {
|
||||
name: 'TrainCreateNumber',
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
selected: null,
|
||||
sectionName: '',
|
||||
tripNumberList: [],
|
||||
serviceNumber: '',
|
||||
addModel: {
|
||||
trainCode:'',
|
||||
tripNumber:''
|
||||
},
|
||||
rules: {
|
||||
trainCode: [
|
||||
{ required: true, message: '请输入列车编码', trigger: 'blur'}
|
||||
],
|
||||
serverNumber: [
|
||||
{ required: true, message: '请输入服务号', trigger: 'blur'}
|
||||
],
|
||||
tripNumber: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur'}
|
||||
]
|
||||
},
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'trainList',
|
||||
'stationStandList',
|
||||
'trainWindowSectionCode'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.createPlanTrain.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '新建计划车';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
loadInitData(map) {
|
||||
},
|
||||
tripNumberChange(tripNumber) {
|
||||
getServiceNumbersByTripNum(this.$route.query.group, tripNumber).then(resp => {
|
||||
this.serviceNumber = resp.data;
|
||||
});
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
this.serviceNumber = '';
|
||||
this.addModel = {
|
||||
trainCode:'',
|
||||
tripNumber:''
|
||||
};
|
||||
getTripNumberList(this.$route.query.group).then(resp => {
|
||||
this.tripNumberList = [];
|
||||
resp.data.forEach(item => {
|
||||
if (!this.tripNumberList.includes(item)) {
|
||||
this.tripNumberList.push(item);
|
||||
}
|
||||
});
|
||||
});
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
this.mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Train.createPlanTrain.menu.operation,
|
||||
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan,
|
||||
param: {
|
||||
sectionCode: this.trainWindowSectionCode,
|
||||
trainCode: this.addModel.trainCode, // 车组号
|
||||
serviceNumber: this.serviceNumber, // 服务号
|
||||
tripNumber: this.addModel.tripNumber // 车次号
|
||||
}
|
||||
};
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
// this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
.el-dialog-div {
|
||||
height: 300px;
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
@ -1,24 +1,29 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<train-init-plan ref="trainInitPlan"/>
|
||||
<notice-info ref="noticeInfo" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import TrainInitPlan from './dialog/trainInitPlan';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
import { MenuDisabledState } from './utils/menuItemStatus';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import { MenuDisabledState, menuConvert, trainMenuFiltration } from './utils/menuItemStatus';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
|
||||
export default {
|
||||
name: 'MenuTrain',
|
||||
components: {
|
||||
PopMenu,
|
||||
NoticeInfo
|
||||
NoticeInfo,
|
||||
TrainInitPlan
|
||||
},
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
@ -35,88 +40,93 @@ export default {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
local: [],
|
||||
central: [
|
||||
Local: [],
|
||||
Center: [
|
||||
// {
|
||||
// label: '追踪号',
|
||||
// handler: '',
|
||||
// children: [
|
||||
// {
|
||||
// label: '目的地ID',
|
||||
// handler: '',
|
||||
// cmdType: ''
|
||||
// },
|
||||
// {
|
||||
// label: '删除ID',
|
||||
// handler: '',
|
||||
// cmdType: ''
|
||||
// },
|
||||
// {
|
||||
// label: '更改追踪号',
|
||||
// handler: '',
|
||||
// cmdType: ''
|
||||
// },
|
||||
// {
|
||||
// label: '交换追踪号',
|
||||
// handler: '',
|
||||
// cmdType: ''
|
||||
// },
|
||||
// {
|
||||
// label: '运行等级',
|
||||
// handler: '',
|
||||
// cmdType: ''
|
||||
// },
|
||||
// {
|
||||
// label: '列车模式',
|
||||
// handler: '',
|
||||
// cmdType: ''
|
||||
// },
|
||||
// {
|
||||
// label: '惰性模式',
|
||||
// handler: '',
|
||||
// cmdType: ''
|
||||
// },
|
||||
// {
|
||||
// label: '旁路模式',
|
||||
// handler: '',
|
||||
// cmdType: ''
|
||||
// },
|
||||
// {
|
||||
// label: '开门禁止',
|
||||
// handler: '',
|
||||
// cmdType: ''
|
||||
// }
|
||||
// ]
|
||||
// },
|
||||
// {
|
||||
// label: '列车明细',
|
||||
// handler: '',
|
||||
// cmdType: ''
|
||||
// },
|
||||
// {
|
||||
// label: '无线',
|
||||
// handler: '',
|
||||
// cmdType: ''
|
||||
// },
|
||||
// {
|
||||
// label: 'TWC',
|
||||
// handler: '',
|
||||
// cmdType: ''
|
||||
// },
|
||||
// {
|
||||
// label: '设备标签',
|
||||
// handler: '',
|
||||
// cmdType: ''
|
||||
// },
|
||||
// {
|
||||
// label: '模拟',
|
||||
// handler: '',
|
||||
// cmdType: ''
|
||||
// },
|
||||
// {
|
||||
// label: '帮助',
|
||||
// handler: '',
|
||||
// cmdType: ''
|
||||
// }
|
||||
{
|
||||
label: '追踪号',
|
||||
handler: '',
|
||||
children: [
|
||||
{
|
||||
label: '目的地ID',
|
||||
handler: '',
|
||||
cmdType: ''
|
||||
},
|
||||
{
|
||||
label: '删除ID',
|
||||
handler: '',
|
||||
cmdType: ''
|
||||
},
|
||||
{
|
||||
label: '更改追踪号',
|
||||
handler: '',
|
||||
cmdType: ''
|
||||
},
|
||||
{
|
||||
label: '交换追踪号',
|
||||
handler: '',
|
||||
cmdType: ''
|
||||
},
|
||||
{
|
||||
label: '运行等级',
|
||||
handler: '',
|
||||
cmdType: ''
|
||||
},
|
||||
{
|
||||
label: '列车模式',
|
||||
handler: '',
|
||||
cmdType: ''
|
||||
},
|
||||
{
|
||||
label: '惰性模式',
|
||||
handler: '',
|
||||
cmdType: ''
|
||||
},
|
||||
{
|
||||
label: '旁路模式',
|
||||
handler: '',
|
||||
cmdType: ''
|
||||
},
|
||||
{
|
||||
label: '开门禁止',
|
||||
handler: '',
|
||||
cmdType: ''
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
label: '列车明细',
|
||||
handler: '',
|
||||
cmdType: ''
|
||||
},
|
||||
{
|
||||
label: '无线',
|
||||
handler: '',
|
||||
cmdType: ''
|
||||
},
|
||||
{
|
||||
label: 'TWC',
|
||||
handler: '',
|
||||
cmdType: ''
|
||||
},
|
||||
{
|
||||
label: '设备标签',
|
||||
handler: '',
|
||||
cmdType: ''
|
||||
},
|
||||
{
|
||||
label: '模拟',
|
||||
handler: '',
|
||||
cmdType: ''
|
||||
},
|
||||
{
|
||||
label: '帮助',
|
||||
handler: '',
|
||||
cmdType: ''
|
||||
label: '新建计划列车',
|
||||
handler: this.createPlanTrain,
|
||||
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
|
||||
}
|
||||
|
||||
]
|
||||
@ -169,14 +179,14 @@ export default {
|
||||
},
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
this.menu = trainMenuFiltration(this.menuNormal);
|
||||
|
||||
// this.menu = trainMenuFiltration(this.menuNormal);
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = [...this.menuForce, ...this.menuSpeed];
|
||||
}
|
||||
|
||||
this.menu = menuConvert(this.menu);
|
||||
// this.menu = menuConvert(this.menu);
|
||||
},
|
||||
doShow(point) {
|
||||
this.clickEvent();
|
||||
@ -380,6 +390,23 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
createPlanTrain() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Train.createPlanTrain.menu.operation,
|
||||
param: {
|
||||
trainWindowCode: this.selected.code
|
||||
}
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainInitPlan.doShow(step, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
undeveloped() {
|
||||
this.doClose();
|
||||
this.$alert('实现中......', '提示', {
|
||||
|
@ -13,14 +13,30 @@
|
||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules">
|
||||
<div style="width: 96%;">
|
||||
<el-form-item label="车 组 号:" label-width="95px" prop="trainCode">
|
||||
<el-input v-model="addModel.trainCode" />
|
||||
<!-- <el-input v-model="addModel.trainCode" /> -->
|
||||
<el-select v-model="addModel.trainCode" filterable>
|
||||
<el-option
|
||||
v-for="train in trainList"
|
||||
:key="train.groupNumber"
|
||||
:label="train.groupNumber"
|
||||
:value="train.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="车 次 号:" label-width="95px" prop="tripNumber">
|
||||
<!-- <el-input v-model="addModel.tripNumber" /> -->
|
||||
<el-select v-model="addModel.tripNumber" @change="tripNumberChange">
|
||||
<el-option
|
||||
v-for="tripNum in tripNumberList"
|
||||
:key="tripNum"
|
||||
:label="tripNum"
|
||||
:value="tripNum"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="服 务 号:" label-width="95px" prop="serverNumber">
|
||||
<el-input v-model="addModel.serverNumber" />
|
||||
</el-form-item>
|
||||
<el-form-item label="车 次 号:" label-width="95px" prop="tripNumber">
|
||||
<el-input v-model="addModel.tripNumber" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
<el-row justify="center" class="button-group">
|
||||
@ -37,6 +53,7 @@
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { getTripNumberList, getServiceNumbersByTripNum } from '@/api/simulation';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
|
||||
@ -49,21 +66,22 @@ export default {
|
||||
return {
|
||||
trainNoList: [],
|
||||
selected: null,
|
||||
tripNumberList: [],
|
||||
addModel: {
|
||||
trainCode: '', // 车组号
|
||||
serverNumber: '', // 服务号
|
||||
serviceNumber: '', // 服务号
|
||||
tripNumber: '' // 车次号
|
||||
},
|
||||
|
||||
rules: {
|
||||
trainCode: [
|
||||
{ required: true, message: '请输入车组号', trigger: 'blur' }
|
||||
{ required: true, message: '请输入车组号', trigger: 'change' }
|
||||
],
|
||||
serverNumber: [
|
||||
{ required: true, message: '请输入服务号', trigger: 'change' }
|
||||
serviceNumber: [
|
||||
{ required: true, message: '请输入服务号', trigger: 'blur' }
|
||||
],
|
||||
tripNumber: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
{ required: true, message: '请输入车次号', trigger: 'change' }
|
||||
]
|
||||
},
|
||||
dialogShow: false,
|
||||
@ -72,7 +90,9 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
'trainList',
|
||||
'stationStandList',
|
||||
'trainWindowSectionCode'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
@ -93,12 +113,30 @@ export default {
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
tripNumberChange(tripNumber) {
|
||||
getServiceNumbersByTripNum(this.$route.query.group, tripNumber).then(resp => {
|
||||
this.serviceNumber = resp.data;
|
||||
});
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
// if (!this.dialogShow) {
|
||||
|
||||
// }
|
||||
this.addModel = {
|
||||
trainCode:'',
|
||||
tripNumber:'',
|
||||
serviceNumber:''
|
||||
};
|
||||
getTripNumberList(this.$route.query.group).then(resp => {
|
||||
this.tripNumberList = [];
|
||||
resp.data.forEach(item => {
|
||||
if (!this.tripNumberList.includes(item)) {
|
||||
this.tripNumberList.push(item);
|
||||
}
|
||||
});
|
||||
});
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
@ -109,7 +147,7 @@ export default {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
this.mouseCancelState(this.selected);
|
||||
// this.mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
|
@ -8,8 +8,8 @@ export function getBaseUrl() {
|
||||
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
||||
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
|
||||
// BASE_API = 'http://192.168.3.82:9000'; // 杜康
|
||||
// BASE_API = 'http://b29z135112.zicp.vip';
|
||||
BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
|
||||
BASE_API = 'http://b29z135112.zicp.vip';
|
||||
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
|
||||
} else {
|
||||
BASE_API = process.env.VUE_APP_BASE_API;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user