Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
cf6dadf46b
@ -81,14 +81,14 @@ export function getRaceUserList(params) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// /** 分页查询理论题列表 */
|
/** 裁判打分 */
|
||||||
// export function getCompetitionTheory(params) {
|
export function putRefereeScoring(data) {
|
||||||
// return request({
|
return request({
|
||||||
// url: `/api/v1/competitionTheory`,
|
url: `/api/v1/competition/referee/scoring`,
|
||||||
// method: 'get',
|
method: 'put',
|
||||||
// params
|
data
|
||||||
// });
|
});
|
||||||
// }
|
}
|
||||||
|
|
||||||
/** 提交试卷 */
|
/** 提交试卷 */
|
||||||
export function postCompetitionTheory(data) {
|
export function postCompetitionTheory(data) {
|
||||||
@ -155,3 +155,11 @@ export function quitCurrentRace(id, params) {
|
|||||||
params
|
params
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 查看加载的竞赛试题 */
|
||||||
|
export function getTestPaperDatail(competitionId) {
|
||||||
|
return request({
|
||||||
|
url: `/api/v1/competition/${competitionId}/testPaper`,
|
||||||
|
method: 'get'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
@ -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>
|
|
@ -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);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -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: {
|
||||||
@ -94,16 +90,16 @@ export default {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
menuForce: [
|
menuForce: [
|
||||||
{
|
{
|
||||||
label: '设置故障',
|
label: '设置故障',
|
||||||
handler: this.setStoppage,
|
handler: this.setStoppage,
|
||||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '取消故障',
|
label: '取消故障',
|
||||||
handler: this.cancelStoppage,
|
handler: this.cancelStoppage,
|
||||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -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);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -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>
|
|
@ -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);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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>
|
|
@ -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);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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>
|
|
@ -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);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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>
|
|
@ -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);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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>
|
|
@ -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);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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>
|
|
@ -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);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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="答题结果" />
|
||||||
|
124
src/views/jsxt/refereeList/editScore.vue
Normal file
124
src/views/jsxt/refereeList/editScore.vue
Normal file
@ -0,0 +1,124 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog v-dialogDrag title="修改分数" :visible.sync="show" top="150px" width="500px" :before-do-close="doClose" :close-on-click-modal="false">
|
||||||
|
<el-form ref="form" :model="info" :rules="rules" label-width="100px" class="demo-ruleForm">
|
||||||
|
<el-form-item label="理论分数" prop="theoryScore">
|
||||||
|
<el-input v-model="info.theoryScore" style="width: 200px" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="实操分数" prop="practiceScore">
|
||||||
|
<el-input v-model="info.practiceScore" style="width: 200px" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div class="edit_score">
|
||||||
|
<el-button type="primary" size="medium" :loading="loading" @click="editScore">修改</el-button>
|
||||||
|
<el-button size="medium" @click="doClose">取消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { putRefereeScoring, getTestPaperDatail } from '@/api/competition';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name:'EditScore',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
show: false,
|
||||||
|
loading:false,
|
||||||
|
info: {
|
||||||
|
raceId: 0,
|
||||||
|
userId: 0,
|
||||||
|
theoryScore: 0,
|
||||||
|
practiceScore: 0
|
||||||
|
},
|
||||||
|
theoryScore: 0,
|
||||||
|
practicalScore: 0
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
rules() {
|
||||||
|
return {
|
||||||
|
theoryScore: [
|
||||||
|
{ required: true, message: '请输入理论分数', trigger: 'blur' },
|
||||||
|
{ validator: this.validatorNumber1 }
|
||||||
|
],
|
||||||
|
practiceScore: [
|
||||||
|
{ required: true, message: '请输入实操分数', trigger: 'blur' },
|
||||||
|
{ validator: this.validatorNumber2 }
|
||||||
|
]
|
||||||
|
};
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
doShow(data) {
|
||||||
|
this.show = true;
|
||||||
|
this.reloadInfo(data);
|
||||||
|
},
|
||||||
|
reloadInfo(data) {
|
||||||
|
getTestPaperDatail(data.raceId).then(res => {
|
||||||
|
this.theoryScore = res.data.theoryScore;
|
||||||
|
this.practicalScore = res.data.practicalScore;
|
||||||
|
this.info = {
|
||||||
|
raceId: data.raceId,
|
||||||
|
userId: data.userId,
|
||||||
|
theoryScore: data.theoryScore,
|
||||||
|
practiceScore: data.practiceScore
|
||||||
|
};
|
||||||
|
});
|
||||||
|
},
|
||||||
|
doClose() {
|
||||||
|
this.show = false;
|
||||||
|
},
|
||||||
|
editScore() {
|
||||||
|
this.$refs['form'].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
const data = {
|
||||||
|
raceId: this.info.raceId,
|
||||||
|
userId: this.info.userId,
|
||||||
|
theoryScore: this.info.theoryScore,
|
||||||
|
practiceScore: this.info.practiceScore
|
||||||
|
};
|
||||||
|
putRefereeScoring(data).then(res => {
|
||||||
|
this.doClose();
|
||||||
|
this.$message.success('修改分数成功');
|
||||||
|
}).catch(() => {
|
||||||
|
this.doClose();
|
||||||
|
this.$message.error('修改分数失败');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
validatorNumber1(rule, value, callback) {
|
||||||
|
if (Number(value) < 0) {
|
||||||
|
callback(new Error('输入分数不能小于0'));
|
||||||
|
} else if (Number(value) > 0 && Number(value) <= this.theoryScore) {
|
||||||
|
callback();
|
||||||
|
} else if (Number(value) > this.theoryScore) {
|
||||||
|
callback(new Error('输入分数大于当前试题分值'));
|
||||||
|
} else {
|
||||||
|
callback(new Error('请输入正确的分数'));
|
||||||
|
}
|
||||||
|
},
|
||||||
|
validatorNumber2(rule, value, callback) {
|
||||||
|
if (Number(value) < 0) {
|
||||||
|
callback(new Error('输入分数不能小于0'));
|
||||||
|
} else if (Number(value) > 0 && Number(value) <= this.practicalScore) {
|
||||||
|
callback();
|
||||||
|
} else if (Number(value) > this.practicalScore) {
|
||||||
|
callback(new Error('输入分数大于当前试题分值'));
|
||||||
|
} else {
|
||||||
|
callback(new Error('请输入正确的分数'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.edit_score{
|
||||||
|
text-align:center;
|
||||||
|
margin-top:20px;
|
||||||
|
}
|
||||||
|
/deep/{
|
||||||
|
.el-dialog__body{
|
||||||
|
padding-top: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -1,18 +1,18 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="refereeList">
|
<div class="refereeList">
|
||||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||||
<!-- <question-list ref="questionList" /> -->
|
<edit-score ref="editScore" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { refereeEnterSimulation, loadingPaper, getRaceUserList } from '@/api/competition';
|
import { refereeEnterSimulation, loadingPaper, getRaceUserList } from '@/api/competition';
|
||||||
// import QuestionList from './questionList';
|
import editScore from './editScore';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RefereeList',
|
name: 'RefereeList',
|
||||||
components:{
|
components:{
|
||||||
// QuestionList
|
editScore
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -193,8 +193,8 @@ export default {
|
|||||||
},
|
},
|
||||||
playBack(index, row) {
|
playBack(index, row) {
|
||||||
},
|
},
|
||||||
gradeScore(index, row) {
|
gradeScore(index, row) { // 裁判打分
|
||||||
|
this.$refs.editScore.doShow(row);
|
||||||
},
|
},
|
||||||
// afterQuery(data) {
|
// afterQuery(data) {
|
||||||
// clearTimeout(this.inter);
|
// clearTimeout(this.inter);
|
||||||
|
@ -1,83 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-dialog
|
|
||||||
v-dialogDrag
|
|
||||||
title="试题列表"
|
|
||||||
:visible.sync="show"
|
|
||||||
top="20px"
|
|
||||||
width="500px"
|
|
||||||
:before-do-close="doClose"
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
>
|
|
||||||
<el-table :data="questionList" style="width: 100%" border @selection-change="handleSelectionChange">
|
|
||||||
<el-table-column
|
|
||||||
type="selection"
|
|
||||||
width="55"
|
|
||||||
/>
|
|
||||||
<el-table-column prop="name" label="试题名称" />
|
|
||||||
</el-table>
|
|
||||||
<div class="startExam">
|
|
||||||
<span><el-button type="primary" :loading="loading" @click="startExam">开始竞赛</el-button></span>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
import {getQuestionListByMapId, loadQuestionList} from '@/api/competition';
|
|
||||||
export default {
|
|
||||||
name:'QuestionList',
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
show: false,
|
|
||||||
loading:false,
|
|
||||||
questionList:[
|
|
||||||
{id:1, name:'实操试题1'},
|
|
||||||
{id:2, name:'实操试题2'},
|
|
||||||
{id:3, name:'实操试题3'},
|
|
||||||
{id:4, name:'实操试题4'},
|
|
||||||
{id:5, name:'实操试题5'},
|
|
||||||
{id:6, name:'实操试题6'},
|
|
||||||
{id:7, name:'实操试题7'}
|
|
||||||
],
|
|
||||||
multipleSelection:[]
|
|
||||||
};
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
doShow() {
|
|
||||||
this.show = true;
|
|
||||||
this.reloadTable();
|
|
||||||
},
|
|
||||||
reloadTable() {
|
|
||||||
getQuestionListByMapId({mapId:41, pageNum:10, pageSize:1}).then(response=>{
|
|
||||||
// this.questionList = response.data;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
this.show = false;
|
|
||||||
},
|
|
||||||
handleSelectionChange(val) {
|
|
||||||
this.multipleSelection = val;
|
|
||||||
},
|
|
||||||
startExam() {
|
|
||||||
if (this.multipleSelection.length > 0) {
|
|
||||||
const ids = [];
|
|
||||||
this.multipleSelection.forEach(question=>{
|
|
||||||
ids.push(question.id);
|
|
||||||
});
|
|
||||||
loadQuestionList(1, ids).then((response)=>{
|
|
||||||
this.$message('开始考试成功!');
|
|
||||||
this.doClose();
|
|
||||||
}).catch(()=>{
|
|
||||||
this.$message('开始考试失败');
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
this.$messageBox('请选择试题');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.startExam{
|
|
||||||
text-align:center;
|
|
||||||
margin-top:20px;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -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>
|
||||||
|
@ -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,
|
||||||
|
@ -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');
|
||||||
|
@ -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');
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -567,7 +567,8 @@ export default {
|
|||||||
model.rightStopPointOffset = model.rightStopPointOffset || model.lengthFact - 5;
|
model.rightStopPointOffset = model.rightStopPointOffset || model.lengthFact - 5;
|
||||||
}
|
}
|
||||||
const changeSectionList = this.handleOtherSectionChange(model);
|
const changeSectionList = this.handleOtherSectionChange(model);
|
||||||
models = [model, ...changeSectionList];
|
const changeStandList = this.handleRelevanceStand(model);
|
||||||
|
models = [model, ...changeSectionList, ...changeStandList];
|
||||||
|
|
||||||
this.$emit('updateMapModel', models);
|
this.$emit('updateMapModel', models);
|
||||||
this.oldPoint = JSON.parse(JSON.stringify(model.points));
|
this.oldPoint = JSON.parse(JSON.stringify(model.points));
|
||||||
@ -578,6 +579,19 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
handleRelevanceStand(model) { // 站台轨关联站台调整 所属集中站
|
||||||
|
const models = [];
|
||||||
|
if (model.standTrack) {
|
||||||
|
this.stationStandList.forEach(stand => {
|
||||||
|
if (stand.standTrackCode == model.code) {
|
||||||
|
const copyStand = deepAssign({}, stand);
|
||||||
|
copyStand.deviceStationCode = model.stationCode;
|
||||||
|
models.push(copyStand);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return models;
|
||||||
|
},
|
||||||
handleOtherSectionChange(model) { // 处理该区段改变导致的相关区段的变化
|
handleOtherSectionChange(model) { // 处理该区段改变导致的相关区段的变化
|
||||||
const models = [];
|
const models = [];
|
||||||
const pointModel = [];
|
const pointModel = [];
|
||||||
|
@ -126,6 +126,7 @@ export default {
|
|||||||
ciStation: false, // 是否联锁站
|
ciStation: false, // 是否联锁站
|
||||||
depot:false, // 是否停车场或者车辆段
|
depot:false, // 是否停车场或者车辆段
|
||||||
reentry:false, // 是否折返车站
|
reentry:false, // 是否折返车站
|
||||||
|
smallRouting: false, // 是否小交路
|
||||||
number:'', // 编号
|
number:'', // 编号
|
||||||
code: '',
|
code: '',
|
||||||
zcCode: '',
|
zcCode: '',
|
||||||
@ -211,7 +212,8 @@ export default {
|
|||||||
] },
|
] },
|
||||||
|
|
||||||
{ prop: 'depot', label: this.$t('map.isParkingArea'), type: 'checkbox' },
|
{ prop: 'depot', label: this.$t('map.isParkingArea'), type: 'checkbox' },
|
||||||
{ prop: 'reentry', label: this.$t('map.isReentryStation'), type: 'checkbox' },
|
{ prop: 'reentry', label: this.$t('map.isReentryStation'), type: 'checkbox' }, // 是否折返车站
|
||||||
|
{ prop: 'smallRouting', label: '是否小交路:', type: 'checkbox', isHidden:!this.isReentry },
|
||||||
|
|
||||||
{ prop: 'kilometerPosition', label: '公里标偏移坐标:', type: 'coordinate', width: '120px', children: [
|
{ prop: 'kilometerPosition', label: '公里标偏移坐标:', type: 'coordinate', width: '120px', children: [
|
||||||
{ prop: 'kilometerPosition.x', firstLevel: 'kilometerPosition', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' },
|
{ prop: 'kilometerPosition.x', firstLevel: 'kilometerPosition', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' },
|
||||||
@ -285,13 +287,11 @@ export default {
|
|||||||
},
|
},
|
||||||
idCiStation() {
|
idCiStation() {
|
||||||
return this.editModel.ciStation;
|
return this.editModel.ciStation;
|
||||||
|
},
|
||||||
|
isReentry() {
|
||||||
|
return this.editModel.reentry;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
|
||||||
// selected: function (val) {
|
|
||||||
// this.deviceSelect(val);
|
|
||||||
// }
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
deviceChange(code) {
|
deviceChange(code) {
|
||||||
this.$emit('setCenter', code);
|
this.$emit('setCenter', code);
|
||||||
@ -431,6 +431,7 @@ export default {
|
|||||||
centralized: false,
|
centralized: false,
|
||||||
depot:false,
|
depot:false,
|
||||||
reentry:false,
|
reentry:false,
|
||||||
|
smallRouting: false,
|
||||||
// concentrateStationCode: '',
|
// concentrateStationCode: '',
|
||||||
// controlled: false,
|
// controlled: false,
|
||||||
chargeStationCodeList:[],
|
chargeStationCodeList:[],
|
||||||
|
@ -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: {
|
||||||
|
Loading…
Reference in New Issue
Block a user