This commit is contained in:
zyy 2020-05-28 18:34:47 +08:00
commit 79e76bbfb1
49 changed files with 200 additions and 1784 deletions

View File

@ -1,222 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="beijing-01__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="340px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<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="tripNumber">
<!-- <el-input v-model="addModel.tripNumber" /> -->
<el-select v-model="addModel.tripNumber" filterable @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-select v-model="addModel.serviceNumber" filterable>
<el-option
v-for="serviceNumber in serviceNumberList"
:key="serviceNumber"
:label="serviceNumber"
:value="serviceNumber"
/>
</el-select>
</el-form-item>
</div>
</el-form>
<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 CMD from '@/scripts/cmdPlugin/CommandEnum';
import { getTripNumberList, getServiceNumbersByTripNum } from '@/api/simulation';
export default {
// name: 'TrainMove',
name: 'TrainAddPlan',
components: {
},
data() {
return {
trainNoList: [],
selected: null,
tripNumberList: [],
serviceNumberList: [],
addModel: {
serviceNumber: '', //
tripNumber: '' //
},
rules: {
serviceNumber: [
{ required: true, message: '请输入服务号', trigger: 'blur' }
],
tripNumber: [
{ required: true, message: '请输入车次号', trigger: 'change' }
]
},
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.moveTrainId.menu.domId : '';
},
title() {
return '创建计划车';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
tripNumberChange(tripNumber) {
getServiceNumbersByTripNum(this.$route.query.group, tripNumber).then(resp => {
this.serviceNumberList = [];
if (typeof resp.data == 'string') {
this.serviceNumberList.push(resp.data);
} else {
resp.data.forEach(item => {
if (!this.serviceNumberList.includes(item)) {
this.serviceNumberList.push(item);
}
});
}
if (this.serviceNumberList.length === 1) {
this.addModel.serviceNumber = this.serviceNumberList[0];
}
});
},
doShow(operate, selected) {
this.selected = selected;
//
if (!this.dialogShow) {
}
this.addModel = {
tripNumber:'',
serviceNumber:''
};
getTripNumberList(this.$route.query.group).then(resp => {
this.tripNumberList = [];
resp.data.forEach(item => {
if (!this.tripNumberList.includes(item)) {
this.tripNumberList.push(item);
}
});
}).catch(() => {
// this.$messageBox(error.message);
});
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);
// mouseCancelState(this.selected);
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
over: true,
operation: OperationEvent.Train.createPlanTrain.menu.operation,
cmdType: CMD.Section.CMD_Train_Init_Plan,
param: {
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(() => {
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/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
},
handerTrainSource() {
const 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 {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -5,8 +5,6 @@
<speed-limit-control ref="speedLimitControl" /> <speed-limit-control ref="speedLimitControl" />
<alxe-effective ref="alxeEffective" /> <alxe-effective ref="alxeEffective" />
<notice-info ref="noticeInfo" /> <notice-info ref="noticeInfo" />
<set-fault ref="setFault" />
<train-add-plan ref="trainAddPlan" />
</div> </div>
</template> </template>
@ -23,8 +21,6 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import CMD from '@/scripts/cmdPlugin/CommandEnum'; import CMD from '@/scripts/cmdPlugin/CommandEnum';
import {menuOperate, commitOperate} from './utils/menuOperate'; import {menuOperate, commitOperate} from './utils/menuOperate';
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
import TrainAddPlan from './dialog/trainAddPlan';
export default { export default {
name: 'SectionMenu', name: 'SectionMenu',
@ -33,9 +29,7 @@ export default {
SectionControl, SectionControl,
SpeedLimitControl, SpeedLimitControl,
AlxeEffective, AlxeEffective,
NoticeInfo, NoticeInfo
SetFault,
TrainAddPlan
}, },
props: { props: {
selected: { selected: {
@ -183,7 +177,7 @@ export default {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainAddPlan.doShow(operate, this.selected); this.$store.dispatch('training/setCommonMenuStep', operate);
} }
}); });
}, },
@ -277,7 +271,7 @@ export default {
setStoppage() { setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected); this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
} }
}); });
}, },
@ -285,7 +279,7 @@ export default {
cancelStoppage() { cancelStoppage() {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
} }
}); });
} }

View File

@ -7,7 +7,6 @@
<route-detail ref="routeDetail" /> <route-detail ref="routeDetail" />
<notice-info ref="noticeInfo" /> <notice-info ref="noticeInfo" />
<password-box ref="password" @checkOver="passWordCommit" /> <password-box ref="password" @checkOver="passWordCommit" />
<set-fault ref="setFault" />
</div> </div>
</template> </template>
@ -24,10 +23,8 @@ import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import CMD from '@/scripts/cmdPlugin/CommandEnum'; import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu } from '@/scripts/ConstDic'; import { DeviceMenu } from '@/scripts/ConstDic';
import { mouseCancelState } from './utils/menuItemStatus';
import PasswordBox from './dialog/childDialog/passwordInputBox.vue'; import PasswordBox from './dialog/childDialog/passwordInputBox.vue';
import {menuOperate, commitOperate} from './utils/menuOperate'; import {menuOperate, commitOperate} from './utils/menuOperate';
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
export default { export default {
name: 'SignalMenu', name: 'SignalMenu',
@ -38,8 +35,7 @@ export default {
RouteHandControl, RouteHandControl,
RouteDetail, RouteDetail,
NoticeInfo, NoticeInfo,
PasswordBox, PasswordBox
SetFault
}, },
props: { props: {
selected: { selected: {
@ -284,7 +280,7 @@ export default {
setStoppage() { setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected); this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
} }
}); });
}, },
@ -292,7 +288,7 @@ export default {
cancelStoppage() { cancelStoppage() {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
} }
}); });
}, },

View File

@ -8,7 +8,6 @@
<stand-stop-time ref="standStopTime" /> <stand-stop-time ref="standStopTime" />
<notice-info ref="noticeInfo" /> <notice-info ref="noticeInfo" />
<stand-back-strategy ref="standBackStrategy" /> <stand-back-strategy ref="standBackStrategy" />
<set-fault ref="setFault" />
</div> </div>
</template> </template>
@ -27,9 +26,7 @@ import {DeviceMenu } from '@/scripts/ConstDic';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import CMD from '@/scripts/cmdPlugin/CommandEnum'; import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { mouseCancelState } from './utils/menuItemStatus';
import {menuOperate, commitOperate} from './utils/menuOperate'; import {menuOperate, commitOperate} from './utils/menuOperate';
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
export default { export default {
name: 'StationStandMenu', name: 'StationStandMenu',
@ -41,8 +38,7 @@ export default {
StandRunLevel, StandRunLevel,
NoticeInfo, NoticeInfo,
StandBackStrategy, StandBackStrategy,
StandStopTime, StandStopTime
SetFault
}, },
props: { props: {
selected: { selected: {
@ -202,7 +198,7 @@ export default {
setStoppage() { setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected); this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
} }
}); });
}, },
@ -210,7 +206,7 @@ export default {
cancelStoppage() { cancelStoppage() {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
} }
}); });
}, },

View File

@ -6,7 +6,6 @@
<speed-limit-control ref="speedLimitControl" /> <speed-limit-control ref="speedLimitControl" />
<alxe-effective ref="alxeEffective" /> <alxe-effective ref="alxeEffective" />
<notice-info ref="noticeInfo" /> <notice-info ref="noticeInfo" />
<set-fault ref="setFault" />
</div> </div>
</template> </template>
@ -24,7 +23,6 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import CMD from '@/scripts/cmdPlugin/CommandEnum'; import CMD from '@/scripts/cmdPlugin/CommandEnum';
import {menuOperate, commitOperate} from './utils/menuOperate'; import {menuOperate, commitOperate} from './utils/menuOperate';
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
export default { export default {
name: 'SwitchMenu', name: 'SwitchMenu',
@ -34,8 +32,7 @@ export default {
SwitchControl, SwitchControl,
SpeedLimitControl, SpeedLimitControl,
AlxeEffective, AlxeEffective,
NoticeInfo, NoticeInfo
SetFault
}, },
props: { props: {
selected: { selected: {
@ -196,7 +193,7 @@ export default {
setStoppage() { setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected); this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
} }
}); });
}, },
@ -204,7 +201,7 @@ export default {
cancelStoppage() { cancelStoppage() {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
} }
}); });
}, },

