This commit is contained in:
joylink_cuiweidong 2020-05-28 18:39:11 +08:00
commit cf6dadf46b
55 changed files with 367 additions and 1887 deletions

View File

@ -81,14 +81,14 @@ export function getRaceUserList(params) {
});
}
// /** 分页查询理论题列表 */
// export function getCompetitionTheory(params) {
// return request({
// url: `/api/v1/competitionTheory`,
// method: 'get',
// params
// });
// }
/** 裁判打分 */
export function putRefereeScoring(data) {
return request({
url: `/api/v1/competition/referee/scoring`,
method: 'put',
data
});
}
/** 提交试卷 */
export function postCompetitionTheory(data) {
@ -155,3 +155,11 @@ export function quitCurrentRace(id, params) {
params
});
}
/** 查看加载的竞赛试题 */
export function getTestPaperDatail(competitionId) {
return request({
url: `/api/v1/competition/${competitionId}/testPaper`,
method: 'get'
});
}

View File

@ -1,222 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="beijing-01__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="340px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules">
<div style="width: 96%;">
<el-form-item label="车 次 号:" label-width="95px" prop="tripNumber">
<!-- <el-input v-model="addModel.tripNumber" /> -->
<el-select v-model="addModel.tripNumber" filterable @change="tripNumberChange">
<el-option
v-for="tripNum in tripNumberList"
:key="tripNum"
:label="tripNum"
:value="tripNum"
/>
</el-select>
</el-form-item>
<el-form-item label="服 务 号:" label-width="95px" prop="serviceNumber">
<!-- <el-input v-model="addModel.serviceNumber" /> -->
<el-select v-model="addModel.serviceNumber" filterable>
<el-option
v-for="serviceNumber in serviceNumberList"
:key="serviceNumber"
:label="serviceNumber"
:value="serviceNumber"
/>
</el-select>
</el-form-item>
</div>
</el-form>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { getTripNumberList, getServiceNumbersByTripNum } from '@/api/simulation';
export default {
// name: 'TrainMove',
name: 'TrainAddPlan',
components: {
},
data() {
return {
trainNoList: [],
selected: null,
tripNumberList: [],
serviceNumberList: [],
addModel: {
serviceNumber: '', //
tripNumber: '' //
},
rules: {
serviceNumber: [
{ required: true, message: '请输入服务号', trigger: 'blur' }
],
tripNumber: [
{ required: true, message: '请输入车次号', trigger: 'change' }
]
},
dialogShow: false,
loading: false
};
},
computed: {
...mapGetters('map', [
'trainList',
'stationStandList',
'trainWindowSectionCode'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Train.moveTrainId.menu.domId : '';
},
title() {
return '创建计划车';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
tripNumberChange(tripNumber) {
getServiceNumbersByTripNum(this.$route.query.group, tripNumber).then(resp => {
this.serviceNumberList = [];
if (typeof resp.data == 'string') {
this.serviceNumberList.push(resp.data);
} else {
resp.data.forEach(item => {
if (!this.serviceNumberList.includes(item)) {
this.serviceNumberList.push(item);
}
});
}
if (this.serviceNumberList.length === 1) {
this.addModel.serviceNumber = this.serviceNumberList[0];
}
});
},
doShow(operate, selected) {
this.selected = selected;
//
if (!this.dialogShow) {
}
this.addModel = {
tripNumber:'',
serviceNumber:''
};
getTripNumberList(this.$route.query.group).then(resp => {
this.tripNumberList = [];
resp.data.forEach(item => {
if (!this.tripNumberList.includes(item)) {
this.tripNumberList.push(item);
}
});
}).catch(() => {
// this.$messageBox(error.message);
});
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
// mouseCancelState(this.selected);
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
over: true,
operation: OperationEvent.Train.createPlanTrain.menu.operation,
cmdType: CMD.Section.CMD_Train_Init_Plan,
param: {
serviceNumber: this.addModel.serviceNumber, //
tripNumber: this.addModel.tripNumber //
}
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow(operate);
});
} else {
return false;
}
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
},
handerTrainSource() {
const operate = {
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.trainSource.menu.operation,
val: this.addModel.trainSource
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
}
}
};
</script>
<style scoped>
.beijing-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,214 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-01__system stand-stop-time"
:title="title"
:visible.sync="show"
width="480px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div class="el-dialog-div">
<el-form ref="form" size="small" label-width="100px" :model="addModel" :rules="rules" label-position="left">
<el-form-item label="车次号:" prop="tripNumber">
<!--<el-input v-model="addModel.tripNumber"/>-->
<el-select v-model="addModel.tripNumber" filterable @change="tripNumberChange">
<el-option
v-for="tripNum in tripNumberList"
:key="tripNum"
:label="tripNum"
:value="tripNum"
/>
</el-select>
</el-form-item>
<el-form-item label="服务号:" prop="serviceNumber">
<!-- <el-input v-model="serviceNumber" disabled="true"/> -->
<el-select v-model="addModel.serviceNumber" filterable>
<el-option
v-for="serviceNumber in serviceNumberList"
:key="serviceNumber"
:label="serviceNumber"
:value="serviceNumber"
/>
</el-select>
</el-form-item>
</el-form>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CancelMouseState from '@/mixin/CancelMouseState';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { getTripNumberList, getServiceNumbersByTripNum } from '@/api/simulation';
export default {
name: 'TrainCreateNumber',
mixins: [
CancelMouseState
],
data() {
return {
trainNoList: [],
selected: null,
sectionName: '',
tripNumberList: [],
serviceNumberList: [],
addModel: {
tripNumber:'',
serviceNumber: ''
},
rules: {
serverNumber: [
{ required: true, message: '请输入服务号', trigger: 'blur'}
],
tripNumber: [
{ required: true, message: '请输入车次号', trigger: 'blur'}
]
},
dialogShow: false,
loading: false
};
},
computed: {
...mapGetters('map', [
'trainList',
'stationStandList',
'trainWindowSectionCode'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Train.createPlanTrain.menu.domId : '';
},
title() {
return '新建计划车';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
loadInitData(map) {
},
tripNumberChange(tripNumber) {
getServiceNumbersByTripNum(this.$route.query.group, tripNumber).then(resp => {
this.serviceNumberList = [];
if (typeof resp.data == 'string') {
this.serviceNumberList.push(resp.data);
} else {
resp.data.forEach(item => {
if (!this.serviceNumberList.includes(item)) {
this.serviceNumberList.push(item);
}
});
}
if (this.serviceNumberList.length === 1) {
this.addModel.serviceNumber = this.serviceNumberList[0];
}
});
},
doShow(operate, selected) {
this.selected = selected;
//
this.addModel = {
tripNumber:'',
serviceNumber:''
};
getTripNumberList(this.$route.query.group).then(resp => {
this.tripNumberList = [];
resp.data.forEach(item => {
if (!this.tripNumberList.includes(item)) {
this.tripNumberList.push(item);
}
});
}).catch(() => {
// this.$messageBox(error.message);
});
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
this.mouseCancelState(this.selected);
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
over: true,
operation: OperationEvent.Train.createPlanTrain.menu.operation,
cmdType: CMD.Section.CMD_Train_Init_Plan,
param: {
serviceNumber: this.addModel.serviceNumber, //
tripNumber: this.addModel.tripNumber //
}
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow(operate);
});
} else {
return false;
}
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
}
}
};
</script>
<style scoped>
.chengdou-03__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
.el-dialog-div {
height: 300px;
overflow: auto;
}
</style>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,208 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="480px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div class="el-dialog-div">
<el-form ref="form" size="small" label-width="100px" :model="addModel" :rules="rules" label-position="left">
<el-form-item label="车次号:" prop="tripNumber">
<!--<el-input v-model="addModel.tripNumber"/>-->
<el-select v-model="addModel.tripNumber" filterable @change="tripNumberChange">
<el-option
v-for="tripNum in tripNumberList"
:key="tripNum"
:label="tripNum"
:value="tripNum"
/>
</el-select>
</el-form-item>
<el-form-item label="服务号:" prop="serviceNumber">
<el-select v-model="addModel.serviceNumber" filterable>
<el-option
v-for="serviceNumber in serviceNumberList"
:key="serviceNumber"
:label="serviceNumber"
:value="serviceNumber"
/>
</el-select>
</el-form-item>
</el-form>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CancelMouseState from '@/mixin/CancelMouseState';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { getTripNumberList, getServiceNumbersByTripNum } from '@/api/simulation';
export default {
name: 'TrainCreateNumber',
mixins: [
CancelMouseState
],
data() {
return {
trainNoList: [],
selected: null,
sectionName: '',
tripNumberList: [],
serviceNumberList: [],
addModel: {
tripNumber:'',
serviceNumber: ''
},
rules: {
serviceNumber: [
{ required: true, message: '请输入服务号', trigger: 'change'}
],
tripNumber: [
{ required: true, message: '请输入车次号', trigger: 'blur'}
]
},
dialogShow: false,
loading: false
};
},
computed: {
...mapGetters('map', [
'trainList',
'stationStandList',
'trainWindowSectionCode'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Train.createPlanTrain.menu.domId : '';
},
title() {
return '新建计划车';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
tripNumberChange(tripNumber) {
getServiceNumbersByTripNum(this.$route.query.group, tripNumber).then(resp => {
this.serviceNumberList = [];
resp.data.forEach(item => {
if (!this.serviceNumberList.includes(item)) {
this.serviceNumberList.push(item);
}
});
});
if (this.serviceNumberList.length === 1) {
this.addModel.serviceNumber = this.serviceNumberList[0];
}
},
doShow(operate, selected) {
this.selected = selected;
//
this.addModel = {
tripNumber:'',
serviceNumber: ''
};
getTripNumberList(this.$route.query.group).then(resp => {
this.tripNumberList = [];
resp.data.forEach(item => {
if (!this.tripNumberList.includes(item)) {
this.tripNumberList.push(item);
}
});
}).catch(() => {
// this.$messageBox(error.message);
});
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
this.mouseCancelState(this.selected);
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
over: true,
operation: OperationEvent.Train.createPlanTrain.menu.operation,
cmdType: CMD.Section.CMD_Train_Init_Plan,
param: {
serviceNumber: this.addModel.serviceNumber, //
tripNumber: this.addModel.tripNumber //
}
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow(operate);
// this.$messageBox(error.message);
});
} else {
return false;
}
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}
};
</script>
<style scoped>
.chengdou-03__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
.el-dialog-div {
height: 300px;
overflow: auto;
}
</style>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,212 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="foshan-01__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="340px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules">
<div style="width: 96%;">
<el-form-item label="车 次 号:" label-width="95px" prop="tripNumber">
<el-select v-model="addModel.tripNumber" filterable @change="tripNumberChange">
<el-option
v-for="tripNum in tripNumberList"
:key="tripNum"
:label="tripNum"
:value="tripNum"
/>
</el-select>
</el-form-item>
<el-form-item label="服 务 号:" label-width="95px" prop="serviceNumber">
<el-select v-model="addModel.serviceNumber" filterable>
<el-option
v-for="serviceNumber in serviceNumberList"
:key="serviceNumber"
:label="serviceNumber"
:value="serviceNumber"
/>
</el-select>
</el-form-item>
</div>
</el-form>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { getTripNumberList, getServiceNumbersByTripNum } from '@/api/simulation';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
// name: 'TrainMove',
name: 'TrainAddPlan',
components: {
},
data() {
return {
trainNoList: [],
selected: null,
tripNumberList: [],
serviceNumberList: [],
addModel: {
serviceNumber: '', //
tripNumber: '' //
},
rules: {
serviceNumber: [
{ required: true, message: '请输入服务号', trigger: 'blur' }
],
tripNumber: [
{ required: true, message: '请输入车次号', trigger: 'change' }
]
},
dialogShow: false,
loading: false
};
},
computed: {
...mapGetters('map', [
'trainList',
'stationStandList',
'trainWindowSectionCode'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Train.createPlanTrain.menu.domId : '';
},
title() {
return '创建计划车';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
tripNumberChange(tripNumber) {
getServiceNumbersByTripNum(this.$route.query.group, tripNumber).then(resp => {
this.serviceNumberList = [];
if (typeof resp.data == 'string') {
this.serviceNumberList.push(resp.data);
} else {
resp.data.forEach(item => {
if (!this.serviceNumberList.includes(item)) {
this.serviceNumberList.push(item);
}
});
}
if (this.serviceNumberList.length === 1) {
this.addModel.serviceNumber = this.serviceNumberList[0];
}
});
},
doShow(operate, selected) {
this.selected = selected;
//
// if (!this.dialogShow) {
// }
this.addModel = {
tripNumber:'',
serviceNumber:''
};
getTripNumberList(this.$route.query.group).then(resp => {
this.tripNumberList = [];
resp.data.forEach(item => {
if (!this.tripNumberList.includes(item)) {
this.tripNumberList.push(item);
}
});
}).catch(error => {
console.log(error);
// this.$messageBox(error.message);
});
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
// this.mouseCancelState(this.selected);
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
over: true,
operation: OperationEvent.Train.createPlanTrain.menu.operation,
cmdType: CMD.Section.CMD_Train_Init_Plan,
param: {
serviceNumber: this.addModel.serviceNumber, //
tripNumber: this.addModel.tripNumber //
}
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
});
} else {
return false;
}
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store
.dispatch('training/nextNew', operate)
.then(({ valid }) => {
if (valid) {
this.doClose();
}
})
.catch(() => {
this.doClose();
});
}
}
};
</script>
<style scoped>
.foshan-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,212 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="fuzhou-01__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="340px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules">
<div style="width: 96%;">
<el-form-item label="车 次 号:" label-width="95px" prop="tripNumber">
<el-select v-model="addModel.tripNumber" filterable @change="tripNumberChange">
<el-option
v-for="tripNum in tripNumberList"
:key="tripNum"
:label="tripNum"
:value="tripNum"
/>
</el-select>
</el-form-item>
<el-form-item label="服 务 号:" label-width="95px" prop="serviceNumber">
<el-select v-model="addModel.serviceNumber" filterable>
<el-option
v-for="serviceNumber in serviceNumberList"
:key="serviceNumber"
:label="serviceNumber"
:value="serviceNumber"
/>
</el-select>
</el-form-item>
</div>
</el-form>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { getTripNumberList, getServiceNumbersByTripNum } from '@/api/simulation';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
// name: 'TrainMove',
name: 'TrainAddPlan',
components: {
},
data() {
return {
trainNoList: [],
selected: null,
tripNumberList: [],
serviceNumberList: [],
addModel: {
serviceNumber: '', //
tripNumber: '' //
},
rules: {
serviceNumber: [
{ required: true, message: '请输入服务号', trigger: 'blur' }
],
tripNumber: [
{ required: true, message: '请输入车次号', trigger: 'change' }
]
},
dialogShow: false,
loading: false
};
},
computed: {
...mapGetters('map', [
'trainList',
'stationStandList',
'trainWindowSectionCode'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Train.createPlanTrain.menu.domId : '';
},
title() {
return '创建计划车';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
tripNumberChange(tripNumber) {
getServiceNumbersByTripNum(this.$route.query.group, tripNumber).then(resp => {
this.serviceNumberList = [];
if (typeof resp.data == 'string') {
this.serviceNumberList.push(resp.data);
} else {
resp.data.forEach(item => {
if (!this.serviceNumberList.includes(item)) {
this.serviceNumberList.push(item);
}
});
}
if (this.serviceNumberList.length === 1) {
this.addModel.serviceNumber = this.serviceNumberList[0];
}
});
},
doShow(operate, selected) {
this.selected = selected;
//
// if (!this.dialogShow) {
// }
this.addModel = {
tripNumber:'',
serviceNumber:''
};
getTripNumberList(this.$route.query.group).then(resp => {
this.tripNumberList = [];
resp.data.forEach(item => {
if (!this.tripNumberList.includes(item)) {
this.tripNumberList.push(item);
}
});
}).catch(error => {
console.log(error);
// this.$messageBox(error.message);
});
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
// this.mouseCancelState(this.selected);
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
over: true,
operation: OperationEvent.Train.createPlanTrain.menu.operation,
cmdType: CMD.Section.CMD_Train_Init_Plan,
param: {
serviceNumber: this.addModel.serviceNumber, //
tripNumber: this.addModel.tripNumber //
}
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
});
} else {
return false;
}
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store
.dispatch('training/nextNew', operate)
.then(({ valid }) => {
if (valid) {
this.doClose();
}
})
.catch(() => {
this.doClose();
});
}
}
};
</script>
<style scoped>
.foshan-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,210 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="haerbin-01__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="300px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div class="el-dialog-div">
<el-form ref="form" size="small" label-width="100px" :model="addModel" :rules="rules" label-position="left">
<el-form-item label="车次号:" prop="tripNumber">
<!--<el-input v-model="addModel.tripNumber"/>-->
<el-select v-model="addModel.tripNumber" filterable @change="tripNumberChange">
<el-option
v-for="tripNum in tripNumberList"
:key="tripNum"
:label="tripNum"
:value="tripNum"
/>
</el-select>
</el-form-item>
<el-form-item label="服务号:" prop="serviceNumber">
<el-select v-model="addModel.serviceNumber" filterable>
<el-option
v-for="serviceNumber in serviceNumberList"
:key="serviceNumber"
:label="serviceNumber"
:value="serviceNumber"
/>
</el-select>
</el-form-item>
</el-form>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CancelMouseState from '@/mixin/CancelMouseState';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { getTripNumberList, getServiceNumbersByTripNum } from '@/api/simulation';
export default {
name: 'TrainCreateNumber',
mixins: [
CancelMouseState
],
data() {
return {
trainNoList: [],
selected: null,
sectionName: '',
tripNumberList: [],
serviceNumberList: [],
addModel: {
tripNumber:'',
serviceNumber: ''
},
rules: {
serviceNumber: [
{ required: true, message: '请输入服务号', trigger: 'change'}
],
tripNumber: [
{ required: true, message: '请输入车次号', trigger: 'blur'}
]
},
dialogShow: false,
loading: false
};
},
computed: {
...mapGetters('map', [
'trainList',
'stationStandList',
'trainWindowSectionCode'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Train.createPlanTrain.menu.domId : '';
},
title() {
return '新建计划车';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
tripNumberChange(tripNumber) {
getServiceNumbersByTripNum(this.$route.query.group, tripNumber).then(resp => {
this.serviceNumberList = [];
resp.data.forEach(item => {
if (!this.serviceNumberList.includes(item)) {
this.serviceNumberList.push(item);
}
});
});
if (this.serviceNumberList.length === 1) {
this.addModel.serviceNumber = this.serviceNumberList[0];
}
},
doShow(operate, selected) {
this.selected = selected;
//
this.addModel = {
tripNumber:'',
serviceNumber: ''
};
getTripNumberList(this.$route.query.group).then(resp => {
this.tripNumberList = [];
resp.data.forEach(item => {
if (!this.tripNumberList.includes(item)) {
this.tripNumberList.push(item);
}
});
}).catch(error => {
console.log(error);
// this.$messageBox(error.message);
});
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
this.mouseCancelState(this.selected);
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
over: true,
operation: OperationEvent.Train.createPlanTrain.menu.operation,
cmdType: CMD.Section.CMD_Train_Init_Plan,
param: {
serviceNumber: this.addModel.serviceNumber, //
tripNumber: this.addModel.tripNumber //
}
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
onsole.log(error);
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow(operate);
// this.$messageBox(error.message);
});
} else {
return false;
}
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}
};
</script>
<style scoped>
.chengdou-03__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
.el-dialog-div {
height: 200px;
overflow: auto;
}
</style>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,212 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="ningbo-01__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="340px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules">
<div style="width: 96%;">
<el-form-item label="车 次 号:" label-width="95px" prop="tripNumber">
<el-select v-model="addModel.tripNumber" filterable @change="tripNumberChange">
<el-option
v-for="tripNum in tripNumberList"
:key="tripNum"
:label="tripNum"
:value="tripNum"
/>
</el-select>
</el-form-item>
<el-form-item label="服 务 号:" label-width="95px" prop="serviceNumber">
<el-select v-model="addModel.serviceNumber" filterable>
<el-option
v-for="serviceNumber in serviceNumberList"
:key="serviceNumber"
:label="serviceNumber"
:value="serviceNumber"
/>
</el-select>
</el-form-item>
</div>
</el-form>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { getTripNumberList, getServiceNumbersByTripNum } from '@/api/simulation';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
// name: 'TrainMove',
name: 'TrainAddPlan',
components: {
},
data() {
return {
trainNoList: [],
selected: null,
tripNumberList: [],
serviceNumberList: [],
addModel: {
serviceNumber: '', //
tripNumber: '' //
},
rules: {
serviceNumber: [
{ required: true, message: '请输入服务号', trigger: 'blur' }
],
tripNumber: [
{ required: true, message: '请输入车次号', trigger: 'change' }
]
},
dialogShow: false,
loading: false
};
},
computed: {
...mapGetters('map', [
'trainList',
'stationStandList',
'trainWindowSectionCode'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Train.createPlanTrain.menu.domId : '';
},
title() {
return '创建计划车';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
tripNumberChange(tripNumber) {
getServiceNumbersByTripNum(this.$route.query.group, tripNumber).then(resp => {
this.serviceNumberList = [];
if (typeof resp.data == 'string') {
this.serviceNumberList.push(resp.data);
} else {
resp.data.forEach(item => {
if (!this.serviceNumberList.includes(item)) {
this.serviceNumberList.push(item);
}
});
}
if (this.serviceNumberList.length === 1) {
this.addModel.serviceNumber = this.serviceNumberList[0];
}
});
},
doShow(operate, selected) {
this.selected = selected;
//
// if (!this.dialogShow) {
// }
this.addModel = {
tripNumber:'',
serviceNumber:''
};
getTripNumberList(this.$route.query.group).then(resp => {
this.tripNumberList = [];
resp.data.forEach(item => {
if (!this.tripNumberList.includes(item)) {
this.tripNumberList.push(item);
}
});
}).catch(error => {
console.log(error);
// this.$messageBox(error.message);
});
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
// this.mouseCancelState(this.selected);
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
over: true,
operation: OperationEvent.Train.createPlanTrain.menu.operation,
cmdType: CMD.Section.CMD_Train_Init_Plan,
param: {
serviceNumber: this.addModel.serviceNumber, //
tripNumber: this.addModel.tripNumber //
}
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
});
} else {
return false;
}
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store
.dispatch('training/nextNew', operate)
.then(({ valid }) => {
if (valid) {
this.doClose();
}
})
.catch(() => {
this.doClose();
});
}
}
};
</script>
<style scoped>
.ningbo-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -6,8 +6,6 @@
<speed-limit-control ref="speedLimitControl" />
<alxe-effective ref="alxeEffective" />
<notice-info ref="noticeInfo" />
<train-add-plan ref="trainAddPlan" />
<set-fault ref="setFault" />
</div>
</template>
@ -23,8 +21,6 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
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';
export default {
@ -35,9 +31,7 @@ export default {
SectionUnLock,
SpeedLimitControl,
AlxeEffective,
NoticeInfo,
SetFault,
TrainAddPlan
NoticeInfo
},
props: {
selected: {
@ -184,7 +178,7 @@ export default {
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
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() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
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() {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
}
});
}

View File

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

View File

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

View File

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

View File

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

View File

@ -13,7 +13,11 @@
</el-form-item>
</el-form> -->
<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="goal" label="得分" />
<el-table-column v-if="this.$route.query.type ==='theory'" prop="correctAnswer" label="答题结果" />

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

View File

@ -1,18 +1,18 @@
<template>
<div class="refereeList">
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
<!-- <question-list ref="questionList" /> -->
<edit-score ref="editScore" />
</div>
</template>
<script>
import { refereeEnterSimulation, loadingPaper, getRaceUserList } from '@/api/competition';
// import QuestionList from './questionList';
import editScore from './editScore';
export default {
name: 'RefereeList',
components:{
// QuestionList
editScore
},
data() {
return {
@ -193,8 +193,8 @@ export default {
},
playBack(index, row) {
},
gradeScore(index, row) {
gradeScore(index, row) { //
this.$refs.editScore.doShow(row);
},
// afterQuery(data) {
// clearTimeout(this.inter);

View File

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

View File

@ -1,7 +1,7 @@
<template>
<div class="menus" :style="{width: width + 'px'}">
<set-fault ref="setFault" />
<train-add-plan ref="trainAddPlan" />
<set-fault ref="setFault" :class-name="className" />
<train-add-plan ref="trainAddPlan" :class-name="className" />
</div>
</template>
@ -24,6 +24,11 @@ export default {
}
}
},
data() {
return {
className: ''
};
},
computed: {
...mapGetters('config', [
'width'
@ -42,6 +47,36 @@ export default {
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>

View File

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

View File

@ -43,6 +43,14 @@ import { deviceFaultType, deviceType} from '@/scripts/cmdPlugin/Config';
export default {
name: 'SwitchControl',
props: {
className: {
type: String,
default() {
return '';
}
}
},
data() {
return {
dialogShow: false,
@ -53,7 +61,6 @@ export default {
activeShow: false,
deviceName: '',
faultList: [],
className: '',
form: { faultType: ''},
rules: {
faultType: [
@ -81,36 +88,6 @@ export default {
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() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');

View File

@ -2,6 +2,7 @@
<el-dialog
v-dialogDrag
:class="className"
class="stand-stop-time"
:title="title"
:visible.sync="show"
width="340px"
@ -42,7 +43,7 @@
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
<notice-info ref="noticeInfo" :class-name="className" />
</el-dialog>
</template>
@ -58,13 +59,20 @@ export default {
components: {
NoticeInfo
},
props: {
className: {
type: String,
default() {
return '';
}
}
},
data() {
return {
trainNoList: [],
selected: null,
tripNumberList: [],
serviceNumberList: [],
className: '',
addModel: {
serviceNumber: '', //
tripNumber: '' //
@ -101,36 +109,6 @@ export default {
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() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');

View File

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

View File

@ -567,7 +567,8 @@ export default {
model.rightStopPointOffset = model.rightStopPointOffset || model.lengthFact - 5;
}
const changeSectionList = this.handleOtherSectionChange(model);
models = [model, ...changeSectionList];
const changeStandList = this.handleRelevanceStand(model);
models = [model, ...changeSectionList, ...changeStandList];
this.$emit('updateMapModel', models);
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) { //
const models = [];
const pointModel = [];

View File

@ -126,6 +126,7 @@ export default {
ciStation: false, //
depot:false, //
reentry:false, //
smallRouting: false, //
number:'', //
code: '',
zcCode: '',
@ -211,7 +212,8 @@ export default {
] },
{ 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.x', firstLevel: 'kilometerPosition', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' },
@ -285,13 +287,11 @@ export default {
},
idCiStation() {
return this.editModel.ciStation;
},
isReentry() {
return this.editModel.reentry;
}
},
watch: {
// selected: function (val) {
// this.deviceSelect(val);
// }
},
methods: {
deviceChange(code) {
this.$emit('setCenter', code);
@ -431,6 +431,7 @@ export default {
centralized: false,
depot:false,
reentry:false,
smallRouting: false,
// concentrateStationCode: '',
// controlled: false,
chargeStationCodeList:[],

View File

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