创建考试调整&路由replace调整
This commit is contained in:
parent
a18c84f684
commit
fff5acab5d
@ -14,7 +14,7 @@
|
|||||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules">
|
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules">
|
||||||
<div style="width: 96%;">
|
<div style="width: 96%;">
|
||||||
<el-form-item label="车 次 号:" label-width="95px" prop="tripNumber">
|
<el-form-item label="车 次 号:" label-width="95px" prop="tripNumber">
|
||||||
<el-select v-model="addModel.tripNumber" filterable @change="tripNumberChange">
|
<el-select ref="chooseTripNumber" v-model="addModel.tripNumber" filterable @change="tripNumberChange">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="tripNum in tripNumberList"
|
v-for="tripNum in tripNumberList"
|
||||||
:key="tripNum"
|
:key="tripNum"
|
||||||
@ -24,7 +24,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="服 务 号:" label-width="95px" prop="serviceNumber">
|
<el-form-item label="服 务 号:" label-width="95px" prop="serviceNumber">
|
||||||
<el-select v-model="addModel.serviceNumber" filterable>
|
<el-select ref="chooseServiceNumber" v-model="addModel.serviceNumber" filterable @change="serviceNumberChange">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="serviceNumber in serviceNumberList"
|
v-for="serviceNumber in serviceNumberList"
|
||||||
:key="serviceNumber"
|
:key="serviceNumber"
|
||||||
@ -109,6 +109,13 @@ export default {
|
|||||||
return '创建计划车';
|
return '创建计划车';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch:{
|
||||||
|
'$store.state.map.keyboardEnterCount': function (val) {
|
||||||
|
if (this.dialogShow && this.popClass === 'ningbo-01__systerm' && !this.loading) {
|
||||||
|
this.commit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
@ -118,6 +125,7 @@ export default {
|
|||||||
tripNumberChange(tripNumber) {
|
tripNumberChange(tripNumber) {
|
||||||
getServiceNumbersByTripNum(this.$route.query.group, tripNumber).then(resp => {
|
getServiceNumbersByTripNum(this.$route.query.group, tripNumber).then(resp => {
|
||||||
this.serviceNumberList = [];
|
this.serviceNumberList = [];
|
||||||
|
this.$refs.chooseTripNumber.blur();
|
||||||
if (typeof resp.data == 'string') {
|
if (typeof resp.data == 'string') {
|
||||||
this.serviceNumberList.push(resp.data);
|
this.serviceNumberList.push(resp.data);
|
||||||
} else {
|
} else {
|
||||||
@ -132,12 +140,12 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
serviceNumberChange(val) {
|
||||||
|
this.$refs.chooseServiceNumber.blur();
|
||||||
|
},
|
||||||
doShow(operate, selected) {
|
doShow(operate, selected) {
|
||||||
this.selected = selected;
|
this.selected = selected;
|
||||||
// 如果不是断点激活,则需要对初始值进行初始化
|
// 如果不是断点激活,则需要对初始值进行初始化
|
||||||
// if (!this.dialogShow) {
|
|
||||||
|
|
||||||
// }
|
|
||||||
this.addModel = {
|
this.addModel = {
|
||||||
tripNumber:'',
|
tripNumber:'',
|
||||||
serviceNumber:''
|
serviceNumber:''
|
||||||
@ -151,7 +159,6 @@ export default {
|
|||||||
});
|
});
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
// this.$messageBox(error.message);
|
|
||||||
});
|
});
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
<el-col :span="9">
|
<el-col :span="9">
|
||||||
<el-select
|
<el-select
|
||||||
:id="domIdChoose1"
|
:id="domIdChoose1"
|
||||||
|
ref="chooseStation"
|
||||||
v-model="model.confirmStationCode"
|
v-model="model.confirmStationCode"
|
||||||
filterable
|
filterable
|
||||||
size="mini"
|
size="mini"
|
||||||
@ -43,6 +44,7 @@
|
|||||||
<el-col :span="9">
|
<el-col :span="9">
|
||||||
<el-select
|
<el-select
|
||||||
:id="domIdChoose2"
|
:id="domIdChoose2"
|
||||||
|
ref="chooseSection"
|
||||||
v-model="model.confirmSectionCode"
|
v-model="model.confirmSectionCode"
|
||||||
filterable
|
filterable
|
||||||
size="mini"
|
size="mini"
|
||||||
@ -317,6 +319,7 @@ export default {
|
|||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
this.$refs.chooseStation.blur();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
sectionSelectChange(code) {
|
sectionSelectChange(code) {
|
||||||
@ -333,6 +336,7 @@ export default {
|
|||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
this.$refs.chooseSection.blur();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 确认计轴恢复工作*/
|
/** 确认计轴恢复工作*/
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
<el-form-item v-if="!isCancelSpeed" label="限速值" label-width="80px">
|
<el-form-item v-if="!isCancelSpeed" label="限速值" label-width="80px">
|
||||||
<el-select
|
<el-select
|
||||||
:id="domIdChoose"
|
:id="domIdChoose"
|
||||||
|
ref="chooseSpeed"
|
||||||
v-model="speed"
|
v-model="speed"
|
||||||
size="small"
|
size="small"
|
||||||
:disabled="spdDisabled"
|
:disabled="spdDisabled"
|
||||||
@ -380,6 +381,7 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.setButtonEnable({ step: 0 });
|
this.setButtonEnable({ step: 0 });
|
||||||
|
this.$refs.chooseSpeed.blur();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
<el-row style="margin-bottom: 20px">
|
<el-row style="margin-bottom: 20px">
|
||||||
<el-select
|
<el-select
|
||||||
:id="domIdChooseStation"
|
:id="domIdChooseStation"
|
||||||
|
ref="chooseStation"
|
||||||
v-model="station"
|
v-model="station"
|
||||||
value-key="code"
|
value-key="code"
|
||||||
filterable
|
filterable
|
||||||
@ -171,6 +172,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.chooseStation.blur();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -1154,8 +1154,11 @@ const router = createRouter();
|
|||||||
|
|
||||||
// 兼容 vue-router在3.1.0版本以上的路由跳转使用的是 promise 的方式
|
// 兼容 vue-router在3.1.0版本以上的路由跳转使用的是 promise 的方式
|
||||||
const originalPush = Router.prototype.push;
|
const originalPush = Router.prototype.push;
|
||||||
|
const originalReplace = Router.prototype.replace;
|
||||||
Router.prototype.push = function push(location) {
|
Router.prototype.push = function push(location) {
|
||||||
return originalPush.call(this, location).catch(err => err);
|
return originalPush.call(this, location).catch(err => err);
|
||||||
};
|
};
|
||||||
|
Router.prototype.replace = function replace(location) {
|
||||||
|
return originalReplace.call(this, location).catch(err => err);
|
||||||
|
};
|
||||||
export default router;
|
export default router;
|
||||||
|
@ -2337,7 +2337,8 @@ export function getTrainingOperateTypeMap() {
|
|||||||
Station: [],
|
Station: [],
|
||||||
ControlConvertMenu: [],
|
ControlConvertMenu: [],
|
||||||
TrainWindow: [],
|
TrainWindow: [],
|
||||||
LimitControl: []
|
LimitControl: [],
|
||||||
|
Driver: []
|
||||||
};
|
};
|
||||||
let val;
|
let val;
|
||||||
for ( val in CMD['Switch']) {
|
for ( val in CMD['Switch']) {
|
||||||
@ -2364,5 +2365,8 @@ export function getTrainingOperateTypeMap() {
|
|||||||
for ( val in CMD['Train']) {
|
for ( val in CMD['Train']) {
|
||||||
trainingOperateTypeMap['TrainWindow'].push(CMD['Train'][val]);
|
trainingOperateTypeMap['TrainWindow'].push(CMD['Train'][val]);
|
||||||
}
|
}
|
||||||
|
for ( val in CMD['Driver']) {
|
||||||
|
trainingOperateTypeMap['Driver'].push(CMD['Driver'][val]);
|
||||||
|
}
|
||||||
return trainingOperateTypeMap;
|
return trainingOperateTypeMap;
|
||||||
}
|
}
|
||||||
|
@ -59,9 +59,9 @@ export default {
|
|||||||
/** 回复站控请求(同意/拒绝) */
|
/** 回复站控请求(同意/拒绝) */
|
||||||
CMD_CM_REPLY_STATION_CONTROL: {value:'CM_Reply_Station_Control', label: '回复站控请求'},
|
CMD_CM_REPLY_STATION_CONTROL: {value:'CM_Reply_Station_Control', label: '回复站控请求'},
|
||||||
/** 回复中控请求(同意/拒绝) */
|
/** 回复中控请求(同意/拒绝) */
|
||||||
CMD_CM_REPLY_CENTER_CONTROL: {value:'CM_Reply_Center_Control', label: '回复中控请求'},
|
CMD_CM_REPLY_CENTER_CONTROL: {value:'CM_Reply_Center_Control', label: '回复中控请求'},
|
||||||
CMD_CM_RECEIVE_CONTROL: {value:'CM_Receive_Control', label: '接收控制'},
|
CMD_CM_RECEIVE_CONTROL: {value:'CM_Receive_Control', label: '接收控制'},
|
||||||
CMD_CM_SURRENDER_CONTROL: {value:'CM_Surrender_Control', label: '交出控制'},
|
CMD_CM_SURRENDER_CONTROL: {value:'CM_Surrender_Control', label: '交出控制'}
|
||||||
},
|
},
|
||||||
|
|
||||||
// 司机操作
|
// 司机操作
|
||||||
|
@ -8,24 +8,24 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="display-draft" :class="{'haerbin_btn_box': $route.query.lineCode == '07'}" :style="{bottom: offsetBottom + 'px'}">
|
<div class="display-draft" :class="{'haerbin_btn_box': $route.query.lineCode == '07'}" :style="{bottom: offsetBottom + 'px'}">
|
||||||
<el-button-group>
|
<el-button-group>
|
||||||
<!-- 排班计划 -->
|
<!-- 排班计划 -->
|
||||||
<el-button v-if="isShowScheduling && !dataError" type="primary" @click="jumpScheduling" size="small">{{ $t('display.demon.dispatchingPlan') }}</el-button>
|
<el-button v-if="isShowScheduling && !dataError" type="primary" size="small" @click="jumpScheduling">{{ $t('display.demon.dispatchingPlan') }}</el-button>
|
||||||
<!-- cctv视图 -->
|
<!-- cctv视图 -->
|
||||||
<el-button v-if="!isShowScheduling && !dataError" @click="jumpjl3dpassflow" size="small">{{ jl3dpassflow }}</el-button>
|
<el-button v-if="!isShowScheduling && !dataError" size="small" @click="jumpjl3dpassflow">{{ jl3dpassflow }}</el-button>
|
||||||
<!-- <el-button v-if="!isShowScheduling && !dataError" @click="jumpjl3dstation">{{ jl3dstation }}</el-button> -->
|
<!-- <el-button v-if="!isShowScheduling && !dataError" @click="jumpjl3dstation">{{ jl3dstation }}</el-button> -->
|
||||||
<!-- 三维视图 -->
|
<!-- 三维视图 -->
|
||||||
<el-button v-if="!isShowScheduling && !dataError" @click="jumpjlmap3d" size="small">{{ jl3dname }}</el-button>
|
<el-button v-if="!isShowScheduling && !dataError" size="small" @click="jumpjlmap3d">{{ jl3dname }}</el-button>
|
||||||
<!-- 设备视图 -->
|
<!-- 设备视图 -->
|
||||||
<el-button v-if="isShow3dmodel && !isShowScheduling && !dataError" @click="jumpjlmap3dmodel" size="small">{{ jl3dmodel }}</el-button>
|
<el-button v-if="isShow3dmodel && !isShowScheduling && !dataError" size="small" @click="jumpjlmap3dmodel">{{ jl3dmodel }}</el-button>
|
||||||
<template v-if="isShowQuest">
|
<template v-if="isShowQuest">
|
||||||
<!-- && !isDesignPlatform -->
|
<!-- && !isDesignPlatform -->
|
||||||
<el-button v-if="!isDesignPlatform && !dataError" type="danger" @click="handleQuitQuest" size="small">{{ $t('display.demon.exitScript') }}</el-button>
|
<el-button v-if="!isDesignPlatform && !dataError" type="danger" size="small" @click="handleQuitQuest">{{ $t('display.demon.exitScript') }}</el-button>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="!projectDevice">
|
<template v-else-if="!projectDevice">
|
||||||
<el-button type="success" :disabled="isDisable || dataError" @click="selectBeginTime" size="small">{{ $t('display.demon.drivingByPlan') }}</el-button>
|
<el-button type="success" :disabled="isDisable || dataError" size="small" @click="selectBeginTime">{{ $t('display.demon.drivingByPlan') }}</el-button>
|
||||||
<el-button type="danger" :disabled="dataError" @click="end" size="small">{{ $t('display.demon.initialize') }}</el-button>
|
<el-button type="danger" :disabled="dataError" size="small" @click="end">{{ $t('display.demon.initialize') }}</el-button>
|
||||||
</template>
|
</template>
|
||||||
<el-button type="primary" @click="back" size="small">{{ projectDevice?'退出':$t('display.demon.back') }}</el-button>
|
<el-button type="primary" size="small" @click="back">{{ projectDevice?'退出':$t('display.demon.back') }}</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
</div>
|
</div>
|
||||||
<set-time ref="setTime" @ConfirmSelectBeginTime="start" />
|
<set-time ref="setTime" @ConfirmSelectBeginTime="start" />
|
||||||
|
@ -37,6 +37,7 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
|||||||
import { getCmdList } from '@/api/management/dictionary';
|
import { getCmdList } from '@/api/management/dictionary';
|
||||||
import ConstConfig from '@/scripts/ConstConfig';
|
import ConstConfig from '@/scripts/ConstConfig';
|
||||||
import Cookies from 'js-cookie';
|
import Cookies from 'js-cookie';
|
||||||
|
import { getTrainingOperateTypeMap } from '@/scripts/ConstDic';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'EditRule',
|
name: 'EditRule',
|
||||||
@ -133,41 +134,7 @@ export default {
|
|||||||
await this.getList();
|
await this.getList();
|
||||||
await this.refresh();
|
await this.refresh();
|
||||||
if (this.drawWay) {
|
if (this.drawWay) {
|
||||||
this.trainingOperateTypeMap = {
|
this.trainingOperateTypeMap = getTrainingOperateTypeMap();
|
||||||
Switch: [],
|
|
||||||
Section: [],
|
|
||||||
Signal: [],
|
|
||||||
Stand: [],
|
|
||||||
Station: [],
|
|
||||||
ControlConvertMenu: [],
|
|
||||||
TrainWindow: [],
|
|
||||||
LimitControl: []
|
|
||||||
};
|
|
||||||
let val;
|
|
||||||
for ( val in CMD['Switch']) {
|
|
||||||
this.trainingOperateTypeMap['Switch'].push(CMD['Switch'][val]);
|
|
||||||
}
|
|
||||||
for ( val in CMD['Section']) {
|
|
||||||
this.trainingOperateTypeMap['Section'].push(CMD['Section'][val]);
|
|
||||||
}
|
|
||||||
for ( val in CMD['Signal']) {
|
|
||||||
this.trainingOperateTypeMap['Signal'].push(CMD['Signal'][val]);
|
|
||||||
}
|
|
||||||
for ( val in CMD['Stand']) {
|
|
||||||
this.trainingOperateTypeMap['Stand'].push(CMD['Stand'][val]);
|
|
||||||
}
|
|
||||||
for ( val in CMD['Station']) {
|
|
||||||
this.trainingOperateTypeMap['Station'].push(CMD['Station'][val]);
|
|
||||||
}
|
|
||||||
for ( val in CMD['LimitControl']) {
|
|
||||||
this.trainingOperateTypeMap['LimitControl'].push(CMD['LimitControl'][val]);
|
|
||||||
}
|
|
||||||
for ( val in CMD['ControlConvertMenu']) {
|
|
||||||
this.trainingOperateTypeMap['ControlConvertMenu'].push(CMD['ControlConvertMenu'][val]);
|
|
||||||
}
|
|
||||||
for ( val in CMD['Train']) {
|
|
||||||
this.trainingOperateTypeMap['TrainWindow'].push(CMD['Train'][val]);
|
|
||||||
}
|
|
||||||
const lineCode = this.lineCode;
|
const lineCode = this.lineCode;
|
||||||
const res = await getCmdList(lineCode, {});
|
const res = await getCmdList(lineCode, {});
|
||||||
const trainingOperateList = [];
|
const trainingOperateList = [];
|
||||||
@ -180,7 +147,8 @@ export default {
|
|||||||
Station: [],
|
Station: [],
|
||||||
ControlConvertMenu: [],
|
ControlConvertMenu: [],
|
||||||
TrainWindow: [],
|
TrainWindow: [],
|
||||||
LimitControl: []
|
LimitControl: [],
|
||||||
|
Driver: []
|
||||||
};
|
};
|
||||||
if (res && res.code === 200) {
|
if (res && res.code === 200) {
|
||||||
res.data.forEach(item => {
|
res.data.forEach(item => {
|
||||||
|
Loading…
Reference in New Issue
Block a user