View File

@ -196,7 +196,16 @@ export const menuOperate = {
operation: OperationEvent.StationControl.emergencyStationControl.menu.operation, operation: OperationEvent.StationControl.emergencyStationControl.menu.operation,
cmdType:CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL cmdType:CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL
} }
},
Common: {
setFault: {
operation: OperationEvent.MixinCommand.stoppage.menu.operation,
cmdType: CMD.Fault.CMD_SET_FAULT
},
cancelFault: {
operation: OperationEvent.MixinCommand.cancelStoppage.menu.operation,
cmdType: CMD.Fault.CMD_CANCEL_FAULT
}
} }
}; };

View File

@ -1,214 +0,0 @@
<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 label="车次号:" prop="tripNumber">
<!--<el-input v-model="addModel.tripNumber"/>-->
<el-select v-model="addModel.tripNumber" filterable @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-select v-model="addModel.serviceNumber" filterable>
<el-option
v-for="serviceNumber in serviceNumberList"
:key="serviceNumber"
:label="serviceNumber"
:value="serviceNumber"
/>
</el-select>
</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: [],
serviceNumberList: [],
addModel: {
tripNumber:'',
serviceNumber: ''
},
rules: {
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.serviceNumberList = [];
if (typeof resp.data == 'string') {
this.serviceNumberList.push(resp.data);
} else {
resp.data.forEach(item => {
if (!this.serviceNumberList.includes(item)) {
this.serviceNumberList.push(item);
}
});
}
if (this.serviceNumberList.length === 1) {
this.addModel.serviceNumber = this.serviceNumberList[0];
}
});
},
doShow(operate, selected) {
this.selected = selected;
//
this.addModel = {
tripNumber:'',
serviceNumber:''
};
getTripNumberList(this.$route.query.group).then(resp => {
this.tripNumberList = [];
resp.data.forEach(item => {
if (!this.tripNumberList.includes(item)) {
this.tripNumberList.push(item);
}
});
}).catch(() => {
// this.$messageBox(error.message);
});
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.Section.CMD_Train_Init_Plan,
param: {
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(() => {
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(() => { 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

@ -5,8 +5,6 @@
<section-control ref="sectionControl" /> <section-control ref="sectionControl" />
<section-cmd-control ref="sectionCmdControl" /> <section-cmd-control ref="sectionCmdControl" />
<speed-limit-control ref="speedLimitControl" /> <speed-limit-control ref="speedLimitControl" />
<train-init-plan ref="trainInitPlan" />
<set-fault ref="setFault" />
</div> </div>
</template> </template>
@ -21,9 +19,7 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
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 MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
import {menuOperate, commitOperate} from './utils/menuOperate'; import {menuOperate, commitOperate} from './utils/menuOperate';
import TrainInitPlan from './dialog/trainInitPlan';
export default { export default {
name: 'SectionMenu', name: 'SectionMenu',
@ -32,9 +28,7 @@ export default {
NoticeInfo, NoticeInfo,
SpeedLimitControl, SpeedLimitControl,
SectionControl, SectionControl,
SectionCmdControl, SectionCmdControl
SetFault,
TrainInitPlan
}, },
props: { props: {
selected: { selected: {
@ -139,7 +133,7 @@ export default {
this.$store.dispatch('training/nextNew', step).then(({ valid }) => { this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainInitPlan.doShow(step, this.selected); this.$store.dispatch('training/setCommonMenuStep', step);
} }
}); });
}, },
@ -180,7 +174,7 @@ export default {
setStoppage() { setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected); this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
} }
}); });
}, },
@ -188,7 +182,7 @@ export default {
cancelStoppage() { cancelStoppage() {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
} }
}); });
}, },

View File

@ -3,7 +3,6 @@
<pop-menu ref="popMenu" :menu="menu" :pop-class="popClass" /> <pop-menu ref="popMenu" :menu="menu" :pop-class="popClass" />
<notice-info ref="noticeInfo" /> <notice-info ref="noticeInfo" />
<create-device-label ref="createDeviceLabel" /> <create-device-label ref="createDeviceLabel" />
<set-fault ref="setFault" />
</div> </div>
</template> </template>
@ -16,7 +15,6 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import CMD from '@/scripts/cmdPlugin/CommandEnum'; import CMD from '@/scripts/cmdPlugin/CommandEnum';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
import {menuOperate, commitOperate} from './utils/menuOperate'; import {menuOperate, commitOperate} from './utils/menuOperate';
export default { export default {
@ -24,8 +22,7 @@ export default {
components: { components: {
PopMenu, PopMenu,
NoticeInfo, NoticeInfo,
CreateDeviceLabel, CreateDeviceLabel
SetFault
}, },
props: { props: {
selected: { selected: {
@ -260,7 +257,7 @@ export default {
setStoppage() { setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected); this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
} }
}); });
}, },
@ -268,7 +265,7 @@ export default {
cancelStoppage() { cancelStoppage() {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
} }
}); });
}, },

View File

@ -3,7 +3,6 @@
<pop-menu ref="popMenu" :menu="menu" /> <pop-menu ref="popMenu" :menu="menu" />
<notice-info ref="noticeInfo" /> <notice-info ref="noticeInfo" />
<platform-dwell ref="platformDwell" /> <platform-dwell ref="platformDwell" />
<set-fault ref="setFault" />
</div> </div>
</template> </template>
@ -16,7 +15,6 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { OperateMode } from '@/scripts/ConstDic'; import { OperateMode } from '@/scripts/ConstDic';
import CMD from '@/scripts/cmdPlugin/CommandEnum'; import CMD from '@/scripts/cmdPlugin/CommandEnum';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
import {menuOperate, commitOperate} from './utils/menuOperate'; import {menuOperate, commitOperate} from './utils/menuOperate';
export default { export default {
@ -24,8 +22,7 @@ export default {
components: { components: {
PopMenu, PopMenu,
NoticeInfo, NoticeInfo,
PlatformDwell, PlatformDwell
SetFault
}, },
props: { props: {
selected: { selected: {
@ -143,7 +140,7 @@ export default {
setStoppage() { setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected); this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
} }
}); });
}, },
@ -151,7 +148,7 @@ export default {
cancelStoppage() { cancelStoppage() {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
} }
}); });
}, },

View File

@ -4,7 +4,6 @@
<notice-info ref="noticeInfo" /> <notice-info ref="noticeInfo" />
<switch-control ref="switchControl" /> <switch-control ref="switchControl" />
<create-device-label ref="createDeviceLabel" /> <create-device-label ref="createDeviceLabel" />
<set-fault ref="setFault" />
</div> </div>
</template> </template>
@ -19,7 +18,6 @@ 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 MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
import {menuOperate, commitOperate} from './utils/menuOperate'; import {menuOperate, commitOperate} from './utils/menuOperate';
export default { export default {
@ -28,8 +26,7 @@ export default {
PopMenu, PopMenu,
NoticeInfo, NoticeInfo,
CreateDeviceLabel, CreateDeviceLabel,
SwitchControl, SwitchControl
SetFault
}, },
mixins: [ mixins: [
CancelMouseState CancelMouseState
@ -183,7 +180,7 @@ export default {
setStoppage() { setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected); this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
} }
}); });
}, },
@ -191,7 +188,7 @@ export default {
cancelStoppage() { cancelStoppage() {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
} }
}); });
}, },

View File

