This commit is contained in:
zyy 2020-02-14 11:22:59 +08:00
commit bf2b5180e3
8 changed files with 524 additions and 210 deletions

View File

@ -21,7 +21,7 @@ deviceState[deviceType.Switch] = {
blockade:0, // 是否封锁 blockade:0, // 是否封锁
routeLock:0, // 是否进路锁闭 routeLock:0, // 是否进路锁闭
overlapLock:0, // 是否进路延续保护锁闭 overlapLock:0, // 是否进路延续保护锁闭
normalPosition:1, // 是否定位 normalPosition:0, // 是否定位
reversePosition:0, // 是否反位 reversePosition:0, // 是否反位
/** 定位状态*/ /** 定位状态*/
// locateType: { // locateType: {

View File

@ -264,6 +264,10 @@ export default class Switch extends Group {
} }
this.locShelter.hide(); // 定位 this.locShelter.hide(); // 定位
this.rhomboid.show(); this.rhomboid.show();
/** 初始化颜色 */
this.rhomboid.setStyle({
fill: this.style.Section.line.spareColor
});
/** 道岔保护区段锁闭 */ /** 道岔保护区段锁闭 */
if (model.overlapLock) { if (model.overlapLock) {
this.rhomboid.setStyle({ this.rhomboid.setStyle({

View File

@ -468,11 +468,9 @@ export default {
}, },
confirm2() { confirm2() {
let operate = { let operate = {
send: true,
over:true, over:true,
type: this.type, type: this.type,
val: this.speed, val: this.speed,
cmdType: CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED,
param: { param: {
speedLimitValue: `${this.speed}` speedLimitValue: `${this.speed}`
} }
@ -481,12 +479,14 @@ export default {
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) { if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
/** 区段设置限速*/ /** 区段设置限速*/
operate.operation = OperationEvent.Section.setSpeed.confirm2.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) { } else if (this.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
/** 区段取消限速*/ /** 区段取消限速*/
operate.operation = OperationEvent.Section.cancelSpeed.confirm2.operation; operate.operation = OperationEvent.Section.cancelSpeed.confirm2.operation;
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) { } else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
/** 道岔设置限速*/ /** 道岔设置限速*/
operate.operation = OperationEvent.Switch.setSpeed.confirm2.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) { } else if (this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
/** 道岔取消限速*/ /** 道岔取消限速*/
operate.operation = OperationEvent.Switch.cancelSpeed.confirm2.operation; operate.operation = OperationEvent.Switch.cancelSpeed.confirm2.operation;

View File

@ -4,13 +4,29 @@
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules"> <el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules">
<div style="width: 96%;"> <div style="width: 96%;">
<el-form-item label="车 组 号:" label-width="95px" prop="trainCode"> <el-form-item label="车 组 号:" label-width="95px" prop="trainCode">
<el-input v-model="addModel.trainCode" /> <!-- <el-input v-model="addModel.trainCode" /> -->
</el-form-item> <el-select v-model="addModel.trainCode" filterable>
<el-form-item label="服 务 号:" label-width="95px" prop="serverNumber"> <el-option
<el-input v-model="addModel.serverNumber" /> v-for="train in trainList"
:key="train.groupNumber"
:label="train.groupNumber"
:value="train.code"
/>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="车 次 号:" label-width="95px" prop="tripNumber"> <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> </el-form-item>
</div> </div>
</el-form> </el-form>
@ -26,138 +42,158 @@
</template> </template>
<script> <script>
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CMD from '@/scripts/cmdPlugin/CommandEnum'; import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { getTripNumberList, getServiceNumbersByTripNum } from '@/api/simulation';
export default { export default {
// name: 'TrainMove', // name: 'TrainMove',
name: 'TrainAddPlan', name: 'TrainAddPlan',
components: { components: {
}, },
data() { data() {
return { return {
trainNoList: [], trainNoList: [],
selected: null, selected: null,
tripNumberList: [],
addModel: { addModel: {
trainCode: '', // trainCode: '', //
serverNumber: '', // serviceNumber: '', //
tripNumber: '' // tripNumber: '' //
}, },
rules: { rules: {
trainCode: [ trainCode: [
{ required: true, message: '请输入车组号', trigger: 'blur' } { required: true, message: '请输入车组号', trigger: 'change' }
], ],
serverNumber: [ serviceNumber: [
{ required: true, message: '请输入服务号', trigger: 'change' } { required: true, message: '请输入服务号', trigger: 'blur' }
], ],
tripNumber: [ tripNumber: [
{ required: true, message: '请输入车次号', trigger: 'blur' } { required: true, message: '请输入车次号', trigger: 'change' }
] ]
}, },
dialogShow: false, dialogShow: false,
loading: false loading: false
} }
},
computed: {
...mapGetters('map', [
'trainList',
'stationStandList',
'trainWindowSectionCode'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
}, },
computed: { domIdCancel() {
...mapGetters('map', [ return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
'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 '创建计划车'
}
}, },
mounted() { domIdConfirm() {
this.$nextTick(() => { return this.dialogShow ? OperationEvent.Train.moveTrainId.menu.domId : '';
this.$store.dispatch('training/tipReload');
})
}, },
methods: { title() {
doShow(operate, selected) { return '创建计划车'
this.selected = selected; }
// },
if (!this.dialogShow) { 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.addModel = {
this.$nextTick(function () { trainCode:'',
this.$store.dispatch('training/emitTipFresh'); 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.dialogShow = true;
this.loading = false; this.$nextTick(function () {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false); });
mouseCancelState(this.selected); },
}, doClose() {
commit() { this.loading = false;
this.$refs['form'].validate((valid) => { this.dialogShow = false;
if (valid) { this.$store.dispatch('training/emitTipFresh');
let operate = { this.$store.dispatch('map/setTrainWindowShow', false);
over: true, // mouseCancelState(this.selected);
operation: OperationEvent.Train.createPlanTrain.menu.operation, },
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan, commit() {
param: { this.$refs['form'].validate((valid) => {
trainCode: this.addModel.trainCode, // if (valid) {
serverNumber: this.addModel.serverNumber, // let operate = {
tripNumber: this.addModel.tripNumber // 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.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false; this.loading = false;
if (valid) { if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose(); this.doClose();
// this.$refs.noticeInfo.doShow(operate); }
}) }).catch(error => {
} else { this.loading = false;
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) {
this.doClose(); this.doClose();
} // this.$refs.noticeInfo.doShow(operate);
}).catch(error => { this.doClose(); }); })
}, } else {
handerTrainSource() { return false;
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) { cancel() {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); 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> </script>
<style scoped> <style scoped>
.beijing-01__systerm .el-dialog .base-label { .beijing-01__systerm .el-dialog .base-label {

View 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>

View File

@ -1,24 +1,29 @@
<template> <template>
<div> <div>
<pop-menu ref="popMenu" :menu="menu" /> <pop-menu ref="popMenu" :menu="menu" />
<train-init-plan ref="trainInitPlan"/>
<notice-info ref="noticeInfo" /> <notice-info ref="noticeInfo" />
</div> </div>
</template> </template>
<script> <script>
import PopMenu from '@/components/PopMenu'; import PopMenu from '@/components/PopMenu';
import TrainInitPlan from './dialog/trainInitPlan';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo'; import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import { MenuDisabledState } from './utils/menuItemStatus';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; 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'; import CancelMouseState from '@/mixin/CancelMouseState';
export default { export default {
name: 'MenuTrain', name: 'MenuTrain',
components: { components: {
PopMenu, PopMenu,
NoticeInfo NoticeInfo,
TrainInitPlan
}, },
mixins: [ mixins: [
CancelMouseState CancelMouseState
@ -35,88 +40,93 @@ export default {
return { return {
menu: [], menu: [],
menuNormal: { menuNormal: {
local: [], Local: [],
central: [ 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: '追踪号', label: '新建计划列车',
handler: '', handler: this.createPlanTrain,
children: [ cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
{
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: ''
} }
] ]
@ -169,14 +179,14 @@ export default {
}, },
initMenu() { initMenu() {
// //
this.menu = trainMenuFiltration(this.menuNormal); // this.menu = trainMenuFiltration(this.menuNormal);
this.menu = MenuContextHandler.covert(this.menuNormal);
// //
if (this.operatemode === OperateMode.FAULT) { if (this.operatemode === OperateMode.FAULT) {
this.menu = [...this.menuForce, ...this.menuSpeed]; this.menu = [...this.menuForce, ...this.menuSpeed];
} }
this.menu = menuConvert(this.menu); // this.menu = menuConvert(this.menu);
}, },
doShow(point) { doShow(point) {
this.clickEvent(); 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() { undeveloped() {
this.doClose(); this.doClose();
this.$alert('实现中......', '提示', { this.$alert('实现中......', '提示', {

View File

@ -13,14 +13,30 @@
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules"> <el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules">
<div style="width: 96%;"> <div style="width: 96%;">
<el-form-item label="车 组 号:" label-width="95px" prop="trainCode"> <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>
<el-form-item label="服 务 号:" label-width="95px" prop="serverNumber"> <el-form-item label="服 务 号:" label-width="95px" prop="serverNumber">
<el-input v-model="addModel.serverNumber" /> <el-input v-model="addModel.serverNumber" />
</el-form-item> </el-form-item>
<el-form-item label="车 次 号:" label-width="95px" prop="tripNumber">
<el-input v-model="addModel.tripNumber" />
</el-form-item>
</div> </div>
</el-form> </el-form>
<el-row justify="center" class="button-group"> <el-row justify="center" class="button-group">
@ -37,6 +53,7 @@
<script> <script>
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { getTripNumberList, getServiceNumbersByTripNum } from '@/api/simulation';
import CMD from '@/scripts/cmdPlugin/CommandEnum'; import CMD from '@/scripts/cmdPlugin/CommandEnum';
@ -49,21 +66,22 @@ export default {
return { return {
trainNoList: [], trainNoList: [],
selected: null, selected: null,
tripNumberList: [],
addModel: { addModel: {
trainCode: '', // trainCode: '', //
serverNumber: '', // serviceNumber: '', //
tripNumber: '' // tripNumber: '' //
}, },
rules: { rules: {
trainCode: [ trainCode: [
{ required: true, message: '请输入车组号', trigger: 'blur' } { required: true, message: '请输入车组号', trigger: 'change' }
], ],
serverNumber: [ serviceNumber: [
{ required: true, message: '请输入服务号', trigger: 'change' } { required: true, message: '请输入服务号', trigger: 'blur' }
], ],
tripNumber: [ tripNumber: [
{ required: true, message: '请输入车次号', trigger: 'blur' } { required: true, message: '请输入车次号', trigger: 'change' }
] ]
}, },
dialogShow: false, dialogShow: false,
@ -72,7 +90,9 @@ export default {
}, },
computed: { computed: {
...mapGetters('map', [ ...mapGetters('map', [
'stationStandList' 'trainList',
'stationStandList',
'trainWindowSectionCode'
]), ]),
show() { show() {
return this.dialogShow && !this.$store.state.menuOperation.break; return this.dialogShow && !this.$store.state.menuOperation.break;
@ -93,12 +113,30 @@ export default {
}); });
}, },
methods: { methods: {
tripNumberChange(tripNumber) {
getServiceNumbersByTripNum(this.$route.query.group, tripNumber).then(resp => {
this.serviceNumber = resp.data;
});
},
doShow(operate, selected) { doShow(operate, selected) {
this.selected = selected; this.selected = selected;
// //
// if (!this.dialogShow) { // 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.dialogShow = true;
this.$nextTick(function () { this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
@ -109,7 +147,7 @@ export default {
this.dialogShow = false; this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false); this.$store.dispatch('map/setTrainWindowShow', false);
this.mouseCancelState(this.selected); // this.mouseCancelState(this.selected);
}, },
commit() { commit() {
this.$refs['form'].validate((valid) => { this.$refs['form'].validate((valid) => {

View File

@ -8,8 +8,8 @@ export function getBaseUrl() {
// BASE_API = 'http://192.168.3.6:9000'; // 旭强 // BASE_API = 'http://192.168.3.6:9000'; // 旭强
// BASE_API = 'http://192.168.3.41:9000'; // 张赛 // BASE_API = 'http://192.168.3.41:9000'; // 张赛
// BASE_API = 'http://192.168.3.82:9000'; // 杜康 // BASE_API = 'http://192.168.3.82:9000'; // 杜康
// BASE_API = 'http://b29z135112.zicp.vip'; BASE_API = 'http://b29z135112.zicp.vip';
BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康 // BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
} else { } else {
BASE_API = process.env.VUE_APP_BASE_API; BASE_API = process.env.VUE_APP_BASE_API;
} }