@ -215,11 +215,11 @@ export const menuOperate = {
}, },
Common: { Common: {
setFault: { setFault: {
operation: OperationEvent.Section.stoppage.menu.operation, operation: OperationEvent.MixinCommand.stoppage.menu.operation,
cmdType: CMD.Fault.CMD_SET_FAULT cmdType: CMD.Fault.CMD_SET_FAULT
}, },
cancelFault: { cancelFault: {
operation: OperationEvent.Section.cancelStoppage.menu.operation, operation: OperationEvent.MixinCommand.cancelStoppage.menu.operation,
cmdType: CMD.Fault.CMD_CANCEL_FAULT cmdType: CMD.Fault.CMD_CANCEL_FAULT
} }
} }

View File

@ -1,208 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm 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 label="车次号:" prop="tripNumber">
<!--<el-input v-model="addModel.tripNumber"/>-->
<el-select v-model="addModel.tripNumber" filterable @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-select v-model="addModel.serviceNumber" filterable>
<el-option
v-for="serviceNumber in serviceNumberList"
:key="serviceNumber"
:label="serviceNumber"
:value="serviceNumber"
/>
</el-select>
</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: [],
serviceNumberList: [],
addModel: {
tripNumber:'',
serviceNumber: ''
},
rules: {
serviceNumber: [
{ required: true, message: '请输入服务号', trigger: 'change'}
],
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: {
tripNumberChange(tripNumber) {
getServiceNumbersByTripNum(this.$route.query.group, tripNumber).then(resp => {
this.serviceNumberList = [];
resp.data.forEach(item => {
if (!this.serviceNumberList.includes(item)) {
this.serviceNumberList.push(item);
}
});
});
if (this.serviceNumberList.length === 1) {
this.addModel.serviceNumber = this.serviceNumberList[0];
}
},
doShow(operate, selected) {
this.selected = selected;
//
this.addModel = {
tripNumber:'',
serviceNumber: ''
};
getTripNumberList(this.$route.query.group).then(resp => {
this.tripNumberList = [];
resp.data.forEach(item => {
if (!this.tripNumberList.includes(item)) {
this.tripNumberList.push(item);
}
});
}).catch(() => {
// this.$messageBox(error.message);
});
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.Section.CMD_Train_Init_Plan,
param: {
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(() => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow(operate);
// this.$messageBox(error.message);
});
} 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

@ -5,8 +5,6 @@
<train-create ref="trainCreate" /> <train-create ref="trainCreate" />
<section-detail ref="sectionDetail" /> <section-detail ref="sectionDetail" />
<notice-info ref="noticeInfo" /> <notice-info ref="noticeInfo" />
<set-fault ref="setFault" />
<train-init-plan ref="trainInitPlan" />
</div> </div>
</template> </template>
@ -21,9 +19,7 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
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 MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
import {menuOperate, commitOperate} from './utils/menuOperate'; import {menuOperate, commitOperate} from './utils/menuOperate';
import TrainInitPlan from './dialog/trainInitPlan';
export default { export default {
name: 'SectionMenu', name: 'SectionMenu',
@ -32,9 +28,7 @@ export default {
SectionControl, SectionControl,
SectionDetail, SectionDetail,
TrainCreate, TrainCreate,
NoticeInfo, NoticeInfo
SetFault,
TrainInitPlan
}, },
props: { props: {
selected: { selected: {
@ -201,7 +195,7 @@ export default {
setStoppage() { setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected); this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
} }
}); });
}, },
@ -209,7 +203,7 @@ export default {
cancelStoppage() { cancelStoppage() {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
} }
}); });
}, },
@ -234,7 +228,7 @@ export default {
this.$store.dispatch('training/nextNew', step).then(({ valid }) => { this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainInitPlan.doShow(step, this.selected); this.$store.dispatch('training/setCommonMenuStep', step);
} }
}); });
} }

View File

@ -8,7 +8,6 @@
<route-hand-control ref="routeHandControl" /> <route-hand-control ref="routeHandControl" />
<notice-info ref="noticeInfo" /> <notice-info ref="noticeInfo" />
<password-box ref="passwordBox" @checkOver="passWordCommit" /> <password-box ref="passwordBox" @checkOver="passWordCommit" />
<set-fault ref="setFault" />
</div> </div>
</template> </template>
@ -26,7 +25,6 @@ import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import CMD from '@/scripts/cmdPlugin/CommandEnum'; import CMD from '@/scripts/cmdPlugin/CommandEnum';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import PasswordBox from './dialog/childDialog/passwordInputBox'; import PasswordBox from './dialog/childDialog/passwordInputBox';
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
import {menuOperate, commitOperate} from './utils/menuOperate'; import {menuOperate, commitOperate} from './utils/menuOperate';
export default { export default {
@ -39,8 +37,7 @@ export default {
RouteDetail, RouteDetail,
RouteGuide, RouteGuide,
NoticeInfo, NoticeInfo,
PasswordBox, PasswordBox
SetFault
}, },
props: { props: {
selected: { selected: {
@ -233,7 +230,7 @@ export default {
setStoppage() { setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected); this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
} }
}); });
}, },
@ -241,7 +238,7 @@ export default {
cancelStoppage() { cancelStoppage() {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
} }
}); });
}, },

View File

@ -4,7 +4,6 @@
<stand-control ref="standControl" /> <stand-control ref="standControl" />
<stand-detail ref="standDetail" /> <stand-detail ref="standDetail" />
<notice-info ref="noticeInfo" /> <notice-info ref="noticeInfo" />
<set-fault ref="setFault" />
</div> </div>
</template> </template>
@ -18,7 +17,6 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import CMD from '@/scripts/cmdPlugin/CommandEnum'; import CMD from '@/scripts/cmdPlugin/CommandEnum';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
import {menuOperate, commitOperate} from './utils/menuOperate'; import {menuOperate, commitOperate} from './utils/menuOperate';
export default { export default {
@ -27,8 +25,7 @@ export default {
PopMenu, PopMenu,
StandControl, StandControl,
StandDetail, StandDetail,
NoticeInfo, NoticeInfo
SetFault
}, },
props: { props: {
selected: { selected: {
@ -157,7 +154,7 @@ export default {
setStoppage() { setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected); this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
} }
}); });
}, },
@ -165,7 +162,7 @@ export default {
cancelStoppage() { cancelStoppage() {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
} }
}); });
}, },

View File

@ -4,7 +4,6 @@
<section-control ref="sectionControl" /> <section-control ref="sectionControl" />
<switch-control ref="switchControl" /> <switch-control ref="switchControl" />
<notice-info ref="noticeInfo" /> <notice-info ref="noticeInfo" />
<set-fault ref="setFault" />
</div> </div>
</template> </template>
@ -20,7 +19,6 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import {menuOperate, commitOperate} from './utils/menuOperate'; import {menuOperate, commitOperate} from './utils/menuOperate';
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
export default { export default {
name: 'SwitchMenu', name: 'SwitchMenu',
@ -28,8 +26,7 @@ export default {
PopMenu, PopMenu,
SectionControl, SectionControl,
SwitchControl, SwitchControl,
NoticeInfo, NoticeInfo
SetFault
}, },
mixins: [ mixins: [
CancelMouseState CancelMouseState
@ -156,7 +153,7 @@ export default {
setStoppage() { setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected); this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
} }
}); });
}, },
@ -164,7 +161,7 @@ export default {
cancelStoppage() { cancelStoppage() {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
} }
}); });
}, },

View File

@ -215,11 +215,11 @@ export const menuOperate = {
}, },
Common: { Common: {
setFault: { setFault: {
operation: OperationEvent.Section.stoppage.menu.operation, operation: OperationEvent.MixinCommand.stoppage.menu.operation,
cmdType: CMD.Fault.CMD_SET_FAULT cmdType: CMD.Fault.CMD_SET_FAULT
}, },
cancelFault: { cancelFault: {
operation: OperationEvent.Section.cancelStoppage.menu.operation, operation: OperationEvent.MixinCommand.cancelStoppage.menu.operation,
cmdType: CMD.Fault.CMD_CANCEL_FAULT cmdType: CMD.Fault.CMD_CANCEL_FAULT
} }
} }

View File

@ -1,212 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="foshan-01__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="340px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<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="tripNumber">
<el-select v-model="addModel.tripNumber" filterable @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-select v-model="addModel.serviceNumber" filterable>
<el-option
v-for="serviceNumber in serviceNumberList"
:key="serviceNumber"
:label="serviceNumber"
:value="serviceNumber"
/>
</el-select>
</el-form-item>
</div>
</el-form>
<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 { getTripNumberList, getServiceNumbersByTripNum } from '@/api/simulation';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
// name: 'TrainMove',
name: 'TrainAddPlan',
components: {
},
data() {
return {
trainNoList: [],
selected: null,
tripNumberList: [],
serviceNumberList: [],
addModel: {
serviceNumber: '', //
tripNumber: '' //
},
rules: {
serviceNumber: [
{ required: true, message: '请输入服务号', trigger: 'blur' }
],
tripNumber: [
{ required: true, message: '请输入车次号', trigger: 'change' }
]
},
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: {
tripNumberChange(tripNumber) {
getServiceNumbersByTripNum(this.$route.query.group, tripNumber).then(resp => {
this.serviceNumberList = [];
if (typeof resp.data == 'string') {
this.serviceNumberList.push(resp.data);
} else {
resp.data.forEach(item => {
if (!this.serviceNumberList.includes(item)) {
this.serviceNumberList.push(item);
}
});
}
if (this.serviceNumberList.length === 1) {
this.addModel.serviceNumber = this.serviceNumberList[0];
}
});
},
doShow(operate, selected) {
this.selected = selected;
//
// if (!this.dialogShow) {
// }
this.addModel = {
tripNumber:'',
serviceNumber:''
};
getTripNumberList(this.$route.query.group).then(resp => {
this.tripNumberList = [];
resp.data.forEach(item => {
if (!this.tripNumberList.includes(item)) {
this.tripNumberList.push(item);
}
});
}).catch(error => {
console.log(error);
// this.$messageBox(error.message);
});
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.Section.CMD_Train_Init_Plan,
param: {
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(() => {
this.loading = false;
});
} 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(() => {
this.doClose();
});
}
}
};
</script>
<style scoped>
.foshan-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -5,8 +5,6 @@
<section-un-lock ref="sectionUnLock" /> <section-un-lock ref="sectionUnLock" />
<speed-limit-control ref="speedLimitControl" /> <speed-limit-control ref="speedLimitControl" />
<notice-info ref="noticeInfo" /> <notice-info ref="noticeInfo" />
<train-add-plan ref="trainAddPlan" />
<set-fault ref="setFault" />
</div> </div>
</template> </template>
@ -21,8 +19,6 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import {menuOperate, commitOperate} from './utils/menuOperate'; import {menuOperate, commitOperate} from './utils/menuOperate';
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
import TrainAddPlan from './dialog/trainAddPlan';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default { export default {
@ -32,9 +28,7 @@ export default {
SectionControl, SectionControl,
SectionUnLock, SectionUnLock,
SpeedLimitControl, SpeedLimitControl,
NoticeInfo, NoticeInfo
SetFault,
TrainAddPlan
}, },
props: { props: {
selected: { selected: {
@ -166,7 +160,7 @@ export default {
this.$store.dispatch('training/nextNew', step).then(({ valid }) => { this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainAddPlan.doShow(step, this.selected); this.$store.dispatch('training/setCommonMenuStep', step);
} }
}); });
}, },
@ -174,7 +168,7 @@ export default {
setStoppage() { setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected); this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
} }
}); });
}, },
@ -182,7 +176,7 @@ export default {
cancelStoppage() { cancelStoppage() {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
} }
}); });
}, },

View File

@ -9,7 +9,6 @@
<route-detail ref="routeDetail" /> <route-detail ref="routeDetail" />
<router-command ref="routerCommand" /> <router-command ref="routerCommand" />
<notice-info ref="noticeInfo" /> <notice-info ref="noticeInfo" />
<set-fault ref="setFault" />
</div> </div>
</template> </template>
@ -23,7 +22,6 @@ import RouteHandControl from './dialog/routeHandControl';
import RouterCommand from './dialog/routerCommand'; import RouterCommand from './dialog/routerCommand';
import RouteDetail from './dialog/routeDetail'; import RouteDetail from './dialog/routeDetail';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo'; import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
import CMD from '@/scripts/cmdPlugin/CommandEnum'; import CMD from '@/scripts/cmdPlugin/CommandEnum';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
@ -43,8 +41,7 @@ export default {
RouteHandControl, RouteHandControl,
RouteDetail, RouteDetail,
RouterCommand, RouterCommand,
NoticeInfo, NoticeInfo
SetFault
}, },
props: { props: {
selected: { selected: {
@ -220,7 +217,7 @@ export default {
setStoppage() { setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected); this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
} }
}); });
}, },
@ -228,7 +225,7 @@ export default {
cancelStoppage() { cancelStoppage() {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
} }
}); });
}, },

View File

@ -9,7 +9,6 @@
<stand-back-strategy ref="standBackStrategy" /> <stand-back-strategy ref="standBackStrategy" />
<stand-detain-train-all ref="standDetainTrainAll" /> <stand-detain-train-all ref="standDetainTrainAll" />
<notice-info ref="noticeInfo" /> <notice-info ref="noticeInfo" />
<set-fault ref="setFault" />
</div> </div>
</template> </template>
@ -29,7 +28,6 @@ import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import CMD from '@/scripts/cmdPlugin/CommandEnum'; import CMD from '@/scripts/cmdPlugin/CommandEnum';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import {menuOperate, commitOperate} from './utils/menuOperate'; import {menuOperate, commitOperate} from './utils/menuOperate';
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
export default { export default {
name: 'StationStandMenu', name: 'StationStandMenu',
@ -42,8 +40,7 @@ export default {
NoticeInfo, NoticeInfo,
StandBackStrategy, StandBackStrategy,
StandStopTime, StandStopTime,
StandDetainTrainAll, StandDetainTrainAll
SetFault
}, },
props: { props: {
selected: { selected: {
@ -199,7 +196,7 @@ export default {
setStoppage() { setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected); this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
} }
}); });
}, },
@ -207,7 +204,7 @@ export default {
cancelStoppage() { cancelStoppage() {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
} }
}); });
}, },

View File

@ -5,7 +5,6 @@
<switch-un-lock ref="switchUnLock" /> <switch-un-lock ref="switchUnLock" />
<speed-limit-control ref="speedLimitControl" /> <speed-limit-control ref="speedLimitControl" />
<notice-info ref="noticeInfo" /> <notice-info ref="noticeInfo" />
<set-fault ref="setFault" />
</div> </div>
</template> </template>
@ -21,7 +20,6 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
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 MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
export default { export default {
name: 'SwitchMenu', name: 'SwitchMenu',
@ -30,8 +28,7 @@ export default {
SwitchControl, SwitchControl,
SwitchUnLock, SwitchUnLock,
SpeedLimitControl, SpeedLimitControl,
NoticeInfo, NoticeInfo
SetFault
}, },
props: { props: {
selected: { selected: {
@ -148,7 +145,7 @@ export default {
setStoppage() { setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected); this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
} }
}); });
}, },
@ -156,7 +153,7 @@ export default {
cancelStoppage() { cancelStoppage() {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
} }
}); });
}, },

View File

@ -215,11 +215,11 @@ export const menuOperate = {
}, },
Common: { Common: {
setFault: { setFault: {
operation: OperationEvent.Section.stoppage.menu.operation, operation: OperationEvent.MixinCommand.stoppage.menu.operation,
cmdType: CMD.Fault.CMD_SET_FAULT cmdType: CMD.Fault.CMD_SET_FAULT
}, },
cancelFault: { cancelFault: {
operation: OperationEvent.Section.cancelStoppage.menu.operation, operation: OperationEvent.MixinCommand.cancelStoppage.menu.operation,
cmdType: CMD.Fault.CMD_CANCEL_FAULT cmdType: CMD.Fault.CMD_CANCEL_FAULT
} }
} }

View File

@ -1,212 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="fuzhou-01__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="340px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<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="tripNumber">
<el-select v-model="addModel.tripNumber" filterable @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-select v-model="addModel.serviceNumber" filterable>
<el-option
v-for="serviceNumber in serviceNumberList"
:key="serviceNumber"
:label="serviceNumber"
:value="serviceNumber"
/>
</el-select>
</el-form-item>
</div>
</el-form>
<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 { getTripNumberList, getServiceNumbersByTripNum } from '@/api/simulation';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
// name: 'TrainMove',
name: 'TrainAddPlan',
components: {
},
data() {
return {
trainNoList: [],
selected: null,
tripNumberList: [],
serviceNumberList: [],
addModel: {
serviceNumber: '', //
tripNumber: '' //
},
rules: {
serviceNumber: [
{ required: true, message: '请输入服务号', trigger: 'blur' }
],
tripNumber: [
{ required: true, message: '请输入车次号', trigger: 'change' }
]
},
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: {
tripNumberChange(tripNumber) {
getServiceNumbersByTripNum(this.$route.query.group, tripNumber).then(resp => {
this.serviceNumberList = [];
if (typeof resp.data == 'string') {
this.serviceNumberList.push(resp.data);
} else {
resp.data.forEach(item => {
if (!this.serviceNumberList.includes(item)) {
this.serviceNumberList.push(item);
}
});
}
if (this.serviceNumberList.length === 1) {
this.addModel.serviceNumber = this.serviceNumberList[0];
}
});
},
doShow(operate, selected) {
this.selected = selected;
//
// if (!this.dialogShow) {
// }
this.addModel = {
tripNumber:'',
serviceNumber:''
};
getTripNumberList(this.$route.query.group).then(resp => {
this.tripNumberList = [];
resp.data.forEach(item => {
if (!this.tripNumberList.includes(item)) {
this.tripNumberList.push(item);
}
});
}).catch(error => {
console.log(error);
// this.$messageBox(error.message);
});
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.Section.CMD_Train_Init_Plan,
param: {
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(() => {
this.loading = false;
});
} 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(() => {
this.doClose();
});
}
}
};
</script>
<style scoped>
.foshan-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -5,8 +5,6 @@
<section-cmd-control ref="sectionCmdControl" /> <section-cmd-control ref="sectionCmdControl" />
<speed-cmd-control ref="speedCmdControl" /> <speed-cmd-control ref="speedCmdControl" />
<notice-info ref="noticeInfo" /> <notice-info ref="noticeInfo" />
<set-fault ref="setFault" />
<train-add-plan ref="trainAddPlan" />
</div> </div>
</template> </template>
@ -22,9 +20,7 @@ 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 MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
import {menuOperate, commitOperate} from './utils/menuOperate'; import {menuOperate, commitOperate} from './utils/menuOperate';
import TrainAddPlan from './dialog/trainAddPlan';
export default { export default {
name: 'SectionMenu', name: 'SectionMenu',
@ -33,9 +29,7 @@ export default {
SectionControl, SectionControl,
SectionCmdControl, SectionCmdControl,
SpeedCmdControl, SpeedCmdControl,
NoticeInfo, NoticeInfo
SetFault,
TrainAddPlan
}, },
props: { props: {
selected: { selected: {
@ -202,7 +196,7 @@ export default {
this.$store.dispatch('training/nextNew', step).then(({ valid }) => { this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainAddPlan.doShow(step, this.selected); this.$store.dispatch('training/setCommonMenuStep', step);
} }
}); });
}, },
@ -222,7 +216,7 @@ export default {
setStoppage() { setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected); this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
} }
}); });
}, },
@ -230,7 +224,7 @@ export default {
cancelStoppage() { cancelStoppage() {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
} }
}); });
}, },

View File

@ -8,7 +8,6 @@
<route-hand-control ref="routeHandControl" /> <route-hand-control ref="routeHandControl" />
<route-detail ref="routeDetail" /> <route-detail ref="routeDetail" />
<notice-info ref="noticeInfo" /> <notice-info ref="noticeInfo" />
<set-fault ref="setFault" />
</div> </div>
</template> </template>
@ -27,7 +26,6 @@ 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 { querySignalStatus } from '@/api/simulation'; import { querySignalStatus } from '@/api/simulation';
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
import {menuOperate, commitOperate} from './utils/menuOperate'; import {menuOperate, commitOperate} from './utils/menuOperate';
export default { export default {
@ -40,8 +38,7 @@ export default {
RouteCmdControl, RouteCmdControl,
RouteHandControl, RouteHandControl,
RouteDetail, RouteDetail,
NoticeInfo, NoticeInfo
SetFault
}, },
props: { props: {
selected: { selected: {
@ -220,7 +217,7 @@ export default {
setStoppage() { setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected); this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
} }
}); });
}, },
@ -228,7 +225,7 @@ export default {
cancelStoppage() { cancelStoppage() {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
} }
}); });
}, },

View File

@ -8,7 +8,6 @@
<stand-detain-train-all ref="standDetainTrainAll" /> <stand-detain-train-all ref="standDetainTrainAll" />
<notice-info ref="noticeInfo" /> <notice-info ref="noticeInfo" />
<stand-back-strategy ref="standBackStrategy" /> <stand-back-strategy ref="standBackStrategy" />
<set-fault ref="setFault" />
</div> </div>
</template> </template>
@ -27,7 +26,6 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import CMD from '@/scripts/cmdPlugin/CommandEnum'; import CMD from '@/scripts/cmdPlugin/CommandEnum';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
import {menuOperate, commitOperate} from './utils/menuOperate'; import {menuOperate, commitOperate} from './utils/menuOperate';
export default { export default {
@ -40,8 +38,7 @@ export default {
NoticeInfo, NoticeInfo,
StandBackStrategy, StandBackStrategy,
StandStopTime, StandStopTime,
StandDetainTrainAll, StandDetainTrainAll
SetFault
}, },
props: { props: {
selected: { selected: {
@ -225,7 +222,7 @@ export default {
setStoppage() { setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected); this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
} }
}); });
}, },
@ -233,7 +230,7 @@ export default {
cancelStoppage() { cancelStoppage() {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
} }
}); });
}, },

View File

@ -5,7 +5,6 @@
<switch-cmd-control ref="switchCmdControl" /> <switch-cmd-control ref="switchCmdControl" />
<speed-cmd-control ref="speedCmdControl" /> <speed-cmd-control ref="speedCmdControl" />
<notice-info ref="noticeInfo" /> <notice-info ref="noticeInfo" />
<set-fault ref="setFault" />
</div> </div>
</template> </template>
@ -20,7 +19,6 @@ 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 MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
import {menuOperate, commitOperate} from './utils/menuOperate'; import {menuOperate, commitOperate} from './utils/menuOperate';
export default { export default {
@ -30,8 +28,7 @@ export default {
SwitchControl, SwitchControl,
SwitchCmdControl, SwitchCmdControl,
SpeedCmdControl, SpeedCmdControl,
NoticeInfo, NoticeInfo
SetFault
}, },
props: { props: {
selected: { selected: {
@ -244,7 +241,7 @@ export default {
setStoppage() { setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected); this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
} }
}); });
}, },
@ -252,7 +249,7 @@ export default {
cancelStoppage() { cancelStoppage() {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
} }
}); });
}, },

View File

@ -266,11 +266,11 @@ export const menuOperate = {
}, },
Common: { Common: {
setFault: { setFault: {
operation: OperationEvent.Section.stoppage.menu.operation, operation: OperationEvent.MixinCommand.stoppage.menu.operation,
cmdType: CMD.Fault.CMD_SET_FAULT cmdType: CMD.Fault.CMD_SET_FAULT
}, },
cancelFault: { cancelFault: {
operation: OperationEvent.Section.cancelStoppage.menu.operation, operation: OperationEvent.MixinCommand.cancelStoppage.menu.operation,
cmdType: CMD.Fault.CMD_CANCEL_FAULT cmdType: CMD.Fault.CMD_CANCEL_FAULT
} }
} }

View File

@ -1,210 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="haerbin-01__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="300px"
: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 label="车次号:" prop="tripNumber">
<!--<el-input v-model="addModel.tripNumber"/>-->
<el-select v-model="addModel.tripNumber" filterable @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-select v-model="addModel.serviceNumber" filterable>
<el-option
v-for="serviceNumber in serviceNumberList"
:key="serviceNumber"
:label="serviceNumber"
:value="serviceNumber"
/>
</el-select>
</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: [],
serviceNumberList: [],
addModel: {
tripNumber:'',
serviceNumber: ''
},
rules: {
serviceNumber: [
{ required: true, message: '请输入服务号', trigger: 'change'}
],
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: {
tripNumberChange(tripNumber) {
getServiceNumbersByTripNum(this.$route.query.group, tripNumber).then(resp => {
this.serviceNumberList = [];
resp.data.forEach(item => {
if (!this.serviceNumberList.includes(item)) {
this.serviceNumberList.push(item);
}
});
});
if (this.serviceNumberList.length === 1) {
this.addModel.serviceNumber = this.serviceNumberList[0];
}
},
doShow(operate, selected) {
this.selected = selected;
//
this.addModel = {
tripNumber:'',
serviceNumber: ''
};
getTripNumberList(this.$route.query.group).then(resp => {
this.tripNumberList = [];
resp.data.forEach(item => {
if (!this.tripNumberList.includes(item)) {
this.tripNumberList.push(item);
}
});
}).catch(error => {
console.log(error);
// this.$messageBox(error.message);
});
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.Section.CMD_Train_Init_Plan,
param: {
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 => {
onsole.log(error);
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow(operate);
// this.$messageBox(error.message);
});
} 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: 200px;
overflow: auto;
}
</style>

View File

@ -5,8 +5,6 @@
<section-cmd-control ref="sectionCmdControl" /> <section-cmd-control ref="sectionCmdControl" />
<speed-cmd-control ref="speedCmdControl" /> <speed-cmd-control ref="speedCmdControl" />
<notice-info ref="noticeInfo" /> <notice-info ref="noticeInfo" />
<set-fault ref="setFault" />
<train-init-plan ref="trainInitPlan" />
</div> </div>
</template> </template>
@ -21,9 +19,7 @@ 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 MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
import {menuOperate, commitOperate} from './utils/menuOperate'; import {menuOperate, commitOperate} from './utils/menuOperate';
import TrainInitPlan from './dialog/trainInitPlan';
export default { export default {
name: 'SectionMenu', name: 'SectionMenu',
@ -32,9 +28,7 @@ export default {
SectionControl, SectionControl,
SectionCmdControl, SectionCmdControl,
SpeedCmdControl, SpeedCmdControl,
NoticeInfo, NoticeInfo
SetFault,
TrainInitPlan
}, },
props: { props: {
selected: { selected: {
@ -160,7 +154,7 @@ export default {
this.$store.dispatch('training/nextNew', step).then(({ valid }) => { this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainInitPlan.doShow(step, this.selected); this.$store.dispatch('training/setCommonMenuStep', step);
} }
}); });
}, },
@ -168,7 +162,7 @@ export default {
setStoppage() { setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected); this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
} }
}); });
}, },
@ -176,7 +170,7 @@ export default {
cancelStoppage() { cancelStoppage() {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
} }
}); });
}, },

View File

@ -8,7 +8,6 @@
<route-hand-control ref="routeHandControl" /> <route-hand-control ref="routeHandControl" />
<route-detail ref="routeDetail" /> <route-detail ref="routeDetail" />
<notice-info ref="noticeInfo" /> <notice-info ref="noticeInfo" />
<set-fault ref="setFault" />
</div> </div>
</template> </template>
@ -27,7 +26,6 @@ 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 { querySignalStatus } from '@/api/simulation'; // import { querySignalStatus } from '@/api/simulation';
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
import {menuOperate, commitOperate} from './utils/menuOperate'; import {menuOperate, commitOperate} from './utils/menuOperate';
export default { export default {
@ -40,8 +38,7 @@ export default {
RouteCmdControl, RouteCmdControl,
RouteHandControl, RouteHandControl,
RouteDetail, RouteDetail,
NoticeInfo, NoticeInfo
SetFault
}, },
props: { props: {
selected: { selected: {
@ -177,7 +174,7 @@ export default {
setStoppage() { setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected); this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
} }
}); });
}, },
@ -185,7 +182,7 @@ export default {
cancelStoppage() { cancelStoppage() {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
} }
}); });
}, },

View File

@ -8,7 +8,6 @@
<stand-detain-train-all ref="standDetainTrainAll" /> <stand-detain-train-all ref="standDetainTrainAll" />
<notice-info ref="noticeInfo" /> <notice-info ref="noticeInfo" />
<stand-back-strategy ref="standBackStrategy" /> <stand-back-strategy ref="standBackStrategy" />
<set-fault ref="setFault" />
</div> </div>
</template> </template>
@ -27,7 +26,6 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import CMD from '@/scripts/cmdPlugin/CommandEnum'; import CMD from '@/scripts/cmdPlugin/CommandEnum';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
import {menuOperate, commitOperate} from './utils/menuOperate'; import {menuOperate, commitOperate} from './utils/menuOperate';
export default { export default {
@ -40,8 +38,7 @@ export default {
NoticeInfo, NoticeInfo,
StandBackStrategy, StandBackStrategy,
StandStopTime, StandStopTime,
StandDetainTrainAll, StandDetainTrainAll
SetFault
}, },
props: { props: {
selected: { selected: {
@ -225,7 +222,7 @@ export default {
setStoppage() { setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected); this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
} }
}); });
}, },
@ -233,7 +230,7 @@ export default {
cancelStoppage() { cancelStoppage() {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
} }
}); });
}, },

View File

@ -5,7 +5,6 @@
<switch-cmd-control ref="switchCmdControl" /> <switch-cmd-control ref="switchCmdControl" />
<speed-cmd-control ref="speedCmdControl" /> <speed-cmd-control ref="speedCmdControl" />
<notice-info ref="noticeInfo" /> <notice-info ref="noticeInfo" />
<set-fault ref="setFault" />
</div> </div>
</template> </template>
@ -20,7 +19,6 @@ 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 MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
import {menuOperate, commitOperate} from './utils/menuOperate'; import {menuOperate, commitOperate} from './utils/menuOperate';
export default { export default {
@ -30,8 +28,7 @@ export default {
SwitchControl, SwitchControl,
SwitchCmdControl, SwitchCmdControl,
SpeedCmdControl, SpeedCmdControl,
NoticeInfo, NoticeInfo
SetFault
}, },
props: { props: {
selected: { selected: {
@ -144,7 +141,7 @@ export default {
setStoppage() { setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected); this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
} }
}); });
}, },
@ -152,7 +149,7 @@ export default {
cancelStoppage() { cancelStoppage() {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
} }
}); });
}, },

View File

@ -266,11 +266,11 @@ export const menuOperate = {
}, },
Common: { Common: {
setFault: { setFault: {
operation: OperationEvent.Section.stoppage.menu.operation, operation: OperationEvent.MixinCommand.stoppage.menu.operation,
cmdType: CMD.Fault.CMD_SET_FAULT cmdType: CMD.Fault.CMD_SET_FAULT
}, },
cancelFault: { cancelFault: {
operation: OperationEvent.Section.cancelStoppage.menu.operation, operation: OperationEvent.MixinCommand.cancelStoppage.menu.operation,
cmdType: CMD.Fault.CMD_CANCEL_FAULT cmdType: CMD.Fault.CMD_CANCEL_FAULT
} }
} }

View File

@ -1,212 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="ningbo-01__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="340px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<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="tripNumber">
<el-select v-model="addModel.tripNumber" filterable @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-select v-model="addModel.serviceNumber" filterable>
<el-option
v-for="serviceNumber in serviceNumberList"
:key="serviceNumber"
:label="serviceNumber"
:value="serviceNumber"
/>
</el-select>
</el-form-item>
</div>
</el-form>
<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 { getTripNumberList, getServiceNumbersByTripNum } from '@/api/simulation';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
// name: 'TrainMove',
name: 'TrainAddPlan',
components: {
},
data() {
return {
trainNoList: [],
selected: null,
tripNumberList: [],
serviceNumberList: [],
addModel: {
serviceNumber: '', //
tripNumber: '' //
},
rules: {
serviceNumber: [
{ required: true, message: '请输入服务号', trigger: 'blur' }
],
tripNumber: [
{ required: true, message: '请输入车次号', trigger: 'change' }
]
},
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: {
tripNumberChange(tripNumber) {
getServiceNumbersByTripNum(this.$route.query.group, tripNumber).then(resp => {
this.serviceNumberList = [];
if (typeof resp.data == 'string') {
this.serviceNumberList.push(resp.data);
} else {
resp.data.forEach(item => {
if (!this.serviceNumberList.includes(item)) {
this.serviceNumberList.push(item);
}
});
}
if (this.serviceNumberList.length === 1) {
this.addModel.serviceNumber = this.serviceNumberList[0];
}
});
},
doShow(operate, selected) {
this.selected = selected;
//
// if (!this.dialogShow) {
// }
this.addModel = {
tripNumber:'',
serviceNumber:''
};
getTripNumberList(this.$route.query.group).then(resp => {
this.tripNumberList = [];
resp.data.forEach(item => {
if (!this.tripNumberList.includes(item)) {
this.tripNumberList.push(item);
}
});
}).catch(error => {
console.log(error);
// this.$messageBox(error.message);
});
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.Section.CMD_Train_Init_Plan,
param: {
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(() => {
this.loading = false;
});
} 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(() => {
this.doClose();
});
}
}
};
</script>
<style scoped>
.ningbo-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -6,8 +6,6 @@
<speed-limit-control ref="speedLimitControl" /> <speed-limit-control ref="speedLimitControl" />
<alxe-effective ref="alxeEffective" /> <alxe-effective ref="alxeEffective" />
<notice-info ref="noticeInfo" /> <notice-info ref="noticeInfo" />
<train-add-plan ref="trainAddPlan" />
<set-fault ref="setFault" />
</div> </div>
</template> </template>
@ -23,8 +21,6 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import {menuOperate, commitOperate} from './utils/menuOperate'; import {menuOperate, commitOperate} from './utils/menuOperate';
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
import TrainAddPlan from './dialog/trainAddPlan';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default { export default {
@ -35,9 +31,7 @@ export default {
SectionUnLock, SectionUnLock,
SpeedLimitControl, SpeedLimitControl,
AlxeEffective, AlxeEffective,
NoticeInfo, NoticeInfo
SetFault,
TrainAddPlan
}, },
props: { props: {
selected: { selected: {
@ -184,7 +178,7 @@ export default {
this.$store.dispatch('training/nextNew', step).then(({ valid }) => { this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainAddPlan.doShow(step, this.selected); this.$store.dispatch('training/setCommonMenuStep', step);
} }
}); });
}, },
@ -259,7 +253,7 @@ export default {
setStoppage() { setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected); this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
} }
}); });
}, },
@ -267,7 +261,7 @@ export default {
cancelStoppage() { cancelStoppage() {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
} }
}); });
} }

View File

@ -9,7 +9,6 @@
<route-detail ref="routeDetail" /> <route-detail ref="routeDetail" />
<router-command ref="routerCommand" /> <router-command ref="routerCommand" />
<notice-info ref="noticeInfo" />\ <notice-info ref="noticeInfo" />\
<set-fault ref="setFault" />
</div> </div>
</template> </template>
@ -28,7 +27,6 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
export default { export default {
name: 'SignalMenu', name: 'SignalMenu',
@ -41,8 +39,7 @@ export default {
RouteHandControl, RouteHandControl,
RouteDetail, RouteDetail,
RouterCommand, RouterCommand,
NoticeInfo, NoticeInfo
SetFault
}, },
props: { props: {
selected: { selected: {
@ -349,7 +346,7 @@ export default {
setStoppage() { setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected); this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
} }
}); });
}, },
@ -357,7 +354,7 @@ export default {
cancelStoppage() { cancelStoppage() {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
} }
}); });
} }

View File

@ -9,7 +9,6 @@
<stand-back-strategy ref="standBackStrategy" /> <stand-back-strategy ref="standBackStrategy" />
<StandBulkBuckleTrain ref="standBulkBuckleTrain" /> <StandBulkBuckleTrain ref="standBulkBuckleTrain" />
<notice-info ref="noticeInfo" /> <notice-info ref="noticeInfo" />
<set-fault ref="setFault" />
</div> </div>
</template> </template>
@ -29,7 +28,6 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import CMD from '@/scripts/cmdPlugin/CommandEnum'; import CMD from '@/scripts/cmdPlugin/CommandEnum';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
export default { export default {
name: 'StationStandMenu', name: 'StationStandMenu',
@ -42,8 +40,7 @@ export default {
StandRunLevel, StandRunLevel,
NoticeInfo, NoticeInfo,
StandBackStrategy, StandBackStrategy,
StandStopTime, StandStopTime
SetFault
}, },
props: { props: {
selected: { selected: {
@ -206,7 +203,7 @@ export default {
setStoppage() { setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected); this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
} }
}); });
}, },
@ -214,7 +211,7 @@ export default {
cancelStoppage() { cancelStoppage() {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
} }
}); });
}, },

View File

@ -6,7 +6,6 @@
<speed-limit-control ref="speedLimitControl" /> <speed-limit-control ref="speedLimitControl" />
<alxe-effective ref="alxeEffective" /> <alxe-effective ref="alxeEffective" />
<notice-info ref="noticeInfo" /> <notice-info ref="noticeInfo" />
<set-fault ref="setFault" />
</div> </div>
</template> </template>
@ -18,7 +17,6 @@ import SpeedLimitControl from './dialog/speedLimitControl';
import AlxeEffective from './dialog/alxeEffective'; import AlxeEffective from './dialog/alxeEffective';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo'; import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
import CMD from '@/scripts/cmdPlugin/CommandEnum'; import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
@ -33,8 +31,7 @@ export default {
SwitchUnLock, SwitchUnLock,
SpeedLimitControl, SpeedLimitControl,
AlxeEffective, AlxeEffective,
NoticeInfo, NoticeInfo
SetFault
}, },
props: { props: {
selected: { selected: {
@ -278,7 +275,7 @@ export default {
setStoppage() { setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected); this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
} }
}); });
}, },
@ -286,7 +283,7 @@ export default {
cancelStoppage() { cancelStoppage() {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
} }
}); });
} }

View File

@ -266,11 +266,11 @@ export const menuOperate = {
}, },
Common: { Common: {
setFault: { setFault: {
operation: OperationEvent.Section.stoppage.menu.operation, operation: OperationEvent.MixinCommand.stoppage.menu.operation,
cmdType: CMD.Fault.CMD_SET_FAULT cmdType: CMD.Fault.CMD_SET_FAULT
}, },
cancelFault: { cancelFault: {
operation: OperationEvent.Section.cancelStoppage.menu.operation, operation: OperationEvent.MixinCommand.cancelStoppage.menu.operation,
cmdType: CMD.Fault.CMD_CANCEL_FAULT cmdType: CMD.Fault.CMD_CANCEL_FAULT
} }
} }

View File

@ -13,7 +13,11 @@
</el-form-item> </el-form-item>
</el-form> --> </el-form> -->
<el-table :data="tableData" border style="width: 100%; min-height: 200px;" :summary-method="getSummaries" show-summary :span-method="objectSpanMethod"> <el-table :data="tableData" border style="width: 100%; min-height: 200px;" :summary-method="getSummaries" show-summary :span-method="objectSpanMethod">
<el-table-column prop="title" label="题目" /> <el-table-column prop="title" label="题目">
<template slot-scope="scope">
<div v-html="scope.row.title" />
</template>
</el-table-column>>
<el-table-column prop="score" label="分值" /> <el-table-column prop="score" label="分值" />
<el-table-column prop="goal" label="得分" /> <el-table-column prop="goal" label="得分" />
<el-table-column v-if="this.$route.query.type ==='theory'" prop="correctAnswer" label="答题结果" /> <el-table-column v-if="this.$route.query.type ==='theory'" prop="correctAnswer" label="答题结果" />

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="menus" :style="{width: width + 'px'}"> <div class="menus" :style="{width: width + 'px'}">
<set-fault ref="setFault" /> <set-fault ref="setFault" :class-name="className" />
<train-add-plan ref="trainAddPlan" /> <train-add-plan ref="trainAddPlan" :class-name="className" />
</div> </div>
</template> </template>
@ -24,6 +24,11 @@ export default {
} }
} }
}, },
data() {
return {
className: ''
};
},
computed: { computed: {
...mapGetters('config', [ ...mapGetters('config', [
'width' 'width'
@ -42,6 +47,36 @@ export default {
break; break;
} }
} }
},
created() {
switch (this.$route.query.lineCode) {
case '02':
case '05':
this.className = 'fuzhou-01__systerm';
break;
case '03':
this.className = 'beijing-01__systerm';
break;
case '04':
this.className = 'chengdou-03__systerm';
break;
case '06':
this.className = 'ningbo-01__systerm';
break;
case '07':
this.className = 'haerbin-01__systerm';
break;
case '08':
this.className = 'foshan-01__systerm';
break;
case '09':
this.className = 'xian-02__system';
break;
case '10':
case '11':
this.className = 'xian-01__systerm';
break;
}
} }
}; };
</script> </script>

View File

@ -1,7 +1,8 @@
<template> <template>
<el-dialog <el-dialog
v-dialogDrag v-dialogDrag
class="xian-01__systerm notice-info" :class="className"
class="notice-info"
:title="title" :title="title"
:visible.sync="show" :visible.sync="show"
width="360px" width="360px"
@ -29,6 +30,14 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default { export default {
name: 'NoticeInfo', name: 'NoticeInfo',
props: {
className: {
type: String,
default() {
return '';
}
}
},
data() { data() {
return { return {
dialogShow: false, dialogShow: false,

View File

@ -43,6 +43,14 @@ import { deviceFaultType, deviceType} from '@/scripts/cmdPlugin/Config';
export default { export default {
name: 'SwitchControl', name: 'SwitchControl',
props: {
className: {
type: String,
default() {
return '';
}
}
},
data() { data() {
return { return {
dialogShow: false, dialogShow: false,
@ -53,7 +61,6 @@ export default {
activeShow: false, activeShow: false,
deviceName: '', deviceName: '',
faultList: [], faultList: [],
className: '',
form: { faultType: ''}, form: { faultType: ''},
rules: { rules: {
faultType: [ faultType: [
@ -81,36 +88,6 @@ export default {
return ''; return '';
} }
}, },
created() {
switch (this.$route.query.lineCode) {
case '02':
case '05':
this.className = 'fuzhou-01__systerm';
break;
case '03':
this.className = 'beijing-01__systerm';
break;
case '04':
this.className = 'chengdou-03__systerm';
break;
case '06':
this.className = 'ningbo-01__systerm';
break;
case '07':
this.className = 'haerbin-01__systerm';
break;
case '08':
this.className = 'foshan-01__systerm';
break;
case '09':
this.className = 'xian-02__system';
break;
case '10':
case '11':
this.className = 'xian-01__systerm';
break;
}
},
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.$store.dispatch('training/tipReload'); this.$store.dispatch('training/tipReload');

View File

@ -2,6 +2,7 @@
<el-dialog <el-dialog
v-dialogDrag v-dialogDrag
:class="className" :class="className"
class="stand-stop-time"
:title="title" :title="title"
:visible.sync="show" :visible.sync="show"
width="340px" width="340px"
@ -42,7 +43,7 @@
<el-button :id="domIdCancel" @click="cancel"> </el-button> <el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col> </el-col>
</el-row> </el-row>
<notice-info ref="noticeInfo" /> <notice-info ref="noticeInfo" :class-name="className" />
</el-dialog> </el-dialog>
</template> </template>
@ -58,13 +59,20 @@ export default {
components: { components: {
NoticeInfo NoticeInfo
}, },
props: {
className: {
type: String,
default() {
return '';
}
}
},
data() { data() {
return { return {
trainNoList: [], trainNoList: [],
selected: null, selected: null,
tripNumberList: [], tripNumberList: [],
serviceNumberList: [], serviceNumberList: [],
className: '',
addModel: { addModel: {
serviceNumber: '', // serviceNumber: '', //
tripNumber: '' // tripNumber: '' //
@ -101,36 +109,6 @@ export default {
return '创建计划车'; return '创建计划车';
} }
}, },
created() {
switch (this.$route.query.lineCode) {
case '02':
case '05':
this.className = 'fuzhou-01__systerm stand-stop-time';
break;
case '03':
this.className = 'beijing-01__systerm stand-stop-time';
break;
case '04':
this.className = 'chengdou-03__systerm stand-stop-time';
break;
case '06':
this.className = 'ningbo-01__systerm stand-stop-time';
break;
case '07':
this.className = 'haerbin-01__systerm stand-stop-time';
break;
case '08':
this.className = 'foshan-01__systerm stand-stop-time';
break;
case '09':
this.className = 'xian-02__system stand-stop-time';
break;
case '10':
case '11':
this.className = 'xian-01__systerm stand-stop-time';
break;
}
},
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.$store.dispatch('training/tipReload'); this.$store.dispatch('training/tipReload');

View File

@ -293,13 +293,13 @@ export default {
}); });
while (sectionMap[startPoint]) { while (sectionMap[startPoint]) {
const model = deepAssign({}, sectionMap[startPoint]); const model = deepAssign({}, sectionMap[startPoint]);
model.logicSectionStartOffset = startOffset;
model.logicSectionEndOffset = (section.lengthFact * 1000 - startOffset * 1000) / 1000;
models.push(model);
if (!model.lengthFact) { if (!model.lengthFact) {
const length = section.lengthFact / section.logicSectionCodeList.length; const length = section.lengthFact / section.logicSectionCodeList.length;
model.lengthFact = length.toFixed(3); model.lengthFact = length.toFixed(3);
} }
model.logicSectionStartOffset = startOffset;
model.logicSectionEndOffset = (model.lengthFact * 1000 + startOffset * 1000) / 1000;
models.push(model);
startOffset = (startOffset * 1000 + model.lengthFact * 1000) / 1000; startOffset = (startOffset * 1000 + model.lengthFact * 1000) / 1000;
startPoint = model.points[model.points.length - 1].x + 's' + model.points[model.points.length - 1].y; startPoint = model.points[model.points.length - 1].x + 's' + model.points[model.points.length - 1].y;
} }

View File

@ -38,9 +38,7 @@ export default {
} }
}, },
data() { data() {
return { return {};
lineCode: ''
};
}, },
computed: { computed: {
skinCode() { skinCode() {
@ -51,6 +49,9 @@ export default {
}, },
height() { height() {
return this.$store.state.app.height; return this.$store.state.app.height;
},
lineCode() {
return this.$route.query.lineCode;
} }
}, },
methods: { methods: {